@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant.woff") format("woff");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-italic.woff") format("woff");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Golos Text";
  src: url("fonts/golos.woff") format("woff");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plex-mono.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: light dark;
  --wall: #f2efe8;
  --wall-deep: #e8e3d9;
  --surface: #faf8f3;
  --ink: #1a1714;
  --ink-soft: #3d3832;
  --muted: #7a7268;
  --rule: #d6cfc2;
  --accent: #b23a1c;
  --accent-ink: #fff8f0;
  --shadow: 0 1px 2px #1a17140f, 0 12px 32px -12px #1a171433;

  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Golos Text", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --col-gap: clamp(16px, 2.4vw, 36px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --wall: #141210;
    --wall-deep: #1b1916;
    --surface: #1f1c19;
    --ink: #eee8dd;
    --ink-soft: #cdc5b8;
    --muted: #958c80;
    --rule: #34302a;
    --accent: #e86a42;
    --accent-ink: #1a0f0a;
    --shadow: 0 1px 2px #0006, 0 18px 40px -16px #000a;
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--wall);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main { flex: 1 0 auto; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
button, input, textarea, select { font: inherit; color: inherit; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }
::selection { background: var(--accent); color: var(--accent-ink); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; font-weight: inherit; }
p { text-wrap: pretty; }
em { font-style: italic; }

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--wall);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.eyebrow, .label-meta, .label-no, .count, .work-count, .preview-flag {
  font: 400 12px/1.4 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.arrow { display: inline-block; transition: translate .3s var(--ease); }
.underscore { color: var(--accent); }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  line-height: 1.4;
}
.arrow-link:hover { color: var(--accent); }
.arrow-link:hover .arrow { translate: 3px 0; }
a:hover .arrow:is(:first-child) { translate: 0; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--wall);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.button:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button:hover .arrow { translate: 2px -2px; }

/* ---------- Masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--wall) 88%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 60%, transparent);
}
.masthead-name {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 600 22px/1 var(--display);
  letter-spacing: -.01em;
  text-decoration: none;
}
.masthead-nav { display: flex; flex-wrap: wrap; gap: 0 clamp(16px, 2.6vw, 36px); }
.masthead-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color .2s;
}
.masthead-nav a:hover { color: var(--ink); }
.masthead-nav a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 8px; }

/* ---------- Intro ---------- */

.intro, .works, .page, .work, .colophon {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.intro {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-items: end;
  min-height: min(calc(100svh - 73px), 960px);
  padding-block: clamp(32px, 6vw, 72px) clamp(40px, 6vw, 80px);
}
.intro-text { grid-column: 1 / span 7; display: grid; gap: 22px; align-content: end; justify-items: start; padding-bottom: 4px; }
.intro-title {
  font: 500 clamp(60px, 10.4vw, 168px)/.84 var(--display);
  letter-spacing: -.035em;
  margin: 8px 0 12px -.04em;
}
.intro-title span, .intro-title em { display: block; }
.intro-title em { font-weight: 400; padding-left: .55em; }
.intro-lede { max-width: 30ch; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.45; color: var(--ink-soft); }
.intro-epigraph { font: italic 400 clamp(20px, 1.8vw, 26px)/1.3 var(--display); color: var(--muted); }
.intro-text .arrow-link { margin-top: 12px; }

.intro-feature { grid-column: 8 / span 5; margin: 0; display: grid; justify-items: end; gap: 12px; }
.intro-feature-link { display: block; }
.intro-feature img {
  width: auto;
  max-height: min(72svh, 760px);
  box-shadow: var(--shadow);
  transition: transform .6s var(--ease);
}
.intro-feature-link:hover img { transform: translateY(-4px); }
.intro-feature figcaption { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 4px 14px; text-align: right; }
.intro-feature .label-title { font-size: 22px; }

/* ---------- Works ---------- */

.works { padding-block: clamp(48px, 8vw, 112px) clamp(72px, 10vw, 160px); }
.section-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px 24px;
  padding-top: 18px;
  margin-bottom: clamp(40px, 7vw, 96px);
  border-top: 1px solid var(--ink);
}
.section-bar h2 { display: flex; align-items: start; gap: 10px; font: 500 clamp(44px, 6vw, 88px)/.9 var(--display); letter-spacing: -.03em; }
.count { padding-top: .6em; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  font: 400 12px/1 var(--mono);
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--wall); }

