/* ==========================================================================
   Style 1: Modern Academic — Minimalist / Swiss Style
   Palette: Deep Navy #002147, Slate Gray #4A5568, Off-White #FAFAFA, Gold #C49B3C
   Typography: Playfair Display (headings) + Inter (body)
   Enhanced: Scroll animations, glassmorphism, modern UI/UX
   ========================================================================== */

/* --- Custom Properties --- */
:root {
    --navy: #002147;
    --navy-light: #003366;
    --slate: #4A5568;
    --off-white: #FAFAFA;
    --gold: #C49B3C;
    --gold-light: #D4AF5A;
    --border: #E2E8F0;
    --text-dark: #1A202C;
    --text-muted: #718096;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--slate);
    background-color: var(--off-white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--navy);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--gold);
}

ul {
    list-style: none;
}

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

/* ==========================================================================
   Scroll Progress Bar
   ========================================================================== */
.scroll-progress {
    position: fixed;
    top: 56px;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
    z-index: 99;
    transition: width 0.05s linear;
    box-shadow: 0 0 8px rgba(196, 155, 60, 0.4);
    pointer-events: none;
}

/* ==========================================================================
   Scroll-Triggered Reveal Animations
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out-expo),
                transform 0.8s var(--ease-out-expo);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s var(--ease-out-expo),
                transform 0.8s var(--ease-out-expo);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s var(--ease-out-expo),
                transform 0.8s var(--ease-out-expo);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s var(--ease-out-expo),
                transform 0.8s var(--ease-out-expo);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Staggered children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s var(--ease-out-expo),
                transform 0.6s var(--ease-out-expo);
}

.stagger-children.revealed > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.revealed > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.revealed > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.revealed > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.revealed > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.revealed > *:nth-child(6) { transition-delay: 0.3s; }
.stagger-children.revealed > *:nth-child(7) { transition-delay: 0.35s; }
.stagger-children.revealed > *:nth-child(8) { transition-delay: 0.4s; }
.stagger-children.revealed > *:nth-child(9) { transition-delay: 0.45s; }
.stagger-children.revealed > *:nth-child(10) { transition-delay: 0.5s; }

.stagger-children.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Navigation — Glassmorphism on scroll
   ========================================================================== */
.main-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.main-nav.nav-scrolled {
    background: rgba(0, 33, 71, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    position: relative;
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 2;
    transition: color 0.3s ease, transform 0.3s var(--ease-spring);
}

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

/* Desktop inline links — hidden on mobile */
.nav-links-desktop {
    display: none;
}

/* --- Hamburger (link to #nav-menu) --- */
.nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 26px;
    height: 26px;
    cursor: pointer;
    z-index: 2;
    padding: 2px 0;
}

.nav-hamburger span {
    display: block;
    height: 2px;
    background: #ffffff;
    border-radius: 1px;
    pointer-events: none;
    transition: width 0.3s ease;
}

.nav-hamburger span:nth-child(1) { width: 100%; }
.nav-hamburger span:nth-child(2) { width: 65%; }
.nav-hamburger span:nth-child(3) { width: 100%; }

.nav-hamburger:hover span:nth-child(2) { width: 100%; }

/* --- Mobile Full-Screen Overlay (CSS :target) --- */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--navy);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                visibility 0.4s;
}

/* Show overlay when targeted */
.nav-overlay:target {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Top bar inside overlay (logo + close X) */
.nav-overlay-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 56px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-overlay-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Close X button */
.nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    position: relative;
}

.nav-close span {
    position: absolute;
    display: block;
    width: 20px;
    height: 2px;
    background: #ffffff;
    border-radius: 1px;
    transition: background 0.3s ease;
}

.nav-close span:nth-child(1) { transform: rotate(45deg); }
.nav-close span:nth-child(2) { transform: rotate(-45deg); }

.nav-close:hover span {
    background: var(--gold);
}

/* Overlay body */
.nav-overlay-body {
    display: flex;
    flex-direction: column;
    padding: 2rem 2rem 2rem;
    height: calc(100vh - 56px);
    overflow-y: auto;
}

/* Overlay identity header */
.nav-overlay-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(196, 155, 60, 0.25);
}

.nav-overlay-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 0.3rem;
}

