/* ===================================================================
   PokéDreamer Docs — style.css
   Dark mode, glassmorphism, premium design system
   =================================================================== */

/* ── Custom Properties ─────────────────────────────────────────── */
:root {
  --bg-base:       #060612;
  --bg-surface:    #0d0d1f;
  --bg-elevated:   #12122a;

  --primary:       #7c3aed;
  --primary-light: #9d5ff5;
  --primary-glow:  rgba(124, 58, 237, 0.35);

  --accent:        #06b6d4;
  --accent-light:  #22d3ee;
  --accent-glow:   rgba(6, 182, 212, 0.3);

  --gold:          #f59e0b;
  --gold-light:    #fbbf24;
  --gold-glow:     rgba(245, 158, 11, 0.3);

  --success:       #10b981;
  --warn:          #f59e0b;
  --danger:        #ef4444;

  --text-primary:  #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:    #64748b;

  --border:        rgba(255,255,255,0.08);
  --border-active: rgba(124, 58, 237, 0.5);

  --glass-bg:      rgba(255, 255, 255, 0.04);
  --glass-border:  rgba(255, 255, 255, 0.1);

  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --radius-xl:     28px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.6);
  --shadow-glow:0 0 40px var(--primary-glow);

  --nav-h: 64px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Theme-specific variables for items hardcoded dark */
  --navbar-bg: rgba(6, 6, 18, 0.85);
  --navbar-shadow: 0 4px 30px rgba(0,0,0,0.5);
  --nav-links-bg: rgba(6, 6, 18, 0.98);
  --nav-hover-bg: rgba(255, 255, 255, 0.07);
  --grid-color: rgba(255, 255, 255, 0.03);
  --sidebar-hover-bg: rgba(255, 255, 255, 0.06);
  --table-border: rgba(255, 255, 255, 0.04);
  --table-hover-bg: rgba(255, 255, 255, 0.03);
  --table-header-bg: rgba(255, 255, 255, 0.04);
  --orb-opacity: 0.18;
  
  /* Keep code blocks dark for readability */
  --code-block-bg: #060612;
  --code-block-header-bg: rgba(255, 255, 255, 0.04);
  --code-block-text: #e2e8f0;
  --code-block-border: rgba(255, 255, 255, 0.08);

  /* Button variables */
  --btn-secondary-bg: rgba(255, 255, 255, 0.07);
  --btn-secondary-border: rgba(255, 255, 255, 0.15);
  --btn-secondary-hover-bg: rgba(255, 255, 255, 0.12);
  --btn-secondary-hover-border: rgba(255, 255, 255, 0.3);
  --btn-ghost-border: rgba(255, 255, 255, 0.15);
  --btn-ghost-hover-bg: rgba(255, 255, 255, 0.05);

  --btn-primary-bg: rgba(124, 58, 237, 0.1);
  --btn-primary-border: rgba(124, 58, 237, 0.3);
  --btn-primary-text: #a78bfa;
  --btn-primary-hover-bg: rgba(124, 58, 237, 0.2);
  --btn-primary-hover-border: rgba(124, 58, 237, 0.5);
  --btn-primary-hover-text: #c084fc;
}

