/* ========================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ======================================== */
:root {
    /* Light Mode (Default) - Warm Paper */
    --bg-surface: #F5F2ED;
    --bg-surface-alt: #EBE7E0;
    --bg-card: rgba(255, 255, 255, 0.65);
    --text-main: #050505;
    --text-secondary: #4a5568;
    --accent-sage: #283B2C;
    --accent-sage-light: rgba(40, 59, 44, 0.1);
    --line-blueprint: rgba(200, 195, 188, 0.7);
    --glow-msmed: rgba(187, 134, 252, 0.4);

    /* Typography Scale */
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --section-padding: clamp(4rem, 10vw, 8rem);
    --container-max: 1200px;
    --grid-gap: 2rem;

    /* Section-specific tints */
    --bg-thesis: linear-gradient(180deg, #F7F4EF 0%, #F5F2ED 100%);
    --bg-expertise: linear-gradient(180deg, #F5F2ED 0%, #F2F5F2 100%);
    --bg-contact: linear-gradient(180deg, #F3F4F6 0%, #F5F2ED 100%);

    /* Full-bleed section panel backgrounds */
    --bg-thesis-panel: #2C2C2C;
    --bg-expertise-panel: #283B2C;
    --bg-contact-panel: #3D2E24;

    /* Text on colored backgrounds */
    --text-on-colored: #F8F8F7;
    --text-secondary-on-colored: rgba(248, 248, 247, 0.7);
}

[data-theme="dark"] {
    --bg-surface: #0A0A0A;
    --bg-surface-alt: #111110;
    --bg-card: rgba(30, 30, 30, 0.65);
    --text-main: #F8FAFC;
    --text-secondary: #a1a1aa;  /* Tailwind zinc-400, neutral gray */
    --accent-sage: #6B8E6D;
    --accent-sage-light: rgba(107, 142, 109, 0.15);
    --line-blueprint: rgba(255, 255, 255, 0.1);
    --glow-msmed: rgba(187, 134, 252, 0.6);

    /* Section-specific tints (dark) */
    --bg-thesis: linear-gradient(180deg, #0D0D0C 0%, #0A0A0A 100%);
    --bg-expertise: linear-gradient(180deg, #0A0A0A 0%, #0B0C0B 100%);
    --bg-contact: linear-gradient(180deg, #0B0B0C 0%, #0A0A0A 100%);

    /* Full-bleed panel backgrounds (dark) */
    --bg-thesis-panel: #1A1A1A;
    --bg-expertise-panel: #1A2F1E;
    --bg-contact-panel: #251C16;
}

/* ========================================
   BASE & RESET
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-main);
    background-color: var(--bg-surface);
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
}

/* ========================================
   GRAIN TEXTURE OVERLAY
   ======================================== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    background-repeat: repeat;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

strong {
    color: var(--text-main);
    font-weight: 600;
}

/* ========================================
   LAYOUT & GRID
   ======================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 3rem);
}

section {
    padding: var(--section-padding) 0;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Section backgrounds - use page surface */
#thesis {
    background: var(--bg-surface);
}

#expertise {
    background: var(--bg-surface);
}

#contact {
    background: var(--bg-surface);
}

/* Blueprint Grid Lines */
.section-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--line-blueprint);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-divider.animate {
    transform: scaleX(1);
}

/* ========================================
   UNIFIED NAVIGATION BAR (Liquid Glass)
   ======================================== */
.nav {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 0.875rem 1.75rem;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Liquid Glass Effect */
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.7) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0.6) 100%
    );
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

/* Dark mode liquid glass */
[data-theme="dark"] .nav {
    background: linear-gradient(
        135deg,
        rgba(30, 30, 30, 0.7) 0%,
        rgba(20, 20, 20, 0.5) 50%,
        rgba(30, 30, 30, 0.6) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

/* Dynamic adaptation when over dark section */
.nav.over-dark {
    background: linear-gradient(
        135deg,
        rgba(30, 30, 30, 0.8) 0%,
        rgba(20, 20, 20, 0.6) 50%,
        rgba(30, 30, 30, 0.7) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.nav.over-dark .nav-logo,
.nav.over-dark .unified-nav-label,
.nav.over-dark .theme-toggle {
    color: #F8FAFC;
}

.nav.over-dark .unified-nav-dot {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(20, 20, 20, 0.8);
}

.nav.over-dark .unified-nav-item.active .unified-nav-dot {
    background: #6B8E6D;
    border-color: #6B8E6D;
}

.nav.over-dark .unified-nav-item.active .unified-nav-label {
    color: #6B8E6D;
}

.nav-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: nowrap;
    position: relative;
}

.nav-logo {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-main);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.4s ease;
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--line-blueprint);
    opacity: 0.5;
}

/* Unified section navigation within the bar */
.unified-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    position: relative;
    z-index: 1;
}