.nav-overlay-role {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Overlay nav links */
.nav-overlay .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-overlay .nav-links li {
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.nav-overlay:target .nav-links li {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered entry animation */
.nav-overlay:target .nav-links li:nth-child(1) { transition-delay: 0.06s; }
.nav-overlay:target .nav-links li:nth-child(2) { transition-delay: 0.10s; }
.nav-overlay:target .nav-links li:nth-child(3) { transition-delay: 0.14s; }
.nav-overlay:target .nav-links li:nth-child(4) { transition-delay: 0.18s; }
.nav-overlay:target .nav-links li:nth-child(5) { transition-delay: 0.22s; }
.nav-overlay:target .nav-links li:nth-child(6) { transition-delay: 0.26s; }
.nav-overlay:target .nav-links li:nth-child(7) { transition-delay: 0.30s; }

.nav-overlay .nav-links li a {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 1.3rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.3px;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: color 0.3s ease, padding-left 0.3s ease, border-color 0.3s ease;
}

.nav-overlay .nav-links li:last-child a {
    border-bottom: none;
}

.nav-overlay .nav-links li a:hover {
    color: var(--gold);
    padding-left: 0.35rem;
    border-bottom-color: rgba(196, 155, 60, 0.15);
}

/* Gold numbered prefixes */
.nav-num {
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 1px;
    min-width: 1.5rem;
    flex-shrink: 0;
}

/* Overlay footer */
.nav-overlay-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-overlay-email {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

.nav-overlay-email:hover {
    color: var(--gold);
}

/* ==========================================================================
   Hero Section — Animated entrance
   ========================================================================== */
.hero {
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

/* Subtle gradient accent behind hero */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(196, 155, 60, 0.06) 0%, transparent 70%);
    pointer-events: none;
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    100% { transform: translate(-30px, 20px) scale(1.1); opacity: 1; }
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Hero text entrance */
.hero-text {
    animation: heroTextIn 1s var(--ease-out-expo) both;
}

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

.hero-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 7vw, 4rem);
    color: var(--navy);
    line-height: 1.1;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, var(--navy) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: heroNameShimmer 4s ease-in-out infinite;
}

@keyframes heroNameShimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.hero-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.25rem;
    animation: heroTextIn 1s 0.15s var(--ease-out-expo) both;
}

.hero-affiliation {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    animation: heroTextIn 1s 0.25s var(--ease-out-expo) both;
}

.hero-research {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--slate);
    line-height: 1.6;
    border-left: 3px solid var(--gold);
    padding-left: 1rem;
    animation: heroTextIn 1s 0.35s var(--ease-out-expo) both;
    position: relative;
}

/* Animated gold line */
.hero-research::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--gold), var(--gold-light));
    animation: goldLinePulse 2.5s ease-in-out infinite;
}

@keyframes goldLinePulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; box-shadow: 0 0 8px rgba(196, 155, 60, 0.3); }
}

/* Hero Photo — floating animation */
.hero-photo {
    animation: heroPhotoIn 1.2s 0.3s var(--ease-out-expo) both;
}

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

.hero-photo img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--navy);
    box-shadow: 0 4px 20px rgba(0, 33, 71, 0.15);
    animation: photoFloat 6s ease-in-out infinite;
    transition: transform 0.5s var(--ease-spring), box-shadow 0.5s ease;
}

.hero-photo img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 35px rgba(0, 33, 71, 0.25);
}

@keyframes photoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Rotating ring around photo */
.hero-photo {
    position: relative;
}


/* Hero Logos */
.hero-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(0, 33, 71, 0.1);
    animation: heroTextIn 1s 0.5s var(--ease-out-expo) both;
}

.hero-logos img {
    height: 65px;
    width: auto;
    object-fit: contain;
    opacity: 0.65;
    transition: opacity 0.4s ease, transform 0.4s var(--ease-spring);
    padding: 8px 14px;
    filter: grayscale(20%);
}

.hero-logos img:hover {
    opacity: 1;
    transform: scale(1.08) translateY(-2px);
    filter: grayscale(0%);
}

/* CTA Banner — gradient with glow */
.cta-banner {
    margin-top: 1.5rem;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: #ffffff;
    text-align: center;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    animation: heroTextIn 1s 0.6s var(--ease-out-expo) both;
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease;
}

.cta-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 33, 71, 0.2);
}

/* Animated shimmer on CTA */
.cta-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    animation: ctaShimmer 4s ease-in-out infinite;
}

@keyframes ctaShimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.cta-banner p {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Section Styles — Enhanced
   ========================================================================== */
.section {
    padding: 4rem 0;
    position: relative;
}

.section-alt {
    background-color: #ffffff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    color: var(--navy);
    margin-bottom: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--navy);
    display: inline-block;
    position: relative;
}

/* Animated underline */
.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.8s var(--ease-out-expo);
}

.revealed .section-title::after,
.section-title.revealed::after {
    width: 100%;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    margin-top: 0.5rem;
}

.subsection-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: var(--navy);
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-content {
    margin-bottom: 2rem;
}

