/* ============================================
   L-DAHS Lab Website - Complete UI/UX Redesign
   Modern Academic with Editorial Influences
   ============================================ */

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

/* ============================================
   Design System - CSS Variables
   ============================================ */
:root {
    /* Primary - Deep scholarly navy */
    --ink-900: #1a1f2e;
    --ink-800: #252b3d;
    --ink-700: #363d52;
    --ink-600: #4a5270;
    --ink-500: #5e6785;

    /* Accent - Warm scholarly gold */
    --ochre-600: #a67b2e;
    --ochre-500: #c4913c;
    --ochre-400: #d4a54e;
    --ochre-300: #e4bc6a;
    --ochre-200: #f0d49a;
    --ochre-100: #faf0dc;

    /* Secondary - Muted sage */
    --sage-700: #3d5249;
    --sage-600: #4a6359;
    --sage-500: #5d7a6e;
    --sage-400: #7a9a8c;
    --sage-300: #a3bfb0;
    --sage-200: #d1e3d9;

    /* Neutral - Warm paper tones */
    --paper-50: #fdfcfa;
    --paper-100: #f8f6f2;
    --paper-200: #f0ece4;
    --paper-300: #e4dfd4;
    --paper-400: #d4cdc0;

    /* Text colors */
    --text-primary: #1a1f2e;
    --text-secondary: #4a5270;
    --text-muted: #6b7280;
    --text-light: #9ca3af;

    /* Borders */
    --border-subtle: rgba(26, 31, 46, 0.06);
    --border-light: rgba(26, 31, 46, 0.1);
    --border-medium: rgba(26, 31, 46, 0.15);

    /* Shadows - Warmer, more refined */
    --shadow-xs: 0 1px 2px rgba(26, 31, 46, 0.04);
    --shadow-sm: 0 2px 4px rgba(26, 31, 46, 0.04), 0 1px 2px rgba(26, 31, 46, 0.06);
    --shadow-md: 0 4px 12px rgba(26, 31, 46, 0.06), 0 2px 4px rgba(26, 31, 46, 0.04);
    --shadow-lg: 0 12px 32px rgba(26, 31, 46, 0.08), 0 4px 8px rgba(26, 31, 46, 0.04);
    --shadow-xl: 0 24px 48px rgba(26, 31, 46, 0.1), 0 8px 16px rgba(26, 31, 46, 0.06);
    --shadow-2xl: 0 32px 64px rgba(26, 31, 46, 0.12), 0 16px 32px rgba(26, 31, 46, 0.08);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Typography Scale */
    --text-display: clamp(3rem, 5vw + 1rem, 4.5rem);
    --text-headline: clamp(2rem, 3vw + 0.5rem, 3rem);
    --text-title: clamp(1.5rem, 2vw + 0.25rem, 2rem);
    --text-subtitle: clamp(1.25rem, 1.5vw + 0.25rem, 1.5rem);
    --text-lead: 1.25rem;
    --text-body: 1.0625rem;
    --text-small: 0.9375rem;
    --text-caption: 0.8125rem;
    --text-tiny: 0.75rem;

    /* Line heights */
    --leading-tight: 1.15;
    --leading-snug: 1.3;
    --leading-normal: 1.5;
    --leading-relaxed: 1.7;
    --leading-loose: 1.85;

    /* Font families */
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --font-ui: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   Base Styles
   ============================================ */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-body);
    line-height: var(--leading-relaxed);
    color: var(--text-primary);
    background-color: var(--paper-50);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    max-width: 1920px;
    margin: 0 auto;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

@media (max-width: 640px) {
    .container {
        padding: 0 var(--space-4);
    }
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: var(--leading-tight);
    letter-spacing: -0.02em;
    color: var(--ink-900);
    text-wrap: balance;
}

.text-display {
    font-size: var(--text-display);
    font-weight: 500;
    letter-spacing: -0.03em;
}

.text-headline {
    font-size: var(--text-headline);
}

.text-title {
    font-size: var(--text-title);
}

.label {
    font-family: var(--font-ui);
    font-size: var(--text-caption);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

/* Links */
a {
    color: var(--ink-800);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--ochre-500);
}

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

/* Selection */
::selection {
    background-color: var(--ochre-200);
    color: var(--ink-900);
}

/* ============================================
   Component: Buttons
   ============================================ */
.btn {
    font-family: var(--font-ui);
    font-size: var(--text-small);
    font-weight: 600;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: var(--radius-md);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    cursor: pointer;
    transition: background-color var(--transition-base), color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background: var(--ink-800);
    color: var(--paper-50);
}

.btn-primary:hover {
    background: var(--ink-900);
    color: var(--paper-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--ink-800);
    border: 1.5px solid var(--ink-800);
}

.btn-secondary:hover {
    background: var(--ink-800);
    color: var(--paper-50);
    transform: translateY(-2px);
}

.btn-accent {
    background: var(--ochre-500);
    color: var(--ink-900);
}

.btn-accent:hover {
    background: var(--ochre-600);
    color: var(--ink-900);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-small {
    font-size: var(--text-caption);
    padding: 0.5rem 1rem;
}

.btn-ghost {
    background: transparent;
    color: var(--ink-700);
    padding: 0.5rem 1rem;
}

.btn-ghost:hover {
    background: var(--paper-200);
    color: var(--ink-900);
}

/* ============================================
   Component: Tags
   ============================================ */
.tag {
    font-family: var(--font-ui);
    font-size: var(--text-caption);
    font-weight: 500;
    padding: 0.375rem 0.875rem;
    background: var(--paper-200);
    color: var(--ink-700);
    border-radius: var(--radius-full);
    display: inline-block;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.tag:hover {
    background: var(--ochre-100);
    color: var(--ochre-600);
}

.tag-highlight {
    background: var(--ochre-100);
    color: var(--ochre-600);
}

/* ============================================
   Component: Cards
   ============================================ */
.card {
    background: var(--paper-50);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* ============================================
   Section: Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(253, 252, 250, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
    transition: background-color var(--transition-base), box-shadow var(--transition-base);
}

.navbar.scrolled {
    background: rgba(253, 252, 250, 0.98);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.nav-logo {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-logo h2 {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--ink-900);
    letter-spacing: -0.02em;
}

.nav-logo span {
    font-family: var(--font-ui);
    font-size: var(--text-tiny);
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-8);
}

.nav-link {
    font-family: var(--font-ui);
    font-size: var(--text-small);
    font-weight: 500;
    color: var(--ink-700);
    text-decoration: none;
    position: relative;
    padding: var(--space-2) 0;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--ochre-500);
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--ink-900);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: var(--space-2);
    gap: 5px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--ink-800);
    border-radius: 2px;
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation */
@media (max-width: 1024px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 72px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 72px);
        background: var(--paper-50);
        flex-direction: column;
        padding: var(--space-8) var(--space-6);
        gap: var(--space-4);
        box-shadow: var(--shadow-2xl);
        transition: right var(--transition-slow);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        font-size: var(--text-body);
        padding: var(--space-3) 0;
    }
}

