:root {
    --bg-color: #ffffff;
    --bg-light: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --nav-border: rgba(226, 232, 240, 0.6);
    --hero-glow: rgba(59, 130, 246, 0.1);
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
}

:root.dark-theme {
    --bg-color: #0f172a;
    --bg-light: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --accent-color: #60a5fa;
    --accent-hover: #93c5fd;
    --border-color: #334155;
    --card-bg: #1e293b;
    --nav-bg: rgba(15, 23, 42, 0.85);
    --nav-border: rgba(51, 65, 85, 0.6);
    --hero-glow: rgba(96, 165, 250, 0.15);
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1, h2, h3, h4, h5 {
    color: var(--text-primary);
    line-height: 1.3;
}

.section-header {
    margin-bottom: 3.5rem;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), #60a5fa);
    border-radius: 2px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--nav-border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    padding: 0;
    margin-left: 0.5rem;
}

.theme-toggle:hover {
    color: var(--text-primary);
}

/* Sections */
.section {
    padding: 4.5rem 0;
}

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

/* Hero */
.hero {
    min-height: 75vh;
    display: flex;
    align-items: center;
    padding-top: 6rem;
    position: relative;
    overflow: hidden;
}

/* Subtle background gradient for hero */
.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--hero-glow) 0%, transparent 70%);
    z-index: -1;
    border-radius: 50%;
    animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title, .hero-subtitle, .hero-text, .social-links {
    opacity: 0;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation-delay: 0.1s;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
    animation-delay: 0.2s;
}

.hero-text {
    max-width: 600px;
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    animation-delay: 0.3s;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    animation-delay: 0.4s;
}

.social-links a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.social-links a:hover {
    background: var(--text-primary);
    color: var(--bg-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.social-links a i {
    width: 20px;
    height: 20px;
}

/* About */
.about-text p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Timeline (Experience & Education) */
.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 7px;
    height: calc(100% - 16px);
    width: 2px;
    background: var(--border-color);
}

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

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-color);
    border: 3px solid var(--bg-color);
    box-shadow: 0 0 0 1px var(--border-color);
}

.timeline-dot.ongoing {
    background: #10b981; /* Green color for active roles */
}