.about-content p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--navy);
    color: var(--navy);
    border-radius: 2px;
    letter-spacing: 0.3px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.tag:hover {
    background-color: var(--navy);
    color: #ffffff;
}

/* ==========================================================================
   Publications — Unified list (group titles hidden)
   ========================================================================== */
.pub-group {
    margin-bottom: 1rem;
}

/* --- Publication Filters --- */
.pub-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.pub-filter {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    border: 1px solid var(--navy);
    color: var(--navy);
    background: transparent;
    border-radius: 2px;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.pub-filter:hover {
    background: rgba(0, 33, 71, 0.06);
}

.pub-filter.active {
    background: var(--navy);
    color: #ffffff;
}

.pub-filter-count {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.7;
}

/* --- Collapsible Group Titles --- */
.pub-group-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--navy);
    margin-bottom: 0;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
}

.pub-group-title:hover {
    color: var(--gold);
}

.pub-collapse-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform 0.35s var(--ease-out-expo);
    color: var(--text-muted);
}

.pub-group-title.collapsed .pub-collapse-icon {
    transform: rotate(-90deg);
}

/* --- Collapsible Body --- */
.pub-group-body {
    overflow: hidden;
    max-height: 1200px;
    transition: max-height 0.5s var(--ease-out-expo), opacity 0.4s ease;
    opacity: 1;
}

.pub-group-body.collapsed {
    max-height: 0;
    opacity: 0;
}

/* --- Filtered entries --- */
.pub-entry.pub-hidden {
    display: none;
}

.pub-group.pub-group-hidden {
    display: none;
}

.pub-entry {
    display: flex;
    gap: 1rem;
    padding: 1.15rem 1rem;
    border-bottom: 1px solid #EDF2F7;
    border-radius: 6px;
    transition: all 0.35s var(--ease-out-expo);
    position: relative;
}

.pub-entry:last-child {
    border-bottom: none;
}

.pub-entry:hover {
    background: rgba(0, 33, 71, 0.02);
    padding-left: 1.35rem;
    box-shadow: 0 2px 12px rgba(0, 33, 71, 0.04);
}

.pub-entry::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--gold);
    border-radius: 2px;
    transition: height 0.35s var(--ease-out-expo);
}

.pub-entry:hover::before {
    height: 60%;
}

.pub-number {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--navy);
    min-width: 2rem;
    flex-shrink: 0;
    padding-top: 0.15rem;
}

.pub-details {
    flex: 1;
}

.pub-authors {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.pub-title {
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 0.15rem;
    line-height: 1.5;
}

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

.pub-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    margin-top: 0.5rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-award {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(196, 155, 60, 0.3);
}

.badge-mention {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 33, 71, 0.2);
}

/* ==========================================================================
   Expandable Detail Panels (Publications & Experience)
   ========================================================================== */
/* Expand toggle button */
.pub-expand-btn,
.exp-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold);
    cursor: pointer;
    margin-top: 0.5rem;
    padding: 0.25rem 0;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
    user-select: none;
}

.pub-expand-btn:hover,
.exp-expand-btn:hover {
    color: var(--navy);
}

.pub-expand-btn svg,
.exp-expand-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.35s var(--ease-out-expo);
}

.pub-expand-btn.active svg,
.exp-expand-btn.active svg {
    transform: rotate(180deg);
}

/* Detail panel — hidden by default */
.pub-detail-panel,
.exp-detail-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s var(--ease-out-expo),
                opacity 0.4s ease,
                padding 0.4s ease;
    padding: 0 1rem;
    margin-top: 0;
    border-radius: 8px;
}

.pub-detail-panel.active,
.exp-detail-panel.active {
    max-height: 2000px;
    opacity: 1;
    padding: 1rem;
    margin-top: 0.75rem;
    background: rgba(0, 33, 71, 0.02);
    border: 1px solid var(--border);
}

/* ==========================================================================
   Inline Image Carousel (Publications & Experience galleries)
   ========================================================================== */

/* --- Base gallery container --- */
.pub-slide-gallery,
.exp-slide-gallery {
    position: relative;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Default: hide all raw images (JS controls display) */
.pub-slide-gallery img,
.exp-slide-gallery img {
    user-select: none;
    -webkit-user-drag: none;
}

/* ==========  GRID MODE (default, overview)  ========== */
.pub-slide-gallery.carousel-grid,
.exp-slide-gallery.carousel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 6px;
    padding: 0.65rem;
}

/* Mode toggle bar — sits above gallery */
.carousel-toggle-bar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0;
    margin-bottom: 0.4rem;
}

.carousel-mode-btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.carousel-mode-btn svg {
    width: 13px;
    height: 13px;
    opacity: 0.6;
    transition: opacity 0.25s ease;
}

