/* ============================================================
   VIOLET WHITEPAPER — Stylesheet
   Aesthetic: Luxury Tech — dark, layered, atmospheric
   Fonts: Inter (headings) + Noto Sans SC (body/CJK)
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap');

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* — Brand Colors — */
  --primary: #8B5CF6;
  --primary-deep: #6D28D9;
  --primary-glow: rgba(139, 92, 246, 0.35);
  --primary-subtle: rgba(139, 92, 246, 0.08);
  --accent: #F97316;
  --accent-glow: rgba(249, 115, 22, 0.3);
  --accent-warm: #FB923C;

  /* — Backgrounds — */
  --bg-dark: #1A1A2E;
  --bg-darker: #0F0F1A;
  --bg-card: rgba(26, 26, 46, 0.7);
  --bg-card-hover: rgba(26, 26, 46, 0.85);
  --bg-elevated: rgba(30, 30, 56, 0.6);

  /* — Text — */
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.45);
  --text-accent: #C4B5FD;

  /* — Borders — */
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(139, 92, 246, 0.3);
  --border-subtle: rgba(255, 255, 255, 0.04);

  /* — Spacing Scale (4px base) — */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.5rem;    /* 24px */
  --space-6: 2rem;      /* 32px */
  --space-7: 2.5rem;    /* 40px */
  --space-8: 3rem;      /* 48px */
  --space-9: 4rem;      /* 64px */
  --space-10: 5rem;     /* 80px */
  --space-11: 6rem;     /* 96px */
  --space-12: 8rem;     /* 128px */

  /* — Typography Scale — */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */
  --text-7xl: 4.5rem;      /* 72px */
  --text-8xl: 6rem;        /* 96px */

  /* — Line Heights — */
  --leading-none: 1;
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  /* — Font Weights — */
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;
  --weight-black: 900;

  /* — Radii — */
  --radius-sm: 0.375rem;   /* 6px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 0.75rem;    /* 12px */
  --radius-xl: 1rem;       /* 16px */
  --radius-2xl: 1.5rem;    /* 24px */
  --radius-full: 9999px;

  /* — Shadows — */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow-primary: 0 0 40px var(--primary-glow);
  --shadow-glow-accent: 0 0 40px var(--accent-glow);

  /* — Transitions — */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --duration-slower: 800ms;

  /* — Z-Index Scale — */
  --z-base: 1;
  --z-elevated: 10;
  --z-overlay: 100;
  --z-modal: 1000;

  /* — Layout — */
  --container-max: 1200px;
  --container-wide: 1440px;
  --container-narrow: 800px;
  --header-height: 4.5rem;
}

/* ============================================================
   LIGHT THEME
   ============================================================ */
[data-theme="light"] {
  --primary: #7C3AED;
  --primary-deep: #6D28D9;
  --primary-glow: rgba(124, 58, 237, 0.25);
  --primary-subtle: rgba(124, 58, 237, 0.06);
  --accent: #EA580C;
  --accent-glow: rgba(234, 88, 12, 0.2);
  --bg-dark: #FFFFFF;
  --bg-darker: #F8F9FA;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --bg-elevated: rgba(248, 249, 250, 0.9);
  --text-primary: #1A1A2E;
  --text-secondary: rgba(26, 26, 46, 0.7);
  --text-tertiary: rgba(26, 26, 46, 0.45);
  --text-accent: #7C3AED;
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-glass-hover: rgba(124, 58, 237, 0.3);
  --border-subtle: rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
  --shadow-glow-primary: 0 0 40px rgba(124, 58, 237, 0.15);
  --shadow-glow-accent: 0 0 40px rgba(234, 88, 12, 0.1);
}

[data-theme="light"] .kevlar-bg::before {
  background:
    linear-gradient(160deg, #FFFFFF 0%, #F8F9FA 50%, #F0F0F5 100%),
    repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(124, 58, 237, 0.02) 4px, rgba(124, 58, 237, 0.02) 5px),
    repeating-linear-gradient(-45deg, transparent, transparent 4px, rgba(234, 88, 12, 0.01) 4px, rgba(234, 88, 12, 0.01) 5px);
  background-color: #F8F9FA;
}

