:root {
  --bg:           #0a1213;
  --bg-elev:      #0d1719;
  --bg-card:      #10191b;
  --bg-card-hov:  #162123;
  --border:       #1f2c2e;
  --border-strong:#2a3a3d;

  --text:         #e6efed;
  --text-mute:    #a3b1ad;
  --text-dim:     #6b7975;

  --accent:       #2dd4bf;
  --accent-dim:   #1ba696;
  --accent-glow:  rgba(45, 212, 191, 0.15);

  --struct:       #7c9fb8;

  --danger:       #f87171;
  --warn:         #fbbf24;

  --kw:           #2dd4bf;
  --str:          #93c5b9;
  --num:          #d4b35a;
  --com:          #6b7975;
  --punct:        #a3b1ad;
  --ident:        #cfd9d7;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

code, pre, .mono {
  font-family: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-feature-settings: "ss01", "ss02";
}

.network-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}
.network-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 0%, var(--bg) 70%),
    linear-gradient(180deg, transparent 0%, var(--bg) 90%);
  pointer-events: none;
}

.shell { position: relative; z-index: 1; }
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 32px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 18, 19, 0.78);
  border-bottom: 1px solid var(--border);
}
.nav {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 40px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand .brand-mark {
  color: var(--accent);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0 auto;
}
.nav-links a {
  color: var(--text-mute);
  font-size: 15px;
  transition: color .15s;
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active {
  color: var(--text);
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 1px;
  background: var(--accent);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.gh-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-mute);
  font-size: 15px;
  transition: color .15s;
}
.gh-link:hover { color: var(--text); }
.gh-link svg { width: 18px; height: 18px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  background: transparent;
  color: var(--text);
}
.btn-primary {
  background: var(--accent);
  color: #032420;
  font-weight: 600;
}
.btn-primary:hover {
  background: #4ee5d1;
  box-shadow: 0 0 32px var(--accent-glow);
}
.btn-secondary {
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-secondary:hover {
  border-color: var(--text-mute);
  background: var(--bg-card-hov);
}
.btn-ghost {
  color: var(--text-mute);
  padding-left: 8px;
  padding-right: 8px;
}
.btn-ghost:hover { color: var(--text); }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--struct);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--struct);
}
.eyebrow.center { justify-content: center; }
.eyebrow.center::before { width: 18px; }

section {
  padding: 96px 0;
  position: relative;
}
section + section { border-top: 1px solid var(--border); }

.section-head {
  text-align: center;
  margin-bottom: 64px;
}
.section-head .eyebrow {
  margin-bottom: 18px;
  justify-content: center;
}
.section-head h2 {
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 0;
  line-height: 1.05;
}
.section-head .accent { color: var(--accent); }
.section-head .lede {
  margin: 22px auto 0;
  max-width: 620px;
  color: var(--text-mute);
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 32px;
  transition: border-color .2s, background .2s, transform .2s;
}
.card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hov);
}
.card .icon {
  width: 36px; height: 36px;
  border-radius: 6px;
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 22px;
}
.card .icon svg { width: 18px; height: 18px; }
.card h3 {
  font-size: 20px;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.card p {
  color: var(--text-mute);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}
.card code {
  font-size: 0.9em;
  color: var(--accent);
  background: rgba(45,212,191,0.06);
  padding: 1px 6px;
  border-radius: 3px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

.code-block {
  background: #050809;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 22px 24px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ident);
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
}
.code-block .com { color: var(--com); font-style: italic; }
.code-block .kw  { color: var(--kw); }
.code-block .num { color: var(--num); }
.code-block .str { color: var(--str); }
.code-block .pn  { color: var(--punct); }
.code-block .fn  { color: #e6efed; }
.code-block .err { color: var(--danger); }
.code-block .ok  { color: var(--accent); }

.code-window {
  background: #050809;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.code-window-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #080d0e;
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}
.code-window-head .dots { display: flex; gap: 6px; }
.code-window-head .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #1a2422;
}
.code-window-head .tabs { display: flex; gap: 4px; }
.code-window-head .tab {
  padding: 5px 12px;
  border-radius: 3px;
  cursor: pointer;
  color: var(--text-dim);
  transition: all .15s;
  user-select: none;
}
.code-window-head .tab:hover { color: var(--text-mute); }
.code-window-head .tab.active {
  background: var(--bg-card-hov);
  color: var(--accent);
}
.code-window pre {
  margin: 0;
  padding: 22px 24px;
  font-size: 13.5px;
  line-height: 1.75;
  overflow-x: auto;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 72px 0 40px;
  position: relative;
  z-index: 1;
  background: var(--bg);
}
.footer-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.footer-stat .label {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.footer-stat .value {
  font-size: 18px;
  color: var(--text);
  font-family: "Geist Mono", monospace;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-brand .tagline {
  color: var(--text-mute);
  font-size: 14px;
  margin-top: 14px;
  max-width: 300px;
  line-height: 1.55;
}
.footer-col h4 {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 500;
  margin: 0 0 18px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 12px; }
.footer-col a {
  color: var(--text-mute);
  font-size: 14px;
  transition: color .15s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}
@media (max-width: 800px) {
  .footer-stats, .footer-grid { grid-template-columns: 1fr 1fr; }
}

.page-intro {
  padding: 120px 0 72px;
  text-align: center;
}
.page-intro h1 {
  font-size: clamp(40px, 5vw, 64px);
  letter-spacing: -0.03em;
  margin: 16px 0 22px;
}
.page-intro .lede {
  max-width: 680px;
  margin: 0 auto;
  color: var(--text-mute);
  font-size: 18px;
  line-height: 1.6;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(45,212,191,0.08);
  border: 1px solid rgba(45,212,191,0.2);
  color: var(--accent);
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pill.muted {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-mute);
}

.def-list {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px 32px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.def-list dt {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  text-transform: uppercase;
  padding-top: 2px;
}
.def-list dd {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}
.def-list dd + dt { padding-top: 14px; border-top: 1px solid var(--border); margin-top: 14px; }

.center { text-align: center; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }
.mb-24 { margin-bottom: 24px; }
.text-mute { color: var(--text-mute); }
.text-accent { color: var(--accent); }
.row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.row.center { justify-content: center; }

hr.rule {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 0;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .8s ease-out both; }
.fade-up.d1 { animation-delay: .08s; }
.fade-up.d2 { animation-delay: .16s; }
.fade-up.d3 { animation-delay: .24s; }
.fade-up.d4 { animation-delay: .32s; }
