/* ---------------------------------------------------------------------------
   Self-hosted type. Newsreader ships as a variable font; one file per style
   covers the whole weight range. No external font requests.
--------------------------------------------------------------------------- */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url('fonts/newsreader-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 200 700;
  font-display: swap;
  src: url('fonts/newsreader-italic-latin.woff2') format('woff2');
}

:root {
  --bg: #FCFBF8;        /* warm off-white */
  --ink: #1A1A1A;       /* near-black */
  --muted: #6f6a60;     /* dates and metadata */
  --faint: #e7e2d6;     /* hairlines */
  --wash: #f3efe6;      /* code background */
  --accent: #7b2d26;    /* oxblood — the one restrained accent */

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --mono: ui-monospace, 'SF Mono', 'SFMono-Regular', Menlo, 'Cascadia Code', monospace;

  --measure: 65ch;      /* the reading column, centered in the viewport */
}

* { box-sizing: border-box; }

html { font-size: 19px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.65;
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- links: underline on hover only, no button chrome --- */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }

::selection { background: #eadfca; }

/* --- masthead --- */
.masthead {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.4rem 1.4rem 0;
}
.byline { color: var(--ink); font-style: italic; font-size: 1.05rem; }

main { max-width: var(--measure); margin: 0 auto; padding: 2rem 1.4rem 7rem; }

/* --- prose --- */
p { margin: 0 0 1.25rem; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.18; }
strong { font-weight: 600; }
em { font-style: italic; }
hr { border: none; border-top: 1px solid var(--faint); width: 6rem; margin: 2.6rem auto; }
ul, ol { padding-left: 1.3rem; }
li { margin: 0.2rem 0; }
img { max-width: 100%; height: auto; }

blockquote {
  margin: 1.5rem 0;
  padding-left: 1.2rem;
  border-left: 2px solid var(--faint);
  color: var(--muted);
  font-style: italic;
}
code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: var(--wash);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
pre {
  background: var(--wash);
  padding: 1rem 1.1rem;
  border-radius: 5px;
  overflow: auto;
  font-size: 0.8rem;
  line-height: 1.5;
}
pre code { background: none; padding: 0; font-size: 1em; }

.piece { margin: 0 0 3.4rem; }
.piece h1 { font-size: 2.15rem; margin: 0 0 1.5rem; letter-spacing: -0.012em; }
.piece h2 { font-size: 1.4rem; margin: 2.4rem 0 0.8rem; }
.piece h3 { font-size: 1.15rem; margin: 1.9rem 0 0.6rem; }
.piece > :first-child { margin-top: 0; }
.piece > :last-child { margin-bottom: 0; }

.site-footer {
  max-width: var(--measure);
  margin: -4rem auto 0;
  padding: 0 1.4rem 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