.unified-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.unified-nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid var(--line-blueprint);
    background: var(--bg-surface);
    transition: all 0.3s ease;
}

.unified-nav-item:hover .unified-nav-dot {
    border-color: var(--accent-sage);
    transform: scale(1.2);
}

.unified-nav-item.active .unified-nav-dot {
    background: var(--accent-sage);
    border-color: var(--accent-sage);
}

.unified-nav-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    opacity: 0.7;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.unified-nav-item:hover .unified-nav-label {
    opacity: 1;
}

.unified-nav-item.active .unified-nav-label {
    color: var(--accent-sage);
    opacity: 1;
}

/* Theme toggle - icon only */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--line-blueprint);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.theme-toggle:hover {
    border-color: var(--accent-sage);
    color: var(--accent-sage);
    transform: scale(1.05);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.nav.over-dark .theme-toggle {
    border-color: rgba(255, 255, 255, 0.2);
}

.nav.over-dark .theme-toggle:hover {
    border-color: #6B8E6D;
    color: #6B8E6D;
}

/* LinkedIn button in nav */
.nav-linkedin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--line-blueprint);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-linkedin:hover {
    border-color: var(--accent-sage);
    color: var(--accent-sage);
    transform: scale(1.05);
}

.nav-linkedin svg {
    width: 16px;
    height: 16px;
}

.nav.over-dark .nav-linkedin {
    border-color: rgba(255, 255, 255, 0.2);
    color: #F8FAFC;
}

.nav.over-dark .nav-linkedin:hover {
    border-color: #6B8E6D;
    color: #6B8E6D;
}