.hang { display: grid; row-gap: clamp(72px, 11vw, 168px); }
.hang-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.row-a .piece-large { grid-column: 1 / span 6; }
.row-a .piece-small { grid-column: 9 / span 4; align-self: end; }
.row-b .piece-small { grid-column: 2 / span 4; align-self: start; }
.row-b .piece-large { grid-column: 7 / span 6; }
.row-single .piece-large { grid-column: 4 / span 6; }
.row-wide .piece-wide { grid-column: 1 / -1; }

.piece { min-width: 0; }
.piece-link { display: block; text-decoration: none; }
.piece-frame { display: block; background: var(--wall-deep); }
.piece-frame img { width: 100%; transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.piece-link:hover .piece-frame img { transform: translateY(-4px); box-shadow: var(--shadow); }

.label {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: baseline;
  padding-top: 14px;
}
.label-no { grid-row: 1 / span 2; }
.label-title { font: 500 clamp(22px, 2vw, 28px)/1.15 var(--display); letter-spacing: -.01em; transition: color .2s; overflow-wrap: anywhere; }
.label-meta { grid-column: 2; }
.piece-link:hover .label-title { color: var(--accent); }
.empty { color: var(--muted); }

/* ---------- Generic pages ---------- */

.page { padding-block: clamp(40px, 8vw, 120px) clamp(64px, 10vw, 140px); }
.page-head { display: grid; gap: 20px; max-width: 980px; margin-bottom: clamp(48px, 8vw, 104px); }
.page-title { font: 500 clamp(48px, 7.4vw, 112px)/.92 var(--display); letter-spacing: -.03em; }
.page-title em { font-weight: 400; }
.page-lede { max-width: 46ch; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; color: var(--ink-soft); }
.works-plain { padding: 0; }
.placeholder {
  display: grid;
  gap: 24px;
  justify-items: start;
  max-width: 640px;
  padding: clamp(28px, 4vw, 48px);
  border: 1px dashed var(--rule);
}
.placeholder p { font: 400 clamp(22px, 2.2vw, 28px)/1.3 var(--display); }

/* About */
.about {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 48px;
  align-items: start;
}
.about-portrait { grid-column: 1 / span 4; margin: 0; position: sticky; top: 100px; }
.about-portrait img { width: 100%; aspect-ratio: 37 / 50; object-fit: cover; object-position: 50% 50%; filter: grayscale(1) contrast(1.05); }
.about-text { grid-column: 6 / span 7; display: grid; gap: 28px; justify-items: start; }
.about-text .page-title { font-size: clamp(44px, 6.2vw, 96px); }
.prose { display: grid; gap: 1.1em; max-width: 60ch; font-size: 17px; line-height: 1.7; color: var(--ink-soft); }
.prose-lead { font: 400 clamp(24px, 2.4vw, 32px)/1.3 var(--display); color: var(--ink); }
.link-row { display: flex; flex-wrap: wrap; gap: 16px 32px; margin-top: 8px; }

/* Contacts */
.contact-primary {
  display: grid;
  gap: 10px;
  padding-block: clamp(28px, 4vw, 48px);
  border-block: 1px solid var(--ink);
  text-decoration: none;
}
.contact-handle { font: 500 clamp(40px, 8.4vw, 132px)/.95 var(--display); letter-spacing: -.03em; overflow-wrap: anywhere; transition: color .2s; }
.contact-primary:hover .contact-handle { color: var(--accent); }
.contact-primary:hover .arrow { translate: 6px -6px; }
.contact-note { color: var(--muted); }
.contact-topics { list-style: none; margin: 0; padding: 0; }
.contact-topics a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  border-bottom: 1px solid var(--rule);
  font: 500 clamp(24px, 2.6vw, 34px)/1.1 var(--display);
  text-decoration: none;
}
.contact-topics a:hover { color: var(--accent); }
.contact-topics a:hover .arrow { translate: 4px -4px; }

