/* ---------- Typefaces (served from this site) ---------- */
@font-face { font-family: 'Cormorant Garamond'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/cormorant-garamond-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 400; font-style: italic; font-display: swap; src: url('/fonts/cormorant-garamond-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 500; font-style: italic; font-display: swap; src: url('/fonts/cormorant-garamond-latin-500-italic.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/eb-garamond-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-weight: 400; font-style: italic; font-display: swap; src: url('/fonts/eb-garamond-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/eb-garamond-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Italianno'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/italianno-latin-400-normal.woff2') format('woff2'); }

:root {
  --parchment: #F4EEE1;
  --vellum: #FBF8F1;
  --stone: #E7DDC7;
  --rule: #CDBF9F;
  --ink: #1F1B16;
  --ink-soft: #2A241D;
  --ink-muted: #3D352C;
  --umber: #5C5246;
  --oxblood: #7A2418;
  --oxblood-deep: #4F150D;
  --gilt: #9A7B3F;
  --gilt-text: #6E5626;

  --script: 'Michelangelus', 'Italianno', 'Snell Roundhand', cursive;
  --display: 'Cormorant Garamond', 'Garamond', 'Times New Roman', serif;
  --text: 'EB Garamond', 'Garamond', Georgia, serif;

  --measure: 680px;
  --page: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--text);
  font-size: 19px;
  line-height: 1.6;
  font-feature-settings: 'kern', 'liga', 'onum';
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--oxblood); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--oxblood-deep); }
:focus-visible { outline: 2px solid var(--oxblood); outline-offset: 3px; }
::selection { background: #E6CFA6; color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--parchment); padding: 10px 16px; z-index: 10; }
.skip:focus { top: 12px; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 13px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--oxblood); }
.meta { font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--umber); }
.smallcaps { font-variant: small-caps; letter-spacing: 0.1em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 28px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font: 500 13px/1 var(--text); letter-spacing: 0.26em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: background .2s, color .2s;
}
.btn:hover { background: var(--ink); color: var(--parchment); }
.btn--solid { background: var(--ink); color: var(--parchment); }
.btn--solid:hover { background: var(--oxblood); border-color: var(--oxblood); color: var(--parchment); }

.ornament { display: flex; align-items: center; justify-content: center; gap: 18px; color: var(--gilt); }
.ornament::before, .ornament::after { content: ''; width: 120px; max-width: 25vw; height: 1px; background: var(--gilt); }
.ornament span { font-size: 22px; line-height: 1; }

/* ---------- Masthead & navigation ---------- */
.topbar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
  padding: 18px 0 14px; border-bottom: 1px solid var(--rule);
  font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--umber);
}
.topbar nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.topbar a { color: var(--umber); text-decoration: none; padding: 6px 0; }
.topbar a:hover, .topbar a[aria-current='page'] { color: var(--oxblood); }
.topbar .volume { font-variant: small-caps; letter-spacing: 0.12em; }

.masthead { text-align: center; padding: 52px 0 26px; }
.masthead h1 {
  margin: 10px 0 0; font-family: var(--script); font-weight: 400;
  font-size: clamp(64px, 11vw, 132px); line-height: 1.05; color: var(--ink);
}
.masthead h1 a { color: inherit; text-decoration: none; }
.masthead .tagline { font-size: 13px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--gilt-text); }
.masthead .ornament { margin-top: 18px; }
.double-rule { border: 0; border-top: 3px double var(--ink); margin: 0; }

.compact-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.compact-head .brand { font-family: var(--script); font-size: 44px; line-height: 1.1; color: var(--ink); text-decoration: none; }
.compact-head nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; }
.compact-head nav a { color: var(--umber); text-decoration: none; padding: 6px 0; }
.compact-head nav a:hover, .compact-head nav a[aria-current='page'] { color: var(--oxblood); }

/* ---------- Home ---------- */
.lead { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 48px; align-items: center; padding: 56px 0 0; }
.lead .frame { border: 1px solid var(--rule); padding: 12px; background: var(--vellum); }
.lead .frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.lead h2 { margin: 16px 0 0; font-family: var(--display); font-weight: 500; font-size: clamp(40px, 5vw, 62px); line-height: 1.04; }
.lead h2 a { color: var(--ink); text-decoration: none; }
.lead h2 a:hover { color: var(--oxblood); }
.dek { margin: 18px 0 0; font-family: var(--display); font-style: italic; font-size: clamp(22px, 2.4vw, 27px); line-height: 1.35; color: var(--ink-muted); }
.lead .excerpt { margin: 22px 0 0; font-size: 19px; line-height: 1.7; color: var(--ink-muted); }
.lead .meta { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.lead .btn { margin-top: 28px; }

.section-title { display: flex; align-items: center; gap: 20px; margin: 96px 0 40px; }
.section-title::before, .section-title::after { content: ''; flex: 1; height: 1px; background: var(--rule); }
.section-title h2 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 30px; font-variant: small-caps; letter-spacing: 0.12em; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 56px 40px; }
.card { display: flex; flex-direction: column; gap: 12px; }
.card .thumb { display: block; border: 1px solid var(--rule); overflow: hidden; background: var(--stone); }
.card .thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .6s ease; }
.card:hover .thumb img { transform: scale(1.03); }
.card .eyebrow { font-size: 12px; }
.card h3 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 30px; line-height: 1.1; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--oxblood); }
.card p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink-muted); }
.card .meta { font-size: 13px; }
.card--plain { border-top: 1px solid var(--rule); padding-top: 18px; }