[data-theme="light"] {
  --bg-base:       #f8fafc;
  --bg-surface:    #ffffff;
  --bg-elevated:   #f1f5f9;

  --primary:       #6d28d9;
  --primary-light: #7c3aed;
  --primary-glow:  rgba(109, 40, 217, 0.12);

  --accent:        #0891b2;
  --accent-light:  #06b6d4;
  --accent-glow:   rgba(8, 145, 178, 0.12);

  --gold:          #d97706;
  --gold-light:    #f59e0b;
  --gold-glow:     rgba(217, 119, 6, 0.12);

  --text-primary:  #0f172a;
  --text-secondary:#475569;
  --text-muted:    #64748b;

  --border:        rgba(15, 23, 42, 0.08);
  --border-active: rgba(109, 40, 217, 0.4);

  --glass-bg:      rgba(15, 23, 42, 0.03);
  --glass-border:  rgba(15, 23, 42, 0.08);

  --shadow-sm:  0 1px 3px rgba(15,23,42,0.05);
  --shadow-md:  0 4px 16px rgba(15,23,42,0.08);
  --shadow-lg:  0 8px 40px rgba(15,23,42,0.12);
  --shadow-glow:0 0 30px var(--primary-glow);

  --navbar-bg: rgba(248, 250, 252, 0.85);
  --navbar-shadow: 0 4px 30px rgba(15,23,42,0.06);
  --nav-links-bg: rgba(248, 250, 252, 0.98);
  --nav-hover-bg: rgba(15, 23, 42, 0.05);
  --grid-color: rgba(15, 23, 42, 0.03);
  --sidebar-hover-bg: rgba(15, 23, 42, 0.05);
  --table-border: rgba(15, 23, 42, 0.06);
  --table-hover-bg: rgba(15, 23, 42, 0.02);
  --table-header-bg: rgba(15, 23, 42, 0.04);
  --orb-opacity: 0.08;
  
  /* Keep code blocks dark for high contrast dev styling */
  --code-block-bg: #0d0d1f;
  --code-block-header-bg: rgba(255, 255, 255, 0.04);
  --code-block-text: #e2e8f0;
  --code-block-border: rgba(255, 255, 255, 0.08);

  /* Button variables */
  --btn-secondary-bg: rgba(15, 23, 42, 0.05);
  --btn-secondary-border: rgba(15, 23, 42, 0.12);
  --btn-secondary-hover-bg: rgba(15, 23, 42, 0.08);
  --btn-secondary-hover-border: rgba(15, 23, 42, 0.2);
  --btn-ghost-border: rgba(15, 23, 42, 0.12);
  --btn-ghost-hover-bg: rgba(15, 23, 42, 0.04);

  --btn-primary-bg: #f5f3ff;
  --btn-primary-border: #ddd6fe;
  --btn-primary-text: #6d28d9;
  --btn-primary-hover-bg: #ede9fe;
  --btn-primary-hover-border: #c4b5fd;
  --btn-primary-hover-text: #5b21b6;
}


/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: var(--accent-light); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Utility ───────────────────────────────────────────────────── */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 50%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.glass-card:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

