html {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

:root {
  --bg-base: #07080d;
  --bg-card: #0f1117;
  --bg-card2: #13161f;
  --bg-sidebar: #0b0d14;
  --border: #1e2233;
  --border-accent: #2a3060;
  --accent-orange: #ff6b35;
  --accent-orange-dim: rgba(255, 107, 53, 0.18);
  --accent-teal: #00d4aa;
  --accent-teal-dim: rgba(0, 212, 170, 0.14);
  --accent-violet: #9b7cff;
  --accent-violet-dim: rgba(155, 124, 255, 0.14);
  --accent-amber: #ffb830;
  --accent-amber-dim: rgba(255, 184, 48, 0.14);
  --accent-red: #ff4560;
  --accent-green: #00e396;
  --text-primary: #e8eaf4;
  --text-secondary: #8892b0;
  --text-muted: #4a5272;
  --text-code: #64ffda;
  --sidebar-w: 280px;
  --radius: 8px;
  --radius-lg: 14px;
}

html[data-theme="light"] {
  --bg-base: #f8f6f1;
  --bg-card: #ffffff;
  --bg-card2: #fff8ef;
  --bg-sidebar: #fffdf8;
  --border: rgba(46, 33, 18, 0.10);
  --border-accent: rgba(255, 107, 53, 0.24);
  --text-primary: #2b241b;
  --text-secondary: #665a4b;
  --text-muted: #8a7b69;
  --text-code: #047a64;
  --accent-orange-dim: rgba(255, 107, 53, 0.12);
  --accent-teal-dim: rgba(0, 212, 170, 0.10);
  --accent-violet-dim: rgba(155, 124, 255, 0.10);
  --accent-amber-dim: rgba(255, 184, 48, 0.10);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: radial-gradient(circle at top right, rgba(255, 107, 53, 0.08), transparent 28%), var(--bg-base);
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  padding: 24px 0;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.logo {
  padding: 0 20px 18px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.logo-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-orange);
  letter-spacing: -0.01em;
}

.logo-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.nav-section-title,
.nav-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 16px 20px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 400;
  transition: all 0.15s;
  border-left: 2px solid transparent;
  border-radius: 0;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--accent-orange-dim);
  border-left-color: var(--accent-orange);
}

.nav-link.active {
  color: var(--accent-orange);
  background: var(--accent-orange-dim);
  border-left-color: var(--accent-orange);
  font-weight: 600;
}

.nav-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.nav-link.active .nav-dot,
.nav-link:hover .nav-dot {
  background: var(--accent-orange);
}

.main {
  flex: 1;
  max-width: calc(100vw - var(--sidebar-w));
  padding: 44px 56px 60px;
  overflow-x: hidden;
}

.hero {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.10), rgba(0, 212, 170, 0.06)), var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 52px 48px;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.32), transparent 70%);
  opacity: 0.24;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: 30%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 170, 0.24), transparent 70%);
  opacity: 0.18;
  pointer-events: none;
}

.hero-eyebrow {
  position: relative;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-orange);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero h1 {
  position: relative;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.hero h1 span { color: var(--accent-orange); }

.hero-sub {
  position: relative;
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  font-weight: 300;
  margin-bottom: 28px;
  line-height: 1.75;
}

.hero-chips {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
  font-weight: 600;
  border: 1px solid;
}

.chip-orange { background: var(--accent-orange-dim); color: var(--accent-orange); border-color: var(--accent-orange); }
.chip-teal { background: var(--accent-teal-dim); color: var(--accent-teal); border-color: var(--accent-teal); }
.chip-violet { background: var(--accent-violet-dim); color: var(--accent-violet); border-color: var(--accent-violet); }
.chip-amber { background: var(--accent-amber-dim); color: var(--accent-amber); border-color: var(--accent-amber); }
.chip-green { background: rgba(0, 227, 150, 0.12); color: var(--accent-green); border-color: var(--accent-green); }

.section {
  margin-bottom: 56px;
  scroll-margin-top: 28px;
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-orange);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

h2 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

h2 .accent { color: var(--accent-orange); }

h3 {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text-primary);
  margin: 28px 0 12px;
  letter-spacing: -0.015em;
}

h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent-amber);
  margin: 20px 0 8px;
}

p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.8;
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

em {
  color: var(--accent-teal);
  font-style: normal;
  font-weight: 500;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

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

.card-icon { font-size: 1.6rem; margin-bottom: 10px; }
.card-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1rem; color: var(--text-primary); margin-bottom: 6px; }
.card-body { font-size: 13px; color: var(--text-secondary); line-height: 1.65; }
.card-accent { position: absolute; top: 0; right: 0; width: 60px; height: 60px; border-radius: 0 12px 0 60px; opacity: 0.08; }
.card-accent-orange { background: var(--accent-orange); }
.card-accent-teal { background: var(--accent-teal); }
.card-accent-violet { background: var(--accent-violet); }
.card-accent-amber { background: var(--accent-amber); }

