:root {
    /* Color tokens */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-glow: rgba(37, 99, 235, 0.15);
    --text: #1e293b;
    --text-light: #64748b;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --hero-gradient: linear-gradient(135deg, #f8fafc 0%, #eef2f7 50%, #e2e8f0 100%);
    --footer-bg: #1e293b;
    --footer-gradient: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);

    /* Spacing scale */
    --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
    --sp-6: 24px; --sp-8: 32px; --sp-12: 48px; --sp-16: 64px; --sp-24: 96px;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    /* Shadows – 3 levels with colored tint */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px -5px rgba(37, 99, 235, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.06);

    /* Subtle page background */
    --page-bg: linear-gradient(180deg, #ffffff 0%, #fafbfe 40%, #f5f7fb 100%);
}

body.dark {
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --primary-light: #93bbfd;
    --primary-glow: rgba(96, 165, 250, 0.12);
    --text: #e2e8f0;
    --text-light: #94a3b8;
    --bg: #0B1120;
    --bg-alt: #111827;
    --bg-card: #111827;
    --border: rgba(96, 165, 250, 0.08);
    --nav-bg: rgba(11, 17, 32, 0.8);
    --hero-gradient: linear-gradient(135deg, #111827 0%, #0B1120 100%);
    --footer-bg: #060a14;
    --footer-gradient: linear-gradient(180deg, #0B1120 0%, #060a14 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.25), 0 2px 4px -1px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.35), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
    --page-bg: linear-gradient(180deg, #0B1120 0%, #0d1526 40%, #0B1120 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    line-height: 1.7;
    background: var(--page-bg);
    background-color: var(--bg);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Navbar */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 0 24px;
    display: flex; justify-content: space-between; align-items: center; height: 64px;
}
.nav-logo { font-size: 1.5rem; font-weight: 700; color: var(--primary); text-decoration: none; }
.nav-menu { display: flex; list-style: none; gap: 28px; transition: transform 0.3s ease; }
.nav-menu a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.9rem; transition: color 0.2s; }
.nav-menu a:hover { color: var(--primary); }

.theme-toggle {
    background: none; border: 2px solid var(--border); border-radius: 50%;
    width: 40px; height: 40px; cursor: pointer; color: var(--text);
    display: flex; align-items: center; justify-content: center; font-size: 1rem;
    transition: all 0.3s ease; margin-left: 16px;
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }
body.dark .theme-toggle i::before { content: "\f185"; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; z-index: 1100; background: none; border: none; padding: 0; }
.hamburger span { width: 25px; height: 3px; background: var(--text); border-radius: 3px; transition: 0.3s; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* Nav overlay backdrop */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* Nav close button (visible only in mobile drawer) */
.nav-close {
    display: none;
}

/* Hero */
.hero {
    padding: 120px 24px 60px;
    background: var(--hero-gradient);
    transition: background 0.3s ease;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 600px 400px at 75% 40%, rgba(37,99,235,0.04) 0%, transparent 70%),
        radial-gradient(ellipse 400px 300px at 25% 60%, rgba(99,102,241,0.03) 0%, transparent 70%);
    pointer-events: none;
}
body.dark .hero::before {
    background:
        radial-gradient(ellipse 600px 400px at 75% 40%, rgba(96,165,250,0.06) 0%, transparent 70%),
        radial-gradient(ellipse 400px 300px at 25% 60%, rgba(139,92,246,0.04) 0%, transparent 70%);
}
.hero-content { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 60px; }
.hero-text { flex: 1; }
.hero h1 { font-size: clamp(1.75rem, 5vw, 3rem); font-weight: 700; margin-bottom: 8px; color: var(--text); }
.subtitle { font-size: 1.25rem; color: var(--primary); font-weight: 600; margin-bottom: 8px; }
.tagline { font-size: 1.1rem; color: var(--text-light); margin-bottom: 24px; }
.hero-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    margin-top: var(--sp-3);
    margin-bottom: var(--sp-6);
}
.hero-metric-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 100px;
    background: var(--primary-glow);
    border: 1px solid rgba(37, 99, 235, 0.15);
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}
body.dark .hero-metric-pill {
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.15);
}
.hero-links { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px;
    border-radius: var(--radius-sm); font-weight: 500; text-decoration: none;
    transition: all 0.2s ease; font-size: 0.95rem;
    position: relative;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}
