@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;0,8..60,600;0,8..60,700;1,8..60,400;1,8..60,500&family=Archivo:wght@400;500;600;700&display=swap');

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

:root {
  --paper:    #F4EFE6;
  --paper-2:  #ECE5D8;
  --ink:      #1C1B19;
  --ink-soft: #423E38;
  --accent:   #D23B27;
  --accent-d: #A82E1E;
  --slate:    #44505A;
  --rule:     #C9BFAF;
  --rule-soft: #DAD1C2;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-label: 'Archivo', 'Helvetica Neue', sans-serif;
  --max-w: 1180px;
  --max-w-text: 680px;
  --shadow: 0 1px 0 var(--rule), 6px 7px 0 -1px rgba(28,27,25,0.06);
}

html { font-size: 18px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint newsprint grain, tuned low for cream */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='220' height='220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: multiply;
}

a { color: var(--accent); text-decoration: none; transition: color 0.18s; }
a:hover { color: var(--accent-d); }

::selection { background: var(--accent); color: var(--paper); }

/* ─── Reusable: kicker / section label ─── */

.kicker {
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-label {
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.section-label .count {
  color: var(--ink-soft);
  font-weight: 500;
  letter-spacing: 0.14em;
}

/* the double-rule motif: thick-then-thin */
.rule-double {
  border: none;
  height: 0;
  border-top: 3px solid var(--ink);
  position: relative;
  margin: 0;
}
.rule-double::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 3px;
  border-top: 1px solid var(--ink);
}

/* ─── Header (running folio) ─── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  box-shadow: 0 1px 0 0 var(--paper), 0 2px 0 0 var(--ink);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
}

.site-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.18rem;
  color: var(--ink);
  letter-spacing: 0.01em;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.site-name span {
  font-family: var(--font-label);
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--slate);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.header-nav {
  font-family: var(--font-label);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.header-nav a { color: var(--ink-soft); }
.header-nav a:hover { color: var(--accent); }

/* ─── Masthead (home hero) ─── */

.masthead {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 40px 28px;
  text-align: center;
}

.masthead-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate);
  padding-bottom: 12px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--rule);
}
.masthead-topline .center { color: var(--accent); }
.topline-credit { color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule); transition: color 0.2s, border-color 0.2s; }
.topline-credit:hover { color: var(--accent); border-color: var(--accent); }

.masthead-wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.2rem, 11vw, 8.2rem);
  line-height: 0.92;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin: 6px 0 0;
}
.masthead-name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 4.5vw, 2.6rem);
  line-height: 1.05;
  color: var(--accent);
  letter-spacing: 0.01em;
  margin: 16px 0 0;
}

.masthead-dateline {
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 20px 0 24px;
}
.masthead-dateline .dot { color: var(--accent); margin: 0 0.5em; }

.masthead-rule {
  border: none;
  height: 0;
  border-top: 4px solid var(--ink);
  position: relative;
  margin: 0 auto;
}
.masthead-rule::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 5px;
  border-top: 1px solid var(--ink);
}

/* ─── Content Wrapper ─── */

.content {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px 100px;
}

/* ─── About / Biography (profile column) ─── */

.about-lalli {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 50px;
  align-items: start;
  padding: 48px 0 52px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--rule);
}

.about-portrait {
  position: relative;
}
.about-portrait .frame {
  position: relative;
  padding: 7px;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 6px 7px 0 -1px rgba(28,27,25,0.12);
}
.about-portrait .news-img { aspect-ratio: 7/10; }
.about-portrait figcaption {
  font-family: var(--font-label);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  text-align: center;
  margin-top: 10px;
  line-height: 1.5;
}

.about-text .kicker { display: block; margin-bottom: 14px; }

.about-lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.7rem;
  line-height: 1.28;
  color: var(--ink);
  margin-bottom: 22px;
}
.about-lead em { font-style: italic; }

.about-columns {
  columns: 2;
  column-gap: 44px;
  max-width: 760px;
}
.about-columns p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.74;
  margin-bottom: 0.95em;
  break-inside: avoid-column;
  text-align: justify;
  hyphens: auto;
}
.about-columns p:first-child::first-letter {
  font-family: var(--font-display);
  font-weight: 800;
  float: left;
  font-size: 3.4rem;
  line-height: 0.78;
  padding: 6px 10px 0 0;
  color: var(--accent);
}
.about-columns em { font-style: italic; color: var(--ink); }
.about-columns p:last-child { margin-bottom: 0; }