/* ============================================
   Section: Hero
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 72px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--paper-100) 0%, var(--paper-50) 50%, var(--ochre-100) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231a1f2e' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='1.5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--space-16) var(--space-6);
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-16);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 680px;
}

.hero-label {
    font-family: var(--font-ui);
    font-size: var(--text-caption);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ochre-500);
    margin-bottom: var(--space-4);
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
}

.hero-label::before {
    content: '';
    width: 32px;
    height: 2px;
    background: linear-gradient(90deg, var(--ochre-500), var(--ochre-300));
    border-radius: 1px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: var(--text-display);
    font-weight: 500;
    color: var(--ink-900);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-6);
}

.hero-title-highlight {
    color: var(--ochre-500);
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: var(--text-lead);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-10);
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    max-width: 500px;
}

.data-visualization {
    position: relative;
    width: 380px;
    height: 380px;
    max-width: 100%;
    aspect-ratio: 1 / 1;
}

.data-visualization::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 280px;
    height: 280px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(196, 145, 60, 0.08) 0%, rgba(93, 122, 110, 0.04) 50%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: glowPulse 6s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* Abstract data mesh pattern */
.data-mesh {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: meshFloat 12s ease-in-out infinite;
}

.data-mesh svg {
    width: 100%;
    height: 100%;
}

.mesh-node {
    fill: var(--ochre-400);
    animation: nodeGlow 4s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(196, 145, 60, 0.4));
}

.mesh-node:nth-child(2n) {
    fill: var(--sage-500);
    animation-delay: 0.8s;
    filter: drop-shadow(0 0 6px rgba(93, 122, 110, 0.4));
}

.mesh-node:nth-child(3n) {
    fill: var(--ink-500);
    animation-delay: 1.6s;
    filter: drop-shadow(0 0 6px rgba(94, 103, 133, 0.4));
}

.mesh-line {
    stroke: var(--ink-600);
    stroke-width: 1;
    opacity: 0.15;
    animation: lineGlow 5s ease-in-out infinite;
    stroke-dasharray: 4 2;
}

.mesh-line:nth-child(2n) {
    animation-delay: 0.8s;
    stroke: var(--ochre-500);
    opacity: 0.1;
}

.mesh-line:nth-child(3n) {
    animation-delay: 1.6s;
    stroke: var(--sage-500);
    opacity: 0.12;
}

/* Entire mesh floats together */
@keyframes meshFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-8px) rotate(0.5deg); }
    66% { transform: translateY(-4px) rotate(-0.3deg); }
}

/* Nodes glow without moving */
@keyframes nodeGlow {
    0%, 100% { opacity: 0.6; filter: drop-shadow(0 0 4px currentColor); }
    50% { opacity: 1; filter: drop-shadow(0 0 10px currentColor); }
}

/* Lines pulse opacity */
@keyframes lineGlow {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

/* Floating stat cards */
.stat-card {
    position: absolute;
    background: rgba(253, 252, 250, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    box-shadow: 0 8px 32px rgba(26, 31, 46, 0.08), 0 2px 8px rgba(26, 31, 46, 0.04);
    animation: float 8s ease-in-out infinite;
}

.stat-card:nth-child(1) {
    top: 20px;
    left: -20px;
    animation-delay: 0s;
}

.stat-card:nth-child(2) {
    top: 50%;
    right: -30px;
    animation-delay: 2s;
}

.stat-card:nth-child(3) {
    bottom: 40px;
    left: 20px;
    animation-delay: 4s;
}

.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--ink-900);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-card .stat-label {
    font-family: var(--font-ui);
    font-size: var(--text-tiny);
    font-weight: 500;
    color: var(--text-muted);
    margin-top: var(--space-1);
}

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

/* Hero responsive */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-12);
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-subtitle {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

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

    .data-visualization {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-visual {
        display: none;
    }

    .stat-card {
        padding: var(--space-2) var(--space-3);
    }

    .stat-card .stat-value {
        font-size: 1.25rem;
    }

    .stat-card .stat-label {
        font-size: 0.625rem;
    }

    .stat-card:nth-child(1) {
        top: 10px;
        left: -5px;
    }

    .stat-card:nth-child(2) {
        right: -10px;
    }

    .stat-card:nth-child(3) {
        bottom: 20px;
        left: 10px;
    }
}

/* Scroll offset for fixed navbar */
section[id] {
    scroll-margin-top: 80px;
}

/* ============================================
   Section: Common Styles
   ============================================ */
.section {
    padding: var(--space-24) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
    position: relative;
}

.section-number {
    font-family: var(--font-display);
    font-size: 8rem;
    font-weight: 300;
    color: var(--paper-200);
    position: absolute;
    top: -3rem;
    left: 50%;
    transform: translateX(-50%);
    line-height: 1;
    pointer-events: none;
    z-index: 0;
    font-variant-numeric: tabular-nums;
}

.section-label {
    font-family: var(--font-ui);
    font-size: var(--text-caption);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ochre-500);
    margin-bottom: var(--space-3);
    display: inline-block;
    position: relative;
    z-index: 1;
}

.section-title {
    font-family: var(--font-display);
    font-size: var(--text-headline);
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: var(--space-4);
    position: relative;
    z-index: 1;
}

.section-description {
    font-family: var(--font-body);
    font-size: var(--text-lead);
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
    line-height: var(--leading-relaxed);
}

/* ============================================
   Section: About
   ============================================ */
.about {
    padding: var(--space-24) 0;
    background: var(--paper-50);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: start;
}

.about-content {
    padding-right: var(--space-8);
}

.about-text {
    font-family: var(--font-body);
    font-size: var(--text-lead);
    color: var(--text-secondary);
    line-height: var(--leading-loose);
    margin-bottom: var(--space-8);
}

.about-quote {
    font-family: var(--font-display);
    font-size: var(--text-subtitle);
    font-weight: 500;
    font-style: italic;
    color: var(--ink-800);
    padding: var(--space-8);
    border-left: 3px solid var(--ochre-500);
    background: var(--paper-100);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    position: relative;
}

.about-quote::before {
    content: '"';
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--ochre-300);
    position: absolute;
    top: -0.5rem;
    left: var(--space-4);
    line-height: 1;
}

/* Research Highlights */
.research-highlights {
    display: grid;
    gap: var(--space-4);
}

.highlight-item {
    background: var(--paper-50);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--ochre-500);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    padding: var(--space-5) var(--space-6);
    transition: background-color var(--transition-base), border-left-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}

