:root {
  --ink: #1c2238;
  --dusk: #283052;
  --moon: #e4e2ec;
  --mist: #a3a8bf;
  --lamp: #e9b872;
  --rule: rgba(228, 226, 236, 0.14);
  --display: "Italiana", "Didot", serif;
  --text: "Literata", Georgia, serif;
  --measure: 36rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--moon);
  font: 300 1.125rem/1.75 var(--text);
  font-optical-sizing: auto;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: rgba(233, 184, 114, 0.6); text-underline-offset: 0.2em; }
a:hover { color: var(--lamp); }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--lamp); color: var(--ink); padding: 0.5rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

/* Masthead sits over the hero on the front page, above the page elsewhere */
.masthead {
  position: absolute; inset: 0 0 auto 0; z-index: 3;
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 1.5rem clamp(1rem, 5vw, 3.5rem);
}
.wordmark { font: 400 1.75rem/1 var(--display); text-decoration: none; letter-spacing: 0.02em; }
.masthead nav { display: flex; gap: 1.5rem; font-size: 0.95rem; }
.masthead nav a { text-decoration: none; color: var(--mist); }
.masthead nav a:hover { color: var(--lamp); }

/* Hero */
.hero { position: relative; min-height: min(92vh, 52rem); display: grid; align-items: end; overflow: hidden; }
.hero-img, .hero-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-img img { filter: saturate(0.7) brightness(0.8); }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(28,34,56,0.55) 0%, rgba(28,34,56,0.15) 35%, rgba(28,34,56,0.85) 78%, var(--ink) 100%);
}
.hero-copy {
  position: relative; z-index: 2;
  padding: 0 clamp(1rem, 5vw, 3.5rem) clamp(6rem, 14vh, 9rem);
  max-width: 50rem;
}
.hero h1 {
  font: 400 clamp(3.2rem, 11vw, 8.5rem)/0.92 var(--display);
  margin: 0 0 1.5rem;
  letter-spacing: -0.01em;
}
.hero-copy p { max-width: 32rem; margin: 0; color: var(--moon); font-size: 1.15rem; }
.settle {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: clamp(2rem, 5vh, 3.5rem);
  width: 100%; height: 72px; pointer-events: none;
}

/* Front page list */
.writing { max-width: 64rem; margin: 0 auto; padding: 2rem clamp(1rem, 5vw, 3.5rem) 5rem; }
.entry { border-top: 1px solid var(--rule); }
.entry:last-child { border-bottom: 1px solid var(--rule); }
.entry-link {
  display: grid; grid-template-columns: 1fr 15rem; gap: 2.5rem; align-items: center;
  padding: 2.5rem 0; text-decoration: none;
}
.entry h2 { font: 400 clamp(1.9rem, 4vw, 2.75rem)/1.05 var(--display); margin: 0 0 0.75rem; }
.entry-link:hover h2 { color: var(--lamp); }
.entry .dek { margin: 0 0 0.75rem; color: var(--moon); max-width: var(--measure); }
.meta { margin: 0; font-size: 0.875rem; color: var(--mist); }
.thumb img { aspect-ratio: 4 / 3; object-fit: cover; filter: saturate(0.75); border-radius: 2px; }

/* Articles and pages */
.post { padding: 8rem clamp(1rem, 5vw, 3.5rem) 5rem; }
.post-head { max-width: var(--measure); margin: 0 auto 2.5rem; }
.post-head h1 { font: 400 clamp(2.6rem, 7vw, 4.75rem)/1 var(--display); margin: 0 0 1.25rem; }
.post-head .dek { font-size: 1.3rem; line-height: 1.5; color: var(--moon); margin: 0 0 1rem; font-style: italic; }
.lead { display: block; max-width: 56rem; margin: 0 auto 3rem; }
.lead img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; filter: saturate(0.75); border-radius: 2px; }

.prose { max-width: var(--measure); margin: 0 auto; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.4em; }
.prose h2 { font: 400 2rem/1.15 var(--display); margin: 2.4em 0 0.6em; color: var(--moon); }
.prose h3 { font-weight: 500; font-size: 1.15rem; margin: 2em 0 0.4em; }
.prose strong { font-weight: 550; color: #fff; }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--lamp); }
.note { border-left: 2px solid var(--lamp); padding: 0.25rem 0 0.25rem 1.25rem; margin: 2rem 0; color: var(--mist); font-style: italic; }
.note p { margin: 0; }

.next {
  display: block; max-width: var(--measure); margin: 4rem auto 0; padding: 2rem 0 0;
  border-top: 1px solid var(--rule); text-decoration: none;
}
.next-label { display: block; color: var(--lamp); font-size: 0.9rem; margin-bottom: 0.4rem; }
.next-title { display: block; font: 400 2rem/1.1 var(--display); margin-bottom: 0.4rem; }
.next-dek { display: block; color: var(--mist); }
.next:hover .next-title { color: var(--lamp); }

/* Footer */
.foot { border-top: 1px solid var(--rule); padding: 3rem clamp(1rem, 5vw, 3.5rem) 3.5rem; color: var(--mist); font-size: 0.95rem; }
.foot-line { font: 400 1.75rem/1.2 var(--display); color: var(--moon); margin: 0 0 1rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0 0 1rem; }
.foot-small { margin: 0; font-size: 0.85rem; max-width: 40rem; }

@media (max-width: 720px) {
  body { font-size: 1.0625rem; }
  .masthead nav { gap: 1rem; }
  .entry-link { grid-template-columns: 1fr; gap: 1.25rem; padding: 2rem 0; }
  .thumb { order: -1; }
  .post { padding-top: 6rem; }
}