@media (max-width: 760px) {
  .about-lalli { grid-template-columns: 1fr; gap: 30px; }
  .about-portrait { max-width: 220px; margin: 0 auto; }
  .about-columns { columns: 1; }
}

/* ─── Newsprint image treatment (duotone ink+paper + halftone) ─── */

.news-img {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
}
.news-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.18) brightness(1.04) sepia(0.16) saturate(0.7);
  transition: transform 0.5s ease, filter 0.3s ease;
}
/* faint halftone-dot overlay */
.news-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(28,27,25,0.55) 0.5px, transparent 0.6px);
  background-size: 3px 3px;
  opacity: 0.16;
  pointer-events: none;
  mix-blend-mode: multiply;
}
/* full-color exception (e.g. the Fireflies cover): skip the newsprint duotone */
.news-img.is-color img { filter: none; }
.news-img.is-color::after { display: none; }
/* Bibliography — Chicago style, hanging indent */
.bibliography .biblio-list { max-width: var(--max-w-text); }
.biblio-entry { font-family: var(--font-body); font-size: 0.95rem; line-height: 1.5; color: var(--ink-soft); padding-left: 1.5em; text-indent: -1.5em; margin-bottom: 0.85em; }
.biblio-entry:last-child { margin-bottom: 0; }
.biblio-entry em { font-style: italic; color: var(--ink); }
.footer-credit { font-family: var(--font-body); font-style: italic; font-size: 0.82rem; color: var(--ink-soft); text-align: center; margin-top: 14px; }

/* ─── Section blocks ─── */

.section {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 46px 40px;
}
.section + .section { border-top: 1px solid var(--rule); }

/* ─── Listings: Catalog entries (work cards) ─── */

.collection-section { margin-bottom: 44px; }

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 0 44px;
}

.work-card-wrapper {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule);
  padding: 26px 0 4px;
}
.work-card-wrapper:nth-child(-n+2) { border-top: 2px solid var(--ink); }

.work-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 18px;
  align-items: start;
}

.work-card .news-img {
  width: 86px;
  aspect-ratio: 3/4;
  border: 1px solid var(--ink);
  padding: 3px;
  background: var(--paper);
}
.work-card .news-img .clip {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.work-card .news-img .clip img {
  filter: grayscale(1) contrast(1.18) brightness(1.04) sepia(0.16) saturate(0.7);
}
.work-card:hover .news-img .clip img { transform: scale(1.05); }

.work-card-kicker {
  font-family: var(--font-label);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.work-card-kicker .sep { color: var(--accent); }
.work-card-kicker .count { color: var(--accent); }

.work-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.42rem;
  line-height: 1.18;
  color: var(--ink);
  transition: color 0.18s;
  letter-spacing: -0.005em;
}
.work-card:hover .work-card-title { color: var(--accent); }

.work-card-blurb {
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* nested article list under a parent catalog entry ("In this issue") */
.work-card-wrapper .child-articles {
  list-style: none;
  margin: 14px 0 2px 104px;
  padding-top: 12px;
  border-top: 1px dotted var(--rule);
  columns: 2;
  column-gap: 28px;
}
.work-card-wrapper .child-articles li {
  break-inside: avoid;
  padding: 2px 0;
}
.work-card-wrapper .child-articles a {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.4;
}
.work-card-wrapper .child-articles a:hover { color: var(--accent); }
.work-card-wrapper .child-articles .more {
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ─── Work Detail header ─── */

.work-hero {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 26px 40px 30px;
}

.work-hero-kicker {
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.work-hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5.2vw, 3.6rem);
  color: var(--ink);
  letter-spacing: -0.012em;
  line-height: 1.05;
  margin-bottom: 22px;
  max-width: 14ch;
}

.work-hero hr.rule-double { margin-bottom: 18px; }

.work-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  font-family: var(--font-label);
  font-size: 0.7rem;
}
.work-meta-item {
  padding: 0 18px;
  border-left: 1px solid var(--rule);
  line-height: 1.5;
}
.work-meta-item:first-child { padding-left: 0; border-left: none; }
.work-meta-label {
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
  margin-right: 8px;
}
.work-meta-value {
  font-family: var(--font-body);
  color: var(--ink);
  font-size: 0.84rem;
}
/* long fields (description) drop to their own full-width row */
.work-meta-item.wide {
  flex-basis: 100%;
  padding-left: 0;
  border-left: none;
  margin-top: 8px;
}

/* ─── Synopsis ─── */

.synopsis {
  max-width: var(--max-w-text);
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: 1.08rem;
  color: var(--ink);
  line-height: 1.62;
  position: relative;
  padding-left: 22px;
  border-left: 3px solid var(--accent);
}
.synopsis p { margin: 0 0 0.7em; }
.synopsis p:last-child { margin-bottom: 0; }

/* ─── In this issue / article index ─── */

.issue-index {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 56px;
}
.issue-index li { break-inside: avoid; padding: 0; }
.issue-index a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink);
}
.issue-index a:hover { color: var(--accent); }
.issue-index .num {
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--slate);
  min-width: 2.2ch;
  text-align: right;
  flex-shrink: 0;
  transition: color 0.18s;
}
.issue-index a:hover .num { color: var(--accent); }
/* title takes only the room it needs so the leader can fill the rest */
.issue-index .t {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.32;
  flex-shrink: 1;
}
/* dotted leader that actually shows: grows to fill, sits on the baseline */
.issue-index .leader {
  flex: 1 1 auto;
  align-self: stretch;
  border-bottom: 1px dotted var(--rule);
  min-width: 16px;
  margin-bottom: 0.42em;
}
/* a small section mark anchors the right edge of each leader */
.issue-index .mark {
  font-family: var(--font-display);
  font-size: 0.86rem;
  color: var(--rule);
  flex-shrink: 0;
  transition: color 0.18s;
}
.issue-index a:hover .mark { color: var(--accent); }
@media (max-width: 700px) { .issue-index { columns: 1; } }

