:root {
  --bg: #0b1020;
  --surface: #131a30;
  --surface-2: #1a2340;
  --text: #eaf0ff;
  --muted: #9faecf;
  --line: #2b3659;
  --accent: #4fd1c5;
  --accent-2: #4f8cff;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Manrope", system-ui, -apple-system, Segoe UI, sans-serif;
}

html[data-theme="light"] {
  --bg: #f4f7ff;
  --surface: #ffffff;
  --surface-2: #eef3ff;
  --text: #0e1730;
  --muted: #4b5b83;
  --line: #d3ddf4;
  --accent: #0f766e;
  --accent-2: #1d4ed8;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: radial-gradient(1200px 500px at 10% -10%, #1b2852 0%, transparent 50%),
              radial-gradient(900px 400px at 100% 0%, #0d3d46 0%, transparent 45%),
              var(--bg);
  color: var(--text);
}

.container { width: min(1200px, 92vw); margin: 0 auto; }

.bg-orb { position: fixed; border-radius: 999px; filter: blur(80px); opacity: 0.25; pointer-events: none; z-index: 0; }
.orb-a { width: 340px; height: 340px; background: #2f8bff; left: -80px; top: 120px; }
.orb-b { width: 300px; height: 300px; background: #22d3ee; right: -100px; top: 360px; }

.hero, .layout, .footer { position: relative; z-index: 1; }

.hero {
  padding: 56px 0 28px;
}
.hero-inner {
  background: linear-gradient(120deg, color-mix(in oklab, var(--surface), #000 8%), var(--surface));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}
.eyebrow { color: var(--accent); font-weight: 700; margin: 0 0 10px; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 44px); line-height: 1.1; }
.lead { margin: 14px 0 0; max-width: 70ch; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn { border: 1px solid var(--line); color: var(--text); background: var(--surface-2); padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 700; }
.btn-primary { background: linear-gradient(120deg, var(--accent-2), var(--accent)); border: none; color: #fff; }
.theme-toggle { align-self: flex-start; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); padding: 10px 14px; border-radius: 10px; cursor: pointer; font-weight: 700; }

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding: 22px 0 40px;
}
.sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.sidebar-title { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.sidebar a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 600;
}
.sidebar a:hover, .sidebar a.is-active { background: var(--surface-2); color: var(--text); }

.content { display: grid; gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}
.section { scroll-margin-top: 20px; }
h2 { margin: 0 0 10px; font-size: 24px; }
h3 { margin: 16px 0 8px; font-size: 18px; }
p { margin: 0 0 10px; color: var(--muted); }
ul { margin: 0; padding-left: 20px; color: var(--muted); }

.grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

code {
  font-family: var(--mono);
  background: color-mix(in oklab, var(--surface-2), transparent 20%);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--text);
}

pre.code {
  margin: 10px 0;
  background: #0a0f1f;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  overflow: auto;
  position: relative;
}
html[data-theme="light"] pre.code { background: #f6f9ff; }
pre.code code { border: 0; background: transparent; padding: 0; }
.copy-btn {
  position: absolute;
  right: 10px;
  top: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 18px 0 26px;
  color: var(--muted);
}

@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: relative; top: 0; }
}
@media (max-width: 760px) {
  .hero-inner { padding: 22px; flex-direction: column; }
  .grid-two { grid-template-columns: 1fr; }
}
