/* CSS Variables - Stripe Light Tech Aesthetic */
:root {
    --primary: #2563eb;         /* Tech Blue */
    --secondary: #1e40af;       /* Darker Blue for hover */
    --bg-dark: #09090b;         /* Zinc 950 (Neutral Dark) */
    --bg-dark-alt: #18181b;     /* Zinc 900 (Card Dark) */
    --bg-light: #f8fafc;        /* Slate 50 (Neutral Light) */
    --bg-light-alt: #ffffff;    /* Slate 100/White (Card Light) */
    --text-dark: #f4f4f5;       /* Zinc 100 */
    --text-light: #0f172a;      /* Slate 900 */
    --text-muted-dark: #a1a1aa;  /* Zinc 400 */
    --text-muted-light: #475569; /* Slate 600 */
    --card-dark: #18181b;       /* Zinc 900 */
    --card-light: #ffffff;      /* White */
    --border-dark: #27272a;     /* Zinc 800 */
    --border-light: #e2e8f0;    /* Slate 200 */
    --accent-subtle-light: #eff6ff; /* Blue 50 */
    --accent-subtle-dark: rgba(59, 130, 246, 0.1);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-dark);
    line-height: 1.6;
    transition: var(--transition);
}

body.light-mode {
    background-color: var(--bg-light);
    color: var(--text-light);
}

h1, h2, h3, h4 {
    letter-spacing: -0.02em;
}

.mono-label {
    font-family: SFMono-Regular, Consolas, Monaco, monospace;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(9, 9, 11, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-dark);
    transition: var(--transition);
}

body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border-light);
}

.nav-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-logo-img {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border-dark);
    transition: var(--transition);
}

body.light-mode .nav-logo-img {
    border-color: var(--border-light);
}

.nav-logo-img:hover {
    border-color: var(--primary);
    transform: scale(1.02);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-muted-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    font-size: 0.92rem;
}

body.light-mode .nav-menu a {
    color: var(--text-muted-light);
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-dark);
    transition: var(--transition);
}

body.light-mode .nav-toggle span {
    background: var(--text-light);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

body.light-mode .theme-toggle {
    color: var(--text-light);
}

.theme-toggle:hover {
    background: rgba(37, 99, 235, 0.1);
}

.navbar.navbar-scrolled {
    box-shadow: var(--shadow);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 80px;
    position: relative;
    background: var(--bg-dark);
}

body.light-mode .hero {
    background: var(--bg-light);
}

.hero-content {
    width: 100%;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

.hero-text-side {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.hero-image-side {
    display: flex;
    justify-content: center;
}

.profile-avatar {
    width: 240px;
    height: 240px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
    border: 1px solid var(--border-dark);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

body.light-mode .profile-avatar {
    border-color: var(--border-light);
}

.gradient-text {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0.5rem 0 0.2rem;
    line-height: 1.15;
}

body.light-mode .gradient-text {
    color: var(--text-light);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--text-muted-dark);
    margin-bottom: 2rem;
    line-height: 1.5;
    max-width: 580px;
}

body.light-mode .hero-tagline {
    color: var(--text-muted-light);
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: var(--card-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-size: 1.15rem;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--border-dark);
}

body.light-mode .social-links a {
    background: var(--card-light);
    color: var(--text-light);
    border: 1px solid var(--border-light);
}

.social-links a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

body.light-mode .social-links a:hover {
    background: var(--accent-subtle-light);
}

body:not(.light-mode) .social-links a:hover {
    background: var(--accent-subtle-dark);
}



@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }
    .hero-text-side {
        align-items: center;
        text-align: center;
        order: 2;
    }
    .hero-image-side {
        order: 1;
    }
    .gradient-text {
        font-size: 2.8rem;
    }
    .hero-subtitle {
        font-size: 1.25rem;
    }
    .profile-avatar {
        width: 180px;
        height: 180px;
    }
}

/* Sections */
.section {
    padding: 120px 0;
}

.section-alt {
    background: var(--bg-dark-alt);
}

body.light-mode .section-alt {
    background: var(--bg-light-alt);
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: left;
    max-width: 800px;
    margin: 0 auto 2.5rem;
    color: var(--text-dark);
}

body.light-mode .section-title {
    color: var(--text-light);
}

.subsection-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 2rem auto 1.2rem;
    max-width: 800px;
    color: var(--primary);
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.about-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-muted-dark);
}

body.light-mode .about-content p {
    color: var(--text-muted-light);
}

.about-content strong {
    color: var(--primary);
}

.research-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
    margin-top: 2rem;
}