.btn-secondary { background: var(--text); color: white; }
body.dark .btn-secondary { background: #475569; }
.btn-secondary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text); border: 2px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }

.hero-image {
    width: 280px; height: 280px; border-radius: 50%; overflow: hidden;
    box-shadow: var(--shadow-lg); flex-shrink: 0;
    border: 4px solid var(--border);
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }

/* Affiliations strip */
.affiliations-strip {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--sp-8) var(--sp-6) 0;
    position: relative;
    z-index: 1;
}
.affiliations-strip .affiliations-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: var(--sp-4);
    text-align: center;
}
.affiliations-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-8);
    flex-wrap: wrap;
}
.affiliations-logos img {
    height: 28px;
    width: auto;
    opacity: 0.5;
    filter: grayscale(100%);
    transition: opacity 0.2s ease, filter 0.2s ease;
}
.affiliations-logos img:hover {
    opacity: 0.85;
    filter: grayscale(0%);
}
body.dark .affiliations-logos img {
    filter: grayscale(100%) brightness(1.5);
    opacity: 0.4;
}
body.dark .affiliations-logos img:hover {
    filter: grayscale(0%) brightness(1.2);
    opacity: 0.8;
}

/* Sections */
.section { padding: 80px 24px; }
.section-alt { background: var(--bg-alt); transition: background-color 0.3s ease; }
.section-title {
    font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 700; text-align: center;
    margin-bottom: var(--sp-12); color: var(--text);
    position: relative; display: inline-block; width: 100%;
    letter-spacing: -0.02em;
}
.section-title::after {
    content: ''; display: block; width: 48px; height: 3px; border-radius: 2px;
    background: var(--primary); margin: 12px auto 0;
}

