/*
  ardeshir.io Design System v2.0
  3D Parallax Scrolling with Cosmic Depth Effect
  Inspired by Antikythera & Univrs.io aesthetics
*/

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

/* ═══════════════════════════════════════════════════════════════
   CSS VARIABLES - Dark Cosmic Theme (Default)
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* Sleek dark backgrounds - pure blacks and grays */
    --bg-void: #000000;
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: rgba(20, 20, 20, 0.9);
    --bg-card-solid: #141414;
    --bg-nav: rgba(10, 10, 10, 0.85);
    --bg-glass: rgba(20, 20, 20, 0.7);

    /* Text colors - clean whites and grays */
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;

    /* Muted accent - soft warm yellow/gold only */
    --accent-blue: #d4a574;
    --accent-blue-dim: rgba(212, 165, 116, 0.12);
    --accent-cyan: #c9a66b;
    --accent-cyan-dim: rgba(201, 166, 107, 0.12);
    --accent-green: #b8a070;
    --accent-yellow: #d4a574;
    --accent-red: #a08070;
    --accent-purple: #d4a574;
    --accent-purple-dim: rgba(212, 165, 116, 0.12);
    --accent-pink: #c9a66b;

    /* Subtle glow effects - warm and muted */
    --glow-blue: 0 0 30px rgba(212, 165, 116, 0.15);
    --glow-purple: 0 0 30px rgba(212, 165, 116, 0.15);
    --glow-cyan: 0 0 30px rgba(201, 166, 107, 0.15);

    /* Borders & shadows - clean and minimal */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.04);
    --border-glow: rgba(212, 165, 116, 0.25);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.6);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(212, 165, 116, 0.1);

    /* Typography */
    --font-body: Verdana, Geneva, sans-serif;
    --font-mono: "Consolas", "Monaco", monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3.5rem;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;

    /* Layout */
    --max-width: 1100px;
    --nav-height: 72px;

    /* Parallax */
    --parallax-perspective: 1px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT THEME (Optional override)
   ═══════════════════════════════════════════════════════════════ */

[data-theme="light"] {
    --bg-void: #fafafa;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-solid: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.8);

    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #888888;

    --accent-blue: #8b7355;
    --accent-cyan: #9a8567;
    --accent-purple: #8b7355;

    --border-color: rgba(0, 0, 0, 0.08);
    --border-subtle: rgba(0, 0, 0, 0.04);
    --border-glow: rgba(139, 115, 85, 0.2);
    --glow-blue: 0 0 30px rgba(139, 115, 85, 0.1);
    --glow-purple: 0 0 30px rgba(139, 115, 85, 0.1);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(139, 115, 85, 0.08);
}

/* Light theme parallax background - clean minimal gradient */
[data-theme="light"] .parallax-bg {
    background: linear-gradient(180deg, #fafafa 0%, #f0f0f0 50%, #fafafa 100%);
}

/* Hide stars in light mode */
[data-theme="light"] .parallax-bg::before {
    opacity: 0;
}

/* Subtle warm glow in light mode */
[data-theme="light"] .parallax-bg::after {
    background: radial-gradient(ellipse at 50% 30%, rgba(212, 165, 116, 0.03) 0%, transparent 60%);
    filter: blur(80px);
}

/* Light theme navbar scrolled state */
[data-theme="light"] .navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Light theme footer */
[data-theme="light"] .footer {
    background: rgba(248, 250, 252, 0.9);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    height: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   3D PARALLAX SCROLLING SYSTEM
   ═══════════════════════════════════════════════════════════════ */

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-void);
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: var(--nav-height);
}

/* Night sky background - sleek and minimal */
.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;

    /* Deep black night sky gradient */
    background: linear-gradient(180deg, #000000 0%, #0a0a0a 40%, #080808 100%);
}

