/* ── Minimalist & Neutral ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-code: #f8f8f8;
  --bg-code-block: #1a1a1a;
  --text: #111111;
  --text-muted: #777777;
  --text-sidebar: #333333;
  --accent: #000000;
  --accent-light: #f5f5f5;
  --border: #eeeeee;
  --border-light: #f5f5f5;
  --success: #111111;
  --warning: #444444;
  --danger: #000000;
  --info: #333333;
  --sidebar-w: 260px;
  --header-h: 70px;
  --max-content: 800px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "Fira Code", Menlo, Consolas, monospace;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 40px); }
body { font-family: var(--font-sans); color: var(--text); background: var(--bg); line-height: 1.8; font-size: 16px; -webkit-font-smoothing: antialiased; }

/* ── Header ─────────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h); background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 40px;
}
.site-header .logo { font-weight: 300; font-size: 22px; color: var(--accent); text-decoration: none; letter-spacing: -0.02em; }
.site-header .logo span { color: var(--text-muted); font-weight: 300; margin-left: 4px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.1em; }
.site-header nav { margin-left: auto; display: flex; gap: 30px; align-items: center; }
.site-header nav a { color: var(--text-muted); text-decoration: none; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; transition: color 0.2s; }
.site-header nav a:hover { color: var(--accent); }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-toggle svg { width: 22px; height: 22px; stroke: var(--text); }

/* ── Sidebar ────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: var(--header-h); left: 0; bottom: 0;
  width: var(--sidebar-w); background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  overflow-y: auto; padding: 40px 0;
}
.sidebar .section-title {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); padding: 24px 40px 8px;
}
.sidebar .section-title:first-child { padding-top: 0; }

.sidebar a {
  display: block; padding: 6px 40px; font-size: 14px; color: var(--text-sidebar);
  text-decoration: none; transition: all 0.2s;
}
.sidebar a:hover { color: var(--accent); padding-left: 44px; }
.sidebar a.active { color: var(--accent); font-weight: 600; background: var(--accent-light); }

/* ── Main Content ───────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w); margin-top: var(--header-h);
  padding: 60px 80px 120px; max-width: calc(var(--max-content) + 160px);
}

/* ── Typography ─────────────────────────────────────────────────── */
h1 { font-size: 36px; font-weight: 300; letter-spacing: -0.03em; margin-bottom: 12px; line-height: 1.2; color: #000; }
h2 { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; margin-top: 64px; margin-bottom: 20px; color: #000; }
h3 { font-size: 18px; font-weight: 500; margin-top: 48px; margin-bottom: 12px; color: #000; }
h4 { font-size: 15px; font-weight: 600; margin-top: 32px; margin-bottom: 8px; }

p { margin-bottom: 24px; color: #333; }
.subtitle { font-size: 18px; color: var(--text-muted); margin-bottom: 48px; line-height: 1.6; font-weight: 300; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; color: #000; }
hr { border: none; border-top: 1px solid var(--border); margin: 48px 0; }

ul, ol { margin-bottom: 24px; padding-left: 20px; }
li { margin-bottom: 10px; color: #333; }

/* ── Code ───────────────────────────────────────────────────────── */
code {
  font-family: var(--font-mono); font-size: 14px;
  background: var(--bg-code); padding: 3px 6px; border-radius: 2px;
  color: #000;
}
pre {
  background: var(--bg-code-block); color: #eeeeee; border-radius: 0px;
  padding: 32px; overflow-x: auto; margin: 32px 0;
  font-size: 14px; line-height: 1.7;
}
pre code {
  background: none; padding: 0; color: inherit; font-size: inherit;
}

/* Neutral Syntax highlighting */
.kw { color: #ffffff; font-weight: 600; }
.str { color: #aaaaaa; }
.cm { color: #666666; font-style: italic; }
.fn { color: #ffffff; }
.num { color: #dddddd; }
.type { color: #ffffff; }
.op { color: #ffffff; }
.var { color: #ffffff; }
.prop { color: #ffffff; }

/* ── Tables ─────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; margin: 32px 0; font-size: 14px; }
th { text-align: left; font-weight: 600; padding: 12px 0; border-bottom: 2px solid var(--accent); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
td { padding: 16px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
td code { font-size: 13px; }

/* ── Callouts ───────────────────────────────────────────────────── */
.callout {
  padding: 24px 32px; border: 1px solid var(--border); margin: 32px 0;
  font-size: 15px; border-left: 4px solid var(--accent);
}
.callout p:last-child { margin-bottom: 0; }
.callout-title { font-weight: 600; margin-bottom: 8px; text-transform: uppercase; font-size: 12px; letter-spacing: 0.05em; }

/* ── Badges ─────────────────────────────────────────────────────── */
.badge {
  display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 0px; text-transform: uppercase; letter-spacing: 0.1em; vertical-align: middle;
  border: 1px solid var(--border); background: #fff; color: #000;
}

/* ── Endpoint blocks ────────────────────────────────────────────── */
.endpoint {
  border: 1px solid var(--border); border-radius: 0px;
  padding: 16px 24px; margin-bottom: 16px; display: flex; align-items: center; gap: 16px;
  font-family: var(--font-mono); font-size: 14px;
}
.endpoint .path { font-weight: 600; }

/* ── Cards ──────────────────────────────────────────────────────── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px; margin: 48px 0; }
.card {
  border: 1px solid var(--border); padding: 32px;
  text-decoration: none; color: var(--text); transition: all 0.2s;
}
.card:hover { border-color: var(--accent); background: var(--accent-light); }
.card h3 { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.card p { margin: 0; font-size: 14px; color: var(--text-muted); line-height: 1.5; }

/* ── Tabs ───────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 32px; border-bottom: 1px solid var(--border); margin-bottom: 0; }
.tab {
  padding: 12px 0; font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; background: none; color: var(--text-muted); border-bottom: 2px solid transparent;
  text-transform: uppercase; letter-spacing: 0.05em; transition: all 0.2s;
}
.tab:hover { color: var(--accent); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .main { padding: 40px 40px 80px; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 150; box-shadow: 20px 0 50px rgba(0,0,0,0.1); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; padding: 40px 24px 80px; }
  .menu-toggle { display: block; margin-right: 16px; }
  .site-header { padding: 0 24px; }
}