[data-theme="light"] .kevlar-bg::after {
  background: radial-gradient(ellipse at 50% 0%, transparent 0%, rgba(248, 249, 250, 0.4) 70%, rgba(248, 249, 250, 0.85) 100%);
}

[data-theme="light"] .glow-orb { opacity: 0.15; }

[data-theme="light"] .glass {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .glass:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(124, 58, 237, 0.2);
}

[data-theme="light"] .text-gradient {
  background: linear-gradient(135deg, #7C3AED 0%, #EA580C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light"] .stat-card__value {
  background: linear-gradient(135deg, #1A1A2E 0%, #7C3AED 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light"] .table th {
  background: rgba(124, 58, 237, 0.04);
}

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

[data-theme="light"] .badge {
  background: rgba(124, 58, 237, 0.06);
  border-color: rgba(124, 58, 237, 0.15);
}

[data-theme="light"] .eyebrow {
  border-color: rgba(124, 58, 237, 0.2);
  background: rgba(124, 58, 237, 0.05);
}

[data-theme="light"] .btn--outline {
  border-color: rgba(0, 0, 0, 0.15);
  color: var(--text-secondary);
}

[data-theme="light"] .btn--outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}


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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: 'Noto Sans SC', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: var(--weight-regular);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-darker);
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

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

::selection {
  background: var(--primary);
  color: var(--text-primary);
}


/* ============================================================
   3. KEVLAR BACKGROUND
   ============================================================ */
.kevlar-bg {
  position: relative;
  background-color: var(--bg-darker);
}

.kevlar-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    /* Primary dark gradient */
    linear-gradient(160deg, var(--bg-dark) 0%, var(--bg-darker) 50%, #0A0A14 100%),
    /* Kevlar weave pattern — forward slash layer */
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 4px,
      rgba(139, 92, 246, 0.015) 4px,
      rgba(139, 92, 246, 0.015) 5px
    ),
    /* Kevlar weave pattern — backslash layer */
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 4px,
      rgba(249, 115, 22, 0.01) 4px,
      rgba(249, 115, 22, 0.01) 5px
    );
  background-color: var(--bg-darker);
  z-index: -2;
  pointer-events: none;
}

/* Subtle vignette overlay */
.kevlar-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 0%,
    transparent 0%,
    rgba(15, 15, 26, 0.4) 70%,
    rgba(15, 15, 26, 0.85) 100%
  );
  z-index: -1;
  pointer-events: none;
}

/* Ambient glow orbs (decorative) */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
}

.glow-orb--primary {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  top: -10%;
  right: -5%;
  opacity: 0.4;
}

.glow-orb--accent {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  bottom: 10%;
  left: -8%;
  opacity: 0.25;
}

.glow-orb--secondary {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.3;
}


/* ============================================================
   4. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 {
  font-size: var(--text-5xl);
  font-weight: var(--weight-black);
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--text-4xl);
  font-weight: var(--weight-extrabold);
}

h3 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
}

h4 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
}

h5 {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
}

h6 {
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
}

p {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient--subtle {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

.text-muted {
  color: var(--text-tertiary);
}

.eyebrow {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--border-glass-hover);
  border-radius: var(--radius-full);
  background: var(--primary-subtle);
  margin-bottom: var(--space-4);
}

.eyebrow--accent {
  color: var(--accent);
  border-color: rgba(249, 115, 22, 0.3);
  background: rgba(249, 115, 22, 0.08);
}


/* ============================================================
   5. LAYOUT — CONTAINERS & GRID
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

.container--wide {
  max-width: var(--container-wide);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* Grid system */
.grid {
  display: grid;
  gap: var(--space-6);
}

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

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

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