/* Stars overlay - soft warm yellow stars */
.parallax-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 20px 30px, rgba(255,248,220,0.6), transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255,248,220,0.4), transparent),
        radial-gradient(1px 1px at 50px 160px, rgba(255,248,220,0.5), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,248,220,0.3), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,248,220,0.5), transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(212,165,116,0.7), transparent),
        radial-gradient(1px 1px at 200px 50px, rgba(255,248,220,0.4), transparent),
        radial-gradient(1px 1px at 250px 100px, rgba(212,165,116,0.5), transparent),
        radial-gradient(1px 1px at 300px 150px, rgba(255,248,220,0.4), transparent),
        radial-gradient(1px 1px at 70px 200px, rgba(255,248,220,0.3), transparent),
        radial-gradient(1px 1px at 180px 180px, rgba(255,248,220,0.4), transparent),
        radial-gradient(2px 2px at 280px 60px, rgba(212,165,116,0.6), transparent);
    background-size: 400px 400px;
}

/* Subtle warm ambient glow */
.parallax-bg::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 20%, rgba(212, 165, 116, 0.03) 0%, transparent 50%);
    filter: blur(60px);
}

/* Main content wrapper - scrolls normally */
.parallax-content {
    position: relative;
    z-index: 1;
    transform: translateZ(0);
    padding-top: var(--nav-height);
}

/* Content sections float above background */
.content-layer {
    position: relative;
    background: transparent;
}

/* ═══════════════════════════════════════════════════════════════
   FLOATING GLASS NAVIGATION
   ═══════════════════════════════════════════════════════════════ */

.navbar {
    position: fixed;
    top: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - var(--space-xl));
    max-width: var(--max-width);
    height: calc(var(--nav-height) - 16px);
    z-index: 1000;

    /* Glass morphism */
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);

    /* Floating card effect */
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow:
        var(--shadow-lg),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    transition: all var(--transition-base);
}

.navbar:hover {
    border-color: var(--border-glow);
    box-shadow:
        var(--shadow-lg),
        var(--shadow-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .navbar {
    box-shadow:
        var(--shadow-lg),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .navbar:hover {
    box-shadow:
        var(--shadow-lg),
        var(--shadow-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.navbar-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.navbar-brand:hover {
    color: #d4a574 !important;
}

.navbar-brand span {
    font-size: 1.25rem;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    list-style: none;
}

.nav-link {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary) !important;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 8px;
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
}

.nav-link.active {
    color: #d4a574 !important;
    background: rgba(212, 165, 116, 0.1);
}

/* Theme toggle */
.theme-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all var(--transition-fast);
    margin-left: var(--space-xs);
}

[data-theme="light"] .theme-toggle {
    background: rgba(0, 0, 0, 0.05);
}

.theme-toggle:hover {
    background: rgba(212, 165, 116, 0.1);
    border-color: #d4a574;
}

/* Mobile nav */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.navbar-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

@media (max-width: 900px) {
    .navbar {
        width: calc(100% - var(--space-md));
        top: var(--space-xs);
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-menu {
        position: fixed;
        top: calc(var(--nav-height) + var(--space-xs));
        left: var(--space-xs);
        right: var(--space-xs);
        background: var(--bg-glass);
        backdrop-filter: blur(20px);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: var(--space-md);
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
        flex-direction: column;
    }

    .navbar-menu.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .navbar-nav {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: var(--space-xs);
    }

    .nav-link {
        display: block;
        padding: var(--space-sm);
        text-align: center;
    }
}

/* ═══════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: var(--text-5xl); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: var(--text-4xl); letter-spacing: -0.01em; }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

@media (max-width: 768px) {
    h1 { font-size: var(--text-3xl); }
    h2 { font-size: var(--text-2xl); }
    h3 { font-size: var(--text-xl); }
}

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

a {
    color: var(--accent-purple);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-cyan);
}

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

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════ */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
    position: relative;
    z-index: 1;
}

.section {
    padding: var(--space-3xl) 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-header p {
    font-size: var(--text-lg);
    max-width: 600px;
    margin: var(--space-sm) auto 0;
}

/* ═══════════════════════════════════════════════════════════════
   FLOATING CONTENT CARDS
   ═══════════════════════════════════════════════════════════════ */

.card, .content-card, .model-card, .info-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: var(--space-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card::before, .content-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

[data-theme="light"] .card::before,
[data-theme="light"] .content-card::before {
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.08), transparent);
}

.card:hover, .content-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

/* ═══════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════ */

.hero, .hero-feast {
    min-height: calc(100vh - var(--nav-height) - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-2xl) var(--space-md);
    position: relative;
    z-index: 1;
    background: transparent;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero-title, .feast-title {
    margin-bottom: var(--space-lg);
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 50%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle, .feast-subtitle {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Text gradients */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    color: #ffffff;
    box-shadow: var(--glow-purple);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 60px rgba(167, 139, 250, 0.4);
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
    background: var(--accent-purple-dim);
}

/* ═══════════════════════════════════════════════════════════════
   MODEL CARDS
   ═══════════════════════════════════════════════════════════════ */

.model-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: var(--space-xl);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.model-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
}

.model-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
    border-color: var(--border-glow);
}

.model-card.graphcast::before { background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan)); }
.model-card.gencast::before { background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink)); }
.model-card.fgn::before { background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan)); }

