/* ========================================
   FONT DEFINITIONS
======================================== */
@font-face {
    font-family: "DoranFaNum";
    src: url("../../DoranFaNum-Bold.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "PinarDS3";
    src: url("../../Pinar-DS3-Bold.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   CSS CUSTOM PROPERTIES (VARIABLES)
======================================== */
:root {
    color-scheme: light;
    
    /* Typography */
    --font-brand: "DoranFaNum", "Vazirmatn", system-ui, sans-serif;
    --font-body: "PinarDS3", "Vazirmatn", system-ui, sans-serif;
    --font-heading: "PinarDS3", "Vazirmatn", system-ui, sans-serif;
    
    /* Colors - Light Theme */
    --color-bg-900: #f8f9ff;
    --color-bg-850: #f0f2ff;
    --color-bg-800: rgba(255, 255, 255, 0.92);
    --color-surface: rgba(255, 255, 255, 0.86);
    --color-surface-strong: #ffffff;
    --color-border: rgba(126, 144, 206, 0.18);
    --color-border-strong: rgba(255, 141, 102, 0.5);
    --color-text-primary: #1f2444;
    --color-text-secondary: #3b4368;
    --color-text-muted: #757c9a;
    --color-accent: #ff6b56;
    --color-accent-strong: #f34b7c;
    --color-accent-soft: rgba(255, 155, 120, 0.18);
    --color-accent-alt: #5d6dff;
    --color-glow: rgba(93, 109, 255, 0.18);
    
    /* Shadows */
    --shadow-lg: 0 28px 70px rgba(32, 42, 82, 0.16);
    --shadow-md: 0 20px 48px rgba(32, 42, 82, 0.14);
    --shadow-sm: 0 8px 24px rgba(32, 42, 82, 0.12);
    
    /* Border Radius */
    --radius-xl: 34px;
    --radius-lg: 26px;
    --radius-md: 20px;
    --radius-sm: 14px;
    
    /* Blur Effects */
    --blur-lg: 42px;
    --blur-md: 28px;
    --blur-sm: 16px;
    
    /* Layout */
    --container-width: min(1180px, 100%);
    --container-padding: clamp(16px, 4vw, 32px);
    
    /* Spacing */
    --space-2xs: 8px;
    --space-xs: 12px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 36px;
    --space-xl: 52px;
    --space-2xl: clamp(72px, 10vw, 110px);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.4s ease;
}

/* ========================================
   DARK THEME VARIABLES
======================================== */
body[data-theme="dark"] {
    color-scheme: dark;
    
    /* Colors - Dark Theme */
    --color-bg-900: #040611;
    --color-bg-850: #070d1d;
    --color-bg-800: rgba(13, 23, 54, 0.92);
    --color-surface: rgba(19, 27, 56, 0.68);
    --color-surface-strong: rgba(19, 27, 56, 0.86);
    --color-border: rgba(120, 145, 255, 0.24);
    --color-border-strong: rgba(255, 198, 100, 0.58);
    --color-text-primary: #f5f7ff;
    --color-text-secondary: #c9d5ff;
    --color-text-muted: #9aa7d1;
    --color-accent: #ff914d;
    --color-accent-strong: #ff5f73;
    --color-accent-soft: rgba(255, 145, 77, 0.18);
    --color-accent-alt: #6f7bff;
    --color-glow: rgba(111, 123, 255, 0.22);
    --shadow-lg: 0 32px 72px rgba(5, 8, 22, 0.65);
    --shadow-md: 0 20px 50px rgba(7, 11, 31, 0.5);
    --shadow-sm: 0 12px 32px rgba(5, 8, 22, 0.4);
}

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

/* Prevent horizontal overflow globally */
* {
    max-width: 100%;
}

img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background: linear-gradient(180deg, 
        var(--color-bg-850) 0%, 
        rgba(255, 255, 255, 0.8) 30%,
        rgba(248, 249, 255, 0.6) 60%,
        rgba(255, 255, 255, 0.4) 85%,
        rgba(248, 249, 255, 0.2) 100%);
    color: var(--color-text-primary);
    line-height: 1.75;
    letter-spacing: -0.01em;
    min-height: 100vh;
    overflow-x: hidden;
    font-weight: 400;
    direction: rtl;
    text-align: right;
    width: 100%;
    max-width: 100vw;
}

body.menu-open {
    overflow: hidden !important;
}

::selection {
    background: rgba(255, 160, 120, 0.45);
    color: #1b1f33;
}

/* ========================================
   TYPOGRAPHY
======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text-primary);
    margin: 0;
    letter-spacing: -0.01em;
    font-weight: 700;
    line-height: 1.3;
}

h1 { 
    font-size: clamp(2rem, 5vw, 3.5rem); 
    line-height: 1.2;
    margin-bottom: 0.5rem;
}
h2 { font-size: clamp(1.75rem, 4vw, 2.625rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h5 { font-size: clamp(1.125rem, 2vw, 1.25rem); }
h6 { font-size: clamp(1rem, 1.5vw, 1.125rem); }

p {
    color: var(--color-text-secondary);
    margin: 0 0 var(--space-md);
    text-align: justify;
    line-height: 1.8;
}

/* ========================================
   MEDIA ELEMENTS
======================================== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   LINKS
======================================== */
a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-normal);
}

a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========================================
   FORM ELEMENTS
======================================== */
button,
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

/* ========================================
   GLOBAL STYLES
======================================== */