/* ─── Full Text ─── */

.fulltext-controls {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 30px;
  border: 1px solid var(--ink);
  width: max-content;
}
.lang-btn {
  font-family: var(--font-label);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 20px;
  border: none;
  border-right: 1px solid var(--ink);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.18s;
}
.lang-btn:last-of-type { border-right: none; }
.lang-btn.active { background: var(--ink); color: var(--paper); }
.lang-btn:hover:not(.active) { background: var(--paper-2); color: var(--ink); }

.fulltext-date {
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  margin-left: 18px;
  align-self: center;
}

.fulltext-body {
  max-width: var(--max-w-text);
  font-family: var(--font-body);
  font-size: 1.06rem;
  color: var(--ink);
  line-height: 1.78;
}
.fulltext-body p { margin-bottom: 1.05em; }
.fulltext-body .ft-head {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.005em;
  margin: 1.4em 0 0.6em;
}
.fulltext-body > .ft-head:first-child { margin-top: 0; }
.fulltext-body h2, .fulltext-body h3, .fulltext-body h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.005em;
  margin: 1.4em 0 0.5em;
}
.fulltext-body h2 { font-size: 1.7rem; }
.fulltext-body h3 { font-size: 1.32rem; font-style: italic; font-weight: 600; }
.fulltext-body h4 { font-size: 1.1rem; font-style: italic; font-weight: 600; color: var(--slate); }
.fulltext-body > h2:first-child, .fulltext-body > h3:first-child { margin-top: 0; }
.fulltext-body p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 800;
  float: left;
  font-size: 3.6rem;
  line-height: 0.76;
  padding: 6px 12px 0 0;
  color: var(--ink);
}
.fulltext-body strong { font-weight: 700; }
.fulltext-body em { font-style: italic; }
/* Ornament marker (a poem whose title was a drawing) -> centered fleuron */
.fulltext-body .ft-ornament {
  text-align: center;
  color: var(--accent);
  font-size: 1.35rem;
  line-height: 1;
  margin: 0 0 1.4em;
}
/* Poetry: preserve lineation with tight leading; no prose dropcap on a poem */
.fulltext-body p.verse { line-height: 1.5; margin-bottom: 1.3em; }
.fulltext-body p.verse:first-of-type::first-letter {
  font-family: var(--font-body); font-weight: inherit; float: none;
  font-size: inherit; line-height: inherit; padding: 0; color: inherit;
}
.fulltext-body hr {
  border: none;
  width: 64px;
  margin: 30px auto;
  text-align: center;
  height: 0;
}
.fulltext-body hr::before {
  content: '\00A7';
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.fulltext-panel { display: none; }
.fulltext-panel.active { display: block; }

/* ─── Scan Gallery ─── */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 26px;
}
.gallery-item {
  cursor: pointer;
}
.gallery-item .news-img {
  aspect-ratio: 3/4;
  border: 1px solid var(--ink);
  padding: 5px;
  background: var(--paper);
  box-shadow: 4px 5px 0 -1px rgba(28,27,25,0.1);
  transition: box-shadow 0.25s, transform 0.25s;
}
.gallery-item .news-img .clip {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.gallery-item:hover .news-img {
  box-shadow: 6px 8px 0 -1px rgba(210,59,39,0.22);
  transform: translateY(-2px);
}
.gallery-item:hover .news-img img { transform: scale(1.05); }
.gallery-item-label {
  font-family: var(--font-label);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
  margin-top: 9px;
  text-align: center;
}

/* ─── Lightbox ─── */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(28,27,25,0.94);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox.active { display: flex; }
.lightbox figure {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  background: var(--paper);
  padding: 8px;
  border: 1px solid var(--paper);
  line-height: 0;
}
.lightbox img {
  max-width: calc(90vw - 16px);
  max-height: calc(88vh - 16px);
  object-fit: contain;
  /* carry the newsprint duotone through to the enlarged scan — a touch
     gentler than the thumbs so the typescript stays legible at size */
  filter: grayscale(1) contrast(1.12) brightness(1.05) sepia(0.14) saturate(0.7);
}
/* halftone-dot veil over the enlarged scan, matching the thumbnails */
.lightbox figure::after {
  content: '';
  position: absolute;
  inset: 8px;
  background-image: radial-gradient(rgba(28,27,25,0.5) 0.5px, transparent 0.6px);
  background-size: 3px 3px;
  opacity: 0.1;
  pointer-events: none;
  mix-blend-mode: multiply;
}
.lightbox-close {
  position: absolute;
  top: 22px;
  right: 28px;
  font-family: var(--font-label);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--paper);
  background: none;
  border: 1px solid rgba(244,239,230,0.4);
  padding: 7px 16px;
  cursor: pointer;
}
.lightbox-close:hover { background: var(--accent); border-color: var(--accent); }