.model-name {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.model-year {
    font-size: var(--text-sm);
    color: var(--accent-purple);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

/* ═══════════════════════════════════════════════════════════════
   GRIDS
   ═══════════════════════════════════════════════════════════════ */

.grid {
    display: grid;
    gap: var(--space-lg);
}

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

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

@media (max-width: 600px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   SECTION NAV (for Movable Feast page)
   ═══════════════════════════════════════════════════════════════ */

.section-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: var(--space-xl);
}

.nav-btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nav-btn:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    color: #ffffff;
    border-color: transparent;
    box-shadow: var(--glow-purple);
}

/* ═══════════════════════════════════════════════════════════════
   STACK DIAGRAM (Movable Feast)
   ═══════════════════════════════════════════════════════════════ */

.stack-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--space-xl);
}

.stack-layer {
    width: 100%;
    max-width: 500px;
    padding: 18px 24px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.stack-layer:hover {
    transform: scale(1.02);
}

.stack-layer.glow {
    box-shadow: 0 4px 30px rgba(167, 139, 250, 0.4);
}

/* ═══════════════════════════════════════════════════════════════
   CONCEPT CARDS (Movable Feast)
   ═══════════════════════════════════════════════════════════════ */

.concept-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

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

.concept-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.concept-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.concept-card.cyan { border-color: rgba(34, 211, 238, 0.3); }
.concept-card.purple { border-color: rgba(167, 139, 250, 0.3); }
.concept-card.pink { border-color: rgba(244, 114, 182, 0.3); }

.concept-title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.concept-title.cyan { color: var(--accent-cyan); }
.concept-title.purple { color: var(--accent-purple); }
.concept-title.pink { color: var(--accent-pink); }

.concept-list {
    list-style: none;
    padding: 0;
}

.concept-list li {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    padding: 6px 0;
}

.concept-list .highlight {
    color: var(--accent-cyan);
}

/* ═══════════════════════════════════════════════════════════════
   METRIC SECTION (Movable Feast)
   ═══════════════════════════════════════════════════════════════ */

.metric-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.metric-section.pink {
    border-color: rgba(244, 114, 182, 0.3);
}

.metric-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--accent-pink);
    margin-bottom: var(--space-md);
}

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

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

.metric-box {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: var(--space-md);
}

.metric-box.highlight {
    border: 1px solid rgba(244, 114, 182, 0.3);
}

.metric-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: 4px;
}

.metric-label.pink {
    color: var(--accent-pink);
}

.metric-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   QUESTION BOX (Movable Feast)
   ═══════════════════════════════════════════════════════════════ */

.question-box {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(167, 139, 250, 0.1));
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 20px;
    padding: var(--space-xl);
    text-align: center;
}

.question-title {
    font-size: var(--text-xl);
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-md);
}

.question-text {
    font-size: var(--text-lg);
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.question-note {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* ═══════════════════════════════════════════════════════════════
   FEAST FOOTER
   ═══════════════════════════════════════════════════════════════ */

.feast-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-subtle);
}

.feast-footer a {
    color: var(--accent-purple);
}

/* ═══════════════════════════════════════════════════════════════
   FEAST CONTENT SECTIONS
   ═══════════════════════════════════════════════════════════════ */

.feast-content {
    display: none;
}

.feast-content.active {
    display: block;
}

.content-title {
    font-size: var(--text-2xl);
    color: var(--accent-cyan);
    margin-bottom: var(--space-lg);
}

.content-text {
    color: var(--text-secondary);
    white-space: pre-line;
    line-height: 1.9;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
}

/* ═══════════════════════════════════════════════════════════════
   QUOTE BLOCK
   ═══════════════════════════════════════════════════════════════ */

