:root {
  color-scheme: light dark;
  --page: #f5f1e9;
  --page-raised: #fbf8f2;
  --surface: #fffdf8;
  --surface-soft: #ebe6dd;
  --ink: #17201e;
  --ink-soft: #4f5e5a;
  --line: #d7d1c7;
  --accent: #146b5a;
  --accent-strong: #0b4b3f;
  --accent-soft: #d7e8e1;
  --warm: #a34b29;
  --focus: #0a69c7;
  --shadow: 0 22px 60px rgba(40, 48, 44, 0.11);
  --radius-sm: 0.55rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --measure: 74rem;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #101817;
    --page-raised: #141e1c;
    --surface: #192421;
    --surface-soft: #22302d;
    --ink: #edf4f0;
    --ink-soft: #b4c4bf;
    --line: #34443f;
    --accent: #65c7ad;
    --accent-strong: #9ee7d3;
    --accent-soft: #1e493e;
    --warm: #f19a72;
    --focus: #7bc4ff;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.3);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 82% 1%, color-mix(in srgb, var(--accent-soft) 55%, transparent) 0, transparent 27rem),
    var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

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

a:hover {
  color: var(--warm);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 0.15rem;
}

code,
pre,
kbd {
  font-family: var(--font-mono);
}

code {
  font-size: 0.9em;
}

pre {
  max-width: 100%;
  overflow-x: auto;
  margin: 0.75rem 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--page);
  color: var(--ink);
  font-size: 0.83rem;
  line-height: 1.7;
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.04rem 0.35rem;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 0.28rem;
  background: var(--surface);
  font-size: 0.78em;
  text-align: center;
}

h1,
h2,
h3,
h4,
p,
figure,
dl {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  line-height: 1.14;
  letter-spacing: -0.025em;
}

h1 {
  max-width: 15ch;
  margin-bottom: 1.5rem;
  font-size: clamp(2.8rem, 7vw, 6.6rem);
  font-weight: 760;
  letter-spacing: -0.062em;
}

h2 {
  max-width: 19ch;
  margin-bottom: 1.3rem;
  font-size: clamp(2.15rem, 4.6vw, 4.3rem);
  font-weight: 720;
  letter-spacing: -0.05em;
}

h3 {
  margin-bottom: 0.7rem;
  font-size: clamp(1.3rem, 2.3vw, 1.8rem);
}

h4 {
  margin: 1.6rem 0 0.55rem;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.8rem;
  left: 0.8rem;
  padding: 0.6rem 0.9rem;
  transform: translateY(-180%);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--page);
}

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

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  width: min(calc(100% - 2rem), var(--measure));
  min-height: 4.4rem;
  margin: 0 auto;
  gap: 1.6rem;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 720;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  border-radius: 22%;
}

.site-header nav {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 1.35rem;
}

.site-header nav a,
.header-repo {
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 640;
  text-decoration: none;
}

.site-header nav a:hover,
.header-repo:hover {
  color: var(--ink);
}

.header-repo {
  padding: 0.38rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.section {
  width: min(calc(100% - 2rem), var(--measure));
  margin: 0 auto;
  padding: clamp(5rem, 10vw, 9rem) 0;
  border-bottom: 1px solid var(--line);
}

.section-kicker,
.eyebrow {
  margin-bottom: 1rem;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 780;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.section-lede {
  max-width: 48rem;
  margin-bottom: 2.2rem;
  color: var(--ink-soft);
  font-size: clamp(1.12rem, 1.8vw, 1.35rem);
  line-height: 1.55;
}

.hero {
  padding-top: clamp(4.8rem, 10vw, 8.5rem);
}

.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 0.75fr);
  column-gap: clamp(2rem, 6vw, 6rem);
}

.hero-copy .eyebrow,
.hero-copy h1 {
  grid-column: 1;
}