/* About */
.about-content p { font-size: 1.1rem; max-width: 800px; margin: 0 auto 24px; text-align: center; color: var(--text-light); }
.research-interests { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; max-width: 700px; margin-left: auto; margin-right: auto; }
.interest-tag {
    display: inline-block; padding: 8px 20px; border-radius: 24px;
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--primary); font-weight: 500; font-size: 0.9rem;
    transition: all 0.2s;
}
.interest-tag:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* Research Cards (clickable) */
.research-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: var(--sp-6); }
a.research-card {
    display: flex; flex-direction: column; padding: 28px; border-radius: var(--radius-md);
    box-shadow: var(--shadow); transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    text-decoration: none; color: inherit; border: 1px solid var(--border);
    position: relative; overflow: hidden;
    background-color: var(--bg-card);
    background-size: cover; background-position: center;
}
a.research-card[style*="background-image"]::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0.25) 0%, rgba(15,23,42,0.55) 50%, rgba(15,23,42,0.78) 100%);
    z-index: 0;
}
a.research-card[style*="background-image"] .research-icon,
a.research-card[style*="background-image"] .research-badge,
a.research-card[style*="background-image"] h3,
a.research-card[style*="background-image"] p,
a.research-card[style*="background-image"] .research-link { position: relative; z-index: 1; }
a.research-card[style*="background-image"] h3 { color: #f1f5f9; }
a.research-card[style*="background-image"] p { color: #cbd5e1; }
a.research-card[style*="background-image"] .research-badge { background: rgba(255,255,255,0.1); color: #93c5fd; border-color: rgba(255,255,255,0.15); }
a.research-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px -8px rgba(37, 99, 235, 0.18);
    border-color: var(--primary);
}
body.dark a.research-card:hover {
    box-shadow: 0 16px 32px -8px rgba(96, 165, 250, 0.12);
}
.research-icon {
    width: 56px; height: 56px; background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.research-icon i { font-size: 1.4rem; color: white; }
.research-badge {
    display: inline-block; font-size: 0.75rem; padding: 3px 10px; background: var(--bg-alt);
    color: var(--primary); border-radius: 12px; font-weight: 600; margin-bottom: 12px;
    border: 1px solid var(--border);
}
.research-card h3 { font-size: 1.15rem; margin-bottom: 10px; color: var(--text); }
.research-card p { color: var(--text-light); font-size: 0.93rem; line-height: 1.6; margin-bottom: 16px; flex-grow: 1; }
.research-link {
    color: var(--primary); font-size: 0.9rem; font-weight: 500;
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: auto;
}
.research-link i { font-size: 0.8rem; transition: transform 0.25s ease; }
a.research-card:hover .research-link i { transform: translateX(6px); }

/* Publications */
.publications-list { max-width: 900px; margin: 0 auto; }
.publications-list .loading { text-align: center; color: var(--text-light); }
.publication { display: flex; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.publication:last-child { border-bottom: none; }
.pub-year { min-width: 60px; font-weight: 700; color: var(--primary); font-size: 1.1rem; }
.pub-content h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--text); line-height: 1.4; }
.pub-content h3 a { color: var(--text); text-decoration: none; transition: color 0.2s; }
.pub-content h3 a:hover { color: var(--primary); }
.pub-authors { color: var(--text-light); margin-bottom: 4px; }
.pub-venue { color: var(--text-light); font-style: italic; margin-bottom: 8px; }
.pub-citations { color: var(--primary); font-size: 0.9rem; }
.pub-citations i { margin-right: 6px; }
.publications-link { text-align: center; margin-top: 32px; }

/* Timeline */
.timeline { max-width: 800px; margin: 0 auto; position: relative; }
.timeline::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 50%, var(--border) 100%);
}
.timeline-item {
    position: relative; padding-left: 32px; padding-bottom: 32px;
    transition: transform 0.2s ease;
}
.timeline-item:hover { transform: translateX(4px); }
.timeline-marker {
    position: absolute; left: -5px; top: 4px; width: 12px; height: 12px;
    background: var(--primary); border-radius: 50%; border: 2px solid var(--bg-alt);
    transition: box-shadow 0.3s ease;
}
.timeline-marker.in-view {
    box-shadow: 0 0 0 4px var(--primary-glow);
    animation: pulse-marker 2s ease-out 1;
}
@keyframes pulse-marker {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 4px var(--primary-glow); }
}
.timeline-header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; }
.timeline-logo {
    width: 32px; height: 32px; object-fit: contain; border-radius: 6px;
    flex-shrink: 0; background: var(--bg-card); padding: 2px;
}
.timeline-header h3 { font-size: 1.15rem; color: var(--text); }
.timeline-header .company { font-weight: 600; color: var(--primary); }
.timeline-header .date { color: var(--text-light); font-size: 0.9rem; }
.timeline-content .location { color: var(--text-light); font-size: 0.9rem; margin-bottom: 12px; }
.timeline-content .location i { margin-right: 6px; }
.timeline-content ul { list-style: none; padding-left: 0; }
.timeline-content li { position: relative; padding-left: 20px; color: var(--text-light); margin-bottom: 8px; }
.timeline-content li::before { content: '\2022'; color: var(--primary); position: absolute; left: 0; }

/* Education */
.education-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--sp-6); }
.education-card {
    border-radius: var(--radius-md); overflow: hidden; position: relative;
    background-size: cover; background-position: center;
    min-height: 260px; display: flex; align-items: flex-end;
    border: 1px solid var(--border);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.education-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}
