*, *::before, *::after { box-sizing: border-box; }
/* Colours (set from the editor: bgColor / textColor).
   --ov is worked out in main.js so text that inverts over photos lands exactly on --fg over the background. */
:root { --bg: #FFFFFF; --fg: #000000; --ov: #FFFFFF; color-scheme: light; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 11px;
  line-height: 1.35;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-transform: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: .5; }

/* Text that flips white over dark media and black over white */
.blend { color: var(--ov); mix-blend-mode: difference; }

/* ── Navigation ── */
nav {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex; gap: 14px; white-space: nowrap;
  z-index: 30;
}
nav button { padding: 10px 0; }
nav button:hover { opacity: .55; }
nav button.active { opacity: .5; }

/* ── Home stage ── */
#stage { position: fixed; inset: 0; transition: opacity .5s ease; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s .45s; }
.slide.active { opacity: 1; visibility: visible; transition: opacity .45s ease; }

.slide-video video, .slide-video .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Photos side by side: 2 sit at the left/right edges, 3 spread left/centre/right.
   Photos keep their own shape (portrait or landscape). */
.slide-pair { display: flex; align-items: center; justify-content: space-between; padding: 0 1vw; }
.slide-pair .pic { display: block; width: 32.6vw; height: auto; max-height: 92vh; object-fit: contain; }
.slide-pair .ph.pic { aspect-ratio: 4 / 5; }
/* One photo (used for wide images): large, centred */
.slide-pair.n1 { justify-content: center; }
.slide-pair.n1 .pic { width: 74vw; max-height: 84vh; }

/* Placeholder blocks (shown when no media file is set) */
.ph {
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--fg) 14%, var(--bg)); color: color-mix(in srgb, var(--fg) 55%, var(--bg)); font-size: 10px; letter-spacing: .04em;
}
.ph-dark { background: color-mix(in srgb, var(--bg) 70%, #000); color: color-mix(in srgb, var(--fg) 45%, var(--bg)); }
.slide-video .ph { align-items: flex-end; padding-bottom: 70px; }

/* Vimeo: scale the 16:9 player to cover the whole screen, like object-fit: cover */
.slide-video { background: #000; overflow: hidden; }
.slide-video .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.embed-wrap { position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .6s ease; }
.embed-wrap.ready { opacity: 1; }
.embed-wrap iframe {
  position: absolute; top: 50%; left: 50%; border: 0;
  /* --ar = the video's width ÷ height (16:9 by default; set per project with videoRatio) */
  width: max(100vw, calc(100vh * var(--ar, 1.7778))); height: max(100vh, calc(100vw / var(--ar, 1.7778)));
  transform: translate(-50%, -50%);
}

/* Click halves to move between projects */
.hit { position: fixed; top: 0; bottom: 0; width: 50%; z-index: 10; }
.hit-prev { left: 0; cursor: w-resize; }
.hit-next { right: 0; cursor: e-resize; }

.dot {
  position: fixed; z-index: 20; width: 5px; height: 5px; border-radius: 50%;
  background: var(--ov); mix-blend-mode: difference; pointer-events: none;
}
.dot-l { left: 9px; top: 50%; transform: translateY(-50%); }
.dot-r { right: 9px; top: 50%; transform: translateY(-50%); }
.dot-b {
  left: 50%; bottom: 14px; transform: translateX(-50%);
  width: 7px; height: 7px; pointer-events: auto; z-index: 25;
}
.dot-b::after { content: ""; position: absolute; inset: -14px; } /* bigger tap target */

#credits {
  position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%);
  text-align: center; z-index: 25; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
#credits .cr-label { text-transform: none; }
body.show-credits #credits { opacity: 1; }

/* ── Information ── */
#information {
  position: fixed; inset: 0; z-index: 15;
  display: none; pointer-events: none;
  text-transform: none;
}
.info-text {
  position: absolute; top: 12px; left: 16px; right: 16px;
  text-align: center; pointer-events: auto;
}
.info-text p { margin: 0; }
.info-footer {
  position: absolute; bottom: 12px; left: 0; right: 0;
  text-align: center; pointer-events: auto;
}
.info-footer span + span { margin-left: 12px; }
.info-footer .cr-label { text-transform: none; }

body[data-view="information"] #information { display: block; }

/* Information + list of work by year (infoWorkList) — the page scrolls */
.worklist { display: none; }
body.has-list #information { overflow-y: auto; pointer-events: auto; }
body.has-list .info-text { position: static; padding: 12px 16px 0; }
body.has-list .worklist { display: block; text-transform: uppercase; text-align: center; margin: 56px auto 0; padding: 0 16px; }
.wl-year { margin-bottom: 34px; }
.wl-head { opacity: .45; margin-bottom: 12px; }
.wl-item { display: block; margin: 0 auto 14px; max-width: 420px; }
.wl-item .cr-label { text-transform: none; }
body.has-list .info-footer { position: static; padding: 30px 0 14px; }

/* ── Always-on caption at the top (captionStyle: "top") ── */
#topcap {
  display: none; position: fixed; z-index: 25; top: 12px; left: 16px; right: 16px;
  text-align: center; pointer-events: none;
}
#topcap .cr-label { text-transform: none; }
body.cap-top[data-view="home"] #topcap { display: block; }
body.cap-top .dot-b, body.cap-top #credits { display: none !important; }

