:root {
  --paper: #fbfaf7;
  --paper-2: #f2efe9;
  --ink: #1d2940;
  --text: #2b2a2a;
  --muted: #7a756d;
  --rule: #e3dfd7;
  --red: #d4271d;
  --night: #0f1218;
  --mono: "Courier Prime", ui-monospace, "Courier New", monospace;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --gutter: clamp(16px, 4vw, 56px);
  --row: clamp(150px, 19vw, 280px);
  --header-h: 68px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 64px); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

::selection { background: rgba(212, 39, 29, .18); color: inherit; }
img::selection { background: transparent; }

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

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--ink); color: #fff; padding: 8px 14px; text-decoration: none;
}
.skip-link:focus { left: 8px; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px);
  padding: 0 var(--gutter);
  background: rgba(251, 250, 247, .88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand img { width: 52px; height: auto; }
.brand-name { font-weight: 700; letter-spacing: .22em; font-size: 14px; white-space: nowrap; }

.site-nav ul { list-style: none; display: flex; gap: clamp(14px, 2.4vw, 34px); margin: 0; padding: 0; }
.site-nav a {
  text-decoration: none; text-transform: uppercase; letter-spacing: .14em; font-size: 13px;
  color: var(--ink); padding: 6px 0; position: relative;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.site-header .site-nav { margin-left: auto; }

.lang-switch {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; letter-spacing: .12em; color: var(--muted);
  padding-left: clamp(14px, 2vw, 26px); border-left: 1px solid var(--rule);
}
.lang-switch a { text-decoration: none; color: var(--muted); padding: 6px 2px; border-bottom: 2px solid transparent; }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current] { color: var(--ink); font-weight: 700; border-bottom-color: var(--red); }

.nav-toggle { display: none; }

@media (max-width: 720px) {
  :root { --header-h: 60px; --row: 130px; }
  .brand-name { display: none; }
  .lang-switch { margin-left: auto; border-left: 0; padding-left: 0; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    background: none; border: 1px solid var(--ink); color: var(--ink);
    font: 700 12px var(--mono); letter-spacing: .14em; text-transform: uppercase;
    padding: 8px 12px; cursor: pointer;
  }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
  }
  .site-nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 20px; }
  .site-nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .site-nav a::after { display: none; }
  .site-nav a[aria-current="page"] { color: var(--red); }
}

/* ---------- border line motif ---------- */

.border-line {
  height: 3px; background: var(--red);
  transform-origin: left; animation: draw 1.6s cubic-bezier(.65, 0, .35, 1) .2s both;
}
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- hero ---------- */

.hero { padding: clamp(56px, 11vh, 120px) var(--gutter) clamp(40px, 7vh, 72px); }
.hero-kicker {
  font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(44px, 9.5vw, 140px); line-height: .92; letter-spacing: -.02em;
  color: var(--ink); margin: 0; font-weight: 700;
}
.hero h1 span { display: block; }
.hero-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 48px; align-items: end; }
.hero-work { margin: 0; }
.hero-work img { width: 100%; height: auto; box-shadow: 0 24px 60px -30px rgba(29, 41, 64, .45); }
.hero-work figcaption { font-size: 12px; color: var(--muted); margin-top: 12px; letter-spacing: .04em; }
@media (max-width: 900px) {
  .hero-top { grid-template-columns: 1fr; }
  .hero-work { max-width: 520px; }
}
.hero h1 .indent { padding-left: 1.1em; }
.hero .border-line { margin: clamp(28px, 5vh, 48px) 0; }
.hero-meta {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 32px 64px; align-items: start;
}
.hero-meta p { margin: 0; }
.hero-artist { font-size: 15px; color: var(--ink); }
.hero-artist small { display: block; color: var(--muted); font-size: 13px; margin-top: 6px; letter-spacing: .04em; }
.hero-quote {
  margin: 0;
  font-family: var(--serif); font-style: italic; font-size: clamp(19px, 2.1vw, 26px); line-height: 1.4; color: var(--ink);
}
.hero-quote cite { display: block; font-family: var(--mono); font-style: normal; font-size: 13px; color: var(--muted); margin-top: 10px; }

@media (max-width: 720px) {
  .hero-meta { grid-template-columns: 1fr; }
}

/* ---------- series index ---------- */

.section-label {
  display: flex; align-items: baseline; gap: 16px;
  font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 24px;
}
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