/* Remove focus outline for all interactive elements */
*:focus,
*:focus-visible,
button:focus,
button:focus-visible,
a:focus,
a:focus-visible,
input:focus,
textarea:focus,
select:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Remove default button and link focus styles */
button,
a,
input,
textarea,
select,
.nav-toggle-floating,
.brand-floating,
.theme-toggle-mobile,
.mobile-menu-close,
.mobile-nav-link {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-focus-ring-color: transparent !important;
    outline: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Specific focus removal for mobile elements */
.nav-toggle-floating:focus,
.nav-toggle-floating:active,
.brand-floating:focus,
.brand-floating:active,
.theme-toggle-mobile:focus,
.theme-toggle-mobile:active,
.mobile-menu-close:focus,
.mobile-menu-close:active,
.mobile-nav-link:focus,
.mobile-nav-link:active,
.nav-toggle:focus,
.nav-toggle:active,
.theme-toggle:focus,
.theme-toggle:active,
.nav-links a:focus,
.nav-links a:active,
.btn:focus,
.btn:active {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Remove blue highlight on touch devices */
* {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow text selection for content elements */
p, h1, h2, h3, h4, h5, h6, span, div, li, td, th {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* ========================================
   ICON FIXES
======================================== */
i[class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 5 Free", "Font Awesome 5 Pro", sans-serif !important;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure solid icons work */
.fa-solid {
    font-weight: 900;
}

.fa-regular {
    font-weight: 400;
}

.fa-light {
    font-weight: 300;
}

.fa-brands {
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands" !important;
    font-weight: 400;
}

/* ========================================
   LAYOUT COMPONENTS
======================================== */
.container {
    width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    max-width: 100%;
    box-sizing: border-box;
}

.section {
    padding: var(--space-2xl) 0;
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.section + .section {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.section:target {
    animation: section-focus 1.2s ease;
}

@keyframes section-focus {
    0% {
        box-shadow: 0 0 0 rgba(93, 109, 255, 0.0);
        transform: translateY(0);
    }
    40% {
        box-shadow: 0 24px 70px rgba(93, 109, 255, 0.22);
        transform: translateY(-4px);
    }
    100% {
        box-shadow: none;
        transform: translateY(0);
    }
}

/* ========================================
   UTILITY CLASSES
======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Main content wrapper */
main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* ========================================
   SECTION COMPONENTS
======================================== */
.section-heading {
    margin-bottom: var(--space-xl);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm) var(--space-lg);
    text-align: center;
}

.section-heading h2 {
    font-size: clamp(1.875rem, 4vw, 2.625rem);
    line-height: 1.2;
    flex: 1;
    min-width: 100%;
}

.section-heading p {
    margin: 0;
    color: var(--color-text-muted);
    max-width: 420px;
    width: 100%;
    text-align: center;
}

.section-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: linear-gradient(135deg, rgba(255, 178, 141, 0.32), rgba(121, 132, 255, 0.28));
    box-shadow: 0 18px 44px rgba(93, 109, 255, 0.16);
    -webkit-backdrop-filter: blur(var(--blur-sm));
    backdrop-filter: blur(var(--blur-sm));
    border: 1px solid rgba(125, 138, 210, 0.2);
    margin: 0 auto var(--space-sm);
}

.section-icon i {
    color: var(--color-accent);
}

/* ========================================
   BUTTON COMPONENTS
======================================== */
.btn,
.btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    border-radius: 999px;
    padding: 16px 30px;
    letter-spacing: -0.01em;
    transition: transform var(--transition-slow), 
                box-shadow var(--transition-slow), 
                background var(--transition-slow);
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    white-space: nowrap;
}

.btn:focus-visible,
.btn-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 145, 77, 0.25);
    transform: translateY(-2px);
}

/* Primary Button */
.btn.primary {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-strong) 100%);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.btn.primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 60px rgba(243, 75, 124, 0.32);
}

/* Ghost Button */
.btn.ghost {
    border: 1px solid rgba(116, 132, 212, 0.35);
    color: var(--color-text-primary);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: var(--shadow-sm);
    font-size: 14px;
    padding: 12px 24px;
    min-width: 140px;
}

.btn.ghost:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

/* Link Button */
.btn-link {
    padding: 0 0 8px;
    color: var(--color-accent-alt);
    position: relative;
    font-weight: 600;
    background: none;
    border-radius: 0;
}

.btn-link::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 2px;
    background: currentColor;
    transform: scaleX(0.5);
    transform-origin: right;
    transition: transform var(--transition-slow);
}

.btn-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ========================================
   HEADER SECTION
======================================== */
.site-header {
    padding: clamp(4rem, 10vw, 8rem) 0 clamp(6rem, 12vw, 8.5rem);
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
    background: radial-gradient(circle at 20% -15%, rgba(255, 198, 164, 0.4), transparent 45%),
        radial-gradient(circle at 85% 5%, rgba(157, 168, 255, 0.35), transparent 50%),
        linear-gradient(145deg, var(--color-bg-850) 0%, #ffffff 68%);
    transition: padding 0.3s ease, background 0.3s ease;
    will-change: padding, background;
    transform: translateZ(0);
}

.site-header.scrolled {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.site-header::after {
    content: "";
    position: absolute;
    inset: -30%;
    background: radial-gradient(circle, rgba(157, 168, 255, 0.22), transparent 70%);
    filter: blur(var(--blur-lg));
    opacity: 0.7;
    z-index: 0;
}

.site-header > .container {
    position: relative;
    z-index: 1;
}

/* Navigation */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    position: relative;
    z-index: 10;
    gap: 32px;
}

.brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(116, 132, 212, 0.25);
    box-shadow: var(--shadow-sm);
    font-family: var(--font-brand);
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    letter-spacing: 0.02em;
    color: var(--color-text-primary);
    transition: transform var(--transition-slow), 
                box-shadow var(--transition-slow), 
                background var(--transition-slow);
    text-decoration: none;
    font-weight: 700;
    min-width: 120px;
    text-align: center;
    white-space: nowrap;
    line-height: 1.2;
}

.brand:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

.nav-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}


/* Navigation Links */
.nav-links {
    list-style: none;
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    align-items: center;
    pointer-events: auto;
    flex: 1;
    justify-content: center;
}

.nav-links li {
    display: inline-flex;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--color-text-primary);
    padding: 10px 18px;
    position: relative;
    transition: all 0.3s ease;
    text-decoration: none;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(125, 138, 210, 0.25);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 12px rgba(39, 52, 102, 0.1);
    font-size: 14px;
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
}

.nav-links a:focus-visible {
    outline: none;
    color: var(--color-text-primary);
}

.nav-links a::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-alt));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-slow);
    border-radius: 999px;
}

.nav-links a:hover {
    color: var(--color-accent);
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--color-accent);
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 20px rgba(39, 52, 102, 0.2);
}

.nav-links a:active {
    transform: translateY(0) scale(1);
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(116, 132, 212, 0.35);
    background: rgba(255, 255, 255, 0.85);
    position: relative;
    cursor: pointer;
    transition: transform var(--transition-normal), 
                background var(--transition-normal);
    z-index: 23;
}

.nav-toggle::before,
.nav-toggle::after {
    content: "";
    width: 20px;
    height: 2px;
    background: var(--color-text-primary);
    position: absolute;
    inset-inline-start: 13px;
    transition: transform var(--transition-normal);
}

.nav-toggle::before {
    top: 15px;
}

.nav-toggle::after {
    bottom: 15px;
}

.nav-toggle.active::before {
    transform: translateY(4px) rotate(45deg);
}

.nav-toggle.active::after {
    transform: translateY(-4px) rotate(-45deg);
}

/* Theme Toggle */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid rgba(116, 132, 212, 0.35);
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-text-primary);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    transition: transform var(--transition-normal), 
                background var(--transition-normal), 
                color var(--transition-normal);
    font-size: 14px;
    min-width: 80px;
    justify-content: center;
}

.theme-toggle i {
    font-size: 18px;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.95);
}

/* Navigation Animation */
@keyframes navItemSlide {
    0% {
        opacity: 0;
        transform: translateX(-18px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   HERO SECTION
======================================== */
.hero {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(3rem, 6vw, 4.75rem);
    align-items: center;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin-top: clamp(2rem, 4vw, 3rem);
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2.5vw, 1.5rem);
    align-items: flex-start;
    text-align: right;
}

/* Hero Components */
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 227, 213, 0.7);
    border: 1px solid rgba(255, 155, 120, 0.35);
    color: var(--color-accent);
    font-size: 0.875rem;
    letter-spacing: 0.12em;
    font-weight: 600;
    margin-block-start: 0;
    margin-bottom: 0.5rem;
}

.hero-eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 12px currentColor;
}

