:root {
  color-scheme: dark;
  --background: #16131a;
  --panel: #1e1922;
  --ink: #f6eee9;
  --muted: #bcb0bb;
  --rose: #e9b2bc;
  --line: #44363f;
  --serif: "Iowan Old Style", Baskerville, "Times New Roman", serif;
  --sans: system-ui, sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--background);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
figure, h1, h2, h3, p { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 5px; }
[id] { scroll-margin-top: 2rem; }

.wrap { width: min(88rem, calc(100% - clamp(2rem, 9vw, 10rem))); margin-inline: auto; }
.skip { position: absolute; z-index: 2; inset: 1rem auto auto 1rem; background: var(--ink); color: var(--background); padding: .8rem; transform: translateY(-150%); }
.skip:focus { transform: none; }
.site-header { min-height: 5rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem 2rem; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: .65rem; font-family: var(--serif); font-size: 1.2rem; text-decoration: none; white-space: nowrap; }
.site-header nav { display: flex; flex-wrap: wrap; gap: .25rem clamp(.75rem, 3vw, 2rem); }
.site-header nav a, .site-footer a { font-size: .86rem; text-decoration: none; }
.site-header nav a { color: var(--muted); padding-block: .65rem; }
.site-header nav a:hover, .site-footer a:hover, .viewer-original:hover { color: var(--rose); }

.opening { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-block: clamp(3.5rem, 8vw, 8rem); }
.eyebrow, .caption-note { color: var(--rose); font: 500 .7rem/1.5 var(--sans); text-transform: uppercase; letter-spacing: .16em; }
.eyebrow > span { display: inline-block; width: 1.7rem; margin-right: .45rem; border-top: 1px solid currentColor; vertical-align: middle; }
h1, .section-title { font-family: var(--serif); font-weight: 400; letter-spacing: -.055em; }
h1 { font-size: clamp(3.25rem, 6.15vw, 7rem); line-height: .94; margin-block: 1.15rem 1.5rem; }
h1 i, .section-title i { color: var(--rose); font-weight: 400; }
.pair { color: var(--ink); font: 400 clamp(1.25rem, 2vw, 1.65rem)/1.3 var(--serif); margin-bottom: .65rem; }
.intro-copy { max-width: 24ch; color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.55; }
.text-link { display: inline-flex; align-items: center; gap: .9rem; margin-top: 1.65rem; padding-block: .5rem; color: var(--ink); font-size: .86rem; text-decoration: none; border-bottom: 1px solid var(--rose); }
.text-link span { color: var(--rose); }

.artwork { min-width: 0; }
.artwork-link { display: block; position: relative; outline-offset: 5px; text-decoration: none; background: var(--panel); }
.artwork-link img { width: 100%; height: auto; border: 1px solid #ffffff16; }
.expand { position: absolute; inset: .65rem .65rem auto auto; display: grid; place-items: center; width: 2.55rem; aspect-ratio: 1; border: 1px solid #ead3dd69; border-radius: 50%; background: #16131ad9; color: var(--ink); font-size: 1.2rem; transition: background-color .18s, color .18s; }
.artwork-link:hover .expand, .artwork-link:focus-visible .expand { background: var(--rose); color: var(--background); }
figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding-top: .8rem; }
figcaption :is(h2, h3, .art-title) { color: var(--ink); font: 400 clamp(1.2rem, 1.7vw, 1.55rem)/1.2 var(--serif); }
.caption-note { color: var(--muted); letter-spacing: .11em; text-align: right; }

.section { padding-block: clamp(3.5rem, 7vw, 7rem); border-top: 1px solid var(--line); }
.section-heading, .feature-heading { margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.section-title { font-size: clamp(2.6rem, 5.5vw, 5.2rem); line-height: 1; margin-top: .5rem; }
.feature { display: grid; grid-template-columns: minmax(9.5rem, .28fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.feature-heading { padding-top: clamp(0rem, 4vw, 3.5rem); margin-bottom: 0; }
.feature .section-title { font-size: clamp(2.6rem, 4vw, 4.3rem); }
.series-grid, .circle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 4.5rem) clamp(1.2rem, 3.8vw, 4rem); }
.circles .section-heading { text-align: center; }
.circle-grid { max-width: 56rem; margin-inline: auto; }
.circle-art .artwork-link { background: transparent; border-radius: 50%; }
.circle-art img, .viewer-image.round { border-radius: 50%; border: none; }
.circle-art .expand { inset: auto 5% 8% auto; }
.circle-art figcaption { justify-content: center; }
.site-footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 5.5rem; color: var(--muted); }
.site-footer > span { font-family: var(--serif); font-size: 1.05rem; }

.viewer { padding: 0; width: min(86rem, calc(100% - 2rem)); max-width: none; max-height: calc(100% - 2rem); color: var(--ink); background: #1b161e; border: 1px solid var(--line); }
.viewer::backdrop { background: #100d14ee; }
.viewer-inner { padding: clamp(.8rem, 2.4vw, 1.7rem); }
.viewer-header, .viewer-actions { display: flex; justify-content: space-between; align-items: center; gap: .65rem; }
.viewer-header { margin-bottom: .9rem; }
.viewer-header h2 { font: 400 clamp(1.5rem, 3vw, 2.5rem)/1.05 var(--serif); margin-top: .22rem; }
.viewer-image { width: auto; height: auto; max-width: 100%; max-height: min(72vh, calc(100svh - 12rem)); margin-inline: auto; object-fit: contain; }
.viewer-image:not([src]) { display: none; }
.viewer-actions { margin-top: .9rem; flex-wrap: wrap; }
.viewer-button { min-height: 2.75rem; padding: .45rem .75rem; color: var(--ink); background: transparent; border: 1px solid var(--line); cursor: pointer; }
.viewer-button:hover { background: #322734; }
.viewer-button.close { width: 2.75rem; padding: 0; font-size: 1.6rem; line-height: 1; }
.viewer-original { font-size: .84rem; color: var(--muted); text-underline-offset: .2em; padding-block: .5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 68rem) and (min-width: 58.01rem) {
  .opening { grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); }
  h1 { font-size: clamp(3.25rem, 5.65vw, 4.4rem); }
}
@media (max-width: 58rem) {
  .opening, .feature { grid-template-columns: minmax(0, 1fr); }
  .opening { padding-top: 3.5rem; }
  .feature-heading { padding: 0; }
  h1 { font-size: clamp(3.5rem, 10vw, 6rem); }
}
@media (max-width: 36rem) {
  .site-header { padding-block: .75rem; align-items: flex-start; flex-direction: column; }
  .site-header nav { gap: .25rem 1.15rem; }
  .series-grid { grid-template-columns: minmax(0, 1fr); }
  .circle-grid { max-width: 25rem; grid-template-columns: minmax(0, 1fr); }
  .viewer-original { order: 1; width: 100%; text-align: center; }
  .viewer-image { max-height: calc(100svh - 14.5rem); }
}
@media (prefers-reduced-motion: reduce) {
  .expand { transition: none; }
}