.quote-block, .quote-box {
    background: linear-gradient(135deg, var(--accent-purple-dim), rgba(34, 211, 238, 0.1));
    border-left: 4px solid var(--accent-purple);
    padding: var(--space-lg);
    border-radius: 0 16px 16px 0;
    margin: var(--space-lg) 0;
}

.quote-text {
    font-style: italic;
    font-size: var(--text-lg);
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.quote-attribution {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* ═══════════════════════════════════════════════════════════════
   TAGS & BADGES
   ═══════════════════════════════════════════════════════════════ */

.tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--accent-purple-dim);
    border: 1px solid transparent;
    border-radius: 20px;
    font-size: var(--text-sm);
    margin: 4px;
    color: var(--accent-purple);
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */

.footer {
    background: rgba(18, 18, 35, 0.7);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-2xl) 0;
    margin-top: var(--space-2xl);
    position: relative;
    z-index: 1;
}

.footer-content {
    text-align: center;
}

.footer a {
    color: var(--accent-purple);
}

.footer p {
    margin-bottom: var(--space-sm);
}

/* ═══════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════ */

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

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent-purple); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0 !important; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.hover-bg { background: rgba(255, 255, 255, 0.05); }
[data-theme="light"] .hover-bg { background: rgba(0, 0, 0, 0.03); }

/* Row/Col utilities */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
}

.col {
    flex: 1;
    padding: 0 12px;
}

.g-4 { gap: var(--space-lg); }

@media (max-width: 768px) {
    .row { flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════════════
   DATA TABLES
   ═══════════════════════════════════════════════════════════════ */

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-md) 0;
    font-size: var(--text-sm);
}

.data-table th,
.data-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
    background: var(--bg-secondary);
    color: var(--accent-yellow);
    font-weight: 600;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .data-table tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* ═══════════════════════════════════════════════════════════════
   CSS ANIMATIONS & TRANSITIONS
   ═══════════════════════════════════════════════════════════════ */

/* Page load fade-in */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

/* Apply animations to elements */
.hero-title, .feast-title, .page-title {
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-subtitle, .feast-subtitle, .page-subtitle {
    animation: fadeInUp 0.8s ease-out 0.1s forwards;
    opacity: 0;
}

.hero-cta, .section-nav {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

/* Staggered card animations */
.card, .content-card, .model-card, .concept-card {
    animation: scaleIn 0.5s ease-out forwards;
    opacity: 0;
}

.card:nth-child(1), .content-card:nth-child(1), .model-card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2), .content-card:nth-child(2), .model-card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3), .content-card:nth-child(3), .model-card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4), .content-card:nth-child(4), .model-card:nth-child(4) { animation-delay: 0.4s; }

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Smooth hover transitions for all interactive elements */
a, button, .nav-link, .btn, .card, .nav-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glow pulse on hover for cards */
.card:hover, .content-card:hover, .model-card:hover {
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(167, 139, 250, 0.15);
}

[data-theme="light"] .card:hover,
[data-theme="light"] .content-card:hover,
[data-theme="light"] .model-card:hover {
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 0 40px rgba(139, 92, 246, 0.1);
}

/* Navbar animation on scroll (via JS class) */
.navbar.scrolled {
    background: rgba(10, 10, 18, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Stack layer hover animation */
.stack-layer {
    transition: all 0.3s ease;
}

.stack-layer:hover {
    transform: scale(1.03) translateX(5px);
    box-shadow: 0 8px 40px rgba(167, 139, 250, 0.3);
}

[data-theme="light"] .stack-layer:hover {
    box-shadow: 0 8px 40px rgba(139, 92, 246, 0.25);
}

/* Button ripple effect */
.btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.btn:active::after {
    width: 200px;
    height: 200px;
}

[data-theme="light"] .btn-outline::after {
    background: rgba(139, 92, 246, 0.15);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    :root {
        --nav-height: 64px;
    }

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

    .hero, .hero-feast {
        min-height: auto;
        padding: var(--space-xl) var(--space-md);
    }
}

/* Disable parallax on mobile for performance */
@media (max-width: 768px), (hover: none) {
    body {
        perspective: none;
        transform-style: flat;
    }

    .parallax-bg {
        transform: none;
        background-attachment: scroll;
    }
}