/* ── Menu in the top-left corner (navPosition: "corner") ── */
body.nav-corner nav { top: 2px; left: 16px; transform: none; }
body.nav-corner #topcap { text-align: left; top: 36px; right: auto; }
body.nav-corner .info-text { top: 44px; }
body.nav-corner.has-list .info-text { padding-top: 44px; }
body.nav-corner #index { padding-top: 56px; }
/* leave room for the caption above tall photos */
body.cap-top .slide-pair .pic { max-height: 74vh; }

/* ── Index ── */
#index {
  position: fixed; inset: 0; z-index: 5;
  overflow-y: auto; display: none;
  padding: 30px 2vw 80px;
}
.grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px 2.4vw; align-items: center;
}
.grid .item { display: block; width: 100%; opacity: .35; filter: saturate(.6); transition: opacity .25s ease, filter .25s ease; }
.grid .item:hover, .grid .item:focus-visible { opacity: 1; filter: none; }
.grid .item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.grid .item .ph { width: 100%; height: 100%; }
.wash {
  position: fixed; inset: 0; z-index: 6; pointer-events: none; display: none;
  background: radial-gradient(ellipse 45% 40% at 50% 50%, color-mix(in srgb, var(--bg) 90%, transparent), transparent);
}
#index-title {
  position: fixed; bottom: 12px; left: 0; right: 0; text-align: center;
  z-index: 25; display: none; pointer-events: none;
}
body[data-view="index"] #index,
body[data-view="index"] .wash,
body[data-view="index"] #index-title { display: block; }

/* Hide slideshow controls off the home view */
body:not([data-view="home"]) .hit,
body:not([data-view="home"]) .dot,
body:not([data-view="home"]) #credits { display: none; }

/* Touch screens have no hover, so show Index thumbnails at full strength */
@media (hover: none) {
  .grid .item { opacity: 1; filter: none; }
}

/* ── Phones ── */
@media (max-width: 700px) {
  .slide-pair { padding: 0 2.5vw; }
  .slide-pair .pic { width: 46vw; }
  .slide-pair.n1 .pic { width: 95vw; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 16px 4vw; }
  #index { padding: 24px 16px 80px; }
  #credits { white-space: normal; width: calc(100% - 32px); }
  nav { gap: 12px; }
}

/* ═════════ Text over photos and video ═════════
   Name, menu and captions never get a panel: their text flips black/white against what's behind. */
.ov { color: var(--ov); mix-blend-mode: difference; }
#index-title:empty { visibility: hidden; }

/* ═════════ INFO / INDEX take-over layer (overlayStyle) ═════════
   When INFO or INDEX opens, a layer covers the whole page and the slideshow keeps playing behind it. */
