:root {
  --bg: #0b0f1a;
  --surface: #131a2a;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --accent: #a78bfa;
  --border: rgba(255, 255, 255, 0.1);
  --max: 760px;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f7f7fb;
    --surface: #ffffff;
    --text: #111827;
    --text-muted: #4b5563;
    --accent: #6d28d9;
    --border: rgba(0, 0, 0, 0.1);
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f1a;
  --surface: #131a2a;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --accent: #a78bfa;
  --border: rgba(255, 255, 255, 0.1);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}
header, main, footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}
header {
  padding-top: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.brand {
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  font-size: 15px;
}
nav { margin-top: 12px; display: flex; gap: 16px; flex-wrap: wrap; }
nav a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; }
nav a:hover { color: var(--text); }
main { padding-top: 32px; padding-bottom: 48px; }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.15; margin: 0 0 12px; }
h2 { font-size: 1.35rem; margin: 36px 0 10px; }
h3 { font-size: 1.05rem; margin: 24px 0 8px; }
p, li { color: var(--text); }
.muted { color: var(--text-muted); }
a { color: var(--accent); }
section[id] { scroll-margin-top: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 16px 0;
}
footer {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  padding-bottom: 32px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
footer nav { margin-top: 8px; }