/* Responsive grid */
@media (min-width: 768px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

@media (min-width: 1200px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

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

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.text-center { text-align: center; }


/* ============================================================
   6. GLASSMORPHISM CARD SYSTEM
   ============================================================ */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transition:
    background var(--duration-normal) var(--ease-out-expo),
    border-color var(--duration-normal) var(--ease-out-expo),
    box-shadow var(--duration-normal) var(--ease-out-expo),
    transform var(--duration-normal) var(--ease-out-expo);
}

.glass:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass-hover);
  box-shadow: var(--shadow-xl), var(--shadow-glow-primary);
}

.glass--elevated {
  background: var(--bg-elevated);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.glass--interactive {
  cursor: pointer;
}

.glass--interactive:hover {
  transform: translateY(-2px);
}

.glass--interactive:active {
  transform: translateY(0);
}

/* Glass card inner padding */
.glass__body {
  padding: var(--space-6);
}

.glass__header {
  padding: var(--space-6) var(--space-6) 0;
}

.glass__footer {
  padding: 0 var(--space-6) var(--space-6);
}

/* Glass card variant: borderless */
.glass--borderless {
  border: none;
}

/* Glass card variant: glow */
.glass--glow {
  box-shadow: var(--shadow-lg), var(--shadow-glow-primary);
}

.glass--glow-accent {
  box-shadow: var(--shadow-lg), var(--shadow-glow-accent);
}


/* ============================================================
   7. SECTION: HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-5);
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: var(--z-base);
  max-width: 860px;
  text-align: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--primary-subtle);
  border: 1px solid var(--border-glass-hover);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-accent);
  margin-bottom: var(--space-6);
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero__title {
  font-size: var(--text-5xl);
  font-weight: var(--weight-black);
  line-height: var(--leading-none);
  letter-spacing: -0.04em;
  margin-bottom: var(--space-5);
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.hero__meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}

.hero__meta-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
}

.hero__meta-value {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
}

/* Hero responsive */
@media (min-width: 768px) {
  .hero__title {
    font-size: var(--text-7xl);
  }

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

@media (min-width: 1200px) {
  .hero__title {
    font-size: var(--text-8xl);
  }
}


/* ============================================================
   8. SECTION: CHAPTER
   ============================================================ */
.chapter {
  position: relative;
  padding: var(--space-11) 0;
}

.chapter + .chapter {
  border-top: 1px solid var(--border-subtle);
}

.chapter__number {
  font-family: 'Inter', sans-serif;
  font-size: var(--text-8xl);
  font-weight: var(--weight-black);
  line-height: 1;
  color: var(--primary);
  opacity: 0.08;
  position: absolute;
  top: var(--space-8);
  right: var(--space-5);
  user-select: none;
  pointer-events: none;
}

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

.chapter__title {
  font-size: var(--text-3xl);
  font-weight: var(--weight-extrabold);
  margin-bottom: var(--space-3);
}

.chapter__subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 640px;
}

.chapter__body {
  max-width: var(--container-narrow);
}

.chapter__body p {
  font-size: var(--text-lg);
}

/* Chapter responsive */
@media (min-width: 768px) {
  .chapter {
    padding: var(--space-12) 0;
  }

  .chapter__number {
    font-size: calc(var(--text-8xl) * 1.5);
  }

  .chapter__title {
    font-size: var(--text-4xl);
  }
}


/* ============================================================
   9. SECTION: STATS / METRICS
   ============================================================ */
.stats {
  padding: var(--space-10) 0;
}

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

.stat-card {
  padding: var(--space-6);
  text-align: center;
}

.stat-card__value {
  font-family: 'Inter', sans-serif;
  font-size: var(--text-4xl);
  font-weight: var(--weight-black);
  line-height: var(--leading-none);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-2);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card__value--accent {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card__detail {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-2);
}

/* Stats responsive */
@media (min-width: 768px) {
  .stats__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-5);
  }

  .stat-card__value {
    font-size: var(--text-5xl);
  }
}

/* Animated counter (used with JS) */
[data-count] {
  transition: opacity var(--duration-slow) var(--ease-out-expo);
}


/* ============================================================
   10. SECTION: TIMELINE
   ============================================================ */
.timeline {
  padding: var(--space-10) 0;
}

.timeline__track {
  position: relative;
  padding-left: var(--space-7);
}