.carousel-mode-btn:hover {
    color: var(--navy);
    border-color: var(--navy);
    background: rgba(0, 33, 71, 0.03);
}

.carousel-mode-btn:hover svg {
    opacity: 0.9;
}

.carousel-mode-btn.active {
    color: #ffffff;
    background: var(--navy);
    border-color: var(--navy);
}

.carousel-mode-btn.active svg {
    opacity: 1;
}

.carousel-grid-count {
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--gold);
    background: rgba(196, 155, 60, 0.08);
    padding: 0.2rem 0.55rem;
    border-radius: 10px;
    letter-spacing: 0.5px;
    margin-left: auto;
}

/* Grid thumbnails — wrapper needed for hover overlay */
.carousel-grid-thumb {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
}

.pub-slide-gallery.carousel-grid img,
.exp-slide-gallery.carousel-grid img {
    display: block;
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: zoom-in;
    transition: all 0.3s var(--ease-out-expo);
    opacity: 0;
    transform: scale(0.94);
    animation: gridThumbIn 0.4s var(--ease-out-expo) forwards;
}

/* Expand icon overlay on each grid thumbnail */
.grid-thumb-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 15, 35, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    border-radius: 6px;
}

.grid-thumb-hint svg {
    width: 22px;
    height: 22px;
    color: #ffffff;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}

.carousel-grid-thumb:hover .grid-thumb-hint {
    opacity: 1;
}

/* Staggered entrance for grid wrappers */
.carousel-grid .carousel-grid-thumb:nth-child(2) img { animation-delay: 0.04s; }
.carousel-grid .carousel-grid-thumb:nth-child(3) img { animation-delay: 0.08s; }
.carousel-grid .carousel-grid-thumb:nth-child(4) img { animation-delay: 0.12s; }
.carousel-grid .carousel-grid-thumb:nth-child(5) img { animation-delay: 0.16s; }
.carousel-grid .carousel-grid-thumb:nth-child(6) img { animation-delay: 0.20s; }

@keyframes gridThumbIn {
    to { opacity: 1; transform: scale(1); }
}

.carousel-grid-thumb:hover img {
    border-color: var(--gold);
    transform: scale(1.03);
    box-shadow: 0 4px 14px rgba(0, 33, 71, 0.1);
}

/* Hide carousel-only controls in grid mode */
.carousel-grid .carousel-prev,
.carousel-grid .carousel-next,
.carousel-grid .carousel-zoom-hint {
    display: none;
}

/* ==========  SLIDE MODE (single-image carousel)  ========== */
.pub-slide-gallery.carousel-slide,
.exp-slide-gallery.carousel-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 1.25rem 2.75rem;
}

/* In slide mode, unwrap the grid-thumb container visually */
.carousel-slide .carousel-grid-thumb {
    display: contents;
}

.carousel-slide .grid-thumb-hint {
    display: none;
}

.pub-slide-gallery.carousel-slide img,
.exp-slide-gallery.carousel-slide img {
    display: none;
    max-height: 300px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 6px;
    cursor: zoom-in;
    border: none;
    height: auto;
    opacity: 1;
    transform: none;
    animation: none;
}

.pub-slide-gallery.carousel-slide img.carousel-active,
.exp-slide-gallery.carousel-slide img.carousel-active {
    display: block;
    animation: carouselFadeIn 0.35s var(--ease-out-expo);
}

@keyframes carouselFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

/* Carousel prev/next arrows (slide mode only) */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 33, 71, 0.06);
    color: var(--navy);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-out-expo);
    padding: 0;
}

.carousel-prev { left: 0.5rem; }
.carousel-next { right: 0.5rem; }

.carousel-prev:hover,
.carousel-next:hover {
    background: var(--navy);
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 2px 10px rgba(0, 33, 71, 0.15);
}

.carousel-prev svg,
.carousel-next svg {
    width: 16px;
    height: 16px;
}

.carousel-disabled {
    opacity: 0.2;
    pointer-events: none;
}

/* Carousel footer — counter + dots + "View all" button */
.carousel-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.5rem 0 0.15rem;
}

/* Hide footer in grid mode */
.carousel-footer.footer-hidden {
    display: none;
}

.carousel-counter {
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    min-width: 3rem;
    text-align: center;
}

.carousel-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: none;
    background: var(--border);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s var(--ease-out-expo);
}

.carousel-dot:hover {
    background: var(--slate);
    transform: scale(1.3);
}

.carousel-dot.active {
    background: var(--gold);
    transform: scale(1.2);
    box-shadow: 0 0 0 3px rgba(196, 155, 60, 0.15);
}