.timeline-date {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-content h5 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.timeline-content ul {
    list-style-type: disc;
    padding-left: 1.25rem;
    margin-top: 0.5rem;
}

.timeline-content ul li {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* Publications Grid */
.research-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

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

.paper-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.paper-links {
    margin-top: auto;
    padding-top: 1rem;
}

.paper-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.paper-meta {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-light);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.paper-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.paper-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.paper-desc strong {
    color: var(--text-primary);
}

.paper-links {
    display: flex;
    gap: 1rem;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.btn-link i {
    width: 16px;
    height: 16px;
}

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

/* Skills Badges */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.skill-badge {
    background: var(--bg-light);
    color: var(--accent-color);
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.skill-badge:hover {
    border-color: var(--accent-color);
    background: rgba(59, 130, 246, 0.05);
}

:root.dark-theme .skill-badge:hover {
    background: rgba(96, 165, 250, 0.1);
}

/* Contact Section */
.text-center { 
    text-align: center; 
}

.contact-text {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-color);
    color: #ffffff !important;
    border: 1px solid var(--accent-color);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--text-tertiary);
    transform: translateY(-2px);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

/* Footer */
footer {
    padding: 3rem 0;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-content {
        flex-wrap: wrap;
    }
    
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        padding: 1rem 0;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .theme-toggle {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .research-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 0;
    }
    
    .timeline-dot {
        left: -8px;
    }
    
    .timeline-date {
        display: block;
        text-align: left;
        padding-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .timeline-content {
        padding-left: 1.5rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

.print-only-link { display: none; }

/* Print Stylesheet */
@media print {
    @page { margin: 0.6cm; }
    
    /* 1. Show all sections */
    .section { opacity: 1 !important; transform: none !important; padding: 0.3rem 0 !important; margin: 0 !important; }
    
    /* 2. Base resets */
    body { background: #fff !important; color: #1e293b !important; font-size: 11px !important; line-height: 1.35 !important; }
    .navbar, .hero-buttons, #theme-toggle, .hero::before, footer { display: none !important; }
    .container { padding: 0; max-width: 100%; }
    
    /* Top Print Link */
    .print-only-link { display: block !important; margin-bottom: 0.4rem !important; font-size: 11px !important; color: #3b82f6 !important; font-weight: 600; text-decoration: none !important; }
    
    /* 3. Beautify Hero */
    .hero { min-height: auto; padding: 0 !important; border-bottom: 2px solid #e2e8f0; margin-bottom: 0.5rem !important; padding-bottom: 0.5rem !important; }
    .hero-title { font-size: 24px !important; margin-bottom: 2px !important; color: #0f172a !important; font-weight: 700 !important; }
    .hero-subtitle { font-size: 13px !important; margin-bottom: 4px !important; color: #3b82f6 !important; font-weight: 600 !important; }
    .hero-text { font-size: 11px !important; margin-bottom: 0 !important; color: #475569 !important; }
    
    .social-links { margin: 0.4rem 0 0 0 !important; gap: 0.8rem !important; display: flex !important; flex-wrap: wrap !important; }
    .social-links a { color: #475569 !important; display: flex !important; align-items: center !important; gap: 0.3rem !important; text-decoration: none !important; }
    .social-links svg { width: 12px !important; height: 12px !important; }
    
    /* 4. Beautify Headers */
    .section-header { margin-bottom: 0.4rem !important; }
    .section-title { font-size: 12px !important; text-transform: uppercase !important; letter-spacing: 1px !important; color: #3b82f6 !important; border-bottom: 1px solid #cbd5e1 !important; padding-bottom: 2px !important; font-weight: 700 !important; }
    
    /* 5. Beautify Timeline */
    .timeline::before { display: none !important; }
    .timeline-dot { display: none !important; }
    .timeline-item { position: relative !important; padding-left: 0 !important; margin-bottom: 0.6rem !important; page-break-inside: avoid; }
    .timeline-date { position: absolute !important; top: 0 !important; right: 0 !important; color: #475569 !important; font-size: 10px !important; font-weight: 600 !important; background: transparent !important; }
    
    .timeline-content { padding-right: 120px !important; }
    .timeline-content h4 { font-size: 12px !important; margin-bottom: 1px !important; color: #0f172a !important; font-weight: 700 !important; }
    .timeline-content h5 { font-size: 11px !important; font-weight: 600 !important; color: #3b82f6 !important; margin-bottom: 2px !important; }
    .timeline-content p { font-size: 11px !important; margin-bottom: 2px !important; color: #1e293b !important; }
    .timeline-content ul { margin-top: 3px !important; margin-bottom: 0 !important; padding-left: 1.2rem !important; }
    .timeline-content ul li { font-size: 11px !important; margin-bottom: 2px !important; color: #1e293b !important; }
    
    /* 6. Beautify Publications */
    .research-grid { display: block !important; }
    .paper-card { position: relative !important; border: none !important; box-shadow: none !important; border-radius: 0 !important; padding: 0 0 0.4rem 0 !important; display: block !important; page-break-inside: avoid; border-bottom: none !important; }
    .paper-meta { position: absolute !important; top: 0 !important; right: 0 !important; font-size: 10px !important; font-weight: 600 !important; padding: 0 !important; margin-bottom: 0 !important; background: transparent !important; color: #475569 !important; }
    .paper-title { font-size: 12px !important; margin-bottom: 2px !important; color: #0f172a !important; font-weight: 700 !important; padding-right: 120px !important; }
    .paper-desc { font-size: 11px !important; margin-bottom: 2px !important; color: #1e293b !important; }
    .paper-links { margin-top: 2px !important; padding-top: 0 !important; }
    .btn-link { font-size: 10px !important; color: #3b82f6 !important; text-decoration: none !important; font-weight: 600 !important; padding: 0 !important; display: inline-block !important; }
    .btn-link svg { display: none !important; }
    
    /* 7. About section */
    .about-text p { font-size: 11px !important; margin-bottom: 4px !important; color: #1e293b !important; }
    
    a { text-decoration: none !important; }
}