.highlight-item:hover {
    background: var(--paper-100);
    border-left-color: var(--ochre-400);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.highlight-item .material-icons {
    font-size: 1.75rem;
    color: var(--ochre-500);
    margin-bottom: var(--space-3);
    display: block;
}

.highlight-item h3 {
    font-family: var(--font-display);
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: var(--space-2);
}

.highlight-item p {
    font-family: var(--font-body);
    font-size: var(--text-small);
    color: var(--text-secondary);
    line-height: var(--leading-normal);
}

@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-12);
    }

    .about-content {
        padding-right: 0;
    }

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

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

/* ============================================
   Section: Leadership
   ============================================ */
.leadership {
    padding: var(--space-24) 0;
    background: var(--paper-100);
}

.directors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
    max-width: 1100px;
    margin: 0 auto;
}

.director-card {
    background: var(--paper-50);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.director-photo-section {
    background: linear-gradient(135deg, var(--ink-800) 0%, var(--ink-700) 100%);
    padding: var(--space-10);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.director-photo {
    position: relative;
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-xl);
}

.director-name-mobile {
    display: none;
    text-align: center;
    margin-top: var(--space-6);
}

.director-name-mobile h3 {
    font-family: var(--font-display);
    font-size: var(--text-title);
    font-weight: 600;
    color: var(--paper-50);
    margin-bottom: var(--space-2);
}

.director-name-mobile .director-title {
    font-family: var(--font-ui);
    font-size: var(--text-small);
    font-weight: 500;
    color: var(--ochre-300);
}

.director-info {
    padding: var(--space-10);
}

.director-header {
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border-light);
}

.director-header h3 {
    font-family: var(--font-display);
    font-size: var(--text-title);
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: var(--space-2);
}

.director-title {
    font-family: var(--font-ui);
    font-size: var(--text-body);
    font-weight: 500;
    color: var(--ochre-600);
}

.info-section {
    margin-bottom: var(--space-6);
}

.info-section h4 {
    font-family: var(--font-ui);
    font-size: var(--text-caption);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: var(--space-3);
}

.education p, .contact-info p {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-family: var(--font-body);
    font-size: var(--text-body);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.education .material-icons,
.contact-info .material-icons {
    font-size: 1.25rem;
    color: var(--ochre-500);
    flex-shrink: 0;
}

.research-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

@media (max-width: 900px) {
    .directors-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .director-card {
        /* Already column layout */
    }

    .director-photo-section {
        padding: var(--space-8);
    }

    .profile-img {
        width: 140px;
        height: 140px;
    }

    .director-name-mobile {
        display: block;
    }

    .director-header {
        display: none;
    }

    .director-info {
        padding: var(--space-6);
    }
}

/* ============================================
   Section: Research Areas
   ============================================ */
.research {
    padding: var(--space-24) 0;
    background: var(--ink-900);
    position: relative;
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: var(--space-6);
}

.research-card {
    background: var(--ink-800);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
    position: relative;
    overflow: hidden;
}

.research-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--ochre-400);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.research-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-6px);
}

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

/* Featured cards (first two) */
.research-card.featured {
    grid-row: span 1;
}

.research-number {
    font-family: var(--font-display);
    font-size: var(--text-tiny);
    font-weight: 500;
    color: var(--ochre-500);
    margin-bottom: var(--space-4);
}

.research-icon {
    width: 56px;
    height: 56px;
    background: rgba(196, 145, 60, 0.12);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-5);
    transition: background var(--transition-base), transform var(--transition-base);
}

.research-card:hover .research-icon {
    background: rgba(196, 145, 60, 0.2);
    transform: scale(1.05);
}

.research-icon .material-icons {
    font-size: 1.75rem;
    color: var(--ochre-400);
}

.research-card h3 {
    font-family: var(--font-display);
    font-size: var(--text-subtitle);
    font-weight: 600;
    color: #fdfcfa;
    margin-bottom: var(--space-3);
    line-height: var(--leading-snug);
}

.research-card p {
    font-family: var(--font-body);
    font-size: var(--text-small);
    color: rgba(253, 252, 250, 0.65);
    line-height: var(--leading-relaxed);
}

/* Research section dark theme header overrides */
.research .section-number {
    color: rgba(255, 255, 255, 0.04);
}

.research .section-label {
    color: var(--ochre-400);
}

.research .section-title {
    color: #fdfcfa;
}

.research .section-description {
    color: rgba(253, 252, 250, 0.6);
}

.research .research-number {
    color: var(--ochre-400);
}

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

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

    .research-card {
        padding: var(--space-6);
    }
}

/* ============================================
   Section: Research Outputs
   ============================================ */
.research-outputs {
    padding: var(--space-24) 0;
    background: var(--paper-100);
}

.outputs-category {
    margin-bottom: var(--space-16);
}

.outputs-category:last-child {
    margin-bottom: 0;
}

.category-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.category-header h3 {
    font-family: var(--font-display);
    font-size: var(--text-title);
    font-weight: 600;
    color: var(--ink-900);
}

.category-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--ochre-400), transparent);
}

/* Interactive Tools - Grid */
.tools-carousel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.tool-card {
    background: var(--paper-50);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--sage-500), var(--ochre-400));
}

.tool-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.tool-icon {
    width: 48px;
    height: 48px;
    background: var(--sage-200);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
    transition: background-color var(--transition-base);
}

.tool-card:hover .tool-icon {
    background: var(--ochre-100);
}

.tool-icon .material-icons {
    font-size: 1.5rem;
    color: var(--sage-600);
    transition: color var(--transition-base);
}

.tool-card:hover .tool-icon .material-icons {
    color: var(--ochre-600);
}

.tool-card h4 {
    font-family: var(--font-display);
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: var(--space-2);
}

.tool-card p {
    font-family: var(--font-body);
    font-size: var(--text-small);
    color: var(--text-secondary);
    line-height: var(--leading-normal);
    margin-bottom: var(--space-4);
    flex: 1;
}

.tool-card .btn {
    width: 100%;
    margin-top: auto;
}

.tool-buttons {
    display: flex;
    gap: var(--space-2);
    margin-top: auto;
}

.tool-buttons .btn {
    flex: 1;
    font-size: var(--text-caption);
    padding: var(--space-3) var(--space-4);
}

/* Software Section */
.software-section {
    margin-bottom: var(--space-12);
}

.software-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.software-header h4 {
    font-family: var(--font-display);
    font-size: var(--text-subtitle);
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: var(--space-3);
}

.software-description {
    font-family: var(--font-body);
    font-size: var(--text-body);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: var(--leading-relaxed);
}

/* Visualization Grid - Masonry-style */
.viz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-6);
}