/* Floating Theme Toggle (Desktop only) - Liquid Glass */
.floating-theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.7) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0.6) 100%
    );
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.floating-theme-toggle:hover {
    border-color: var(--accent-sage);
    color: var(--accent-sage);
    transform: scale(1.05);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.floating-theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* Floating toggle over dark section */
.floating-theme-toggle.over-dark {
    background: linear-gradient(
        135deg,
        rgba(30, 30, 30, 0.8) 0%,
        rgba(20, 20, 20, 0.6) 50%,
        rgba(30, 30, 30, 0.7) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #F8FAFC;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.floating-theme-toggle.over-dark:hover {
    border-color: #6B8E6D;
    color: #6B8E6D;
}

[data-theme="dark"] .floating-theme-toggle {
    background: linear-gradient(
        135deg,
        rgba(30, 30, 30, 0.7) 0%,
        rgba(20, 20, 20, 0.5) 50%,
        rgba(30, 30, 30, 0.6) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .floating-theme-toggle:hover {
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

/* Theme toggle icon default visibility */
.mobile-moon-icon,
.floating-moon-icon {
    display: none;
}

[data-theme="dark"] .mobile-sun-icon,
[data-theme="dark"] .floating-sun-icon {
    display: none;
}

[data-theme="dark"] .mobile-moon-icon,
[data-theme="dark"] .floating-moon-icon {
    display: block;
}

@media (max-width: 900px) {
    .floating-theme-toggle {
        display: none;
    }
}

/* ========================================
   MOBILE NAV DROPDOWN
   ======================================== */
.nav-dropdown-trigger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--line-blueprint);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-dropdown-trigger:hover {
    border-color: var(--accent-sage);
    color: var(--accent-sage);
}

.nav-dropdown-trigger svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.nav-dropdown-trigger.open svg {
    transform: rotate(180deg);
}

.nav.over-dark .nav-dropdown-trigger {
    border-color: rgba(255, 255, 255, 0.2);
    color: #F8FAFC;
}

.nav.over-dark .nav-dropdown-trigger:hover {
    border-color: #6B8E6D;
    color: #6B8E6D;
}

/* ========================================
   MOBILE/TABLET RESPONSIVE - Single Breakpoint
   ======================================== */
@media (max-width: 900px) {
    .nav {
        padding: 0.625rem 1.25rem;
        max-width: calc(100% - 2rem);
    }

    .nav-inner {
        gap: 0.75rem;
        flex-wrap: nowrap;
        flex-direction: row;
        justify-content: space-between;
    }

    .nav-logo {
        font-size: 1rem;
    }

    /* Hide dividers, dots, theme toggle, and LinkedIn on mobile */
    .nav-divider,
    .unified-nav,
    .theme-toggle,
    .nav-linkedin {
        display: none;
    }

    /* Show menu trigger button */
    .nav-dropdown-trigger {
        display: flex;
    }
}

/* ========================================
   MOBILE FULL-SCREEN MENU
   ======================================== */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1001;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;

    /* Liquid Glass Effect */
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.85) 0%,
        rgba(255, 255, 255, 0.75) 50%,
        rgba(255, 255, 255, 0.85) 100%
    );
    backdrop-filter: blur(30px) saturate(180%);

    /* Animation */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
}

[data-theme="dark"] .mobile-menu {
    background: linear-gradient(
        135deg,
        rgba(10, 10, 10, 0.92) 0%,
        rgba(20, 20, 20, 0.88) 50%,
        rgba(10, 10, 10, 0.92) 100%
    );
}

/* Mobile menu adapts when nav is over dark section */
.mobile-menu.over-dark {
    background: linear-gradient(
        135deg,
        rgba(10, 10, 10, 0.92) 0%,
        rgba(20, 20, 20, 0.88) 50%,
        rgba(10, 10, 10, 0.92) 100%
    );
}

.mobile-menu.over-dark .mobile-menu-close {
    border-color: rgba(255, 255, 255, 0.2);
    color: #F8FAFC;
}

.mobile-menu.over-dark .mobile-menu-link {
    color: rgba(248, 250, 252, 0.7);
}

.mobile-menu.over-dark .mobile-menu-link:hover,
.mobile-menu.over-dark .mobile-menu-link.active {
    color: #6B8E6D;
}

.mobile-menu.over-dark .mobile-menu-theme {
    color: rgba(248, 250, 252, 0.7);
}

.mobile-menu.over-dark .mobile-menu-theme-toggle {
    border-color: rgba(255, 255, 255, 0.2);
    color: #F8FAFC;
}

/* Mobile Menu LinkedIn CTA */
.mobile-menu-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1.5px solid var(--accent-sage);
    border-radius: 50px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-sage);
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.mobile-menu-linkedin:hover {
    background: var(--accent-sage);
    color: #FFFFFF;
    transform: scale(1.02);
}

.mobile-menu-linkedin svg {
    width: 16px;
    height: 16px;
}

.mobile-menu-linkedin .external-icon {
    width: 12px;
    height: 12px;
    opacity: 0.7;
}

.mobile-menu.over-dark .mobile-menu-linkedin {
    border-color: #6B8E6D;
    color: #6B8E6D;
}

.mobile-menu.over-dark .mobile-menu-linkedin:hover {
    background: #6B8E6D;
    color: #050505;
}

.mobile-menu-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--line-blueprint);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    border-color: var(--accent-sage);
    color: var(--accent-sage);
}

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

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.mobile-menu-link {
    font-family: var(--font-serif);
    font-size: 2.25rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    padding: 0.5rem 1rem;
}

.mobile-menu-link:hover {
    color: var(--accent-sage);
    transform: scale(1.05);
}

.mobile-menu-link.active {
    color: var(--accent-sage);
}

.mobile-menu-theme {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

.mobile-menu-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--line-blueprint);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-theme-toggle:hover {
    border-color: var(--accent-sage);
    color: var(--accent-sage);
}

.mobile-menu-theme-toggle svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 900px) {
    .mobile-menu {
        display: flex;
    }
}