/* Vertical line */
.timeline__track::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    180deg,
    var(--primary) 0%,
    var(--border-glass-hover) 30%,
    var(--border-glass) 100%
  );
}

.timeline__item {
  position: relative;
  padding-bottom: var(--space-8);
}

.timeline__item:last-child {
  padding-bottom: 0;
}

/* Dot on the line */
.timeline__dot {
  position: absolute;
  left: calc(-1 * var(--space-7) + 4px);
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-darker);
  border: 2px solid var(--primary);
  z-index: var(--z-base);
  transition: all var(--duration-normal) var(--ease-out-expo);
}

.timeline__item:hover .timeline__dot {
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.timeline__dot--completed {
  background: var(--primary);
}

.timeline__dot--active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: pulse-dot 2s ease-in-out infinite;
}

.timeline__date {
  font-family: 'Inter', sans-serif;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: var(--space-2);
}

.timeline__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.timeline__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
}

/* Timeline responsive */
@media (min-width: 768px) {
  .timeline__track {
    padding-left: var(--space-9);
  }

  .timeline__dot {
    left: calc(-1 * var(--space-9) + 4px);
    width: 20px;
    height: 20px;
  }

  .timeline__item {
    padding-bottom: var(--space-10);
  }
}


/* ============================================================
   11. SECTION: FOOTER
   ============================================================ */
.site-footer {
  position: relative;
  padding: var(--space-10) 0 var(--space-8);
  border-top: 1px solid var(--border-subtle);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.site-footer__logo {
  font-family: 'Inter', sans-serif;
  font-size: var(--text-2xl);
  font-weight: var(--weight-black);
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.site-footer__tagline {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  max-width: 360px;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-8);
}

.site-footer__link {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  transition: color var(--duration-fast) ease;
}

.site-footer__link:hover {
  color: var(--primary);
}

.site-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}

.site-footer__copy {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
}

.site-footer__legal a {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.site-footer__legal a:hover {
  color: var(--text-secondary);
}

/* Footer responsive */
@media (min-width: 768px) {
  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .site-footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}


/* ============================================================
   12. REUSABLE COMPONENTS
   ============================================================ */

/* — Buttons — */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: 'Inter', sans-serif;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out-expo);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: var(--text-primary);
  box-shadow: 0 2px 12px var(--primary-glow);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--primary-glow);
  color: var(--text-primary);
}

.btn--accent {
  background: linear-gradient(135deg, var(--accent) 0%, #EA580C 100%);
  color: var(--text-primary);
  box-shadow: 0 2px 12px var(--accent-glow);
}

.btn--accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
  color: var(--text-primary);
}

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

.btn--outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn--ghost:hover {
  background: var(--primary-subtle);
  color: var(--primary);
}

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
}

.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.btn--icon {
  padding: var(--space-3);
  aspect-ratio: 1;
}

/* — Divider — */
.divider {
  height: 1px;
  background: var(--border-subtle);
  border: none;
  margin: var(--space-8) 0;
}

.divider--glow {
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--border-glass-hover) 50%,
    transparent 100%
  );
}

/* — Badge / Tag — */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-full);
  background: var(--primary-subtle);
  color: var(--text-accent);
  border: 1px solid var(--border-glass-hover);
}

.badge--accent {
  background: rgba(249, 115, 22, 0.1);
  color: var(--accent);
  border-color: rgba(249, 115, 22, 0.2);
}

.badge--success {
  background: rgba(34, 197, 94, 0.1);
  color: #22C55E;
  border-color: rgba(34, 197, 94, 0.2);
}

/* — Code Block — */
.code-block {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
  overflow-x: auto;
}

.code-block code {
  color: inherit;
}

.code-inline {
  background: rgba(139, 92, 246, 0.12);
  color: var(--text-accent);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.9em;
}

/* — List — */
.list {
  list-style: none;
  padding: 0;
}

.list__item {
  position: relative;
  padding-left: var(--space-6);
  padding-bottom: var(--space-3);
  color: var(--text-secondary);
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
}