.viz-card {
    background: var(--paper-50);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.viz-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.viz-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    cursor: pointer;
    transition: transform var(--transition-base);
}

.viz-card:hover img {
    transform: scale(1.02);
}

.viz-info {
    padding: var(--space-5);
}

.viz-info h5 {
    font-family: var(--font-display);
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: var(--space-2);
}

.viz-info p {
    font-family: var(--font-body);
    font-size: var(--text-small);
    color: var(--text-secondary);
    line-height: var(--leading-normal);
}

/* Visualization Section Headers */
.visualization-section {
    margin-bottom: var(--space-10);
}

.visualization-section:last-child {
    margin-bottom: 0;
}

.visualization-section h4 {
    font-family: var(--font-display);
    font-size: var(--text-subtitle);
    font-weight: 600;
    color: var(--ink-800);
    margin-bottom: var(--space-6);
    text-align: center;
    position: relative;
}

.visualization-section h4::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--ochre-400);
    margin: var(--space-3) auto 0;
}

@media (max-width: 768px) {
    .tools-carousel {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    .tool-card {
        padding: var(--space-5);
    }

    .viz-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Section: Lab Members
   ============================================ */
.members {
    padding: var(--space-24) 0;
    background: var(--paper-50);
}

.members-category {
    margin-bottom: var(--space-12);
}

.members-category:last-child {
    margin-bottom: 0;
}

.members-category h3 {
    font-family: var(--font-display);
    font-size: var(--text-title);
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.members-category h3::before {
    content: '';
    width: 4px;
    height: 1.5em;
    background: var(--ochre-500);
    border-radius: var(--radius-sm);
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: var(--space-6);
}

/* Featured Member Card (International Fellow) */
.member-card.featured {
    grid-column: span 1;
    background: linear-gradient(135deg, var(--ink-800) 0%, var(--ink-700) 100%);
    color: var(--paper-50);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
}

.member-card.featured h4 {
    color: var(--paper-50);
}

.member-card.featured .member-position {
    color: var(--ochre-300);
}

.member-card.featured .member-research {
    color: var(--paper-300);
}

.member-card.featured .tag {
    background: rgba(255, 255, 255, 0.15);
    color: var(--paper-100);
}

.member-card.featured .tag:hover {
    background: var(--ochre-500);
    color: var(--ink-900);
}

/* Standard Member Card */
.member-card {
    background: var(--paper-50);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.member-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.member-photo {
    margin-bottom: var(--space-4);
}

.member-photo img {
    width: 100px;
    height: 120px;
    border-radius: var(--radius-lg);
    object-fit: cover;
}

.member-info h4 {
    font-family: var(--font-display);
    font-size: var(--text-subtitle);
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: var(--space-2);
}

.member-position {
    font-family: var(--font-ui);
    font-size: var(--text-small);
    font-weight: 500;
    color: var(--ochre-600);
    margin-bottom: var(--space-3);
}

.member-research {
    font-family: var(--font-body);
    font-size: var(--text-small);
    color: var(--text-secondary);
    line-height: var(--leading-normal);
    margin-bottom: var(--space-4);
}

.member-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

/* Alumni List */
.alumni-list {
    display: grid;
    gap: var(--space-4);
}

.alumni-item {
    background: var(--paper-100);
    border-left: 3px solid var(--ochre-400);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--space-4) var(--space-5);
    transition: background-color var(--transition-base), transform var(--transition-base);
}

.alumni-item:hover {
    background: var(--paper-200);
    transform: translateX(4px);
}

.alumni-item h4 {
    font-family: var(--font-display);
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: var(--space-1);
}

.alumni-item p {
    font-family: var(--font-body);
    font-size: var(--text-small);
    color: var(--text-secondary);
    margin: 0;
}

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

/* ============================================
   Section: Published Works
   ============================================ */
.published-works {
    padding: var(--space-24) 0;
    background: linear-gradient(135deg, var(--paper-100) 0%, var(--paper-50) 100%);
}

.book-showcase {
    max-width: 1000px;
    margin: 0 auto;
}

.book-hero {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--space-10);
    background: var(--paper-50);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.book-cover-container {
    background: linear-gradient(135deg, var(--ink-800) 0%, var(--ink-700) 100%);
    padding: var(--space-10);
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-cover-wrapper {
    position: relative;
}

.book-cover-img {
    width: 220px;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-2xl);
    transition: transform var(--transition-slow);
}

.book-cover-wrapper:hover .book-cover-img {
    transform: scale(1.02);
}

.book-details {
    padding: var(--space-10);
    padding-left: 0;
}

.book-header {
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border-light);
}

.book-title-zh {
    font-family: var(--font-display);
    font-size: var(--text-title);
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: var(--space-2);
    line-height: var(--leading-snug);
}

.book-title-en {
    font-family: var(--font-body);
    font-size: var(--text-body);
    font-weight: 400;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.book-author {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.author-label {
    font-family: var(--font-ui);
    font-size: var(--text-caption);
    font-weight: 500;
    color: var(--text-muted);
}

.author-name {
    font-family: var(--font-display);
    font-size: var(--text-subtitle);
    font-weight: 600;
    color: var(--ochre-600);
}

.author-affiliation {
    font-family: var(--font-body);
    font-size: var(--text-small);
    color: var(--text-secondary);
}

/* Book Info Grid */
.book-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.info-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--paper-100);
    border-radius: var(--radius-lg);
    transition: background-color var(--transition-fast);
}

.info-card:hover {
    background: var(--ochre-100);
}

.info-icon {
    font-size: 1.25rem;
    color: var(--ochre-500);
}

.info-content {
    flex: 1;
}

.info-label {
    font-family: var(--font-ui);
    font-size: var(--text-tiny);
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-family: var(--font-body);
    font-size: var(--text-small);
    font-weight: 600;
    color: var(--ink-800);
}

/* Book Description */
.book-description-modern {
    margin-bottom: var(--space-8);
}

.description-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.description-header .material-icons {
    font-size: 1.25rem;
    color: var(--ochre-500);
}

.description-header h5 {
    font-family: var(--font-display);
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--ink-900);
}

.description-text {
    font-family: var(--font-body);
    font-size: var(--text-body);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-6);
}

.contents-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

.content-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--paper-100);
    border-radius: var(--radius-md);
    border-left: 2px solid var(--ochre-400);
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.content-item:hover {
    background: var(--ochre-100);
    transform: translateX(4px);
}

.content-icon {
    font-size: 1rem;
    color: var(--ochre-500);
}

.content-item span:last-child {
    font-family: var(--font-body);
    font-size: var(--text-small);
    color: var(--text-secondary);
}

/* Purchase Button */
.book-actions {
    margin-top: var(--space-6);
}