/* Error */
.error { display: grid; gap: 28px; align-content: center; justify-items: start; }
.error-code { margin-bottom: 8px; font: 400 clamp(120px, 24vw, 340px)/.8 var(--display); letter-spacing: -.05em; color: var(--accent); }

/* ---------- Work detail ---------- */

.work { padding-block: 24px clamp(64px, 9vw, 120px); }
.work-crumbs { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: clamp(20px, 3vw, 36px); }
.back-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; text-decoration: none; color: var(--ink-soft); }
.back-link:hover { color: var(--accent); }
.preview-flag { color: var(--accent); }

.work-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.work-stage { display: grid; gap: clamp(32px, 5vw, 64px); }
.work-photo { margin: 0; display: grid; justify-items: center; gap: 12px; }
.work-photo a { display: block; cursor: zoom-in; }
.work-photo img { width: auto; max-height: calc(100svh - 150px); box-shadow: var(--shadow); }
.work-photo figcaption { justify-self: stretch; display: flex; gap: 14px; align-items: baseline; color: var(--muted); font-size: 14px; }

.work-label { position: sticky; top: 100px; display: grid; gap: 20px; justify-items: start; }
.work-title { font: 500 clamp(44px, 4.8vw, 76px)/.95 var(--display); letter-spacing: -.03em; overflow-wrap: anywhere; }
.work-facts { display: grid; width: 100%; margin: 4px 0 0; border-top: 1px solid var(--ink); }
.work-facts div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.work-facts dt { font: 400 12px/1.8 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.work-facts dd { margin: 0; }
.work-note {
  display: grid;
  gap: .8em;
  margin-top: 8px;
  font: 400 21px/1.45 var(--display);
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}
.work-label .button { margin-top: 8px; }

.work-wide .work-layout { grid-template-columns: repeat(12, minmax(0, 1fr)); row-gap: clamp(28px, 4vw, 48px); }
.work-wide .work-stage { grid-column: 1 / -1; }
.work-wide .work-photo img { width: 100%; max-height: none; }
.work-wide .work-label { grid-column: 1 / -1; position: static; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
.work-wide .work-label > * { grid-column: 1 / span 5; }
.work-wide .work-label > .work-note, .work-wide .work-label > .button { grid-column: 7 / span 6; grid-row: 1 / span 4; margin-top: 0; }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--col-gap);
  margin-top: clamp(64px, 9vw, 128px);
  border-top: 1px solid var(--ink);
}
.pager a { display: flex; align-items: center; gap: 16px; padding-top: 20px; text-decoration: none; min-width: 0; }
.pager-next { flex-direction: row-reverse; text-align: right; }
.pager-thumb { flex: none; width: 72px; height: 72px; overflow: hidden; background: var(--wall-deep); }
.pager-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.pager a:hover .pager-thumb img { transform: scale(1.06); }
.pager-text { display: grid; gap: 4px; min-width: 0; }
.pager-title { font: 500 clamp(22px, 2.4vw, 32px)/1.1 var(--display); overflow-wrap: anywhere; transition: color .2s; }
.pager a:hover .pager-title { color: var(--accent); }

/* Lightbox */
body:has(dialog[open]) { overflow: hidden; }
.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: clamp(56px, 6vw, 72px) clamp(8px, 6vw, 96px);
  border: 0;
  background: transparent;
  color: #f2efe8;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: #0e0c0bf2; }