.list__item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.list--check .list__item::before {
  content: '✓';
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: var(--primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  top: 0.35em;
}

/* — Table — */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.06);
  border-bottom: 1px solid var(--border-glass);
  white-space: nowrap;
}

.table td {
  padding: var(--space-3) var(--space-4);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.table tr:last-child td {
  border-bottom: none;
}

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

/* — Chart / Pie visual — */
.pie-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  margin-top: var(--space-5);
}

.pie-legend__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.pie-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* — Flow Diagram — */
.flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.flow__step {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  text-align: center;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.flow__arrow {
  color: var(--text-tertiary);
  font-size: var(--text-lg);
}

@media (min-width: 768px) {
  .flow {
    flex-direction: row;
    gap: 0;
  }

  .flow__step {
    flex: 1;
  }

  .flow__arrow {
    flex-shrink: 0;
  }
}


/* ============================================================
   13. ANIMATIONS & KEYFRAMES
   ============================================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes progressBar {
  from {
    width: 0%;
  }
  to {
    width: var(--progress-width, 100%);
  }
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

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

@keyframes rotate-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes glow-pulse {
  0%, 100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.7;
  }
}

/* — Animation Utility Classes — */
.animate-fadeIn {
  animation: fadeIn var(--duration-slow) var(--ease-out-expo) forwards;
}

.animate-slideUp {
  animation: slideUp var(--duration-slow) var(--ease-out-expo) forwards;
}

.animate-slideDown {
  animation: slideDown var(--duration-slow) var(--ease-out-expo) forwards;
}

.animate-slideInLeft {
  animation: slideInLeft var(--duration-slow) var(--ease-out-expo) forwards;
}

.animate-slideInRight {
  animation: slideInRight var(--duration-slow) var(--ease-out-expo) forwards;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-glow-pulse {
  animation: glow-pulse 3s ease-in-out infinite;
}

/* Staggered children (applied to parent) */
.stagger > * {
  opacity: 0;
  animation: slideUp var(--duration-slow) var(--ease-out-expo) forwards;
}

.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 80ms; }
.stagger > *:nth-child(3) { animation-delay: 160ms; }
.stagger > *:nth-child(4) { animation-delay: 240ms; }
.stagger > *:nth-child(5) { animation-delay: 320ms; }
.stagger > *:nth-child(6) { animation-delay: 400ms; }
.stagger > *:nth-child(7) { animation-delay: 480ms; }
.stagger > *:nth-child(8) { animation-delay: 560ms; }
.stagger > *:nth-child(9) { animation-delay: 640ms; }
.stagger > *:nth-child(10) { animation-delay: 720ms; }

/* Scroll-triggered animation (used with IntersectionObserver) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--duration-slower) var(--ease-out-expo),
    transform var(--duration-slower) var(--ease-out-expo);
}

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

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

.reveal--left.is-visible {
  transform: translateX(0);
}

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

.reveal--right.is-visible {
  transform: translateX(0);
}

.reveal--scale {
  transform: scale(0.95);
}

.reveal--scale.is-visible {
  transform: scale(1);
}

/* Progress bar component */
.progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  width: 0%;
  transition: width 1.2s var(--ease-out-expo);
}

.progress__bar.is-animated {
  animation: progressBar 1.2s var(--ease-out-expo) forwards;
}


/* --- TOC Sidebar Base --- */
.toc-sidebar {
  position: fixed;
  top: 40% !important;
  right: var(--space-5);
  transform: translateY(-50%);
  z-index: var(--z-overlay);
  display: none;
}

/* English version sidebar (uses #sidebar-toc with inline styles) */
#sidebar-toc {
  top: 40% !important;
}

@media (min-width: 1200px) {
  .toc-sidebar { display: block; }
  #sidebar-toc { display: block !important; }
}


/* ============================================================
   14. MOBILE RESPONSIVE (375px - 767px)
   ============================================================ */
