@font-face {
  font-family: Fraunces;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-roman.woff2") format("woff2");
}

@font-face {
  font-family: Fraunces;
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-italic.woff2") format("woff2");
}

@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/outfit-latin.woff2") format("woff2");
}

:root {
  --paper: #f6f1e8;
  --ink: #1b1714;
  --muted: #5e584f;
  --line: #e3dcd0;
  --wash: #ebe4d6;
  --header: 4.4rem;
  --serif: Fraunces, "Iowan Old Style", Palatino, Georgia, serif;
  --sans: Outfit, "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

main { flex: 1 0 auto; }

body.noscroll { overflow: hidden; }

img { max-width: 100%; height: auto; }

figure { margin: 0; }

::selection {
  background: #f0cfc4;
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

a { color: inherit; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.55rem 0.8rem;
  z-index: 30;
}

.skip:focus { top: 0.75rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(1rem, 3vw, 2rem);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.brand {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.65rem;
  letter-spacing: -0.03em;
}

.brand-kicker {
  margin-top: 0.22rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 1.15rem;
}

.nav a {
  text-decoration: none;
  font-size: 0.95rem;
}

.nav a[aria-current="page"] {
  box-shadow: inset 0 -1px 0 var(--ink);
}

.wrap {
  width: min(1180px, calc(100% - clamp(1.5rem, 5vw, 4rem)));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  min-height: calc(100svh - var(--header));
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1.25rem;
  padding: clamp(1.5rem, 5vw, 4.5rem) clamp(1.25rem, 4vw, 4rem) clamp(2rem, 6vw, 4.5rem);
}

.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 520;
  font-style: italic;
  font-size: clamp(4.4rem, 8vw, 7.6rem);
  line-height: 0.82;
  letter-spacing: -0.045em;
}

.lede {
  max-width: 36rem;
  margin: 0;
  font-size: 1.12rem;
  color: var(--ink);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.2rem;
  margin-top: 0.4rem;
}

.button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  font-size: 0.95rem;
}

.button:hover { background: #322c27; }

.text-link { text-underline-offset: 0.18em; }

.hero-visual {
  margin: 0;
  background: var(--wash);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 2rem 1.5rem 1.2rem;
  min-width: 0;
}

.hero-visual a { line-height: 0; }

.hero-visual img {
  width: auto;
  max-width: min(100%, 440px);
  max-height: calc(100svh - var(--header) - 9rem);
  height: auto;
  box-shadow: 0 0 0 1px rgba(27, 23, 20, 0.08);
}

.hero-visual figcaption {
  text-align: center;
  padding-top: 0.85rem;
}

.hero-visual figcaption a {
  text-decoration: none;
  line-height: 1.35;
}

.hero-visual strong {
  display: block;
  font-family: var(--serif);
  font-weight: 520;
  font-size: 1.2rem;
}

.hero-visual span {
  color: var(--muted);
  font-size: 0.86rem;
}

.year-rail {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.year-rail a {
  background: var(--paper);
  text-decoration: none;
  padding: 1rem 0.9rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.year-rail a:hover { background: var(--wash); }

.year-rail b {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 520;
  font-size: clamp(1.5rem, 2vw, 1.9rem);
  letter-spacing: -0.03em;
}

.year-rail span {
  color: var(--muted);
  font-size: 0.8rem;
}

.section { padding: 4.25rem 0; }

.section + .section { border-top: 1px solid var(--line); }

.section-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.section-bar h2,
.page-head h1,
.year-block h2,
.note h1,
.work-info h1 {
  font-family: var(--serif);
  font-weight: 520;
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin: 0.3rem 0 0;
}

.section-bar h2 { font-size: clamp(2.1rem, 4vw, 3.1rem); }

.section-bar > a { text-underline-offset: 0.18em; }

.catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.6rem 1.4rem;
  align-items: start;
}

.card {
  text-decoration: none;
  display: block;
  min-width: 0;
}

.card-frame {
  display: block;
  background: var(--wash);
  line-height: 0;
}

.card img,
.frame img,
.note-figure img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0 0 0 1px rgba(27, 23, 20, 0.08);
}

.card-title {
  margin: 0.75rem 0 0.2rem;
  font-family: var(--serif);
  font-weight: 520;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.card p,
.series-row span {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.card:hover .card-title { text-decoration: underline; text-underline-offset: 0.14em; }

.year-head h2 a { text-decoration: none; }

.year-head h2 a:hover { text-decoration: underline; text-underline-offset: 0.12em; }

.series-label {
  margin: 2.4rem 0 0.9rem;
}

.series-label h2,
.series-label h3,
.series-label p,
.chunk-note {
  margin: 0.25rem 0 0;
}

.chunk-note { margin-bottom: 1rem; }

.series-label h2,
.series-label h3 {
  font-family: var(--serif);
  font-weight: 520;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}

.series-label p,
.chunk-note,
.page-head .intro {
  color: var(--muted);
  max-width: 40rem;
}

.series-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.7rem;
}

.series-row a { text-decoration: none; min-width: 0; }

.series-row img { display: block; width: 100%; }

.series-row span { display: block; margin-top: 0.4rem; }

.page-head { padding: 3.2rem 0 0.4rem; }

.page-head h1 { font-size: clamp(3.4rem, 8vw, 6rem); }

.page-head .intro { margin: 1rem 0 0; }

.page-head .intro p { margin: 0 0 0.7rem; }

.page-head .eyebrow a { color: var(--muted); }

.year-nav {
  position: sticky;
  top: var(--header);
  z-index: 15;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.7rem 0;
  margin-top: 1.4rem;
  background: var(--paper);
}

.year-nav a {
  text-decoration: none;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.year-nav a:hover { background: var(--wash); }

.year-nav a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

.year-block {
  padding: 3.2rem 0 0.5rem;
  scroll-margin-top: 8.5rem;
}

.year-block + .year-block { border-top: 1px solid var(--line); }

.year-head {
  display: grid;
  grid-template-columns: minmax(7rem, 9rem) minmax(0, 1fr);
  gap: 1rem 1.5rem;
  align-items: end;
  margin-bottom: 1.6rem;
}

.year-head h2 {
  font-style: italic;
  font-size: clamp(2.8rem, 5vw, 4.4rem);
}

.year-head p { margin: 0 0 0.55rem; color: var(--muted); }

.journal-links {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.journal-links h3 {
  margin: 0 0 0.4rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
}

.journal-links ul { list-style: none; margin: 0; padding: 0; }

.journal-links li { margin: 0.25rem 0; }

.journal-links li span,
.related li span {
  color: var(--muted);
  font-size: 0.88rem;
}

.work-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.72fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  padding: 1.6rem 0 3rem;
}

.work-info { position: sticky; top: calc(var(--header) + 1.2rem); }

.work-info h1 { font-size: clamp(2.5rem, 4vw, 3.7rem); }

.facts {
  display: grid;
  gap: 0.7rem;
  margin: 1.4rem 0 0;
}

.facts div {
  display: grid;
  grid-template-columns: 6.2rem minmax(0, 1fr);
  gap: 0.75rem;
  border-top: 1px solid var(--line);
  padding-top: 0.65rem;
}

.facts dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.facts dd { margin: 0; }

.prose { margin-top: 1.3rem; max-width: 38rem; }

.prose p { margin: 0 0 0.8rem; }

.status {
  margin: 1rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
}

.related { margin-top: 1.6rem; }

.related h2 {
  margin: 0 0 0.35rem;
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
}

.related ul { list-style: none; margin: 0; padding: 0; }

.related li { margin: 0.28rem 0; }

.frame {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--wash);
  cursor: zoom-in;
  line-height: 0;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: 0.3rem 0 3rem;
}

.pager a {
  text-decoration: none;
  padding: 1rem 0;
}

.pager .next { text-align: right; }

.pager span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pager strong {
  font-family: var(--serif);
  font-weight: 520;
  font-size: 1.3rem;
}

.note-list { list-style: none; margin: 1.5rem 0 0; padding: 0; }

.note-list li { border-top: 1px solid var(--line); }

.note-list a {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr) 6.5rem;
  gap: 1.2rem;
  align-items: center;
  padding: 1.15rem 0;
  text-decoration: none;
}

.note-list time {
  color: var(--muted);
  font-size: 0.92rem;
}

.note-list h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 520;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

.note-list p { margin: 0.25rem 0 0; color: var(--muted); }

.note-meta { color: var(--muted); }

.note > .note-meta { margin: 0.35rem 0 0; }

.note-list a:hover h3 { text-decoration: underline; text-underline-offset: 0.14em; }

.thumb {
  width: 6.5rem;
  height: 7.5rem;
  background: var(--wash);
  display: grid;
  place-items: center;
  justify-self: end;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  box-shadow: none;
}

.note {
  width: min(820px, 100%);
  margin: 0 auto;
  padding: 2.6rem 0 4rem;
}

.note h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); }

