:root {
  --bg: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #1c2128;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79c0ff;
  --border: #30363d;
  --code-bg: #161b22;
  --green: #3fb950;
  --yellow: #d29922;
  --red: #f85149;
  --purple: #bc8cff;
  --sidebar-w: 260px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 2rem; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 1.5rem 0;
  z-index: 100;
}

.sidebar-logo {
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.sidebar-logo h1 {
  font-size: 1.25rem;
  color: var(--accent);
  font-weight: 700;
}

.sidebar-logo p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.sidebar nav { padding: 0 0.75rem; }

.sidebar nav a {
  display: block;
  padding: 0.4rem 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 6px;
  transition: all 0.15s;
}

.sidebar nav a:hover {
  color: var(--text);
  background: var(--bg-tertiary);
}

.sidebar nav a.active {
  color: var(--accent);
  background: rgba(88, 166, 255, 0.1);
}

.sidebar .nav-section {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 1rem 0.5rem 0.35rem;
}

/* Main Content */
.main {
  margin-left: var(--sidebar-w);
  max-width: 860px;
  padding: 2.5rem 3rem 4rem;
}

/* Hero */
.hero {
  padding: 2rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  max-width: 600px;
}

.hero-badges {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 99px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.badge.green { color: var(--green); border-color: rgba(63,185,80,0.3); }
.badge.blue { color: var(--accent); border-color: rgba(88,166,255,0.3); }
.badge.purple { color: var(--purple); border-color: rgba(188,140,255,0.3); }

/* Pipeline */
.pipeline {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
  font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  overflow-x: auto;
  white-space: pre;
}

.pipeline .stage { color: var(--accent); }
.pipeline .arrow { color: var(--text-muted); }

/* Sections */
section { margin-bottom: 3rem; }

section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

section h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--text);
}

p { margin-bottom: 0.75rem; }

/* Code blocks */
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

code {
  font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.85em;
}

p code, li code, td code {
  background: var(--bg-tertiary);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent);
}

/* Syntax highlighting */
.kw { color: var(--purple); font-weight: 600; }
.str { color: var(--green); }
.num { color: var(--yellow); }
.cm { color: var(--text-muted); font-style: italic; }
.fn { color: var(--accent); }
.op { color: var(--red); }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
}

th {
  background: var(--bg-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

td { background: var(--bg); }

tr:hover td { background: var(--bg-secondary); }

/* Lists */
ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

li { margin-bottom: 0.25rem; }

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.25rem 0;
}

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
}

.feature-card h4 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* Install steps */
.install-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(88, 166, 255, 0.15);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-content { flex: 1; }
.step-content p { margin-bottom: 0.35rem; font-size: 0.9rem; }

/* Footer */
footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 1.5rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
}
