.site-footer {
  position: relative;
  z-index: 1;
  background: var(--paper);
}
.painting-essay {
  position: relative;
  isolation: isolate;
  overflow-anchor: none;
  color: var(--paper);
  background: #2e202b;
}
.painting-stage {
  --cloud-texture: url("assets/drifting-clouds.webp");
  --halo-strength: calc(.34 + var(--reading-light, 0) * .56);
  --cast-strength: calc(.28 + var(--reading-light, 0) * .30);
  --reflection-strength: calc(.77 + var(--reading-light, 0) * .23);
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: #2e202b;
  filter: brightness(var(--time-brightness, 1)) saturate(var(--time-saturation, 1)) hue-rotate(var(--time-hue, 0deg));
  transition: filter 1200ms linear;
}
.painting-stage[data-celestial="moon"] { --celestial-light: var(--moon-light, 0); }
.painting-stage[data-celestial="sun"] { --cast-strength: calc(.63 + var(--reading-light, 0) * .22); }
.landscape-plane {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
/* The painting, the shoreline overlay and the glints use the same source rectangle. */
.landscape-plane > img,
.lake-light {
  position: absolute;
  inset: var(--land-art-top, -4%) auto auto var(--land-art-left, 0px);
  width: var(--land-art-width, 100%);
  height: var(--land-art-height, 108%);
}
.landscape-plane > img {
  max-width: none;
  object-fit: cover;
  filter: brightness(calc(1 + .53 * var(--daylight, 0))) saturate(calc(1 + .47 * var(--daylight, 0)));
}
.lake-bank { clip-path: url(#lake-bank-clip); }
.lake-light {
  --reflection-ink: 180 210 255;
  clip-path: url(#lake-water-clip);
  opacity: calc(var(--reflection-strength) * var(--reflection-visibility, 0) * var(--celestial-light, 1));
  mix-blend-mode: screen;
  transition: opacity 1.4s ease;
}
[data-celestial="sun"] .lake-light {
  --reflection-ink: 255 194 112;
}
.lake-reflection {
  position: absolute;
  inset: 0 auto 0 calc(0px - var(--land-art-left, 0px));
  width: clamp(4.5rem, 16vmin, 9.25rem);
  transform: translateX(calc(var(--reflection-x, 0px) - 50%));
  opacity: calc(.25 + .75 * var(--celestial-clear, 1));
  transition: opacity .3s ease-out;
}
.has-sky-clock .lake-reflection { transition: transform .9s ease, opacity .3s ease-out; }
.reflection-stroke {
  position: absolute;
  top: var(--stroke-y);
  left: var(--stroke-x);
  width: var(--stroke-width);
  height: var(--stroke-height);
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, rgb(var(--reflection-ink)) 39% 64%, transparent);
  transform: translateX(-50%);
  opacity: .21;
  animation: lake-glint var(--glint-cycle) var(--glint-delay) ease-in-out infinite paused;
}
.is-shimmering .reflection-stroke { animation-play-state: running; }
@keyframes lake-glint {
  0%, 17%, 59%, 100% { opacity: .15; }
  34% { opacity: var(--glint-peak); }
}
.dawn-mist {
  position: absolute;
  top: calc(var(--window-y, 66%) + 1.5%);
  left: calc(var(--window-x, 66%) + 5vw);
  width: clamp(18rem, 43vw, 44rem);
  height: clamp(2.4rem, 11vh, 7rem);
  opacity: var(--dawn-mist, 0);
  transform: translate(-40%, var(--mist-lift, 0px)) rotate(-7deg);
  mask-image: radial-gradient(ellipse, #000 9%, rgb(0 0 0 / .45) 48%, transparent 72%);
  pointer-events: none;
}
.dawn-mist::before {
  content: "";
  position: absolute;
  inset: 0 -18%;
  background: var(--cloud-texture) center / 100% 100% no-repeat;
  filter: saturate(.48) brightness(1.28);
}
.has-dawn-mist .dawn-mist::before { animation: lift-lake-mist 40s ease-in-out infinite alternate; }
@keyframes lift-lake-mist {
  from { transform: translate(-4%, 13%); }
  to { transform: translate(7%, -22%); opacity: .65; }
}
.distant-window {
  position: absolute;
  top: var(--window-y, 66%);
  left: var(--window-x, 66%);
  width: 3px;
  height: 2px;
  transform: translate(-50%, -50%) rotate(-4deg);
  background: #ffe1a4;
  box-shadow: 0 0 3px 1px rgb(232 166 90 / .58), 0 0 9px 2px rgb(216 133 74 / .28);
  opacity: 0;
  transition: opacity 1.4s ease-out;
}
.window-lit .distant-window { opacity: calc(.95 * var(--window-clear, 1)); transition-duration: .85s; }
.ridge-definitions { position: absolute; pointer-events: none; }
.daylight-sky, .cleared-sky, .celestial-scene {
  position: absolute;
  inset: 0;
}
.celestial-scene {
  mask: url(#painted-sky-mask);
}
.daylight-sky, .cleared-sky {
  /* Blend across the distant hills at the same scale as the painting. */
  --haze-top: calc(var(--land-art-top, 0px) + var(--land-art-height, 100%) * .19);
  --haze-centre: calc(var(--land-art-top, 0px) + var(--land-art-height, 100%) * .385);
  --haze-bottom: calc(var(--land-art-top, 0px) + var(--land-art-height, 100%) * .54);
}
.daylight-sky {
  opacity: calc(.69 * var(--daylight, 0));
  background: linear-gradient(#77a9d1, #b7d0da var(--haze-centre), #cbd0bf var(--haze-bottom));
  mask-image: linear-gradient(#000 var(--haze-top), rgb(0 0 0 / .9) var(--haze-centre), transparent var(--haze-bottom));
}
.cleared-sky {
  opacity: calc(.94 * var(--cleared-sky-opacity, 0));
  --daylight-mix: calc(100% * var(--daylight, 0));
  background: linear-gradient(var(--clear-sky-top, #31334d),
    var(--clear-sky-horizon, #594c63) var(--haze-centre));
  background: linear-gradient(
    color-mix(in srgb, var(--clear-sky-top, #31334d), #7ca9cb var(--daylight-mix)),
    color-mix(in srgb, var(--clear-sky-horizon, #594c63), #b7cdd3 var(--daylight-mix)) var(--haze-centre));
  mask-image: linear-gradient(#000 var(--haze-top), rgb(0 0 0 / .72) var(--haze-centre), transparent var(--haze-bottom));
}
.celestial-source {
  position: absolute;
  left: var(--body-x, 50%);
  top: var(--body-y, 45%);
  opacity: var(--body-visibility, 0);
}
.has-sky-clock .celestial-source { transition: left .9s ease, top .9s ease, opacity .8s ease; }
.celestial-halo, .celestial-disc {
  position: absolute;
  inset: 0 auto auto 0;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}
.celestial-halo {
  opacity: calc(var(--halo-strength) * (.39 + .61 * var(--celestial-clear, 1)) * var(--halo-light, 1));
  transition: opacity 1.1s ease;
}
.celestial-disc {
  border-radius: 50%;
  filter: brightness(calc(.64 + .36 * var(--celestial-clear, 1)));
  transition: filter .55s ease-out;
}
.celestial-sun { --sun-diameter: clamp(2.5rem, 6.5vw, 5.5rem); }
.celestial-sun .celestial-disc {
  width: var(--sun-diameter);
  background: radial-gradient(ellipse at 39% 34%, #fff8e1 10%, #f8deb1 58%, #eeb582 91%);
  mask-image: radial-gradient(circle closest-side, #000 calc(100% - 1px), transparent);
  filter: brightness(calc(.64 + .36 * var(--celestial-clear, 1) + .24 * var(--daylight, 0)));
}
.celestial-sun .celestial-halo {
  --halo-light: var(--sky-visibility, 0);
  --near-glow: calc(var(--sun-diameter) * 2.65);
  width: max(var(--near-glow), clamp(13rem, 58vmin, 34rem));
  background:
    radial-gradient(circle closest-side, rgb(255 225 176 / .55) 24%,
      rgb(255 212 156 / .36) 40%, rgb(249 185 130 / .13) 59%,
      rgb(241 162 110 / .035) 80%, transparent) center / var(--near-glow) var(--near-glow) no-repeat,
    radial-gradient(ellipse 50% 44%, rgb(250 202 149 / .26) 8%,
      rgb(238 159 111 / .13) 42%, rgb(228 139 99 / .04) 70%, transparent 94%);
}
.celestial-moon .celestial-halo {
  --halo-light: calc(var(--moon-light, 0) * var(--sky-visibility, 0));
  width: clamp(11rem, 67vmin, 34rem);
  background: radial-gradient(circle closest-side,
    rgb(213 224 239 / .48) 5%, rgb(178 194 222 / .20) 27%,
    rgb(139 157 198 / .064) 53%, transparent 84%);
}
/* Full Moon, NASA Scientific Visualization Studio, rendered from LRO data.
   https://svs.gsfc.nasa.gov/5587/ */
.celestial-moon .celestial-disc {
  width: clamp(1.65rem, 3.85vw, 3.5rem);
  overflow: hidden;
  filter: sepia(.12) saturate(.8) contrast(.84) brightness(calc(1 + .42 * var(--celestial-clear, 1)));
}
.lunar-face { display: block; width: 100%; height: 100%; }
.lunar-texture { display: none; }

/* The thumb already gives continuous motion. Keep the light and its reflection
   on the same frame while the visitor is choosing a time. */
.painting-stage[data-scene-preview],
.painting-stage[data-scene-preview] :is(.celestial-source, .celestial-halo, .celestial-wash, .lake-light, .lake-reflection) {
  transition: none;
}
.painting-stage[data-scene-preview] .celestial-wash {
  --cast-x: var(--celestial-x);
  --cast-y: var(--celestial-y);
}

.scene-controls {
  position: fixed;
  z-index: 4;
  right: max(clamp(.85rem, 3.5vw, 3rem), env(safe-area-inset-right));
  bottom: max(clamp(.75rem, 2.7vw, 2.25rem), env(safe-area-inset-bottom));
  display: grid;
  justify-items: end;
  gap: .5rem;
  width: min(19.5rem, calc(100vw - 2.2rem));
  color: var(--paper);
  pointer-events: none;
}
.scene-controls[hidden], .scene-panel[hidden] { display: none; }
.scene-controls-toggle, .scene-panel {
  border: 1px solid rgb(241 231 215 / .24);
  border-radius: .2rem;
  pointer-events: auto;
}
.scene-controls-toggle {
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 2.75rem;
  padding: .45rem .75rem;
  color: inherit;
  background: rgb(39 27 39 / .82);
  font-size: .875rem;
}
.scene-controls-toggle:hover { background: var(--ink); }
.scene-controls-icon {
  display: block;
  position: relative;
  width: .625rem;
  height: 1px;
  background: currentColor;
}
.scene-controls-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  transform: rotate(90deg);
}
[aria-expanded="true"] .scene-controls-icon::after { visibility: hidden; }
.scene-panel {
  grid-row: 1;
  width: 100%;
  max-height: calc(100dvh - 9rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1rem;
  color-scheme: dark;
  background: rgb(39 27 39 / .94);
  box-shadow: 0 .55rem 2rem rgb(0 0 0 / .2);
}
.scene-panel h2 { margin-bottom: .45rem; font-size: 1.5rem; }
.scene-panel p {
  margin-bottom: .8rem;
  color: var(--pale);
  font-size: 1rem;
  line-height: 1.45;
}
.scene-field {
  display: grid;
  gap: .12rem;
  margin-top: .55rem;
}
.scene-field label, .scene-mode, .scene-reset { font-size: .875rem; }
.scene-field input { font: inherit; }
.scene-field input:focus-visible {
  outline: .125rem solid var(--paper);
  outline-offset: .18rem;
}
.scene-field input[type="date"] {
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: .35rem .5rem;
  border: 1px solid rgb(241 231 215 / .35);
  border-radius: .15rem;
  background: transparent;
  color: inherit;
}
.scene-time {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.1rem;
  align-items: center;
  gap: .65rem;
}
.scene-time input { width: 100%; min-height: 2.75rem; margin: 0; accent-color: var(--copper); touch-action: pan-y; }
.scene-time time { text-align: right; font-variant-numeric: tabular-nums; }
.scene-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  border-top: 1px solid rgb(241 231 215 / .19);
}
.scene-mode { color: var(--pale); }
.scene-reset {
  min-height: 2.75rem;
  padding: .28rem 0;
  border: 0;
  background: none;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: .2em;
}

@media (max-width: 42rem) {
  .scene-controls { width: min(21rem, calc(100vw - 1.7rem)); }
  .scene-panel { padding: .8rem .85rem; }
  .scene-panel p { margin-bottom: .5rem; line-height: 1.4; }
  .scene-field {
    grid-template-columns: 2rem minmax(0, 1fr);
    align-items: center;
    column-gap: .5rem;
    margin-top: .25rem;
  }
}

.sky-flock {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 58%;
}
.wind-window {
  position: absolute;
  left: 0;
  width: 100%;
  overflow: hidden;
}
.wind-high {
  top: 15%;
  height: 44%;
  opacity: calc(.55 * var(--cloud-cover, 1));
  filter: brightness(calc(.8 + .34 * var(--daylight, 0))) saturate(calc(.78 - .24 * var(--daylight, 0))) blur(.65px);
}
.wind-low {
  top: 47%;
  height: 53%;
  opacity: calc(.71 * var(--cloud-cover, 1));
  filter: brightness(calc(.87 + .30 * var(--daylight, 0))) saturate(calc(.83 - .25 * var(--daylight, 0)));
}
.cloud-plane, .wind-window::before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.cloud-texture { display: none; }
.wind-window::before {
  content: "";
  background: var(--cloud-texture) center / 100% 100% no-repeat;
}
.wind-high::before { transform: scaleX(-1) translateX(-22%); }
.wind-low::before { transform: translateX(-22%); }
.has-live-clouds .wind-window::before { visibility: hidden; }
.painting-stage > :is(.dispersing-mist, .painting-atmosphere, .celestial-wash, .painting-shade) {
  position: absolute;
  inset: 0;
}
.dispersing-mist {
  opacity: calc(.4 * var(--cloud-cover, 1));
  background: radial-gradient(ellipse at 21% 49%, rgb(175 140 157 / .38), transparent 71%);
}
.painting-atmosphere {
  mix-blend-mode: screen;
  opacity: .6;
  background: radial-gradient(ellipse at var(--light-x, 79%) var(--light-y, 48%), var(--pass-light, rgb(178 80 52 / .22)), transparent 62%);
}
@media (prefers-reduced-motion: no-preference) {
  .painting-atmosphere { animation: roaming-light 34s ease-in-out infinite alternate; }
  @keyframes roaming-light {
    0% { opacity: .55; }
    46% { opacity: .64; }
    100% { opacity: .58; }
  }
}
.celestial-wash {
  opacity: calc(var(--cast-strength) * var(--sky-visibility, 0) * (.08 + .92 * var(--celestial-clear, 1)) * var(--celestial-light, 1));
  mix-blend-mode: screen;
  transition: opacity .6s ease-out;
}
[data-celestial="sun"] .celestial-wash {
  --sun-cast-x: var(--cast-x, var(--celestial-x, 76%));
  --sun-cast-y: var(--cast-y, var(--celestial-y, 37%));
  background:
    radial-gradient(ellipse 56% 44% at var(--sun-cast-x) 63%, rgb(255 207 149 / .52),
      rgb(247 181 120 / .32) 41%, rgb(224 150 105 / .12) 70%, transparent 98%),
    radial-gradient(ellipse 55% 65% at var(--sun-cast-x) var(--sun-cast-y), rgb(255 209 151 / .48),
      rgb(249 182 119 / .24) 34%, rgb(235 157 109 / .08) 62%, transparent 93%);
}
[data-celestial="moon"] .celestial-wash {
  background: radial-gradient(ellipse 47% 62% at var(--cast-x, var(--celestial-x, 76%)) var(--cast-y, var(--celestial-y, 37%)),
    rgb(162 188 240 / .43), rgb(151 175 230 / .19) 33%, rgb(128 151 203 / .06) 60%, transparent 87%);
}
.painting-shade {
  background:
    linear-gradient(rgb(30 39 51 / calc(.27 * var(--daylight, 0))) 9%, transparent 26%),
    linear-gradient(rgb(17 24 50 / var(--night-depth, 0)), transparent 68%),
    radial-gradient(ellipse at var(--shade-x, 16%) 52%, rgb(25 16 24 / .54),
      rgb(25 16 24 / .32) 29%, rgb(25 16 24 / .12) 54%, rgb(25 16 24 / .025) 76%, transparent 89%),
    linear-gradient(0deg, rgb(25 17 24 / calc(.60 - .31 * var(--daylight, 0))), transparent 56%, rgb(29 18 27 / .22)),
    rgb(28 19 29 / calc(.19 - .05 * var(--daylight, 0)));
}

.essay-section {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 100svh;
  padding-block: clamp(3rem, 8vw, 8rem);
  scroll-margin-top: 1.5rem;
}
.essay-opening {
  display: block;
  scroll-margin-top: 0;
  padding: 0;
}
.opening-view {
  /* Reserve room for the full 690 × 845 mark, including its drop-down tail. */
  --opening-clearance: calc(var(--studio-nav-top) + var(--studio-logo-width) * 845 / 690 + 1rem);
  display: grid;
  grid-template-rows: minmax(var(--opening-clearance), 1fr) auto minmax(.75rem, 1fr);
  min-height: 100svh;
}
.opening-words {
  grid-row: 2;
  min-width: 0;
}
.opening-words h1, .opening-note {
  text-shadow: 0 .08em .33em rgb(22 15 22 / .46);
}
.opening-words h1 {
  max-width: 39rem;
  font-size: clamp(1.65rem, 4.4vw, 4.55rem);
  line-height: 1.04;
}
.opening-words h1 > span, .opening-words h1 > em { display: block; }
.opening-words h1 > em {
  font-size: 1.08em;
  line-height: 1.13;
}
.opening-note {
  max-inline-size: 31ch;
  margin-block-start: clamp(1rem, 3.8svh, 2.35rem);
  font-size: clamp(1rem, 2vw, 1.9rem);
  line-height: 1.3;
}
.opening-note > span { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .is-looping #arrival { min-height: calc(100svh + clamp(13rem, 39svh, 24rem)); }
  .is-looping #arrival .opening-view { position: sticky; top: 0; }
  .has-script .opening-words { opacity: var(--opening-opacity, 1); }
  .has-script .opening-note-lead { opacity: var(--opening-note-lead-opacity, 0); }
  .has-script .opening-note-follow { opacity: var(--opening-note-follow-opacity, 0); }
  .is-looping .works-title { opacity: var(--works-opacity, 1); }
  .is-looping #arrival + .essay-work {
    margin-block-start: calc(-1 * var(--chapter-inset) - clamp(2.25rem, 18svh, 12rem));
  }
}
@media (prefers-reduced-motion: reduce) {
  .loop-echo .opening-note { display: none; }
}
.essay-work, .essay-studio {
  --chapter-inset: max(
    clamp(2.5rem, 5.2vw, 5.5rem),
    calc(var(--studio-nav-top) + var(--studio-header-height) - .75rem)
  );
  align-items: start;
  padding-block-start: var(--chapter-inset);
}
.essay-work {
  z-index: 1;
  justify-items: center;
  min-height: 108svh;
}
.works-list { width: 100%; }
.work-reveal {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(1.75rem, 6vw, 6rem);
  scroll-margin-block-start: calc(var(--studio-nav-top) + var(--studio-header-height) + 1rem);
}
.work-reveal + .work-reveal { margin-top: clamp(2rem, 5.5svh, 4.25rem); }
.chapter-title {
  margin-block-end: clamp(1.65rem, 4.25svh, 2.7rem);
  font-size: clamp(1.65rem, 2.9vw, 2.6rem);
  letter-spacing: .14em;
  font-weight: 650;
  text-align: center;
  text-shadow: 0 .06em .26em rgb(22 15 22 / .56);
}
.work-toggle {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1 / 2 / -1;
  justify-self: center;
  width: min(48%, 35rem);
  padding: 0;
  color: var(--ink);
  border: 0;
  background: var(--paper);
  box-shadow: 0 1.3rem 3rem rgb(20 12 21 / .35);
  transition: opacity 250ms ease;
}
.work-toggle img { width: 100%; }
.jet-windows, .tide-pool { position: absolute; inset: 0; pointer-events: none; }
.jet-windows i {
  position: absolute;
  left: var(--jet-x);
  top: var(--jet-y);
  width: 1.02%;
  height: 1.72%;
  border-radius: 50%;
  background: #e9c89b;
  box-shadow: 0 0 3px 1px rgb(238 192 142 / .45);
  transform: translate(-50%, -50%) rotate(-8deg);
  opacity: 0;
  animation: skim-jet-windows 31s ease-in-out var(--jet-delay) infinite paused;
}
.jet-windows i:nth-child(1) { --jet-x: 49.7%; --jet-y: 48.1%; --jet-delay: .08s; }
.jet-windows i:nth-child(2) { --jet-x: 53.1%; --jet-y: 47.5%; --jet-delay: .36s; }
.jet-windows i:nth-child(3) { --jet-x: 56.6%; --jet-y: 46.9%; --jet-delay: .64s; }
.jet-windows i:nth-child(4) { --jet-x: 60%; --jet-y: 46%; --jet-delay: .92s; }
.jet-windows i:nth-child(5) { --jet-x: 63.6%; --jet-y: 45.4%; --jet-delay: 1.2s; }
.jet-windows i:nth-child(6) { --jet-x: 67%; --jet-y: 44.8%; --jet-delay: 1.48s; }
@keyframes skim-jet-windows {
  0%, 2%, 17%, 100% { opacity: 0; }
  7% { opacity: .87; }
}
.tide-pool {
  clip-path: polygon(17% 68%, 25% 62%, 38% 59%, 58% 57%, 73% 56%, 84% 58%, 71% 61%, 63% 64%, 67% 66%, 76% 68%, 81% 71%, 78% 74%, 66% 77%, 52% 80%, 32% 80%, 23% 78%);
  mask-image: radial-gradient(ellipse 31% 14% at 51% 67%, #000 16%, rgb(0 0 0 / .82) 49%, transparent 98%);
}
.tide-water {
  position: absolute;
  inset: 55% 14% 17% 11%;
  background:
    repeating-linear-gradient(177deg, transparent 0 7px, rgb(255 197 143 / .76) 8px, transparent 10px 13px),
    repeating-linear-gradient(181deg, transparent 0 8px, rgb(38 36 50 / .75) 9px, transparent 12px 18px);
  mask-image: radial-gradient(ellipse 25% 52% at 34% 38%, #000, transparent 95%),
    radial-gradient(ellipse 35% 61% at 60% 66%, #000, transparent 93%);
  opacity: 0;
  animation: break-tide-reflection 29s ease-in-out infinite paused;
}
@keyframes break-tide-reflection {
  0%, 2%, 28%, 57%, 100% { opacity: 0; transform: translateY(2%) scaleY(.82); }
  9% { opacity: .8; transform: translate(1%, -1%) scaleY(1.06); }
  19% { opacity: .38; transform: translate(-1%, -7%) scaleY(1.16); }
  72% { opacity: .54; transform: translate(-2%, -5%) scaleY(1.12); }
}
:is(.work-toggle, .project-study).is-watching :is(.jet-windows i, .tide-water, .study-light) {
  animation-play-state: running;
}
.work-toggle-icon {
  position: absolute;
  right: .75rem;
  bottom: .75rem;
  display: none;
  width: 1.75rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgb(39 27 39 / .45);
  border-radius: 50%;
  background: var(--paper);
}
.work-toggle-icon::before, .work-toggle-icon::after {
  content: "";
  grid-area: 1 / 1;
  width: .7rem;
  height: 1px;
  background: currentColor;
}
.work-toggle-icon::after { transform: rotate(90deg); }
.work-reveal[data-expanded] .work-toggle-icon::after { transform: none; }
.work-toggle:focus-visible { outline-color: var(--paper); }
.work-wing {
  --wing-duration: 340ms;
  --wing-visibility-delay: var(--wing-duration);
  grid-row: 1;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: var(--wing-start);
  transition: transform var(--wing-duration) cubic-bezier(.22, .7, .25, 1),
    opacity var(--wing-duration) ease, visibility 0s var(--wing-visibility-delay),
    display var(--wing-duration) allow-discrete;
}
.work-image { grid-column: 1; --wing-start: translateX(1.25rem); }
.work-notes { grid-column: 2; --wing-start: translateX(-1.25rem); }
.work-reveal[data-expanded] .work-wing {
  --wing-visibility-delay: 0s;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
@media (min-width: 48.001rem) and (hover: hover) and (pointer: fine) {
  .work-reveal[data-expanded] .work-toggle { opacity: 0; pointer-events: none; }
  .work-reveal[data-expanded]:has(.work-toggle:focus-visible) .work-slide-picture {
    outline: 2px solid var(--paper);
    outline-offset: .25rem;
  }
}
.work-notes h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3.1vw, 3.5rem);
  font-weight: 400;
  line-height: 1.08;
  text-wrap: balance;
}
.work-notes p { max-width: 38ch; }
.work-artist { margin-top: .65rem; }
.work-medium, .work-edition, .work-availability {
  font-size: .9rem;
  color: var(--pale);
}
.work-medium, .work-edition { margin-top: .15rem; }
.work-description, .work-bio { margin-top: .8rem; }
.work-explore {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-top: 1rem;
  padding-inline: .95rem;
  border: 1px solid rgb(241 231 215 / .55);
  text-decoration: none;
  font-size: .9rem;
}
.work-explore:hover { background: var(--paper); color: var(--ink); }
.work-availability { margin-top: .5rem; }
.work-availability a { color: var(--paper); text-underline-offset: .2em; }
.work-image img { width: 100%; }
.work-slide-viewport {
  --slide-ratio: 1250 / 938;
  display: grid;
  position: relative;
  touch-action: pan-y pinch-zoom;
}
/* Overlay the states so the tallest caption reserves space for every slide. */
.work-slide-viewport > .work-slide { display: block; grid-area: 1 / 1; }
.work-slide-viewport > .work-slide[hidden] { visibility: hidden; pointer-events: none; }
.work-slide-picture {
  display: block;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: var(--slide-ratio);
}
.work-slide-picture img { height: 100%; object-fit: cover; }
.work-slide-detail {
  position: absolute;
  inset: 0;
}
.work-slide--jet-detail .work-slide-detail { transform: scale(2.25); transform-origin: 58% 47%; }
.work-slide--tide-detail .work-slide-detail { transform: scale(1.62); transform-origin: 52% 67%; }
.work-slide--jet-lit .jet-windows i {
  opacity: .99;
  animation: none;
  background: #ffdcaa;
  box-shadow: 0 0 5px 2px rgb(223 141 66 / .65);
}
.work-slide--tide-ripple .tide-water { opacity: .84; animation: none; }
.work-slideshow .work-slide figcaption {
  min-block-size: 2lh;
  margin: 0;
  padding-block-start: .45rem;
}
.work-slide-controls {
  position: absolute;
  inset: 0 0 auto;
  aspect-ratio: var(--slide-ratio);
  pointer-events: none;
}
.work-slide-controls button {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--paper);
  pointer-events: auto;
}
.work-slide-controls button:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: -3px;
  border-radius: .25rem;
  box-shadow: inset 0 0 0 4px rgb(39 27 39 / .68);
}
.work-slide-arrow {
  position: absolute;
  inset-block-start: 50%;
  width: 2.75rem;
  height: 2.75rem;
  transform: translateY(-50%);
}
.work-slide-arrow[data-slide-step="-1"] { inset-inline-start: .1rem; }
.work-slide-arrow[data-slide-step="1"] { inset-inline-end: .1rem; }
.work-slide-arrow::before, .work-slide-arrow::after { content: ""; grid-area: 1 / 1; }
.work-slide-arrow::before {
  width: 1.65rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgb(39 27 39 / .60);
}
.work-slide-arrow:is(:hover, :focus-visible)::before { background: rgb(39 27 39 / .83); }
.work-slide-arrow::after {
  width: .43rem;
  aspect-ratio: 1;
  border-block-start: 1px solid currentColor;
  border-inline-end: 1px solid currentColor;
}
.work-slide-arrow[data-slide-step="-1"]::after { transform: translateX(1px) rotate(-135deg); }
.work-slide-arrow[data-slide-step="1"]::after { transform: translateX(-1px) rotate(45deg); }
.work-slide-dots {
  position: absolute;
  inset-block-end: .1rem;
  inset-inline: 0;
  display: flex;
  justify-content: center;
}
.work-slide-dot { width: 1.6rem; height: 2.5rem; }
.work-slide-dot::before {
  content: "";
  width: .42rem;
  aspect-ratio: 1;
  border: 1px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgb(39 27 39 / .65);
  background: rgb(39 27 39 / .32);
}
.work-slide-dot[aria-current="true"]::before { background: currentColor; }
.work-explore:focus-visible { outline-color: var(--paper); }
.work-image figcaption { margin-top: .45rem; color: var(--pale); font-size: .875rem; }

body[data-view="project"] { background: #211823; color: var(--paper); }
.project-page {
  --project-top: calc(var(--studio-nav-top) + var(--studio-header-height) + 1.75rem);
  --project-width: min(100%, 64rem, max(30rem, calc((100svh - var(--project-top) - 1.25rem) * 1250 / 938)));
  padding-block: var(--project-top) clamp(3rem, 9svh, 6rem);
}
.project-study, .project-details { width: var(--project-width); margin-inline: auto; }
.project-study { position: relative; }
.project-scene {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1250 / 938;
}
.project-scene img { width: 100%; height: 100%; object-fit: contain; }
.study-fullscreen {
  position: absolute;
  inset: .65rem .65rem auto auto;
  padding-inline: .85rem;
  min-height: 2.75rem;
  border: 1px solid rgb(241 231 215 / .45);
  background: rgb(32 24 35 / .83);
  color: var(--paper);
  font-size: .875rem;
}
.study-fullscreen:hover { background: #211823; }
.study-light {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 72% 18%, rgb(231 156 89 / .47), transparent 65%);
  mix-blend-mode: soft-light;
  opacity: 0;
  pointer-events: none;
  animation: breathe-study-light 79s ease-in-out infinite alternate paused;
}
.project-scene--tide .study-light {
  background: linear-gradient(175deg, rgb(88 115 161 / .72), rgb(151 101 114 / .42) 51%, transparent 92%);
  animation-duration: 113s;
}
@keyframes breathe-study-light {
  0% { opacity: 0; transform: translateX(0); }
  100% { opacity: .65; transform: translateX(-4%) scale(1.12); }
}
.project-details { margin-block-start: clamp(1.5rem, 4svh, 3rem); }
.project-status { margin-block-end: .55rem; color: var(--pale); font-size: .9rem; }
.project-details h1 { font-size: clamp(2.25rem, 6vw, 4.75rem); }
.project-credit { margin-block-start: .65rem; color: var(--pale); }
.project-note { max-width: 60ch; margin-block-start: 1.4rem; }
.project-back { display: inline-flex; align-items: center; min-height: 2.75rem; margin-block-start: 1rem; }
.project-study:is(:fullscreen, .is-immersive) {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: #151219;
}
.project-study.is-immersive { position: fixed; inset: 0; z-index: 10; height: 100dvh; }
.has-immersive-study { overflow: hidden; }
.project-study:is(:fullscreen, .is-immersive) .project-scene {
  width: min(100%, calc(100dvh * 1250 / 938));
}

.essay-studio { min-height: 0; padding-block-end: 0; }
.essay-studio .chapter-title { margin-block-end: clamp(3.25rem, 9svh, 6rem); }
.studio-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr);
  align-items: start;
  column-gap: clamp(2rem, 10vw, 10rem);
}
.studio-statement { max-width: 24ch; font-size: clamp(1.65rem, 2.85vw, 2.95rem); line-height: 1.2; letter-spacing: -.025em; text-wrap: pretty; }
@media (min-width: 48.001rem) {
  .studio-statement {
    position: sticky;
    top: calc(var(--studio-nav-top) + var(--studio-header-height) + 1.25rem);
  }
}
.studio-body { max-width: 38ch; margin-block-start: .32em; font-size: clamp(1rem, 1.6vw, 1.25rem); }
.studio-body p + p { margin-block-start: 1em; }
@media (prefers-reduced-motion: no-preference) {
  .studio-columns.has-reveal > * {
    opacity: 0;
    transform: translateY(clamp(1.45rem, 4.5svh, 2.5rem));
  }
  .studio-columns.has-reveal.is-in-view > * {
    opacity: 1;
    transform: none;
    transition: opacity 650ms ease-out, transform 650ms cubic-bezier(.22, .65, .3, 1);
  }
  .studio-columns.has-reveal.is-in-view .studio-body { transition-delay: 190ms; }
}
.essay-contact {
  min-height: 0;
  scroll-margin-top: 0;
  justify-items: center;
  padding-block-start: max(
    clamp(6rem, 32svh, 20rem),
    calc(var(--studio-nav-top) + var(--studio-header-height))
  );
  padding-block-end: clamp(2.75rem, 7svh, 5rem);
  text-align: center;
}
.essay-contact .chapter-title { margin-block-end: clamp(1.75rem, 11.5svh, 6.5rem); }
.essay-contact p { max-width: 48ch; text-wrap: pretty; }
.contact-email {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-block-start: clamp(1rem, 4.5svh, 2.5rem);
  text-underline-offset: .22em;
}
.contact-privacy {
  margin: clamp(1.5rem, 4.5svh, 2.5rem) auto 0;
  color: var(--pale);
  font-size: .875rem;
}
.landscape-break { min-height: 78svh; }
.loop-passage { min-height: 64svh; }
.loop-runway { min-height: 100svh; }
.loop-echo { min-height: calc(100dvh + 6rem); }
body:has(.painting-essay.is-looping) > .site-footer { display: none; }
.essay-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 42rem) {
  .wind-window { width: 135%; left: -15%; }
  .wind-high { height: 39%; }
  .wind-low { height: 43%; top: 54%; }
  .opening-words h1 { font-size: clamp(1.65rem, 7vw, 2.8rem); }
}
@media (max-width: 35rem) {
  .opening-view {
    --opening-clearance: calc(var(--studio-nav-top) + var(--studio-logo-width) * 845 / 690 + 4rem);
  }
}
@media (max-width: 48rem) {
  .studio-columns { grid-template-columns: 1fr; row-gap: 1.5rem; }
  .studio-body { margin-block-start: 0; }
}
@media (max-width: 48rem), (hover: none), (pointer: coarse) {
  .work-reveal { position: relative; width: min(100%, 34rem); margin-inline: auto; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .work-toggle, .work-image { grid-area: 1 / 1; }
  .work-notes { grid-area: 2 / 1; }
  .work-toggle, .work-wing { align-self: start; }
  .work-toggle { width: 100%; }
  .work-toggle-icon { display: grid; }
  .work-reveal[data-expanded] .work-toggle {
    position: absolute;
    inset: .5rem .5rem auto auto;
    z-index: 2;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
  }
  .work-reveal[data-expanded] .work-toggle > :not(.work-toggle-icon) { display: none; }
  .work-reveal[data-expanded] .work-toggle-icon { inset: 0; margin: auto; }
  .work-slide-picture { cursor: default; }
  .work-reveal .work-wing { --wing-start: translateY(.6rem); }
  .work-reveal:not([data-expanded]) .work-wing { display: none; }
  @starting-style {
    .work-reveal[data-expanded] .work-wing { opacity: 0; transform: var(--wing-start); }
  }
}
@media (max-height: 32rem) {
  .opening-words h1 { font-size: clamp(1.18rem, 7.2svh, 2.3rem); }
  .opening-note { font-size: clamp(1rem, 4.2svh, 1.35rem); }
}
@media (prefers-reduced-motion: reduce) {
  .painting-stage { transition: none; }
  .distant-window { transition: none; }
  .has-sky-clock .celestial-source, .celestial-halo, .celestial-disc,
  .celestial-wash, .lake-light, .has-sky-clock .lake-reflection { transition: none; }
  .reflection-stroke { animation: none; }
  .has-dawn-mist .dawn-mist::before, .jet-windows i, .tide-water, .study-light { animation: none; }
  .work-toggle { transition: opacity 160ms ease; }
  .work-reveal .work-wing {
    --wing-start: none;
    --wing-duration: 160ms;
    transition: opacity var(--wing-duration) ease, visibility 0s var(--wing-visibility-delay),
      display var(--wing-duration) allow-discrete;
  }
}