#veil { position: fixed; inset: 0; z-index: 3; opacity: 0; pointer-events: none; transition: opacity .4s ease; }
body[data-view="information"] #veil, body[data-view="index"] #veil { opacity: 1; }
/* glass — frosted white */
body.ov-glass #veil {
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(1.25); backdrop-filter: blur(24px) saturate(1.25);
}
/* smoke — frosted dark, white text */
body.ov-smoke #veil {
  background: rgba(14, 14, 14, .5);
  -webkit-backdrop-filter: blur(24px) saturate(1.15); backdrop-filter: blur(24px) saturate(1.15);
}
body.ov-smoke #information, body.ov-smoke #index { color: #fff; }
/* solid — plain white page */
body.ov-solid #veil { background: var(--bg); }
/* fade — the slideshow shows faintly through white (no blur) */
body.ov-invert #veil { background: color-mix(in srgb, var(--bg) 90%, transparent); }

/* ═════════ Split layout: name top-left, menu centre, caption bar at the bottom ═════════ */
#brand { display: none; }
body.nav-split #brand {
  display: block; position: fixed; top: 10px; left: 16px; z-index: 30; padding: 7px 0;
}
body.nav-split #brand { display: none; } /* name now lives in the centre menu */
#capbar { display: none; }
body.cap-bar[data-view="home"] #capbar, body.cap-bar.idx-hover[data-view="index"] #capbar {
  display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  padding: 15px 16px; display: grid; grid-template-columns: minmax(64px, 1fr) minmax(0, auto) minmax(64px, 1fr);
  align-items: baseline; gap: 12px;
}
#capbar .cr-label { text-transform: none; }
#capbar .sep { opacity: .5; }
body.cap-bar #credits { display: none !important; }
body.cap-bar .slide-pair .pic { max-height: 80vh; }
body.cap-bar .slide-pair { padding-bottom: 44px; }
body.nav-split .info-text { top: 52px; }
body.nav-split.has-list .info-text { padding-top: 52px; }
body.nav-split #index { padding-top: 60px; }

/* ═════════ Index as a list with a big hover image ═════════ */
.ilist { display: none; }
body.idx-list .grid, body.idx-list .wash, body.idx-list #index-title { display: none !important; }
body.idx-list .ilist { display: block; width: min(320px, 30vw); padding-bottom: 80px; }
.il-item { display: flex; align-items: center; gap: 12px; padding: 3px 0; opacity: .45; transition: opacity .15s; }
.il-item:hover, .il-item.on, .il-item:focus-visible { opacity: 1; }
.il-title { flex: 1; }
.il-year { opacity: .6; }
.il-thumb { display: none; }
.ipreview {
  position: fixed; z-index: 4; top: 50%; left: 60%; transform: translate(-50%, -50%);
  width: 54vw; height: 76vh; pointer-events: none; opacity: 0; transition: opacity .2s ease; display: none;
}
.ipreview img { width: 100%; height: 100%; object-fit: contain; }
body.idx-list[data-view="index"] .ipreview { display: block; }
body.idx-list[data-view="index"] .ipreview.show { opacity: 1; }
@media (hover: none), (max-width: 700px) {
  body.idx-list .ilist { width: auto; }
  body.idx-list[data-view="index"] .ipreview { display: none; }
  .il-item { opacity: 1; padding: 6px 0; }
  .il-thumb { display: block; width: 72px; height: 54px; object-fit: cover; flex: none; }
  body.cap-bar[data-view="home"] #capbar, body.cap-bar.idx-hover[data-view="index"] #capbar { white-space: normal; }
}

/* ═════════ Dot cursor ═════════ */
#cursor { display: none; }
body.dot-cursor, body.dot-cursor * { cursor: none !important; }
body.dot-cursor #cursor {
  display: block; position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none;
  width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%;
  background: var(--ov); mix-blend-mode: difference; opacity: 0;
  transition: width .15s ease, height .15s ease, margin .15s ease, opacity .2s ease;
}
body.dot-cursor #cursor.on { opacity: 1; }
body.dot-cursor #cursor.big { width: 10px; height: 10px; margin: -5px 0 0 -5px; }

/* While INFO or INDEX is open, the menu moves to the top-right so it never sits on top of the text */
body.nav-split:not([data-view="home"]) nav { top: 2px; left: 16px; transform: none; }