.placeholder { display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(135deg, var(--stone) 0 12px, #EFE7D5 12px 24px); color: var(--umber); }

.note-from {
  margin: 112px 0 0; padding: 56px 24px; text-align: center;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.note-from .script { font-family: var(--script); font-size: clamp(40px, 5vw, 56px); line-height: 1.1; color: var(--oxblood); }
.note-from .about-text { max-width: 620px; margin: 20px auto 0; font-size: 20px; line-height: 1.7; color: var(--ink-muted); }
.note-from .about-text p { margin: 0 0 0.8em; }
.note-from .btn { margin-top: 16px; }

.empty { text-align: center; padding: 96px 0; }
.empty .script { font-family: var(--script); font-size: 64px; color: var(--oxblood); line-height: 1.1; }
.empty p { color: var(--ink-muted); font-size: 20px; }

/* ---------- Article ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: transparent; z-index: 5; }
.progress span { display: block; height: 100%; width: 0; background: var(--oxblood); transition: width .1s linear; }

.essay { padding: 72px 0 96px; }
.essay-head { max-width: 780px; margin: 0 auto; padding: 0 24px; text-align: center; }
.essay-head h1 { margin: 18px 0 0; font-family: var(--display); font-weight: 500; font-size: clamp(44px, 7vw, 76px); line-height: 1.02; }
.essay-head .dek { font-size: clamp(22px, 3vw, 29px); }
.essay-head .ornament { margin-top: 28px; }
.essay-head .ornament::before, .essay-head .ornament::after { width: 48px; }
.essay-head .meta { margin-top: 14px; }
.draft-flag { display: inline-block; margin-bottom: 18px; padding: 6px 14px; border: 1px solid var(--oxblood); color: var(--oxblood); font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; }

.cover { max-width: 1040px; margin: 56px auto 0; padding: 0 24px; }
.cover img { width: 100%; max-height: 640px; object-fit: cover; border: 1px solid var(--rule); }
figcaption { margin-top: 12px; text-align: center; font-style: italic; font-size: 15px; line-height: 1.5; color: var(--umber); }

.prose { max-width: var(--measure); margin: 56px auto 0; padding: 0 24px; font-size: 21px; line-height: 1.75; color: var(--ink-soft); hyphens: auto; -webkit-hyphens: auto; }
.prose > * { margin: 0 0 1.15em; }
.prose > p:first-of-type::first-letter {
  float: left; font-family: var(--display); font-weight: 500; font-size: 5.1em; line-height: 0.8;
  padding: 0.06em 0.1em 0 0; color: var(--oxblood);
}
.prose h2 { margin: 2.1em 0 0.6em; font-family: var(--display); font-weight: 500; font-size: 1.85em; line-height: 1.15; color: var(--ink); hyphens: manual; }
.prose h3 { margin: 1.8em 0 0.5em; font-family: var(--display); font-weight: 600; font-size: 1.3em; line-height: 1.2; color: var(--ink); font-variant: small-caps; letter-spacing: 0.04em; }
.prose h4 { margin: 1.6em 0 0.4em; font-size: 1em; letter-spacing: 0.18em; text-transform: uppercase; color: var(--umber); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.3em 0; }
.prose li::marker { color: var(--gilt-text); }
.prose blockquote { margin: 1.6em 0; padding: 0 0 0 1.2em; border-left: 1px solid var(--gilt); font-style: italic; color: var(--ink-muted); }
.prose blockquote p { margin: 0 0 0.8em; }
.prose blockquote p:last-child { margin: 0; }
.prose code { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 0.78em; background: var(--stone); padding: 0.1em 0.35em; }
.prose pre { background: var(--ink); color: var(--parchment); padding: 20px; overflow-x: auto; font-size: 15px; line-height: 1.6; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.85em; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; }
.prose th { font-variant: small-caps; letter-spacing: 0.08em; border-bottom: 1px solid var(--ink); }
.prose iframe, .prose video { max-width: 100%; border: 0; }
.prose sup a, .prose a[data-footnote-ref] { text-decoration: none; font-size: 0.8em; padding: 0 2px; }

.prose hr.fleuron { border: 0; margin: 2.4em 0; text-align: center; height: auto; }
.prose hr.fleuron::after { content: '✦  ✦  ✦'; white-space: pre; color: var(--gilt); letter-spacing: 0.4em; font-size: 16px; }

.prose .plate { margin: 2em 0; }
.prose .plate img { width: 100%; border: 1px solid var(--rule); }
.prose .plate--wide { margin-left: calc(50% - min(45vw, 460px)); margin-right: calc(50% - min(45vw, 460px)); }
.prose .plate--full { margin-left: calc(50% - min(48vw, 560px)); margin-right: calc(50% - min(48vw, 560px)); }
.prose .gallery { display: grid; gap: 16px; margin: 2em calc(50% - min(45vw, 460px)); }
.prose .gallery--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prose .gallery--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.prose .gallery figure { margin: 0; }
.prose .gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border: 1px solid var(--rule); }
.prose .gallery figcaption { font-size: 14px; }

.prose .pull-quote { margin: 2em 0; padding: 22px 0 16px; border-top: 1px solid var(--gilt); border-bottom: 1px solid var(--gilt); text-align: center; }
.prose .pull-quote blockquote { margin: 0; padding: 0; border: 0; font-style: normal; }
.prose .pull-quote p { margin: 0; font-family: var(--script); font-size: clamp(34px, 4.6vw, 46px); line-height: 1.2; color: var(--ink); hyphens: manual; }
.prose .pull-quote cite { display: block; margin-top: 10px; font-style: normal; font-size: 14px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--umber); }

.prose .footnotes { margin-top: 3em; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 16px; line-height: 1.6; color: var(--umber); }
.prose .footnotes h2 { position: static; width: auto; height: auto; clip: auto; overflow: visible; white-space: normal; margin: 0 0 8px; font-family: var(--text); font-size: 17px; font-weight: 400; font-variant: small-caps; letter-spacing: 0.14em; color: var(--ink); }
.prose .footnotes ol { padding-left: 1.2em; }
.prose .footnotes p { margin: 0 0 0.4em; }
.prose .footnotes a[data-footnote-backref] { text-decoration: none; }

.prose .signature { margin-top: 1.4em; text-align: right; font-family: var(--script); font-size: 42px; line-height: 1.2; color: var(--oxblood); }
.prose .end-mark { text-align: center; color: var(--gilt); font-size: 22px; margin-top: 8px; }

.pager { max-width: 832px; margin: 72px auto 0; padding: 28px 0 0; border-top: 3px double var(--ink); display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.pager a { display: block; color: var(--ink); text-decoration: none; }
.pager a:hover .t { color: var(--oxblood); }
.pager .next { text-align: right; }
.pager .k { font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--umber); }
.pager .t { margin-top: 6px; font-family: var(--display); font-size: 28px; line-height: 1.15; }

/* ---------- Archive & about ---------- */
.page-head { text-align: center; padding: 64px 0 24px; }
.page-head h1 { margin: 0; font-family: var(--script); font-weight: 400; font-size: clamp(56px, 8vw, 96px); line-height: 1.1; }
.archive { max-width: 820px; margin: 0 auto; padding: 24px 0 96px; }
.archive h2 { margin: 48px 0 8px; font-family: var(--display); font-weight: 500; font-size: 34px; color: var(--gilt-text); font-variant: small-caps; letter-spacing: 0.1em; text-align: center; }
.archive ol { list-style: none; margin: 0; padding: 0; }
.archive li { display: grid; grid-template-columns: 64px 1fr auto; gap: 8px 20px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.archive .no { font-family: var(--display); font-size: 20px; color: var(--oxblood); }
.archive .title { font-family: var(--display); font-size: 26px; line-height: 1.2; }
.archive .title a { color: var(--ink); text-decoration: none; }
.archive .title a:hover { color: var(--oxblood); }
.archive .sub { display: block; font-style: italic; font-size: 17px; color: var(--umber); margin-top: 2px; }
.archive .date { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--umber); white-space: nowrap; }
@media (max-width: 560px) {
  .archive li { grid-template-columns: 48px 1fr; }
  .archive .date { grid-column: 2; }
}

/* ---------- Footer ---------- */
.site-footer { margin-top: 0; background: var(--ink); color: #D9CFBB; text-align: center; padding: 56px 24px; }
.site-footer .brand { font-family: var(--script); font-size: 48px; line-height: 1.1; color: var(--parchment); }
.site-footer nav { margin-top: 12px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase; }
.site-footer a { color: #D9CFBB; text-decoration: none; padding: 6px 0; }
.site-footer a:hover { color: var(--parchment); }
.site-footer .fine { margin-top: 18px; font-size: 14px; font-style: italic; color: #B8AC94; }

@media (max-width: 880px) { .pager { margin-left: 24px; margin-right: 24px; } }
@media (max-width: 640px) {
  body { font-size: 18px; }
  .prose { font-size: 19px; }
  .prose .gallery--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prose .plate--wide, .prose .plate--full, .prose .gallery { margin-left: 0; margin-right: 0; }
  .section-title { margin-top: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .topbar, .progress, .pager, .site-footer, .note-from { display: none; }
  body { background: #fff; }
}

/* Keep the footer at the foot of short pages. */
body:not(.desk) { display: flex; flex-direction: column; min-height: 100vh; }
body:not(.desk) > :not(.skip) { width: 100%; flex-shrink: 0; }
body:not(.desk) > .site-footer { margin-top: auto; }