/* ── Navbar ────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: var(--navbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}
.navbar.scrolled { box-shadow: var(--navbar-shadow); }
.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.nav-logo { font-size: 1.3rem; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--nav-hover-bg);
}
.nav-cta {
  margin-left: 8px;
  padding: 6px 14px;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.4);
  border-radius: var(--radius-sm);
  color: var(--primary-light) !important;
}
.nav-cta:hover {
  background: rgba(124,58,237,0.3) !important;
  border-color: var(--primary-light);
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.25s ease;
  margin-left: 12px;
  position: relative;
  overflow: hidden;
}
.theme-toggle:hover {
  color: var(--text-primary);
  background: var(--nav-hover-bg);
  border-color: var(--border-active);
  transform: translateY(-1px);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  position: absolute;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}
.theme-toggle .sun-icon {
  opacity: 0;
  transform: rotate(90deg) scale(0);
}
.theme-toggle .moon-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
[data-theme="light"] .theme-toggle .sun-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
[data-theme="light"] .theme-toggle .moon-icon {
  opacity: 0;
  transform: rotate(-90deg) scale(0);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: var(--orb-opacity);
  animation: float 8s ease-in-out infinite alternate;
  transition: opacity 0.3s ease;
}
.orb-1 {
  width: 500px; height: 500px;
  background: var(--primary);
  top: -100px; left: -100px;
  animation-delay: 0s;
}
.orb-2 {
  width: 400px; height: 400px;
  background: var(--accent);
  top: 20%; right: -80px;
  animation-delay: 2s;
}
.orb-3 {
  width: 350px; height: 350px;
  background: var(--gold);
  bottom: 0; left: 30%;
  animation-delay: 4s;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}
@keyframes float {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(30px, 20px) scale(1.08); }
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 60px 24px;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid;
  transition: all 0.2s;
}
.badge:hover { transform: translateY(-2px); }
.badge-hf   { background: rgba(255, 160, 0, 0.1); border-color: rgba(255,160,0,0.4); color: #fbbf24; }
.badge-dataset { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.4); color: #34d399; }
.badge-gh   { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.2); color: var(--text-primary); }
.badge-research { background: rgba(124,58,237,0.15); border-color: rgba(124,58,237,0.4); color: var(--primary-light); }

.hero-title {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 900;
  letter-spacing: -3px;
  line-height: 1;
  margin-bottom: 16px;
}
.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}
.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-desc strong { color: var(--text-primary); }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 48px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  text-decoration: none !important;
}
.btn-primary {
  background: var(--btn-primary-bg) !important;
  border: 1px solid var(--btn-primary-border) !important;
  color: var(--btn-primary-text) !important;
  box-shadow: none !important;
}
.btn-primary:hover {
  background: var(--btn-primary-hover-bg) !important;
  border-color: var(--btn-primary-hover-border) !important;
  color: var(--btn-primary-hover-text) !important;
  transform: translateY(-2px);
  box-shadow: none !important;
}
.btn-secondary {
  background: var(--btn-secondary-bg);
  border: 1px solid var(--btn-secondary-border);
  color: var(--text-primary) !important;
}
.btn-secondary:hover {
  background: var(--btn-secondary-hover-bg);
  border-color: var(--btn-secondary-hover-border);
  color: var(--text-primary) !important;
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--btn-ghost-border);
  color: var(--text-secondary) !important;
}
.btn-ghost:hover {
  background: var(--btn-ghost-hover-bg);
  color: var(--text-primary) !important;
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 20px 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  max-width: 700px;
  margin: 0 auto;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
}
.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-light), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}
.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
  white-space: nowrap;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: bounce 1.5s ease-in-out infinite;
  margin: 0 auto;
}
@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translate(0,0); opacity: 0.6; }
  50% { transform: rotate(45deg) translate(4px, 4px); opacity: 1; }
}

/* ── Sections ──────────────────────────────────────────────────── */
.section {
  padding: 96px 0;
}
.section-dark { background: var(--bg-surface); }
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 16px;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}
.section-desc em { color: var(--accent-light); font-style: normal; }

/* ── Concept Cards ─────────────────────────────────────────────── */
.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.concept-card {
  padding: 28px 24px;
}
.concept-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}
.concept-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.concept-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Timeline ──────────────────────────────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent), var(--gold));
  opacity: 0.4;
}
.timeline-item {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}
.timeline-marker {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}
.timeline-item[data-version="v1"] .timeline-marker {
  background: linear-gradient(135deg, var(--primary), #9333ea);
  box-shadow: 0 0 20px var(--primary-glow);
}
.timeline-item[data-version="v2"] .timeline-marker {
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  box-shadow: 0 0 20px var(--accent-glow);
}
.timeline-item[data-version="v3"] .timeline-marker {
  background: linear-gradient(135deg, var(--gold), #f97316);
  box-shadow: 0 0 20px var(--gold-glow);
}
.timeline-content {
  flex: 1;
  padding: 28px;
}
.timeline-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.timeline-header h3 { font-size: 1.2rem; font-weight: 700; }
.version-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.v1-badge { background: rgba(124,58,237,0.2); color: var(--primary-light); border: 1px solid rgba(124,58,237,0.4); }
.v2-badge { background: rgba(6,182,212,0.2); color: var(--accent-light); border: 1px solid rgba(6,182,212,0.4); }
.v3-badge { background: rgba(245,158,11,0.2); color: var(--gold-light); border: 1px solid rgba(245,158,11,0.4); }
.timeline-content p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.65; margin-bottom: 18px; }
.timeline-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.metric {
  display: flex;
  flex-direction: column;
  padding: 8px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}
.metric-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-light);
  font-family: var(--font-mono);
}
.metric-lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 2px;
}
.timeline-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.2s;
}
.timeline-link:hover { color: var(--accent-light); }

