/* nickwolven.com — one stylesheet, no framework.
   Colours are defined once as tokens on :root, then re-stated for dark mode. */

:root {
  --ink:        #1b1a18;
  --ink-soft:   #55524d;
  --ink-faint:  #85817a;
  --ground:     #fbfaf7;
  --raised:     #ffffff;
  --rule:       #e2ddd4;
  --accent:     #6b4d2e;
  --accent-lit: #8a6740;

  --measure: 34rem;
  --wide: 60rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  /* Geometric sans for the wordmark. Futura and Avenir ship with macOS,
     Century Gothic with Windows; each falls back to the next. No webfont, so
     nothing to download and nothing to fail. */
  --display: "Avenir Next", Avenir, Futura, "Century Gothic", "Trebuchet MS",
             system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink:        #eae6df;
    --ink-soft:   #b3aca1;
    --ink-faint:  #85807a;
    --ground:     #16150f;
    --raised:     #1f1e19;
    --rule:       #34322b;
    --accent:     #cfa875;
    --accent-lit: #e4bf8f;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-lit); }
img { max-width: 100%; height: auto; }

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

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  max-width: var(--wide);
  margin: 0 auto;
  padding: calc(2rem + env(safe-area-inset-top, 0px)) 1.25rem 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.brand { margin-right: auto; }

.wordmark {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.9rem, 5.5vw, 2.6rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.wordmark:hover { color: var(--accent); }

.tagline {
  margin: 0.55rem 0 0;
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.masthead nav { display: flex; flex-wrap: wrap; gap: 1.25rem; padding-bottom: 0.2rem; }
.masthead nav a {
  font-family: var(--sans);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
}
.masthead nav a:hover { color: var(--accent); }

/* ---------- layout ---------- */

main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.section-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

/* The front-page banner over the featured story: louder than a section label. */
.section-label-loud {
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1em; }
.prose h2 { font-size: 1.3rem; margin: 2rem 0 0.75rem; }

.intro { font-size: 1.1875rem; margin-bottom: 3rem; }
.intro p:first-child { margin-top: 0; }

.page-head { margin-bottom: 2.5rem; }
.page-head h1 { font-size: 1.9rem; margin: 0 0 0.35rem; }
.lede { color: var(--ink-soft); margin: 0; }
.quiet { color: var(--ink-soft); }

.portrait {
  float: right;
  width: 13rem;
  margin: 0 0 1.25rem 1.75rem;
  border-radius: 2px;
}

/* ---------- entries ---------- */

.featured { margin-bottom: 4rem; }

/* Featured entry: same structure as any other, scaled up and set on a card so
   it carries the top of the page. */
.entry.is-featured {
  grid-template-columns: 13rem 1fr;
  gap: 2rem;
  padding: 1.75rem;
  background: var(--raised);
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.entry.is-featured .entry-cover img {
  box-shadow: 0 2px 6px rgba(0,0,0,0.20), 0 12px 32px rgba(0,0,0,0.14);
}
.entry.is-featured .entry-title { font-size: 1.85rem; margin-bottom: 0.4rem; }
.entry.is-featured .entry-where { font-size: 1.0625rem; }
.entry.is-featured .entry-links { margin-top: 1.15rem; font-size: 0.875rem; }
.entry.is-featured .entry-links a {
  border-bottom: none;
  padding: 0.4rem 0.9rem;
  border-radius: 2px;
  background: var(--accent);
  color: var(--ground);
}
.entry.is-featured .entry-links a:hover { background: var(--accent-lit); }
.entries { display: flex; flex-direction: column; gap: 2.25rem; }

.entry {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1.5rem;
  align-items: start;
}

.entry-cover { display: block; }
.entry-cover img {
  width: 100%;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.16), 0 6px 18px rgba(0,0,0,0.10);
}
.entry-cover-blank {
  aspect-ratio: 2 / 3;
  border: 1px dashed var(--rule);
  border-radius: 2px;
}

.entry-title { font-size: 1.25rem; margin: 0 0 0.25rem; line-height: 1.25; }
.entry-where { margin: 0; color: var(--ink-soft); }
.entry-credit {
  margin: 0.4rem 0 0;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0.85rem 0 0;
  font-family: var(--sans);
  font-size: 0.8125rem;
}
.entry-links a { text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }

.note {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin-left: 0.4rem;
}
.editor { color: var(--ink-faint); margin-left: 0.4rem; }

.blurbs { margin: 0.9rem 0 0; }
.blurbs blockquote {
  margin: 0 0 0.75rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--rule);
}
.blurbs p { margin: 0; font-style: italic; color: var(--ink-soft); }
.blurbs cite { font-family: var(--sans); font-size: 0.75rem; font-style: normal; color: var(--ink-faint); }

.reprints { margin-top: 0.85rem; font-size: 0.9375rem; }
.reprints summary {
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--ink-faint);
}
.reprints ul { margin: 0.6rem 0 0; padding-left: 1.1rem; color: var(--ink-soft); }
.reprints li { margin-bottom: 0.45rem; }

.reprint-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-left: 0.85rem;
  font-family: var(--sans);
  font-size: 0.75rem;
}
.reprint-links a { white-space: nowrap; }

/* ---------- front page shuffle ---------- */

.shuffle-grid { display: flex; flex-direction: column; gap: 2rem; }
.more { margin-top: 2rem; font-family: var(--sans); font-size: 0.875rem; }
.more a { text-decoration: none; }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--ink-faint);
}
.footer a { color: var(--ink-soft); }
.footer .contact { margin: 0 0 0.6rem; }
.social { display: flex; flex-wrap: wrap; gap: 1rem; list-style: none; margin: 0 0 1rem; padding: 0; }
.colophon { margin: 0; max-width: var(--measure); line-height: 1.5; }

/* ---------- narrow screens ---------- */

@media (max-width: 34rem) {
  .entry { grid-template-columns: 5.5rem 1fr; gap: 1rem; }
  .entry.is-featured { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.25rem; }
  .entry.is-featured .entry-cover { max-width: 11rem; }
  .entry.is-featured .entry-title { font-size: 1.45rem; }
  .reprint-links { margin-left: 0; margin-top: 0.3rem; display: flex; }
  .entry-title { font-size: 1.125rem; }
  .portrait { float: none; width: 100%; max-width: 18rem; margin: 0 0 1.5rem; display: block; }
  .masthead { align-items: flex-start; gap: 0.85rem 1.5rem; }
  .wordmark { letter-spacing: 0.1em; }
  .tagline { margin-top: 0.4rem; letter-spacing: 0.13em; }
  main { padding-top: 2rem; }
}