.tag {
    padding: 0.35rem 0.8rem;
    background: var(--accent-subtle-dark);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 4px;
    font-size: 0.72rem;
    font-family: SFMono-Regular, Consolas, Monaco, monospace;
    font-weight: 600;
    color: var(--primary);
    transition: var(--transition);
}

body.light-mode .tag {
    background: var(--accent-subtle-light);
    border-color: rgba(37, 99, 235, 0.2);
}

.tag:hover {
    background: var(--primary);
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-dark);
}

body.light-mode .timeline::before {
    background: var(--border-light);
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: 2.5rem;
}

.timeline-marker {
    position: absolute;
    left: -4px;
    top: 10px;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 1px;
    box-shadow: none;
}

.timeline-content {
    background: var(--card-dark);
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-dark);
    transition: var(--transition);
}

body.light-mode .timeline-content {
    background: var(--card-light);
    border: 1px solid var(--border-light);
}

.timeline-content:hover {
    border-color: var(--primary);
}

.timeline-date {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--accent-subtle-dark);
    color: var(--primary);
    border-radius: 4px;
    font-family: SFMono-Regular, Consolas, Monaco, monospace;
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

body.light-mode .timeline-date {
    background: var(--accent-subtle-light);
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.timeline-role {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-role a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.timeline-role a:hover {
    text-decoration: underline;
}

.timeline-content p:last-child {
    color: var(--text-muted-dark);
    margin: 0;
}

body.light-mode .timeline-content p:last-child {
    color: var(--text-muted-light);
}

/* Timeline Header with Logo */
.timeline-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.timeline-header h3 {
    margin-bottom: 0;
}

.timeline-header a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.timeline-header a:hover {
    color: var(--primary);
}

.institution-logo {
    width: 120px;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.institution-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.institution-badge.hits {
    background: var(--bg-subtle);
    color: var(--text-muted-dark);
    border: 1px solid var(--border-dark);
    border-radius: 4px;
}
body.light-mode .institution-badge.hits {
    background: var(--bg-light-alt);
    color: var(--text-muted-light);
    border-color: var(--border-light);
}

.timeline-lab {
    font-size: 0.9rem;
    color: var(--text-muted-dark);
    margin-top: 1rem;
}

.timeline-lab-right {
    text-align: right;
}

body.light-mode .timeline-lab {
    color: var(--text-muted-light);
}

.timeline-lab i {
    color: var(--primary);
    margin-right: 0.25rem;
}

.timeline-lab a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.timeline-lab a:hover {
    text-decoration: underline;
}

/* Project Items in Timeline */
.timeline-projects {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem;
    background: var(--bg-dark);
    border-radius: 6px;
    border: 1px solid var(--border-dark);
    transition: var(--transition);
}

body.light-mode .project-item {
    background: var(--bg-light);
    border-color: var(--border-light);
}

.project-item:hover {
    border-color: var(--primary);
}

.project-logo {
    height: 32px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
}

.project-info {
    flex: 1;
}

.project-info strong {
    display: inline;
    font-size: 0.95rem;
}

.project-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--accent-subtle-dark);
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 4px;
    font-family: SFMono-Regular, Consolas, Monaco, monospace;
    font-size: 0.68rem;
    font-weight: 600;
    margin-left: 0.5rem;
    vertical-align: middle;
}
body.light-mode .project-badge {
    background: var(--accent-subtle-light);
    border-color: rgba(37, 99, 235, 0.25);
}

.project-info p {
    font-size: 0.85rem;
    color: var(--text-muted-dark);
    margin: 0.25rem 0 0 0;
}

body.light-mode .project-info p {
    color: var(--text-muted-light);
}

/* Publications */
.publications-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.publication-card {
    display: block;
    background: transparent;
    padding: 1.25rem 0;
    border: none;
    border-bottom: 1px solid var(--border-dark);
    transition: var(--transition);
}

body.light-mode .publication-card {
    background: transparent;
    border-bottom: 1px solid var(--border-light);
    box-shadow: none;
}

.publication-card:hover {
    border-bottom-color: var(--primary);
}

.publication-card.featured {
    border-left: 3px solid var(--primary) !important;
    background: var(--accent-subtle-dark) !important;
    padding: 1rem !important;
    margin-left: -1rem !important;
    margin-right: -1rem !important;
    box-shadow: none !important;
    border-radius: 4px;
}

body.light-mode .publication-card.featured {
    background: var(--accent-subtle-light) !important;
}

.pub-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 0.4rem;
}

body.light-mode .pub-title {
    color: var(--text-light);
}

