:root {
  color-scheme: light;
  --paper: #fdfdfd;
  --ink: #201e1b;
  --muted: #514d47;
  --brick: #9d3d2d;
  --brick-mark: var(--brick);
  --fine-rule: #d9d9d9;
  --figure-border: #4f4d4a;
  --figure-background: var(--figure-background);
  --rule: #cbc5ba;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #191b1d;
  --ink: #e5dfd5;
  --muted: #bfb5a8;
  --brick: #df9484;
  --brick-mark: #9d4938;
  --rule: #53504c;
  --fine-rule: #464442;
  --figure-border: #8b8680;
  --figure-background: #292a2b;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.55 var(--sans); }
a { color: inherit; text-underline-offset: .22em; }
a:hover { color: var(--brick); }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
p, h1, h2, figure { margin: 0; }
h1, h2 { font-family: var(--serif); line-height: 1.06; letter-spacing: -.045em; text-wrap: balance; }

.skip { position: fixed; z-index: 1; top: .75rem; left: 1rem; transform: translateY(-200%); padding: .6rem 1rem; background: var(--paper); }
.skip:focus { transform: translateY(0); }
.site { width: min(74rem, calc(100% - 5rem)); margin: auto; }

.masthead {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.2rem 2rem;
  padding: clamp(1.5rem, 4vw, 2.9rem) 0 1.2rem;
  border-bottom: 1px solid var(--fine-rule);
  box-shadow: 0 4px 0 -2px var(--brick-mark);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .24em;
  font: 700 clamp(3.1rem, 7vw, 6.3rem)/.95 var(--serif);
  letter-spacing: -.065em;
  text-decoration: none;
  white-space: nowrap;
}
.brick-mark { flex: none; width: .5em; height: .24em; background: var(--brick-mark); transform: rotate(-9deg); }
.tagline { margin-top: .5rem; color: var(--brick); font: italic 1.16rem/1.4 var(--serif); }
.site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem clamp(1rem, 3vw, 2rem); }
.site-nav a { font-size: .925rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.site-nav a[aria-current], .site-nav a:hover { color: var(--brick); text-decoration: underline; }
.theme-toggle {
  padding: .22rem .55rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: .925rem;
  font-weight: 650;
  cursor: pointer;
}
.theme-toggle:hover, .theme-toggle[aria-pressed="true"] { border-color: var(--brick); color: var(--brick); }
.theme-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

main:focus { outline: none; }
.lead {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  margin-top: clamp(1.35rem, 3vw, 2.5rem);
  margin-bottom: clamp(3.5rem, 7vw, 6rem);
}
.category { color: var(--brick); font-size: .875rem; font-weight: 750; }
.lead h1 { margin-top: .85rem; font-size: clamp(2.5rem, 5.4vw, 5.25rem); }
.lead .category { text-transform: uppercase; }
.lead h1 a, .story h2 a { text-decoration: none; }
.lead h1 span { display: block; }
.lead h1 a:hover { text-decoration: underline; text-decoration-thickness: .035em; }
.summary { color: var(--muted); font: 1.125rem/1.5 var(--serif); }
.lead-quote {
  max-width: 27rem;
  margin-top: 1.15rem;
  padding-left: .85rem;
  border-left: 2px solid var(--brick);
  color: var(--muted);
  font: italic clamp(1.15rem, 2vw, 1.4rem)/1.45 var(--serif);
}
.post-meta { display: flex; flex-wrap: wrap; gap: .2rem .75rem; color: var(--muted); font-size: .875rem; }
.author { font-weight: 750; text-decoration: none; }
.author:hover { text-decoration: underline; }
.lead .post-meta { align-items: baseline; gap: .25rem .55rem; margin-top: 1.25rem; }
.lead .post-meta time::before { content: '·'; margin-right: .35rem; }
.lead .author { color: var(--ink); font-size: 1.025rem; }
.lead .author:hover { color: var(--brick); }
.read { display: inline-block; color: var(--brick); font-size: .925rem; font-weight: 750; }
.read:hover { color: var(--ink); }
.lead .read { margin-top: 1.15rem; }

.lead-figure a {
  position: relative;
  display: block;
  aspect-ratio: 1.43;
  overflow: hidden;
  border: 1px solid var(--figure-border);
  background: var(--figure-background);
}
.lead-figure img {
  position: absolute;
  left: -5%;
  width: 110%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
figcaption { margin-top: .5rem; color: var(--muted); font-size: .875rem; }

.reading, .archive { margin: clamp(1.8rem, 5vw, 4.1rem) auto; }
.reading { max-width: 45rem; }
.archive { max-width: 52rem; }
.reading h1, .archive h1 { font-size: clamp(2.45rem, 6vw, 4.85rem); }
.article-heading { margin: 1.35rem 0; padding-bottom: 1.3rem; border-bottom: 1px solid var(--rule); }
.article-heading h1 { margin: .65rem 0 1rem; }
.article-body, .about > p { font: 1.22rem/1.7 var(--serif); overflow-wrap: anywhere; }
.article-body > * + *, .about > p { margin-top: 1.1rem; }
.article-body a { color: var(--brick); }
.article-figure { max-width: 39rem; margin: 1.65rem auto; }
.article-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }
.article-figure figcaption { font-family: var(--sans); }
.archive h1 { padding-bottom: 1rem; border-bottom: 2px solid var(--ink); }
.story { padding: 1.2rem 0; border-bottom: 1px solid var(--rule); }
.story > * + * { margin-top: .45rem; }
.story h2 { font-size: clamp(1.6rem, 4vw, 2.45rem); }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; margin-top: clamp(2.25rem, 6vw, 4rem); padding: .85rem 0 1.8rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: .875rem; }
.footer a { font-weight: 700; text-decoration: none; }
.site:has(.lead) { min-height: 90svh; display: flex; flex-direction: column; }
.site:has(.lead) .footer { margin-top: auto; border-color: var(--fine-rule); }

@media (max-width: 740px) {
  .site { width: calc(100% - 2rem); }
  .masthead { align-items: start; flex-direction: column; }
  .lead { grid-template-columns: 1fr; }
  .lead h1 span { display: inline; }
}