/* ========================================
   HERO SECTION
   ======================================== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 8rem;
    padding-bottom: 2rem;
    position: relative;
    overflow: hidden;
}


/* Animated Gradient Blob */
.hero-blob {
    position: absolute;
    top: 20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle at 30% 30%,
        rgba(40, 59, 44, 0.4) 0%,
        rgba(107, 142, 109, 0.2) 40%,
        rgba(187, 134, 252, 0.15) 70%,
        transparent 100%);
    filter: blur(80px);
    animation: blobFloat 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes blobFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    25% {
        transform: translate(-30px, 20px) scale(1.05) rotate(5deg);
    }
    50% {
        transform: translate(20px, -30px) scale(0.95) rotate(-5deg);
    }
    75% {
        transform: translate(-20px, -20px) scale(1.02) rotate(3deg);
    }
}

[data-theme="dark"] .hero-blob {
    background: radial-gradient(circle at 30% 30%,
        rgba(107, 142, 109, 0.3) 0%,
        rgba(187, 134, 252, 0.2) 50%,
        transparent 100%);
}

.hero-content {
    max-width: none;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-layout {
    display: flex;
    align-items: center;
    gap: 4rem;
    flex-direction: row-reverse;
}

.hero-text {
    flex: 1;
    text-align: left;
}

.hero-headshot {
    flex-shrink: 0;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--line-blueprint);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

@media (max-width: 768px) {
    .hero-layout {
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        text-align: center;
    }

    .hero-headshot {
        width: 180px;
        height: 180px;
    }

    .cta-group {
        justify-content: center;
    }
}

/* Staggered Text Reveal */
.hero-title .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: wordReveal 0.6s ease forwards;
}

@keyframes wordReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.hero-subtitle .highlight {
    color: var(--text-main);
    font-weight: 600;
    position: relative;
    display: inline;
}

.hero-subtitle .highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-sage);
    transform: scaleX(0);
    transform-origin: left;
    animation: drawUnderline 1s ease 0.5s forwards;
}

@keyframes drawUnderline {
    to { transform: scaleX(1); }
}

.cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.125rem 2.25rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease, transform 0.2s ease-out;
}

.btn-primary {
    background: var(--accent-sage);
    color: #FFFFFF;
    border: 2px solid var(--accent-sage);
    box-shadow:
        0 4px 14px rgba(40, 59, 44, 0.25),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent-sage);
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(40, 59, 44, 0.3),
        0 3px 6px rgba(0, 0, 0, 0.12);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow:
        0 2px 8px rgba(40, 59, 44, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .btn-primary {
    box-shadow:
        0 4px 14px rgba(107, 142, 109, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .btn-primary:hover {
    box-shadow:
        0 6px 20px rgba(107, 142, 109, 0.4),
        0 3px 6px rgba(0, 0, 0, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 2px solid var(--line-blueprint);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
    border-color: var(--accent-sage);
    color: var(--accent-sage);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .btn-secondary {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .btn-secondary:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Card Tilt Effect - adds transform-style for 3D effect */
.expertise-card.tilting {
    will-change: transform;
}

@media (hover: none) and (pointer: coarse) {
    .expertise-card {
        transform: none !important;
    }
}

/* ========================================
   THESIS SECTION
   ======================================== */
#thesis .content-wrapper {
    max-width: none;
}

#thesis h2 {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    color: var(--text-main);
}

#thesis strong {
    color: var(--text-main);
}

#thesis p {
    font-size: clamp(1.5rem, 3vw, 1.75rem);
    color: var(--text-main);
}

/* ========================================
   EXPERTISE SECTION
   ======================================== */
/* Section headings */
#expertise h2 {
    color: var(--text-main);
    font-size: clamp(2.25rem, 5vw, 3.75rem);
}

#expertise .roles-heading {
    color: var(--text-main);
}

/* Key Roles - Bento Grid Style */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    overflow: hidden;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.05),
        0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 3rem;
}

[data-theme="dark"] .expertise-grid {
    background: rgba(40, 40, 40, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.4);
}

.expertise-card {
    padding: 2rem;
    background: transparent;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.expertise-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-sage-light);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.expertise-card:hover::after {
    opacity: 1;
}

.expertise-card .role {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-sage);
    margin-bottom: 0.75rem;
}

.expertise-card h3 {
    color: var(--text-main);
}

.expertise-card p {
    margin-bottom: 0;
    font-size: 1rem;
}

.expertise-card svg {
    width: 28px;
    height: 28px;
    color: var(--accent-sage);
    margin-bottom: 0.75rem;
}

