/* Layout: black gallery wall. One Garamond face throughout, lowercase navigation,
   a packed edge-to-edge strip of works on top (after the old Wix collage). Single-theme dark. */
:root {
  --paper: #000;
  --leaf: #0d0d0d;
  --ink: #ececec;
  --mute: #8a8a8a;
  --rule: #262626;
  --f: "EB Garamond", Garamond, "Adobe Garamond Pro", "Times New Roman", serif;
  --measure: 36rem;
  --wide: 76rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--paper); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f); font-weight: 400; font-size: calc(1.15rem + 4pt); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; text-decoration: underline; text-underline-offset: 0.2em; }
.prose a, dd a, .sh p a { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--mute); }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
i, em { font-style: normal; }

.wrap {
  max-width: var(--wide); margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 760px) {
  .wrap { padding-left: max(40px, env(safe-area-inset-left, 0px)); padding-right: max(40px, env(safe-area-inset-right, 0px)); }
}

/* Small grey text: labels, captions, meta */
.top nav a, .label, .eyebrow, figcaption span, .meta, .yr, .ven, dt, footer.end .wrap {
  font-size: calc(0.78rem + 4pt); color: var(--mute); letter-spacing: 0.01em;
}

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--paper); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; padding-block: 18px; }
.mark { font-size: calc(1rem + 4pt); letter-spacing: 0.02em; }
.top nav { display: flex; gap: 22px; }
.top nav a { font-size: calc(0.9rem + 4pt); color: var(--mute); }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); text-decoration: none; }

/* Home hero */
.hero { padding-block: 8px 0; }
.hero .wrap { padding-block: 36px 88px; }
.hero-text { text-align: center; }
.hero-text h1 { font-weight: 400; font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.05; margin: 0 0 6px; }
.tag { font-size: calc(1.3rem + 4pt); margin: 0 0 22px; color: var(--mute); font-style: italic; }
.disciplines { font-size: calc(0.95rem + 4pt); line-height: 1.8; color: var(--mute); margin: 0; }

/* Carousel: works packed edge to edge at one height; hovering a work enlarges it over its neighbours. */
.carousel { position: relative; }
.strip {
  --h: clamp(300px, 34vw, 560px);
  display: flex; gap: 0; height: calc(var(--h) * 1.16); padding-block: calc(var(--h) * 0.08);
  overflow-x: auto; overflow-y: visible; scroll-behavior: smooth; scrollbar-width: none;
  scroll-snap-type: x proximity; justify-content: safe center;
  padding-inline: max(48px, env(safe-area-inset-left, 0px)) max(48px, env(safe-area-inset-right, 0px));
}
.strip::-webkit-scrollbar { display: none; }
.strip figure {
  position: relative; flex: 0 0 auto; height: var(--h); width: calc(var(--h) * var(--ar)); margin: 0;
  scroll-snap-align: center; transition: transform 0.35s ease, filter 0.35s ease; transform-origin: center;
}
.strip .plate, .strip .plate img { height: 100%; width: 100%; }
.strip .plate img { object-fit: cover; }
.strip figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 18px 10px 8px;
  flex-direction: row; gap: 8px; font-size: calc(0.95rem + 4pt); color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.75)); opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}
