:root {
  --bg: #09090b;
  --bg-surface: #131316;
  --bg-surface-hover: #1a1a1f;
  --bg-code: #111114;
  --text: #e4e4e7;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #a78bfa;
  --accent-bright: #c4b5fd;
  --accent-dim: #7c3aed;
  --accent-glow: rgba(167, 139, 250, 0.15);
  --border: #1f1f23;
  --border-accent: rgba(167, 139, 250, 0.2);
  --max-width: 56rem;
  --radius: 10px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- Ambient glow --- */

.glow-top {
  position: fixed;
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

main {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* --- Hero --- */

.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}

.logo {
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 30px rgba(167, 139, 250, 0.3));
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent-bright) 0%, var(--accent) 50%, var(--accent-dim) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-weight: 400;
}

.hero-sub {
  font-size: 0.95rem;
  color: var(--text-dim);
  margin-top: 1rem;
  line-height: 1.8;
}

.hero-cta {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.hero-code {
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: 0.85rem 1.5rem;
  margin: 0;
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.08);
  overflow-x: auto;
  max-width: 100%;
}

.hero-code code {
  font-size: 0.9rem;
  color: var(--accent-bright);
  background: none;
  padding: 0;
  white-space: nowrap;
}

.status {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid var(--border-accent);
  border-radius: 999px;
  background: var(--accent-glow);
}

/* --- Section badges --- */

.section-badge {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent-dim);
}

/* --- Divider --- */

.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
  margin: 4rem 0;
}

/* --- Sections --- */

section {
  margin-top: 0;
}

h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}

p {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

p strong {
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--border-accent);
  transition: border-color 0.2s;
}

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

/* --- Problem --- */

.problem-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 40rem;
}

.problem-highlight {
  margin: 1.5rem 0;
  font-size: 1.05rem;
  color: var(--text-dim);
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.problem-stat {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
}

.problem-solution {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.5rem;
}

/* --- Code --- */

code {
  font-family: "JetBrains Mono", "Fira Code", "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 0.85em;
  background: var(--bg-code);
  padding: 0.15em 0.45em;
  border-radius: 5px;
  border: 1px solid var(--border);
}

pre {
  margin: 0;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text);
}

/* --- Terminal code block --- */

.code-block {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 1rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-dot.red { background: #ef4444; opacity: 0.7; }
.code-dot.yellow { background: #eab308; opacity: 0.7; }
.code-dot.green { background: #22c55e; opacity: 0.7; }

.code-title {
  margin-left: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: "JetBrains Mono", "Fira Code", monospace;
}

.code-block pre {
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
}

.code-comment {
  color: var(--text-dim);
}

/* --- Features Grid --- */

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature {
  background: var(--bg-surface);
  padding: 1.5rem 1.75rem;
  transition: background 0.2s;
}

.feature:hover {
  background: var(--bg-surface-hover);
}

.feature-icon {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.feature h3 {
  color: var(--accent-bright);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.feature p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

/* --- Stack Templates --- */

.stacks p {
  margin-bottom: 1.25rem;
}

.stack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.stack-item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.stack-item:hover {
  border-color: var(--border-accent);
}

.stack-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.stack-name::after {
  content: " \2014";
  color: var(--text-dim);
  font-weight: 400;
}

.stack-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* --- Footer --- */

footer {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

footer p {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.8;
}

/* --- Responsive --- */

@media (max-width: 640px) {
  .hero {
    padding: 3rem 0 2.5rem;
  }

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

  .tagline {
    font-size: 1rem;
  }

  .hero-sub {
    font-size: 0.85rem;
  }

  .hero-code {
    padding: 0.7rem 1rem;
  }

  .hero-code code {
    font-size: 0.75rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .stack-grid {
    grid-template-columns: 1fr;
  }

  .problem-highlight {
    flex-direction: column;
    gap: 0.5rem;
  }

  .code-block pre {
    padding: 1rem;
  }
}