/* ── Results ───────────────────────────────────────────────────── */
.results-block {
  margin-bottom: 64px;
}
.results-subtitle {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.result-icon { font-size: 1.4rem; }
.results-desc {
  color: var(--text-secondary);
  max-width: 800px;
  margin-bottom: 24px;
  line-height: 1.7;
  font-size: 0.95rem;
}
.results-desc strong { color: var(--text-primary); }

.table-wrapper { overflow-x: auto; margin-bottom: 24px; border-radius: var(--radius-md); }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  font-family: var(--font-mono);
}
.data-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--table-header-bg);
  border-bottom: 1px solid var(--border);
}
.data-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--table-border);
  color: var(--text-secondary);
}
.data-table tbody tr:hover td { background: var(--table-hover-bg); }
.highlight-cell { color: var(--accent-light) !important; font-weight: 600; }
.warn-cell { color: var(--warn) !important; }
.improvement { color: var(--success) !important; font-weight: 700; }
.best-improvement { color: var(--accent-light) !important; }

.chart-container {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 16px;
}

/* Comparison table */
.comparison-table-wrapper { overflow-x: auto; padding: 0; }
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.comparison-table thead th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  background: var(--table-header-bg);
}
.comparison-table .v1-col { color: var(--primary-light); }
.comparison-table .v2-col { color: var(--accent-light); }
.comparison-table thead .v1-col,
.comparison-table thead .v2-col { font-size: 0.85rem; text-transform: none; letter-spacing: 0; }
.comparison-table tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--table-border);
  vertical-align: top;
  color: var(--text-secondary);
  line-height: 1.5;
}
.comparison-table tbody tr:hover td { background: var(--table-hover-bg); }
.comparison-table .highlight-v2 {
  color: var(--accent-light);
  font-weight: 500;
}

/* ── Quick Start ───────────────────────────────────────────────── */
.quickstart-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}
.qs-step {
  display: flex;
  gap: 24px;
  padding: 28px;
  align-items: flex-start;
}
.qs-step-num {
  flex-shrink: 0;
  font-size: 2rem;
  font-weight: 900;
  font-family: var(--font-mono);
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  width: 52px;
}
.qs-step-content { flex: 1; }
.qs-step-content h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.qs-note {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.6;
}
.qs-note code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: rgba(255,255,255,0.07);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-light);
}
.code-block {
  background: var(--code-block-bg);
  border: 1px solid var(--code-block-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--code-block-header-bg);
  border-bottom: 1px solid var(--code-block-border);
}
.code-lang {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}
.copy-btn {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-sans);
  transition: all 0.2s;
}
.copy-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.08); }
.copy-btn.copied { color: var(--success); }
.code-block pre {
  padding: 16px 20px;
  overflow-x: auto;
}
.code-block code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--code-block-text);
  line-height: 1.7;
  white-space: pre;
}

/* ── Resources ─────────────────────────────────────────────────── */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.resource-card {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  cursor: pointer;
  color: inherit;
}
.resource-icon { font-size: 2rem; margin-bottom: 14px; }
.resource-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
.resource-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}
.resource-card p code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: rgba(255,255,255,0.07);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--accent-light);
}
.resource-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-light);
}
.resource-card:hover .resource-link { color: var(--accent-light); }

.citations {
  padding: 32px;
}
.citations h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }
.citation-list { display: flex; flex-direction: column; gap: 16px; }
.citation-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.cite-tag {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  background: rgba(6,182,212,0.15);
  border: 1px solid rgba(6,182,212,0.3);
  border-radius: 100px;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Footer ────────────────────────────────────────────────────── */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
}
.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  margin-bottom: 48px;
}
.footer-brand .footer-logo {
  font-size: 1.15rem;
  font-weight: 800;
  display: block;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.footer-brand p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.65; max-width: 320px; }
.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.footer-col h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-weight: 700;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-bottom a { color: var(--text-secondary); }

/* ── Page-specific: inner pages ────────────────────────────────── */
.page-hero {
  padding: calc(var(--nav-h) + 64px) 0 64px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: var(--primary);
  filter: blur(120px);
  opacity: 0.1;
}
.page-hero-content { position: relative; z-index: 1; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text-primary); }
.breadcrumb-sep { opacity: 0.4; }
.page-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 16px;
}
.page-subtitle { font-size: 1.05rem; color: var(--text-secondary); max-width: 580px; line-height: 1.65; }