.strip figcaption span { color: #ccc; }
@media (hover: hover) {
  .strip:hover figure { filter: brightness(0.55); }
  .strip figure:hover { transform: scale(1.12); z-index: 2; filter: none; box-shadow: 0 10px 40px rgba(0,0,0,0.8); }
  .strip figure:hover figcaption { opacity: 1; }
}
@media (hover: none) { .strip figcaption { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .strip figure { transition: none; } }
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 40px; height: 64px; border: 0; background: rgba(0,0,0,0.55); color: #fff;
  font-family: var(--f); font-size: calc(2rem + 4pt); line-height: 1; cursor: pointer; opacity: 0; transition: opacity 0.2s;
}
.carousel:hover .car-btn:not([hidden]), .car-btn:focus-visible { opacity: 1; }
.car-btn.prev { left: env(safe-area-inset-left, 0px); }
.car-btn.next { right: env(safe-area-inset-right, 0px); }
@media (max-width: 640px) { .strip { --h: 58vh; justify-content: flex-start; padding-inline: 16px; } .car-btn { opacity: 1; } }

/* Page heads */
.head .wrap { padding-block: 44px 36px; }
.head h1 { font-weight: 400; font-size: calc(clamp(2rem, 5vw, 3.2rem) + 4pt); line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
.head .sub { font-size: calc(1.1rem + 4pt); margin: 8px 0 0; color: var(--mute); }
.head .meta { margin: 16px 0 0; }
.eyebrow { margin: 0 0 12px; }
.lead .wrap { padding-block: 0 24px; }
.lead figure { margin: 0; }

/* Sections */
.part > .wrap { padding-block: 36px 52px; }
.part.flush > .wrap { padding-top: 0; }
.sh { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; border-top: 1px solid var(--rule); padding-top: 14px; margin-bottom: 26px; }
.sh h2 { font-weight: 400; font-size: calc(1rem + 4pt); margin: 0; text-transform: lowercase; letter-spacing: 0.02em; }
.sh p { margin: 0; color: var(--mute); font-size: calc(0.9rem + 4pt); max-width: 34rem; }
h3 { font-weight: 400; font-size: calc(1.05rem + 4pt); margin: 0 0 8px; }
.prose { max-width: var(--measure); color: #d4d4d4; }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }
.prose .note { font-size: calc(0.88rem + 4pt); color: var(--mute); }

/* Index rows (shows / works) */
.index { list-style: none; margin: 0; padding: 0; }
.index li + li { border-top: 1px solid var(--rule); }
.row {
  display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) 7rem; gap: 4px 20px; align-items: center;
  padding-block: 14px;
}
.row:hover { text-decoration: none; }
.row .ttl { min-width: 0; display: flex; flex-direction: column; }
.row .ttl i { font-size: calc(1.1rem + 4pt); }
.row .ttl span { color: var(--mute); font-size: calc(0.9rem + 4pt); }
.row .ven { display: none; }
.row img { grid-column: 3; grid-row: 1; width: 7rem; aspect-ratio: 4 / 3; object-fit: cover; background: var(--leaf); opacity: 0.85; transition: opacity 0.2s; }
.row:hover img { opacity: 1; }
.row:hover .ttl i { text-decoration: underline; text-underline-offset: 0.2em; }
@media (min-width: 820px) {
  .row { grid-template-columns: 6rem minmax(0, 1.2fr) minmax(0, 1fr) 9rem; }
  .row .ven { display: block; }
  .row img { grid-column: 4; width: 9rem; }
}
@media (max-width: 420px) {
  .row { grid-template-columns: minmax(0, 1fr) 6rem; }
  .row .yr, .row .ttl { grid-column: 1; }
  .row img { grid-column: 2; grid-row: 1 / span 2; width: 6rem; }
}

/* Grids */
.grid { display: grid; gap: 28px 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grid figure { margin: 0; min-width: 0; }
.grid .plate img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--leaf); }
figcaption { margin-top: 8px; display: flex; flex-direction: column; gap: 1px; font-size: calc(0.9rem + 4pt); }
.plate { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.plate img { width: 100%; }

/* Rooms (Sacred Dirt) */
.rooms { display: grid; gap: 28px 40px; grid-template-columns: minmax(0, 1fr); max-width: 60rem; color: #d4d4d4; }
@media (min-width: 760px) { .rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.room h3 { color: var(--ink); }
.room p { margin: 0; }

/* Captioned items (Mission of Charity) */
.caps { display: grid; gap: 52px; }
.cap-item { display: grid; gap: 18px 40px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .cap-item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.ci-img .plate img { max-height: 78vh; width: auto; max-width: 100%; }
.ci-text { max-width: var(--measure); min-width: 0; color: #d4d4d4; }
.ci-text h3 { color: var(--ink); }
.ci-text p { margin: 0 0 0.8em; }

/* Works */
.work { margin-bottom: 56px; }
.work:last-child { margin-bottom: 0; }
.wk-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 16px; }
.wk-head h3 { margin: 0; }
.wk-head .label { margin: 0; }

/* About */
.about { display: grid; gap: 32px 64px; }
@media (min-width: 820px) { .about { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.about > * { min-width: 0; }
dl.contact { margin: 0; display: grid; gap: 14px; }
dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.copy { font-family: var(--f); font-size: calc(0.72rem + 4pt); border: 1px solid var(--rule); background: transparent; color: var(--mute); padding: 1px 8px; cursor: pointer; }
.copy:hover { color: var(--ink); border-color: var(--mute); }

/* Prev / next */
.pn { display: flex; justify-content: space-between; gap: 16px; padding-block: 24px 48px; border-top: 1px solid var(--rule); font-size: calc(0.9rem + 4pt); }

footer.end .wrap { padding-block: 20px 36px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; border-top: 1px solid var(--rule); }

/* Lightbox */
dialog.lb { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
dialog.lb::backdrop { background: rgba(0, 0, 0, 0.96); }
.lb-inner { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.lb-inner img { max-height: calc(100vh - 110px); width: auto; max-width: 100%; object-fit: contain; }
.lb-cap { font-size: calc(0.8rem + 4pt); color: var(--mute); text-align: center; max-width: 44rem; margin: 0; }
.lb-close { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); font-family: var(--f); font-size: calc(0.8rem + 4pt); color: var(--ink); background: transparent; border: 1px solid #444; padding: 5px 12px; cursor: pointer; }

/* Quotes beside works */
.wk-quote { margin: 0 0 20px; max-width: var(--measure); font-style: italic; color: #d4d4d4; }
.wk-quote p { margin: 0 0 6px; }
.wk-quote footer { font-style: normal; font-size: calc(0.85rem + 4pt); color: var(--mute); }
.wk-quote footer i { font-style: italic; }

dd + dd { margin-top: 6px; }
dd i { font-style: italic; }

/* Poster lead and room images */
.lead figure.poster { max-width: 34rem; margin-inline: auto; }
.row img[src*="poster"] { object-position: center 22%; }

/* Upcoming */
.up-item { display: grid; gap: 24px 48px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .up-item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.up-item > * { min-width: 0; }
.up-visual { margin: 0; }
.up-visual .plate img { max-height: 70vh; width: auto; max-width: 100%; }
.up-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.up-pair figure { margin: 0; }
.up-pair .plate img { width: 100%; height: auto; max-height: none; }
.up-text { max-width: var(--measure); color: #d4d4d4; }
.up-text .label { margin: 0 0 12px; }
.up-text p { margin: 0 0 1em; }
.up-status { color: var(--mute); font-style: italic; }
.bulbs { display: flex; gap: 6%; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: var(--leaf); padding: 0 8%; }
.bulbs span { flex: 1 1 0; aspect-ratio: 1; border-radius: 50%; border: 1px solid #3a3a3a; max-width: 2.6rem; }
.bulbs span.out { background: #141414; border-color: #2a2a2a; }
.bulbs span.on { background: #fff6dc; border-color: #fff6dc; box-shadow: 0 0 18px 6px rgba(255, 240, 200, 0.55), 0 0 60px 20px rgba(255, 230, 170, 0.18); }
.thumb-bulbs { grid-column: 3; grid-row: 1; width: 7rem; aspect-ratio: 4 / 3; background: var(--leaf); display: flex; gap: 8%; align-items: center; justify-content: center; }
@media (min-width: 820px) { .thumb-bulbs { grid-column: 4; width: 9rem; } }
@media (max-width: 420px) { .thumb-bulbs { grid-column: 2; grid-row: 1 / span 2; width: 6rem; } }
.thumb-bulbs i { width: 11%; aspect-ratio: 1; border-radius: 50%; border: 1px solid #3a3a3a; }
.thumb-bulbs i.on { background: #fff6dc; border-color: #fff6dc; box-shadow: 0 0 8px 3px rgba(255, 240, 200, 0.5); }