.hero-lede {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  margin: 0 0 1.8rem;
  color: var(--ink-soft);
  font-size: clamp(1.1rem, 1.9vw, 1.4rem);
  line-height: 1.55;
}

.hero-lede em {
  color: var(--ink);
  font-style: normal;
  font-weight: 680;
}

.actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.75rem;
  gap: 0.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0.72rem 1.12rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.91rem;
  font-weight: 720;
  line-height: 1.1;
  text-decoration: none;
}

.button-primary {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: var(--page-raised);
}

.button-primary:hover {
  border-color: var(--warm);
  background: var(--warm);
  color: var(--page-raised);
}

.button-secondary {
  background: var(--surface);
  color: var(--ink);
}

.hero-facts {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 3rem 0 2.2rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-facts div {
  padding: 1rem 1.2rem 1rem 0;
}

.hero-facts div + div {
  padding-left: 1.2rem;
  border-left: 1px solid var(--line);
}

.hero-facts dt {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-facts dd {
  margin: 0.18rem 0 0;
  font-weight: 680;
}

.hero-figure,
.wide-figure,
.image-pair figure,
.format-grid figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-figure img,
.wide-figure img,
.image-pair img,
.format-grid img {
  width: 100%;
}

.hero-figure figcaption,
.wide-figure figcaption,
.image-pair figcaption {
  padding: 1rem 1.15rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.52;
}

.hero-figure figcaption strong,
.wide-figure figcaption strong,
.image-pair figcaption strong {
  color: var(--ink);
}

.prose-intro > p:not(.section-kicker),
.showcase > p:not(.section-kicker),
.technology > p:not(.section-kicker) {
  max-width: 51rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 3.5rem;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.feature-grid article {
  min-height: 13rem;
  padding: 1.5rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 74%, transparent);
}

.feature-grid h3 {
  font-size: 1.1rem;
}

.feature-grid p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.honesty {
  display: grid;
  grid-template-columns: minmax(12rem, 0.5fr) minmax(0, 1.5fr);
  margin-top: 2.5rem;
  padding: 1.4rem 1.5rem;
  border-left: 4px solid var(--warm);
  background: color-mix(in srgb, var(--warm) 9%, var(--surface));
  gap: 1.5rem;
}

.honesty strong {
  color: var(--warm);
}

.honesty p {
  margin: 0;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(2.5rem, 7vw, 7rem);
}

.split-section > div:first-child {
  position: sticky;
  top: 7.5rem;
}

.quickstart {
  padding: clamp(1.35rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.quickstart ol {
  padding-left: 1.4rem;
}

.quickstart li + li {
  margin-top: 0.5rem;
}

.quiet,
.source-link,
.attribution {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.case-study {
  padding: clamp(3.5rem, 7vw, 6.5rem) 0;
  border-top: 1px solid var(--line);
}

.case-study header {
  display: grid;
  grid-template-columns: 3rem minmax(0, 42rem);
  margin-bottom: 1.8rem;
  gap: 1.5rem;
}

.case-study header p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.case-number,
.tech-index {
  color: var(--warm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 720;
  letter-spacing: 0.08em;
}

.image-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.image-pair figure {
  margin-bottom: 0;
}

.portrait-pair {
  max-width: 54rem;
}

.subsection-heading {
  max-width: 48rem;
  margin: 1rem 0 2rem;
}

.subsection-heading h3 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
}

.subsection-heading p:last-child {
  color: var(--ink-soft);
}

.wide-figure {
  margin: 0 0 2.2rem;
}

.part-b {
  width: 100%;
  max-width: none;
  padding-right: max(1rem, calc((100% - var(--measure)) / 2));
  padding-left: max(1rem, calc((100% - var(--measure)) / 2));
  background: var(--page-raised);
}

.part-b .wide-figure {
  width: min(100%, var(--measure));
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 3rem;
  gap: 1rem;
}

.format-grid figure {
  margin: 0;
  box-shadow: none;
}

.format-grid img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.format-grid figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.8rem 0.9rem;
  gap: 0.8rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.format-grid figcaption strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  text-transform: lowercase;
}

.format-grid figcaption span {
  text-align: right;
}

.format-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 2.5rem;
  gap: 1rem;
}

.format-details article {
  padding: 1.5rem;
  border-top: 3px solid var(--accent);
  background: var(--surface-soft);
}

.format-details h3 {
  font-size: 1.1rem;
}

.format-details p {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.format-details code {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.attribution {
  margin-top: 1.2rem;
}

.tech-list {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
}

.tech-list article {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  padding: clamp(2.5rem, 5vw, 4.5rem) 0;
  border-bottom: 1px solid var(--line);
  gap: clamp(1rem, 4vw, 3rem);
}

.tech-list article > div:last-child {
  max-width: 56rem;
}

.tech-list h3 {
  font-size: clamp(1.45rem, 3vw, 2.35rem);
}

.tech-list p {
  color: var(--ink-soft);
}

.tech-list p:last-child {
  margin-bottom: 0;
}

.code-link {
  white-space: nowrap;
}

.code-link code {
  color: inherit;
}

.docs {
  border-bottom: 0;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 3rem;
  gap: 1rem;
}

.doc-grid > a {
  display: flex;
  min-height: 13rem;
  padding: 1.5rem;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.doc-grid > a:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.doc-grid span {
  margin-bottom: auto;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.doc-grid strong {
  display: block;
  margin: 2.5rem 0 0.35rem;
  font-size: 1.25rem;
}

.doc-grid small {
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  width: min(calc(100% - 2rem), var(--measure));
  margin: 0 auto;
  padding: 3.2rem 0 4rem;
  border-top: 1px solid var(--line);
  gap: 2rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.footer-brand {
  margin-bottom: 0.7rem;
}

.site-footer p {
  margin-bottom: 0.35rem;
}

.footer-notes {
  max-width: 33rem;
  text-align: right;
}

.not-found {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 1rem;
}

.not-found-card {
  width: min(100%, 42rem);
  padding: clamp(2rem, 7vw, 5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.not-found-card .brand {
  margin-bottom: 4rem;
}

.not-found-code {
  margin-bottom: 0.8rem;
  color: var(--warm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 720;
  letter-spacing: 0.12em;
}

.not-found h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.5rem, 8vw, 5rem);
}

.not-found p:not(.not-found-code) {
  max-width: 33rem;
  color: var(--ink-soft);
}

@media (max-width: 58rem) {
  .site-header nav {
    display: none;
  }

  .header-repo {
    margin-left: auto;
  }

  .hero-copy {
    display: block;
  }

  .hero-lede {
    max-width: 42rem;
  }

  .feature-grid,
  .format-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-section {
    grid-template-columns: 1fr;
  }

  .split-section > div:first-child {
    position: static;
  }
}

@media (max-width: 40rem) {
  html {
    scroll-padding-top: 4.8rem;
  }

  body {
    font-size: 0.96rem;
  }

  .section {
    width: min(calc(100% - 1.25rem), var(--measure));
  }

  .header-inner,
  .site-footer {
    width: calc(100% - 1.25rem);
  }

  .hero-facts {
    grid-template-columns: 1fr;
  }

  .hero-facts div,
  .hero-facts div + div {
    padding: 0.75rem 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .hero-facts div:first-child {
    border-top: 0;
  }

  .feature-grid,
  .image-pair,
  .format-grid,
  .format-details,
  .doc-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid article {
    min-height: 0;
  }

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

  .case-study header,
  .tech-list article {
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.6rem;
  }

  .part-b {
    padding-right: 0.625rem;
    padding-left: 0.625rem;
  }

  .format-grid figcaption {
    font-size: 0.76rem;
  }

  .site-footer {
    flex-direction: column;
  }

  .footer-notes {
    text-align: left;
  }
}

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