.pub-authors {
    color: var(--text-muted-dark);
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

body.light-mode .pub-authors {
    color: var(--text-muted-light);
}

.pub-venue {
    color: var(--text-muted-dark);
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

body.light-mode .pub-venue {
    color: var(--text-muted-light);
}

.pub-note {
    font-size: 0.85rem;
    color: var(--text-muted-dark);
}

body.light-mode .pub-note {
    color: var(--text-muted-light);
}





/* Contact Section */
.contact-content {
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.contact-content p {
    color: var(--text-muted-dark);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

body.light-mode .contact-content p {
    color: var(--text-muted-light);
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.contact-email:hover {
    background: var(--secondary);
}

.contact-social {
    margin-top: 2rem;
}

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

body.light-mode .footer {
    border-top: 1px solid var(--border-light);
    color: var(--text-muted-light);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.fade-in {
    opacity: 1;
    transform: none;
}

.fade-in.visible {
    opacity: 1;
    transform: none;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        border-bottom: 1px solid var(--border-dark);
    }

    body.light-mode .nav-menu {
        background: var(--bg-light);
        border-bottom: 1px solid var(--border-light);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: flex;
    }

    .gradient-text {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .publication-card {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .publication-year {
        font-size: 1.2rem;
    }

    .timeline::before {
        left: 7px;
    }

    .timeline-item {
        padding-left: 35px;
    }

    .timeline-marker {
        left: 0;
    }
}

/* Print Styles for PDF Export */
@media print {
    /* Page setup */
    @page {
        size: A4;
        margin: 1.5cm;
    }

    /* Hide navigation and interactive elements */
    .navbar,
    .nav-toggle,
    .theme-toggle,
    .scroll-indicator,
    .footer {
        display: none !important;
    }

    /* Hero section optimization */
    .hero {
        min-height: auto;
        padding: 2rem 0 3rem;
        page-break-after: always;
        background: white !important;
    }

    .profile-avatar {
        width: 150px;
        height: 150px;
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }

    .gradient-text {
        color: #0f172a !important;
        font-size: 2.5rem;
    }

    .hero-subtitle,
    .hero-tagline {
        color: #475569 !important;
    }

    .social-links {
        display: none;
    }

    /* Section optimization */
    .section {
        padding: 2rem 0;
        page-break-after: always;
        background: white !important;
    }

    .section:last-of-type {
        page-break-after: auto;
    }

    .section-alt {
        background: white !important;
    }

    .section-title {
        color: #2563eb !important;
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    /* About section */
    .about-content p {
        color: #0f172a !important;
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }

    /* Timeline optimization */
    .timeline-content {
        background: white !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }

    .timeline-date {
        background: #eff6ff !important;
        color: #2563eb !important;
        border: 1px solid rgba(37, 99, 235, 0.2) !important;
        font-size: 0.8rem;
    }

    .timeline-header h3 {
        font-size: 1.1rem;
        color: #0f172a !important;
    }

    .timeline-role,
    .timeline-lab a {
        color: #2563eb !important;
    }

    .timeline-content p {
        color: #475569 !important;
        font-size: 0.9rem;
    }

    /* Publications optimization */
    .publication-card {
        background: white !important;
        border: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        margin-bottom: 0 !important;
        padding: 1rem 0 !important;
        display: block !important;
    }

    .publication-card.featured {
        border-left: 3px solid #2563eb !important;
        background: #eff6ff !important;
        padding: 1rem !important;
        margin-left: -1rem !important;
        margin-right: -1rem !important;
    }

    .pub-title {
        color: #0f172a !important;
        font-size: 1rem !important;
        line-height: 1.4 !important;
    }

    .pub-authors,
    .pub-venue {
        color: #475569 !important;
        font-size: 0.85rem !important;
    }

    .impact-badge,
    .rank-badge,
    .presentation-badge {
        font-size: 0.75rem;
        background: #f1f5f9 !important;
        color: #475569 !important;
        border: 1px solid #e2e8f0 !important;
    }

    /* Contact section */
    #contact {
        page-break-after: auto;
    }

    .contact-email {
        background: #2563eb !important;
        color: white !important;
    }

    /* Force light mode colors */
    body {
        background: white !important;
        color: #0f172a !important;
    }

    /* Remove animations */
    * {
        animation: none !important;
        transition: none !important;
    }

    /* Ensure good contrast */
    a {
        color: #2563eb !important;
        text-decoration: none;
    }

    /* Logo sizing for print */
    .institution-logo {
        max-height: 30px;
    }

    .nav-logo-img {
        display: none;
    }
}
