/* ============================================
   myst-markdown-tree-sitter.nvim — Website
   Dark theme with Neovim/MyST-inspired colors
   ============================================ */

/* --- Design Tokens --- */
:root {
  /* Core palette */
  --bg-deep: #0d1117;
  --bg-primary: #161b22;
  --bg-secondary: #1c2129;
  --bg-elevated: #21262d;
  --bg-code: #0d1117;

  /* Accent colors — Neovim green + MyST purple */
  --accent-green: #7ee787;
  --accent-green-dim: #3fb950;
  --accent-purple: #bc8cff;
  --accent-purple-dim: #8b5cf6;
  --accent-blue: #58a6ff;

  /* Text */
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --text-link: #58a6ff;

  /* Borders */
  --border-default: #30363d;
  --border-muted: #21262d;

  /* Code syntax colors */
  --syn-keyword: #ff7b72;
  --syn-string: #a5d6ff;
  --syn-func: #d2a8ff;
  --syn-number: #79c0ff;
  --syn-comment: #8b949e;
  --syn-var: #ffa657;
  --syn-module: #7ee787;
  --syn-op: #ff7b72;
  --syn-directive: #bc8cff;
  --syn-lang: #7ee787;
  --syn-math: #a5d6ff;

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

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Code', 'Cascadia Code', 'SF Mono', Menlo, monospace;

  /* Misc */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
  --max-width: 1120px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition);
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-elevated);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent-purple);
}

img {
  max-width: 100%;
}

ul {
  list-style: none;
}

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

/* ===========================
   Navigation
   =========================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-default);
  transition: background var(--transition);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
}

.nav-logo:hover {
  color: var(--accent-green);
}

.nav-logo-icon {
  display: flex;
  align-items: center;
  color: var(--accent-green);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition);
}

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

.nav-github {
  display: flex;
  align-items: center;
  color: var(--text-secondary) !important;
}

.nav-github:hover {
  color: var(--text-primary) !important;
}

/* Mobile nav toggle */
.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 var(--transition);
}

/* ===========================
   Hero
   =========================== */
.hero {
  position: relative;
  padding: calc(64px + var(--space-4xl)) 0 var(--space-4xl);
  text-align: center;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(
    ellipse at center,
    rgba(126, 231, 135, 0.08) 0%,
    rgba(188, 140, 255, 0.05) 40%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-green);
  background: rgba(126, 231, 135, 0.1);
  border: 1px solid rgba(126, 231, 135, 0.2);
  padding: 0.35em 1em;
  border-radius: 999px;
  margin-bottom: var(--space-xl);
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
}

.hero-title-myst {
  color: var(--accent-purple);
}

.hero-title-ts {
  color: var(--accent-green);
}

.hero-title-nvim {
  color: var(--text-secondary);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.7;
}

.hero-subtitle a {
  color: var(--accent-purple);
  text-decoration: underline;
  text-decoration-color: rgba(188, 140, 255, 0.3);
  text-underline-offset: 3px;
}

.hero-subtitle a:hover {
  text-decoration-color: var(--accent-purple);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-3xl);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.7em 1.6em;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-green-dim);
  color: #fff;
  border-color: var(--accent-green-dim);
}

