/* --------------------------------------------------------------------------
   The Common Reader — a stylesheet for long-form criticism.
   Body face: Newsreader (optical sizing). Furniture: system sans.
   Everything is derived from the tokens below; change those first.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("/fonts/newsreader-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url("/fonts/newsreader-latin-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f7f5f0; /* warm paper white */
  --ink: #1c1b18; /* near-black, warm */
  --ink-soft: #56534a; /* secondary text */
  --meta: #8c8676; /* dates, captions, labels */
  --accent: #2c3e54; /* fountain-pen ink blue — links */
  --accent-hover: #12202f;
  --rule: #dcd8ce; /* hairlines */

  --measure: 38rem; /* reading column, ~72 characters */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* --- reset-ish ---------------------------------------------------------- */

*,
*::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: 1.1875rem; /* 19px */
  line-height: 1.65;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  padding: 0 1.5rem;
}

/* A single centred column carries every page. */
.masthead,
main {
  max-width: var(--measure);
  margin-inline: auto;
}

/* --- links -------------------------------------------------------------- */

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

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  position: static;
  display: inline-block;
  padding: 0.5rem 0;
}

/* --- masthead ----------------------------------------------------------- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 2.75rem 0 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.masthead__title {
  font-weight: 400;
  font-size: 1.55rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.masthead__title:hover {
  color: var(--ink);
  text-decoration: none;
}

.masthead__nav {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  gap: 1.25rem;
}
.masthead__nav a {
  color: var(--ink-soft);
}
.masthead__nav a:hover {
  color: var(--accent);
}

/* --- home: frontispiece + contents ------------------------------------- */

.frontispiece {
  padding: 3rem 0 2.5rem;
}
.frontispiece__tagline {
  margin: 0;
  font-style: italic;
  font-size: 1.35rem;
  color: var(--ink-soft);
}

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

.contents__item + .contents__item {
  margin-top: 0.35rem;
}

.contents__link {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.7rem 0;
  color: var(--ink);
  border-bottom: 1px solid transparent;
}
.contents__link:hover {
  text-decoration: none;
  color: var(--ink);
}
.contents__link:hover .contents__title {
  color: var(--accent);
}

.contents__title {
  font-size: 1.3rem;
  flex: 0 1 auto;
}
.contents__subject {
  display: block;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--meta);
  margin-top: 0.1rem;
}

/* the dotted leader that runs between title and date */
.contents__leader {
  flex: 1 1 auto;
  align-self: flex-end;
  transform: translateY(-0.3em);
  border-bottom: 1px dotted var(--rule);
  min-width: 1.5rem;
}

.contents__date {
  flex: 0 0 auto;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--meta);
  white-space: nowrap;
}

.contents__empty {
  color: var(--ink-soft);
  font-style: italic;
}

/* --- essay -------------------------------------------------------------- */

.essay {
  padding: 3rem 0 2rem;
}

.essay__head {
  margin-bottom: 2.25rem;
}

.essay__title {
  font-weight: 400;
  font-size: 2.35rem;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
}

.essay__subject {
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin: 0.6rem 0 0;
}

.essay__dateline {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--meta);
  margin: 0.9rem 0 0;
}

/* --- prose -------------------------------------------------------------- */

.prose p {
  margin: 0 0 1.35rem;
}

/* Versal drop cap on the opening paragraph. */
.prose > p:first-of-type::first-letter {
  float: left;
  font-size: 3.4em;
  line-height: 0.82;
  padding: 0.05em 0.08em 0 0;
  font-weight: 400;
}

.prose h2 {
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: -0.005em;
  margin: 2.5rem 0 1rem;
}

.prose h3 {
  font-weight: 500;
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
}

.prose blockquote {
  margin: 1.6rem 0;
  padding-left: 1.4rem;
  border-left: 2px solid var(--rule);
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose a {
  text-decoration: underline;
  text-decoration-color: var(--rule);
}
.prose a:hover {
  text-decoration-color: currentColor;
}

.prose em {
  font-style: italic;
}

.prose code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.04);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.prose hr {
  border: 0;
  text-align: center;
  margin: 2.5rem 0;
}
.prose hr::before {
  content: "❧";
  color: var(--meta);
  font-size: 1.1rem;
}

/* --- essay foot --------------------------------------------------------- */

.essay__foot {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  text-align: center;
}
.essay__mark {
  display: block;
  color: var(--meta);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.essay__back {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  margin: 0;
}

/* --- small screens ------------------------------------------------------ */

@media (max-width: 34rem) {
  body {
    font-size: 1.125rem;
  }
  .essay__title {
    font-size: 1.95rem;
  }
  .contents__link {
    flex-wrap: wrap;
  }
  .contents__leader {
    display: none;
  }
  .contents__date {
    flex-basis: 100%;
    margin-top: 0.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
