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

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1c1c1c;
  --border: #262626;
  --text: #e5e5e5;
  --text-muted: #888;
  --accent: #3b82f6;
  --accent-dim: #1e3a5f;
  --green: #22c55e;
  --yellow: #eab308;
  --purple: #a855f7;
  --mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ─────────────────────────────────── */

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Hero ────────────────────────────────────── */

.hero {
  padding: 6rem 0 4rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

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

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

/* ── Sections ────────────────────────────────── */

section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type { border-bottom: none; }

section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

section h2 .num {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.9rem;
  margin-right: 0.5rem;
}

section .subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

section p {
  margin-bottom: 1rem;
  color: var(--text);
}

/* ── Flow Diagram ────────────────────────────── */

.flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 2rem 0;
}

.flow-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  position: relative;
  padding-bottom: 1.5rem;
}

.flow-step:last-child { padding-bottom: 0; }

.flow-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.flow-step:not(:last-child) .flow-dot::after {
  content: '';
  position: absolute;
  top: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% + 1.5rem - 36px);
  background: var(--border);
}

.flow-step:not(:last-child) { padding-bottom: 2rem; }

.dot-blue { background: var(--accent-dim); color: var(--accent); }
.dot-green { background: #0a2e1a; color: var(--green); }
.dot-yellow { background: #2a2200; color: var(--yellow); }
.dot-purple { background: #1f0a2e; color: var(--purple); }

.flow-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.25rem;
  margin-top: 0.4rem;
}

.flow-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ── Code Blocks ─────────────────────────────── */

.code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin: 1.5rem 0;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

.code-header .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

pre {
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
}

pre .kw { color: var(--purple); }
pre .fn { color: var(--accent); }
pre .str { color: var(--green); }
pre .cmt { color: #555; }
pre .hi { color: #fff; }

/* ── Info Cards ──────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
}

.info-card .icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.info-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.35rem;
}

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

/* ── Stack List ──────────────────────────────── */

.stack-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.stack-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
}

.stack-list .label {
  font-weight: 600;
  color: #fff;
  min-width: 110px;
}

.stack-list .desc {
  color: var(--text-muted);
}

/* ── Footer ──────────────────────────────────── */

footer {
  padding: 3rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

footer a:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────── */

@media (max-width: 640px) {
  .hero { padding: 4rem 0 3rem; }
  .hero h1 { font-size: 2rem; }
  section { padding: 3rem 0; }
  .cards { grid-template-columns: 1fr; }
  pre { font-size: 0.78rem; }
}
