/* Direction A: Editorial. Typographic, generous whitespace, reading first. */
@import url("fonts.css");

:root {
  --paper: #f8f5ef;
  --ink: #1c1a17;
  --muted: #655e54;
  --accent: #9a2b1b;
  --rule: #d8d0c2;
  --code-bg: #efe9df;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --measure: 34rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: clamp(1.125rem, 1.02rem + 0.45vw, 1.3rem);
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 0.06em; text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: .5rem 1rem; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem; }

/* Masthead */
.masthead { border-bottom: 1px solid var(--rule); }
.masthead .wrap { max-width: 46rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-block: 1.4rem 1.1rem; }
.wordmark { font-variant-caps: all-small-caps; letter-spacing: 0.12em; font-size: 1.05rem; text-decoration: none; font-weight: 500; }
.masthead nav a, .smallcaps { font-variant-caps: all-small-caps; letter-spacing: 0.08em; color: var(--muted); }
.masthead nav a { text-decoration: none; font-size: 1rem; }
.masthead nav a:hover { color: var(--accent); }

/* Post head */
.post-head { text-align: center; padding-block: clamp(3rem, 9vw, 6rem) 2.5rem; }
.post-head .kicker { margin: 0 0 1.4rem; font-size: 0.95rem; }
.post-head h1 {
  font-size: clamp(2.5rem, 1.6rem + 4vw, 4.25rem);
  line-height: 1.04; font-weight: 450; letter-spacing: -0.015em;
  margin: 0 auto; max-width: 14ch; text-wrap: balance;
}
.post-head .dek { font-style: italic; color: var(--muted); font-size: 1.15em; max-width: 30rem; margin: 1.4rem auto 0; text-wrap: pretty; }
.fleuron { display: block; text-align: center; color: var(--accent); margin: 2.5rem 0 0; font-size: 1.1rem; letter-spacing: 0.8em; padding-left: .8em; }

/* Prose */
.prose { padding-bottom: 2rem; hyphens: auto; }
.prose :where(p) { margin: 0; text-wrap: pretty; }
.prose > * + * { margin-top: 1.1em; }
.prose > p:first-child::first-letter {
  float: left; font-size: 4.1em; line-height: 0.8; padding: 0.08em 0.09em 0 0; color: var(--accent); font-weight: 500;
}
.prose h2 { font-weight: 500; font-style: italic; font-size: 1.55em; line-height: 1.2; margin: 2.2em 0 0; }
.prose h2 + * { margin-top: 0.6em; }
.prose strong { font-weight: 600; }
.prose ul { list-style: none; padding: 0; margin-top: 1.1em; }
.prose li { position: relative; padding-left: 1.6em; }
.prose li + li { margin-top: 0.75em; }
.prose li::before { content: "\2766"; position: absolute; left: 0; top: 0.02em; color: var(--accent); font-size: 0.85em; }
.prose code { font-family: var(--mono); font-size: 0.8em; background: var(--code-bg); padding: 0.1em 0.3em; border-radius: 3px; }
.prose pre { font-family: var(--mono); font-size: 0.78rem; line-height: 1.6; background: var(--code-bg); padding: 1.2rem 1.4rem; overflow-x: auto; border-left: 3px solid var(--accent); margin-top: 1.6em; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose blockquote { margin: 1.6em 0; padding-left: 1.2em; border-left: 2px solid var(--accent); font-style: italic; }

/* Post foot */
.post-foot { border-top: 1px solid var(--rule); padding-block: 1.5rem 3rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; font-size: 0.95rem; }
.tags { list-style: none; display: flex; gap: 1rem; padding: 0; margin: 0; }

/* Home */
.home-head { padding-block: clamp(3rem, 9vw, 6rem) 1rem; }
.home-head h1 { font-size: clamp(2.6rem, 1.6rem + 4.5vw, 4.5rem); line-height: 1.02; font-weight: 450; letter-spacing: -0.02em; margin: 0; }
.intro { font-style: italic; color: var(--muted); font-size: 1.15em; margin: 1rem 0 0; }
.todo { outline: 1px dashed var(--accent); outline-offset: 4px; }
.section-label { font-size: 1rem; color: var(--muted); border-bottom: 1px solid var(--rule); padding-bottom: .4rem; margin: 3.5rem 0 0; font-weight: 400; }
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding-block: 1.6rem; border-bottom: 1px solid var(--rule); }
.post-list time { font-size: 0.95rem; }
.post-list h3 { font-size: 1.6em; font-weight: 500; line-height: 1.15; margin: .2rem 0 .4rem; }
.post-list h3 a { text-decoration: none; }
.post-list p { margin: 0; font-style: italic; color: var(--muted); }
.elsewhere { list-style: none; padding: 0; margin: 1rem 0 0; }
.elsewhere li { padding-block: .35rem; display: flex; justify-content: space-between; gap: 1rem; }

.site-foot { border-top: 1px solid var(--rule); margin-top: 4rem; }
.site-foot .wrap { max-width: 46rem; display: flex; gap: 1.5rem; padding-block: 1.5rem 2.5rem; font-size: .95rem; }
.nowrap { white-space: nowrap; }