.btn-primary:hover {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #0d1117;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(126, 231, 135, 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-default);
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* --- Hero Code Block --- */
.hero-code {
  max-width: 580px;
  margin: 0 auto;
  text-align: left;
}

/* ===========================
   Code Window
   =========================== */
.code-window {
  background: var(--cw-bg, var(--bg-code));
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: background 0.3s ease;
}

.code-window-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--cw-bar, var(--bg-elevated));
  border-bottom: 1px solid var(--border-default);
  flex-wrap: wrap;
  transition: background 0.3s ease;
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green { background: #28c840; }

.code-window-title {
  margin-left: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

/* --- Theme Tabs --- */
.theme-tabs {
  display: flex;
  gap: 2px;
  margin-left: auto;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 2px;
}

.theme-tab {
  padding: 3px 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.theme-tab:hover {
  color: var(--text-secondary);
}

.theme-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.code-block {
  padding: var(--space-lg);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--cw-fg, var(--text-primary));
  tab-size: 4;
  transition: color 0.3s ease;
}

.code-block code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* Syntax highlighting — uses code-window scoped vars with fallback */
.c-keyword { color: var(--cw-keyword, var(--syn-keyword)); transition: color 0.3s ease; }
.c-string { color: var(--cw-string, var(--syn-string)); transition: color 0.3s ease; }
.c-func { color: var(--cw-func, var(--syn-func)); transition: color 0.3s ease; }
.c-number { color: var(--cw-number, var(--syn-number)); transition: color 0.3s ease; }
.c-comment { color: var(--cw-comment, var(--syn-comment)); transition: color 0.3s ease; }
.c-var { color: var(--cw-var, var(--syn-var)); transition: color 0.3s ease; }
.c-module { color: var(--cw-module, var(--syn-module)); transition: color 0.3s ease; }
.c-op { color: var(--cw-op, var(--syn-op)); transition: color 0.3s ease; }
.c-directive { color: var(--cw-directive, var(--syn-directive)); font-weight: 600; transition: color 0.3s ease; }
.c-lang { color: var(--cw-lang, var(--syn-lang)); font-weight: 600; transition: color 0.3s ease; }
.c-math { color: var(--cw-math, var(--syn-math)); transition: color 0.3s ease; }

/* LaTeX syntax — also theme-aware */
.c-tex-cmd { color: var(--cw-func, #d2a8ff); transition: color 0.3s ease; }
.c-tex-brace { color: var(--cw-comment, #8b949e); transition: color 0.3s ease; }
.c-tex-env { color: var(--cw-module, #7ee787); transition: color 0.3s ease; }
.c-tex-var { color: var(--cw-fg, #e6edf3); transition: color 0.3s ease; }
.c-tex-op { color: var(--cw-op, #ff7b72); transition: color 0.3s ease; }
.c-tex-sup { color: var(--cw-number, #79c0ff); transition: color 0.3s ease; }

/* ===========================
   Theme Palettes
   =========================== */

/* GitHub Dark (default) */
.code-window[data-theme="github-dark"] {
  --cw-bg: #0d1117;
  --cw-bar: #161b22;
  --cw-fg: #e6edf3;
  --cw-keyword: #ff7b72;
  --cw-string: #a5d6ff;
  --cw-func: #d2a8ff;
  --cw-number: #79c0ff;
  --cw-comment: #8b949e;
  --cw-var: #ffa657;
  --cw-module: #7ee787;
  --cw-op: #ff7b72;
  --cw-directive: #bc8cff;
  --cw-lang: #7ee787;
  --cw-math: #a5d6ff;
}

/* Catppuccin Mocha */
.code-window[data-theme="catppuccin"] {
  --cw-bg: #1e1e2e;
  --cw-bar: #181825;
  --cw-fg: #cdd6f4;
  --cw-keyword: #cba6f7;
  --cw-string: #a6e3a1;
  --cw-func: #89b4fa;
  --cw-number: #fab387;
  --cw-comment: #6c7086;
  --cw-var: #f38ba8;
  --cw-module: #f9e2af;
  --cw-op: #89dceb;
  --cw-directive: #cba6f7;
  --cw-lang: #a6e3a1;
  --cw-math: #89b4fa;
}

/* Tokyo Night */
.code-window[data-theme="tokyonight"] {
  --cw-bg: #1a1b26;
  --cw-bar: #16161e;
  --cw-fg: #c0caf5;
  --cw-keyword: #bb9af7;
  --cw-string: #9ece6a;
  --cw-func: #7aa2f7;
  --cw-number: #ff9e64;
  --cw-comment: #565f89;
  --cw-var: #c0caf5;
  --cw-module: #2ac3de;
  --cw-op: #89ddff;
  --cw-directive: #bb9af7;
  --cw-lang: #9ece6a;
  --cw-math: #7aa2f7;
}

/* One Dark */
.code-window[data-theme="onedark"] {
  --cw-bg: #282c34;
  --cw-bar: #21252b;
  --cw-fg: #abb2bf;
  --cw-keyword: #c678dd;
  --cw-string: #98c379;
  --cw-func: #61afef;
  --cw-number: #d19a66;
  --cw-comment: #5c6370;
  --cw-var: #e06c75;
  --cw-module: #e5c07b;
  --cw-op: #56b6c2;
  --cw-directive: #c678dd;
  --cw-lang: #98c379;
  --cw-math: #61afef;
}

/* Inline code blocks (for troubleshooting) */
.code-inline {
  background: var(--bg-code);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
  overflow-x: auto;
  margin: var(--space-sm) 0;
}

/* ===========================
   Sections
   =========================== */
.section {
  padding: var(--space-4xl) 0;
}

.section-alt {
  background: var(--bg-primary);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: var(--space-3xl);
}

/* ===========================
   Features Grid
   =========================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.feature-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: border-color var(--transition), transform var(--transition);
}

.feature-card:hover {
  border-color: var(--accent-green-dim);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: var(--space-md);
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

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

/* ===========================
   Installation Tabs
   =========================== */
.install-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 3px;
  max-width: 280px;
  margin: 0 auto var(--space-xl);
}

.tab-btn {
  flex: 1;
  padding: 0.5em 1em;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
}

.tab-btn.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.tab-btn:hover:not(.active) {
  color: var(--text-primary);
}

.tab-content {
  display: none;
  max-width: 640px;
  margin: 0 auto var(--space-2xl);
}

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

/* --- Requirements --- */
.install-requirements {
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
}

.install-requirements h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.install-requirements ul {
  list-style: none;
}

.install-requirements li {
  padding: 0.4em 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  position: relative;
  padding-left: 1.2em;
}

.install-requirements li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-green-dim);
}

.install-requirements li a {
  color: var(--text-link);
}

/* ===========================
   Configuration
   =========================== */
.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.config-block h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.config-table-wrap {
  overflow-x: auto;
}

.config-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.config-table th {
  text-align: left;
  padding: 0.75em 1em;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.config-table td {
  padding: 0.75em 1em;
  border-bottom: 1px solid var(--border-muted);
  color: var(--text-secondary);
}

.config-table td:first-child {
  color: var(--accent-purple);
}

.config-table td code {
  font-size: 0.85em;
}

/* ===========================
   Supported Languages
   =========================== */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.lang-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: border-color var(--transition);
}

.lang-card:hover {
  border-color: var(--accent-purple-dim);
}

.lang-card.lang-featured {
  border-color: rgba(126, 231, 135, 0.3);
  background: rgba(126, 231, 135, 0.03);
}

.lang-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}

.lang-aliases {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.lang-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-green);
  background: rgba(126, 231, 135, 0.1);
  padding: 0.2em 0.6em;
  border-radius: 4px;
  margin-top: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lang-install-hint {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===========================
   Commands
   =========================== */
.commands-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.command-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  transition: border-color var(--transition);
}

.command-card:hover {
  border-color: var(--accent-purple-dim);
}

.command-name {
  margin-bottom: var(--space-sm);
}

.command-name code {
  font-size: 1rem;
  background: rgba(188, 140, 255, 0.12);
  color: var(--accent-purple);
  padding: 0.25em 0.6em;
}

.command-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===========================
   Troubleshooting (FAQ)
   =========================== */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item:hover {
  border-color: var(--text-muted);
}

.faq-item[open] {
  border-color: var(--accent-green-dim);
}

.faq-item summary {
  padding: var(--space-lg);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: color var(--transition);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 400;
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: var(--space-md);
}

.faq-item[open] summary::after {
  content: '−';
  color: var(--accent-green);
}

.faq-item[open] summary {
  color: var(--accent-green);
}

.faq-answer {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.faq-answer ol {
  padding-left: 1.4em;
  list-style: decimal;
}

.faq-answer ol li {
  margin-bottom: 0.4em;
}

.faq-answer p {
  margin-bottom: 0.6em;
}

/* ===========================
   Footer
   =========================== */
.footer {
  border-top: 1px solid var(--border-default);
  padding: var(--space-3xl) 0 var(--space-xl);
  background: var(--bg-primary);
}

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

.footer-logo {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.footer-about p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
}

.footer-org a {
  color: var(--accent-green-dim);
}

.footer-links-section h4 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.footer-links-section li {
  margin-bottom: var(--space-sm);
}

.footer-links-section a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

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

.footer-bottom {
  border-top: 1px solid var(--border-muted);
  padding-top: var(--space-xl);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-default);
    flex-direction: column;
    padding: var(--space-md) var(--space-lg);
    gap: var(--space-sm);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

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

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .hero {
    padding-top: calc(64px + var(--space-2xl));
    padding-bottom: var(--space-2xl);
  }

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

  .hero-code {
    margin: 0 calc(-1 * var(--space-md));
  }

  .theme-tabs {
    margin-left: 0;
    margin-top: 6px;
    width: 100%;
    justify-content: center;
  }

  .code-window-bar {
    justify-content: flex-start;
  }

  .code-window-title {
    flex: 1;
  }

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

/* ===========================
   Animations
   =========================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-badge,
.hero-title,
.hero-subtitle,
.hero-actions,
.hero-code {
  animation: fadeInUp 0.6s ease forwards;
}

.hero-title { animation-delay: 0.1s; }
.hero-subtitle { animation-delay: 0.2s; }
.hero-actions { animation-delay: 0.3s; }
.hero-code { animation-delay: 0.4s; }

/* Scroll reveal (applied via JS) */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

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

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