.code-block {
  background: #080b12;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 16px 0;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #0c0f18;
  border-bottom: 1px solid var(--border);
}

.code-lang {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-teal);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.code-file {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
}

pre {
  padding: 18px 20px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.75;
  color: #cdd6f4;
}

html[data-theme="light"] pre {
  color: #27415d;
  background: transparent;
}

pre::-webkit-scrollbar { height: 4px; }
pre::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.kw { color: #cba6f7; }
.fn { color: #89b4fa; }
.str { color: #a6e3a1; }
.num { color: #fab387; }
.cm { color: var(--text-muted); font-style: italic; }
.var { color: #f38ba8; }
.op { color: #89dceb; }

html[data-theme="light"] .kw { color: #7f42d9; }
html[data-theme="light"] .fn { color: #2268d2; }
html[data-theme="light"] .str { color: #2f7a46; }
html[data-theme="light"] .num { color: #c96c2c; }
html[data-theme="light"] .var { color: #bf4d6b; }
html[data-theme="light"] .op { color: #127b8f; }

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: rgba(12, 15, 26, 0.7);
  color: var(--text-code);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

html[data-theme="light"] code {
  background: rgba(43, 36, 27, 0.06);
}

.callout {
  border-left: 3px solid;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 14px;
}

.callout-orange { background: var(--accent-orange-dim); border-color: var(--accent-orange); }
.callout-teal { background: var(--accent-teal-dim); border-color: var(--accent-teal); }
.callout-violet { background: var(--accent-violet-dim); border-color: var(--accent-violet); }
.callout-amber { background: var(--accent-amber-dim); border-color: var(--accent-amber); }
.callout-title { font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; font-family: 'JetBrains Mono', monospace; }
.callout-orange .callout-title { color: var(--accent-orange); }
.callout-teal .callout-title { color: var(--accent-teal); }
.callout-violet .callout-title { color: var(--accent-violet); }
.callout-amber .callout-title { color: var(--accent-amber); }
.callout p { color: var(--text-primary); margin: 0; font-size: 13.5px; }

.table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead tr { background: #0c0f18; }

th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-orange);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-accent);
  font-size: 13.5px;
  color: var(--text-secondary);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.04); }
td strong { color: var(--text-primary); }
td code { font-size: 11.5px; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; transition: border-color 0.2s; }
.stat-card:hover { border-color: var(--accent-teal); }
.stat-num { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.8rem; color: var(--accent-teal); }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.06em; }

.steps { display: flex; flex-direction: column; gap: 16px; margin: 20px 0; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-orange), var(--accent-amber)); color: #07080d; font-weight: 800; font-size: 14px; font-family: 'Sora', sans-serif; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.step-content { flex: 1; }
.step-title { font-weight: 600; color: var(--text-primary); font-size: 1rem; margin-bottom: 4px; }
.step-body { font-size: 13.5px; color: var(--text-secondary); }

.gpu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 20px 0; }
.gpu-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; transition: all 0.2s; }
.gpu-card:hover { border-color: var(--accent-violet); transform: translateY(-2px); }
.gpu-name { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 0.95rem; color: var(--text-primary); margin-bottom: 4px; }
.gpu-vram { color: var(--accent-violet); font-family: 'JetBrains Mono', monospace; font-size: 1.3rem; font-weight: 700; }
.gpu-vram-label { font-size: 10px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; margin-bottom: 10px; }
.gpu-spec { font-size: 12px; color: var(--text-secondary); display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px solid var(--border); }
.gpu-spec:last-child { border-bottom: none; }
.gpu-spec span:last-child { color: var(--text-primary); font-weight: 500; }

.divider { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

.tag { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; letter-spacing: 0.05em; margin: 0 2px; }
.tag-orange { background: var(--accent-orange-dim); color: var(--accent-orange); }
.tag-teal { background: var(--accent-teal-dim); color: var(--accent-teal); }
.tag-violet { background: var(--accent-violet-dim); color: var(--accent-violet); }

.footer {
  border-top: 1px solid var(--border);
  padding: 24px 56px;
  color: var(--text-muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-accent); }

.hl-row td { background: rgba(255, 255, 255, 0.05); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .main {
    max-width: 100%;
    padding: 28px 20px 56px;
  }

  .footer {
    padding: 20px;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 34px 28px;
  }

  .hero h1 {
    font-size: 2.1rem;
  }
}
