:root {
  --bg-deep: #0a0a0f;
  --bg-surface: #12121a;
  --bg-elevated: #1a1a26;
  --accent: #39ff14;
  --accent-hover: #4dff28;
  --text: #e8e6e3;
  --text-secondary: #a0a0b0;
  --text-muted: #8a8a9a;
  --border: #2a2a3a;
  --font-sans: 'DM Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--bg-deep); color: var(--text); line-height: 1.7; }

/* Layout */
.page { display: flex; min-height: 100vh; }
.sidebar { width: 280px; background: var(--bg-surface); border-right: 1px solid var(--border); padding: 2rem 0; position: fixed; height: 100vh; overflow-y: auto; }
.sidebar-header { padding: 0 1.5rem 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.sidebar-header a { text-decoration: none; color: var(--text); }
.sidebar-header .brand { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.sidebar-header .title { font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.sidebar nav { padding: 0 0.75rem; }
.sidebar nav a { display: block; padding: 0.5rem 0.75rem; color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; border-radius: 6px; transition: all 0.15s ease; }
.sidebar nav a:hover { color: var(--text); background: var(--bg-elevated); }
.sidebar nav a.active { color: var(--accent); background: rgba(57,255,20,0.08); font-weight: 600; }
.sidebar nav .section-label { padding: 1rem 0.75rem 0.35rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); font-weight: 700; }

.content { margin-left: 280px; flex: 1; padding: 3rem 4rem; max-width: 900px; }

/* Typography */
h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
h2 { font-size: 1.4rem; font-weight: 700; margin: 2.5rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
h3 { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
p { margin-bottom: 1rem; color: var(--text-secondary); }
.subtitle { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; }
strong { color: var(--text); }
a { color: var(--accent); }

/* Code */
code { font-family: var(--font-mono); font-size: 0.85em; background: var(--bg-elevated); padding: 0.15em 0.4em; border-radius: 4px; }
pre { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem 1.5rem; margin: 1rem 0 1.5rem; overflow-x: auto; }
pre code { background: none; padding: 0; font-size: 0.85rem; line-height: 1.6; color: var(--text); }
.cmd { color: var(--accent); }
.comment { color: var(--text-muted); }
.flag { color: #00d4ff; }

/* Lists */
ul, ol { margin: 0.5rem 0 1.5rem 1.5rem; }
li { margin-bottom: 0.4rem; color: var(--text-secondary); }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem; transition: border-color 0.2s; }
.card:hover { border-color: rgba(57,255,20,0.3); }
.card h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.card p { margin: 0; font-size: 0.9rem; }
.card a { text-decoration: none; color: inherit; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; }
th, td { padding: 0.6rem 1rem; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
th { color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
td { color: var(--text-secondary); }
td code { font-size: 0.8rem; }

/* Callout */
.callout { background: rgba(57,255,20,0.05); border-left: 3px solid var(--accent); padding: 1rem 1.25rem; border-radius: 0 6px 6px 0; margin: 1rem 0 1.5rem; }
.callout p { margin: 0; }
.callout-warn { background: rgba(255,189,46,0.05); border-left-color: #ffbd2e; }

/* Footer */
.footer { margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--text-muted); }

/* Mobile */
.menu-toggle { display: none; position: fixed; top: 1rem; left: 1rem; z-index: 100; background: var(--bg-surface); border: 1px solid var(--border); color: var(--text); padding: 0.5rem 0.75rem; border-radius: 6px; cursor: pointer; font-size: 1.2rem; }
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.2s ease; z-index: 99; }
  .sidebar.open { transform: translateX(0); }
  .content { margin-left: 0; padding: 2rem 1.5rem; padding-top: 4rem; }
  .menu-toggle { display: block; }
  .card-grid { grid-template-columns: 1fr; }
}
