/* Apeiron: one quiet reading column under one loud wordmark. */
:root {
  --paper: #fbfaf7;
  --ink: #1b1b24;
  --muted: #5a5a6b;
  --accent: #5b4b8a;
  --wash: #efedf4;
  --measure: 38rem;
  --frame: 48rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16151c;
    --ink: #e8e5ee;
    --muted: #a3a0b2;
    --accent: #b6a8e3;
    --wash: #24222d;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-optical-sizing: auto;
  font-size: 1.25rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
.frame { max-width: var(--frame); margin: 0 auto; padding: 0 1.5rem; }
main { max-width: var(--measure); }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 560;
  letter-spacing: -.01em;
  text-wrap: balance;
}

/* ── wordmark: the one loud thing ─────────────────────────────────────── */
.masthead { padding: 3rem 0 0; }
.wordmark {
  display: inline-block;
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(4rem, 17vw, 9.5rem);
  line-height: .85;
  letter-spacing: -.04em;
  margin-left: -.02em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark:hover { color: var(--accent); }
.is-post .masthead { padding-top: 2rem; }
.is-post .wordmark { font-size: 2.25rem; letter-spacing: -.02em; margin-left: 0; }

.tagline { margin: 1.25rem 0 0; color: var(--muted); font-style: italic; }
.empty { margin: 4rem 0 0; color: var(--muted); }

/* ── home: list of posts ──────────────────────────────────────────────── */
.posts { list-style: none; margin: 4.5rem 0 0; padding: 0; }
.posts li { margin: 0 0 3rem; }
.posts a { color: inherit; text-decoration: none; }
.posts h2 { margin: 0; font-size: 1.9rem; line-height: 1.15; }
.posts a:hover h2 { color: var(--accent); }
.posts time { display: block; margin-top: .35rem; }
.posts .summary { margin: .6rem 0 0; }
time { font-size: 1rem; color: var(--muted); }

/* ── post ─────────────────────────────────────────────────────────────── */
.post header { margin: 3.5rem 0 2.5rem; }
.post h1 { margin: 0 0 .75rem; font-size: clamp(2.2rem, 6vw, 3.3rem); line-height: 1.08; }
.content > :first-child { margin-top: 0; }
.content p, .content ul, .content ol { margin: 0 0 1.4em; }
.content li { margin-bottom: .35em; }
.content h2 { font-size: 1.7rem; line-height: 1.2; margin: 2.2em 0 .6em; }
.content h3 { font-size: 1.35rem; line-height: 1.25; margin: 2em 0 .5em; }
.content > p:first-of-type::first-letter {
  float: left;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 3.6em;
  line-height: .78;
  padding: .07em .09em 0 0;
  color: var(--accent);
}
.content img { display: block; max-width: 100%; height: auto; border-radius: 6px;
  box-shadow: 0 12px 40px -18px rgba(20, 20, 40, .45); }
.content figure { margin: 2.5rem 0; }
figcaption { margin-top: .75rem; font-size: 1rem; font-style: italic; color: var(--muted); }
blockquote { margin: 2rem 0; padding-left: 1.25rem; border-left: 3px solid var(--accent); font-style: italic; }
blockquote p:last-child { margin-bottom: 0; }
hr { border: 0; margin: 3rem 0; text-align: center; }
hr::after { content: "⁂"; color: var(--muted); font-size: 1.4rem; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .82em;
  background: var(--wash); padding: .1em .3em; border-radius: 3px; }
pre { overflow-x: auto; background: var(--wash); padding: 1rem 1.25rem; border-radius: 6px; line-height: 1.5; }
pre code { background: none; padding: 0; }
.back { margin-top: 3.5rem; font-size: 1.05rem; }

/* wide screens: let figures run wider than the text column */
@media (min-width: 56rem) {
  .content figure { margin-right: calc(var(--measure) - var(--frame) + 3rem); }
}

.colophon { margin: 6rem 0 3rem; font-size: 1rem; color: var(--muted); }
.colophon a { color: inherit; }

@media (max-width: 30rem) {
  body { font-size: 1.15rem; }
  .masthead { padding-top: 2rem; }
}