.hero-name {
    display: none;
}

.hero-text p {
    font-size: clamp(1.125rem, 2.2vw, 1.25rem);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
    max-width: 60ch;
    line-height: 1.8;
}

.hero-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: var(--space-sm);
}

.hero-tags span {
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(93, 109, 255, 0.15);
    border: 1px solid rgba(93, 109, 255, 0.25);
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: var(--space-sm);
}

.hero-highlights {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    list-style: none;
    padding: 0;
    margin: 0;
}

.hero-highlights li {
    padding: 18px 22px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(125, 138, 210, 0.12);
    -webkit-backdrop-filter: blur(var(--blur-sm));
    backdrop-filter: blur(var(--blur-sm));
    color: var(--color-text-muted);
    box-shadow: var(--shadow-md);
    min-height: 8rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.hero-metric {
    display: block;
    font-size: clamp(1.75rem, 3.6vw, 2.375rem);
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.2;
}

.hero-metric-label {
    display: block;
    margin-top: 6px;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

/* Hero Visual Section */
.hero-visual {
    position: relative;
    display: grid;
    gap: var(--space-sm);
    justify-items: center;
    align-items: center;
}

.hero-wordmark {
    display: block;
    margin: var(--space-sm) auto 0;
    max-width: clamp(11rem, 28vw, 18rem);
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
    transition: filter 0.3s ease;
}

.hero-wordmark:hover {
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.25));
}

/* Profile Frame */
.profile-frame {
    position: relative;
    padding: 20px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(125, 138, 210, 0.2);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.profile-frame::before {
    content: "";
    position: absolute;
    inset: -45% -20% 30% -20%;
    background: linear-gradient(135deg, rgba(255, 178, 141, 0.35), transparent 70%);
    opacity: 0.6;
    z-index: 0;
}

.profile-frame img {
    position: relative;
    border-radius: calc(var(--radius-xl) - 20px);
    filter: saturate(1.1) contrast(1.05);
    z-index: 1;
    width: 100%;
    height: auto;
}

.halo {
    position: absolute;
    inset: -25% -10% 10% -10%;
    background: radial-gradient(circle, rgba(111, 123, 255, 0.18), transparent 65%);
    filter: blur(20px);
    z-index: -1;
}

/* ========================================
   CARD COMPONENTS
======================================== */
.about-card {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(125, 138, 210, 0.16);
    box-shadow: var(--shadow-md);
    -webkit-backdrop-filter: blur(var(--blur-sm));
    backdrop-filter: blur(var(--blur-sm));
}

.about-card p {
    margin: 0;
    line-height: 1.8;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-lg);
    color: var(--color-text-secondary);
}

.signature-card {
    margin-top: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    position: relative;
    overflow: hidden;
    -webkit-backdrop-filter: blur(var(--blur-sm));
    backdrop-filter: blur(var(--blur-sm));
    box-shadow: var(--shadow-md);
}

.signature-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 20px;
    inset-block: 18px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--color-accent), var(--color-accent-alt));
}

.signature-card p {
    font-style: italic;
    margin-inline-start: 2px;
    margin-bottom: var(--space-sm);
}

.signature {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--color-accent);
    margin-inline-start: 2px;
}

.signature::before {
    content: "";
    width: 22px;
    height: 1px;
    background: currentColor;
    opacity: 0.6;
}

/* ========================================
   SECTION BACKGROUNDS
======================================== */

/* Section spacing - no gaps between sections */
section {
    padding: clamp(60px, 8vw, 120px) 0;
    margin: 0;
    position: relative;
}
.research {
    position: relative;
    overflow: hidden;
    background: linear-gradient(155deg, 
        rgba(247, 248, 255, 0.4) 0%, 
        rgba(255, 255, 255, 0.2) 30%,
        rgba(254, 246, 243, 0.3) 70%,
        rgba(255, 255, 255, 0.1) 100%);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.research::before,
.research::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(var(--blur-lg));
    z-index: 0;
}

.research::before {
    width: 26.25rem;
    height: 26.25rem;
    top: -10rem;
    inset-inline-end: -7.5rem;
    background: rgba(255, 178, 141, 0.3);
}

.research::after {
    width: 20rem;
    height: 20rem;
    bottom: -8.75rem;
    inset-inline-start: -6.25rem;
    background: rgba(121, 132, 255, 0.25);
}

.research > .container {
    position: relative;
    z-index: 1;
}

/* Grid Layouts */
.research-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-lg);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Research Cards */
.research-card {
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(125, 138, 210, 0.18);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    color: var(--color-text-secondary);
    position: relative;
    overflow: hidden;
    -webkit-backdrop-filter: blur(var(--blur-sm));
    backdrop-filter: blur(var(--blur-sm));
    transition: transform var(--transition-slow), 
                border var(--transition-slow), 
                box-shadow var(--transition-slow);
}

.research-card > * {
    position: relative;
    z-index: 1;
}

.research-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(150deg, rgba(255, 178, 141, 0.35), rgba(111, 123, 255, 0.25));
    opacity: 0;
    transition: opacity var(--transition-slow);
    z-index: 0;
    border-radius: var(--radius-lg);
}

.research-card:hover {
    transform: translateY(-12px);
    border-color: var(--color-border-strong);
    box-shadow: 0 30px 70px rgba(73, 86, 152, 0.28);
}

.research-card:hover::after {
    opacity: 0.9;
}

/* Card Elements */
.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(255, 178, 141, 0.3), rgba(121, 132, 255, 0.35));
    border: 1px solid rgba(125, 138, 210, 0.25);
    box-shadow: var(--shadow-sm);
    font-size: 26px;
    color: var(--color-accent);
    margin-bottom: var(--space-sm);
}

.card-link {
    color: var(--color-accent-alt);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: var(--space-sm);
    position: relative;
    text-decoration: none;
    transition: color var(--transition-normal);
}

.card-link::after {
    content: "\f061";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 13px;
    transition: transform var(--transition-normal);
}

.card-link:hover::after {
    transform: translateX(-4px);
}

/* Card Focus States */
.research-card:focus-within,
.news-card:focus-within,
.teaching-card:focus-within {
    outline: none;
    border-color: var(--color-border-strong);
    box-shadow: 0 36px 74px rgba(6, 10, 28, 0.42);
    transform: translateY(-10px);
}

/* Feature Lists */
.feature-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
    color: var(--color-text-secondary);
}

.feature-list li {
    position: relative;
    padding-inline-start: 20px;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.feature-list li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 11px;
    color: var(--color-accent);
    position: absolute;
    inset-inline-start: 0;
    top: 4px;
}

.publications {
    position: relative;
    background: linear-gradient(160deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        rgba(246, 248, 255, 0.4) 30%,
        rgba(255, 242, 238, 0.3) 70%,
        rgba(255, 255, 255, 0.2) 100%);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.publications::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(121, 132, 255, 0.2), transparent 60%);
    opacity: 0.6;
}

.publications > .container {
    position: relative;
    z-index: 1;
}