/* ── Sidebar layout ────────────────────────────────────────────── */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px;
}
.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 10px;
  margin-top: 20px;
}
.sidebar-title:first-child { margin-top: 0; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all 0.2s;
  text-decoration: none;
}
.sidebar-link:hover, .sidebar-link.active {
  color: var(--text-primary);
  background: var(--sidebar-hover-bg);
}
.docs-content { min-width: 0; }

/* ── Prose styles ──────────────────────────────────────────────── */
.prose h2 {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin: 48px 0 16px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.prose h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.prose h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text-primary);
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.prose h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 20px 0 8px;
  color: var(--accent-light);
}
.prose p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 16px;
}
.prose strong { color: var(--text-primary); }
.prose em { color: var(--accent-light); font-style: normal; }
.prose code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-light);
}
.prose a { color: var(--primary-light); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--accent-light); }
.prose a.btn {
  text-decoration: none !important;
}
.prose a.btn-primary {
  color: var(--btn-primary-text) !important;
}
.prose a.btn-primary:hover {
  color: var(--btn-primary-hover-text) !important;
}
.prose a.btn-secondary {
  color: var(--text-primary) !important;
}
.prose a.btn-secondary:hover {
  color: var(--text-primary) !important;
}
.prose a.btn-ghost {
  color: var(--text-secondary) !important;
}
.prose a.btn-ghost:hover {
  color: var(--text-primary) !important;
}
.prose ul, .prose ol {
  padding-left: 20px;
  margin-bottom: 16px;
}
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.65;
}
.prose .callout {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin: 24px 0;
  border-left: 3px solid;
  font-size: 0.9rem;
  line-height: 1.65;
}
.callout-info {
  background: rgba(6,182,212,0.08);
  border-color: var(--accent);
  color: var(--text-secondary);
}
.callout-warn {
  background: rgba(245,158,11,0.08);
  border-color: var(--gold);
  color: var(--text-secondary);
}
.callout-danger {
  background: rgba(239,68,68,0.08);
  border-color: var(--danger);
  color: var(--text-secondary);
}
.callout-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

/* ── API Reference styles ──────────────────────────────────────── */
.api-class {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin-bottom: 40px;
  overflow: hidden;
}
.api-class-header {
  padding: 20px 24px;
  background: rgba(124,58,237,0.1);
  border-bottom: 1px solid var(--border);
}
.api-class-name {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-light);
}
.api-class-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 6px;
}
.api-class-body { padding: 24px; }
.api-method {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  overflow: hidden;
}
.api-method-sig {
  padding: 12px 16px;
  background: var(--table-hover-bg);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
}
.api-method-body { padding: 16px; }
.api-method-desc { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.65; }
.api-params { display: flex; flex-direction: column; gap: 8px; }
.api-param {
  display: grid;
  grid-template-columns: 140px 90px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 0.8rem;
}
.param-name { font-family: var(--font-mono); color: var(--accent-light); font-weight: 600; }
.param-type { font-family: var(--font-mono); color: var(--gold-light); }
.param-desc { color: var(--text-secondary); line-height: 1.5; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { display: none; }
  .footer-content { grid-template-columns: 1fr; gap: 40px; }
  .footer-links-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--nav-links-bg);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
    margin-left: 0;
  }
  .nav-links.open { display: flex; }
  .theme-toggle {
    margin-left: auto;
    margin-right: 12px;
  }
  .nav-toggle { display: flex; }
  .hero-stats { gap: 16px; padding: 16px 20px; }
  .stat-divider { display: none; }
  .stat-item { padding: 0 12px; }
  .qs-step { flex-direction: column; gap: 16px; }
  .timeline::before { display: none; }
  .timeline-item { flex-direction: column; }
  .timeline-marker { width: 44px; height: 44px; }
}
@media (max-width: 480px) {
  .section { padding: 64px 0; }
  .hero-title { letter-spacing: -2px; }
  .comparison-table { font-size: 0.8rem; }
}