.purchase-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-8);
    background: var(--ochre-500);
    color: var(--ink-900);
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-ui);
    font-weight: 600;
    transition: background-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
    box-shadow: var(--shadow-md);
}

.purchase-btn:hover {
    background: var(--ochre-600);
    color: var(--ink-900);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-icon {
    font-size: 1.25rem;
}

.btn-text {
    font-size: var(--text-body);
}

.btn-subtext {
    font-size: var(--text-small);
    opacity: 0.8;
}

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

    .book-cover-container {
        padding: var(--space-8);
    }

    .book-cover-img {
        width: 180px;
    }

    .book-details {
        padding: var(--space-6);
    }

    .book-info-grid {
        grid-template-columns: 1fr;
    }

    .contents-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Section: Publications
   ============================================ */
.publications {
    padding: var(--space-24) 0;
    background: var(--paper-50);
}

.publications-timeline {
    max-width: 900px;
    margin: 0 auto;
}

.year-group {
    margin-bottom: var(--space-10);
}

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

.year-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    position: sticky;
    top: 80px;
    background: var(--paper-50);
    padding: var(--space-2) 0;
    z-index: 10;
}

.year-label {
    font-family: var(--font-display);
    font-size: var(--text-title);
    font-weight: 600;
    color: var(--ink-900);
}

.year-line {
    flex: 1;
    height: 1px;
    background: var(--border-medium);
}

.year-count {
    font-family: var(--font-ui);
    font-size: var(--text-caption);
    font-weight: 500;
    color: var(--text-muted);
    background: var(--paper-200);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-variant-numeric: tabular-nums;
}

.publications-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.publication-item {
    background: var(--paper-100);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
    transition: background-color var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.publication-item:hover {
    background: var(--paper-50);
    border-color: var(--ochre-300);
    box-shadow: var(--shadow-md);
}

.publication-item.featured {
    background: var(--paper-50);
    border-left: 3px solid var(--ochre-500);
}

.publication-item h4 {
    font-family: var(--font-display);
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--ink-900);
    line-height: var(--leading-snug);
    margin-bottom: var(--space-2);
}

.authors {
    font-family: var(--font-body);
    font-size: var(--text-small);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.journal {
    font-family: var(--font-body);
    font-size: var(--text-small);
    color: var(--ochre-600);
    font-style: italic;
    margin-bottom: var(--space-3);
}

.publication-links {
    display: flex;
    gap: var(--space-2);
}

.publication-links .btn-small {
    font-size: var(--text-tiny);
    padding: var(--space-2) var(--space-3);
    background: var(--ink-800);
    color: var(--paper-50);
    border-radius: var(--radius-sm);
}

.publication-links .btn-small:hover {
    background: var(--ochre-500);
    color: var(--ink-900);
}

.publication-links .btn-small[style*="cursor: not-allowed"] {
    background: var(--paper-300);
    color: var(--text-muted);
}

/* ============================================
   Section: Contact
   ============================================ */
.contact {
    padding: var(--space-24) 0;
    background: var(--paper-100);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h3,
.contact-form h3 {
    font-family: var(--font-display);
    font-size: var(--text-subtitle);
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: var(--space-6);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.contact-item .material-icons {
    font-size: 1.5rem;
    color: var(--ochre-500);
    margin-top: 2px;
}

.contact-item h4 {
    font-family: var(--font-ui);
    font-size: var(--text-small);
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: var(--space-1);
}

.contact-item p {
    font-family: var(--font-body);
    font-size: var(--text-body);
    color: var(--text-secondary);
}

/* Contact Form */
.contact-form {
    background: var(--paper-50);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: var(--space-5);
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-4);
    font-family: var(--font-body);
    font-size: var(--text-body);
    color: var(--text-primary);
    background: var(--paper-50);
    border: 1.5px solid var(--border-medium);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ochre-500);
    box-shadow: 0 0 0 3px rgba(196, 145, 60, 0.15);
}

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

.contact-form .btn-primary {
    width: 100%;
    padding: var(--space-4);
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--ink-900);
    color: var(--paper-200);
    padding: var(--space-16) 0 var(--space-8);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-12);
    margin-bottom: var(--space-10);
}

.footer-section h4 {
    font-family: var(--font-display);
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--ochre-400);
    margin-bottom: var(--space-4);
}

.footer-section p {
    font-family: var(--font-body);
    font-size: var(--text-small);
    color: var(--paper-300);
    line-height: var(--leading-relaxed);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--space-2);
}

.footer-section ul li a {
    font-family: var(--font-ui);
    font-size: var(--text-small);
    color: var(--paper-300);
    transition: color var(--transition-fast);
}

.footer-section ul li a:hover {
    color: var(--ochre-400);
}

.footer-bottom {
    padding-top: var(--space-8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-family: var(--font-ui);
    font-size: var(--text-caption);
    color: var(--paper-400);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
}

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

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

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* Hero text animation */
.hero-title .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
    animation: wordReveal 0.6s ease forwards;
}

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

/* Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 31, 46, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
}

.image-modal.active .modal-content {
    opacity: 1;
    transform: scale(1);
}

.modal-content {
    display: flex;
    max-width: 1100px;
    max-height: 85vh;
    width: 92%;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity var(--transition-base), transform var(--transition-base);
}

.modal-image-panel {
    flex: 1.2;
    background: var(--ink-900);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.modal-image-panel img {
    width: 100%;
    height: 100%;
    max-height: 85vh;
    object-fit: contain;
    display: block;
}

.modal-info-panel {
    flex: 0.6;
    padding: 2.5rem;
    background: var(--paper-50);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.modal-title {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: var(--space-4);
    line-height: 1.3;
}

.modal-description {
    font-family: 'Source Serif 4', serif;
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

@media (max-width: 768px) {
    .modal-content {
        flex-direction: column;
        max-height: 90vh;
    }

    .modal-image-panel {
        flex: none;
        max-height: 50vh;
    }

    .modal-info-panel {
        flex: none;
        padding: 1.5rem;
    }

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

/* Scroll to top button */
.scroll-top {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    width: 48px;
    height: 48px;
    background: var(--ink-800);
    color: var(--paper-50);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base), background-color var(--transition-base), color var(--transition-base), transform var(--transition-base);
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--ochre-500);
    color: var(--ink-900);
    transform: translateY(-4px);
}

/* Loading animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--paper-50);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    transition: opacity 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--paper-200);
    border-top-color: var(--ochre-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Comprehensive Mobile Responsive Design
   ============================================ */