/* Zoom hint overlay on hover (slide mode) */
.carousel-zoom-hint {
    position: absolute;
    bottom: 0.65rem;
    right: 0.65rem;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    background: rgba(0, 33, 71, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.4px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s ease, transform 0.3s var(--ease-out-expo);
    pointer-events: none;
    user-select: none;
}

.carousel-zoom-hint svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    opacity: 0.85;
}

/* Show hint on gallery hover (slide mode only) */
.pub-slide-gallery.carousel-slide:hover .carousel-zoom-hint,
.exp-slide-gallery.carousel-slide:hover .carousel-zoom-hint {
    opacity: 1;
    transform: translateY(0);
}

/* Image lift on hover */
.pub-slide-gallery.carousel-slide img.carousel-active:hover,
.exp-slide-gallery.carousel-slide img.carousel-active:hover {
    box-shadow: 0 4px 20px rgba(0, 33, 71, 0.1);
}

/* Single-image galleries — no padding for arrows, skip grid */
.pub-slide-gallery.carousel-single,
.exp-slide-gallery.carousel-single {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    min-height: 180px;
}

.pub-slide-gallery.carousel-single img,
.exp-slide-gallery.carousel-single img {
    display: block;
    max-height: 300px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 6px;
    cursor: zoom-in;
    height: auto;
    opacity: 1;
    transform: none;
    animation: none;
    border: none;
}

/* ==========  Responsive  ========== */
@media (max-width: 600px) {
    .pub-slide-gallery.carousel-grid,
    .exp-slide-gallery.carousel-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 5px;
        padding: 0.5rem;
    }

    .pub-slide-gallery.carousel-grid img,
    .exp-slide-gallery.carousel-grid img {
        height: 80px;
    }

    .pub-slide-gallery.carousel-slide,
    .exp-slide-gallery.carousel-slide {
        min-height: 140px;
        padding: 1rem 2.25rem;
    }

    .pub-slide-gallery.carousel-slide img,
    .exp-slide-gallery.carousel-slide img {
        max-height: 200px;
    }

    .carousel-prev,
    .carousel-next {
        width: 28px;
        height: 28px;
    }

    .carousel-prev svg,
    .carousel-next svg {
        width: 13px;
        height: 13px;
    }

    .carousel-prev { left: 0.3rem; }
    .carousel-next { right: 0.3rem; }

    .carousel-footer {
        gap: 0.5rem;
    }

    .carousel-dot {
        width: 6px;
        height: 6px;
    }

    .carousel-zoom-hint {
        font-size: 0.6rem;
        padding: 0.25rem 0.55rem;
        bottom: 0.5rem;
        right: 0.5rem;
    }

    .carousel-zoom-hint svg {
        width: 11px;
        height: 11px;
    }
}

/* Slide description */
.pub-slide-desc,
.exp-slide-desc {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 0.85rem;
    color: var(--slate);
    line-height: 1.6;
    margin-top: 0.75rem;
    padding-left: 0.75rem;
    border-left: 2px solid var(--gold);
}

/* Sub-slide titles inside experience panels */
.exp-sub-slide {
    margin-bottom: 1rem;
}

.exp-sub-slide:last-child {
    margin-bottom: 0;
}

.exp-sub-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.5rem;
    letter-spacing: 0.3px;
}

/* Make pub-entry wrap for the detail panel */
.pub-entry {
    flex-wrap: wrap;
}

.pub-detail-panel {
    flex-basis: 100%;
}

/* ==========================================================================
   Gallery Lightbox — Full-featured image viewer
   ========================================================================== */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

/* Glassmorphism backdrop */
.gl-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 15, 35, 0.92);
    backdrop-filter: blur(24px) saturate(120%);
    -webkit-backdrop-filter: blur(24px) saturate(120%);
    cursor: zoom-out;
}

/* Close button */
.gl-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.gl-close:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    transform: rotate(90deg);
}

.gl-close svg {
    width: 20px;
    height: 20px;
}

/* Stage — holds image and nav arrows */
.gl-stage {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: 1rem;
    min-height: 0;
}

/* Navigation arrows */
.gl-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-out-expo);
    backdrop-filter: blur(8px);
}

.gl-prev { left: 1rem; }
.gl-next { right: 1rem; }

.gl-nav:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.gl-nav svg {
    width: 22px;
    height: 22px;
}

.gl-nav-disabled {
    opacity: 0.25;
    pointer-events: none;
}

/* Image wrapper */
.gl-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: calc(100% - 120px);
    max-height: 100%;
    overflow: hidden;
}