@media (max-width: 767px) {
  /* --- Container --- */
  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  /* --- Hero Section --- */
  .hero {
    min-height: auto;
    padding: var(--space-10) var(--space-4) var(--space-8);
  }

  .hero__title {
    font-size: var(--text-3xl);
    letter-spacing: -0.02em;
  }

  .hero__subtitle {
    font-size: var(--text-base);
    margin-bottom: var(--space-6);
  }

  .hero__logo {
    width: 80px !important;
    height: 80px !important;
  }


  .hero__meta {
    gap: var(--space-4);
    margin-top: var(--space-6);
  }

  .hero__meta-value {
    font-size: var(--text-sm);
  }

  .hero__btn-group {
    flex-direction: column;
    width: 100%;
  }

  .hero__btn-group .btn {
    width: 100%;
    justify-content: center;
  }

  /* --- Chapters --- */
  .chapter {
    padding: var(--space-8) 0;
  }

  .chapter__number {
    font-size: var(--text-4xl);
    opacity: 0.05;
    top: var(--space-4);
    right: var(--space-4);
  }

  .chapter__title {
    font-size: var(--text-2xl);
  }

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

  .chapter__body p {
    font-size: var(--text-base);
  }

  /* --- Stats Grid --- */
  .stats__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }

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

  .stat-card__value {
    font-size: var(--text-3xl);
  }

  .stat-card__label {
    font-size: var(--text-xs);
  }

  /* --- Grid System --- */
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  /* --- Glass Cards --- */
  .glass__body {
    padding: var(--space-4);
  }

  .glass__header {
    padding: var(--space-4) var(--space-4) 0;
  }

  .glass__footer {
    padding: 0 var(--space-4) var(--space-4);
  }

  /* --- Timeline --- */
  .timeline__track {
    padding-left: var(--space-5);
  }

  .timeline__dot {
    left: calc(-1 * var(--space-5) + 4px);
    width: 12px;
    height: 12px;
  }

  .timeline__item {
    padding-bottom: var(--space-6);
  }

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

  /* --- Tables --- */
  .table-wrap {
    margin-left: calc(-1 * var(--space-4));
    margin-right: calc(-1 * var(--space-4));
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

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

  .table th,
  .table td {
    padding: var(--space-2) var(--space-3);
  }

  /* --- Tax Flow --- */
  .tax-flow__pct {
    font-size: var(--text-xl);
    min-width: 3rem;
  }

  .tax-flow__label {
    font-size: var(--text-xs);
    min-width: 70px;
  }

  /* --- Flow Diagram --- */
  .flow {
    gap: var(--space-2);
  }

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

  .flow__arrow {
    transform: rotate(90deg);
    font-size: var(--text-base);
  }

  /* --- Buttons --- */
  .btn--lg {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
  }

  /* --- Section Padding --- */
  .stats {
    padding: var(--space-8) 0;
  }

  .timeline {
    padding: var(--space-8) 0;
  }

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

  .site-footer__links {
    gap: var(--space-3) var(--space-5);
  }

  /* --- TOC Sidebar --- */
  .toc-sidebar {
    display: none !important;
  }

  /* --- Tech Cards --- */
  .tech-card {
    padding: var(--space-4);
  }

  .tech-card__icon {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-3);
  }

  .tech-card__title {
    font-size: var(--text-base);
  }

  /* --- Pie Legend --- */
  .pie-legend {
    gap: var(--space-2) var(--space-4);
  }

  .pie-legend__item {
    font-size: var(--text-xs);
  }
}

/* Tablet (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
  .container {
    padding-left: var(--space-5);
    padding-right: var(--space-5);
  }

  .toc-sidebar {
    display: none !important;
  }
}


/* ============================================================
   15. SECTION: SPECIFIC CARD VARIANTS
   ============================================================ */

/* Token distribution card */
.token-distribution {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .token-distribution {
    grid-template-columns: 1fr 1fr;
  }
}

.token-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
}

.token-item__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.token-item__info {
  flex: 1;
}

.token-item__name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.token-item__pct {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* Tax flow cards */
.tax-flow {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.tax-flow__item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.tax-flow__pct {
  font-family: 'Inter', sans-serif;
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--primary);
  min-width: 4rem;
  text-align: right;
}

.tax-flow__bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.tax-flow__bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-deep) 100%);
  transition: width 1s var(--ease-out-expo);
}