/* Tablet - 768px */
@media (max-width: 768px) {
    /* Global spacing adjustments */
    .section-header {
        margin-bottom: var(--space-10);
    }

    .section-number {
        font-size: 5rem;
        top: -2rem;
    }

    .section-title {
        font-size: var(--text-title);
    }

    .section-description {
        font-size: var(--text-body);
    }

    /* About section */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .about-content {
        padding-right: 0;
    }

    .about-text {
        font-size: var(--text-body);
    }

    .about-quote {
        font-size: var(--text-body);
        padding: var(--space-6);
    }

    .research-highlights {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    /* Research grid */
    .research-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    .research-card {
        padding: var(--space-6);
    }

    /* Tools carousel */
    .tool-card {
        flex: 0 0 280px;
        padding: var(--space-5);
    }

    /* Viz grid */
    .viz-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    .viz-card img {
        height: 180px;
    }

    /* Members */
    .members-grid {
        grid-template-columns: 1fr;
    }

    .member-card {
        padding: var(--space-5);
    }

    .member-card.featured {
        padding: var(--space-6);
    }

    /* Book section */
    .book-hero {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .book-cover-container {
        padding: var(--space-6);
    }

    .book-cover-img {
        width: 180px;
    }

    .book-details {
        padding: var(--space-6);
    }

    .book-title-zh {
        font-size: var(--text-subtitle);
    }

    .book-info-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    .contents-grid {
        grid-template-columns: 1fr;
    }

    /* Publications */
    .year-header {
        top: 76px;
    }

    .publication-item {
        padding: var(--space-4);
    }

    .publication-item h4 {
        font-size: var(--text-small);
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .contact-form {
        padding: var(--space-6);
    }

    /* Footer */
    .footer {
        padding: var(--space-10) 0 var(--space-6);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-6);
        text-align: center;
    }

    .footer-section ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-3);
    }

    .footer-section ul li {
        margin-bottom: 0;
    }
}

/* Mobile - 480px */
@media (max-width: 480px) {
    /* Container padding */
    .container {
        padding: 0 var(--space-4);
    }

    /* Navigation */
    .nav-container {
        padding: 0 var(--space-4);
        height: 64px;
    }

    .nav-logo h2 {
        font-size: 1.25rem;
    }

    .nav-logo span {
        display: none;
    }

    .nav-menu {
        top: 64px;
        width: 100%;
        height: calc(100vh - 64px);
        padding: var(--space-6) var(--space-4);
    }

    /* Hero */
    .hero {
        padding-top: 64px;
    }

    .hero-container {
        padding: var(--space-10) var(--space-4);
    }

    .hero-label {
        font-size: var(--text-tiny);
    }

    .hero-title {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: var(--text-body);
    }

    .hero-buttons {
        flex-direction: column;
        gap: var(--space-3);
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* Section headers */
    .section-number {
        font-size: 4rem;
        top: -1.5rem;
    }

    .section-title {
        font-size: var(--text-subtitle);
    }

    .section-label {
        font-size: var(--text-tiny);
    }

    /* About */
    .about {
        padding: var(--space-16) 0;
    }

    .about-quote::before {
        font-size: 3rem;
        top: -0.25rem;
        left: var(--space-2);
    }

    .research-highlights {
        grid-template-columns: 1fr;
    }

    .highlight-item {
        padding: var(--space-4);
    }

    .highlight-item .material-icons {
        font-size: 1.5rem;
    }

    /* Leadership */
    .leadership {
        padding: var(--space-16) 0;
    }

    .director-photo-section {
        padding: var(--space-6);
    }

    .profile-img {
        width: 120px;
        height: 120px;
    }

    .director-info {
        padding: var(--space-5);
    }

    .info-section h4 {
        font-size: var(--text-tiny);
    }

    .research-tags {
        gap: var(--space-1);
    }

    .tag {
        font-size: var(--text-tiny);
        padding: var(--space-1) var(--space-3);
    }

    /* Research */
    .research {
        padding: var(--space-16) 0;
    }

    .research-grid {
        grid-template-columns: 1fr;
    }

    .research-card {
        padding: var(--space-5);
    }

    .research-icon {
        width: 48px;
        height: 48px;
    }

    .research-icon .material-icons {
        font-size: 1.5rem;
    }

    .research-card h3 {
        font-size: var(--text-body);
    }

    /* Research Outputs */
    .research-outputs {
        padding: var(--space-16) 0;
    }

    .category-header h3 {
        font-size: var(--text-subtitle);
    }

    .tools-carousel {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    .tool-card {
        padding: var(--space-4);
    }

    .tool-icon {
        width: 40px;
        height: 40px;
    }

    .tool-icon .material-icons {
        font-size: 1.25rem;
    }

    .tool-card h4 {
        font-size: var(--text-small);
    }

    .software-header h4 {
        font-size: var(--text-body);
    }

    .viz-grid {
        grid-template-columns: 1fr;
    }

    .viz-card img {
        height: 200px;
    }

    .viz-info {
        padding: var(--space-4);
    }

    .visualization-section h4 {
        font-size: var(--text-body);
    }

    /* Members */
    .members {
        padding: var(--space-16) 0;
    }

    .members-category h3 {
        font-size: var(--text-subtitle);
    }

    .member-card.featured {
        padding: var(--space-5);
    }

    .member-photo img {
        width: 80px;
        height: 96px;
    }

    .member-info h4 {
        font-size: var(--text-body);
    }

    .member-tags {
        gap: var(--space-1);
    }

    /* Published Works */
    .published-works {
        padding: var(--space-16) 0;
    }

    .book-cover-img {
        width: 150px;
    }

    .book-header {
        margin-bottom: var(--space-5);
        padding-bottom: var(--space-4);
    }

    .book-title-zh {
        font-size: var(--text-body);
    }

    .book-title-en {
        font-size: var(--text-small);
    }

    .author-name {
        font-size: var(--text-body);
    }

    .info-card {
        padding: var(--space-3);
    }

    .description-header h5 {
        font-size: var(--text-small);
    }

    .description-text {
        font-size: var(--text-small);
    }

    .content-item {
        padding: var(--space-2) var(--space-3);
        font-size: var(--text-small);
    }

    .purchase-btn {
        padding: var(--space-3) var(--space-5);
        width: 100%;
        justify-content: center;
    }

    /* Publications */
    .publications {
        padding: var(--space-16) 0;
    }

    .year-header {
        top: 68px;
        padding: var(--space-1) 0;
    }

    .year-label {
        font-size: var(--text-subtitle);
    }

    .publication-item {
        padding: var(--space-4);
    }

    .publication-item h4 {
        font-size: var(--text-small);
        line-height: var(--leading-normal);
    }

    .authors, .journal {
        font-size: var(--text-caption);
    }

    /* Contact */
    .contact {
        padding: var(--space-16) 0;
    }

    .contact-info h3,
    .contact-form h3 {
        font-size: var(--text-body);
    }

    .contact-item {
        gap: var(--space-3);
        margin-bottom: var(--space-4);
    }

    .contact-item .material-icons {
        font-size: 1.25rem;
    }

    .contact-form {
        padding: var(--space-5);
    }

    .form-group input,
    .form-group textarea {
        padding: var(--space-3);
        font-size: var(--text-small);
    }

    /* Scroll to top */
    .scroll-top {
        bottom: var(--space-4);
        right: var(--space-4);
        width: 44px;
        height: 44px;
    }
}

/* Extra small devices - 360px */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .section-number {
        font-size: 3rem;
    }

    .btn {
        padding: var(--space-3) var(--space-4);
        font-size: var(--text-caption);
    }

    .tool-card {
        flex: 0 0 240px;
    }
}

/* ==========================================
   ACCESSIBILITY - Focus States
   ========================================== */

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 3px solid var(--ochre-400);
    outline-offset: 2px;
}