.edu-overlay {
    width: 100%; padding: 24px;
    background: linear-gradient(to top, rgba(15,23,42,0.95) 50%, rgba(15,23,42,0.7) 75%, rgba(15,23,42,0.25) 90%, transparent 100%);
    color: #f1f5f9;
}
.edu-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.edu-logo-img { width: 36px; height: 36px; border-radius: 8px; }
.edu-date { font-size: 0.8rem; color: #94a3b8; }
.edu-overlay h3 { font-size: 1.15rem; margin-bottom: 4px; color: #fff; }
.edu-overlay .institution { font-weight: 600; color: #60a5fa; margin-bottom: 4px; font-size: 0.95rem; }
.edu-overlay .details { color: #cbd5e1; font-size: 0.9rem; }
.edu-overlay .thesis, .edu-overlay .advisor { font-size: 0.85rem; color: #94a3b8; margin-top: 8px; }

/* Awards */
.awards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 900px; margin: 0 auto; }
.award-item {
    display: flex; align-items: flex-start; gap: 16px; padding: 20px;
    background: var(--bg-card); border-radius: var(--radius-sm); box-shadow: var(--shadow);
    border: 1px solid var(--border);
    border-left: 3px solid #94a3b8;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.award-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.award-item.award-gold { border-left-color: #f59e0b; }
.award-item.award-silver { border-left-color: #94a3b8; }
.award-item i { color: var(--primary); font-size: 1.5rem; flex-shrink: 0; }
.award-item h4 { font-size: 1rem; margin-bottom: 4px; color: var(--text); }
.award-item p { font-size: 0.9rem; color: var(--text-light); }

/* Footer */
.footer {
    background: var(--footer-gradient);
    color: #94a3b8; padding: var(--sp-12) var(--sp-6); text-align: center;
}
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.footer-social { display: flex; gap: 16px; }
.footer-social a {
    color: #94a3b8; font-size: 1.1rem; transition: color 0.2s;
}
.footer-social a:hover { color: var(--primary-light); }
.footer p { font-size: 0.9rem; }

/* Scroll to top – base overridden in polish section */
.contact-content { text-align: center; }
.contact-info { display: flex; justify-content: center; gap: 48px; margin-bottom: 32px; flex-wrap: wrap; }
.contact-item { display: flex; align-items: center; gap: 12px; color: var(--text); }
.contact-item i { color: var(--primary); font-size: 1.2rem; }
.contact-item a { color: var(--text); text-decoration: none; }
.contact-item a:hover { color: var(--primary); }
.social-links { display: flex; justify-content: center; gap: 20px; }
.social-links a {
    width: 50px; height: 50px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--bg-alt); color: var(--text); font-size: 1.3rem;
    transition: all 0.3s ease; border: 1px solid var(--border);
}

/* Tools & Skills */
.tools-skills { margin-top: var(--sp-8); text-align: center; }
.tools-label {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px;
    color: var(--text-light); font-weight: 600; margin-bottom: var(--sp-3);
}
.tools-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 700px; margin: 0 auto; }
.tool-tag {
    display: inline-block; padding: 8px 20px; border-radius: 24px;
    background: var(--bg-card); border: 1px solid var(--border);
    color: #059669; font-weight: 500; font-size: 0.9rem;
    transition: all 0.2s;
}
.tool-tag:hover { background: #059669; color: white; border-color: #059669; }
body.dark .tool-tag { color: #34d399; border-color: rgba(52, 211, 153, 0.12); }
body.dark .tool-tag:hover { background: #059669; color: white; border-color: #059669; }

/* Recent Updates */
.updates-list { max-width: 700px; margin: 0 auto; }
.update-item {
    display: flex; gap: var(--sp-4); padding: var(--sp-4) 0;
    border-bottom: 1px solid var(--border); align-items: baseline;
}
.update-item:last-child { border-bottom: none; }
.update-date {
    min-width: 90px; font-weight: 700; color: var(--primary);
    font-size: 0.9rem; flex-shrink: 0;
}
.update-text { color: var(--text-light); font-size: 0.95rem; line-height: 1.6; }

/* Teaching */
.teaching-intro {
    text-align: center; color: var(--text-light); font-size: 1rem;
    margin-bottom: var(--sp-8); max-width: 700px; margin-left: auto; margin-right: auto;
}
.teaching-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--sp-4); max-width: 800px; margin: 0 auto;
}
.teaching-card {
    display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4) var(--sp-6);
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.teaching-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.teaching-card i { color: var(--primary); font-size: 1.1rem; flex-shrink: 0; }
.teaching-card h4 { font-size: 0.9rem; color: var(--text); font-weight: 500; }
body.dark .teaching-card { border-color: rgba(96, 165, 250, 0.08); }

/* Dark mode card glow */
body.dark a.research-card {
    border-color: rgba(96, 165, 250, 0.08);
}
body.dark .award-item {
    border-color: rgba(96, 165, 250, 0.08);
}
body.dark .education-card {
    border-color: rgba(96, 165, 250, 0.08);
}

/* Dark mode badge glow */
body.dark .research-badge {
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.06);
}
body.dark .interest-tag {
    border-color: rgba(96, 165, 250, 0.12);
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    transition: top 0.2s;
    font-size: 0.875rem;
}
.skip-link:focus {
    top: 0;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
    .timeline-marker.in-view { animation: none; }
    .focus-card:hover { transform: none; }
    .stat-item:hover { transform: none; }
    .scroll-top.visible { transform: none; }
    .scroll-top:hover { transform: none; }
    .social-links a:hover { transform: none; }
    .typing-cursor { display: none !important; }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        background: var(--bg);
        flex-direction: column;
        padding: 80px 24px 24px;
        gap: 8px;
        border-left: 1px solid var(--border);
        z-index: 1050;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
        overflow-y: auto;
    }
    .nav-menu.active {
        transform: translateX(0);
    }
    .nav-menu a {
        display: block;
        padding: 12px 16px;
        border-radius: var(--radius-sm);
        font-size: 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    .nav-menu a:hover,
    .nav-menu a.active-link {
        background: var(--primary-glow);
        color: var(--primary);
    }
    .nav-close {
        display: flex;
        position: absolute;
        top: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        background: none;
        border: 1px solid var(--border);
        border-radius: 50%;
        color: var(--text);
        font-size: 1.2rem;
        cursor: pointer;
        z-index: 1060;
        transition: all 0.2s ease;
    }
    .nav-close:hover {
        border-color: var(--primary);
        color: var(--primary);
    }
    .hamburger { display: flex; }
    .hero-content { flex-direction: column-reverse; text-align: center; }
    .hero h1 { font-size: 2rem; }
    .hero-image { width: 200px; height: 200px; }
    .hero-links { justify-content: center; flex-wrap: wrap; }
    .hero-metrics { justify-content: center; }
    .affiliations-logos { gap: var(--sp-6); }
    .affiliations-logos img { height: 22px; }
    .research-grid { grid-template-columns: 1fr; }
    .research-card { padding: 20px; }
    .research-card p, .research-card h3,
    .research-link { min-height: 44px; display: flex; align-items: center; }
    .publication { flex-direction: column; gap: 8px; }
    .pub-year { min-width: auto; font-size: 0.95rem; }
    .timeline::before { left: 4px; }
    .timeline-marker { left: -1px; }
    .education-card { min-height: 220px; }
    .edu-overlay { padding: 20px; }
    .edu-overlay h3 { font-size: 1.05rem; }
    .edu-overlay .details,
    .edu-overlay .thesis,
    .edu-overlay .advisor { font-size: 0.82rem; }
    .contact-info { flex-direction: column; gap: 16px; }
}

@media (max-width: 480px) {
    .hero { padding: 100px 16px 40px; }
    .hero h1 { font-size: 1.6rem; }
    .subtitle { font-size: 1.05rem; }
    .tagline { font-size: 0.95rem; }
    .hero-image { width: 200px; height: 200px; }
    .hero-links {
        flex-direction: column;
        width: 100%;
    }
    .hero-links .btn {
        width: 100%;
        justify-content: center;
    }
    .hero-metrics {
        justify-content: center;
    }
    .section { padding: 60px 16px; }
    .affiliations-strip { padding: var(--sp-6) var(--sp-4) 0; }
    .affiliations-logos img { height: 18px; }
    .affiliations-logos { gap: var(--sp-4); row-gap: var(--sp-3); }
    .education-grid { grid-template-columns: 1fr; }
    .education-card { min-height: 200px; }
}

/* Active nav link highlight */
.nav-menu a.active-link {
    color: var(--primary);
}

/* ================================
   Focus Area Cards
   ================================ */
.focus-areas {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: var(--sp-8);
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}
.focus-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 210px;
    padding: 24px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid transparent;
    background-clip: padding-box;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.focus-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: calc(var(--radius-sm) + 1px);
    background: linear-gradient(135deg, var(--primary), rgba(99, 102, 241, 0.4), transparent);
    z-index: -1;
    opacity: 0.5;
    transition: opacity 0.25s ease;
}
.focus-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.focus-card:hover::before {
    opacity: 1;
}
.focus-card i {
    font-size: 1.5rem;
    color: var(--primary);
}
.focus-card span {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}
body.dark .focus-card {
    background: var(--bg-alt);
    box-shadow: 0 0 12px rgba(96, 165, 250, 0.06);
}
body.dark .focus-card::before {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.6), rgba(139, 92, 246, 0.3), transparent);
    opacity: 0.4;
}
body.dark .focus-card:hover {
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.12);
}
body.dark .focus-card:hover::before {
    opacity: 0.8;
}