.timeline {
    display: grid;
    gap: var(--space-lg);
    padding-inline-start: var(--space-lg);
    border-inline-start: 1px dashed rgba(125, 138, 210, 0.25);
}

.timeline-item {
    position: relative;
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(125, 138, 210, 0.18);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    color: var(--color-text-secondary);
    box-shadow: 0 24px 60px rgba(56, 64, 112, 0.16);
}

.timeline-item::before {
    content: "";
    position: absolute;
    inset-inline-start: -39px;
    top: 28px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-alt));
    box-shadow: 0 0 0 8px rgba(255, 178, 141, 0.18);
}

.timeline-year {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
}

.timeline-year::before {
    content: "\f133";
    font-family: "Font Awesome 6 Free";
    font-weight: 400;
    font-size: 16px;
    color: var(--color-accent-alt);
}

.teaching {
    position: relative;
    background: linear-gradient(150deg, 
        rgba(253, 241, 238, 0.3) 0%, 
        rgba(255, 255, 255, 0.2) 40%,
        rgba(244, 246, 255, 0.4) 80%,
        rgba(255, 255, 255, 0.1) 100%);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.teaching::before {
    content: "";
    position: absolute;
    width: 480px;
    height: 480px;
    top: -220px;
    inset-inline-start: 40%;
    background: rgba(255, 178, 141, 0.22);
    filter: blur(90px);
}

.teaching > .container {
    position: relative;
    z-index: 1;
}

.teaching-grid {
    display: grid;
    gap: var(--space-lg);
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.teaching-card {
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(125, 138, 210, 0.18);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    color: var(--color-text-secondary);
    position: relative;
    overflow: hidden;
    -webkit-backdrop-filter: blur(var(--blur-sm));
    backdrop-filter: blur(var(--blur-sm));
    transition: transform var(--transition-slow), 
                border var(--transition-slow), 
                box-shadow var(--transition-slow);
}

.teaching-card > * {
    position: relative;
    z-index: 1;
}

.aparat-card {
    background: linear-gradient(160deg, rgba(255, 237, 240, 0.95) 0%, rgba(255, 255, 255, 0.92) 60%);
    border-color: rgba(255, 114, 149, 0.45);
    box-shadow: 0 28px 64px rgba(255, 114, 149, 0.22);
}

.aparat-card .card-link {
    color: #f34075;
}

.teaching-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(155deg, rgba(111, 123, 255, 0.28), rgba(255, 178, 141, 0.28));
    opacity: 0;
    transition: opacity var(--transition-slow);
    z-index: 0;
    border-radius: var(--radius-lg);
}

.teaching-card:hover {
    transform: translateY(-10px);
    border-color: rgba(111, 123, 255, 0.45);
    box-shadow: 0 32px 70px rgba(73, 86, 152, 0.26);
}

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

.teaching-meta {
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(73, 86, 152, 0.55);
}

.news {
    position: relative;
    background: linear-gradient(175deg, 
        rgba(244, 246, 255, 0.4) 0%, 
        rgba(255, 255, 255, 0.2) 35%,
        rgba(255, 244, 236, 0.3) 75%,
        rgba(255, 255, 255, 0.1) 100%);
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
}

.news::before {
    content: "";
    position: absolute;
    inset-inline: 20% 10%;
    inset-block-start: -140px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 178, 141, 0.22), transparent 65%);
    filter: blur(65px);
}

.news > .container {
    position: relative;
    z-index: 1;
}

.news-grid {
    display: grid;
    gap: var(--space-lg);
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.news-card {
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(125, 138, 210, 0.18);
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
    color: var(--color-text-secondary);
    -webkit-backdrop-filter: blur(var(--blur-sm));
    backdrop-filter: blur(var(--blur-sm));
    transition: transform var(--transition-slow), 
                border var(--transition-slow), 
                box-shadow var(--transition-slow);
}

.news-card > * {
    position: relative;
    z-index: 1;
}

.news-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(150deg, rgba(255, 178, 141, 0.32), rgba(111, 123, 255, 0.22));
    opacity: 0;
    transition: opacity var(--transition-slow);
    z-index: 0;
    border-radius: var(--radius-lg);
}

.news-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-border-strong);
    box-shadow: 0 32px 74px rgba(73, 86, 152, 0.3);
}

.news-card:hover::before {
    opacity: 0.95;
}

.news-date {
display: inline-flex;
align-items: center;
gap: 8px;
font-weight: 600;
color: var(--color-accent);
}

.news-date::before {
content: "\f017";
font-family: "Font Awesome 6 Free";
font-weight: 400;
font-size: 14px;
color: var(--color-accent-alt);
}

/* Contact Section */
.about {
    position: relative;
    background: linear-gradient(155deg, 
        rgba(247, 248, 255, 0.3) 0%, 
        rgba(255, 255, 255, 0.2) 40%,
        rgba(254, 246, 243, 0.3) 80%,
        rgba(255, 255, 255, 0.1) 100%);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.contact {
    position: relative;
    background: linear-gradient(165deg, 
        rgba(248, 249, 255, 0.3) 0%, 
        rgba(255, 255, 255, 0.2) 30%,
        rgba(255, 242, 238, 0.3) 70%,
        rgba(255, 255, 255, 0.1) 100%);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    overflow: hidden;
}

.contact::before {
    content: "";
    position: absolute;
    width: 25rem;
    height: 25rem;
    top: -9.375rem;
    right: -6.25rem;
    background: rgba(255, 178, 141, 0.25);
    border-radius: 50%;
    filter: blur(5rem);
    z-index: 0;
}

.contact::after {
    content: "";
    position: absolute;
    width: 18.75rem;
    height: 18.75rem;
    bottom: -6.25rem;
    left: -5rem;
    background: rgba(121, 132, 255, 0.2);
    border-radius: 50%;
    filter: blur(3.75rem);
    z-index: 0;
}

.contact > .container {
    position: relative;
    z-index: 1;
}

.contact-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(32px, 8vw, 62px);
    padding: clamp(36px, 7vw, 68px);
    border-radius: var(--radius-xl);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 255, 0.96) 100%);
    border: 1px solid rgba(125, 138, 210, 0.25);
    -webkit-backdrop-filter: blur(var(--blur-md));
    backdrop-filter: blur(var(--blur-md));
    box-shadow: 0 32px 80px rgba(39, 52, 102, 0.15);
    position: relative;
    overflow: hidden;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    position: relative;
    z-index: 1;
}

.contact-details {
    display: grid;
    gap: var(--space-sm);
}

.contact-details .label {
display: block;
font-size: 12px;
letter-spacing: 0.22em;
text-transform: uppercase;
color: rgba(73, 86, 152, 0.52);
margin-bottom: 6px;
}

.contact-details a,
.contact-details p {
color: var(--color-text-primary);
margin: 0;
}

.social-links {
display: flex;
flex-wrap: wrap;
gap: var(--space-sm);
}

.social-link {
position: relative;
padding: 10px 20px;
border-radius: 999px;
border: 1px solid rgba(125, 138, 210, 0.22);
color: rgba(47, 58, 110, 0.85);
font-weight: 500;
overflow: hidden;
transition: transform 0.35s ease, color 0.35s ease;
display: inline-flex;
align-items: center;
gap: 10px;
}