.gl-image {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
    transition: opacity 0.15s ease, transform 0.3s var(--ease-out-expo);
    user-select: none;
}

.gallery-lightbox.active .gl-image {
    animation: glImageIn 0.4s var(--ease-out-expo) both;
}

@keyframes glImageIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

.gl-fade-out {
    opacity: 0 !important;
    transform: scale(0.97) !important;
}

.gl-fade-in {
    animation: glFadeIn 0.3s var(--ease-out-expo) both !important;
}

@keyframes glFadeIn {
    from { opacity: 0; transform: scale(1.02); }
    to   { opacity: 1; transform: scale(1); }
}

/* Bottom bar — caption, counter, thumbnails */
.gl-bottom {
    position: relative;
    z-index: 2;
    padding: 0.75rem 1.5rem 1rem;
    text-align: center;
    background: linear-gradient(to top, rgba(0, 10, 25, 0.6), transparent);
}

.gl-caption {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    margin-bottom: 0.4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    min-height: 1.3em;
}

.gl-counter {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.gl-current {
    color: var(--gold);
}

/* Thumbnail strip */
.gl-thumbs {
    display: flex;
    gap: 6px;
    justify-content: center;
    overflow-x: auto;
    padding: 2px 0 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.gl-thumbs::-webkit-scrollbar { display: none; }

.gl-thumb {
    flex-shrink: 0;
    width: 52px;
    height: 36px;
    border: 2px solid transparent;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    padding: 0;
    transition: all 0.3s var(--ease-out-expo);
    opacity: 0.5;
}

.gl-thumb:hover {
    opacity: 0.85;
    border-color: rgba(255, 255, 255, 0.3);
}

.gl-thumb.active {
    border-color: var(--gold);
    opacity: 1;
    box-shadow: 0 0 0 1px rgba(196, 155, 60, 0.3), 0 2px 8px rgba(196, 155, 60, 0.2);
}

.gl-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Responsive lightbox */
@media (max-width: 600px) {
    .gl-nav {
        width: 38px;
        height: 38px;
    }
    .gl-prev { left: 0.5rem; }
    .gl-next { right: 0.5rem; }
    .gl-nav svg { width: 18px; height: 18px; }
    .gl-image-wrap { max-width: calc(100% - 80px); }
    .gl-image { max-height: calc(100vh - 220px); border-radius: 6px; }
    .gl-close { top: 0.75rem; right: 0.75rem; width: 38px; height: 38px; }
    .gl-close svg { width: 16px; height: 16px; }
    .gl-caption { font-size: 0.8rem; }
    .gl-thumb { width: 42px; height: 30px; }
    .gl-bottom { padding: 0.5rem 1rem 0.75rem; }
}

/* Responsive detail panels */
@media (max-width: 600px) {
    .pub-detail-panel.active,
    .exp-detail-panel.active {
        padding: 0.75rem;
    }
}

/* ==========================================================================
   Scientific Communications — Hidden type filter badges
   ========================================================================== */
.comm-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.comm-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #EDF2F7;
    border-radius: 6px;
    transition: all 0.35s var(--ease-out-expo);
}

.comm-item:last-child {
    border-bottom: none;
}

.comm-item:hover {
    background: rgba(0, 33, 71, 0.02);
    padding-left: 1.35rem;
}

.comm-type {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.25rem 0.6rem;
    border-radius: 2px;
    width: 4.2rem;
    min-width: 4.2rem;
    max-width: 4.2rem;
    text-align: center;
    flex-shrink: 0;
    white-space: normal;
    line-height: 1.4;
}

.type-oral {
    background: var(--navy);
    color: #ffffff;
}

.type-poster {
    background: #EDF2F7;
    color: var(--navy);
}

.comm-venue {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}

.comm-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* ==========================================================================
   Timeline (Experience & Education) — Animated
   ========================================================================== */
.timeline {
    position: relative;
    padding-left: 1.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--navy), var(--gold));
    transform-origin: top;
}

/* Animated timeline line draw */
.timeline.reveal-timeline::before {
    transform: scaleY(0);
    transition: transform 1.5s var(--ease-out-expo);
}

.timeline.reveal-timeline.revealed::before {
    transform: scaleY(1);
}

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

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0.35rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--navy);
    transform: translateX(-4px) scale(1);
    transition: transform 0.4s var(--ease-spring), box-shadow 0.4s ease;
}

.timeline-item:hover::before {
    transform: translateX(-4px) scale(1.3);
    box-shadow: 0 0 0 4px rgba(196, 155, 60, 0.2);
}

.timeline-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.35rem;
}

.timeline-content {
    transition: transform 0.3s var(--ease-out-expo);
}