/* ─── Back Links ─── */

.back-bar {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 22px 40px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  align-items: baseline;
}
.back-link {
  font-family: var(--font-label);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}
.back-link:hover { color: var(--accent); }

/* ─── Footer (colophon) ─── */

.site-footer {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 40px 48px;
}
.site-footer .rule-double { margin-bottom: 18px; }
.footer-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate);
}
.footer-row .accent { color: var(--accent); }

/* ─── Animations ─── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up {
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
}
.fade-up:nth-child(1) { animation-delay: 0.04s; }
.fade-up:nth-child(2) { animation-delay: 0.12s; }
.fade-up:nth-child(3) { animation-delay: 0.2s; }
.fade-up:nth-child(4) { animation-delay: 0.28s; }
.fade-up:nth-child(5) { animation-delay: 0.36s; }
.fade-up:nth-child(6) { animation-delay: 0.44s; }
@media (prefers-reduced-motion: reduce) {
  .fade-up { animation: none; opacity: 1; }
}

/* ─── Responsive ─── */

@media (max-width: 768px) {
  html { font-size: 17px; }
  .masthead, .work-hero, .section, .content, .back-bar, .site-footer { padding-left: 22px; padding-right: 22px; }
  .header-inner { padding: 0 22px; }
  .masthead { padding-top: 32px; }
  .masthead-topline { font-size: 0.58rem; letter-spacing: 0.14em; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
  .masthead-dateline { font-size: 0.6rem; letter-spacing: 0.14em; }
  .works-grid { grid-template-columns: 1fr; gap: 0; }
  .work-card-wrapper:nth-child(-n+2) { border-top: 1px solid var(--rule); }
  .work-card-wrapper:first-child { border-top: 2px solid var(--ink); }
  .work-card-wrapper .child-articles { margin-left: 0; columns: 1; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 18px; }
  .work-meta-grid { flex-direction: column; }
  .work-meta-item { border-left: none; padding-left: 0; }
  .about-columns { columns: 1; text-align: left; }
  .footer-row { flex-direction: column; gap: 6px; }
}

@media (max-width: 430px) {
  /* scale the wordmark so it sits on one or two clean lines on a phone */
  .masthead-wordmark { font-size: clamp(2.7rem, 15vw, 3.4rem); }
  .masthead-dateline { font-size: 0.55rem; letter-spacing: 0.12em; }
  .about-lead { font-size: 1.4rem; }
}

/* ─── Search ─── */
.header-nav { display: flex; align-items: center; }
.search-trigger {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-label); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft);
  background: none; border: none; cursor: pointer; padding: 0; margin-right: 24px;
  transition: color 0.2s;
}
.search-trigger:hover { color: var(--accent); }
.search-trigger svg { display: block; }