.tax-flow__label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  min-width: 100px;
}

/* Architecture / tech stack cards */
.tech-card {
  padding: var(--space-6);
}

.tech-card__icon {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

.tech-card__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-2);
}

.tech-card__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
}


/* ============================================================
   16. SCROLLBAR STYLING
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}


/* ============================================================
   THEME TOGGLE & LANGUAGE SWITCHER
   ============================================================ */

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-modal);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: rgba(15, 15, 26, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  transition: background var(--duration-normal) ease;
}

[data-theme="light"] .top-bar {
  background: rgba(255, 255, 255, 0.85);
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.theme-toggle {
  position: relative;
  width: 56px;
  height: 28px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-glass);
  cursor: pointer;
  transition: all var(--duration-normal) ease;
  display: flex;
  align-items: center;
  padding: 0 2px;
}

.theme-toggle:hover {
  border-color: var(--primary);
  background: var(--primary-subtle);
}

.theme-toggle__track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
}

.theme-toggle__icon {
  font-size: 14px;
  line-height: 1;
  transition: opacity var(--duration-fast) ease;
  z-index: 1;
}

.theme-toggle__thumb {
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

[data-theme="light"] .theme-toggle__thumb {
  transform: translateY(-50%) translateX(28px);
}

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

.lang-dropdown {
  position: relative;
}

.lang-dropdown__trigger {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  white-space: nowrap;
}

.lang-dropdown__trigger:hover {
  color: var(--text-primary);
  border-color: var(--primary);
  background: var(--primary-subtle);
}

.lang-dropdown__trigger::after {
  content: '\25BE';
  font-size: 10px;
  transition: transform var(--duration-fast) ease;
}

.lang-dropdown.is-open .lang-dropdown__trigger::after {
  transform: rotate(180deg);
}

.lang-dropdown__menu {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  min-width: 160px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--space-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--duration-fast) var(--ease-out-expo);
}

.lang-dropdown.is-open .lang-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  text-decoration: none;
}

.lang-dropdown__item:hover {
  background: var(--primary-subtle);
  color: var(--primary);
}

.lang-dropdown__item.is-active {
  color: var(--primary);
  background: var(--primary-subtle);
  font-weight: var(--weight-semibold);
}

.lang-dropdown__flag {
  font-size: 18px;
  line-height: 1;
}

@media (max-width: 767px) {
  .top-bar {
    padding: var(--space-2) var(--space-3);
    gap: var(--space-2);
  }

  .lang-dropdown__trigger {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-2);
  }

  .lang-dropdown__trigger .lang-name {
    display: none;
  }

  .lang-dropdown__menu {
    min-width: 140px;
    right: 0;
    left: auto;
  }

  .theme-toggle {
    width: 48px;
    height: 24px;
    flex-shrink: 0;
  }

  .theme-toggle__thumb {
    width: 18px;
    height: 18px;
  }

  [data-theme="light"] .theme-toggle__thumb {
    transform: translateY(-50%) translateX(24px);
  }
}


body {
  padding-top: 44px;
}


/* ============================================================
   17. PRINT STYLES
   ============================================================ */
@media print {
  .kevlar-bg::before,
  .kevlar-bg::after,
  .glow-orb,
  .stagger > * {
    animation: none !important;
    opacity: 1 !important;
  }

  body {
    background: white;
    color: #1A1A2E;
  }

  .glass {
    backdrop-filter: none;
    background: #F8F8FA;
    border-color: #E0E0E6;
  }

  .text-gradient {
    -webkit-text-fill-color: #6D28D9;
    color: #6D28D9;
  }

  h1, h2, h3, h4, h5, h6 {
    color: #1A1A2E;
  }

  p, .stat-card__label {
    color: #444;
  }
}


/* ============================================================
   18. ACCESSIBILITY: REDUCED MOTION
   ============================================================ */
@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;
  }

  .stagger > * {
    opacity: 1;
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