/* ═════════ Caption bar: counter on the left, caption in the middle ═════════ */
.cb-count { justify-self: start; font-variant-numeric: tabular-nums; }
.cb-text { text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#capbar.open .cb-text { white-space: normal; }

/* Progress line along the bottom edge: fills until the next project, dims while paused */
#progress { display: none; }
body.has-progress.on-video[data-view="home"] #progress {
  display: block; position: fixed; left: 0; right: 0; bottom: 0; height: 2px; z-index: 26;
  background: var(--ov); mix-blend-mode: difference; transform-origin: left center; transform: scaleX(0);
  pointer-events: none; transition: opacity .3s ease;
}
#progress.hold { opacity: .35; }

/* CLOSE (top-right) whenever INFO or INDEX is open; Esc does the same */
#close { display: none; }
body:not([data-view="home"]) #close { display: block; position: fixed; top: 2px; right: 16px; z-index: 30; padding: 10px 0; }
#close:hover { opacity: .55; }

/* The side dots turn into small arrows when the mouse gets close to them.
   Both shapes are 8-point outlines so the browser can morph smoothly between them. */
.dot-l, .dot-r {
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  transition: width .2s ease, height .2s ease, margin .2s ease, border-radius .2s ease, clip-path .2s ease;
}
body.near-r .dot-r {
  width: 9px; height: 11px; border-radius: 0; margin-right: -2px;
  clip-path: polygon(0 0, 50% 25%, 100% 50%, 100% 50%, 50% 75%, 0 100%, 0 70%, 0 30%); /* ▶ */
}
body.near-l .dot-l {
  width: 9px; height: 11px; border-radius: 0; margin-left: -2px;
  clip-path: polygon(100% 0, 100% 0, 100% 50%, 100% 100%, 100% 100%, 50% 75%, 0 50%, 50% 25%); /* ◀ */
}

/* Index: the project you were just looking at */
.il-item.current { opacity: 1; }
.il-item.current .il-title::before { content: "→ "; }
.grid .item.current { opacity: .85; filter: none; }

/* Phones: caption shows title + role; tap it for the full credits */
@media (hover: none), (max-width: 700px) {
  #capbar.has-more:not(.open) .cb-more { display: none; }
  #capbar.has-more:not(.open) .cb-main::after { content: " +"; opacity: .6; }
  body.cap-bar[data-view="home"] #capbar, body.cap-bar.idx-hover[data-view="index"] #capbar { grid-template-columns: auto minmax(0, 1fr); }
  .cb-end { grid-column: 1 / -1; justify-self: end; }
  .cb-end:empty { display: none; }
  .cb-text { text-align: right; }
}

/* Phones: a photo project shows one large photo at a time (tap/swipe for the next one) */
@media (max-width: 700px) {
  .slide-pair, body.cap-bar .slide-pair { justify-content: center; padding: 0 0 44px; }
  .slide-pair .pic { display: none; }
  .slide-pair .pic.cur { display: block; width: 88vw; max-height: 72vh; }
  .slide-pair.n1 .pic { width: 92vw; }
  .cb-sub { opacity: .6; }
}

/* ═════════ INFO & INDEX: left-aligned column (textLayout: "column") ═════════
   Name/menu in the top-left corner, everything else in one narrow column a little way in. */
:root { --col: clamp(220px, 17vw, 300px); }
body.tl-column #information { overflow-y: auto; pointer-events: auto; text-transform: none; }
body.tl-column #information .info-text {
  position: static; text-align: left; padding: 12px 16px 0 var(--col); max-width: calc(var(--col) + 460px);
}
body.tl-column #information .ib { margin-bottom: 2.6em; }
body.tl-column #information .ib p { margin: 0 0 1.1em; }
body.tl-column #information .ib p:last-child { margin-bottom: 0; }
body.tl-column #information .ib-muted { opacity: .55; }
body.tl-column #information .ib a { text-decoration: underline; text-underline-offset: 2px; }
body.tl-column.has-list #information .worklist {
  display: block; text-align: left; text-transform: none; margin: 0; padding: 0 16px 0 var(--col); max-width: calc(var(--col) + 460px);
}
body.tl-column #information .wl-year { margin-bottom: 1.8em; }
body.tl-column #information .wl-head { opacity: .45; margin-bottom: .35em; }
body.tl-column #information .wl-item { display: block; margin: 0; max-width: none; }
body.tl-column #information .info-footer { position: static; text-align: left; padding: 1.4em 16px 28px var(--col); }