.timeline-item:hover .timeline-content {
    transform: translateX(4px);
}

.timeline-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--navy);
    margin-bottom: 0.2rem;
}

.timeline-org {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.timeline-subject {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--slate);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

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

.timeline-content ul li {
    font-size: 0.85rem;
    color: var(--slate);
    margin-bottom: 0.35rem;
    line-height: 1.5;
}

.rank-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 0.2rem 0.65rem;
    border-radius: 12px;
    margin-top: 0.35rem;
    letter-spacing: 0.3px;
    transition: all 0.35s var(--ease-spring);
}

.rank-badge:hover {
    background: var(--gold);
    color: #ffffff;
}

/* ==========================================================================
   Teaching Grid — Modern cards
   ========================================================================== */
.teaching-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.teaching-card {
    background: var(--off-white);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 8px;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

/* Subtle top accent line on cards */
.teaching-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--navy), var(--gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease-out-expo);
}

.teaching-card:hover {
    box-shadow: 0 8px 30px rgba(0, 33, 71, 0.08);
    transform: translateY(-3px);
    border-color: transparent;
}

.teaching-card:hover::before {
    transform: scaleX(1);
}

.teaching-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.teaching-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    color: var(--navy);
}

.teaching-hours {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    letter-spacing: 0.5px;
    transition: all 0.3s var(--ease-spring);
}

.teaching-card:hover .teaching-hours {
    background: var(--gold);
    color: #ffffff;
}

.teaching-org {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.teaching-card ul {
    list-style: disc;
    padding-left: 1.25rem;
}

.teaching-card ul li {
    font-size: 0.83rem;
    color: var(--slate);
    margin-bottom: 0.4rem;
    line-height: 1.5;
}

/* ==========================================================================
   Awards Grid — Modern cards with animated accent
   ========================================================================== */
.awards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.award-card {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    transition: all 0.4s var(--ease-out-expo);
}

.award-card:hover {
    box-shadow: 0 8px 30px rgba(0, 33, 71, 0.08);
    transform: translateY(-3px);
    border-color: transparent;
}

.award-accent {
    width: 4px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--gold), var(--gold-light));
    transition: width 0.4s var(--ease-out-expo);
}

.award-card:hover .award-accent {
    width: 6px;
}

.award-content {
    padding: 1.25rem 1.5rem;
    flex: 1;
}

.award-date {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.award-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    color: var(--navy);
    margin: 0.25rem 0 0.15rem;
}

.award-org {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.award-content p:last-child {
    font-size: 0.85rem;
    color: var(--slate);
    line-height: 1.5;
}

/* ==========================================================================
   Contact — Enhanced
   ========================================================================== */
.contact-content {
    margin-top: 1.5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.contact-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    transition: transform 0.3s var(--ease-out-expo);
}

.contact-item:hover {
    transform: translateX(4px);
}

.contact-item:last-child {
    padding-bottom: 1rem;
}

.contact-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.3rem;
}

.contact-item a,
.contact-item p {
    font-size: 0.95rem;
    color: var(--slate);
}

.contact-item a:hover {
    color: var(--gold);
}

.contact-icon-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--slate);
    transition: color 0.3s ease;
}

.contact-icon-link:hover {
    color: var(--gold);
}

.contact-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.3s var(--ease-spring);
}

.contact-icon-link:hover .contact-icon {
    transform: scale(1.15);
}

/* ==========================================================================
   Footer — Enhanced
   ========================================================================== */