.series-index { padding: 0 var(--gutter) clamp(56px, 10vh, 110px); }
.series-cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2vw, 28px);
}
.series-card a { display: block; text-decoration: none; color: var(--ink); }
.series-card .cover {
  aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-2); position: relative;
}
.series-card .cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s cubic-bezier(.2, .7, .2, 1), filter .5s ease;
  filter: grayscale(.25);
}
.series-card .cover::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; background: var(--red);
  transform: scaleX(0); transform-origin: left; transition: transform .55s cubic-bezier(.65, 0, .35, 1);
}
.series-card a:hover .cover img, .series-card a:focus-visible .cover img { transform: scale(1.04); filter: none; }
.series-card a:hover .cover::after, .series-card a:focus-visible .cover::after { transform: scaleX(1); }
.series-card .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-top: 12px; }
.series-card .num { color: var(--red); font-size: 12px; }
.series-card .name { font-weight: 700; letter-spacing: .1em; font-size: 14px; flex: 1; }
.series-card .count { color: var(--muted); font-size: 12px; white-space: nowrap; }

@media (max-width: 900px) { .series-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .series-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- sticky series nav ---------- */

.series-nav {
  position: sticky; top: var(--header-h); z-index: 30;
  background: rgba(251, 250, 247, .94);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.series-nav ul {
  list-style: none; margin: 0; padding: 0 var(--gutter);
  display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none;
}
.series-nav ul::-webkit-scrollbar { display: none; }
.series-nav a {
  display: block; padding: 14px 0 12px; white-space: nowrap; text-decoration: none;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  border-bottom: 2px solid transparent; transition: color .2s ease, border-color .2s ease;
}
.series-nav a:hover { color: var(--ink); }
.series-nav a.is-active { color: var(--ink); border-bottom-color: var(--red); }

/* ---------- series sections ---------- */

.series {
  padding: clamp(64px, 11vh, 120px) var(--gutter) 0;
}
.series:last-of-type { padding-bottom: clamp(64px, 11vh, 120px); }

.series-head {
  display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 8px 24px;
  margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); position: relative;
}
.series-head::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 72px; height: 3px; background: var(--red);
}
.series-head .num { color: var(--red); font-size: 14px; padding-bottom: .45em; }
.series-head h2 {
  margin: 0; color: var(--ink); font-size: clamp(28px, 4.6vw, 58px); line-height: 1; letter-spacing: .02em;
}
.series-head .count { color: var(--muted); font-size: 13px; padding-bottom: .45em; display: flex; align-items: center; gap: 14px; }
.series-head .emblem { width: 56px; height: 56px; object-fit: contain; mix-blend-mode: multiply; }

.subseries { margin-top: clamp(40px, 7vh, 72px); }
.subseries-head {
  display: flex; align-items: baseline; gap: 16px; margin: 0 0 18px;
  font-size: 18px; letter-spacing: .12em; color: var(--ink);
}
.subseries-head .count { color: var(--muted); font-size: 12px; letter-spacing: .04em; }

/* justified gallery: items grow in proportion to their aspect ratio so each row shares one height */
.gallery { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.gallery::after { content: ""; flex-grow: 1000000; }
.work {
  position: relative; margin: 0;
  flex-grow: calc(var(--w) / var(--h) * 100);
  flex-basis: calc(var(--row) * var(--w) / var(--h));
  /* cap upscaling so an item that wraps alone doesn't blow up to full width */
  max-width: min(100%, calc(var(--row) * var(--w) / var(--h) * 1.8));
}
.work a { display: block; position: relative; overflow: hidden; background: var(--paper-2); cursor: zoom-in; }
.work img {
  width: 100%; height: auto; aspect-ratio: var(--w) / var(--h);
  transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .6s ease;
}
.js .work img { opacity: 0; }
.js .work img.is-loaded { opacity: 1; }
.work figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 12px 10px; font-size: 12px; line-height: 1.35; color: #fff;
  background: linear-gradient(to top, rgba(15, 18, 24, .78), rgba(15, 18, 24, 0));
  opacity: 0; transform: translateY(6px); transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
@media (hover: hover) {
  .work a:hover img { transform: scale(1.03); }
  .work a:hover figcaption, .work a:focus-visible figcaption { opacity: 1; transform: none; }
}

/* ---------- text pages ---------- */

.page { padding: clamp(48px, 9vh, 104px) var(--gutter) clamp(64px, 11vh, 120px); }
.page-title {
  font-size: clamp(36px, 6.4vw, 84px); line-height: 1; color: var(--ink); margin: 0; letter-spacing: -.01em;
}
.page .border-line { margin: 28px 0 clamp(40px, 7vh, 72px); max-width: 220px; }

.prose { max-width: 680px; font-family: var(--serif); font-size: clamp(17px, 1.35vw, 19.5px); line-height: 1.75; color: var(--text); }
.prose p { margin: 0 0 1.3em; }
.prose p:first-of-type::first-letter {
  font-family: var(--mono); font-weight: 700; color: var(--red); font-size: 1.1em;
}

.poem {
  font-family: var(--serif); font-style: italic; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.7;
  color: var(--ink); margin: 0 0 clamp(40px, 7vh, 72px); padding: 0; border: 0; max-width: 560px;
}
.poem footer, .quote footer {
  font-family: var(--mono); font-style: normal; font-size: 13px; color: var(--muted); margin-top: 12px;
}

.quote {
  margin: 2.2em 0; padding: 4px 0 4px 26px; border-left: 3px solid var(--red);
  font-family: var(--serif); font-style: italic; color: var(--ink);
}
.quote p { margin: 0; }

.triptych {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 22px);
  margin: 0 0 clamp(48px, 8vh, 84px); max-width: 980px; align-items: end;
}
.triptych img { width: 100%; height: auto; mix-blend-mode: multiply; }

