:root {
  color-scheme: light;
  --base: #eff1f5;
  --mantle: #e6e9ef;
  --surface: #ccd0da;
  --text: #4c4f69;
  --muted: #6c6f85;
  --subtle: #7c7f93;
  --accent: #ea76cb;
  --accent-2: #8839ef;
  --border: #bcc0cc;
  --code-bg: #e6e9ef;
  --shadow: 0 16px 40px rgb(76 79 105 / 10%);
  --measure: 72ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --base: #1e1e2e;
    --mantle: #181825;
    --surface: #313244;
    --text: #cdd6f4;
    --muted: #a6adc8;
    --subtle: #9399b2;
    --accent: #f5c2e7;
    --accent-2: #cba6f7;
    --border: #45475a;
    --code-bg: #11111b;
    --shadow: 0 18px 48px rgb(0 0 0 / 24%);
  }
}

* {
  box-sizing: border-box;
}

::selection {
  background: color-mix(in srgb, var(--accent) 42%, transparent);
  color: var(--text);
}

html {
  min-width: 320px;
  background: var(--base);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

body {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 2;
  transform: translateY(-160%);
  border-radius: 6px;
  background: var(--text);
  color: var(--base);
  padding: 8px 12px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--base) 86%, transparent);
  backdrop-filter: blur(12px);
}

.nav,
.page {
  width: min(100% - 32px, 960px);
  margin: 0 auto;
}

.nav {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.page {
  padding: 48px 0 80px;
}

.home-hero,
.article-header {
  max-width: var(--measure);
  padding-bottom: 32px;
}

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

h1,
h2,
h3 {
  margin: 0;
  color: var(--text);
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 9vw, 4.8rem);
  letter-spacing: 0;
}

h2 {
  font-size: 1.35rem;
}

.lede {
  max-width: 62ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.listing {
  margin-top: 40px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading a {
  font-size: 0.95rem;
}

.item-list {
  display: grid;
  gap: 8px;
}

.list-item {
  display: grid;
  min-width: 0;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--mantle) 78%, transparent);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  color: var(--text);
  text-decoration: none;
}

.list-item span,
.list-item small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.list-item span {
  font-weight: 700;
}

.list-item small,
.muted {
  color: var(--muted);
}

.article {
  max-width: var(--measure);
}

.prose {
  font-size: 1.03rem;
}

.prose > * + * {
  margin-top: 1rem;
}

.prose h2,
.prose h3 {
  margin-top: 2rem;
}

.prose p,
.prose ul,
.prose ol {
  margin-bottom: 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.prose pre {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--code-bg);
  padding: 16px;
}

.prose code {
  border-radius: 5px;
  background: var(--code-bg);
  padding: 0.12em 0.32em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.prose pre code {
  padding: 0;
  background: transparent;
}

.prose blockquote {
  margin-left: 0;
  border-left: 4px solid var(--accent);
  padding-left: 16px;
  color: var(--muted);
}

@media (max-width: 560px) {
  .nav,
  .page {
    width: min(100% - 24px, 960px);
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 12px 0;
  }

  .page {
    padding-top: 32px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}