.site-footer {
    background: linear-gradient(135deg, var(--navy) 0%, #001530 100%);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.8rem;
}

.site-footer a {
    color: var(--gold);
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: #ffffff;
}

.footer-logo-link {
    display: inline-block;
    margin-bottom: 0.6rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.footer-logo-link:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

.footer-logo {
    height: 50px;
    width: auto;
}

.footer-credit {
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-copy {
    margin-top: 0.2rem;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.3);
}

.footer-credit-logo {
    height: 18px;
    width: auto;
    vertical-align: middle;
    margin-left: 0.2rem;
    transition: opacity 0.3s ease;
}

.footer-credit-logo:hover {
    opacity: 0.8;
}

.footer-credit a {
    color: rgba(196, 155, 60, 0.7);
    transition: color 0.3s ease;
}

.footer-credit a:hover {
    color: var(--gold);
}

/* ==========================================================================
   Back to Top Button
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--navy);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.9);
    transition: all 0.4s var(--ease-out-expo);
    z-index: 50;
    box-shadow: 0 4px 15px rgba(0, 33, 71, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    background: var(--gold);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(196, 155, 60, 0.3);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}

/* ==========================================================================
   Active nav link indicator
   ========================================================================== */
.nav-links-desktop li a.active {
    color: #ffffff;
    border-bottom-color: var(--gold);
}

/* ==========================================================================
   Responsive — Tablet (601px+)
   ========================================================================== */
@media (min-width: 601px) {
    .hero {
        padding: 4rem 0 3rem;
    }

    .hero-content {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 2.5rem;
    }

    .hero-text {
        flex: 1;
    }

    .hero-photo img {
        width: 220px;
        height: 220px;
    }

    .teaching-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .awards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Responsive — Desktop Nav (769px+)
   ========================================================================== */
@media (min-width: 769px) {
    /* Hide mobile-only elements */
    .nav-hamburger,
    .nav-overlay {
        display: none !important;
    }

    /* Show desktop inline links */
    .nav-links-desktop {
        display: flex;
        gap: 1.75rem;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .nav-links-desktop li a {
        color: rgba(255, 255, 255, 0.75);
        font-size: 0.72rem;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        white-space: nowrap;
        padding: 0.25rem 0;
        border-bottom: 2px solid transparent;
        transition: color 0.3s ease, border-color 0.3s ease;
        position: relative;
    }

    .nav-links-desktop li a:hover {
        color: #ffffff;
        border-bottom-color: var(--gold);
    }
}

/* ==========================================================================
   Responsive — Desktop (901px+)
   ========================================================================== */
@media (min-width: 901px) {
    .section {
        padding: 5rem 0;
    }

    .hero {
        padding: 6rem 0 4rem;
    }

    .hero-photo img {
        width: 280px;
        height: 280px;
    }

    .nav-links-desktop {
        gap: 2rem;
    }
}

/* ==========================================================================
   Responsive — Mobile phones (max-width: 600px)
   ========================================================================== */
@media (max-width: 600px) {
    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .hero {
        padding: 2rem 0 1.5rem;
    }

    .hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.25rem;
    }

    .hero-text {
        flex: unset;
        width: 100%;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-photo img {
        width: 140px;
        height: 140px;
    }

    .hero-logos {
        gap: 1rem;
        padding: 1rem 0;
        margin-top: 1.25rem;
    }

    .hero-logos img {
        height: 40px;
        padding: 6px 10px;
    }

    .cta-banner {
        margin-top: 1.25rem;
    }

    .section {
        padding: 2.5rem 0;
    }

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

    .teaching-grid {
        grid-template-columns: 1fr !important;
    }

    .teaching-card {
        padding: 1.15rem;
    }

    .awards-grid {
        grid-template-columns: 1fr !important;
    }

    .award-card {
        padding: 1.15rem;
    }

    .contact-grid {
        grid-template-columns: 1fr !important;
    }

    /* Keep nav solid on mobile to avoid backdrop-filter issues */
    .main-nav.nav-scrolled {
        background: var(--navy);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    .nav-overlay-bar {
        padding: 0 1rem;
    }

    .nav-overlay-body {
        padding: 1.5rem 1.25rem;
    }

    .site-footer {
        padding: 1.25rem 0;
        font-size: 0.72rem;
    }

    .back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 38px;
        height: 38px;
    }

    /* Reduce animation distance on mobile */
    .reveal {
        transform: translateY(25px);
    }

    .reveal-left {
        transform: translateX(-25px);
    }

    .reveal-right {
        transform: translateX(25px);
    }
}

/* ==========================================================================
   Responsive — Small phones (max-width: 380px)
   ========================================================================== */
@media (max-width: 380px) {
    .container {
        padding: 0 0.75rem;
    }

    .hero-text h1 {
        font-size: 1.85rem;
    }

    .hero-photo img {
        width: 120px;
        height: 120px;
    }

    .hero-logos {
        gap: 0.75rem;
    }

    .hero-logos img {
        height: 32px;
        padding: 5px 8px;
    }

    .pub-entry {
        flex-direction: column;
        gap: 0.25rem;
    }

    .pub-number {
        min-width: auto;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .main-nav,
    .cta-banner,
    .scroll-progress,
    .back-to-top {
        display: none;
    }

    body {
        font-size: 11pt;
        color: #000;
        background: #fff;
    }

    .section {
        padding: 1.5rem 0;
        break-inside: avoid;
    }

    .hero {
        padding: 1rem 0;
    }

    a {
        color: #000;
    }

    .tag {
        border-color: #666;
        color: #333;
    }

    /* Show hidden elements in print */
    .pub-group-title {
        display: block;
    }

    /* Disable animations for print */
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    .stagger-children > * {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ==========================================================================
   Reduced Motion Preference
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1;
        transform: none;
    }

    .stagger-children > * {
        opacity: 1;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }
}