/* Superpowers Grid - Individual Cards */
.superpowers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--grid-gap);
}

.superpower-cell {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.06),
        0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease, transform 0.2s ease;
    position: relative;
}

.superpower-cell:hover {
    transform: translateY(-2px);
    border-color: var(--accent-sage);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .superpower-cell {
    background: rgba(40, 40, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.4),
        0 1px 3px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .superpower-cell:hover {
    border-color: var(--accent-sage);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 2px 6px rgba(0, 0, 0, 0.4);
}

.superpower-cell svg {
    width: 32px;
    height: 32px;
    color: var(--accent-sage);
    margin-bottom: 1rem;
}

.superpower-cell h4 {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: clamp(1.15rem, 2vw, 1.35rem);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    color: var(--accent-sage);
}

.superpower-cell p {
    font-size: 1.25rem;
    margin-bottom: 0;
    color: var(--text-secondary);
}

/* Featured Superpowers (Larger/More Prominent) */
.superpowers-featured .superpower-cell {
    padding: 2.5rem;
}

.superpowers-featured .superpower-cell svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1.25rem;
}

.superpowers-featured .superpower-cell h4 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.superpowers-featured .superpower-cell p {
    font-size: 1.25rem;
}

/* Key Roles Heading */
.roles-heading {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 500;
    color: var(--text-main);
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Timeline Accordion Wrapper */
.timeline-accordion {
    margin-top: 2rem;
}

/* ========================================
   TIMELINE ACCORDION STYLES
   ======================================== */
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.accordion-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.125rem 2.25rem;
    background: transparent;
    border: 1px solid var(--accent-sage);
    border-radius: 50px;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent-sage);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(40, 59, 44, 0.1);
    transition: all 0.3s ease, transform 0.2s ease;
}

.accordion-toggle:hover {
    background: var(--accent-sage);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(40, 59, 44, 0.2);
}

.accordion-toggle:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(40, 59, 44, 0.1);
}

[data-theme="dark"] .accordion-toggle {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .accordion-toggle:hover {
    box-shadow: 0 4px 14px rgba(107, 142, 109, 0.3);
}

.accordion-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.accordion-toggle.open svg {
    transform: rotate(180deg);
}

.timeline-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-content.open {
    max-height: 1000px;
}

.timeline {
    padding-top: 2rem;
    position: relative;
}

.timeline-company-group {
    margin-bottom: 2rem;
}

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

.company-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--line-blueprint);
}

.company-name {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-main);
}

.company-tenure {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-sage);
}

.company-roles {
    padding-left: 1rem;
    position: relative;
}

.company-roles::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--line-blueprint);
}

.timeline-role {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0 0.75rem 1rem;
    position: relative;
}

.timeline-role::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 1.1rem;
    width: 8px;
    height: 8px;
    background: var(--accent-sage);
    border-radius: 50%;
}

.role-title {
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.4;
}

.role-dates {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.publications-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    margin-left: 0.5rem;
    transition: color 0.3s ease;
}

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

.publications-link svg {
    width: 14px;
    height: 14px;
}

@media (min-width: 600px) {
    .timeline-role {
        flex-direction: row;
        justify-content: space-between;
        align-items: baseline;
        gap: 1rem;
    }
}

/* ========================================
   ORIGIN STORY SECTION (Static Dark)
   ======================================== */
#origin-story {
    background: #050505;
    color: #F8FAFC;
    position: relative;
}

#origin-story h2 {
    color: #F8FAFC;
    font-size: clamp(2.25rem, 5vw, 3.75rem);
}

#origin-story p {
    color: #F8FAFC;
}

#origin-story strong {
    color: #F8FAFC;
}

#origin-story .content-wrapper {
    max-width: none;
}

#origin-story .glow-accent {
    position: absolute;
    top: 50%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(187, 134, 252, 0.4) 0%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
    opacity: 0.5;
}

/* Dark mode: purple background with dark orb */
[data-theme="dark"] #origin-story {
    background: #1E1338;
}

[data-theme="dark"] #origin-story .glow-accent {
    background: radial-gradient(circle, rgba(5, 5, 5, 0.8) 0%, transparent 70%);
    opacity: 0.6;
}

#origin-story .btn-primary {
    background: #6B8E6D;
    border-color: #6B8E6D;
    color: #050505;
}