body.tl-column #index { padding-top: 12px; }
body.tl-column.idx-list #index .ilist { margin-left: calc(var(--col) - 2vw); width: min(360px, 30vw); }
body.tl-column .ipreview {
  left: auto; right: 16px; transform: translateY(-50%);
  width: min(50vw, calc(100vw - var(--col) - 420px)); height: 78vh;
}
body.tl-column .ipreview img { object-position: right center; }

@media (max-width: 700px) {
  :root { --col: 16px; }
  body.tl-column #information .info-text { padding-top: 52px; }
  body.tl-column #index { padding-top: 52px; }
  body.tl-column.idx-list #index .ilist { margin-left: 0; width: auto; }
}
body.tl-column #information .info-footer span + span { margin-left: 0; }

/* ═════════ Project page: all of a project's images, stacked down the page ═════════ */
#project { display: none; }
body[data-view="project"] #project {
  display: block; position: fixed; inset: 0; z-index: 15; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
body[data-view="project"] #veil { opacity: 1; }
.pj-head { padding: 12px 16px 0 var(--col); max-width: calc(var(--col) + 460px); }
.pj-head .cr-label { text-transform: none; }
.pj-count { opacity: .5; margin-top: .6em; }
.pj-images { display: flex; flex-direction: column; align-items: center; gap: 56px; padding: 64px 16px 120px; }
.pj-images img {
  display: block; width: auto; height: auto;
  max-width: min(1200px, calc(100vw - 32px)); max-height: 88vh; object-fit: contain;
}
/* VIEW ALL in the caption bar (bottom-right) */
.cb-end { justify-self: end; }
.cb-view { padding: 0; }
.cb-view:hover { opacity: .55; }
@media (max-width: 700px) {
  .pj-head { padding-top: 52px; }
  .pj-images { gap: 24px; padding: 40px 16px 80px; }
  .pj-images img { max-height: none; width: 100%; }
}

/* ═════════ Project page, "one at a time" (galleryStyle: "slides") ═════════
   Credits fixed on the left, one large image in the space to the right, [1/10] top-right. */
.pj-counter { display: none; }
body.gal-slides[data-view="project"] #project { overflow: hidden; }
body.gal-slides .pj-head {
  position: fixed; top: 52px; left: 16px; width: 230px; padding: 0; max-width: none; z-index: 2;
}
body.gal-slides .pj-images {
  position: fixed; top: 52px; bottom: 44px; left: 270px; right: 16px; padding: 0; gap: 0;
  display: block; cursor: pointer;
}
body.gal-slides .pj-images img {
  position: absolute; inset: 0; margin: auto; display: none;
  width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain;
}
body.gal-slides .pj-images img.cur { display: block; }
body.gal-slides[data-view="project"] .pj-counter {
  display: block; position: fixed; top: 34px; right: 16px; z-index: 30; font-variant-numeric: tabular-nums;
}
@media (max-width: 700px) {
  body.gal-slides .pj-head { position: static; width: auto; padding: 52px 16px 0; }
  body.gal-slides .pj-images { top: 190px; bottom: 32px; left: 16px; right: 16px; }
}

/* ═════════ Triangle cursor (cursorShape: "triangle" / "follow") ═════════ */
body.dot-cursor:not(.cur-dot) #cursor {
  width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 0; background: none; mix-blend-mode: normal;
  transition: rotate .22s ease, scale .15s ease, opacity .2s ease;
}
body.dot-cursor.cur-follow #cursor { transition: rotate .12s linear, scale .15s ease, opacity .2s ease; }
body.dot-cursor:not(.cur-dot) #cursor svg { display: block; }
body.dot-cursor:not(.cur-dot) #cursor.big { width: 14px; height: 14px; margin: -7px 0 0 -7px; scale: 1.35; }

/* ═════════ Home page: just the project number (01, 02 …) bottom-centre, VIEW ALL bottom-right ═════════
   (The full caption still shows when hovering titles in INDEX.) */