.social-link::after {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(135deg, rgba(255, 178, 141, 0.35), rgba(121, 132, 255, 0.25));
opacity: 0;
transition: opacity 0.35s ease;
}

.social-link > * {
position: relative;
z-index: 1;
    z-index: 1;
}

.social-link i {
    font-size: 20px;
}

.social-link:hover {
    color: var(--color-text-primary);
    transform: translateY(-3px);
}

.social-link:hover::after {
    opacity: 1;
}

.social-link.aparat {
    border-color: rgba(255, 114, 149, 0.5);
    color: #f34075;
}

.social-link.aparat:hover {
    color: #ba1f58;
}

.icon-aparat {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(140deg, #ff3153, #ff7a8f);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.icon-aparat::before,
.icon-aparat::after {
    content: "";
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
}

.icon-aparat::before {
    width: 16px;
    height: 16px;
}

.icon-aparat::after {
    width: 8px;
    height: 8px;
}

.contact-highlights {
    margin: var(--space-sm) 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
    color: rgba(73, 86, 152, 0.85);
}

.contact-highlights li {
    position: relative;
    padding-inline-start: 20px;
    font-size: 15px;
}

.contact-highlights li::before {
    content: "\f0a1";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 12px;
    color: var(--color-accent);
    position: absolute;
    inset-inline-start: 0;
    top: 2px;
}

.site-footer {
    padding: var(--space-md) 0;
    background: linear-gradient(180deg, 
        rgba(246, 247, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.1) 100%);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    color: rgba(47, 58, 110, 0.66);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset-inline: 18%;
    inset-block-start: -60px;
    height: 120px;
    background: radial-gradient(circle, rgba(121, 132, 255, 0.18), transparent 70%);
    filter: blur(40px);
}

.site-footer > .container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.footer-meta {
    color: rgba(47, 58, 110, 0.46);
}

@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

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

    .hero-name {
        margin-inline: auto;
    }

    .hero-eyebrow {
        align-self: center;
    }

    .hero-actions,
    .hero-highlights {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .about-grid,
    .research-grid,
    .teaching-grid,
    .news-grid,
    .contact-card {
        grid-template-columns: 1fr;
    }

    .timeline {
        border: none;
        padding-inline-start: 0;
    }

    .timeline-item {
        padding-inline-start: var(--space-md);
    }

    .timeline-year {
        position: static;
        display: block;
        margin-bottom: var(--space-xs);
    }

    .timeline-item::before {
        display: none;
    }
}

@media (max-width: 768px) {
    .top-nav {
        position: relative;
        justify-content: space-between;
        gap: 12px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-actions {
        display: none;
    }

    .nav-links {
        z-index: 20;
        position: fixed;
        inset: 0;
        padding: 110px 28px 48px;
        background: linear-gradient(160deg, rgba(244, 246, 255, 0.96) 0%, rgba(255, 241, 236, 0.96) 45%, rgba(255, 255, 255, 0.95) 100%);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
        flex-direction: column;
        align-items: flex-start;
        text-align: right;
        gap: 18px;
        transform: translateX(-100%);
        transition: transform 0.45s cubic-bezier(0.63, 0.01, 0.22, 1);
        pointer-events: none;
    }

    .nav-links.open {
        transform: translateX(0);
        pointer-events: auto;
    }

    .nav-links li {
        width: 100%;
        justify-content: flex-start;
        opacity: 0;
    }

    .nav-links.open li {
        animation: navItemSlide 0.45s ease forwards;
    }

    .nav-links.open li:nth-child(1) {
        animation-delay: 0.05s;
    }

    .nav-links.open li:nth-child(2) {
        animation-delay: 0.1s;
    }

    .nav-links.open li:nth-child(3) {
        animation-delay: 0.15s;
    }

    .nav-links.open li:nth-child(4) {
        animation-delay: 0.2s;
    }

    .nav-links.open li:nth-child(5) {
        animation-delay: 0.25s;
    }

    .nav-links.open li:nth-child(6) {
        animation-delay: 0.3s;
    }

    .nav-links-cta {
        display: block;
        margin-top: 18px;
    }

    .nav-links-cta .btn {
        width: 100%;
        justify-content: center;
    }

    body.menu-open .nav-toggle {
        position: fixed;
        inset-inline-start: 20px;
        top: 26px;
    }

    .hero-highlights {
        align-items: center;
        justify-content: center;
    }

    .hero-tags {
        justify-content: center;
    }

    .contact-card {
        padding: 28px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .btn,
    .btn-link {
        width: 100%;
    }

    .research-card,
    .news-card,
    .teaching-card {
        padding: 24px;
    }

    .contact-card {
        border-radius: 20px;
    }

    .hero-eyebrow {
        font-size: 12px;
        padding: 6px 14px;
        letter-spacing: 0.08em;
        margin-block-start: 0;
        margin-bottom: 1rem;
    }

    .hero-name {
        max-width: 280px;
    }
}

body[data-theme="dark"] .nav-links {
    background: linear-gradient(150deg, rgba(7, 12, 28, 0.93) 0%, rgba(9, 14, 30, 0.9) 100%);
}

body[data-theme="dark"] .nav-links.open li {
    color: var(--color-text-primary);
}

body[data-theme="dark"] .site-header {
    background: radial-gradient(circle at 18% -10%, rgba(255, 145, 77, 0.28), transparent 48%),
        radial-gradient(circle at 82% 0%, rgba(111, 123, 255, 0.32), transparent 40%),
        linear-gradient(160deg, rgba(6, 9, 26, 0.95) 0%, rgba(10, 15, 36, 0.8) 100%);
}

body[data-theme="dark"] .site-header::after {
    background: radial-gradient(circle, rgba(111, 123, 255, 0.18), transparent 65%);
    opacity: 0.9;
}

body[data-theme="dark"] .brand,
body[data-theme="dark"] .theme-toggle,
body[data-theme="dark"] .nav-toggle {
    background: rgba(9, 12, 26, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

body[data-theme="dark"] .nav-links a {
    background: rgba(10, 16, 34, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--color-text-primary);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .nav-links a:hover {
    background: rgba(10, 16, 34, 0.95);
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body[data-theme="dark"] .btn.ghost {
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: var(--color-text-primary);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 18px 45px rgba(9, 12, 26, 0.35);
}

body[data-theme="dark"] .hero-tags span {
    background: rgba(111, 123, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .hero-eyebrow {
    background: rgba(9, 12, 26, 0.8);
    border: 1px solid rgba(111, 123, 255, 0.35);
    color: var(--color-accent-alt);
}

body[data-theme="dark"] .hero-highlights li {
    background: rgba(14, 18, 36, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--color-text-muted);
    box-shadow: 0 18px 40px rgba(6, 10, 28, 0.38);
}

body[data-theme="dark"] .profile-frame {
    background: rgba(9, 12, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .profile-frame::before {
    background: linear-gradient(135deg, rgba(255, 145, 77, 0.25), transparent);
}

/* Dark theme section backgrounds */
body[data-theme="dark"] .about {
    background: linear-gradient(155deg, 
        rgba(7, 11, 28, 0.4) 0%, 
        rgba(9, 15, 36, 0.3) 40%,
        rgba(6, 10, 24, 0.4) 80%,
        rgba(8, 12, 30, 0.2) 100%);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

body[data-theme="dark"] .research,
body[data-theme="dark"] .publications,
body[data-theme="dark"] .teaching,
body[data-theme="dark"] .news,
body[data-theme="dark"] .contact {
    background: none;
}

body[data-theme="dark"] .research {
    background: linear-gradient(155deg, rgba(7, 11, 28, 0.96) 0%, rgba(9, 15, 36, 0.8) 100%);
}

body[data-theme="dark"] .publications {
    background: linear-gradient(160deg, rgba(6, 9, 26, 0.96) 0%, rgba(15, 18, 38, 0.8) 100%);
}

body[data-theme="dark"] .teaching {
    background: linear-gradient(150deg, rgba(7, 12, 28, 0.92) 0%, rgba(12, 18, 38, 0.78) 100%);
}

body[data-theme="dark"] .news {
    background: linear-gradient(175deg, rgba(6, 10, 24, 0.95) 0%, rgba(9, 14, 30, 0.72) 100%);
}

body[data-theme="dark"] .contact {
    background: linear-gradient(165deg, 
        rgba(6, 9, 26, 0.98) 0%, 
        rgba(7, 11, 28, 0.95) 50%, 
        rgba(8, 12, 30, 0.97) 100%);
}

body[data-theme="dark"] .contact::before {
    background: rgba(255, 145, 77, 0.15);
}

body[data-theme="dark"] .contact::after {
    background: rgba(111, 123, 255, 0.12);
}

body[data-theme="dark"] .research-card,
body[data-theme="dark"] .teaching-card,
body[data-theme="dark"] .news-card,
body[data-theme="dark"] .timeline-item,
body[data-theme="dark"] .contact-card,
body[data-theme="dark"] .about-card {
    background: linear-gradient(150deg, 
        rgba(10, 16, 34, 0.95) 0%, 
        rgba(12, 18, 36, 0.92) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
}

/* Fix SVG logo color and glow in dark theme */
body[data-theme="dark"] .hero-wordmark {
    filter: brightness(0) invert(1) drop-shadow(0 4px 16px rgba(255, 255, 255, 0.3));
}

body[data-theme="dark"] .hero-wordmark:hover {
    filter: brightness(0) invert(1) drop-shadow(0 6px 24px rgba(255, 255, 255, 0.5));
}

body[data-theme="dark"] .contact-card::after {
    background: linear-gradient(140deg, 
        rgba(111, 123, 255, 0.25) 0%, 
        rgba(255, 145, 77, 0.15) 50%, 
        transparent 100%);
    opacity: 0.8;
}

body[data-theme="dark"] label,
body[data-theme="dark"] .form-note,
body[data-theme="dark"] .contact-details .label {
    color: rgba(255, 255, 255, 0.7);
}

body[data-theme="dark"] input,
body[data-theme="dark"] textarea {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(5, 9, 24, 0.72);
    color: var(--color-text-primary);
}

body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

body[data-theme="dark"] input:focus,
body[data-theme="dark"] textarea:focus {
    background: rgba(5, 9, 24, 0.85);
}

body[data-theme="dark"] .site-footer {
    background: linear-gradient(180deg, rgba(3, 4, 12, 0.92) 0%, rgba(4, 6, 16, 0.96) 100%);
    color: rgba(255, 255, 255, 0.6);
}

body[data-theme="dark"] .footer-meta {
    color: rgba(255, 255, 255, 0.42);
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

/* Large Tablets and Small Desktops */
@media (max-width: 992px) {
    :root {
        --container-width: min(1180px, 95%);
        --container-padding: clamp(20px, 5vw, 40px);
    }
    
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: clamp(2rem, 5vw, 3rem);
    }

    .hero-text {
        align-items: center;
        text-align: center;
        order: 2;
    }

    .hero-text p {
        text-align: center;
        max-width: 70ch;
    }

    .hero-visual {
        order: 1;
        margin-bottom: var(--space-lg);
    }

    .hero-wordmark {
        max-width: clamp(14rem, 35vw, 20rem);
        margin: var(--space-sm) auto 0;
    }

    .hero-eyebrow {
        align-self: center;
    }

    .hero-actions,
    .hero-highlights {
        justify-content: center;
    }

    .hero-tags {
        justify-content: center;
    }

    /* Grid Adjustments */
    .about-grid,
    .research-grid,
    .teaching-grid,
    .news-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

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

    .contact-card {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
        padding: clamp(2rem, 6vw, 3rem);
    }

    /* Timeline Adjustments */
    .timeline {
        border: none;
        padding-inline-start: 0;
    }

    .timeline-item {
        padding-inline-start: var(--space-md);
    }

    .timeline-item::before {
        display: none;
    }

    .timeline-year {
        position: static;
        display: block;
        margin-bottom: var(--space-xs);
    }

    /* Section Heading Adjustments */
    .section-heading {
        text-align: center;
        flex-direction: column;
        align-items: center;
    }

    .section-heading h2,
    .section-heading p {
        text-align: center;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .site-header {
        padding-top: 80px;
    }

    .top-nav {
        position: relative;
        justify-content: center;
        gap: 12px;
        margin-bottom: clamp(2rem, 5vw, 3rem);
    }

    /* Hide original brand and nav-toggle in nav */
    .top-nav .brand,
    .top-nav .nav-toggle {
        display: none;
    }

    .nav-actions {
        display: none;
    }

    /* Hide desktop theme toggle on mobile */
    .nav-actions .theme-toggle {
        display: none;
    }
}

/* ========================================
   INDEPENDENT MOBILE MENU
======================================== */

/* Menu animations */
@keyframes menuSlideIn {
    0% {
        opacity: 0;
        transform: scale(1.05);
        -webkit-backdrop-filter: blur(0px);
        backdrop-filter: blur(0px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        -webkit-backdrop-filter: blur(25px);
        backdrop-filter: blur(25px);
    }
}

@keyframes menuSlideOut {
    0% {
        opacity: 1;
        transform: scale(1);
        -webkit-backdrop-filter: blur(25px);
        backdrop-filter: blur(25px);
    }
    100% {
        opacity: 0;
        transform: scale(1.05);
        -webkit-backdrop-filter: blur(0px);
        backdrop-filter: blur(0px);
    }
}
/* Mobile menu - force display */
.mobile-menu-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: linear-gradient(160deg, 
        rgba(244, 246, 255, 0.95) 0%, 
        rgba(255, 241, 236, 0.95) 45%, 
        rgba(255, 255, 255, 0.94) 100%) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    backdrop-filter: blur(25px) !important;
    z-index: 99999 !important;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.05);
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                visibility 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: none;
    align-items: center !important;
    justify-content: center !important;
}

.mobile-menu-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(1) !important;
    display: flex !important;
    animation: menuSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.mobile-menu-overlay.closing {
    animation: menuSlideOut 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.mobile-menu-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(125, 138, 210, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100000;
    opacity: 0;
    transform: scale(0.8) rotate(-90deg);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.mobile-menu-overlay.active .mobile-menu-close {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    transition-delay: 0.2s;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1) rotate(0deg) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.mobile-menu-close i {
    font-size: 20px;
    color: var(--color-text-primary);
}

.mobile-menu-content {
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: scale(1);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    text-align: center;
}

.mobile-nav-link {
    display: block;
    padding: 16px 32px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    text-decoration: none;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(125, 138, 210, 0.2);
    min-width: 200px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: translateY(30px) scale(0.9);
    opacity: 0;
}

.mobile-menu-overlay.active .mobile-nav-link {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Staggered animation delays */
.mobile-nav-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-nav-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-nav-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-nav-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-nav-link:nth-child(5) { transition-delay: 0.25s; }
.mobile-nav-link:nth-child(6) { transition-delay: 0.3s; }

@media (max-width: 768px) {
}

/* Dark theme for independent mobile menu */
body[data-theme="dark"] .mobile-menu-overlay {
    background: linear-gradient(160deg, 
        rgba(7, 12, 28, 0.95) 0%, 
        rgba(9, 14, 30, 0.95) 45%, 
        rgba(6, 10, 24, 0.94) 100%) !important;
}

body[data-theme="dark"] .mobile-nav-link {
    background: rgba(10, 16, 34, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
}

body[data-theme="dark"] .mobile-nav-link:hover {
    background: rgba(10, 16, 34, 0.8);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

body[data-theme="dark"] .mobile-menu-close {
    background: rgba(10, 16, 34, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body[data-theme="dark"] .mobile-menu-close:hover {
    background: rgba(10, 16, 34, 1);
}

body[data-theme="dark"] .mobile-menu-close i {
    color: var(--color-text-primary);
}

/* ========================================
   MOBILE PERFORMANCE OPTIMIZATION
======================================== */
@media (max-width: 768px) {
    /* Disable heavy backdrop-filter on mobile */
    .site-header,
    .site-header.scrolled,
    .nav-links a,
    .section-icon,
    .hero-highlights li,
    .about-card,
    .signature-card,
    .research,
    .research-card,
    .publications,
    .timeline-item,
    .teaching,
    .teaching-card,
    .news,
    .news-card,
    .contact,
    .contact-card {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
    
    /* Simplify transitions on mobile - keep menu animations */
    .nav-links {
        transition: transform 0.45s cubic-bezier(0.63, 0.01, 0.22, 1) !important;
    }
    
    /* Keep menu animations */
    @keyframes navItemSlide {
        0% {
            opacity: 0;
            transform: translateX(-18px);
        }
        100% {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    .nav-links li {
        transition: opacity 0.3s ease, transform 0.3s ease !important;
    }
    
    .nav-links.open li {
        animation: navItemSlide 0.45s ease forwards !important;
    }
    
    .nav-links.open li:nth-child(1) { animation-delay: 0.05s !important; }
    .nav-links.open li:nth-child(2) { animation-delay: 0.1s !important; }
    .nav-links.open li:nth-child(3) { animation-delay: 0.15s !important; }
    .nav-links.open li:nth-child(4) { animation-delay: 0.2s !important; }
    .nav-links.open li:nth-child(5) { animation-delay: 0.25s !important; }
    .nav-links.open li:nth-child(6) { animation-delay: 0.3s !important; }
    
    .nav-links a {
        transition: background 0.2s ease, color 0.2s ease !important;
    }
    
    .btn {
        transition: background 0.2s ease, transform 0.2s ease !important;
    }
    
    .nav-toggle {
        transition: transform 0.3s ease !important;
    }
    
    .nav-toggle::before,
    .nav-toggle::after {
        transition: transform 0.3s ease !important;
    }
    
    /* Simplify shadows on mobile */
    .site-header::after,
    .research::before,
    .research::after,
    .news::before,
    .teaching::before {
        display: none !important;
    }
    
    /* Reduce shadow complexity */
    .shadow-lg,
    .shadow-md,
    .shadow-sm {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
}

/* ========================================
   DESKTOP LAYOUT OPTIMIZATION
======================================== */
@media (min-width: 769px) {
    .top-nav {
        gap: 32px;
    }
    
    .nav-links {
        gap: 8px;
        justify-content: center;
    }
    
    .nav-links a {
        padding: 10px 18px;
        min-width: 80px;
        font-size: 14px;
    }
    
    .brand {
        min-width: 120px;
        padding: 12px 28px;
        font-size: 1.4rem;
        letter-spacing: 0.02em;
        white-space: nowrap;
        line-height: 1.2;
    }
    
    .theme-toggle {
        min-width: 80px;
        padding: 12px 20px;
    }
    
    .nav-actions {
        flex-shrink: 0;
    }
}

/* ========================================
   FLOATING BUTTONS FOR MOBILE
======================================== */
@media (max-width: 768px) {
    .floating-buttons-mobile {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        pointer-events: none;
        z-index: 9999;
    }

    /* Floating brand button */
    .brand-floating {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 9999;
        padding: 12px 20px;
        font-size: clamp(1.25rem, 3vw, 5rem);
        font-family: var(--font-brand);
        font-weight: 600;
        letter-spacing: 0.08em;
        color: var(--color-text-primary);
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid rgba(116, 132, 212, 0.35);
        border-radius: 999px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), 
                    box-shadow 0.3s ease;
        will-change: transform;
        pointer-events: auto;
        text-decoration: none;
        touch-action: manipulation;
    }

    .brand-floating:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    }


    /* Floating menu toggle */
    .nav-toggle-floating {
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 9999;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid rgba(125, 138, 210, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 8px 32px rgba(39, 52, 102, 0.15);
        pointer-events: auto;
        touch-action: manipulation;
        outline: none !important;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-toggle-floating:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    }

    .nav-toggle-floating {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
    }

    .nav-toggle-floating span {
        display: block;
        width: 18px;
        height: 2px;
        background: var(--color-text-primary);
        border-radius: 1px;
        transition: all 0.3s ease;
        transform-origin: center;
    }

    .nav-toggle-floating.active span:nth-child(1) {
        transform: rotate(45deg) translateY(5px);
    }

    .nav-toggle-floating.active span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .nav-toggle-floating.active span:nth-child(3) {
        transform: rotate(-45deg) translateY(-5px);
    }

    /* Force mobile menu to show when active */
    .mobile-menu-overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
        display: flex !important;
        position: fixed !important;
        z-index: 99999 !important;
    }

    /* Floating theme toggle for mobile */
    .theme-toggle-mobile {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 9999;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid rgba(116, 132, 212, 0.35);
        cursor: pointer;
        transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), 
                    background 0.3s ease, 
                    color 0.3s ease,
                    box-shadow 0.3s ease;
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        will-change: transform;
        pointer-events: auto;
        touch-action: manipulation;
    }

    .theme-toggle-mobile:hover {
        transform: translateY(-3px) scale(1.1);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    }


    .theme-toggle-mobile i {
        font-size: 20px;
        color: var(--color-text-primary);
    }
}

/* Hide mobile theme toggle on desktop */
@media (min-width: 769px) {
    .theme-toggle-mobile {
        display: none;
    }
}

/* Continue mobile styles */
@media (max-width: 768px) {
    .nav-links {
        z-index: 9998;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        padding: 80px 40px 60px;
        background: linear-gradient(160deg, 
            rgba(244, 246, 255, 0.95) 0%, 
            rgba(255, 241, 236, 0.95) 45%, 
            rgba(255, 255, 255, 0.94) 100%);
        -webkit-backdrop-filter: blur(25px);
        backdrop-filter: blur(25px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 28px;
        opacity: 0;
        visibility: hidden;
        transform: scale(0.95);
        transition: opacity 0.3s ease, 
                    visibility 0.3s ease, 
                    transform 0.3s ease;
        pointer-events: none;
        overflow: hidden;
    }

    .nav-links.open {
        opacity: 1 !important;
        visibility: visible !important;
        transform: scale(1) !important;
        pointer-events: auto !important;
    }

    .nav-links li {
        width: auto;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-links li a {
        display: block;
        padding: 16px 32px;
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--color-text-primary);
        text-decoration: none;
        border-radius: var(--radius-lg);
        transition: all 0.3s ease;
        background: rgba(255, 255, 255, 0.3);
        border: 1px solid rgba(125, 138, 210, 0.2);
        min-width: 200px;
        text-align: center;
    }

    .nav-links li a:hover {
        background: rgba(255, 255, 255, 0.8);
        border-color: var(--color-accent);
        color: var(--color-accent);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

    .nav-links.open li {
        opacity: 1;
        transform: translateY(0);
        animation: navItemSlide 0.45s ease forwards;
    }

    .nav-links.open li:nth-child(1) { animation-delay: 0.05s; }
    .nav-links.open li:nth-child(2) { animation-delay: 0.1s; }
    .nav-links.open li:nth-child(3) { animation-delay: 0.15s; }
    .nav-links.open li:nth-child(4) { animation-delay: 0.2s; }
    .nav-links.open li:nth-child(5) { animation-delay: 0.25s; }
    .nav-links.open li:nth-child(6) { animation-delay: 0.3s; }

    .nav-links-cta {
        display: block;
        margin-top: 18px;
        width: 100%;
    }

    .nav-links-cta .btn {
        width: 100%;
        justify-content: center;
    }

    body.menu-open .nav-toggle {
        position: fixed;
        inset-inline-start: 20px;
        top: 26px;
    }

    /* Hero Adjustments */
    .hero-highlights {
        align-items: center;
        justify-content: center;
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .hero-wordmark {
        max-width: clamp(16rem, 45vw, 24rem);
    }

    /* Grid Adjustments */
    .research-grid {
        grid-template-columns: 1fr;
    }

    .contact-card {
        padding: clamp(1.5rem, 5vw, 2rem);
        border-radius: var(--radius-md);
    }

    /* Card Adjustments */
    .research-card,
    .news-card,
    .teaching-card {
        padding: var(--space-md);
    }
}

/* Mobile Phones */
@media (max-width: 520px) {
    :root {
        --container-width: min(1180px, 90%);
        --container-padding: 16px;
        --space-2xl: clamp(48px, 8vw, 72px);
    }

    .btn,
    .btn-link {
        width: 100%;
        justify-content: center;
    }

    .hero-eyebrow {
        font-size: 0.75rem;
        padding: 6px 14px;
        letter-spacing: 0.08em;
        margin-block-start: 0;
        margin-bottom: 1rem;
    }

    .hero-wordmark {
        max-width: clamp(18rem, 55vw, 28rem);
        margin-top: var(--space-md);
    }

    .hero-highlights {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .hero-highlights li {
        min-height: 6rem;
        padding: var(--space-sm) var(--space-md);
    }

    .hero-metric {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .hero-metric-label {
        font-size: 0.8125rem;
    }

    .section-heading h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .section-heading p {
        font-size: 0.9375rem;
    }

    .contact-card {
        border-radius: var(--radius-md);
        padding: var(--space-lg);
    }

    .research-card,
    .news-card,
    .teaching-card {
        padding: var(--space-md);
    }

    .profile-frame {
        padding: 16px;
    }

    .brand {
        font-size: clamp(1.25rem, 4vw, 1.5rem);
        padding: 8px 20px;
    }
}

/* Extra Small Devices */
@media (max-width: 375px) {
    .hero-wordmark {
        max-width: 90%;
    }

    .hero-highlights li {
        min-height: 5rem;
        padding: var(--space-xs) var(--space-sm);
    }

    .section {
        padding: var(--space-xl) 0;
    }
}

/* Dark Theme Mobile Adjustments */
body[data-theme="dark"] .nav-links {
    background: linear-gradient(160deg, 
        rgba(7, 12, 28, 0.95) 0%, 
        rgba(9, 14, 30, 0.95) 45%, 
        rgba(6, 10, 24, 0.94) 100%);
}

body[data-theme="dark"] .nav-links li a {
    background: rgba(10, 16, 34, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
}

body[data-theme="dark"] .nav-links li a:hover {
    background: rgba(10, 16, 34, 0.8);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Dark theme sticky header */
body[data-theme="dark"] .site-header.scrolled {
    background: rgba(7, 12, 28, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Dark theme floating buttons */
@media (max-width: 768px) {
    body[data-theme="dark"] .theme-toggle-mobile {
        background: rgba(7, 12, 28, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.18);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    body[data-theme="dark"] .theme-toggle-mobile i {
        color: #fff;
    }

    body[data-theme="dark"] .brand-floating,
    body[data-theme="dark"] .nav-toggle-floating {
        background: rgba(7, 12, 28, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.18);
        color: #fff;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    body[data-theme="dark"] .nav-toggle-floating span {
        background: #fff;
    }

}

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

@keyframes elasticBounce {
    0% {
        transform: scale(1) translateY(0);
    }
    20% {
        transform: scale(0.9) translateY(-5px);
    }
    40% {
        transform: scale(1.1) translateY(-8px);
    }
    60% {
        transform: scale(0.95) translateY(-3px);
    }
    80% {
        transform: scale(1.02) translateY(-1px);
    }
    100% {
        transform: scale(1) translateY(0);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
    }
}

/* Animation classes */
.research-card,
.teaching-card,
.news-card,
.timeline-item,
.hero-highlights li {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.research-card.animate-in,
.teaching-card.animate-in,
.news-card.animate-in,
.timeline-item.animate-in,
.hero-highlights li.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Loading state */
body:not(.loaded) .hero-highlights li {
    animation: fadeInUp 0.6s ease forwards;
}

body:not(.loaded) .hero-highlights li:nth-child(1) { animation-delay: 0.1s; }
body:not(.loaded) .hero-highlights li:nth-child(2) { animation-delay: 0.2s; }
body:not(.loaded) .hero-highlights li:nth-child(3) { animation-delay: 0.3s; }