#origin-story .btn-primary:hover {
    background: transparent;
    color: #6B8E6D;
}

.origin-visual {
    margin: 2.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(187, 134, 252, 0.3);
    max-width: 400px;
}

.origin-visual img {
    width: 100%;
    height: auto;
    display: block;
}

/* Secondary image (group photo) - wider */
.origin-visual-secondary {
    max-width: 600px;
    margin-top: 2rem;
}

/* Side-by-side photo layout */
.origin-visuals-row {
    display: flex;
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.origin-visuals-row .origin-visual {
    margin: 0;
    max-width: 280px;
    height: 350px;
}

.origin-visuals-row .origin-visual img {
    height: 100%;
    object-fit: cover;
}

.origin-visuals-row .origin-visual-secondary {
    max-width: 400px;
    margin-top: 0;
    height: 350px;
}

/* Stack photos only on very small screens */
@media (max-width: 500px) {
    .origin-visuals-row {
        flex-direction: column;
    }
    .origin-visuals-row .origin-visual,
    .origin-visuals-row .origin-visual-secondary {
        max-width: 100%;
    }
}

/* Left-align content wrapper */
#origin-story .content-wrapper {
    text-align: left;
}

#origin-story p {
    text-align: left;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

/* ========================================
   CONTACT SECTION
   ======================================== */
#contact h2 {
    color: var(--text-main);
    font-size: clamp(2.25rem, 5vw, 3.75rem);
}

#contact label {
    color: var(--text-main);
}

#contact p {
    color: var(--text-main);
}

#contact .content-wrapper {
    max-width: none;
}

.contact-intro {
    margin-bottom: 2rem;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    color: var(--text-main);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 40%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    font-size: 1.15rem;
    color: var(--text-main);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 1.35rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    font-family: var(--font-sans);
    font-size: 1.15rem;
    color: #1a1a1a;
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.06),
        0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.form-group input,
.form-group select {
    border-radius: 50px;
}

.form-group textarea {
    border-radius: 16px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-sage);
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.06),
        0 0 0 3px rgba(40, 59, 44, 0.15);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
    background: rgba(40, 40, 40, 0.95);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus,
[data-theme="dark"] .form-group select:focus {
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.3),
        0 0 0 3px rgba(107, 142, 109, 0.25);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.other-input-wrapper {
    display: none;
    margin-top: 0.75rem;
}

.other-input-wrapper.show {
    display: block;
}

.contact-form .btn-primary {
    align-self: flex-start;
    border: none;
    padding: 1.125rem 2.25rem;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--line-blueprint);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-disclaimer {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 600px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-sage);
}

.footer-links svg {
    width: 18px;
    height: 18px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line-blueprint);
}

.footer-copyright {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    section {
        min-height: auto;
    }

    .expertise-grid,
    .superpowers-grid {
        grid-template-columns: 1fr;
    }

    .accordion-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-form {
        max-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========================================
   AMBIENT GLOWS FOR VISUAL INTEREST
   ======================================== */
#expertise::before {
    content: '';
    position: absolute;
    bottom: 10%;
    right: 5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(107, 142, 109, 0.15) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
}

#contact::before {
    content: '';
    position: absolute;
    top: 20%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 200, 150, 0.08) 0%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
}

/* ========================================
   ANIMATIONS & UTILITIES
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ========================================
   SCROLL REVEAL SYSTEM
   ======================================== */

/* Base state - elements start hidden */
.reveal {
    opacity: 0;
    transition: opacity 0.6s ease,
                transform 0.6s ease;
}

/* Level 1: Simple fade (Origin Story, Contact) */
.reveal-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Level 2: Fade + rise (Thesis, Expertise) */
.reveal-rise {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-rise.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for card grids */
.reveal-stagger > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > *:nth-child(2) { transition-delay: 100ms; }
.reveal-stagger > *:nth-child(3) { transition-delay: 200ms; }
.reveal-stagger > *:nth-child(4) { transition-delay: 300ms; }
.reveal-stagger > *:nth-child(5) { transition-delay: 400ms; }
.reveal-stagger > *:nth-child(6) { transition-delay: 500ms; }

/* Parallax glow movement */
.parallax-glow {
    transition: transform 0.1s ease-out;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-fade,
    .reveal-rise {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
