:root {
  color-scheme: light dark;
  --font-sans: "IBM Plex Sans", "Helvetica Neue", Helvetica, sans-serif;
  --font-serif: "Fraunces", "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;

  --bg: #0b0f14;
  --bg-alt: #111924;
  --panel: #141f2b;
  --text: #e7edf4;
  --muted: #9aa8b5;
  --accent: #8fd3c8;
  --accent-strong: #b2f0e6;
  --line: #1f2a36;
  --button-bg: #1f2f3a;
  --button-border: #324351;
}

body[data-theme="light"] {
  --bg: #f6f4ef;
  --bg-alt: #ffffff;
  --panel: #ffffff;
  --text: #11161c;
  --muted: #4f5b66;
  --accent: #1a6a6a;
  --accent-strong: #1f8a8a;
  --line: #d7dfe6;
  --button-bg: #f0f3f6;
  --button-border: #c7d2db;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(143, 211, 200, 0.15), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(120, 160, 200, 0.18), transparent 45%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 40%);
  pointer-events: none;
  z-index: -1;
}

img {
  max-width: 100%;
  height: auto;
}

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

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

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--accent);
  color: #0b0f14;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  z-index: 10;
}

.skip-link:focus {
  left: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg), transparent 35%);
  border-bottom: 1px solid var(--line);
  z-index: 5;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent);
  color: #0b0f14;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.brand-tag {
  font-size: 0.75rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.site-nav a {
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  color: var(--muted);
}

body[data-page="home"] .site-nav a[data-page="home"],
body[data-page="why"] .site-nav a[data-page="why"],
body[data-page="stack"] .site-nav a[data-page="stack"],
body[data-page="boundaries"] .site-nav a[data-page="boundaries"],
body[data-page="showcase"] .site-nav a[data-page="showcase"],
body[data-page="contact"] .site-nav a[data-page="contact"] {
  background: var(--button-bg);
  color: var(--text);
  border: 1px solid var(--button-border);
}

.theme-toggle {
  border: 1px solid var(--button-border);
  background: var(--button-bg);
  color: var(--text);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
}

.theme-toggle-text {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero {
  padding: 4.5rem 0 3rem;
}

.hero.compact {
  padding-bottom: 2rem;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
}

h3 {
  font-size: 1.2rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--button-border);
  font-weight: 600;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.button.primary {
  background: var(--accent);
  color: #0b0f14;
  border-color: transparent;
}

.button.ghost {
  background: transparent;
}

.button:hover {
  transform: translateY(-1px);
}

.note {
  color: var(--muted);
  font-size: 0.9rem;
}

.section {
  padding: 3rem 0;
}

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

.section-header {
  max-width: 720px;
  margin-bottom: 2rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.panel {
  padding: 1.8rem;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.panel ul {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.panel li {
  margin-bottom: 0.5rem;
}

.text-link {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--accent);
  font-weight: 600;
}

.hero-card {
  padding: 2rem;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), transparent);
}

.card-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.stack-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.stack-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  gap: 1rem;
}

.stack-list li span:last-child {
  color: var(--muted);
}

.diagram {
  display: grid;
  gap: 0.75rem;
}

.diagram-layer {
  padding: 1rem 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.question-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.question-list li {
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--line);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
}

.muted {
  color: var(--muted);
}

@media (max-width: 720px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    row-gap: 0.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap");