/* ================================
   Section Dividers
   ================================ */
.section + .section::before {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--primary) 50%, transparent 100%);
    opacity: 0.25;
    margin-bottom: 0;
}

/* ================================
   Publication Stats – Glass KPI
   ================================ */
.publications-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 40px;
}
.stat-item {
    text-align: center;
    padding: 20px 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow), 0 0 24px var(--primary-glow);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 32px var(--primary-glow);
}
.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}
.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    margin-top: 4px;
}
body.dark .stat-item {
    background: rgba(17, 24, 39, 0.8);
    border-color: rgba(96, 165, 250, 0.15);
    box-shadow: var(--shadow), 0 0 24px rgba(96, 165, 250, 0.08);
}
body.dark .stat-item:hover {
    box-shadow: var(--shadow-lg), 0 0 32px rgba(96, 165, 250, 0.15);
}

/* ================================
   Contact Section Polish
   ================================ */
.contact-section {
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 40%, var(--bg) 100%);
    position: relative;
}
body.dark .contact-section {
    background: linear-gradient(180deg, var(--bg) 0%, rgba(17, 24, 39, 0.6) 40%, var(--bg) 100%);
}
.contact-cta {
    text-align: center;
    font-size: 1.05rem;
    color: var(--text-light);
    margin-bottom: var(--sp-8);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.social-links a {
    transition: all 0.3s ease;
}
.social-links a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.12) translateY(-2px);
    box-shadow: 0 4px 16px var(--primary-glow);
}

