:root {
  color-scheme: dark;
  --bg-top: #101722;
  --bg-mid: #0b1119;
  --bg-bottom: #070b11;
  --surface: rgba(16, 23, 35, 0.9);
  --surface-strong: rgba(20, 29, 43, 0.96);
  --surface-soft: rgba(255, 255, 255, 0.035);
  --text: #edf3fb;
  --muted: #a7b4c9;
  --line: rgba(154, 170, 196, 0.18);
  --line-strong: rgba(154, 170, 196, 0.34);
  --accent: #8cc8ff;
  --accent-soft: rgba(140, 200, 255, 0.14);
  --brand: #d8e0ec;
  --brand-soft: rgba(216, 224, 236, 0.08);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-width: 980px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(140, 200, 255, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(124, 145, 255, 0.1), transparent 24%),
    radial-gradient(circle at bottom right, rgba(102, 129, 161, 0.1), transparent 34%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 52%, var(--bg-bottom) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
  opacity: 0.75;
}

a {
  color: inherit;
}

main {
  position: relative;
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 56px;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(19, 28, 41, 0.94), rgba(11, 16, 24, 0.96));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: panel-enter 360ms ease-out both;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(140, 200, 255, 0.08), transparent 24%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.035), transparent 26%);
  pointer-events: none;
}

.panel-inner {
  position: relative;
  z-index: 1;
  padding: clamp(22px, 4vw, 34px);
}

.hero {
  margin-bottom: 20px;
}

.masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.title {
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 4.3rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
  font-weight: 750;
}

.brand-mark {
  flex-shrink: 0;
  margin: 0;
  padding-top: 6px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand);
  opacity: 0.9;
}

.intro {
  margin: 0;
  max-width: 56rem;
  font-size: clamp(1rem, 2.3vw, 1.18rem);
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.stack-link {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02));
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.stack-link:hover,
.stack-link:focus-visible,
.pill-link:hover,
.pill-link:focus-visible,
.back-link:hover,
.back-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(140, 200, 255, 0.42);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}

.stack-link strong,
.pill-link strong {
  font-size: 1.02rem;
}

.stack-link strong,
.pill-link strong,
.section h2 {
  color: var(--text);
}

.stack-link span,
.pill-link span,
.meta-line,
.note,
.section p,
.section li {
  color: var(--muted);
}

.pill-row {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.pill-link {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.022));
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.back-link::before {
  content: "←";
}

.meta-card {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(140, 200, 255, 0.08), rgba(255, 255, 255, 0.024));
}

.meta-line {
  margin: 0;
  font-size: 0.96rem;
}

.section-grid {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.section {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.018));
}

.section h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  line-height: 1.2;
}

.section p:last-child,
.section ul:last-child,
.section ol:last-child {
  margin-bottom: 0;
}

.section p,
.section ul,
.section ol {
  margin: 0 0 12px;
  max-width: 70ch;
}

.section ul,
.section ol {
  padding-left: 20px;
}

.note {
  margin-top: 22px;
  font-size: 0.95rem;
}

code {
  padding: 0.12em 0.42em;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 0.94em;
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  main {
    width: min(var(--max-width), calc(100% - 20px));
    padding-top: 20px;
  }

  .masthead {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-mark {
    padding-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .panel,
  .stack-link,
  .pill-link,
  .back-link {
    animation: none;
    transition: none;
  }
}