body[data-view="home"] #capbar .cb-text,
body[data-view="home"] #capbar .cb-sub { display: none; }
body.cap-bar[data-view="home"] #capbar { grid-template-columns: 1fr auto 1fr; }
body[data-view="home"] #capbar .cb-count { grid-column: 2; grid-row: 1; justify-self: center; letter-spacing: .04em; }
body[data-view="home"] #capbar .cb-end { grid-column: 3; grid-row: 1; justify-self: end; }
@media (max-width: 700px) {
  body.cap-bar[data-view="home"] #capbar { grid-template-columns: 1fr auto 1fr; }
  body[data-view="home"] #capbar .cb-end { grid-column: 3; }
}

/* VIEW ALL removed: project pages are opened from INDEX (or the INFO work list) */
#capbar .cb-view { display: none; }

/* Home: the number is replaced by a single dot (bottom-centre) that opens the project's full set */
body[data-view="home"] #capbar .cb-count { display: none; }
body.cap-bar .dot-b { z-index: 27; bottom: 18px; transition: scale .15s ease; }
body.cap-bar .dot-b:hover { scale: 1.5; }

/* Hovering the bottom dot shows the project's essentials just above it */
#dot-tip {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 27;
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .2s ease, bottom .2s ease;
  display: none;
}
#dot-tip .sep { opacity: .5; }
#dot-tip .cr-mix { text-transform: none; }
body.cap-bar[data-view="home"] #dot-tip { display: block; }
body.cap-bar .dot-b:hover ~ #dot-tip { opacity: 1; bottom: 38px; }
@media (hover: none) { #dot-tip { display: none !important; } }

/* ═════════ Clear text over images (textContrast: "clear") ═════════
   No blend effect: text is plain black over light pictures/background and white over dark ones,
   with a very soft shadow under white text so it never gets lost. */
body.ct-clear .ov, body.ct-clear .dot, body.ct-clear #progress { mix-blend-mode: normal; }
body.ct-clear .ov { color: var(--fg); transition: color .3s ease, text-shadow .3s ease; }
body.ct-clear .dot, body.ct-clear #progress { background: var(--fg); transition: background-color .3s ease, width .2s ease, height .2s ease, margin .2s ease, clip-path .2s ease; }
body.ct-clear .dot-l::after, body.ct-clear .dot-r::after { color: var(--fg); }

/* Which parts sit on something dark (home page only) */
body.ct-clear[data-view="home"].ct-centre-dark nav { color: #fff; text-shadow: 0 0 3px rgba(0,0,0,.45), 0 0 14px rgba(0,0,0,.4); }
body.ct-clear[data-view="home"].ct-bottom-dark #dot-tip,
body.ct-clear[data-view="home"].ct-bottom-dark #capbar { color: #fff; text-shadow: 0 0 3px rgba(0,0,0,.45), 0 0 14px rgba(0,0,0,.4); }
body.ct-clear[data-view="home"].ct-bottom-dark .dot-b,
body.ct-clear[data-view="home"].ct-bottom-dark #progress { background: #fff; box-shadow: 0 0 6px rgba(0,0,0,.25); }
body.ct-clear[data-view="home"].ct-edges-dark .dot-l,
body.ct-clear[data-view="home"].ct-edges-dark .dot-r { background: #fff; }

/* A soft light halo behind black text on the home page, so it holds up over busy, bright pictures too */
body.ct-clear[data-view="home"] nav,
body.ct-clear[data-view="home"] #dot-tip { text-shadow: 0 0 3px rgba(255,255,255,.65), 0 0 14px rgba(255,255,255,.45); }
body.ct-clear[data-view="home"].ct-centre-dark nav,
body.ct-clear[data-view="home"].ct-bottom-dark #dot-tip { text-shadow: 0 0 3px rgba(0,0,0,.45), 0 0 14px rgba(0,0,0,.4); }

/* INDEX: hovering a title changes the hero behind the glass (indexPreview: "background") */
body.ip-background .ipreview { display: none !important; }
body.ip-background.ov-glass[data-view="index"] #veil {
  background: color-mix(in srgb, var(--bg) 38%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.25); backdrop-filter: blur(18px) saturate(1.25);
}
body.ip-background[data-view="index"] .slide { transition: opacity 1s ease, visibility 0s 1s; }
body.ip-background[data-view="index"] .slide.active { transition: opacity 1s ease; }
/* keep the list readable over a livelier background */
body.ip-background[data-view="index"] .il-item { opacity: .6; }
body.ip-background[data-view="index"] .il-item:hover,
body.ip-background[data-view="index"] .il-item.on,
body.ip-background[data-view="index"] .il-item.current { opacity: 1; }
body.ip-background[data-view="index"] #index { text-shadow: 0 0 10px rgba(255,255,255,.55); }

/* ═════════ Hero image: one landscape picture filling the screen ═════════ */
.slide-hero { overflow: hidden; }
.slide-hero img.hero { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) {
  /* on phones show the whole landscape picture rather than cropping it to a tall screen */
  .slide-hero img.hero { inset: 0; margin: auto; width: 92vw; height: auto; max-height: 72vh; object-fit: contain; }
}

/* ═════════ Project page v2: image centred, text along the bottom ═════════ */
.pj-bar { display: none; }
body.gal-slides[data-view="project"] .pj-bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 12px;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 15px 16px;
}
body.gal-slides .pj-bar-text { grid-column: 2; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70vw; }
body.gal-slides .pj-bar .sep { opacity: .5; }
body.gal-slides .pj-bar .cr-mix { text-transform: none; }
body.gal-slides .pj-more { grid-column: 3; justify-self: end; padding: 0; }
body.gal-slides .pj-more:hover { opacity: .55; }

/* image in the middle of the screen */
body.gal-slides .pj-images { top: 52px; bottom: 52px; left: 16px; right: 16px; transition: opacity .35s ease; }

/* full credits: hidden until CREDITS + is clicked, then shown in the middle while the image steps back */
body.gal-slides .pj-head {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 32px));
  padding: 0; text-align: center; z-index: 3; opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
