/* Stillwater — styles */

@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/montserrat-light-latin.a04fdaaec9f3.woff2") format("woff2");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

:root {
  --ink: #f2ede4;
  --ink-2: rgba(242, 237, 228, 0.74);
  --ink-3: rgba(242, 237, 228, 0.5);
  --ink-4: rgba(242, 237, 228, 0.3);
  --line: rgba(242, 237, 228, 0.11);
  --pad-x: clamp(22px, 4.7vw, 78px);
  --pad-y: clamp(22px, 5.2vh, 56px);
  --detail-nav-height: clamp(60px, calc(var(--pad-y) * .8 + 36.8px), 82px);
  --serif: "EB Garamond", "Cormorant Garamond", "Noto Serif SC", "Songti SC", Georgia, serif;
  --display: "Cormorant Garamond", "EB Garamond", "Noto Serif SC", "Songti SC", Georgia, serif;
  --sans: "Jost", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --cjk: "EB Garamond", "Noto Serif SC", "Songti SC", "STSong", serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --soft: 0 1px 14px rgba(0, 0, 0, 0.28);
  --scene-shade:
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent 26%, transparent 74%, rgba(0, 0, 0, 0.22)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.16), transparent 16%, transparent 82%, rgba(0, 0, 0, 0.26));
  --panel-tint: rgba(0, 0, 0, 0.22);
}

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

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #05080c;
  color: var(--ink);
}

body {
  --day-ui: 0;
  font-family: var(--serif);
  font-feature-settings: "onum" 1, "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

body[data-view="home"], .cursor {
  -webkit-user-select: none;
  user-select: none;
}
body[data-view="home"] a { -webkit-user-drag: none; }

button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  letter-spacing: inherit;
}
button:focus, [tabindex]:focus, a:focus,
button:focus-visible, [tabindex]:focus-visible, a:focus-visible {
  outline: none;
}
button:focus-visible, a:focus-visible { color: var(--ink); }
.pl-slider:focus-visible .knob { transform: scale(1.5); }
a { color: inherit; text-decoration: none; }

::selection { background: rgba(242, 237, 228, 0.2); }

/* ------------------------------------------------------------------ */
/* scene                                                                */
/* ------------------------------------------------------------------ */

#water {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.no-webgl #water { display: none; }
.no-webgl,
.no-webgl .detail-top-scene {
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(120, 150, 180, 0.18), transparent 70%),
    linear-gradient(#0a1119, #05080c);
}

.shade {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--scene-shade);
  transition: opacity 1.2s var(--ease);
}

.cover-loader {
  display: grid;
  position: fixed;
  z-index: 100;
  inset: 0;
  place-items: center;
  background: #000;
  pointer-events: none;
}
.cover-loader[hidden] { display: none; }
.loader-track {
  width: 140px;
  height: 4px;
  overflow: hidden;
  border-radius: 9999px;
  background: rgb(230 232 232 / .32);
}
.loader-progress {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left center;
}

/* ------------------------------------------------------------------ */
/* chrome                                                               */
/* ------------------------------------------------------------------ */

.chrome {
  --ink-2: rgba(242, 237, 228, calc(.74 + .16 * var(--day-ui)));
  --ink-3: rgba(242, 237, 228, calc(.50 + .22 * var(--day-ui)));
  --ink-4: rgba(242, 237, 228, calc(.30 + .16 * var(--day-ui)));
  position: fixed;
  z-index: 5;
  text-shadow:
    0 1px 2px rgba(5, 8, 12, calc(.62 * var(--day-ui))),
    0 calc(1px + 1px * var(--day-ui)) calc(14px - 6px * var(--day-ui)) rgba(0, 0, 0, calc(.28 + .04 * var(--day-ui)));
  transition:
    opacity 1.1s var(--ease) calc(var(--d, 0) * 0.08s),
    filter 1.1s var(--ease) calc(var(--d, 0) * 0.08s),
    transform 1.1s var(--ease-out) calc(var(--d, 0) * 0.08s);
}
body.is-loading .chrome {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(6px);
  transition-delay: 0s;
  pointer-events: none;
}
body.is-loading:not(.is-ready) .chrome { transition: none; }
body.is-ready .chrome {
  transition-delay: calc(0.9s + var(--d, 0) * 0.14s);
}
body:not([data-view="home"]) .chrome {
  opacity: 0;
  filter: blur(6px);
  pointer-events: none;
  transition-delay: 0s;
  transition-duration: 0.7s;
}

.logo {
  left: var(--pad-x);
  top: var(--pad-y);
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.012em;
  color: var(--ink);
}

.tagline {
  right: var(--pad-x);
  top: var(--pad-y);
  width: min(840px, calc(100vw - var(--pad-x) * 2 - 180px));
  font-family: "Montserrat", var(--sans);
  font-size: 14.5px;
  font-weight: 300;
  font-synthesis: none;
  line-height: 1.65;
  letter-spacing: 0;
  color: var(--ink-2);
  text-align: right;
  text-wrap: pretty;
}
.tagline p { margin: 0; }
.tagline p + p {
  max-width: 36.5em;
  margin-top: 0.7em;
  margin-left: auto;
}

.side {
  left: var(--pad-x);
  top: 42.4%;
}

.clock {
  display: inline-flex;
  align-items: center;
  gap: 15.5px;
  font-size: 20.5px;
  color: var(--ink-2);
  transition: color 0.4s var(--ease);
  margin-bottom: 42px;
}
.clock:hover { color: var(--ink); }
.clock #clockText { position: relative; }
.clock #clockText::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--ease-out), opacity 0.3s var(--ease);
  pointer-events: none;
}
.clock:hover #clockText::after,
.clock:focus-visible #clockText::after { opacity: 0.6; transform: scaleX(1); }
.clock-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linecap: round;
  opacity: 0.9;
  transition: transform 0.8s var(--ease-out);
}
.clock:hover .clock-icon { transform: rotate(-24deg); }

.nav {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav li + li { margin-top: 23px; }

.link {
  position: relative;
  font-size: 27px;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.003em;
  transition: color 0.4s var(--ease), transform 0.6s var(--ease-out);
}
.link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.7s var(--ease-out);
}
.link:hover::after { transform: scaleX(1); transform-origin: left; }
.link:hover { transform: translateX(3px); }