/* Remove outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Interactive elements focus states */
.nav-link:focus-visible,
.btn:focus-visible,
.hamburger:focus-visible {
    outline: 3px solid var(--ochre-400);
    outline-offset: 2px;
    border-radius: 4px;
}

.btn-primary:focus-visible {
    outline-color: var(--paper-50);
}

/* Form elements focus */
.form-group input:focus-visible,
.form-group textarea:focus-visible {
    outline: 3px solid var(--ochre-400);
    outline-offset: 0;
    border-color: var(--ochre-400);
}

/* Card focus states for clickable cards */
.research-card:focus-visible,
.tool-card:focus-visible,
.viz-card:focus-visible,
.member-card:focus-visible {
    outline: 3px solid var(--ochre-400);
    outline-offset: 4px;
}

/* Skip link styling */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ink-900);
    color: var(--paper-50);
    padding: var(--space-3) var(--space-5);
    border-radius: 8px;
    z-index: 10000;
    font-family: var(--font-ui);
    font-size: var(--text-small);
    text-decoration: none;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-4);
    outline: 3px solid var(--ochre-400);
    outline-offset: 2px;
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    /* Reset colors for printing */
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* Hide non-essential elements */
    .navbar,
    .hamburger,
    .nav-menu,
    .hero-visual,
    .scroll-top,
    .image-modal,
    .contact-form,
    .footer,
    .btn,
    .tools-carousel,
    .publications-filter,
    .dark-mode-toggle,
    .lang-toggle,
    .scroll-progress {
        display: none !important;
    }

    /* Page setup */
    @page {
        margin: 2cm;
        size: A4;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    /* Show full URLs for links */
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666 !important;
    }

    /* Don't show URL for internal links */
    a[href^="#"]::after {
        content: none;
    }

    /* Ensure images print well */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    /* Avoid page breaks inside important elements */
    .section-header,
    .director-card,
    .research-card,
    .member-card,
    .publication-item,
    .book-hero {
        page-break-inside: avoid;
    }

    /* Add page breaks before major sections */
    section {
        page-break-before: auto;
    }

    /* Remove background colors from sections */
    .hero,
    .about,
    .leadership,
    .research,
    .research-outputs,
    .members,
    .published-works,
    .publications,
    .contact {
        background: none !important;
        padding: 1rem 0 !important;
    }

    /* Adjust typography for print */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }

    p, li {
        orphans: 3;
        widows: 3;
    }

    /* Show publication DOIs */
    .doi-btn {
        display: inline !important;
        background: none !important;
        padding: 0 !important;
        color: #666 !important;
        font-size: 10pt;
    }

    .doi-btn::before {
        content: "DOI: ";
    }

    /* Ensure text contrast */
    .section-number {
        opacity: 0.3;
    }
}

/* ==========================================
   SCROLL PROGRESS INDICATOR
   ========================================== */

.scroll-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--ochre-500), var(--ochre-400));
    transition: width 0.1s linear;
    z-index: 1001;
}

/* ==========================================
   DARK MODE TOGGLE
   ========================================== */

.dark-mode-toggle {
    position: fixed;
    bottom: var(--space-20);
    right: var(--space-6);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ink-800);
    color: var(--paper-50);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: background-color var(--transition-base), transform var(--transition-base);
}

.dark-mode-toggle:hover {
    background: var(--ink-700);
    transform: scale(1.1);
}

.dark-mode-toggle .material-icons {
    font-size: 1.5rem;
}

/* ==========================================
   LANGUAGE TOGGLE
   ========================================== */

.lang-toggle {
    position: fixed;
    bottom: calc(var(--space-20) + 60px);
    right: var(--space-6);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    background: var(--ochre-500);
    color: var(--paper-50);
    border: none;
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: var(--text-small);
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: background-color var(--transition-base), transform var(--transition-base);
}

.lang-toggle:hover {
    background: var(--ochre-400);
    transform: scale(1.05);
}

/* ==========================================
   PUBLICATIONS FILTER
   ========================================== */

.publications-filter {
    margin-bottom: var(--space-8);
}

.filter-controls {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}

.search-box {
    flex: 1;
    min-width: 250px;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--paper-100);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-box:focus-within {
    border-color: var(--ochre-400);
    box-shadow: 0 0 0 3px rgba(196, 145, 60, 0.1);
}

.search-box .material-icons {
    color: var(--text-muted);
    font-size: 1.25rem;
}

