/* zachellerbrook.com
   Constraints are locked in CLAUDE.md. Do not invent values outside the scales below. */

/* ---------- fonts ---------- */

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/source-serif-4-roman.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/source-serif-4-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

/* ---------- tokens ---------- */

:root {
  --paper: #ffffff;
  --ink: #141416;
  --muted: #6e6e76;
  --accent: #2e6a5b;
  --rule: color-mix(in srgb, var(--muted) 22%, var(--paper));
  --fill: color-mix(in srgb, var(--muted) 8%, var(--paper));

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --t-micro: 0.8125rem;
  --t-small: 0.9375rem;
  --t-body: 1.125rem;
  --t-h3: 1.3125rem;
  --t-h2: 1.625rem;
  --t-h1: clamp(1.625rem, 1.15rem + 2.1vw, 2.125rem);
  --t-display: clamp(1.875rem, 1.15rem + 3.2vw, 2.5rem);

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 1rem;
  --s-4: 1.5rem;
  --s-5: 2.5rem;
  --s-6: 4rem;
  --s-7: 6.5rem;
  --s-8: 10.5rem;

  --measure: 34rem;
}

/* ---------- base ---------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--t-body);
  font-size-adjust: from-font;
  line-height: 1.65;
  font-variant-numeric: oldstyle-num;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.011em;
  margin: 0 0 var(--s-3);
  text-wrap: balance;
}

h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); margin-top: var(--s-6); }
h3 { font-size: var(--t-h3); margin-top: var(--s-5); }

p { margin: 0 0 var(--s-4); text-wrap: pretty; }

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

a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

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

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: var(--s-6) 0;
}

blockquote {
  margin: 0 0 var(--s-4);
  padding-left: var(--s-4);
  border-left: 1px solid var(--rule);
  font-style: italic;
  color: var(--muted);
}

/* ---------- evidence: mono carries proof, serif carries claims ---------- */

code, kbd, samp, pre {
  font-family: var(--mono);
  font-size: 0.875em;
  font-variant-numeric: normal;
}

pre {
  background: var(--fill);
  padding: var(--s-3);
  overflow-x: auto;
  margin: 0 0 var(--s-4);
  line-height: 1.7;
}

pre code { font-size: inherit; }

.meta {
  font-family: var(--mono);
  font-size: var(--t-micro);
  font-variant-numeric: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- layout ---------- */

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--s-3);
  top: var(--s-3);
  z-index: 1;
  background: var(--paper);
  padding: var(--s-2) var(--s-3);
}

.page {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--s-4);
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-4);
  align-items: baseline;
  justify-content: space-between;
  padding-block: var(--s-4);
}

.masthead a { color: var(--ink); text-decoration: none; }
.masthead a:hover { text-decoration: underline; }

.wordmark { font-size: var(--t-small); }

.masthead nav ul {
  display: flex;
  gap: var(--s-4);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--t-small);
}

.masthead nav [aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
}

main { padding-block: var(--s-7) var(--s-8); }

.lede {
  font-size: var(--t-h3);
  line-height: 1.45;
  margin-bottom: var(--s-5);
}

/* ---------- lists of work and writing ---------- */

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

.entries > li + li { margin-top: var(--s-5); }

.entries h3 { margin: 0 0 var(--s-1); font-size: var(--t-body); }

.entries p { margin: var(--s-1) 0 0; }

.entries .meta { display: block; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: var(--s-4) var(--s-6);
  font-size: var(--t-small);
  color: var(--muted);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  list-style: none;
  margin: 0 0 var(--s-3);
  padding: 0;
}