.note-date {
  display: block;
  margin-top: 0.8rem;
  color: var(--muted);
}

.note .prose { max-width: 62ch; font-size: 1.08rem; }

.note-figure { margin: 1.4rem 0; }

.note-figure figcaption { margin-top: 0.55rem; color: var(--muted); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.chips span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2.2rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
}

.site-footer strong {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.3rem;
}

.site-footer p { margin: 0.2rem 0 0; color: var(--muted); }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.1rem;
}

.footer-nav a { text-underline-offset: 0.16em; }

#viewer {
  width: min(1080px, calc(100vw - 1.5rem));
  max-height: calc(100vh - 1.5rem);
  border: 0;
  padding: 0.75rem;
  background: #161311;
  color: var(--paper);
}

#viewer::backdrop { background: rgba(12, 10, 8, 0.94); }

.viewer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.viewer-bar p { margin: 0; font-size: 0.92rem; }

.viewer-bar button {
  border: 0;
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font: inherit;
}

#viewer img {
  width: 100%;
  height: min(78vh, 920px);
  object-fit: contain;
  box-shadow: none;
  background: transparent;
}

.empty {
  padding-bottom: 4rem;
}

@media (max-width: 980px) {
  .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .series-row {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 38vw;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    scroll-snap-type: x mandatory;
  }
  .series-row a { scroll-snap-align: start; }
  .work-layout,
  .year-head { grid-template-columns: 1fr; }
  .work-info { position: static; }
}

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-visual {
    order: -1;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    padding-top: 1.2rem;
  }
  .hero-visual img { max-height: 62svh; }
  .hero h1 { font-size: clamp(3.6rem, 18vw, 5.2rem); }
  .year-rail { grid-template-columns: repeat(3, 1fr); }
  .note-list a {
    grid-template-columns: minmax(0, 1fr) 5rem;
    grid-template-areas:
      "date thumb"
      "text thumb";
  }
  .note-list time { grid-area: date; }
  .note-list div { grid-area: text; }
  .thumb { grid-area: thumb; width: 5rem; height: 6.2rem; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .catalog { grid-template-columns: 1fr; gap: 2rem; }
  .nav { gap: 0.75rem; }
  .brand-name { font-size: 1.4rem; }
  .pager strong { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .site-header,
  .year-nav,
  .pager,
  .hero-actions,
  .site-footer,
  #viewer { display: none !important; }
  body { background: white; }
  .hero, .work-layout { display: block; }
  img { max-height: 80vh; width: auto; }
}
