/* ===============================
   Global Styles and Variables
================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Helvetica", "Arial", sans-serif;
}

/* Dark theme (default) */
:root {
    --background-color: #000000;
    --text-color: #e5e5e5;
    --text-secondary: #b3b3b3;
    --heading-color: #ffffff;
    --accent-color: #60a5fa;
    --border-color: #333333;
    --hover-border-color: #4a4a4a;
    --color-blue: #60a5fa;
    --color-opposite-bg: #ffffff;
    --card-bg: #1a1a1a;
    --footer-color: #0a0a0a;
    --footer-color-text: #b3b3b3;
    --linear-gradient: linear-gradient(to bottom, transparent, #60a5fa, #60a5fa, transparent);
}

/* Light theme */
.light-theme {
    --background-color: #ffffff;
    --text-color: #2d2d2d;
    --text-secondary: #666666;
    --heading-color: #000000;
    --accent-color: #2563eb;
    --border-color: #d1d1d1;
    --hover-border-color: #999999;
    --color-blue: #3b82f6;
    --color-opposite-bg: #ffffff;
    --card-bg: #f8f8f8;
    --footer-color: #f5f5f5;
    --footer-color-text: #666666;
    --linear-gradient: linear-gradient(to bottom, transparent, #3b82f6, #3b82f6, transparent);
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

.layout {
    background-color: var(--background-color);
    transition: background-color 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.layout main {
    flex: 1;
}

/* Add transitions to elements that change with theme */
.text, .heading, .headingSimple, .card-title, .card-desc,
.sidebar-title, .sidebar-position, .header-logo, .nav-link,
.card, .sidebar-link-item {
    transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-color);
}

.light-theme .theme-toggle {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.light-theme .theme-toggle:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* ===============================
   Layout
================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.content-left {
    flex-basis: 250px;
}

.content-right {
    flex: 1;
}

/* ===============================
   Header
================================= */
.header_div {
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 2rem;
}

.header {
    display: flex;
    /*justify-content: space-between;*/
    gap: 10%;
    align-items: center;
}

.header-logo {
    color: var(--heading-color);
    font-weight: bold;
    font-size: 20px;
    cursor: pointer;
}

.nav-links-tab {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease-in-out;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.nav-link:hover {
    color: var(--accent-color);
}

/* ===============================
   Sidebar
================================= */
.sidebar {
    position: sticky;
    top: 10px;
}

.sidebar-img-div {
    width: 140px;
    height: 140px;
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    overflow: hidden;
}

.sidebar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-title {
    color: var(--heading-color);
    font-weight: bold;
    margin-top: 10px;
    font-size: 18px;
}

.sidebar-position {
    color: var(--text-secondary);
    font-size: 14px;
}

.sidebar-links {
    margin-top: 15px;
}

.sidebar-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.3s;
    text-decoration: none;
}

.sidebar-link-item:hover {
    color: var(--accent-color);
}

.sidebar-link-item p {
    margin: 0;
}

/* ===============================
   Content Typography
================================= */
.text {
    color: var(--text-color);
    line-height: 1.7;
    font-size: 17px;
    margin-bottom: 10px;
}

.text a {
    color: var(--accent-color);
}

.heading {
    color: var(--heading-color);
    margin-bottom: 10px;
    font-size: 26px;
    font-weight: 700;
}

.headingSimple {
    color: var(--heading-color);
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 700;
}

/* ===============================
   Cards
================================= */
.experience-education {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.card-container {
    position: relative;
    display: flex;
    gap: 20px;
}

.card-container::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 12px;
    width: 2px;
    height: calc(100% - 12px);
    background: var(--color-blue);
}

.card-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid var(--color-blue);
    background-color: var(--color-opposite-bg);
}

.card {
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
    border-radius: 8px;
    width: 550px;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, border-color 0.3s ease;
    cursor: pointer;
    margin-bottom: 10px;
}

.card:hover {
    transform: translateX(5px);
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.light-theme .card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-container:hover .card-dot{
    background-color: var(--color-blue);
}

.card-title {
    font-weight: 600;
    color: var(--heading-color);
    font-size: 15px;
    margin-bottom: 5px;
}

.card-icon {
    color: var(--accent-color);
}

.card-location {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.card-timeline {
    font-size: 12px;
    color: var(--color-blue);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 10px;
}

.card > div {
    flex: 1;
    min-width: 0;
}

.card .text {
    font-size: 13px;
    line-height: 1.5;
    font-weight: bold;
    color: var(--text-secondary);
}


/* ===============================
   Publications & Projects
================================= */
.content-full {
    flex: 1;
    width: 100%;
}

.publication-card {
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, border-color 0.3s ease;
}

.publication-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-color);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.light-theme .publication-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.publication-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 10px;
}

.publication-title {
    color: var(--heading-color);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.publication-link {
    color: var(--accent-color);
    font-size: 18px;
    text-decoration: none;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.publication-links {
    display: flex;
    gap: 12px;
}

.publication-link:hover {
    color: var(--color-blue);
}

.publication-authors {
    color: var(--text-secondary);
    font-size: 14px;
    font-style: italic;
    margin: 5px 0;
}

.publication-venue {
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    margin: 5px 0;
}

.publication-desc {
    color: var(--text-color);
    font-size: 15px;
    line-height: 1.6;
    margin: 10px 0;
}

.publication-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag {
    background-color: var(--accent-color);
    color: var(--background-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* ===============================
   Projects Grid
================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.project-card {
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.light-theme .project-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--border-color);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-title {
    color: var(--heading-color);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.project-desc {
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 15px 0;
    flex: 1;
}

.project-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.project-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: var(--background-color);
    text-decoration: none;
    font-size: 16px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.project-link-btn:hover {
    transform: scale(1.1);
    background-color: var(--color-blue);
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ===============================
   Achievements
================================= */
.achievement-item {
    margin-bottom: 20px;
}

.achievement-separator {
    width: 95%;
    height: 2px;
    background-color: var(--accent-color);
    margin: 20px 0;
}

/* ===============================
   Footer
================================= */
.footer {
    margin-top: 3rem;
    color: var(--footer-color-text);
    padding: 2rem 1rem;
    background: var(--footer-color);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.social-tab-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.social-links-tab {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: var(--footer-color-text);
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--accent-color);
}

.footer-copy {
    font-size: 12px;
    margin-top: 15px;
    color: var(--text-secondary);
}

/* ===============================
   Responsive Design
================================= */
@media (max-width: 992px) {
    .content {
        flex-direction: column;
    }
    .content-left {
        display: flex;
        justify-content: center;
        margin-bottom: 2rem;
    }
    .sidebar {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .card {
        width: 100%;
        max-width: 550px;
    }
}

@media (max-width: 600px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .nav-links-tab {
        flex-wrap: wrap;
    }
    .card {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }
    .card-timeline {
        margin-left: 0;
        align-self: flex-start;
    }
    .theme-toggle {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    .footer {
        padding: 1.5rem 1rem;
    }
    .footer-copy {
        font-size: 11px;
        line-height: 1.5;
    }
}
