:root {
  --bg-edge: #070d14;
  --bg-center: #0e1925;
  --panel-bg: #0b1420;
  --panel-border: rgba(157, 184, 207, 0.12);

  --text-primary: #eaf0f5;
  --text-secondary: #9fb0bf;
  --text-muted: #6b7c8c;

  --accent: #9db8cf;
  --accent-strong: #d9e6ef;
  --accent-dim: #48607a;

  --code-bg: #080f18;
  --code-border: rgba(157, 184, 207, 0.15);
  --tok-keyword: #7fb1e0;
  --tok-type: #9dd6c0;
  --tok-string: #e0c17f;
  --tok-comment: #5b6b7a;
  --tok-num: #cf9fe0;
  --tok-fn: #cdd9e2;

  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg-edge);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

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

a:hover {
  color: var(--accent-strong);
}

code {
  font-family: var(--font-mono);
}

.nowrap {
  white-space: nowrap;
  color: var(--accent);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 13, 20, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--panel-border);
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.brand:hover {
  color: var(--text-primary);
}

.brand__mark {
  border-radius: 4px;
}

.brand__word {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  color: var(--text-secondary);
}

.badge--nav {
  font-size: 0.65rem;
  padding: 5px 12px;
}

.badge--pulse::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(157, 184, 207, 0.6);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(157, 184, 207, 0.45);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(157, 184, 207, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(157, 184, 207, 0);
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 96px 24px 64px;
  text-align: center;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 30%, var(--bg-center) 0%, var(--bg-edge) 70%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin: 0 0 28px;
}

.hero__logo {
  width: min(380px, 80vw);
  height: auto;
  margin-bottom: 28px;
  border-radius: 8px;
}

.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 24px;
}

.hero__sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 480px;
  margin: 20px 0 40px;
}

.scroll-cue {
  color: var(--text-muted);
  animation: bob 2.2s ease-in-out infinite;
}

.scroll-cue:hover {
  color: var(--accent);
}

@keyframes bob {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

/* ---------- Sections ---------- */

.section {
  padding: 88px 24px;
}

.section--panel {
  background: var(--panel-bg);
  border-top: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
}

.section--cta {
  text-align: center;
}

.section__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section__inner--narrow {
  max-width: 680px;
}

.section--cta .section__inner--narrow {
  margin: 0 auto;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  margin: 0 0 24px;
}

.section__lede {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 640px;
  margin: 0 0 18px;
}

.section--cta .section__lede {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Highlight cards ---------- */

.grid {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.grid > * {
  min-width: 0;
}

.grid--highlights {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: rgba(157, 184, 207, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 24px;
}

.card__index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-dim);
  letter-spacing: 0.05em;
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 10px 0 10px;
}

.card__body {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.card__body code {
  color: var(--text-primary);
  font-size: 0.85em;
}

/* ---------- Code cards ---------- */

.grid--code {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 12px;
}

.code-card {
  background: rgba(157, 184, 207, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.code-card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.code-card__desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0 0 16px;
}

.code-card__desc code {
  color: var(--text-primary);
  font-size: 0.9em;
}

.code-block {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  margin: 0;
  margin-top: auto;
}

.tok-keyword,
.tok-kw {
  color: var(--tok-keyword);
}

.tok-type {
  color: var(--tok-type);
}

.tok-str {
  color: var(--tok-string);
}

.tok-com {
  color: var(--tok-comment);
  font-style: italic;
}

.tok-num {
  color: var(--tok-num);
}

.tok-fn {
  color: var(--tok-fn);
}

.tok-punct {
  color: var(--text-secondary);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--panel-border);
  padding: 32px 24px;
}

.site-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.site-footer__sep {
  opacity: 0.5;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .scroll-cue,
  .badge--pulse::before {
    animation: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .grid--highlights {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid--code {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 72px 20px 48px;
  }
  .section {
    padding: 64px 20px;
  }
  .grid--highlights {
    grid-template-columns: 1fr;
  }
  .site-header__inner {
    padding: 12px 20px;
  }
}
