@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

:root {
  --bg-main: #09090b;
  --bg-surface: #131316;
  --bg-surface-hover: #1c1c20;
  
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --border-subtle: #232327;
  --border-strong: #34343a;

  --grid-line-color: rgba(255, 255, 255, 0.05);

  --accent: #4FACFE;
  --accent-hover: #7fc4fe;

  --theme-1: var(--accent);
  --theme-2: var(--accent);

  /* Framework hues */
  --hue-varian:        #4FACFE;
  --hue-aurora-1:      #4FACFE;
  --hue-aurora-2:      #00F2FE;
  --hue-zenith:        #5b9cff;
  --hue-lumen:         #f5b829;
  --hue-kiln:          #f97316;
  --hue-constellation: #a78bfa;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 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: clamp(1.5rem, 4vw, 2.25rem);
  --text-4xl: clamp(1.75rem, 4.5vw, 2.75rem);
  --text-5xl: clamp(2rem, 5vw, 3.25rem);
  --text-6xl: clamp(2.5rem, 6vw, 4rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;

  --shadow-card: 0 1px 2px rgba(0,0,0,.3), 0 12px 28px -12px rgba(0,0,0,.5);
  --shadow-button: 0 2px 8px rgba(0,0,0,.4);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light theme */
.theme-light {
  --bg-main: #FBFCFF;
  --bg-surface: #f1f5f9;
  --bg-surface-hover: #e2e8f0;
  --text-primary: #0B1020;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --grid-line-color: rgba(0, 0, 0, 0.06);
}

/* Per-page themes */
.theme-aurora { --theme-1: #4FACFE; --theme-2: #00F2FE; }
.theme-zenith { --theme-1: #5b9cff; --theme-2: #5b9cff; }
.theme-kiln { --theme-1: #f59e0b; --theme-2: #f59e0b; }
.theme-constellation { --theme-1: #a78bfa; --theme-2: #a78bfa; }
.theme-lumen-light { --theme-1: #f5b829; --theme-2: #f5b829; }

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

html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
html body { background-color: var(--bg-main); color: var(--text-primary); }

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
}

h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }

::selection { background: color-mix(in srgb, var(--theme-1) 30%, transparent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-1) 45%, transparent); }

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

.material-symbols-outlined { font-variation-settings: 'wght' 400, 'opsz' 24; vertical-align: middle; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.gradient-text {
  background: linear-gradient(135deg, var(--theme-1), var(--theme-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* Components */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-brand img { border-radius: 6px; }

.nav-links {
  display: flex;
  gap: var(--space-6);
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
  font-size: var(--text-sm);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.hero {
  padding: var(--space-24) 0 var(--space-16);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, var(--grid-line-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line-color) 1px, transparent 1px);
  background-position: center;
  mask-image: radial-gradient(ellipse 60% 60% at center, black 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at center, black 10%, transparent 70%);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}

.hero p {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto var(--space-8);
  line-height: 1.6;
}

.button-group {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--text-base);
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  gap: var(--space-2);
}

.btn-primary {
  background: var(--theme-1);
  color: #000;
  box-shadow: var(--shadow-button);
}

.btn-primary:hover {
  opacity: .9;
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--text-muted);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  padding: var(--space-16) 0;
}

.feature-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  border-color: var(--border-strong);
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: color-mix(in srgb, var(--theme-1) 12%, transparent);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  color: var(--theme-1);
  font-size: 22px;
}

.feature-card h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
  font-weight: 600;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.code-block {
  background: #000;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--space-6) 0;
}

.code-block-header {
  background: var(--bg-surface);
  padding: var(--space-2) var(--space-4);
  display: flex;
  gap: var(--space-2);
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.code-block-body {
  padding: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.7;
  overflow-x: auto;
  color: #e4e4e7;
}

.code-block-dot { width: 10px; height: 10px; border-radius: 50%; }
.code-block-dot.red { background: #ff5f56; }
.code-block-dot.yellow { background: #ffbd2e; }
.code-block-dot.green { background: #27c93f; }

.token-keyword { color: #ff79c6; }
.token-string { color: #f1fa8c; }
.token-function { color: #50fa7b; }
.token-type { color: #8be9fd; }
.token-operator { color: #ff79c6; }
.token-comment { color: #6272a4; }
.token-number { color: #bd93f9; }
.token-builtin { color: #8be9fd; }
.token-tag { color: #ff79c6; }
.token-attr { color: #f1fa8c; }
.token-selector { color: #e5c07b; }

.code-block .code-block-body pre {
  background: none;
  padding: 0;
  border: none;
  border-radius: 0;
  margin: 0;
  overflow: visible;
}

.section-title {
  font-size: var(--text-3xl);
  text-align: center;
  margin-bottom: var(--space-2);
}

.section-subtitle {
  color: var(--text-secondary);
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-12);
  font-size: var(--text-lg);
  line-height: 1.6;
}

footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-8) 0;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-16);
}

/* ====== Ambient background video ====== */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.ambient-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
  filter: blur(60px) saturate(1.2);
  transform: scale(1.1);
}
.theme-light .ambient-bg video {
  opacity: 0.10;
  filter: blur(70px) saturate(1.1);
  mix-blend-mode: multiply;
}
.ambient-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%,
              transparent 0%,
              var(--bg-main) 75%);
}
@media (prefers-reduced-motion: reduce) {
  .ambient-bg video { display: none; }
  .ambient-bg {
    background: url(/aurora-bg.jpg) center/cover no-repeat;
    opacity: 0.12;
    filter: blur(60px);
  }
}
.ambient-bg-strong video { opacity: 0.20; }

/* ====== Over-video text brightening ====== */
.over-video { position: relative; }
.over-video h1, .over-video h2 { color: #ffffff; text-shadow: 0 1px 30px rgba(0,0,0,.4); }
.theme-light .over-video h1, .theme-light .over-video h2 { color: var(--text-primary); text-shadow: none; }
.over-video p { color: color-mix(in srgb, var(--text-primary) 88%, white); }

/* ====== Framework block glows ====== */
.fw-block { position: relative; isolation: isolate; }
.fw-block::before {
  content: "";
  position: absolute;
  inset: -10% -5%;
  z-index: -1;
  border-radius: var(--radius-2xl);
  opacity: .10;
  filter: blur(80px);
  background: radial-gradient(60% 60% at 50% 0%, var(--fw-hue), transparent 70%);
}
.theme-light .fw-block::before { opacity: .06; }
.fw-aurora        { --fw-hue: var(--hue-aurora-2); }
.fw-zenith        { --fw-hue: var(--hue-zenith); }
.fw-lumen         { --fw-hue: var(--hue-lumen); }
.fw-kiln          { --fw-hue: var(--hue-kiln); }
.fw-constellation { --fw-hue: var(--hue-constellation); }

/* ====== Section utility ====== */
.section { padding: var(--space-24) 0; }
@media (max-width: 768px) { .section { padding: var(--space-16) 0; } }

/* ====== Fluid hero heading ====== */
.hero h1 { font-size: clamp(2.75rem, 6vw, 4.5rem); }

/* ====== Stats band ====== */
.stat-band {
  display: flex;
  justify-content: center;
  gap: var(--space-12);
  padding: var(--space-12) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin: var(--space-12) 0;
}
.stat-item { text-align: center; }
.stat-number {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: var(--space-1);
}
.stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
@media (max-width: 640px) { .stat-band { gap: var(--space-6); flex-wrap: wrap; } }

/* ====== Section eyebrow ====== */
.eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

/* ====== Card top highlight ====== */
.feature-card {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.theme-light .feature-card {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

/* ====== 3-column footer ====== */
.footer-main {
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-16) 0 var(--space-8);
  margin-top: var(--space-16);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-12);
  max-width: 920px;
  margin: 0 auto;
}
.footer-col h4 {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: var(--space-2); }
.footer-col a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  text-align: center;
  padding: var(--space-6) 0;
  color: var(--text-muted);
  font-size: var(--text-xs);
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--space-8);
}
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); } }

/* ====== Material icon weight standardize ====== */
.material-symbols-outlined { font-variation-settings: 'wght' 350, 'opsz' 24, 'GRAD' 0; }
.feature-icon .material-symbols-outlined { font-variation-settings: 'wght' 400, 'opsz' 28; }

/* ====== Theme toggle ====== */
.btn-theme-toggle {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  margin-left: var(--space-4);
}
.btn-theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}
.btn-theme-toggle .material-symbols-outlined { font-size: 18px; }

/* ====== Responsive Navigation Drawer & Sidebar Collapsing ====== */

/* Shared Toggle Button style (previously duplicate across pages) */
.btn-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  margin-left: var(--space-2);
}
.btn-nav-toggle:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}
.btn-nav-toggle .material-symbols-outlined { font-size: 18px; }

@media (max-width: 720px) {
  body.nav-open-active {
    overflow: hidden;
  }

  /* Mobile-only: let wide code blocks and tables scroll horizontally instead of
     breaking the layout. Kept out of the desktop cascade so doc-page tables
     still render as normal full-width tables on desktop. */
  pre {
    max-width: 100%;
    overflow-x: auto;
  }
  .markdown-body table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .btn-nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 1001;
  }
  
  /* Make the drawer float above everything */
  .nav-links {
    display: flex !important;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: color-mix(in srgb, var(--bg-main) 90%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-subtle);
    padding: var(--space-24) var(--space-6) var(--space-8);
    flex-direction: column !important;
    gap: var(--space-4);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
    margin: 0;
    align-items: flex-start;
  }

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

  .nav-links a {
    font-size: var(--text-lg);
    font-weight: 600;
    padding: var(--space-2) 0;
    width: 100%;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
  }
  
  .nav-links a.active {
    color: var(--accent) !important;
  }
  
  /* Scrim/Overlay background */
  .nav-scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
  }
  
  .nav-scrim.scrim-open {
    opacity: 1;
    pointer-events: auto;
  }
  
  /* Collapsible docs sidebar */
  .docs-sidebar {
    width: 100% !important;
    height: auto !important;
    position: static !important;
    top: auto !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    padding-top: var(--space-2) !important;
    margin-bottom: var(--space-4) !important;
  }
  
  .docs-sidebar-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: pointer;
    margin-bottom: var(--space-4);
    transition: all var(--transition-fast);
  }
  
  .docs-sidebar-toggle:hover {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 5%, var(--bg-surface));
  }
  
  .docs-sidebar-toggle .material-symbols-outlined {
    font-size: 20px;
    color: var(--text-secondary);
  }
  
  .docs-sidebar > ul {
    display: none;
    padding: var(--space-2) var(--space-2) var(--space-6);
  }
  
  .docs-sidebar.sidebar-expanded > ul {
    display: block;
  }
}
