:root {
  color-scheme: dark;
  --rs-bg: #000000;
  --rs-bg-elevated: #0b0b0b;
  --rs-magenta: #d84593;
  --rs-cyan: #6ec1e4;
  --rs-cream: #fff6dc;
  --rs-green: #78a854;
  --rs-muted: rgb(255 246 220 / 0.62);
  --rs-line: rgb(110 193 228 / 0.28);
  --rs-glass: rgb(255 255 255 / 0.06);
  --header-h: 4.5rem;
  --serif: "Fraunces", "Times New Roman", serif;
  --sans: "Outfit", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--sans);
  background: var(--rs-bg);
  color: var(--rs-cream);
  line-height: 1.5;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--rs-cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--rs-magenta);
}

:focus-visible {
  outline: 2px solid var(--rs-cyan);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-inline: 1.1rem;
  border-bottom: 1px solid var(--rs-line);
  background: rgb(0 0 0 / 0.86);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--rs-cream);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand img {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 0 8px var(--rs-magenta));
}

.brand-mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
}

.brand-mark span {
  color: var(--rs-magenta);
}

.primary-nav {
  display: none;
  align-items: center;
  gap: 1.4rem;
}

.primary-nav a {
  color: var(--rs-cream);
  text-decoration: none;
  font-weight: 600;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--rs-magenta);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.icon-button,
.menu-toggle {
  appearance: none;
  border: 1px solid var(--rs-line);
  background: transparent;
  color: var(--rs-cream);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
}

.cta {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 4px;
  padding: 0.55rem 0.95rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  color: var(--rs-bg);
  background: var(--rs-cyan);
  box-shadow: 0 0 0 rgb(110 193 228 / 0);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.cta:hover {
  color: var(--rs-bg);
  box-shadow: 0 0 18px var(--rs-cyan);
}

.cta.ghost {
  background: transparent;
  color: var(--rs-cream);
  border: 1px solid var(--rs-line);
}

.cta.ghost:hover {
  color: var(--rs-cyan);
  box-shadow: none;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - var(--header-h));
  display: grid;
  place-items: center;
  padding: 4rem 1.25rem 5rem;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 40%, rgb(216 69 147 / 0.22), transparent 42%),
    radial-gradient(circle at 70% 70%, rgb(110 193 228 / 0.14), transparent 38%);
  pointer-events: none;
}

.hero-copy {
  width: min(920px, 100%);
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 1.08;
  color: var(--rs-cream);
  text-shadow: 0 0 28px rgb(216 69 147 / 0.35);
}

.hero p {
  margin: 1.2rem auto 0;
  max-width: 42rem;
  color: var(--rs-muted);
  font-size: 1.12rem;
}

.hero-actions {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.quickstart {
  display: inline-block;
  margin-top: 1rem;
  color: var(--rs-green);
  font-family: var(--mono);
  font-size: 0.85rem;
}

.layout {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
  display: grid;
  gap: 2rem;
  padding-block: 3rem 5rem;
}

@media (min-width: 960px) {
  .primary-nav {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 3rem;
  }
}

.side-nav {
  align-self: start;
}

@media (min-width: 960px) {
  .side-nav {
    position: sticky;
    top: calc(var(--header-h) + 1.25rem);
  }
}

.side-nav a {
  display: block;
  color: var(--rs-muted);
  text-decoration: none;
  padding: 0.28rem 0;
  font-size: 0.95rem;
}

.side-nav a:hover,
.side-nav a.is-active {
  color: var(--rs-magenta);
}

.side-nav .group-title {
  margin: 1.1rem 0 0.35rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rs-cyan);
}

.section-block,
.article-card {
  display: grid;
  gap: 1rem;
  padding-block: 2.2rem;
  border-top: 1px solid var(--rs-line);
}

.section-block:first-child,
.article-card:first-child {
  border-top: 0;
  padding-top: 0;
}

.kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rs-cyan);
}

h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  color: var(--rs-magenta);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.1;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.lede,
.article-card p,
.prose p {
  color: var(--rs-muted);
  max-width: 62ch;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.4rem;
  padding: 0;
  margin: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.card-visual {
  margin-top: 0.4rem;
  min-height: 160px;
  border: 1px solid var(--rs-line);
  border-radius: 10px;
  background:
    radial-gradient(circle at 30% 30%, rgb(216 69 147 / 0.18), transparent 45%),
    linear-gradient(160deg, rgb(255 255 255 / 0.04), rgb(110 193 228 / 0.05));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.card-visual img {
  width: min(180px, 46%);
  filter: drop-shadow(0 0 16px var(--rs-magenta));
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.read-more {
  color: var(--rs-cream);
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid var(--rs-line);
  padding: 1.4rem 1.25rem 2rem;
  display: grid;
  gap: 1rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.2rem;
}

.footer-links a,
.agent-note {
  color: var(--rs-muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.agent-note {
  margin: 0;
}

dialog {
  width: min(520px, calc(100% - 2rem));
  margin: auto;
  border: 1px solid var(--rs-line);
  border-radius: 10px;
  background: var(--rs-bg-elevated);
  color: var(--rs-cream);
  padding: 1.3rem;
}

dialog::backdrop {
  background: rgb(0 0 0 / 0.72);
}

dialog h2 {
  font-size: 1.7rem;
  margin-bottom: 0.6rem;
}

.search-input {
  width: 100%;
  margin-block: 0.6rem 1rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--rs-line);
  border-radius: 6px;
  background: var(--rs-glass);
  color: var(--rs-cream);
  font: inherit;
}

.search-results {
  display: grid;
  gap: 0.4rem;
  max-height: 50vh;
  overflow: auto;
}

.search-results a {
  color: var(--rs-cream);
  text-decoration: none;
  padding: 0.45rem 0.2rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
}

.path-list {
  display: grid;
  gap: 0.8rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.path-list a {
  display: block;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--rs-line);
  border-radius: 8px;
  text-decoration: none;
  color: var(--rs-cream);
  background: var(--rs-glass);
}

.path-list a strong {
  display: block;
  color: var(--rs-magenta);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
}

.mobile-nav {
  display: none;
}

.mobile-nav.is-open {
  display: grid;
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 30;
  background: var(--rs-bg);
  padding: 1.2rem;
  gap: 0.9rem;
  overflow: auto;
}

.mobile-nav a,
.mobile-nav button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--rs-cream);
  font: inherit;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.prose {
  width: min(760px, calc(100% - 2rem));
  margin: 2.5rem auto 4rem;
}

.prose h1 {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: var(--rs-magenta);
}

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  margin-top: 1.5rem;
}

.tile {
  display: block;
  padding: 1.1rem;
  border: 1px solid var(--rs-line);
  border-radius: 10px;
  background: var(--rs-glass);
  color: var(--rs-cream);
  text-decoration: none;
}

.tile h2,
.tile h3 {
  font-size: 1.45rem;
}

.tile p {
  color: var(--rs-muted);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .cta,
  .hero h1 {
    text-shadow: none;
    transition: none;
  }
}