/* ================================
   Scroll-to-Top Polish
   ================================ */
.scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.3s ease;
    z-index: 999;
}
.scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.4);
}
body.dark .scroll-top {
    box-shadow: 0 4px 16px rgba(96, 165, 250, 0.25);
}
body.dark .scroll-top:hover {
    box-shadow: 0 6px 24px rgba(96, 165, 250, 0.35);
}

/* ================================
   Typing cursor
   ================================ */
.subtitle .typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: var(--primary);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink-cursor 0.75s step-end infinite;
}
@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ================================
   Responsive – Focus Cards
   ================================ */
@media (max-width: 768px) {
    .focus-areas {
        gap: 12px;
    }
    .focus-card {
        width: calc(50% - 8px);
        min-width: 140px;
        padding: 18px 12px;
    }
    .stat-item {
        padding: 16px 20px;
    }
    .stat-number {
        font-size: 1.8rem;
    }
}
@media (max-width: 480px) {
    .focus-card {
        width: calc(50% - 6px);
        min-width: 0;
    }
    .publications-stats {
        gap: 12px;
    }
}

/* ================================
   Research Pages
   ================================ */

.research-hero {
    padding-top: 140px;
    padding-bottom: 64px;
}

.research-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

/* Hero two-column grid */
.research-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
    gap: 24px;
    align-items: stretch;
}

