:root {
  --paper: #f5ede1;
  --paper-deep: #ece0cf;
  --ink: #2a1c13;
  --ink-soft: #5b4636;
  --crema: #a8582a;
  --ring: rgba(122, 74, 38, 0.16);
  --rule: rgba(42, 28, 19, 0.14);
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b130e;
    --paper-deep: #241a13;
    --ink: #eadcc8;
    --ink-soft: #b59d85;
    --crema: #d98a52;
    --ring: rgba(217, 138, 82, 0.13);
    --rule: rgba(234, 220, 200, 0.14);
  }
}

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

html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.1875rem;
  line-height: 1.7;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

/* paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { body::before { mix-blend-mode: screen; opacity: 0.12; } }

a { color: inherit; text-decoration-color: var(--crema); text-underline-offset: 0.2em; }
a:hover { color: var(--crema); }

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

/* masthead */
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.5rem 0 1.25rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1rem;
}
.masthead a { text-decoration: none; }
.wordmark { font-weight: 600; letter-spacing: -0.01em; font-variation-settings: "SOFT" 100, "WONK" 1; }
.wordmark span { color: var(--crema); font-style: italic; font-weight: 400; }
.masthead nav { color: var(--ink-soft); font-size: 0.9rem; }

/* full-width bands so the page spans the screen, not just the text column */
.masthead, .article-head, .intro {
  background: var(--paper-deep);
  box-shadow: 0 0 0 100vmax var(--paper-deep);
  clip-path: inset(0 -100vmax);
}
.masthead { position: relative; }
.masthead::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -100vmax;
  right: -100vmax;
  border-bottom: 1px solid var(--rule);
}
.article-head, .intro { margin-bottom: 2.5rem; }

/* the coffee ring */
.ring {
  position: absolute;
  top: -1.5rem;
  right: -5rem;
  width: 17rem;
  height: 17rem;
  color: var(--ring);
  pointer-events: none;
  z-index: -1;
  transform: rotate(-12deg);
}
@media (max-width: 40rem) { .ring { right: -6rem; width: 13rem; height: 13rem; } }

/* article header */
.article-head { padding: 4rem 0 2.25rem; position: relative; isolation: isolate; }
.kicker {
  font-family: "Fraunces", Georgia, serif;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--crema);
  margin: 0 0 1rem;
}
h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.6rem, 9vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 1.25rem;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
}
.dek {
  font-size: 1.3rem;
  line-height: 1.45;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 2rem;
}

/* byline: same markup + placement on every article */
.byline {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
  line-height: 1.35;
}
.byline img {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--rule);
  background: var(--paper-deep);
}
.byline .avatar {
  width: 3rem;
  height: 3rem;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--rule);
}
.byline .name { font-family: "Fraunces", Georgia, serif; font-weight: 600; display: block; }
.byline time { color: var(--ink-soft); }

/* body */
.prose { padding-bottom: 3rem; }
.prose p { margin: 0 0 1.15em; }
.prose > p:first-child { font-size: 1.35rem; line-height: 1.55; }
.prose .beat {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.6rem;
  line-height: 1.3;
  font-style: italic;
  margin: 1.75em 0;
  padding-left: 1rem;
  border-left: 3px solid var(--crema);
}

.coda {
  text-align: center;
  color: var(--crema);
  margin: 0 0 3rem;
}
.coda svg { width: 2.25rem; height: 2.25rem; }

/* home */
.intro { padding: 4.5rem 0 3rem; position: relative; isolation: isolate; }
.intro h1 { font-size: clamp(2.8rem, 11vw, 4.6rem); }
.intro p:not(.kicker) { color: var(--ink-soft); font-size: 1.25rem; line-height: 1.55; margin: 0; }
.essays { list-style: none; margin: 0; padding: 0 0 4rem; }
.essays a { display: block; text-decoration: none; }
.essays h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.15;
  margin: 0.25rem 0 0.4rem;
  letter-spacing: -0.015em;
}
.essays a:hover h2 { color: var(--crema); }
.essays p { margin: 0; color: var(--ink-soft); font-style: italic; }
.essays time { font-size: 0.85rem; color: var(--ink-soft); letter-spacing: 0.04em; }

footer {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0 2.5rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: space-between;
}
footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; }

/* one slow page-load reveal */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise 0.9s cubic-bezier(.2,.7,.2,1) both; }
  .reveal:nth-child(2) { animation-delay: 0.08s; }
  .reveal:nth-child(3) { animation-delay: 0.16s; }
  .reveal:nth-child(4) { animation-delay: 0.24s; }
  .ring { animation: steam 1.6s ease-out both; }
  @keyframes rise { from { opacity: 0; transform: translateY(0.6rem); } }
  @keyframes steam { from { opacity: 0; transform: rotate(-30deg) scale(0.94); } }
}