body.gal-slides.pj-credits-open .pj-head { opacity: 1; pointer-events: auto; }
body.gal-slides.pj-credits-open .pj-images { opacity: .07; }
body.gal-slides .pj-head > div { margin: 0 0 .35em; }

@media (max-width: 700px) {
  body.gal-slides .pj-head { position: fixed; padding: 0; }
  body.gal-slides .pj-images { top: 52px; bottom: 76px; left: 16px; right: 16px; }
  body.gal-slides[data-view="project"] .pj-bar { grid-template-columns: 1fr auto; }
  body.gal-slides .pj-bar-text { grid-column: 1; text-align: left; white-space: normal; max-width: none; }
  body.gal-slides .pj-more { grid-column: 2; }
}

/* ═════════ Film project page ═════════ */
.pj-film {
  position: absolute; inset: 0; margin: auto; display: none; background: #000; overflow: hidden;
  aspect-ratio: var(--ar, 1.7778); width: min(100%, calc((100vh - 104px) * var(--ar, 1.7778))); height: auto; max-height: 100%;
}
body.gal-slides .pj-images .pj-film.cur { display: block; }
.pj-film-poster, .pj-film-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pj-film .embed-wrap iframe { top: 0; left: 0; width: 100%; height: 100%; transform: none; }

/* SOUND ON / PAUSE, bottom-left, only while the film is showing */
.pj-controls { grid-column: 1; justify-self: start; display: none; gap: 14px; }
body.pj-has-film.pj-on-film .pj-controls { display: inline-flex; }
.pj-controls button { padding: 0; }
.pj-controls button:hover { opacity: .55; }
body.gal-slides[data-view="project"] .pj-bar > .pj-bar-text { grid-column: 2; }
body.gal-slides[data-view="project"] .pj-bar > .pj-more { grid-column: 3; }

@media (max-width: 700px) {
  .pj-film { width: min(100%, calc((100vh - 128px) * var(--ar, 1.7778))); }
  body.gal-slides[data-view="project"] .pj-bar { grid-template-columns: 1fr auto; row-gap: 6px; }
  body.gal-slides[data-view="project"] .pj-bar > .pj-controls { grid-column: 1; grid-row: 1; }
  body.gal-slides[data-view="project"] .pj-bar > .pj-bar-text { grid-column: 1 / -1; grid-row: 2; }
  body.gal-slides[data-view="project"] .pj-bar > .pj-more { grid-column: 2; grid-row: 1; }
}

/* INDEX: label before the projects that aren't in the home slideshow */
.il-head { opacity: .45; margin: 1.6em 0 .4em; }