.statement-intro {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px);
  align-items: center; margin-bottom: clamp(48px, 8vh, 84px);
}
.statement-intro .poem, .statement-intro .triptych { margin: 0; }
@media (max-width: 900px) {
  .statement-intro { grid-template-columns: 1fr; }
  .statement-intro .triptych { max-width: 560px; }
}
.statement-heading {
  font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 22px;
}

.split {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start;
}
.split figure { margin: 0; position: sticky; top: calc(var(--header-h) + 32px); }
.split figure img { width: 100%; height: auto; }
.split figcaption { font-size: 12px; color: var(--muted); margin-top: 10px; letter-spacing: .04em; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split figure { position: static; max-width: 460px; }
}

.signature { font-family: var(--mono); font-size: 14px; color: var(--ink); margin-top: 2.4em; }
.signature::before { content: ""; display: block; width: 48px; height: 2px; background: var(--red); margin-bottom: 14px; }

.contact-card { font-family: var(--mono); }
.contact-card p { margin: 0 0 1em; font-size: 16px; }
.contact-email a {
  display: inline-block; font-size: clamp(20px, 3vw, 34px); color: var(--ink); text-decoration: none;
  border-bottom: 3px solid var(--red); padding-bottom: 4px; word-break: break-all;
}
.contact-email a:hover { color: var(--red); }
.contact-places { color: var(--muted); font-size: 14px !important; letter-spacing: .06em; margin-top: 2em !important; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule); padding: 40px var(--gutter) 48px;
  display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--muted);
}
.site-footer .brand img { width: 40px; }
.site-footer p { margin: 0; }
.site-footer nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
.site-footer nav a { text-decoration: none; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
.site-footer nav a:hover { color: var(--red); }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 35;
  width: 44px; height: 44px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
  font: 700 16px var(--mono); cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--ink); color: var(--paper); }

/* ---------- lightbox ---------- */

.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--night); color: #e9e6e0; overflow: hidden;
}
.lightbox::backdrop { background: var(--night); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #9d988f; }
/* the image is absolutely positioned so its size limits resolve against the stage's definite box;
   site.js sets its exact fitted width/height */
.lb-stage { --pad: 64px; position: relative; min-height: 0; touch-action: pan-y; }
.lb-stage img {
  position: absolute; inset: 8px var(--pad); margin: auto;
  max-width: calc(100% - 2 * var(--pad)); max-height: calc(100% - 16px);
  object-fit: contain;
  user-select: none; -webkit-user-drag: none; transition: opacity .25s ease, filter .4s ease;
}
.lb-stage img.is-preview { filter: blur(6px); }
.lb-caption { padding: 16px 18px 22px; text-align: center; font-size: 14px; min-height: 58px; line-height: 1.45; }
.lb-caption::before { content: ""; display: block; width: 40px; height: 2px; background: var(--red); margin: 0 auto 12px; }

.lb-btn {
  background: none; border: 0; color: #e9e6e0; cursor: pointer; font: 400 28px var(--mono);
  width: 48px; height: 48px; display: grid; place-items: center; transition: color .2s ease;
}
.lb-btn:hover { color: var(--red); }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
.lb-close { font-size: 24px; }

@media (max-width: 720px) {
  .lb-stage { --pad: 8px; }
  .lb-prev, .lb-next { top: auto; bottom: -56px; transform: none; }
}

/* ---------- 404 ---------- */

.not-found { min-height: calc(100dvh - var(--header-h) - 130px); display: grid; place-content: center; text-align: center; padding: 48px var(--gutter); }
.not-found .frame {
  width: 150px; aspect-ratio: 4 / 5; margin: 0 auto 36px; border: 5px solid var(--ink); position: relative;
}
.not-found .frame::after { content: ""; position: absolute; left: -5px; right: -5px; top: 48%; height: 7px; background: var(--red); }
.not-found h1 { color: var(--ink); font-size: clamp(24px, 3vw, 34px); margin: 0 0 14px; letter-spacing: .06em; }
.not-found p { color: var(--muted); max-width: 440px; margin: 0 auto 28px; font-family: var(--serif); font-size: 18px; }
.not-found a { color: var(--ink); letter-spacing: .12em; text-transform: uppercase; font-size: 13px; text-decoration: none; border-bottom: 2px solid var(--red); padding-bottom: 3px; }

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