/* Feedback appears only if opening the on-demand catalog takes a moment. */
.portfolio-load-status { position: fixed; z-index: 30; left: var(--pad-x); bottom: var(--pad-y); max-width: calc(100vw - 2 * var(--pad-x)); padding: 12px 16px; border: 1px solid var(--line); border-radius: 4px; background: #101319; color: var(--ink-2); font-family: var(--sans); font-size: 13px; line-height: 1.5; }
.portfolio-load-status[hidden] { display: none; }
.portfolio-load-status button { margin-left: 12px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- player ---------------- */

.player {
  right: var(--pad-x);
  top: 38.6%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  color: var(--ink);
  width: 224px;
}

.pl-title-wrap {
  /* Lower the English title 18px within the original title block. */
  padding-block: 18px 9px;
  transition: opacity 0.5s var(--ease), filter 0.5s var(--ease), transform 0.6s var(--ease-out);
}
.pl-title-wrap.swap { opacity: 0; filter: blur(4px); transform: translateY(-4px); }

.pl-title {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 29px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.pl-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 186px;
  gap: 0;
  margin-top: 34px;
}
.pl-controls button,
.pl-volume button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--ink-2);
  transition: color 0.3s var(--ease), transform 0.4s var(--ease-out);
}
.pl-controls button:hover,
.pl-volume button:hover { color: var(--ink); }
.pl-controls button:active { transform: scale(0.88); }
.pl-controls svg,
.pl-volume svg {
  width: 13.5px;
  height: 13.5px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.pl-controls .fill,
.pl-volume .fill { fill: currentColor; stroke: none; }
.pl-play { color: var(--ink) !important; }
.pl-controls .pl-play { width: 40px; height: 40px; }
.pl-play svg { width: 22px; height: 22px; }
.pl-play .i-pause { display: none; }
.is-playing .pl-play .i-play { display: none; }
.is-playing .pl-play .i-pause { display: block; }

.pl-volume {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}
.pl-volume svg { width: 16px; }
.clock-icon, .pl-controls svg, .pl-volume svg, .pl-slider {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, calc(.45 * var(--day-ui))));
}
.is-muted .pl-volume .wave1,
.is-muted .pl-volume .wave2 { opacity: 0.15; }

.pl-slider {
  position: relative;
  width: 148px;
  height: 22px;
  cursor: pointer;
  touch-action: none;
}
.pl-slider .track,
.pl-slider .fillbar {
  position: absolute;
  left: 0;
  top: 50%;
  height: 1px;
  background: var(--ink-4);
  width: 100%;
}
.pl-slider .fillbar { background: var(--ink-2); width: 72%; }
.pl-slider .knob {
  position: absolute;
  top: 50%;
  left: 72%;
  width: 7px;
  height: 7px;
  margin: -3px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
  transition: transform 0.3s var(--ease-out);
}
.pl-slider:hover .knob { transform: scale(1.5); }

.pl-time {
  margin-top: 21px;
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.24em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-right: -0.24em;
}
.pl-time .slash { margin: 0 0.25em; opacity: 0.7; }

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

.contact-footer {
  left: var(--pad-x);
  right: var(--pad-x);
  bottom: max(calc(var(--pad-y) - 4px), calc(env(safe-area-inset-bottom) + 16px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: baseline;
  gap: 20px;
  margin: 0;
  font-family: "Montserrat", var(--sans);
  font-style: normal;
  font-size: 16px;
  font-weight: 300;
  font-synthesis: none;
  line-height: 1.45;
  font-feature-settings: "onum" 0, "lnum" 1, "kern" 1, "liga" 1;
  color: rgba(242, 237, 228, calc(.84 + .12 * var(--day-ui)));
  white-space: nowrap;
}
.contact-footer a { justify-self: start; transition: color 0.4s var(--ease); }
.contact-footer .footer-mail { grid-column: 2; justify-self: center; }
.contact-footer a:hover { color: var(--ink); }

.footer-globe {
  position: absolute;
  right: 0;
  top: 50%;
  width: 48px;
  height: 26px;
  transform: translateY(-50%);
  color: #fff8ee;
  opacity: 0.60;
  pointer-events: none;
}

.kicker {
  margin: 0;
  font-family: var(--sans);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-right: -0.5em;
}

/* ------------------------------------------------------------------ */
/* overlays                                                             */
/* ------------------------------------------------------------------ */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.9s var(--ease), visibility 0s linear 0.9s;
}
.overlay.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.9s var(--ease), visibility 0s;
}

/* staggered reveal of children */
.r {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(6px);
  transition:
    opacity 0.5s var(--ease),
    transform 0.6s var(--ease),
    filter 0.5s var(--ease);
}
.timeov.is-open .r,
#aboutView.is-open .r,
.is-open .detail.is-shown .r,
.is-open .works-list.is-shown .r {
  opacity: 1;
  transform: none;
  filter: blur(0);
  transition:
    opacity 1.1s var(--ease) calc(0.25s + var(--i, 0) * 0.08s),
    transform 1.3s var(--ease-out) calc(0.25s + var(--i, 0) * 0.08s),
    filter 1.1s var(--ease) calc(0.25s + var(--i, 0) * 0.08s);
}

.close {
  position: fixed;
  z-index: 20;
  right: calc(var(--pad-x) - 10px);
  top: calc(var(--pad-y) - 6px);
  width: 34px;
  height: 34px;
  opacity: 0;
  visibility: hidden;
  transform: rotate(-45deg);
  transition: opacity 0.6s var(--ease), transform 0.9s var(--ease-out), visibility 0s linear 0.6s;
}
body:not([data-view="home"]) .close {
  opacity: 0.75;
  visibility: visible;
  transform: none;
  transition: opacity 0.8s var(--ease) 0.35s, transform 1s var(--ease-out) 0.35s, visibility 0s;
}
.close:hover { opacity: 1 !important; }
body[data-view="detail"] .close {
  top: calc(var(--detail-nav-height) / 2 - 17px);
}
.close span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 1px;
  margin-left: -6.5px;
  background: var(--ink);
  transform: rotate(45deg);
  transition: transform 0.6s var(--ease-out);
}
.close span + span { transform: rotate(-45deg); }
.close:hover span { transform: rotate(135deg); }
.close:hover span + span { transform: rotate(45deg); }

/* ---------------- chase the light ---------------- */

.timeov {
  display: grid;
  place-items: center;
  background: radial-gradient(50% 55% at 50% 48%, rgba(0, 0, 0, 0.22), transparent 75%);
  user-select: none;
  -webkit-user-select: none;
}
body[data-view="time"] .shade { opacity: 0.6; }

.timeov-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-shadow: var(--soft);
  transform: translateY(-1vh);
}
.timeov .kicker { color: var(--ink-2); }

.timeov-title {
  margin: 16px 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 2.6vw, 38px);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.timeov-title em { font-style: italic; }

.wheel {
  position: relative;
  width: 220px;
  height: 300px;
  margin: 14px 0 34px;
  cursor: grab;
  touch-action: none;
}
.wheel.is-dragging { cursor: grabbing; }
.wheel canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.wheel-label {
  position: absolute;
  right: calc(100% - 22px);
  top: 50%;
  transform: translateY(-62%);
  text-align: right;
  white-space: nowrap;
  pointer-events: none;
}
.wheel-time {
  font-family: var(--display);
  font-size: clamp(26px, 2.15vw, 31px);
  font-weight: 400;
  line-height: 1;
  font-feature-settings: "onum" 1, "pnum" 1;
}
.wheel-mood {
  margin-top: 9px;
  font-family: var(--display);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-2);
  transition: opacity 0.4s var(--ease);
}
.wheel-now {
  position: absolute;
  left: calc(100% - 26px);
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-style: italic;
  font-size: 17px;
  color: var(--ink-2);
  white-space: nowrap;
  pointer-events: none;
  transition: color 0.4s var(--ease);
}
.wheel-now .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}
.wheel-now.is-away { pointer-events: auto; }
.wheel-now.is-away:hover { color: var(--ink); }