.search-input {
    flex: 1;
    border: none;
    background: none;
    font-family: var(--font-body);
    font-size: var(--text-body);
    color: var(--text-primary);
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.year-filter {
    min-width: 150px;
}

.year-box {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--paper-100);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.year-box:focus-within {
    border-color: var(--ochre-400);
    box-shadow: 0 0 0 3px rgba(196, 145, 60, 0.1);
}

.year-box .material-icons {
    color: var(--text-muted);
    font-size: 1.25rem;
}

.year-box::after {
    content: 'expand_more';
    font-family: 'Material Icons';
    font-size: 1.25rem;
    color: var(--text-muted);
    pointer-events: none;
}

.year-select {
    flex: 1;
    border: none;
    background: none;
    font-family: var(--font-body);
    font-size: var(--text-body);
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.filter-results {
    display: none;
    font-family: var(--font-ui);
    font-size: var(--text-small);
    color: var(--text-muted);
    padding: var(--space-2) 0;
}

/* ==========================================
   FORM LABELS
   ========================================== */

.form-label {
    display: block;
    font-family: var(--font-ui);
    font-size: var(--text-small);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

/* ==========================================
   PUBLICATION TEXT OVERFLOW
   ========================================== */

.publication-item h4 {
    overflow-wrap: break-word;
}

/* ==========================================
   TOUCH TARGET SIZES
   ========================================== */

.btn-small {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.footer-section ul li a {
    display: inline-block;
    padding: var(--space-1) 0;
    min-height: 44px;
    line-height: 44px;
}

/* ==========================================
   MODAL CLOSE BUTTON
   ========================================== */

.modal-close {
    position: absolute;
    top: var(--space-6);
    right: var(--space-6);
    background: none;
    border: none;
    color: var(--paper-50);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    transition: color var(--transition-fast), background-color var(--transition-fast);
    z-index: 1;
}

.modal-close .material-icons {
    font-size: 2rem;
}

.modal-close:hover {
    color: var(--ochre-400);
    background: rgba(255, 255, 255, 0.1);
}

/* ==========================================
   HERO ANIMATION PAUSE (off-screen)
   ========================================== */

.hero:not(.hero-visible) .data-mesh,
.hero:not(.hero-visible) .mesh-node,
.hero:not(.hero-visible) .mesh-line,
.hero:not(.hero-visible) .stat-card,
.hero:not(.hero-visible) .data-visualization::before {
    animation-play-state: paused;
}

/* ==========================================
   MEMBER SOCIAL LINKS
   ========================================== */

.member-social {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-subtle);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--paper-200);
    color: var(--text-secondary);
    transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.social-link:hover {
    background: var(--ochre-500);
    color: var(--paper-50);
    transform: translateY(-2px);
}

.social-link .material-icons {
    font-size: 1.125rem;
}

/* ==========================================
   DARK MODE STYLES
   ========================================== */

[data-theme="dark"] {
    /* Override color variables */
    --paper-50: #1a1f2e;
    --paper-100: #252b3d;
    --paper-200: #363d52;
    --paper-300: #4a5270;
    --paper-400: #5e6785;

    --ink-900: #fdfcfa;
    --ink-800: #f8f6f2;
    --ink-700: #f0ece4;
    --ink-600: #e4dfd4;
    --ink-500: #d4cdc0;

    --text-primary: #fdfcfa;
    --text-secondary: #d4cdc0;
    --text-muted: #9ca3af;
    --text-light: #6b7280;

    --border-subtle: rgba(253, 252, 250, 0.06);
    --border-light: rgba(253, 252, 250, 0.1);
    --border-medium: rgba(253, 252, 250, 0.15);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] body {
    background-color: #1a1f2e;
    color: #fdfcfa;
}

[data-theme="dark"] .navbar {
    background: rgba(26, 31, 46, 0.95);
    border-bottom-color: rgba(253, 252, 250, 0.06);
}

[data-theme="dark"] .navbar.scrolled {
    background: rgba(26, 31, 46, 0.98);
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #1a1f2e 0%, #252b3d 50%, #1a1f2e 100%);
}

[data-theme="dark"] .hero::before {
    opacity: 0.03;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: #fdfcfa;
}

[data-theme="dark"] .section-number {
    color: rgba(253, 252, 250, 0.06);
}

[data-theme="dark"] .about {
    background: #252b3d;
}

[data-theme="dark"] .highlight-item {
    background: #1a1f2e;
    border-color: rgba(253, 252, 250, 0.06);
}

[data-theme="dark"] .director-card {
    background: #252b3d;
    border-color: rgba(253, 252, 250, 0.06);
}

[data-theme="dark"] .director-photo-section {
    background: linear-gradient(135deg, rgba(196, 145, 60, 0.1) 0%, rgba(93, 122, 110, 0.1) 100%);
}

[data-theme="dark"] .research {
    background: #0d1017;
}

[data-theme="dark"] .research-card {
    background: #1a1f2e;
    border-color: rgba(253, 252, 250, 0.06);
}

[data-theme="dark"] .research-outputs {
    background: #252b3d;
}

[data-theme="dark"] .tool-card {
    background: #1a1f2e;
    border-color: rgba(253, 252, 250, 0.06);
}

[data-theme="dark"] .viz-card {
    background: #1a1f2e;
}

[data-theme="dark"] .member-card {
    background: #252b3d;
    border-color: rgba(253, 252, 250, 0.06);
}

[data-theme="dark"] .published-works {
    background: #252b3d;
}

[data-theme="dark"] .book-hero {
    background: #1a1f2e;
    border-color: rgba(253, 252, 250, 0.06);
}

[data-theme="dark"] .book-cover-container {
    background: linear-gradient(135deg, rgba(196, 145, 60, 0.15) 0%, rgba(93, 122, 110, 0.15) 100%);
}

[data-theme="dark"] .publication-item {
    background: #252b3d;
    border-color: rgba(253, 252, 250, 0.06);
}

[data-theme="dark"] .year-header {
    background: linear-gradient(90deg, #252b3d 0%, transparent 100%);
}

[data-theme="dark"] .contact-form {
    background: #252b3d;
    border-color: rgba(253, 252, 250, 0.06);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background: #1a1f2e;
    border-color: rgba(253, 252, 250, 0.1);
    color: #fdfcfa;
}

[data-theme="dark"] .footer {
    background: #0d1017;
}

[data-theme="dark"] .dark-mode-toggle {
    background: #fdfcfa;
    color: #1a1f2e;
}

[data-theme="dark"] .dark-mode-toggle:hover {
    background: #f0ece4;
}

[data-theme="dark"] .search-box,
[data-theme="dark"] .year-box {
    background: #1a1f2e;
    border-color: rgba(253, 252, 250, 0.1);
}

[data-theme="dark"] .search-input,
[data-theme="dark"] .year-select {
    color: #fdfcfa;
}

[data-theme="dark"] .tag {
    background: rgba(196, 145, 60, 0.15);
    color: var(--ochre-300);
}

[data-theme="dark"] .info-card {
    background: rgba(253, 252, 250, 0.03);
}

[data-theme="dark"] .content-item {
    background: rgba(253, 252, 250, 0.03);
}

[data-theme="dark"] .social-link {
    background: rgba(253, 252, 250, 0.1);
}

[data-theme="dark"] .stat-card {
    background: rgba(253, 252, 250, 0.08);
}

[data-theme="dark"] .image-modal {
    background: rgba(0, 0, 0, 0.95);
}

[data-theme="dark"] .modal-info-panel {
    background: var(--ink-800);
}

[data-theme="dark"] .modal-title {
    color: var(--paper-50);
}

[data-theme="dark"] .modal-description {
    color: var(--paper-200);
}

/* Mobile responsive for new elements */
@media (max-width: 640px) {
    .dark-mode-toggle,
    .lang-toggle {
        right: var(--space-4);
    }

    .dark-mode-toggle {
        bottom: var(--space-16);
        width: 44px;
        height: 44px;
    }

    .lang-toggle {
        bottom: calc(var(--space-16) + 56px);
        padding: var(--space-2) var(--space-3);
        font-size: var(--text-caption);
    }

    .filter-controls {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }

    .year-filter {
        width: 100%;
    }
}