.lightbox img { width: 100%; height: 100%; object-fit: contain; }
.lightbox button {
  position: fixed;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #f2efe840;
  border-radius: 50%;
  background: #0e0c0b99;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.lightbox button:hover { background: #f2efe8; color: #0e0c0b; }
.lightbox-close { top: 16px; right: 16px; font-size: 28px !important; }
.lightbox-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lightbox-next { right: 16px; top: 50%; translate: 0 -50%; }

/* ---------- Colophon ---------- */

.colophon { padding-block: 0 24px; }
.colophon-cta {
  display: grid;
  gap: 14px;
  padding-block: clamp(48px, 8vw, 104px);
  border-top: 1px solid var(--ink);
}
.colophon-link {
  justify-self: start;
  font: 500 clamp(44px, 8vw, 128px)/.92 var(--display);
  letter-spacing: -.035em;
  text-decoration: none;
  transition: color .25s;
}
.colophon-link:hover { color: var(--accent); }
.colophon-link:hover .arrow { translate: 8px -8px; }
.colophon-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font: 400 12px/1.4 var(--mono);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}
.colophon-meta a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.colophon-meta a:hover { color: var(--ink); }
.colophon-mark { font: italic 500 20px/1 var(--display); letter-spacing: 0; text-transform: none; color: var(--ink); }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .intro-text > *, .intro-feature, .page-head > *, .about-portrait, .about-text > *, .work-stage, .work-label > *, .contact-primary, .contact-topics, .error > * {
    animation: rise .9s var(--ease) both;
  }
  .intro-text > :nth-child(2), .page-head > :nth-child(2), .about-text > :nth-child(2), .work-label > :nth-child(2) { animation-delay: .06s; }
  .intro-text > :nth-child(3), .page-head > :nth-child(3), .about-text > :nth-child(3), .work-label > :nth-child(3) { animation-delay: .12s; }
  .intro-text > :nth-child(n + 4), .about-text > :nth-child(n + 4), .work-label > :nth-child(n + 4) { animation-delay: .18s; }
  .intro-feature, .work-stage, .about-portrait { animation-duration: 1.2s; animation-delay: .1s; }
  @supports (animation-timeline: view()) {
    [data-reveal] {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}
@keyframes rise {
  from { opacity: 0; translate: 0 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .intro-text { grid-column: 1 / span 7; }
  .intro-feature { grid-column: 8 / span 5; }
  .work-layout { grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); }
}

@media (max-width: 820px) {
  .intro { grid-template-columns: 1fr; min-height: 0; row-gap: 40px; }
  .intro-text, .intro-feature { grid-column: 1; }
  .intro-feature { justify-items: start; }
  .intro-feature img { max-height: 70svh; }
  .intro-feature figcaption { justify-content: flex-start; text-align: left; }

  .hang-row { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: clamp(56px, 12vw, 96px); }
  .row-a .piece-large, .row-b .piece-large, .row-single .piece-large { grid-column: 1 / span 5; }
  .row-a .piece-small, .row-b .piece-small { grid-column: 3 / span 4; align-self: start; }
  .row-b .piece-small { grid-column: 1 / span 4; }
  .row-b .piece-large { grid-column: 2 / span 5; }

  .about { grid-template-columns: 1fr; }
  .about-portrait, .about-text { grid-column: 1; }
  .about-portrait { position: static; max-width: 420px; }

  .work-layout, .work-wide .work-layout { grid-template-columns: 1fr; }
  .work-label, .work-wide .work-label { position: static; grid-column: 1; display: grid; grid-template-columns: 1fr; }
  .work-wide .work-label > *, .work-wide .work-label > .work-note, .work-wide .work-label > .button { grid-column: 1; grid-row: auto; }
  .work-photo img { max-height: 80svh; }
}

@media (max-width: 560px) {
  html { scroll-padding-top: 112px; }
  .masthead { padding-block: 6px 0; }
  .masthead-name { min-height: 40px; }
  .masthead-nav { width: 100%; justify-content: space-between; gap: 0 12px; }
  .masthead-nav a { min-height: 40px; font-size: 13.5px; }
  .intro { padding-top: 24px; }
  .intro-title em { padding-left: .3em; }
  .hang-row { display: flex; flex-direction: column; gap: 56px; }
  .piece, .piece-small { width: 100%; }
  .row-a .piece-small, .row-b .piece-small { width: 80%; }
  .row-a .piece-small { align-self: flex-end; }
  .pager { grid-template-columns: 1fr; gap: 0; }
  .pager a { padding-block: 16px; border-bottom: 1px solid var(--rule); }
  .pager-next { flex-direction: row; text-align: left; }
  .pager-thumb { width: 56px; height: 56px; }
  .work-facts div { grid-template-columns: 80px 1fr; }
  .lightbox-prev, .lightbox-next { top: auto !important; bottom: 16px; translate: none !important; }
  .colophon-meta { justify-content: flex-start; }
}