.presets {
  display: flex;
  gap: clamp(22px, 2.4vw, 36px);
}
.presets button {
  font-family: var(--display);
  font-style: italic;
  font-size: 17px;
  color: var(--ink-3);
  transition: color 0.5s var(--ease);
  position: relative;
}
.presets button:hover,
.presets button.is-active { color: var(--ink); }
.presets button::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease-out);
}
.presets button.is-active::after { opacity: 0.8; transform: none; }

.hint {
  margin: 30px 0 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-4);
}

/* ---------------- frosted panels ---------------- */

/* one shared frosted layer, so moving between panels never un-blurs the lake */
.frost {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  -webkit-backdrop-filter: blur(48px);
  backdrop-filter: blur(48px);
  background: var(--panel-tint);
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s var(--ease), visibility 0s linear 1s;
}
body[data-view="about"] .frost,
body[data-view="works"] .frost,
body[data-view="detail"] .frost {
  opacity: 1;
  visibility: visible;
  transition: opacity 1s var(--ease), visibility 0s;
}

.panel {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.panel::-webkit-scrollbar { display: none; }

.panel-inner {
  position: relative;
  width: min(640px, calc(100vw - 2 * var(--pad-x)));
  margin: 0 auto;
  min-height: 100%;
  padding: max(12vh, 90px) 0 12vh;
}

.cjk {
  font-family: var(--cjk);
  font-feature-settings: "kern" 1;
}

/* Keep the unopened composition out of layout and font fetching. Mount before its existing reveal. */
#aboutView:not(.is-mounted) { display: none; }

/* about */
@font-face {
  font-family: "Jiah About Clash Display";
  src: url("assets/about/clash-display-medium.c21b168f9054.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jiah About Montserrat";
  src: url("assets/about/montserrat-regular.e77389eb599a.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* Match the source's local serif stack without inheriting this site's web font. */
@font-face {
  font-family: "Jiah About Source Serif";
  src: local("Noto Serif SC"), local("Noto Serif SC Regular"), local("NotoSerifSC-Regular");
  font-weight: 400;
}
.about {
  --about-unit: min(1vw, 1.6dvh);
  --about-art-shift: calc(var(--about-unit) * 5);
  /* Move the composition together while preserving space beside the experience. */
  --about-group-shift: max(0px, min(calc(var(--about-unit) * 4), calc(50vw - var(--about-unit) * 45.555556 - max(32px, 2vw))));
  --about-content-left: 4.444%;
  --about-hair-light-mask:
    radial-gradient(ellipse 7% 4% at 21% 10%, rgb(0 0 0 / .48), rgb(0 0 0 / .18) 30%, transparent 70%),
    radial-gradient(ellipse 6% 3% at 32% 5%, rgb(0 0 0 / .62), rgb(0 0 0 / .22) 30%, transparent 70%),
    radial-gradient(ellipse 5% 2.5% at 43% 2.5%, rgb(0 0 0 / .4), rgb(0 0 0 / .15) 30%, transparent 68%),
    radial-gradient(ellipse 4% 3% at 15% 20%, rgb(0 0 0 / .26), rgb(0 0 0 / .09) 30%, transparent 68%);
  --about-rim-mask:
    radial-gradient(ellipse 11% 8% at 14.5% 56.5%, rgb(0 0 0 / .65), transparent 76%),
    radial-gradient(ellipse 18% 12% at 30% 77%, rgb(0 0 0 / .24), transparent 76%);
  width: 100%;
  height: max(100dvh, 760px);
  min-height: 760px;
  margin: 0;
  padding: 0;
  isolation: isolate;
  color: #fff;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 400;
  font-feature-settings: "kern" 1;
  text-align: left;
}
.about-foreground { position: absolute; inset: 0; isolation: isolate; }
.about-portrait {
  position: absolute;
  z-index: -1;
  left: calc(50% - var(--about-unit) * 25.208333 + var(--about-art-shift) + var(--about-group-shift));
  top: calc(50% - var(--about-unit) * 24.513889);
  width: calc(var(--about-unit) * 53.194444);
  height: calc(var(--about-unit) * 55.763889);
  isolation: isolate;
  pointer-events: none;
}
.about-lighting-defs { position: absolute; overflow: hidden; pointer-events: none; }
.about-portrait-layer { position: absolute; inset: 0; isolation: isolate; }
.about-portrait-layer > img, .about-portrait-soft-content > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.about-portrait-source { position: absolute; inset: 0; isolation: isolate; }
.about-portrait-source > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
/* Complementary masks replace only the crown, above the original glasses.
   Add premultiplied layers so the feather retains the source's 60% alpha. */
.about-source-original {
  -webkit-mask-image: linear-gradient(transparent 16%, #000 23%);
  mask-image: linear-gradient(transparent 16%, #000 23%);
}
.about-source-hair {
  opacity: .6;
  -webkit-mask-image: linear-gradient(#000 16%, transparent 23%);
  mask-image: linear-gradient(#000 16%, transparent 23%);
  mix-blend-mode: plus-lighter;
}
/* Preserve dark hair texture instead of clipping it with a contrast boost. */
.about-portrait-base { filter: grayscale(1) brightness(.56); }
.about-portrait-rim {
  filter: url("#about-rim-light");
  -webkit-mask-image: var(--about-rim-mask);
  mask-image: var(--about-rim-mask);
  mix-blend-mode: screen;
}
/* Unequal, separated patches pick up individual photographic strands. */
.about-portrait-hair-light {
  filter: url("#about-hair-light");
  opacity: .6;
  -webkit-mask-image: var(--about-hair-light-mask);
  mask-image: var(--about-hair-light-mask);
  mix-blend-mode: screen;
}
.about-portrait-glass {
  filter: url("#about-glass-light");
  -webkit-mask-image: radial-gradient(ellipse 15% 10% at 21.5% 29%, #000 20%, rgb(0 0 0 / .75) 44%, transparent 78%);
  mask-image: radial-gradient(ellipse 15% 10% at 21.5% 29%, #000 20%, rgb(0 0 0 / .75) 44%, transparent 78%);
  mix-blend-mode: screen;
}
.about-portrait-sharp {
  -webkit-mask-image: linear-gradient(90deg, #000 35.8355%, rgb(0 0 0 / .9772) 39.6867%, rgb(0 0 0 / .8413) 43.5379%, rgb(0 0 0 / .5) 47.389%, rgb(0 0 0 / .1587) 51.2402%, rgb(0 0 0 / .0228) 55.0914%, transparent 58.9426%);
  mask-image: linear-gradient(90deg, #000 35.8355%, rgb(0 0 0 / .9772) 39.6867%, rgb(0 0 0 / .8413) 43.5379%, rgb(0 0 0 / .5) 47.389%, rgb(0 0 0 / .1587) 51.2402%, rgb(0 0 0 / .0228) 55.0914%, transparent 58.9426%);
}
.about-portrait .about-portrait-soft {
  position: absolute;
  inset: 0;
  filter: blur(calc(var(--about-unit) * 4.03125));
  mix-blend-mode: plus-lighter;
}
/* Mask the source before blurring so the feather extends past the image bounds. */
.about-portrait-soft-content {
  position: absolute;
  inset: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 35.8355%, rgb(0 0 0 / .0228) 39.6867%, rgb(0 0 0 / .1587) 43.5379%, rgb(0 0 0 / .5) 47.389%, rgb(0 0 0 / .8413) 51.2402%, rgb(0 0 0 / .9772) 55.0914%, #000 58.9426%);
  mask-image: linear-gradient(90deg, transparent 35.8355%, rgb(0 0 0 / .0228) 39.6867%, rgb(0 0 0 / .1587) 43.5379%, rgb(0 0 0 / .5) 47.389%, rgb(0 0 0 / .8413) 51.2402%, rgb(0 0 0 / .9772) 55.0914%, #000 58.9426%);
}
.about-signature-position {
  position: absolute;
  z-index: 2;
  left: calc(50% - var(--about-unit) * 39.583333 + var(--about-art-shift) + var(--about-group-shift));
  top: calc(50% - var(--about-unit) * 18.75);
  width: calc(var(--about-unit) * 25);
  pointer-events: none;
}
.about-signature { display: block; width: 100%; height: auto; overflow: visible; transform-origin: 50% 50%; }
.about-signature path { opacity: 0; stroke-dasharray: 1; stroke-dashoffset: 1; }
#aboutView.is-open .about-signature path {
  animation: about-signature-write var(--write-duration, .5s) var(--write-ease, linear) var(--write-start, 0s) forwards;
}
@keyframes about-signature-write {
  from { opacity: 1; stroke-dashoffset: 1; }
  to { opacity: 1; stroke-dashoffset: 0; }
}
.about-intro {
  position: absolute;
  z-index: 1;
  left: calc(var(--about-content-left) + var(--about-group-shift));
  top: calc(50% - var(--about-unit) * 2.0139);
  width: calc(var(--about-unit) * 28.472222);
}
.about-heading { position: relative; display: flow-root; }
.about-mark {
  position: absolute;
  left: calc(var(--about-unit) * -.5903);
  top: calc(var(--about-unit) * .1389);
  width: calc(var(--about-unit) * 8.4722);
  height: calc(var(--about-unit) * 8.4722);
  opacity: .8;
  -webkit-mask: url("assets/about/seal-mask.9b7af92b5301.svg") calc(var(--about-unit) * .0347) calc(var(--about-unit) * -.1389) / calc(var(--about-unit) * 8.8194) calc(var(--about-unit) * 8.1944) no-repeat;
  mask: url("assets/about/seal-mask.9b7af92b5301.svg") calc(var(--about-unit) * .0347) calc(var(--about-unit) * -.1389) / calc(var(--about-unit) * 8.8194) calc(var(--about-unit) * 8.1944) no-repeat;
}
.about-mark-artwork { position: absolute; left: 5.77765%; top: 5.83339%; width: 88.33334%; height: 88.33334%; }
.about-mark-ring {
  display: block;
  width: 100%;
  height: 100%;
  -webkit-mask-image: radial-gradient(circle, transparent 39%, #000 40%);
  mask-image: radial-gradient(circle, transparent 39%, #000 40%);
  transform-origin: 50% 50%;
  animation: about-mark-orbit 42s linear infinite paused;
}
#aboutView.is-open .about-mark-ring { animation-play-state: running; }
.about-mark-star { position: absolute; left: 37.421705%; top: 24.945387%; width: 25.157233%; height: 25.157233%; }
@keyframes about-mark-orbit { to { transform: rotate(360deg); } }
.about-heading h2 {
  margin: calc(var(--about-unit) * 4.7222) 0 0;
  font-family: "Jiah About Clash Display", Helvetica, sans-serif;
  font-size: calc(var(--about-unit) * 4.4444);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: .005em;
  white-space: nowrap;
}
.about-divider { display: block; width: 100%; height: 1px; margin-top: calc(var(--about-unit) * .9028); }
.about-profile { margin-top: calc(var(--about-unit) * 2.3611); font-weight: 400; }
.about-profile p, .about-experience p, .about-experience h3 { margin: 0; font-weight: 400; }
.about-identity { color: rgb(255 255 255 / 93%); font-size: clamp(13px, calc(var(--about-unit) * .972222), 14px); line-height: 1.857143; }
.about-name { font-size: clamp(18px, calc(var(--about-unit) * 1.388889), 20px); font-weight: 400; }
.about-profile .about-biography { margin-top: calc(var(--about-unit) * .833333); color: rgb(255 255 255 / 70%); font-size: clamp(13px, calc(var(--about-unit) * .972222), 14px); line-height: 1.714286; }
.about-experience {
  --about-experience-top-space: calc(var(--about-unit) * 1.736111);
  position: absolute;
  z-index: 1;
  left: calc(50% + var(--about-unit) * 6.666667 + var(--about-group-shift));
  top: calc(50% - var(--about-unit) * 20.555556);
  width: calc(var(--about-unit) * 38.888889);
  display: flex;
  flex-direction: column;
  gap: calc(var(--about-unit) * 3.055556);
  margin: 0;
  padding: var(--about-experience-top-space) 0 0;
  list-style: none;
  border-top: 1px solid transparent;
  font-weight: 400;
  letter-spacing: .025em;
}
.about-experience > li { display: flow-root; }
.about-experience-row { position: relative; display: grid; grid-template-columns: calc(var(--about-unit) * 6.111111) minmax(0, 1fr); column-gap: calc(var(--about-unit) * 1.944444); }
.about-experience > li:first-child > .about-experience-row::before { content: ""; position: absolute; left: 0; right: 0; top: calc(-1px - var(--about-experience-top-space)); height: 1px; background: rgb(255 255 255 / 14%); pointer-events: none; }
.about-period {
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--about-unit) * .555556);
  font-family: "Jiah About Montserrat", Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(10px, calc(var(--about-unit) * .833333), 12px);
  line-height: 2;
  font-variant-numeric: lining-nums tabular-nums;
  color: rgb(255 255 255 / 55%);
  white-space: nowrap;
}
.about-experience-content { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: calc(var(--about-unit) * 1.111111); }
.about-experience-heading { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: calc(var(--about-unit) * 1.111111); }
.about-experience h3 { font-family: "Jiah About Source Serif", "Songti SC", SimSun, serif; font-size: clamp(18px, calc(var(--about-unit) * 1.944444), 28px); line-height: 1.5; letter-spacing: .6px; color: rgb(255 255 255 / 96%); }
.about-job { flex-shrink: 0; font-size: clamp(10px, calc(var(--about-unit) * .833333), 12px); line-height: 1.9; color: rgb(255 255 255 / 50%); text-align: right; }
.about-experience-content .about-description { grid-column: 1 / -1; margin-top: calc(var(--about-unit) * .972222); color: rgb(255 255 255 / 70%); font-size: clamp(11px, calc(var(--about-unit) * .972222), 14px); line-height: 1.928571; overflow-wrap: break-word; }
.about-early-experience { padding-top: calc(var(--about-unit) * 1.25); border-top: 1px solid rgb(255 255 255 / 14%); }
.about-early-experience .about-period { padding-top: 2px; color: rgb(255 255 255 / 44%); }
.about-early-experience h3 { font-family: inherit; font-size: clamp(11px, calc(var(--about-unit) * .902778), 13px); line-height: 1.692308; letter-spacing: inherit; color: rgb(255 255 255 / 54%); }
.about-early-experience .about-description { margin-top: calc(var(--about-unit) * .555556); font-size: clamp(11px, calc(var(--about-unit) * .902778), 13px); line-height: 1.846154; color: rgb(255 255 255 / 66%); }
.about .about-work-link { position: absolute; z-index: 2; right: var(--about-content-left); bottom: max(44px, 5.2vh); margin: 0; font-family: var(--display); text-align: right; }
.about .about-work-link:focus-visible { outline: 1px solid rgb(255 255 255 / 80%); outline-offset: 6px; }

@media (max-width: 760px), (max-width: 1024px) and (max-height: 500px) and (pointer: coarse) {
  .about {
    --about-group-shift: 0px;
    --about-art-height: clamp(160px, min(82vw, calc(100svh - 260px)), 400px);
    height: auto;
    min-height: 100%;
    padding: max(90px, calc(var(--pad-y) + 48px)) max(20px, 4.444vw) 72px;
  }
  .about-foreground { position: relative; inset: auto; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--about-art-height) auto auto; width: min(100%, 640px); margin-inline: auto; }
  .about-portrait { position: relative; inset: auto; z-index: 0; grid-area: 1 / 1; align-self: start; justify-self: end; width: min(100%, calc(var(--about-art-height) * 766 / 803)); height: auto; aspect-ratio: 766 / 803; }
  .about-portrait .about-portrait-soft { filter: blur(clamp(16px, 5vw, 30px)); }
  .about-signature-position { position: relative; inset: auto; grid-area: 1 / 1; align-self: end; justify-self: start; width: clamp(152px, 44vw, 220px); max-width: calc(100% - 16px); margin: 0 0 16px 8px; }
  .about-intro { position: relative; inset: auto; grid-row: 2; min-width: 0; width: 100%; margin-top: 24px; }
  .about-heading { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; column-gap: 14px; }
  .about-mark { position: relative; inset: auto; grid-area: 1 / 1; width: 64px; height: 64px; -webkit-mask-position: 0 -1px; mask-position: 0 -1px; -webkit-mask-size: 66.65px 61.91px; mask-size: 66.65px 61.91px; }
  .about-heading h2 { grid-area: 1 / 2; min-width: 0; margin: 0; padding: 0; font-size: clamp(32px, 8.4vw, 48px); line-height: 1.2; }
  .about-divider { grid-column: 1 / -1; width: 100%; margin-top: 20px; }
  .about-profile { margin-top: 24px; }
  .about-identity { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 2px; font-size: 14px; }
  .about-name { font-size: 20px; }
  .about-profile .about-biography { margin-top: 12px; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
  .about-experience { --about-experience-top-space: 24px; position: relative; inset: auto; grid-row: 3; min-width: 0; width: 100%; margin-top: 40px; padding-top: var(--about-experience-top-space); gap: 32px; }
  .about-experience-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .about-period { flex-direction: row; flex-wrap: wrap; gap: 4px; padding: 0; font-size: 11px; }
  .about-experience-content { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; }
  .about-experience-heading { width: 100%; flex-wrap: wrap; justify-content: flex-start; column-gap: 12px; row-gap: 4px; }
  .about-experience h3 { flex: 1 1 auto; min-width: 0; font-size: clamp(22px, 5.7vw, 26px); line-height: 1.4; }
  .about-job { flex: 0 1 auto; max-width: 100%; font-size: 12px; line-height: 1.6; text-align: left; overflow-wrap: anywhere; }
  .about-experience-content .about-description { flex: 0 0 100%; margin-top: 10px; font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; }
  .about-early-experience { padding-top: 24px; }
  .about-early-experience h3 { font-size: 13px; }
  .about-early-experience .about-description { font-size: 13px; }
  .about .about-work-link { position: relative; inset: auto; grid-row: 4; justify-self: end; display: table; margin-top: 40px; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #aboutView.is-open .about-signature path { animation: none; opacity: 1; stroke-dashoffset: 0; }
  .about-mark-ring { animation: none; }
}

.arrow-link {
  position: relative;
  font-size: 16px;
  padding-bottom: 9px;
  color: var(--ink);
}
.arrow-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ink-4);
  transition: background 0.4s var(--ease);
}
.arrow-link:hover::after { background: var(--ink-2); }
.arrow-link .arr {
  display: inline-block;
  margin-left: 10px;
  transition: transform 0.6s var(--ease-out);
}
.arrow-link:hover .arr { transform: translateX(5px); }

/* works list */
.works { display: grid; width: 100%; }
.works > * { grid-area: 1 / 1; }
/* Mount before revealing, and retire only after the original fade finishes. */
.works > :not(.is-mounted) { display: none; }
.works-list { width: min(640px, calc(100vw - 2 * var(--pad-x))); margin-inline: auto; }
.detail { width: 100%; }
.works > .is-leaving {
  position: absolute;
  inset-inline: 0;
  top: calc(-1 * var(--work-exit-scroll, 0px));
  max-height: calc(100dvh - max(12vh, 90px) + var(--work-exit-height, 0px));
  overflow: hidden;
  pointer-events: none;
}

.works-list,
.detail {
  transition: opacity 0.6s var(--ease), visibility 0s linear 0.6s;
  visibility: hidden;
  opacity: 0;
}
.works-list.is-shown,
.detail.is-shown {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.6s var(--ease), visibility 0s;
}

.works-title {
  margin: 22px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 3.6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.works-title em { font-style: italic; letter-spacing: -0.025em; }
.works-list .rows { margin-top: 44px; }
.works-sub {
  margin: 18px 0 44px;
  font-family: var(--display);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-3);
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.rows li { border-bottom: 1px solid var(--line); }

.row {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 30px 82px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 0 18px;
  padding: 20px 6px 20px 0;
  text-align: left;
  transition: background 0.6s var(--ease);
}
.row::before {
  content: "";
  position: absolute;
  inset: 0 -18px;
  background: linear-gradient(90deg, rgba(242, 237, 228, 0.035), rgba(242, 237, 228, 0.01));
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  pointer-events: none;
}
.row:hover::before,
.row:focus-visible::before { opacity: 1; }
.row .num {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--ink-4);
}
.row .thumb {
  position: relative;
  width: 82px;
  height: 62px;
  overflow: hidden;
  border-radius: 1px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 10px 26px rgba(0, 0, 0, 0.35);
}
.row .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; background: #090909; }
.row[data-project="onion-app"] .thumb img {
  background: radial-gradient(ellipse at 90% 0%, #130726, transparent 58%), linear-gradient(180deg, #000 0%, #000 48%, #210568 72%, #2631d3 100%);
}
.image-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; width: 100%; height: 100%; color: var(--ink-4); background: rgb(255 255 255 / 2%); }
.image-placeholder svg { width: 30px; height: 30px; flex: 0 0 auto; }
.thumb .image-placeholder svg { width: 22px; height: 22px; }
.row .thumb .image-placeholder { transition: background .6s var(--ease); }
.row:hover .thumb .image-placeholder { background: rgb(255 255 255 / 5%); }
.row .meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.7s var(--ease-out);
}
.row:hover .meta { transform: translateX(4px); }
.row .name {
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.row .cat {
  font-family: var(--sans);
  font-size: 7.5px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.row .go {
  justify-self: end;
  font-size: 15px;
  color: var(--ink-2);
  transition: transform 0.7s var(--ease-out), color 0.4s var(--ease);
}
.row:hover .go { transform: translateX(5px); color: var(--ink); }

.works-note {
  margin: 30px 0 0;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-4);
}

/* detail */
.detail-top-mask {
  position: fixed;
  z-index: 10;
  inset: 0 0 auto;
  height: var(--detail-nav-height);
  overflow: hidden;
  pointer-events: none;
  background: transparent;
  opacity: 0;
  -webkit-backdrop-filter: blur(42px);
  backdrop-filter: blur(42px);
  transition: opacity .35s var(--ease);
}
.detail-top-scene {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100vw;
  height: 100dvh;
  filter: blur(48px);
  opacity: 0;
}
.detail-top-mask.has-scene .detail-top-scene,
.no-webgl .detail-top-scene { opacity: .9; }
.detail-top-scene canvas { display: block; width: 100%; height: 100%; }
.no-webgl .detail-top-scene canvas { display: none; }
.detail-top-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--panel-tint);
  background-image: var(--scene-shade);
}
.detail:has(.back.is-project-title) .detail-top-mask { opacity: 1; }
.detail > .detail-title,
.detail > .project-intro,
.detail > .project-media {
  width: min(calc(100% - 96px), 1000px);
  margin-inline: auto;
}
.back {
  position: fixed;
  z-index: 20;
  left: calc(var(--pad-x) - 10px);
  top: calc(var(--detail-nav-height) / 2 - 17px);
  display: flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding-left: 12px;
  font-size: 16px;
  color: var(--ink-2);
  transition: color 0.4s var(--ease);
}
.back:hover { color: var(--ink); }
.detail .back.r,
.is-open .detail.is-shown .back.r { filter: none; }
.back-labels { display: grid; max-width: min(320px, calc(100vw - 2 * var(--pad-x) - 96px)); overflow: hidden; line-height: 1.35; text-align: left; }
.back-labels > span {
  grid-area: 1 / 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: opacity .35s var(--ease), transform .45s var(--ease-out);
}
.back-label-title { opacity: 0; transform: translateY(3px); }
.back.is-project-title .back-label-all { opacity: 0; transform: translateY(-3px); }
.back.is-project-title .back-label-title { opacity: 1; transform: none; }
.detail-title {
  margin: 18px 0 30px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 3.8vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.project-intro {
  margin: 0 0 36px;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
.project-intro p { margin: 0 0 14px; }
.detail.is-collection > .detail-title,
.detail > .project-options {
  width: min(640px, calc(100vw - 2 * var(--pad-x)));
  margin-inline: auto;
}
.project-options { margin-top: 36px; }
.project-options .row { grid-template-columns: 30px minmax(0, 1fr) 30px; padding-block: 28px; }
.project-options[hidden], .project-media[hidden] { display: none; }
.project-media { display: grid; gap: 32px; }
.work-media { width: 100%; margin: 0; border: 1px solid var(--line); border-radius: 1px; overflow: hidden; }
.work-media.has-artwork { position: relative; border: 0; border-radius: 0; background: #090909; }
.work-media.r { filter: none; }
.is-open .detail.is-shown .work-media.r { filter: none; }
.work-media img { display: block; width: 100%; height: auto; opacity: 0; transition: opacity .6s var(--ease); }
.work-media img.is-ready { opacity: 1; }
.project-media.is-progressive .work-media img { transition-duration: .18s; }
.work-media.has-preview { position: relative; }
.work-media .media-preview { position: absolute; inset: 0; pointer-events: none; }
.work-media .media-artwork { position: relative; }
.work-media.animation-ready .media-preview { opacity: 0; transition-delay: .18s; }
.work-media video { display: block; width: 100%; height: auto; }
.detail > .project-media.is-portrait-pair {
  width: min(calc(100% - 96px), calc(68dvh * .925 + 32px), 780px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
.portrait-video-card { min-width: 0; }
.portrait-video-card.r,
.is-open .detail.is-shown .portrait-video-card.r { filter: none; }
.portrait-video-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 14px;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-2);
}
.portrait-video-index { font: 10px var(--sans); letter-spacing: .12em; color: var(--ink-4); }
.work-media .media-error { display: flex; height: 100%; min-height: 180px; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--ink-2); font-family: var(--sans); font-size: 13px; }
.media-error button { padding: 8px 16px; border: 1px solid var(--line); }
.placeholder-label { padding-inline: 18px; font-family: var(--sans); font-size: 12px; line-height: 1.7; letter-spacing: .04em; text-align: center; }

/* Native motion gallery: original media, complete frames, quiet shared geometry. */
.motion-gallery { gap: 30px; }
.motion-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; padding: 4px 0 16px; border-bottom: 1px solid var(--line); }
.motion-nav button { color: var(--ink-3); font: 13px/1.6 var(--sans); letter-spacing: .02em; text-align: left; padding-block: 5px; }
.motion-nav button:hover, .motion-nav button:focus-visible { color: var(--ink); }
.motion-section { min-width: 0; scroll-margin-top: calc(var(--detail-nav-height) + 24px); }
.motion-section-title { display: flex; align-items: baseline; gap: 14px; margin: 0 0 18px; color: var(--ink-2); font: 400 20px/1.5 var(--serif); }
.motion-section-title span { color: var(--ink-4); font: 11px/1.5 var(--sans); letter-spacing: .1em; }
.motion-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
.motion-card { min-width: 0; margin: 0; }
.motion-stage.work-media { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; background: #101418; border: 1px solid var(--line); border-radius: 2px; }
.motion-stage .motion-poster, .motion-stage .motion-media { position: absolute; inset: 0; display: block; margin: auto; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; opacity: 1; }
.motion-stage .motion-poster { z-index: 0; }
.motion-stage .motion-media { z-index: 2; opacity: 0; }
.motion-stage .motion-media.is-ready { opacity: 1; }
.motion-stage:has(.motion-media.is-ready) .motion-poster,
.motion-dialog-stage:has(.motion-media.is-ready) .motion-poster { visibility: hidden; }
.motion-stage .image-loading { z-index: 3; }
.motion-caption { display: flex; align-items: baseline; gap: 11px; padding: 13px 0 0; color: var(--ink-2); font: 13px/1.6 var(--sans); }
.motion-index { flex: 0 0 auto; color: var(--ink-4); font-size: 10px; letter-spacing: .1em; }
.motion-title { min-width: 0; flex: 1; }
.motion-toggle, .motion-expand { flex: 0 0 auto; color: var(--ink-3); font-size: 11px; padding: 4px 0 4px 6px; }
.motion-toggle:hover, .motion-toggle:focus-visible, .motion-expand:hover, .motion-expand:focus-visible { color: var(--ink); }
.motion-error { position: absolute; z-index: 4; left: 12px; right: 12px; bottom: 12px; margin: 0; padding: 8px 12px; color: var(--ink-2); background: rgb(15 21 26 / 88%); font: 12px/1.6 var(--sans); text-align: center; }
.motion-dialog { box-sizing: border-box; width: min(1100px, calc(100vw - 40px)); max-width: none; max-height: calc(100dvh - 40px); padding: 22px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); background: #11171c; overflow: auto; }
.motion-dialog::backdrop { background: rgb(0 0 0 / 78%); backdrop-filter: blur(10px); }
.motion-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.motion-dialog-title { margin: 0; color: var(--ink-2); font: 400 22px/1.4 var(--serif); }
.motion-dialog-close { flex: 0 0 auto; color: var(--ink-2); font: 24px/1 var(--sans); padding: 2px 6px; }
.motion-dialog-stage { position: relative; display: grid; place-items: center; height: min(70dvh, 850px); min-height: 160px; background: #0b0e11; overflow: hidden; }
.motion-dialog-stage > img, .motion-dialog-stage > video { grid-area: 1 / 1; display: block; width: auto; height: auto; max-width: 100%; max-height: min(70dvh, 850px); object-fit: contain; }
.motion-dialog-stage > .motion-media { z-index: 2; opacity: 0; }
.motion-dialog-stage > .motion-media.is-ready { opacity: 1; }
.motion-dialog-controls { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 16px; padding-top: 16px; color: var(--ink-3); font: 12px/1.6 var(--sans); }
.motion-dialog-toggle, .motion-dialog-original { color: var(--ink-2); padding: 3px 0; }
.motion-dialog-status { margin-right: auto; }
@media (max-width: 760px) {
  .motion-gallery { gap: 38px; }
  .motion-grid { grid-template-columns: 1fr; gap: 26px; }
  .motion-nav { gap: 8px 20px; padding-bottom: 20px; }
  .motion-nav button { font-size: 12px; }
  .motion-section-title { font-size: 18px; margin-bottom: 16px; }
  .motion-caption { gap: 9px; font-size: 12px; }
  .motion-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); padding: 14px; }
  .motion-dialog-title { font-size: 20px; }
}

/* A skipping pebble waits with the artwork; only visible, active requests move. */
.image-loading {
  position: absolute;
  z-index: 1;
  inset: 0;
  color: var(--ink-2);
  opacity: 1;
  visibility: visible;
  pointer-events: none;
  transition: opacity .24s var(--ease), visibility 0s linear .24s;
}
.image-loading-body {
  position: absolute;
  top: min(50%, 260px);
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100% - 32px);
  transform: translate(-50%, -50%);
}
.image-loading-art { position: relative; display: block; width: 92px; height: 62px; }
.loading-pebble {
  position: absolute;
  left: 41px;
  top: 8px;
  width: 10px;
  height: 8px;
  border-radius: 48% 52% 44% 56%;
  background: currentColor;
  animation: pebble-hop 1.7s var(--ease) infinite paused;
}
.loading-pebble-shadow {
  position: absolute;
  left: 34px;
  top: 43px;
  width: 24px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .12;
  animation: pebble-shadow 1.7s var(--ease) infinite paused;
}
.loading-ripple {
  position: absolute;
  left: 21px;
  top: 37px;
  width: 50px;
  height: 16px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: .2;
  transform: scale(.55);
  animation: pebble-ripple 1.7s var(--ease-out) infinite paused;
}
.loading-ripple.echo { animation-delay: .18s; }
.image-loading-copy { font-family: var(--sans); font-size: 12px; line-height: 1.6; letter-spacing: .12em; text-align: center; color: var(--ink-3); }
.is-open .detail.is-shown .work-media.is-loading-in-view.is-fetching:not(.has-loaded-media):not(:has(> .media-preview.is-ready)) .image-loading-art > span { animation-play-state: running; }
.motion-dialog[open] .work-media.is-fetching:not(.has-loaded-media):not(:has(> .media-preview.is-ready)) .image-loading-art > span { animation-play-state: running; }
/* Keep loading feedback off artwork as soon as a preview or the original is visible. */
.work-media.has-loaded-media .image-loading,
.work-media:has(> .media-preview.is-ready) > .image-loading { opacity: 0; visibility: hidden; transition: none; }
@keyframes pebble-hop {
  0%, 12%, 100% { transform: translateY(0) rotate(-12deg); }
  40% { transform: translateY(29px) rotate(14deg) scale(1.14, .8); }
  58% { transform: translateY(-5px) rotate(-20deg); }
  74% { transform: translateY(9px) rotate(4deg); }
}
@keyframes pebble-shadow {
  0%, 12%, 100% { transform: scaleX(.55); opacity: .08; }
  40% { transform: scaleX(1); opacity: .22; }
  58% { transform: scaleX(.4); opacity: .06; }
  74% { transform: scaleX(.7); opacity: .13; }
}
@keyframes pebble-ripple {
  0%, 30% { transform: scale(.2); opacity: 0; }
  40% { opacity: .45; }
  90%, 100% { transform: scale(1.55); opacity: 0; }
}

@media (max-width: 760px), (max-width: 1024px) and (max-height: 500px) and (pointer: coarse) {
  .detail > .detail-title,
  .detail > .project-intro,
  .detail > .project-media {
    width: auto;
    margin-left: max(12px, env(safe-area-inset-left));
    margin-right: max(12px, env(safe-area-inset-right));
  }
  .project-media { gap: 16px; }
  .detail > .project-media.is-portrait-pair {
    width: min(390px, calc(100% - 24px));
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .project-intro { line-height: 1.8; }
}

/* ------------------------------------------------------------------ */
/* cursor — a dot that is the pointer, a hairline ring that drifts after it */
/* ------------------------------------------------------------------ */

.cursor {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  display: none;
  --cp: 1;
}
.has-cursor .cursor { display: block; }
/* A transparent native cursor also covers hosts that briefly restore the arrow
   while cursor:none is active. Activate it together with the custom pointer. */
.has-cursor,
.has-cursor *,
.has-cursor::before,
.has-cursor::after,
.has-cursor *::before,
.has-cursor *::after { cursor: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAEklEQVR4nGNgGAWjYBSMAggAAAQQAAFVN1rQAAAAAElFTkSuQmCC") 0 0, none !important; }

.c-dot,
.c-ring {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}

.c-dot::before {
  content: "";
  position: absolute;
  left: -3px;
  top: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  /* A crisp dark edge separates the pale dot from moving bright reflections. */
  box-shadow: 0 0 0 1px rgba(0, 0, 0, calc(.32 + .24 * var(--day-ui))), 0 0 8px rgba(242, 237, 228, 0.18);
  transition: transform 0.35s var(--ease-out), opacity 0.3s var(--ease);
}

.c-shape {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--cw, 30px);
  height: var(--ch, 30px);
  border-radius: 999px;
  border: 1.25px solid rgba(242, 237, 228, calc(.64 + .16 * var(--day-ui)));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, calc(.28 + .20 * var(--day-ui))), inset 0 0 0 .5px rgba(0, 0, 0, calc(.12 + .12 * var(--day-ui)));
  background: rgba(242, 237, 228, 0);
  transform: translate(-50%, -50%) scale(calc(var(--csx, 1) * var(--cp)), calc(var(--csy, 1) * var(--cp)));
  transition:
    width 0.4s var(--ease-out),
    height 0.4s var(--ease-out),
    background 0.4s var(--ease),
    border-color 0.4s var(--ease),
    opacity 0.4s var(--ease),
    transform 0.2s var(--ease-out);
  display: grid;
  place-items: center;
}

/* links & buttons: the ring opens up and the dot steps aside */
.cursor[data-state="link"] .c-shape {
  --cw: 44px;
  --ch: 44px;
  background: rgba(242, 237, 228, 0.07);
  border-color: rgba(242, 237, 228, calc(.74 + .14 * var(--day-ui)));
}

/* the time wheel: a vertical capsule with two ticks, like the wheel itself */
.cursor[data-state="drag"] .c-shape {
  --cw: 22px;
  --ch: 46px;
  border-color: rgba(242, 237, 228, calc(.78 + .12 * var(--day-ui)));
}
.c-tick {
  position: absolute;
  left: 50%;
  width: 8px;
  height: 1px;
  margin-left: -4px;
  background: var(--ink);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.3s var(--ease), transform 0.45s var(--ease-out);
}
.c-tick:nth-child(1) { top: calc(50% - 6px); }
.c-tick:nth-child(2) { top: calc(50% + 5px); }
.cursor[data-state="drag"] .c-tick { opacity: 0.9; transform: none; }

/* project banners: a small italic word inside the ring */
.cursor[data-state="label"] .c-shape {
  --cw: 66px;
  --ch: 66px;
  background: rgba(10, 12, 14, 0.26);
  border-color: rgba(242, 237, 228, calc(.68 + .14 * var(--day-ui)));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.c-label {
  font-family: var(--display);
  font-style: italic;
  font-size: 15px;
  color: var(--ink);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.35s var(--ease), transform 0.5s var(--ease-out);
}
.cursor[data-state="label"] .c-label { opacity: 1; transform: none; }

.cursor[data-state="link"] .c-dot::before,
.cursor[data-state="drag"] .c-dot::before,
.cursor[data-state="label"] .c-dot::before {
  transform: scale(0);
  opacity: 0;
}

/* pressing: the ring tightens, as if about to touch the water */
.cursor.is-down { --cp: 0.7; }

.cursor.is-hidden .c-shape,
.cursor.is-hidden .c-dot::before { opacity: 0; }

/* the touch itself: two hairline rings leave the cursor and spread out with the splash */
.c-pulse {
  position: absolute;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  border: 1px solid rgba(242, 237, 228, 0.6);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12);
  opacity: 0;
  animation: c-pulse 1.2s var(--ease-out) forwards;
}
.c-pulse.echo {
  border-color: rgba(242, 237, 228, 0.35);
  animation-duration: 1.5s;
}
@keyframes c-pulse {
  0% { transform: scale(0.5); opacity: 0.9; }
  100% { transform: scale(3.6); opacity: 0; }
}

/* ------------------------------------------------------------------ */
/* small screens                                                        */
/* ------------------------------------------------------------------ */

@media (max-width: 760px) {
  .logo { font-size: 23px; }
  .tagline {
    top: calc(var(--pad-y) + 42px);
    width: min(840px, calc(100vw - var(--pad-x) * 2));
    font-size: 13.5px;
    line-height: 1.6;
    text-wrap: balance;
  }
  .side { top: auto; bottom: 150px; }
  .player {
    top: auto;
    bottom: 148px;
    width: auto;
  }
  .pl-controls { width: auto; justify-content: center; gap: 22px; margin-top: 27px; }
  .pl-controls .pl-play { width: 32px; height: 32px; }
  .pl-play svg { width: 18px; height: 18px; }
  .pl-volume { margin-top: 19px; }
  .pl-slider { width: 118px; }
  .pl-time { margin-top: 16px; }
  .wheel { width: 180px; }
  .wheel-label { right: calc(100% - 30px); }
  .wheel-time { font-size: 23px; }
  .wheel-now { left: calc(100% - 30px); font-size: 14px; }
  .presets { gap: 16px; }
  .presets button { font-size: 15px; }
  .row { grid-template-columns: 30px 64px minmax(0, 1fr) 22px; gap: 0 14px; }
  .row .thumb { width: 64px; height: 48px; }
  .row .name { font-size: 15px; }
}

@media (max-width: 560px) {
  .contact-footer { grid-template-columns: 1fr; gap: 6px; }
  .contact-footer .footer-mail { grid-column: 1; }
  .footer-globe { top: auto; bottom: 0; width: 32px; height: 18px; transform: none; }
}

@media (max-width: 420px) {
  .wheel-label { right: calc(100% - 40px); }
  .wheel-now { left: calc(100% - 36px); }
}

@media (min-width: 540px) and (max-width: 760px) and (max-height: 600px) {
  .tagline { top: var(--pad-y); width: calc(50vw - var(--pad-x) - 20px); font-size: 11.5px; line-height: 1.45; }
  .tagline p { display: inline; }
  .tagline p + p { margin-top: 0; }
}

@media (min-width: 761px) and (max-height: 420px) {
  .player { top: calc(38.6% - 28px); }
  .pl-controls { margin-top: 27px; }
  .pl-controls .pl-play { width: 32px; height: 32px; }
  .pl-play svg { width: 18px; height: 18px; }
  .pl-volume { margin-top: 19px; }
  .pl-time { margin-top: 16px; }
  .tagline { width: min(920px, calc(100vw - var(--pad-x) * 2 - 180px)); font-size: 14px; line-height: 1.5; }
  .tagline p + p { margin-top: 0.55em; }
}

@media (max-width: 350px) {
  .footer-globe { top: 0; bottom: auto; }
  .clock { gap: 14px; font-size: 18.5px; }
  .clock-icon { width: 15.5px; height: 15.5px; }
  .link { font-size: 24px; }
  .pl-title { font-size: 26px; }
  .pl-controls button, .pl-volume button { width: 22px; height: 22px; }
  .pl-controls .pl-play { width: 30px; height: 30px; }
  .pl-volume { gap: 12px; }
  .pl-slider { width: 106px; }
}

@media (prefers-reduced-motion: reduce) {
  .r, .chrome, .overlay { transition-duration: 0.01s !important; transition-delay: 0s !important; }
  .clock #clockText::after { transition-duration: 0.01s !important; }
  .works-list, .detail, .work-media img { transition-duration: 0.01s !important; }
  .back-labels > span { transition-duration: 0.01s !important; }
  .detail-top-mask { transition-duration: 0.01s !important; }
  .image-loading-art > span { animation: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor *, .cursor *::before { transition-duration: 0.01s !important; transition-delay: 0s !important; }
  .c-pulse { animation: none !important; }
}