.search-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 10vh 20px 24px;
  background: rgba(28, 27, 25, 0.46);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  animation: searchFade 0.18s ease;
}
.search-overlay[hidden] { display: none; }
@keyframes searchFade { from { opacity: 0; } to { opacity: 1; } }
.search-panel {
  width: 100%; max-width: 720px; max-height: 80vh;
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--ink);
  box-shadow: 0 2px 0 0 var(--ink), 14px 18px 0 -2px rgba(28, 27, 25, 0.12);
  animation: searchRise 0.2s cubic-bezier(.2, .7, .3, 1);
}
@keyframes searchRise { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.search-field { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--ink); }
.search-icon { width: 18px; height: 18px; color: var(--accent); flex: none; }
#searchInput {
  flex: 1; min-width: 0; border: none; background: none; outline: none;
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; color: var(--ink);
}
#searchInput::placeholder { color: var(--ink-soft); opacity: 0.5; font-style: italic; }
.search-close {
  font-family: var(--font-label); font-size: 0.58rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft); background: none; border: 1px solid var(--rule); padding: 4px 8px; cursor: pointer; transition: all 0.2s; flex: none;
}
.search-close:hover { color: var(--accent); border-color: var(--accent); }

/* About overlay (footer → credits/method note) */
.about-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 10vh 20px 24px;
  background: rgba(28, 27, 25, 0.46);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  animation: searchFade 0.18s ease;
}
.about-overlay[hidden] { display: none; }
.about-panel {
  position: relative; width: 100%; max-width: 640px; max-height: 82vh; overflow-y: auto;
  background: var(--paper); border: 1px solid var(--ink);
  box-shadow: 0 2px 0 0 var(--ink), 14px 18px 0 -2px rgba(28, 27, 25, 0.12);
  padding: 40px 44px; animation: searchRise 0.2s cubic-bezier(.2, .7, .3, 1);
}
.about-panel h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; line-height: 1.1; margin: 0 0 0.7em; }
.about-panel h3 { font-family: var(--font-label); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin: 1.6em 0 0.6em; }
.about-panel p { font-family: var(--font-body); font-size: 0.98rem; line-height: 1.62; color: var(--ink-soft); margin: 0 0 0.9em; }
.about-panel p:last-child { margin-bottom: 0; }
.about-panel em { font-style: italic; }
.about-close {
  position: absolute; top: 20px; right: 22px;
  font-family: var(--font-label); font-size: 0.58rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft); background: none; border: 1px solid var(--rule); padding: 4px 8px; cursor: pointer; transition: all 0.2s;
}
.about-close:hover { color: var(--accent); border-color: var(--accent); }
.about-trigger {
  font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer;
  border-bottom: 1px solid var(--rule); transition: color 0.2s, border-color 0.2s;
}
.about-trigger:hover { color: var(--accent); border-color: var(--accent); }
.search-hint {
  font-family: var(--font-label); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--slate); padding: 9px 18px; border-bottom: 1px solid var(--rule-soft);
}
.search-hint:empty { display: none; }
.search-results { overflow-y: auto; }
.search-result { display: block; text-decoration: none; color: inherit; padding: 13px 18px; border-bottom: 1px solid var(--rule-soft); }
.search-result:last-child { border-bottom: none; }
.search-result:hover, .search-result.is-active { background: var(--paper-2); }
.sr-kicker {
  font-family: var(--font-label); font-size: 0.55rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--slate); margin-bottom: 4px;
}
.sr-title { font-family: var(--font-display); font-size: 1.16rem; font-weight: 600; color: var(--ink); line-height: 1.25; }
.sr-snippet { font-family: var(--font-body); font-size: 0.92rem; color: var(--ink-soft); line-height: 1.55; margin-top: 4px; }
.search-result mark { background: rgba(210, 59, 39, 0.16); color: var(--accent-d); padding: 0 1px; }
@media (max-width: 600px) {
  .search-trigger span { display: none; }
  .search-trigger { margin-right: 16px; }
  #searchInput { font-size: 1.15rem; }
  .search-overlay { padding: 6vh 10px 12px; }
}
