:root {
  --bg: #0e0e0c;
  --fg: #f3efe6;
  --muted: #a39e93;
  --line: rgba(243, 239, 230, 0.16);
  --line-strong: rgba(243, 239, 230, 0.32);
  --soft: rgba(243, 239, 230, 0.06);
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --measure: 40rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body.theme-light {
  --bg: #f3efe6;
  --fg: #161614;
  --muted: #5e5a53;
  --line: rgba(22, 22, 20, 0.12);
  --line-strong: rgba(22, 22, 20, 0.28);
  --soft: rgba(22, 22, 20, 0.04);
}

a { color: inherit; }

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--fg);
  color: var(--bg);
  padding: 0.5rem 0.75rem;
  z-index: 10;
}

.skip:focus { top: 1rem; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--pad);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  z-index: 5;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.brand svg { display: block; }

.brand span { font-size: 1.05rem; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.92rem;
}

.site-nav a { text-decoration: none; }

.site-nav a:hover { text-decoration: underline; text-underline-offset: 0.25em; }

.site-nav .mail { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; }

main { padding: 0 var(--pad) 5rem; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 0.8fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
  padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--line);
}

.kicker {
  margin: 0 0 1.25rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.1rem, 7.4vw, 6.15rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
}

.lede {
  margin: 1.75rem 0 0;
  max-width: 38rem;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--muted);
}

.figure {
  margin: 0;
}

.figure svg { width: 100%; height: auto; }

.figure figcaption {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

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

.points li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}

.points .num {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  padding-top: 0.35rem;
}

.points h2 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.points p { margin: 0; max-width: 42rem; color: var(--muted); }

.closing {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 2.2rem;
}

.closing p { margin: 0; max-width: 36rem; }

.text-link {
  font-family: var(--serif);
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.1rem;
}

.text-link:hover { border-bottom-color: var(--fg); }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer a { color: inherit; }

.doc {
  display: grid;
  grid-template-columns: 13rem minmax(0, var(--measure));
  gap: 3rem;
  justify-content: center;
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
}

.doc-nav {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.82rem;
}

.doc-nav a { color: var(--muted); text-decoration: none; }

.doc-nav a:hover { color: var(--fg); }

.doc-header h1 {
  font-size: clamp(2.8rem, 6vw, 4.4rem);
  max-width: 12ch;
}

.doc-meta {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.doc article h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.85rem;
  letter-spacing: -0.02em;
  margin: 2.6rem 0 0.7rem;
  scroll-margin-top: 5.5rem;
}

.doc article p { margin: 0 0 1rem; }

.doc article ol { margin: 0 0 1rem; padding-left: 1.2rem; }

.doc article li { margin: 0 0 0.55rem; }

.doc article a { text-underline-offset: 0.18em; }

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

@media (max-width: 860px) {
  .hero, .doc { grid-template-columns: 1fr; }
  .doc-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 0.4rem 0.9rem; }
  .points li { grid-template-columns: 3rem 1fr; }
  .site-nav .mail { display: none; }
}

@media print {
  body.theme-light { background: white; }
  .site-header, .doc-nav, .skip { display: none; }
  .doc { display: block; padding: 0; }
  main { padding: 0; }
  a { text-decoration: none; }
}