.hero-copy { color: var(--text-light); }

/* Gradient sidebar in hero */
.research-sidebar {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.11), rgba(16, 185, 129, 0.08));
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow);
}
body.dark .research-sidebar {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(16, 185, 129, 0.12));
}
.research-sidebar h2 {
    color: var(--text);
    margin-bottom: 12px;
}
.research-sidebar p {
    color: var(--text-light);
    line-height: 1.6;
}

/* At a Glance KPIs */
.research-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}
.research-kpi {
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(37, 99, 235, 0.14);
    color: var(--text-light);
    font-size: 0.9rem;
}
body.dark .research-kpi {
    background: rgba(15, 23, 42, 0.45);
    border-color: rgba(96, 165, 250, 0.18);
}
.research-kpi span {
    display: block;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

/* General content card */
.research-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow);
}
.research-panel h2,
.research-panel h3 {
    color: var(--text);
    margin-bottom: 12px;
}
.research-panel p,
.research-panel li {
    color: var(--text-light);
}
.research-panel.panel-equation {
    overflow-x: auto;
}

/* Metric cards & grid */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}
.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
}
.metric-card strong {
    display: block;
    font-size: 1.55rem;
    color: var(--text);
    margin-bottom: 8px;
}
.metric-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
}
.metric-value {
    display: block;
    margin-top: 10px;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
}
.metric-detail {
    margin-top: 8px;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Figure panels */
.figure-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.figure-panel img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}
.figure-caption {
    padding: 16px 24px;
    font-size: 0.9rem;
    color: var(--text-light);
    border-top: 1px solid var(--border);
}
.figure-caption strong {
    color: var(--text);
}
.figures-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

/* Links */
.resource-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.resource-link:hover {
    color: var(--primary-dark);
}
.footer-link {
    color: #cbd5e1;
    text-decoration: none;
}
.footer-link:hover {
    color: #ffffff;
}

/* Status badges */
.research-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}
.status-published {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.status-dissertation {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.status-proprietary {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.status-funded {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Two-column content grid */
.research-grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

/* Publication cards */
.publication-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.publication-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 26px;
    box-shadow: var(--shadow);
}
.publication-card h3 {
    color: var(--text);
    margin-bottom: 12px;
}
.publication-card p {
    color: var(--text-light);
}
.pub-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 14px;
}

/* Flow / pipeline steps */
.research-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}
.research-flow-step {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow);
    position: relative;
}
.research-flow-step h3 {
    color: var(--text);
    margin-bottom: 12px;
}
.research-flow-step p {
    color: var(--text-light);
}
.research-flow-index {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-weight: 700;
    margin-bottom: 16px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
}

/* Tech / language badges */
.research-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}
.research-badge-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(37, 99, 235, 0.15);
}
body.dark .research-badge-item {
    background: rgba(15, 23, 42, 0.45);
    border-color: rgba(96, 165, 250, 0.2);
}

/* Research list */
.research-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 10px;
}
.research-list li {
    color: var(--text-light);
}

/* Bottom navigation */
.research-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
    border-top: 1px solid var(--border);
}
.research-nav a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.research-nav a:hover {
    color: var(--primary-dark);
}

/* Research responsive */
@media (max-width: 1100px) {
    .metric-grid,
    .research-flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .research-hero-grid,
    .research-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .research-hero {
        padding-top: 120px;
        padding-bottom: 56px;
    }
    .metric-grid,
    .research-kpis,
    .research-flow,
    .figures-row {
        grid-template-columns: 1fr;
    }
    .research-sidebar,
    .research-panel,
    .metric-card,
    .publication-card,
    .research-flow-step {
        padding: 22px;
    }
}
