/* Native cross-document transitions are progressive enhancement.
   Shared on both HTML entries; film/archive alone use a transient, inert
   live progress popover. No cloned videos, route interception, or overlays
   on unrelated links. */
::view-transition-old(root) {
  animation: 160ms cubic-bezier(.32,.72,.28,1) both portfolio-page-exit;
}
::view-transition-new(root) {
  animation: 240ms cubic-bezier(.32,.72,.28,1) both portfolio-page-enter;
}
@keyframes portfolio-page-exit { to { opacity: 0; } }
@keyframes portfolio-page-enter { from { opacity: 0; } to { opacity: 1; } }

/* Film ↔ Archive: brief optical handoff without an intentional blank
   first half. Cross-document navigation still owns history and scroll. A new
   page is readable from its very first transition frame, not after 350ms. */
:root:active-view-transition-type(to-archive)::view-transition-old(root),
:root:active-view-transition-type(to-film)::view-transition-old(root) {
  animation: 300ms ease-in both portfolio-optical-out;
}
:root:active-view-transition-type(to-archive)::view-transition-new(root),
:root:active-view-transition-type(to-film)::view-transition-new(root) {
  animation: 300ms ease-out both portfolio-optical-in;
}
@keyframes portfolio-optical-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes portfolio-optical-in {
  from { opacity: .45; }
  to { opacity: 1; }
}

/* Live, borderless fifth-concept cue. It is shown in a non-interactive manual
   popover, in the browser top layer above the native view transition.
   The line reports transition elapsed time, never network buffering. */
.portfolio-route-cue:popover-open {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #edf4fa;
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0,0,0,.85);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  z-index: 2147483647;
}
.portfolio-route-cue::backdrop { background: transparent; pointer-events: none; }
.portfolio-route-cue__depth {
  position: absolute;
  inset: 0;
  pointer-events: none;
  backdrop-filter: blur(1.2px);
  -webkit-backdrop-filter: blur(1.2px);
  -webkit-mask-image: radial-gradient(ellipse 27% 34% at 50% 47%,transparent 20%,rgba(0,0,0,.16) 39%,#000 92%);
  mask-image: radial-gradient(ellipse 27% 34% at 50% 47%,transparent 20%,rgba(0,0,0,.16) 39%,#000 92%);
  animation: 660ms linear both portfolio-route-depth;
}
@keyframes portfolio-route-depth {
  0%, 12%, 100% { opacity: 0; }
  30% { opacity: .5; }
  48% { opacity: .74; }
  80% { opacity: .17; }
}
.portfolio-route-cue__indicator {
  position: absolute;
  left: 50%;
  bottom: 13%;
  width: min(45%, 460px);
  transform: translateX(-50%);
  padding: 0;
  border: 0;
  background: transparent;
  isolation: isolate;
  animation: 660ms linear both portfolio-route-indicator;
}
/* Feathered, transparent contrast veil: keeps white readouts legible over
   bright thumbnails without restoring a panel, capsule or solid background. */
.portfolio-route-cue__indicator::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -10px -18px;
  background: linear-gradient(90deg,transparent,rgba(1,5,10,.43) 15%,rgba(1,5,10,.43) 85%,transparent);
  filter: blur(9px);
  pointer-events: none;
}
@keyframes portfolio-route-indicator {
  0%, 9% { opacity: 0; transform: translateX(-50%) translateY(5px); }
  16%, 87% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-3px); }
}
.portfolio-route-cue__head {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.portfolio-route-cue__label {
  flex: 0 0 auto;
  white-space: nowrap;
  font: 580 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .06em;
  color: #edf5ff;
}
html[lang^="zh"] .portfolio-route-cue__label { letter-spacing: 0; }
.portfolio-route-cue__rail {
  position: relative;
  flex: 1 1 auto;
  min-width: 24px;
  height: 2px;
  border-radius: 4px;
  background: rgba(218,231,242,.46);
  isolation: isolate;
}
.portfolio-route-cue__fill {
  display: block;
  position: relative;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg,#438edd,#83cfff,#b7e8ff);
  box-shadow: 0 0 5px rgba(94,176,246,.42), 0 0 10px rgba(53,151,250,.15);
  will-change: width;
}
.portfolio-route-cue__fill::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 50%;
  width: 9px;
  height: 6px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse,rgba(211,244,255,.78),rgba(100,185,254,.28) 42%,transparent 78%);
  filter: blur(1.6px);
}
.portfolio-route-cue__playhead {
  position: absolute;
  left: 0;
  top: -3px;
  width: 1px;
  height: 8px;
  background: #e7f7ff;
  box-shadow: 0 0 4px rgba(132,220,255,.42);
}
.portfolio-route-cue__percent {
  flex: 0 0 auto;
  min-width: 42px;
  text-align: right;
  font: 560 14px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.portfolio-route-cue__percent small { color: #d9e8f5; font: 460 11px/1 ui-monospace, Menlo, monospace; }
@media (max-width: 760px) {
  .portfolio-route-cue__depth {
    -webkit-mask-image: radial-gradient(ellipse 46% 24% at 50% 48%,transparent 18%,rgba(0,0,0,.18) 44%,#000 95%);
    mask-image: radial-gradient(ellipse 46% 24% at 50% 48%,transparent 18%,rgba(0,0,0,.18) 44%,#000 95%);
    backdrop-filter: blur(.8px);
    -webkit-backdrop-filter: blur(.8px);
  }
  .portfolio-route-cue__indicator { bottom: 13%; width: 84%; max-width: 340px; }
  .portfolio-route-cue__head { gap: 10px; }
  .portfolio-route-cue__label { font-size: 11px; letter-spacing: 0; }
  .portfolio-route-cue__percent { min-width: 38px; font-size: 12px; }
  .portfolio-route-cue__percent small { font-size: 9px; }
}
/* User preferences override ALL other transition motion. */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transform: none !important;
    scale: 1 !important;
    filter: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
  .portfolio-route-cue:popover-open { display: none !important; }
}
.cinema-player {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--apple-text, #f5f5f7);
  overflow: auto;
  overscroll-behavior: contain;
  font-family: var(--font-body, system-ui, sans-serif);
}
/* One material layer: match the menu without stacking a second tinted scrim.
   The modal-only fallback contract lives in apple-system.css. */
.cinema-player::backdrop {
  background: var(--portfolio-modal-surface, rgba(12, 12, 13, .9));
  -webkit-backdrop-filter: var(--portfolio-modal-blur, blur(28px) saturate(1.02));
  backdrop-filter: var(--portfolio-modal-blur, blur(28px) saturate(1.02));
  opacity: .94;
  transition: opacity var(--apple-duration-modal) var(--apple-ease);
}
.cinema-player.is-motion-visible::backdrop { opacity: 1; }
.cinema-player.is-closing::backdrop { opacity: 0; transition-duration: var(--apple-duration-modal-exit); }
.cinema-player__layout {
  opacity: 0;
  transform: translate3d(0,var(--apple-motion-modal-offset),0);
  transition: opacity var(--apple-duration-modal) var(--apple-ease),
              transform var(--apple-duration-modal) var(--apple-ease);
}
.cinema-player.is-motion-visible .cinema-player__layout {
  opacity: 1;
  transform: translate3d(0,0,0);
}
.cinema-player.is-closing .cinema-player__layout {
  opacity: 0;
  transform: translate3d(0,6px,0);
  transition-duration: var(--apple-duration-modal-exit);
}
.cinema-player, .cinema-player * { box-sizing: border-box; }
.cinema-player__layout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: calc(max(80px, calc(env(safe-area-inset-top) + 72px)) + 12px) max(48px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(48px, env(safe-area-inset-left));
}
.cinema-player__body { width: min(980px, 100%); min-width: 0; flex-shrink: 0; }
.cinema-player__close {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: max(24px, env(safe-area-inset-right));
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--portfolio-icon-border);
  border-radius: var(--portfolio-icon-radius);
  cursor: pointer;
  touch-action: manipulation;
}
.cinema-player__close svg { width: 18px; height: 18px; }
.cinema-player__focus-guard { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cinema-player :is(button, video):focus-visible { outline: 2px solid var(--apple-blue, #2997ff); outline-offset: 4px; }
.cinema-player__stage {
  position: relative;
  width: min(560px, 100%);
  height: min(300px, 45dvh);
  max-width: 100%;
  margin-inline: auto;
  background: var(--apple-surface-solid, #1c1c1e);
  border-radius: var(--portfolio-content-radius, 18px);
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 16px 56px rgba(0, 0, 0, .24);
}
.cinema-player__stage video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; border-radius: inherit; }
.cinema-player__caption { display: grid; gap: 7px; width: 100%; margin-top: 0; text-align: left; overflow-wrap: anywhere; }
.cinema-player__caption h2 { margin: 0; color: var(--apple-text, #f5f5f7); font-family: var(--font-display, system-ui, sans-serif); font-size: 22px; font-weight: 600; line-height: 1.35; letter-spacing: -.025em; }
/* Match ProjectCard's first-line blue rail instead of stretching a border
   over multiple lines. Both use 2×14px, offset 2px, with a 10px text gap. */
.cinema-player__caption p {
  position: relative;
  margin: 0;
  padding-inline-start: calc(var(--project-card-marker-width) + var(--project-card-detail-gap));
  border: 0;
  color: var(--body-text, rgba(245, 245, 247, .82));
  font-size: var(--project-card-detail-size);
  font-weight: var(--project-card-detail-weight);
  line-height: var(--project-card-detail-line-height);
}
.cinema-player__caption p::before {
  position: absolute;
  inset-inline-start: 0;
  top: var(--project-card-marker-offset);
  width: var(--project-card-marker-width);
  height: var(--project-card-marker-height);
  border-radius: var(--heading-rule-radius);
  background: var(--project-card-marker-color);
  content: '';
}
.cinema-player__pending { display: grid; justify-items: center; gap: 14px; padding: 24px 12px; text-align: center; }
.cinema-player__pending img { width: auto; height: min(260px, 35dvh); max-width: 100%; object-fit: contain; }
.cinema-player__pending p { margin: 8px 0 0; font-size: 18px; font-weight: 500; }
.cinema-player__pending span { color: var(--apple-secondary); font-size: 12px; line-height: 1.8; }
.cinema-player__pending + .cinema-player__caption { text-align: center; }
.cinema-player__message { z-index: 2; background: rgba(12, 12, 13, .88); position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; padding: 20px; text-align: center; color: var(--apple-secondary); font-size: 14px; }
.cinema-player__message button { min-height: 44px; padding: 0 16px; border: 1px solid #ffffff35; border-radius: var(--portfolio-control-radius); background: var(--apple-surface-solid); color: var(--apple-text); cursor: pointer; }
@media (max-width: 760px) {
  .cinema-player__layout { align-items: flex-start; min-height: 100%; padding: calc(max(14px, env(safe-area-inset-top)) + 70px) max(4vw, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(4vw, env(safe-area-inset-left)); }
  /* Center wide films in the space below the navigation; short views start
     at the top and keep all information reachable through modal scrolling. */
  .cinema-player[data-format="landscape"] .cinema-player__layout { align-items: safe center; }
  .cinema-player__close { top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); width: 44px; height: 44px; }
  .cinema-player__caption { gap: 5px; }
  .cinema-player__caption h2 { font-size: 18px; }
  .cinema-player__caption p { font-size: 12px; }
}

.cinema-player__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; background: var(--apple-surface-solid, #1c1c1e); border-radius: inherit; opacity: 1; transition: opacity var(--apple-duration-control, 180ms) var(--apple-ease, ease); }
.cinema-player__start { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; pointer-events: none; }
.cinema-player__play { display: grid; place-items: center; width: 64px; height: 64px; padding: 0; border: 1px solid var(--portfolio-icon-border); border-radius: var(--portfolio-icon-radius); cursor: pointer; pointer-events: auto; touch-action: manipulation; }
.cinema-player__play svg { width: 28px; height: 28px; }
.cinema-player__start p { position: absolute; top: calc(50% + 44px); max-width: 90%; margin: 0; padding: 4px 10px; color: #f5f5f7; background: #0009; font-size: 13px; line-height: 1.5; text-align: center; }

@media (max-width: 760px) { .cinema-player__play { width: 56px; height: 56px; } }

.cinema-player__poster.is-revealed { opacity: 0; }
/* A very short directional dissolve after the replacement poster is decoded.
   The underlying new poster is already ready; no black interstitial, zooming
   the viewer, or network video request. Only applies to poster-to-poster cuts. */
.cinema-player__version-outgoing {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: contain;
  background: var(--apple-surface-solid, #1c1c1e);
  border-radius: inherit; pointer-events: none;
  animation: cinema-version-dissolve 340ms cubic-bezier(.22, 1, .36, 1) both;
}
.cinema-player__version-outgoing[data-direction="-1"] { --version-drift: 8px; }
.cinema-player__version-outgoing[data-direction="1"] { --version-drift: -8px; }
@keyframes cinema-version-dissolve {
  0% { opacity: 1; transform: translateX(0) scale(1); }
  100% { opacity: 0; transform: translateX(var(--version-drift, -8px)) scale(1.012); }
}
@media (prefers-reduced-motion: reduce) {
  .cinema-player__version-outgoing { animation-duration: 1ms; }
}
/* Transient YouTube-like touch acknowledgement; it never traps taps or obscures
   the film after the animation finishes. Desktop native video is unchanged. */
.cinema-player__tap-feedback {
  position: absolute; inset: 0; z-index: 3; display: grid; place-items: center;
  pointer-events: none; animation: cinema-tap-fade 750ms linear both;
}
.cinema-player__tap-feedback-disc {
  display: grid; place-items: center; width: 64px; height: 64px;
  border-radius: 50%; background: rgba(8, 8, 10, .58);
  color: #fff; box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
  will-change: transform; animation: cinema-tap-scale 750ms both;
}
.cinema-player__tap-feedback-disc svg { width: 31px; height: 31px; }
/* Synchronized interaction (750ms): 0-150ms fade in + grow,
   150-600ms fully visible hold, 600-750ms fade out + shrink.
   Use two cubic-bezier segments; never grow or fade prematurely on exit.
   Material-inspired motion, not an undocumented YouTube source extraction. */
@keyframes cinema-tap-fade {
  0% { opacity: 0; animation-timing-function: cubic-bezier(0, 0, .2, 1); }
  20% { opacity: 1; }
  80% { opacity: 1; animation-timing-function: cubic-bezier(.4, 0, 1, 1); }
  100% { opacity: 0; }
}
@keyframes cinema-tap-scale {
  0% { transform: scale(.78); animation-timing-function: cubic-bezier(0, 0, .2, 1); }
  20% { transform: scale(1.06); }
  80% { transform: scale(1.06); animation-timing-function: cubic-bezier(.4, 0, 1, 1); }
  100% { transform: scale(.8); }
}
@media (prefers-reduced-motion: reduce) {
  .cinema-player__tap-feedback, .cinema-player__tap-feedback-disc { animation-duration: 1ms; }
}
.cinema-player__stage::after { content: ''; position: absolute; inset: 0; z-index: 1; border: 1px solid var(--portfolio-panel-border); border-radius: inherit; pointer-events: none; }
.cinema-player__loading { position: absolute; inset: auto 12px 12px; z-index: 2; padding: 8px 12px; border-radius: 8px; color: #f5f5f7; background: #000a; font-size: 13px; text-align: center; pointer-events: none; }
@media (max-width: 760px) { .cinema-player__stage { border-radius: clamp(14px, var(--portfolio-content-radius, 18px), 16px); } }
@media (prefers-reduced-motion: reduce) { .cinema-player__poster { transition: none; } }

@media (prefers-reduced-motion: reduce) { .cinema-player__play, .cinema-player__close { transition: none; } }

/* Desktop video and metadata share one measured content group; mobile fits the film alone and scrolls its metadata naturally. */
.cinema-player__body { position: relative; }
.cinema-player__information { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 20px; width: 100%; margin-top: 16px; }
.cinema-player__caption { grid-column: 1; grid-row: 1; }
.cinema-player__work-nav { grid-column: 1 / -1; grid-row: 2; display: flex; justify-content: center; width: 100%; }
.cinema-player__sequence { display: grid; grid-template-columns: 44px minmax(56px, 1fr) 44px; align-items: center; gap: 16px; width: min(196px, 100%); }
.cinema-player__count { color: var(--apple-secondary); text-align: center; font: 13px/1.35 var(--font-mono); white-space: nowrap; }
/* Work arrows share circular ghost controls with the Awards image viewer;
   their counter remains a separate unboxed label. */
.cinema-player__sequence > button {
  flex: 0 0 44px; width: 44px; height: 44px;
  border: 1px solid transparent !important; border-radius: 50% !important;
  background: transparent !important; color: var(--apple-secondary);
  transition: color 180ms ease, background-color 180ms ease, opacity 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .cinema-player__sequence > button:hover:not(:disabled) {
    color: var(--apple-text); background: var(--portfolio-icon-hover-surface) !important;
  }
}
.cinema-player__sequence > button:focus-visible {
  color: var(--apple-text); background: var(--portfolio-icon-hover-surface) !important;
}
.cinema-player__sequence > button:active:not(:disabled) { background: var(--portfolio-icon-active-surface) !important; }
@media (max-width: 760px) {
  .cinema-player__information { display: flex; flex-direction: column; }
  .cinema-player__sequence { width: min(196px, 100%); gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .cinema-player::backdrop, .cinema-player__layout {
    transition: none !important; transform: none !important;
  }
  .cinema-player__layout { opacity: 1 !important; }
  .cinema-player::backdrop { opacity: 1 !important; }
}

/* Version tabs are editorial text navigation, as in professional video
   review tools: one understated 2px line shows the selected cut. Work-switch
   arrows remain separate below; this track never becomes a large pill. */
.cinema-player__versions {
  display: flex; align-items: stretch; justify-content: center; align-self: center;
  width: fit-content; max-width: 100%; padding: 0; gap: 6px;
  border: 0; border-bottom: 1px solid var(--portfolio-panel-border);
  border-radius: 0; background: transparent; box-shadow: none;
  isolation: isolate;
}
.cinema-player__version {
  position: relative; appearance: none; display: grid; place-items: center;
  flex: 1 1 auto; min-width: 82px; min-height: 44px;
  padding: 9px 13px 10px; border: 0; border-radius: 0;
  background: transparent; color: var(--apple-secondary);
  font: 500 12px/1.35 var(--font-body,system-ui);
  cursor: pointer; white-space: nowrap; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 230ms cubic-bezier(.2,.75,.25,1);
}
.cinema-player__version-label {
  position: relative; z-index: 1;
  transition: transform 280ms cubic-bezier(.22,1,.36,1);
}
.cinema-player__version[data-visual-selected="true"] .cinema-player__version-label {
  transform: translateY(-1px);
}
.cinema-player__version-thumb {
  position: absolute; z-index: 0; inset: auto 14px -1px;
  height: 2px; border: 0; border-radius: 2px 2px 0 0;
  background: var(--apple-text); box-shadow: none; pointer-events: none;
}
.cinema-player__version:is(:hover,[data-visual-selected="true"]) { color: var(--apple-text); }
.cinema-player__version:focus-visible { outline: 2px solid var(--apple-blue,#2997ff); outline-offset: -3px; border-radius: 5px; }
@media (max-width: 760px) {
  .cinema-player__versions { width: 100%; gap: 0; }
  .cinema-player__version { min-width: 0; padding-inline: 4px; }
  .cinema-player[data-format="portrait"] .cinema-player__versions {
    width: 100%; max-width: 100%; align-self: stretch;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cinema-player__version, .cinema-player__version-label { transition: none !important; }
  .cinema-player__version[data-visual-selected="true"] .cinema-player__version-label { transform: none; }
}
/* Preserve the established caption/return/nav hierarchy on desktop: the
   optional versions row belongs between caption and project arrows. */
@media(min-width:761px) {
  .cinema-player__information:has(> .cinema-player__versions) .cinema-player__versions {
    grid-column:1 / -1; grid-row:2; justify-self:center;
  }
  .cinema-player__information:has(> .cinema-player__versions) .cinema-player__work-nav {
    grid-row:3;
  }
}

/* Portrait films on desktop have a narrow measured body. A two-column
   caption/return grid can leave only ~70px for an English title and grow the
   whole player taller than the viewport. Keep each control on its own row. */
@media (min-width: 761px) {
  .cinema-player[data-format="portrait"] .cinema-player__information {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .cinema-player[data-format="portrait"] .cinema-player__caption {
    order: 0;
    width: 100%;
    min-width: 0;
  }
  .cinema-player[data-format="portrait"] .cinema-player__versions {
    order: 1;
  }
  .cinema-player[data-format="portrait"] .cinema-player__work-nav {
    order: 2;
  }

}


/* Mobile has one compact player control surface, not native controls plus a
   separate fullscreen pill. Desktop keeps its existing video UI unchanged. */
.cinema-player__mobile-controls { display: none; }
.cinema-player__visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
@media (max-width: 760px) {
  .cinema-player__layout,
  .cinema-player[data-format="landscape"] .cinema-player__layout {
    align-items: flex-start;
    justify-content: center;
    padding-top: max(104px, calc(env(safe-area-inset-top) + 76px));
    /* Keep the work-switch row clear of iPhone's bottom gesture area, even
       after scrolling through a tall portrait film and its version tabs. */
    padding-bottom: max(64px, calc(env(safe-area-inset-bottom) + 32px));
  }
  .cinema-player__body { width: 100% !important; max-width: 100%; }
  .cinema-player__stage { margin-inline: auto; }
  .cinema-player__mobile-controls {
    position: relative;
    display: grid;
    gap: 3px;
    width: 100%;
    min-height: 67px;
    margin-top: 8px;
    padding: 0 0 5px;
    color: var(--apple-text);
  }
  .cinema-player__seek {
    width: 100%; height: 22px; margin: 0; padding: 0;
    appearance: none; -webkit-appearance: none;
    background: transparent; touch-action: pan-x;
    cursor: pointer;
  }
  .cinema-player__seek::-webkit-slider-runnable-track {
    height: 3px; border-radius: 999px;
    background: linear-gradient(to right, var(--apple-text) var(--seek-progress), rgba(255,255,255,.25) var(--seek-progress));
  }
  .cinema-player__seek::-moz-range-track { height: 3px; background: rgba(255,255,255,.25); border-radius: 999px; }
  .cinema-player__seek::-moz-range-progress { height: 3px; background: var(--apple-text); border-radius: 999px; }
  .cinema-player__seek::-webkit-slider-thumb {
    appearance: none; -webkit-appearance: none;
    width: 12px; height: 12px; margin-top: -4.5px;
    border: 2px solid #121316; border-radius: 50%; background: var(--apple-text);
  }
  .cinema-player__seek::-moz-range-thumb { width: 12px; height: 12px; border: 2px solid #121316; border-radius: 50%; background: var(--apple-text); }
  .cinema-player__seek:disabled { opacity: .45; cursor: default; }
  .cinema-player__seek:focus-visible { outline: 2px solid var(--apple-blue,#2997ff); outline-offset: 2px; }
  .cinema-player__mobile-control-row { display: flex; align-items: center; width: 100%; gap: 5px; }
  .cinema-player__mobile-icon {
    display: grid; place-items: center; flex: 0 0 44px;
    width: 44px; height: 44px; min-width: 44px; min-height: 44px;
    padding: 10px; border: 0; border-radius: 10px;
    color: var(--apple-text); background: transparent;
    cursor: pointer; touch-action: manipulation;
  }
  .cinema-player__mobile-icon svg { display: block; width: 21px; height: 21px; }
  /* The 44px transport control occupies the same position before and after play. */
  .cinema-player__stage:not([aria-busy="true"]) video:not([controls]) { cursor: pointer; }
  .cinema-player__mobile-icon:active { background: var(--portfolio-icon-active-surface); }
  .cinema-player__mobile-icon:disabled { opacity: .4; cursor: default; }
  .cinema-player__mobile-icon:focus-visible,
  .cinema-player__mobile-rate-trigger:focus-visible,
  .cinema-player__mobile-rate-option:focus-visible { outline: 2px solid var(--apple-blue,#2997ff); outline-offset: 2px; }
  .cinema-player__mobile-time { color: var(--apple-secondary); font: 500 11px/1.3 var(--font-mono, monospace); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .cinema-player__mobile-spacer { flex: 1 1 auto; min-width: 0; }
  .cinema-player__mobile-rate { display: flex; flex: 0 0 auto; }
  .cinema-player__mobile-rate-trigger {
    display: grid; place-items: center; min-width: 51px; min-height: 44px;
    padding: 0 7px; border: 0; border-radius: 9px; background: transparent;
    color: var(--apple-text); font: 500 12px var(--font-body);
    cursor: pointer; touch-action: manipulation;
  }
  .cinema-player__mobile-rate-trigger:active,
  .cinema-player__mobile-rate-trigger[aria-expanded="true"] { background: var(--portfolio-icon-active-surface); }
  /* Center the short segmented popover to the film/toolbar, not the trigger.
     Four landscape choices obscure far less of a portrait film than a vertical list. */
  .cinema-player__mobile-rate-menu {
    position: absolute; z-index: 8; left: 50%; bottom: calc(100% + 8px);
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px;
    width: min(300px, calc(100% - 16px)); padding: 5px;
    border: 1px solid var(--portfolio-glass-control-border);
    border-radius: 17px;
    /* D+ control glass: shared substrate & rim with a stronger reading veil. */
    background: var(--portfolio-glass-control-surface);
    backdrop-filter: var(--portfolio-glass-control-blur);
    -webkit-backdrop-filter: var(--portfolio-glass-control-blur);
    box-shadow: var(--portfolio-glass-control-shadow);
    transform: translateX(-50%);
    transform-origin: bottom center;
    animation: cinema-rate-menu-enter 180ms cubic-bezier(0,0,.2,1) both;
  }
  .cinema-player__mobile-rate-option {
    display: grid; place-items: center;
    width: 100%; min-width: 0; min-height: 44px; padding: 0 3px;
    border: 0; border-radius: 12px; background: transparent;
    color: var(--apple-text); text-align: center;
    font: 500 13px/1 var(--font-body); cursor: pointer; touch-action: manipulation;
  }
  .cinema-player__mobile-rate-option.is-selected {
    background: var(--portfolio-icon-surface, rgba(255,255,255,.1));
    font-weight: 600;
  }
  .cinema-player__mobile-rate-option:active { background: var(--portfolio-icon-active-surface); }
  @media (hover: hover) { .cinema-player__mobile-rate-option:hover { background: var(--portfolio-icon-hover-surface); } }
  @keyframes cinema-rate-menu-enter {
    from { opacity: 0; transform: translateX(-50%) translateY(6px) scale(.97); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  }
  @media (prefers-reduced-motion: reduce) { .cinema-player__mobile-rate-menu { animation-duration: 1ms; } }
  @media (prefers-reduced-transparency: reduce) {
    .cinema-player__mobile-rate-menu {
      background: var(--portfolio-glass-solid, #1c1c1e);
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }
  }
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .cinema-player__mobile-rate-menu {
      background: var(--portfolio-glass-solid, #1c1c1e);
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }
  }
  .cinema-player__fullscreen-hint { margin: 0; padding: 3px; color: var(--apple-secondary); font: 12px/1.5 var(--font-body); text-align: center; }
  .cinema-player__information { gap: 13px; margin-top: 15px; }
  .cinema-player[data-format="portrait"] .cinema-player__information { gap: 12px; margin-top: 12px; }
  /* On regular-height phones the information region reserves room for a
     version row even when a work only has one cut. Coupled with the shared
     height budget in CinemaPlayer.jsx, next/previous keeps portrait films and
     the bottom arrow controls at stable positions instead of jumping ~80px.
     Short phones retain natural content height and scroll normally. */
  @media (min-height: 800px) {
    .cinema-player[data-format="portrait"] .cinema-player__information {
      min-height: 186px;
      justify-content: space-between;
    }
  }
  .cinema-player__caption { order: 0; }
  .cinema-player__versions { order: 1; }
  .cinema-player__work-nav { order: 2; }

}
/* At narrow accessibility zoom, preserve 44px controls without forcing the
   entire modal to scroll sideways. The time label may elide only if needed. */
@media (max-width: 320px) {
  .cinema-player__mobile-control-row { gap: 0; }
  .cinema-player__mobile-time {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cinema-player__mobile-icon, .cinema-player__seek { transition: none !important; }
}

/* Secondary action inside the caption: portfolio browsing replaces the old
   copy-link trigger. It deliberately inherits the original ghost-link
   proportions, keeping the arrow-only work row centered and unmodified. */
.cinema-player__caption-actions {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  column-gap: 14px; row-gap: 1px;
}
.cinema-player__caption-actions p { flex: 1 1 auto; min-width: 0; }
.cinema-player__directory-trigger {
  display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px;
  flex: 0 0 auto; min-height: 44px; min-width: 44px; padding: 0 2px;
  border: 0; border-radius: 7px; background: transparent;
  color: var(--body-text, var(--apple-secondary));
  font: 500 var(--project-card-detail-size, 12px)/var(--project-card-detail-line-height, 1.6) var(--font-body);
  text-decoration: none; cursor: pointer; touch-action: manipulation;
  transition: color 180ms var(--apple-ease);
}
.cinema-player__directory-trigger svg { width: 15px; height: 15px; flex-shrink: 0; }
@media (hover: hover) and (pointer: fine) {
  .cinema-player__directory-trigger:hover { color: var(--apple-text); }
}
.cinema-player__directory-trigger[aria-expanded="true"] { color: var(--apple-text); }
.cinema-player__directory-trigger:focus-visible { outline: 2px solid var(--apple-blue); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) { .cinema-player__directory-trigger { transition: none; } }

/* A direct ?watch URL and pointer-opened viewer programmatically focus Close
   for accessibility. Suppress only this synthetic initial blue outline;
   keyboard-opened films and actual Tab navigation retain full focus rings. */
.cinema-player .cinema-player__close[data-initial-auto-focus]:focus-visible {
  /* Override the shared !important keyboard ring ONLY during synthetic
     initial focus. A real keydown removes this attribute synchronously. */
  outline: none !important;
  outline-offset: 0 !important;
}
/* The existing cinema <dialog> is the ONLY modal. Its directory adopts the
   same site-wide cinematic glass, editorial typography, low-contrast tile,
   icon hover and content radii as Impact/Lab/Works; no new global tokens. */
.cinema-directory__scrim { display: none; }
.cinema-directory {
  position: fixed; z-index: 16;
  top: 92px; bottom: 18px; right: 18px;
  display: flex; flex-direction: column; gap: 0;
  width: clamp(288px, 23vw, 324px); min-width: 0; max-height: calc(100dvh - 110px);
  padding: 20px 16px 12px;
  border: 1px solid var(--portfolio-glass-control-border);
  border-radius: var(--portfolio-panel-radius);
  background: var(--portfolio-glass-control-surface);
  -webkit-backdrop-filter: var(--portfolio-glass-control-blur);
  backdrop-filter: var(--portfolio-glass-control-blur);
  box-shadow: var(--portfolio-glass-control-shadow);
  color: var(--apple-text);
  animation: cinema-directory-enter 230ms cubic-bezier(.2,.75,.25,1) both;
  contain: layout style;
}
@keyframes cinema-directory-enter {
  from { opacity: 0; transform: translate3d(12px,0,0); }
  to { opacity: 1; transform: translate3d(0,0,0); }
}
.cinema-directory__grab { display: none; }
.cinema-directory__header { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 0 0 16px; }
.cinema-directory__header h3 { margin: 0; font: 600 18px/1.32 var(--font-display,system-ui); letter-spacing: -.018em; }
.cinema-directory__header p { margin: 5px 0 0; color: var(--apple-secondary); font: 400 11px/1.5 var(--font-body); }
.cinema-directory__close { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid transparent; border-radius: 50%; color: var(--apple-secondary); background: transparent; cursor: pointer; }
.cinema-directory__close svg { width: 18px; height: 18px; }
@media (hover:hover) and (pointer:fine) { .cinema-directory__close:hover { color: var(--apple-text); background: var(--portfolio-icon-hover-surface); } }
.cinema-directory__close:active { background: var(--portfolio-icon-active-surface); }
.cinema-directory__filters { display: grid; flex: 0 0 auto; min-width: 0; gap: 9px; padding: 0 0 13px; }
.cinema-directory__filter-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; min-width: 0; }
.cinema-directory__filter-grid--categories { border-top: 1px solid var(--portfolio-tile-border); padding-top: 9px; }
.cinema-directory__filter {
  display: flex; align-items: center; justify-content: space-between; gap: 3px;
  width: 100%; min-width: 0; min-height: 44px; padding: 8px 9px;
  border: 1px solid var(--portfolio-tile-border);
  border-radius: calc(var(--portfolio-tile-radius) - 4px);
  background: var(--portfolio-tile-surface);
  color: var(--apple-secondary);
  font: 500 11px/1.25 var(--font-body); text-align: left;
  cursor: pointer; touch-action: manipulation;
  transition: background 180ms var(--apple-ease), color 180ms var(--apple-ease), border-color 180ms var(--apple-ease);
}
.cinema-directory__filter > span:first-child { min-width: 0; white-space: nowrap; }
.cinema-directory__filter-count { flex: 0 0 auto; color: var(--apple-secondary); font: 500 10px/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.cinema-directory__filter[aria-pressed="true"] { color: var(--apple-text); border-color: var(--portfolio-icon-border); background: var(--portfolio-icon-surface); }
.cinema-directory__filter[aria-pressed="true"] .cinema-directory__filter-count { color: var(--apple-text); }
@media (hover:hover) and (pointer:fine) { .cinema-directory__filter:hover:not(:disabled) { color: var(--apple-text); background: var(--portfolio-tile-surface-hover); } }
.cinema-directory__filter:disabled { opacity: .5; cursor: progress; }
.cinema-directory__list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-color: rgba(180,183,189,.32) transparent; scrollbar-width: thin; }
.cinema-directory__item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0;
  min-height: 66px; padding: 7px; margin-bottom: 4px;
  border: 1px solid transparent;
  border-radius: var(--portfolio-tile-radius);
  background: transparent; color: var(--apple-text);
  text-align: left; cursor: pointer; touch-action: manipulation;
  transition: background-color 180ms var(--apple-ease), border-color 180ms var(--apple-ease);
}
.cinema-directory__item img { width: 42px; height: 54px; flex: 0 0 auto; object-fit: cover; border-radius: 7px; background: var(--portfolio-modal-solid); }
.cinema-directory__item-description { display: grid; align-content: center; flex: 1; min-width: 0; gap: 4px; }
.cinema-directory__item-title { display: block; min-width: 0; color: var(--apple-text); font: 500 12px/1.45 var(--font-body); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cinema-directory__item-meta { display: block; min-width: 0; color: var(--apple-secondary); font: 400 10px/1.5 var(--font-body); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cinema-directory__now { flex: 0 0 auto; border: 1px solid var(--portfolio-tile-border); border-radius: 6px; padding: 4px 5px; color: var(--apple-secondary); font: 500 10px/1.2 var(--font-body); }
.cinema-directory__item[aria-current="true"] { border-color: var(--portfolio-panel-border); background: var(--portfolio-tile-surface-hover); }
.cinema-directory__item:disabled { opacity: .55; cursor: progress; }
@media (hover:hover) and (pointer:fine) { .cinema-directory__item:hover:not(:disabled) { background: var(--portfolio-tile-surface-hover); } }
.cinema-directory__footer { flex: 0 0 auto; border-top: 1px solid var(--portfolio-tile-border); padding: 9px 0 0; margin: 8px 0 0; color: var(--apple-secondary); font: 400 10px/1.5 var(--font-body); }
.cinema-directory__footer p { margin: 0; }
.cinema-directory :is(button):focus-visible { outline: 2px solid var(--apple-blue); outline-offset: 2px; }

/* A temporary overlay is necessary below the dock threshold: giving a
   1024px viewer a 320px permanent sidecar would collapse widescreen video. */
@media (min-width:761px) and (max-width:1319px) {
  .cinema-directory__scrim { display: block; position: fixed; inset: 0; z-index: 15; background: rgba(0,0,0,.35); }
}
@media (max-width:760px) {
  .cinema-directory__scrim { display: block; position: fixed; inset: 0; z-index: 15; background: rgba(0,0,0,.55); }
  .cinema-directory {
    inset: auto 0 0;
    width: 100%; max-height: 80dvh; height: min(76dvh, 680px);
    border-radius: var(--portfolio-panel-radius) var(--portfolio-panel-radius) 0 0;
    border-bottom: 0; padding: 12px max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: var(--portfolio-glass-control-surface);
    animation-name: cinema-directory-mobile-enter;
  }
  @keyframes cinema-directory-mobile-enter {
    from { opacity: .78; transform: translate3d(0,18px,0); }
    to { opacity: 1; transform: translate3d(0,0,0); }
  }
  .cinema-directory__grab { display: block; flex: 0 0 auto; align-self: center; width: 38px; height: 4px; margin: 1px 0 15px; border-radius: 99px; background: var(--portfolio-icon-border); }
  .cinema-directory__header { padding-bottom: 12px; }
  .cinema-directory__header h3 { font-size: 17px; }
  .cinema-directory__filters { gap: 7px; padding-bottom: 10px; }
  .cinema-directory__filter { min-height: 44px; }
  .cinema-directory__list { min-height: 0; }
  .cinema-directory__footer { padding-top: 8px; margin-top: 7px; }
}
@media (max-width:350px) {
  .cinema-directory__filter { padding-inline: 7px; font-size: 10.5px; }
  .cinema-directory__item { gap: 8px; }
  .cinema-directory__item img { width: 38px; height: 50px; }
}
/* On rotated phones and unusually short desktop windows the normal
   stacked filter header can consume every pixel of the thumbnail list.
   Show filters and projects side-by-side instead, still within the SAME
   cinema dialog. The short, narrow case stays single-column but uses a
   space-efficient two-row filter grid with intact 44px touch targets. */
@media (max-height:600px) and (min-width:521px) {
  .cinema-directory__scrim {
    display: block; position: fixed; inset: 0; z-index: 15;
    background: rgba(0,0,0,.42);
  }
  .cinema-directory {
    inset: 8px 8px 8px auto;
    width: min(720px, calc(100vw - 16px));
    height: calc(100dvh - 16px);
    max-height: none;
    display: grid;
    grid-template-columns: minmax(0,.95fr) minmax(0,1.2fr);
    grid-template-rows: auto minmax(0,1fr) auto;
    column-gap: 12px;
    padding: 12px;
    border: 1px solid var(--portfolio-glass-control-border);
    border-radius: var(--portfolio-panel-radius);
    background: var(--portfolio-glass-control-surface);
    animation-name: cinema-directory-enter;
  }
  .cinema-directory__grab { display: none; }
  .cinema-directory__header { grid-column: 1; grid-row: 1; padding-bottom: 8px; }
  .cinema-directory__header p, .cinema-directory__footer p { display: none; }
  .cinema-directory__filters { grid-column: 1; grid-row: 2; align-self: start; gap: 7px; padding: 0; }
  .cinema-directory__filter-grid--categories { padding-top: 7px; }
  .cinema-directory__list { grid-column: 2; grid-row: 1 / 4; min-height: 0; }
  .cinema-directory__footer { grid-column: 1; grid-row: 3; padding-top: 5px; margin-top: 0; }
}

@media (max-height:600px) and (max-width:520px) {
  .cinema-directory {
    inset: 0;
    width: 100%; height: 100dvh; max-height: 100dvh;
    padding: 8px 12px max(8px, env(safe-area-inset-bottom));
    border-radius: 0; display: flex;
  }
  .cinema-directory__grab { display: none; }
  .cinema-directory__header { align-items: center; padding-bottom: 4px; }
  .cinema-directory__header h3 { font-size: 15px; }
  .cinema-directory__header p { display: none; }
  /* In extremely low heights keep two rows instead of three: scope buttons
     left, category 2×2 grid right, preserving both semantic groups. */
  .cinema-directory__filters {
    grid-template-columns: minmax(0,1fr) minmax(0,2fr);
    align-items: start; gap: 5px; padding-bottom: 4px;
  }
  .cinema-directory__filter-grid { gap: 4px; }
  .cinema-directory__filter-grid--scope { grid-template-columns: 1fr; }
  .cinema-directory__filter-grid--categories {
    grid-template-columns: repeat(2,minmax(0,1fr));
    border-top: 0; padding-top: 0;
  }
  .cinema-directory__filter { min-height: 44px; padding: 3px 4px; gap: 2px; font-size: 9.5px; }
  .cinema-directory__filter-count { font-size: 9px; }
  .cinema-directory__list { min-height: 55px; }
  .cinema-directory__item { min-height: 49px; padding: 3px; }
  .cinema-directory__item img { width: 34px; height: 44px; }
  .cinema-directory__item-title { font-size: 11px; }
  .cinema-directory__item-meta { font-size: 9px; }
  .cinema-directory__footer { padding-top: 3px; margin-top: 3px; }
  .cinema-directory__footer p { display: none; }
}
@media (max-height:340px) and (max-width:520px) {
  .cinema-directory__footer { display: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .cinema-directory { background: var(--portfolio-glass-solid); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .cinema-directory { background: var(--portfolio-glass-solid); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cinema-directory { animation: none; }
  .cinema-directory__filter, .cinema-directory__item { transition: none; }
}
.comet-card {
  --comet-rotate-x: 0deg;
  --comet-rotate-y: 0deg;
  --comet-lift: 0px;
  --comet-press-scale: 1;
  position: relative;
  perspective: 1000px;
  perspective-origin: 50% 48%;
  transform-style: preserve-3d;
}

.comet-card > .comet-archive__card {
  transform: scale(var(--comet-press-scale)) translate3d(0, var(--comet-lift), 0) rotateX(var(--comet-rotate-x)) rotateY(var(--comet-rotate-y));
  transform-style: preserve-3d;
  transition: none;
}

.comet-card--static > .comet-archive__card {
  transform: none;
}

.comet-card--static {
  perspective: none;
  transform-style: flat;
}

.comet-card--static > .comet-archive__card {
  transform-style: flat;
}

.comet-card:hover,
.comet-card:focus-within { --comet-lift: 0px; }

@media (prefers-reduced-motion: reduce) and (pointer: coarse) {
  .comet-card > .comet-archive__card { transform: none !important; transition: none; }
}

@media (hover: none), (pointer: coarse) {
  .comet-card,
  .comet-card > .comet-archive__card {
    perspective: none;
    transform-style: flat;
  }

  .comet-card > .comet-archive__card {
    transform: scale(var(--comet-press-scale));
  }
}
/* Featured: one heading row and one contextual library action.
   Mobile action now follows the headline; the retired pager never renders. */
#projects .section-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 24px;
  max-width: none;
  margin-bottom: 18px;
}
#projects .section-intro > div:first-child { min-width: 0; }
#projects .section-title { margin-bottom: 0; }
#projects-library-link { flex-shrink: 0; }
#projects .archive-more { display: flex; justify-content: flex-end; }
#projects .archive-more a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--apple-text);
  font: 500 13px/1.5 var(--font-body);
  text-decoration: none;
  text-shadow: 0 1px 9px rgba(0, 0, 0, .55);
  white-space: nowrap;
  transition: color 180ms ease;
}
/* The label underline is owned by navigation.css and the shared 5px token,
   rather than a bottom-positioned pseudo-element on the 44px hit target. */
#projects .archive-more a::after { display: none !important; content: none !important; }
#projects .archive-more a:focus-visible {
  outline: 2px solid var(--apple-blue);
  outline-offset: 4px;
}
/* A+ cards use shared flex layout on both pages. The former homepage
   subgrid split captions from the poster and left an empty 22px tail. */
@media (max-width: 720px) {
  #projects .section-intro { display: block; margin-bottom: 22px; }
  /* Isolate the h2 top margin: it must occupy real flow height before the CTA. */
  #projects .section-intro > div:first-child { display: flow-root; }
  #projects .section-intro > .projects-meta-row { display: block; margin-top: 10px; }
  /* Mobile editorial flow follows the left edge of the cover grid.
     Desktop keeps the contextual action on the title's right. */
  #projects .archive-more { justify-content: flex-start; margin-top: 0; padding-right: 0; }
  #projects .archive-more a { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) { #projects .archive-more a { transition: none; } }

/* Shared cover action for Featured and All Work. The full artwork card remains
   the only button, while this single badge is permanently visible at all
   viewports instead of duplicating the status below the caption. */
.comet-archive__image > .comet-archive__play-badge {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100% - 20px);
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: var(--portfolio-control-radius);
  background: rgba(15, 16, 20, .82);
  color: var(--apple-text, #f5f5f7);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .24);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font: 600 11px/1.2 var(--font-body);
  letter-spacing: .01em;
  white-space: nowrap;
  pointer-events: none;
}
@media (max-width: 720px) {
  .comet-archive__image > .comet-archive__play-badge {
    right: 8px;
    bottom: 8px;
    max-width: calc(100% - 16px);
    padding: 6px 9px;
    font-size: 10px;
  }
}

/* Real image element preserves decoded artwork while the cover is composited
   during mobile scroll; CSS-only background images can flash after remount. */
.comet-archive__image {
  position: relative;
  background-image: none !important;
}
.comet-archive__image > .comet-archive__cover {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
  object-position: center;
}

/* Tablet / unfolding-screen portfolio: four columns match desktop while the
   <=720px mobile pager remains two columns. */
@media (min-width: 721px) and (max-width: 1023px) {
  #projects .comet-archive-mobile-shell .comet-archive {
    width: 100%;
    margin-inline: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: clamp(13px, 1.6vw, 20px);
    row-gap: 22px;
    padding-block: 12px 28px;
  }
}


/* Brief but readable location cue for workbench deep links; no new UI. */
.comet-archive__card[data-direct-highlight='true'] .comet-archive__image {
  outline: 2px solid rgba(117, 184, 246, .92);
  outline-offset: 4px;
  box-shadow: 0 0 0 7px rgba(84, 148, 225, .13);
}

/* Shared A+ outer-card hover and keyboard focus are owned by
   UnifiedWorkCard.css. No separate image border or shadow on hover. */
/*
 * A+ Unified Work Card: one glass surface for Featured and All Work.
 * Uses the existing card-surfaces.css tokens, ProjectCard markup, and the
 * mobile continuous Featured grid / category filters / modal player. The entire
 * card button remains the only interactive target.
 */
:is(#projects, .work-library) .comet-archive__card.portfolio-work-card--unified {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-content: unset;
  gap: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--portfolio-work-card-border);
  border-radius: var(--portfolio-work-card-radius);
  color: var(--apple-text);
  background: var(--portfolio-glass-work-shade), var(--portfolio-work-card-surface);
  box-shadow: var(--portfolio-work-card-shadow);
  backdrop-filter: var(--portfolio-glass-blur);
  -webkit-backdrop-filter: var(--portfolio-glass-blur);
  overflow: hidden;
  text-align: left;
  transform: none;
  transition: background-color 220ms var(--apple-ease),
    border-color 220ms var(--apple-ease),
    box-shadow 300ms var(--apple-ease);
}
/* Grid rows must stretch for the shorter titles to share the same bottom
   category baseline with longer ones at narrow desktop widths (721–1023px). */
#projects .comet-archive { align-items: stretch; }
/* Prevent the old homepage three-row subgrid from adding empty space below
   the card. No changes to the homepage four-column or mobile continuous grid. */
#projects .comet-archive__item:has(> .portfolio-work-card--unified) {
  display: block;
  grid-row: auto;
  grid-template-rows: none;
  padding-bottom: 0;
  min-height: 100%;
}
:is(#projects, .work-library) .portfolio-work-card--unified > .comet-archive__image {
  position: relative;
  display: block;
  width: 100%;
  flex: 0 0 auto;
  grid-row: auto;
  aspect-ratio: var(--portfolio-work-cover-ratio);
  overflow: hidden;
  border: 0 !important;
  border-radius: var(--portfolio-work-artwork-radius) !important;
  background-color: #020203 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
  transition: none !important;
}
:is(#projects, .work-library) .portfolio-work-card--unified > .comet-archive__image::after {
  display: none !important;
  opacity: 0 !important;
}
:is(#projects, .work-library) .portfolio-work-card--unified .comet-archive__cover {
  border-radius: inherit;
  transform: none !important;
}
:is(#projects, .work-library) .portfolio-work-card--unified > .comet-archive__title {
  display: block;
  flex: 0 0 auto;
  grid-row: auto;
  align-items: start;
  min-width: 0;
  min-height: 0;
  margin: 9px 7px 0 !important;
  padding: 0;
  font-size: var(--project-card-title-size);
  line-height: var(--project-card-title-line-height);
  font-weight: var(--project-card-title-weight);
  overflow: visible;
}
:is(#projects, .work-library) .portfolio-work-card--unified > .comet-archive__copy {
  position: relative;
  display: block;
  grid-row: auto;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 0;
  margin: auto 7px 0 !important;
  padding: 4px 0 8px !important;
  align-self: stretch;
}
:is(#projects, .work-library) .portfolio-work-card--unified .comet-archive__details {
  max-width: 100%;
  width: 100%;
  padding: 0;
  margin: 0;
}
:is(#projects, .work-library) .portfolio-work-card--unified .comet-archive__details strong {
  min-height: 0;
  margin: 0;
  color: var(--apple-secondary);
}
/* Ready film: one quiet icon, with visible status text reserved for entries
   that have not been uploaded yet. Button ARIA retains Play / 播放. */
:is(#projects, .work-library) .portfolio-work-card--unified .comet-archive__play-badge.is-ready {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(238,245,250,.36);
  border-radius: 50%;
  background: rgba(13,17,23,.78);
  color: var(--apple-text);
  box-shadow: 0 4px 13px rgba(0,0,0,.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: color 220ms var(--apple-ease),
    background-color 220ms var(--apple-ease),
    border-color 220ms var(--apple-ease);
}
.portfolio-work-card__play-icon { display: block; width: 16px; height: 16px; margin: 0; }
.portfolio-work-card__play-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
:is(#projects, .work-library) .portfolio-work-card--unified .comet-archive__play-badge.is-pending {
  max-width: calc(100% - 20px);
  color: var(--apple-text);
  border-color: rgba(238,245,250,.29);
}
@media (hover:hover) and (pointer:fine) {
  :is(#projects, .work-library) .comet-card:has(> .portfolio-work-card--unified):hover > .portfolio-work-card--unified {
    border-color: rgba(205,227,245,.46);
    /* Change only the substrate; preserve the static reading gradient. */
    background-color: color-mix(in srgb, var(--portfolio-work-card-surface), white 5%);
    box-shadow: var(--portfolio-work-card-shadow-hover);
  }
  :is(#projects, .work-library) .portfolio-work-card--unified:hover .comet-archive__play-badge.is-ready {
    border-color: rgba(240,248,255,.66);
    background: rgba(236,245,253,.93);
    color: #1b2c3e;
  }
}
:is(#projects, .work-library) .portfolio-work-card--unified:focus-visible {
  outline: 2px solid var(--accent-blue-focus, #89c5fa) !important;
  outline-offset: -3px !important;
  border-color: rgba(195,225,250,.75);
}
:is(#projects, .work-library) .portfolio-work-card--unified:active {
  box-shadow: var(--portfolio-work-card-shadow) !important;
}
/* The artwork itself has designed type, so never zoom, darken or mask it. */
@media (max-width:720px) {
  :is(#projects, .work-library) .comet-archive__card.portfolio-work-card--unified {
    padding: 6px;
    border-radius: 14px;
  }
  :is(#projects, .work-library) .portfolio-work-card--unified > .comet-archive__image {
    border-radius: 9px !important;
  }
  :is(#projects, .work-library) .portfolio-work-card--unified > .comet-archive__title {
    margin: 7px 5px 0 !important;
  }
  :is(#projects, .work-library) .portfolio-work-card--unified > .comet-archive__copy {
    margin: auto 5px 0 !important;
    padding: 4px 0 7px !important;
  }
  :is(#projects, .work-library) .portfolio-work-card--unified .comet-archive__play-badge.is-ready {
    width: 30px;
    height: 30px;
    right: 8px;
    bottom: 8px;
  }
  .portfolio-work-card__play-icon { width: 15px; height: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(#projects, .work-library) .comet-archive__card.portfolio-work-card--unified,
  :is(#projects, .work-library) .portfolio-work-card--unified .comet-archive__play-badge {
    transition: none !important;
  }
}
@media (prefers-reduced-transparency: reduce) {
  :is(#projects, .work-library) .comet-archive__card.portfolio-work-card--unified {
    background: var(--portfolio-glass-solid);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :is(#projects, .work-library) .comet-archive__card.portfolio-work-card--unified {
    background: var(--portfolio-glass-solid);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Mobile two-column editorial typography: English brand names followed by
   Chinese phrases should wrap at the language boundary, not leave a single
   orphaned glyph ("告") on a second line. Keep all other titles unchanged. */
@media (max-width: 720px) {
  :is(#projects, .work-library) .portfolio-work-card--unified
  > .comet-archive__title--mixed-latin-cjk {
    word-break: keep-all;
    overflow-wrap: anywhere;
  }
}

/* Touch blue is the browser tap flash or focus-visible restored after a modal.
   Never hide true keyboard focus: inputModality clears the touch marker on
   physical-keyboard input, including keyboards attached to phones. */
@media (hover: none) and (pointer: coarse) {
  :is(#projects, .work-library) .portfolio-work-card--unified {
    -webkit-tap-highlight-color: transparent;
  }
  html[data-nav-input="touch"] :is(#projects, .work-library)
    .portfolio-work-card--unified:focus-visible {
    outline: none !important;
    border-color: var(--portfolio-work-card-border);
  }
}
.external-link-sheet {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: end; justify-content: center;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  padding: 16px max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
  box-sizing: border-box;
  animation: external-sheet-fade 190ms var(--apple-ease) both;
}
.external-link-sheet__panel {
  box-sizing: border-box; width: min(100%, 470px); padding: 12px 22px 24px;
  /* Security/confirmation dialogs use solid depth, but the same D+ rim.
     The full-screen sheet already owns the blur; no second filter here. */
  border: 1px solid var(--portfolio-glass-control-border);
  border-radius: 24px;
  background: var(--portfolio-panel-solid, #1d1e21);
  color: var(--apple-text);
  box-shadow: 0 25px 70px rgba(0,0,0,.35), inset 0 1px 0 rgba(252,253,255,.22);
  animation: external-sheet-enter 230ms var(--apple-ease) both;
}
.external-link-sheet__handle { display: block; width: 34px; height: 4px; border-radius: 999px; background: var(--apple-tertiary); margin: 0 auto 22px; opacity: .6; }
.external-link-sheet__eyebrow { margin: 0 0 8px; color: var(--apple-tertiary); font: 500 10px/1.5 var(--font-mono); letter-spacing: .08em; }
.external-link-sheet__panel h2 { font: 600 23px/1.2 var(--font-display); letter-spacing: -.04em; margin: 0 0 14px; }
.external-link-sheet__destination { font: 500 15px/1.5 var(--font-body); margin: 0 0 18px; }
.external-link-sheet__actions { display: grid; gap: 8px; }
.external-link-sheet__continue, .external-link-sheet__cancel {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 47px; padding: 0 16px; border-radius: 14px; box-sizing: border-box;
  font: 600 14px/1.4 var(--font-body); text-decoration: none; cursor: pointer;
}
.external-link-sheet__continue { border: 1px solid rgba(255,255,255,.75); background: #f2f2f3; color: #141518; }
.external-link-sheet__cancel { border: 1px solid var(--portfolio-icon-border); background: var(--portfolio-icon-surface); color: var(--apple-text); }
.external-link-sheet :is(a,button):focus-visible { outline: 2px solid var(--apple-blue); outline-offset: 3px; }
@keyframes external-sheet-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes external-sheet-enter { from { transform: translateY(12px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .external-link-sheet, .external-link-sheet__panel { animation: none; } }
@media (prefers-reduced-transparency: reduce) { .external-link-sheet { backdrop-filter: none; -webkit-backdrop-filter: none; } }

/* Contact sheets share the existing modal surface instead of navigating away. */
.external-link-sheet__contact-note {
  margin: 0 0 12px;
  color: var(--apple-secondary);
  font: 400 13px/1.6 var(--font-body);
}
.external-link-sheet__qr {
  margin: 0 auto 14px;
  width: 200px;
  max-width: 100%;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
}
.external-link-sheet__qr img { display: block; width: 100%; height: auto; object-fit: contain; }
.external-link-sheet__copy-error {
  margin: 10px 0 0;
  color: var(--apple-secondary);
  font: 400 12px/1.5 var(--font-body);
  text-align: center;
}
.external-link-sheet__panel:has(.external-link-sheet__qr) { max-height: calc(100dvh - 24px); overflow-y: auto; }
/*
 * The page is a hybrid shell: static sections live in index.html while
 * selected work and impact evidence are React portals. Keep one surface
 * contract so static HTML and React surfaces render the same material.
 */
:root {
  /* Material roles: panel 24 / content 18 / tile 12 / control pill. */
  --portfolio-panel-radius: 24px;
  --portfolio-content-radius: 18px;
  --portfolio-tile-radius: 12px;
  --portfolio-control-radius: 999px;
  --portfolio-panel-surface: rgba(24, 26, 31, .72);
  /* Higher-opacity chrome is shared by the scrolled homepage and Works
     landing; the Hero and viewer chrome retain the lightweight .72 layer. */
  --portfolio-panel-scrolled-surface: rgba(24, 26, 31, .96);
  --portfolio-panel-solid: #1c1c1e;
  --portfolio-panel-border: rgba(255, 255, 255, .14);
  --portfolio-chrome-rim: rgba(235, 244, 255, .28);
  --portfolio-panel-blur: blur(14px) saturate(1.045);
  /* D+ Cinematic Crystal Glass. Transparency is semantic: the 33% neutral
     substrate is shared; text protection is a static background gradient.
     No extra blurred pseudo-layers, SVG displacement or scroll-driven glare. */
  --portfolio-glass-surface: rgba(24, 26, 31, .33);
  --portfolio-glass-solid: var(--portfolio-panel-solid);
  --portfolio-glass-blur: blur(8px) saturate(1.045);
  --portfolio-glass-text-guard: .62;
  --portfolio-glass-rim-strength: .35;
  /* Higher-value secondary ink remains legible on bright film highlights,
     while the page-level typography palette remains unchanged. */
  --portfolio-glass-secondary-text: #cbd1db;
  --portfolio-glass-tertiary-text: #b7bdc8;
  --portfolio-glass-border: rgba(227, 237, 250, var(--portfolio-glass-rim-strength));
  --portfolio-glass-shadow:
    0 14px 30px rgba(0, 0, 0, .12),
    inset 0 1px 0 rgba(252, 253, 255, calc(var(--portfolio-glass-rim-strength) * .72)),
    inset 1px 0 0 rgba(234, 241, 255, calc(var(--portfolio-glass-rim-strength) * .17)),
    inset -1px 0 0 rgba(205, 229, 255, calc(var(--portfolio-glass-rim-strength) * .09));
  /* Short left-aligned labels: more open on the right, local dark veil on left. */
  --portfolio-glass-short-shade:
    linear-gradient(90deg,
      rgba(5, 7, 11, calc(var(--portfolio-glass-text-guard) * .96)) 0%,
      rgba(5, 7, 11, calc(var(--portfolio-glass-text-guard) * .94)) 25%,
      rgba(5, 7, 11, calc(var(--portfolio-glass-text-guard) * .73)) 52%,
      rgba(5, 7, 11, calc(var(--portfolio-glass-text-guard) * .24)) 82%,
      rgba(5, 7, 11, calc(var(--portfolio-glass-text-guard) * .025)) 100%);
  /* Multi-column reading panels: protect secondary text across full width. */
  --portfolio-glass-reading-shade:
    linear-gradient(180deg,
      rgba(5, 7, 11, calc(var(--portfolio-glass-text-guard) * .80)) 0%,
      rgba(5, 7, 11, calc(var(--portfolio-glass-text-guard) * .89)) 100%);
  /* Work card: keep thumbnails pristine, shade only the area beneath. */
  --portfolio-glass-work-shade:
    linear-gradient(180deg, rgba(5, 7, 11, .02), rgba(5, 7, 11, .09) 74%, rgba(5, 7, 11, calc(var(--portfolio-glass-text-guard) * .68)));
  /* Control Glass is the SAME D+ substrate, optical edge and one blur,
     but a stronger STATIC reading veil protects text over video. Do not
     substitute the nearly-transparent content variant in player menus. */
  --portfolio-glass-control-surface:
    linear-gradient(155deg, rgba(5, 7, 11, .66), rgba(5, 7, 11, .76)),
    var(--portfolio-glass-surface);
  --portfolio-glass-control-blur: var(--portfolio-glass-blur);
  --portfolio-glass-control-border: var(--portfolio-glass-border);
  --portfolio-glass-control-shadow: var(--portfolio-glass-shadow);
  /* Hero's small, all-text action requires a reliably dark substrate in both
     bright/black film frames. It still shares D+ rim, hue and 8px blur. */
  --portfolio-glass-cta-surface: rgba(24, 26, 31, .92);
  --portfolio-glass-cta-hover-surface: rgba(35, 38, 45, .96);
  --portfolio-panel-shadow:
    0 16px 42px rgba(0, 0, 0, .18),
    inset 0 1px 0 rgba(235, 244, 255, .20),
    inset 1px 0 0 rgba(235, 244, 255, .035);
  --portfolio-card-surface: var(--portfolio-panel-surface);
  --portfolio-card-border: var(--portfolio-panel-border);
  --portfolio-card-blur: var(--portfolio-panel-blur);
  --portfolio-card-shadow: var(--portfolio-panel-shadow);
  --portfolio-card-radius: var(--portfolio-panel-radius);
  --portfolio-content-surface: rgba(0, 0, 0, .58);
  --portfolio-content-border: rgba(255, 255, 255, .18);
  --portfolio-content-shadow: 0 14px 34px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .06);
  /* Shared editorial artwork geometry for Featured and All Work.
     Keep the home and library grids independent; standardize their cards. */
  /* Unified A+ work card follows the site's existing content-glass roles. */
  --portfolio-work-card-surface: var(--portfolio-glass-surface);
  --portfolio-work-card-border: var(--portfolio-glass-border);
  --portfolio-work-card-radius: var(--portfolio-content-radius);
  --portfolio-work-artwork-radius: var(--portfolio-tile-radius);
  --portfolio-work-card-shadow: var(--portfolio-glass-shadow);
  --portfolio-work-card-shadow-hover: 0 16px 36px rgba(0,0,0,.20), inset 0 1px rgba(255,255,255,.16);
  --portfolio-work-cover-ratio: 3 / 4;
  --portfolio-work-title-gap: 10px;
  --portfolio-work-caption-gap: 5px;
  --portfolio-work-title-gap-mobile: 8px;
  --portfolio-work-caption-gap-mobile: 4px;
  --portfolio-tile-surface: rgba(255, 255, 255, .05);
  --portfolio-tile-border: rgba(255, 255, 255, .09);
  --portfolio-tile-shadow: none;
  --portfolio-tile-surface-hover: rgba(255, 255, 255, .09);
  --portfolio-modal-surface: rgba(12, 12, 13, .9);
  --portfolio-modal-blur: blur(28px) saturate(1.02);
  /* Separate page, modal fallback and icon-control roles; existing roles stay unchanged. */
  --portfolio-page-surface: #0b0c0f;
  --portfolio-modal-solid: #0c0c0d;
  --portfolio-modal-panel-surface: #191a1e;
  --portfolio-icon-surface: rgba(255, 255, 255, .1);
  --portfolio-icon-border: rgba(255, 255, 255, .34);
  --portfolio-icon-hover-surface: rgba(255, 255, 255, .14);
  --portfolio-icon-active-surface: rgba(255, 255, 255, .18);
  --portfolio-icon-radius: 50%;
}

.impact-glass,
#experiments .flip-experiment,
#top .hero-proof-card,
#profile .closing-card,
header,
header.is-condensed {
  border: 1px solid var(--portfolio-card-border) !important;
  border-radius: var(--portfolio-card-radius) !important;
  background: var(--portfolio-card-surface) !important;
  box-shadow: var(--portfolio-card-shadow) !important;
  backdrop-filter: var(--portfolio-card-blur) !important;
  -webkit-backdrop-filter: var(--portfolio-card-blur) !important;
}

/* One material role for all reading panels on video. Layout and component
   geometry remain component-owned; only surface and blur are shared here. */
.impact-glass,
#experiments .flip-experiment,
#profile .closing-card,
#top .hero-proof-card {
  --portfolio-card-surface: var(--portfolio-glass-reading-shade), var(--portfolio-glass-surface);
  --portfolio-card-border: var(--portfolio-glass-border);
  --portfolio-card-blur: var(--portfolio-glass-blur);
  --portfolio-card-shadow: var(--portfolio-glass-shadow);
  --apple-secondary: var(--portfolio-glass-secondary-text);
  --apple-tertiary: var(--portfolio-glass-tertiary-text);
}
/* Labels in the impact columns additionally use their local impact tokens. */
.impact-glass {
  --impact-signal: var(--portfolio-glass-secondary-text);
  --impact-muted: var(--portfolio-glass-tertiary-text);
}
/* The small Hero proof card is short-form and can keep the more transparent
   right side. Its actual content and radius remain exactly as before. */
#top .hero-proof-card {
  --portfolio-card-surface: var(--portfolio-glass-short-shade), var(--portfolio-glass-surface);
  /* Short card labels may extend into the brighter right-hand region. */
  text-shadow: 0 1px 5px rgba(0, 0, 0, .38);
}

/* Content media is opaque and does not add a second blur layer. */
#top .hero-proof-card {
  border-radius: var(--portfolio-content-radius) !important;
}

#projects .comet-archive__image,
#recognition .impact-award-card,
.impact-award-lightbox img {
  border: 1px solid var(--portfolio-content-border) !important;
  border-radius: var(--portfolio-content-radius) !important;
  background-color: var(--portfolio-content-surface) !important;
  box-shadow: var(--portfolio-content-shadow) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* The interactive Dock keeps the quiet tile material. Platform credentials
   are static evidence inside a single cinematic glass panel, not buttons. */
.floating-dock-item {
  border: 1px solid var(--portfolio-glass-border);
  border-radius: var(--portfolio-tile-radius) !important;
  background: linear-gradient(135deg, rgba(237, 246, 255, .065), transparent 65%), rgba(24, 26, 31, .27);
  color: var(--apple-text, #f5f5f7);
  box-shadow: inset 0 1px 0 rgba(245, 250, 255, .09) !important;
  /* Already inside the blurred reading panel: no second GPU blur. */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.floating-dock-label {
  border: 1px solid var(--portfolio-tile-border);
  border-radius: var(--portfolio-tile-radius);
  background: var(--apple-surface-raised, var(--portfolio-tile-surface));
  color: var(--apple-text, #f5f5f7);
}

/* Eight static creator credentials: no second inset glass box per identity.
   Subtle grid rules are owned by the platform component, not shared chrome. */
#recognition .impact-platform-desktop-tile,
#recognition .impact-platform-mobile-tile {
  border: 0;
  border-radius: 0 !important;
  background: transparent;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Action-shaped controls share a pill; navigation and close controls are true
   circles and keep their geometry independent from content cards. */
.hero-actions button,
.comet-archive__meta {
  border-radius: var(--portfolio-control-radius) !important;
}

.brand,
.footer-avatar,
header .nav-lang,
header .nav-contact-icon,
.nav-toggle,
.mobile-nav-close,
.impact-award-lightbox-nav,
.impact-award-lightbox-close,
.comet-archive-page-arrow,
.footer-social a {
  border-radius: 50% !important;
}

/* Small media controls are part of the content surface contract; their
   opacity and interaction state remain component-owned. */
.impact-award-lightbox-nav,
.impact-award-lightbox-close {
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 50%;
  background: rgba(12, 12, 13, .94);
}

.impact-award-lightbox-nav,
.impact-award-lightbox-close {
  border-color: rgba(255, 255, 255, .42);
  background: rgba(255, 255, 255, .06);
}

/* Glass fallback is owned by the same layer as its normal material.
   Do not replace the modal scrim here: navigation and viewers own that role. */
@media (prefers-reduced-transparency: reduce) {
  .impact-glass,
  #experiments .flip-experiment,
  #top .hero-proof-card,
  #profile .closing-card {
    background: var(--portfolio-glass-solid) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .impact-glass,
  #experiments .flip-experiment,
  #top .hero-proof-card,
  #profile .closing-card {
    background: var(--portfolio-glass-solid) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* Mobile background film changes every frame: repeated 8px per-card
   backdrop sampling competes with video decode. Keep D+ rim, shadows and
   readable tone, but use a stable translucent substrate on touch screens.
   The single floating navigation may still use a lighter live blur. */
@media (max-width: 760px) and (pointer: coarse) {
  :root {
    --portfolio-glass-surface: rgba(24, 26, 31, .72);
    --portfolio-glass-blur: none;
    --portfolio-panel-blur: blur(7px) saturate(1.02);
    --portfolio-modal-blur: blur(12px) saturate(1.02);
  }
}
/*
 * Apple-inspired system layer
 *
 * The video remains the atmosphere. This layer gives every section the same
 * hierarchy: system typography, neutral materials, one blue action color, and
 * calm interruptible transitions.
 */
:root {
  --apple-bg: #000;
  --apple-surface: rgba(28, 28, 30, .78);
  --apple-surface-solid: var(--portfolio-panel-solid);
  --apple-surface-raised: rgba(44, 44, 46, .88);
  --apple-text: #f5f5f7;
  --apple-label: var(--apple-text); /* visible section contact heading */
  --apple-secondary: #a1a1a6;
  --apple-tertiary: #86868b;
  --apple-blue: #2997ff;
  /* Hero CTA semantic tokens. Button geometry and states live only in
     HeroActions.css; keep the secondary legible over both bright and dark
     video footage without adding a second primary-blue action. */
  --hero-cta-height: 48px;
  --hero-cta-height-mobile: 46px;
  --hero-cta-radius: var(--portfolio-control-radius);
  --hero-cta-gap: 12px;
  --hero-cta-font-size: 16px;
  --hero-cta-font-size-mobile: 15px;
  --hero-cta-font-weight: 600;
  /* White 15–16px CTA labels require 4.5:1; #2997ff was only ~3.02:1.
     Keep the site's accent-blue elsewhere; the filled BUTTON alone uses
     Apple's stronger solid-blue role, not an ambient blue halo. */
  --hero-primary-bg: #0071e3;
  --hero-primary-hover-bg: #0066cc;
  --hero-secondary-color: #f5f5f7;
  --hero-subtitle-color: rgba(245, 245, 247, .88);
  --apple-hairline: rgba(255, 255, 255, .14);
  --apple-hairline-soft: rgba(255, 255, 255, .09);
  /* Geometry and shadows are owned by card-surfaces.css. */
  --apple-radius-control: var(--portfolio-control-radius);
  --apple-radius-tile: var(--portfolio-tile-radius);
  --apple-radius-card: var(--portfolio-content-radius);
  --apple-radius-panel: var(--portfolio-panel-radius);
  --apple-shadow-panel: var(--portfolio-panel-shadow);
  --apple-shadow-card: var(--portfolio-content-shadow);
  --apple-ease: cubic-bezier(.22, 1, .36, 1);
  --apple-duration-control: 180ms;
  --apple-duration-card: 320ms;
  --apple-duration-section: 400ms;
  --apple-duration-modal: 260ms;
  --apple-duration-modal-exit: 220ms;
  --apple-motion-modal-offset: 8px;
  --apple-duration-menu: 380ms;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Menlo", "Consolas", "SFMono-Regular", monospace;
  --sans: var(--font-body);
  --display: var(--font-display);
  --mono: var(--font-mono);
  --tech: var(--font-mono);
  --motion-duration-control: var(--apple-duration-control);
  --motion-duration-card: var(--apple-duration-card);
  --motion-duration-section: var(--apple-duration-section);
  --motion-duration-modal: var(--apple-duration-modal);
  --motion-ease-control: var(--apple-ease);
  --motion-ease-emphasized: var(--apple-ease);
  --motion-ease-linear: linear;
  --radius-card: var(--apple-radius-card);
  --radius-panel: var(--apple-radius-panel);
  --radius-tile: var(--apple-radius-tile);
  --apple-impact-row-gap-desktop: clamp(64px, 5vw, 80px);
  --apple-impact-row-gap-mobile: 28px;
  --apple-impact-title-card-gap-desktop: 28px;
  --apple-impact-title-card-gap-mobile: 18px;
  --apple-impact-lab-edge: 48px;
  /* Legacy aliases must point to the canonical chrome glass role.
     Nav capsules and social Dock should never diverge in saturation or fill. */
  --glass-surface: var(--portfolio-panel-surface);
  --glass-surface-raised: var(--apple-surface-raised);
  --glass-border: var(--portfolio-panel-border);
  --glass-border-strong: rgba(255, 255, 255, .32);
  --glass-shadow: var(--portfolio-panel-shadow);
  --glass-blur: var(--portfolio-panel-blur);
  --body-on-dark: var(--apple-text);
  --body-text: rgba(245, 245, 247, .82);
  /* Compatibility aliases for the static index shell. Canonical values live
     here so index.html does not become a second design-system entry point. */
  --accent-blue: var(--apple-blue);
  --accent-blue-focus: var(--apple-blue);
  --accent-blue-on-dark: var(--apple-blue);
  --body-muted: var(--apple-secondary);
  --type-hero: clamp(3.4rem, 6.4vw, 6.2rem);
  /* Semantic heading roles. Keep the existing visual scales while giving
     page, section, and impact headings one explicit source of truth. */
  --page-title-size: var(--section-title-size);
  --page-title-weight: 600;
  --page-title-line-height: 1.08;
  --page-title-letter-spacing: -.05em;
  --section-title-size: clamp(2.45rem, 4.8vw, 4rem);
  /* Avoid the old 56px -> 39px heading jump at the 760/761px boundary.
     Both home sections and the Works title share this responsive scale. */
  --section-title-size-mobile: clamp(37px, 10vw, 41px);
  --section-title-weight: 600;
  --section-title-line-height: 1.02;
  --section-title-letter-spacing: -.055em;
  --impact-title-size: clamp(2.25rem, 3vw, 2.7rem);
  --impact-title-size-mobile: clamp(28px, 8vw, 34px);
  --impact-title-weight: 600;
  --impact-title-line-height: 1.08;
  --impact-title-letter-spacing: -.045em;
  --project-card-title-size: 16px;
  --project-card-title-weight: 600;
  --project-card-title-line-height: 1.4;
  --project-card-detail-size: 12px;
  --project-card-detail-weight: 400;
  --project-card-detail-line-height: 1.55;
  /* Shared detail rail: title-left aligned, 2×14px on the first text line,
     same inset and marker geometry in cards and the cinema viewer. */
  --project-card-marker-width: 2px;
  --project-card-marker-height: 14px;
  --project-card-marker-offset: 2px;
  --project-card-detail-inset: 0px;
  --project-card-detail-gap: 10px;
  --project-card-marker-color: var(--apple-blue);
  --type-body: 14px;
  /* Semantic reading roles shared by home and the separate Works page.
     Micro copy is reserved for labels; normal descriptive text is not micro. */
  --type-supporting: 14px;
  --type-supporting-mobile: 13px;
  --type-caption: 13px;
  --type-caption-mobile: 12px;
  --type-meta: 11px;
  --type-meta-mobile: 10px;
  --type-platform-name-mobile: 12px;
  --type-platform-role-mobile: 11px;
  --heading-rule-radius: 2px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;
  --space-11: 144px;
  --subtle-text: var(--apple-secondary);
  --quiet-text: var(--apple-tertiary);
}

@media (max-width: 760px) {
  :root {
    --page-title-size: var(--section-title-size-mobile);
    --project-card-title-size: 14px;
    --project-card-title-weight: 500;
    --project-card-title-line-height: 1.45;
  }
}

html { background: var(--apple-bg); }
body {
  background: var(--apple-bg);
  font-family: var(--font-body);
  font-optical-sizing: auto;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-optical-sizing: auto; }

/* The video is an environmental layer, not a second interface. */
#hero-video {
  filter: saturate(.82) brightness(.78) contrast(.94);
}
#video-overlay {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .64), rgba(0, 0, 0, .27) 44%, rgba(0, 0, 0, .12) 76%, rgba(0, 0, 0, .24)),
    linear-gradient(180deg, rgba(0, 0, 0, .28), transparent 30%, transparent 76%, rgba(0, 0, 0, .32));
}
#video-vignette { box-shadow: inset 0 0 12vw rgba(0, 0, 0, .28); }

/* Floating navigation chrome, shared by desktop and mobile. */
header,
header.is-condensed {
  position: fixed;
  inset: 14px auto auto 50%;
  width: min(980px, calc(100% - 48px));
  transform: translateX(-50%);
}
header::after {
  position: absolute;
  right: 18px;
  bottom: -8px;
  left: 18px;
  height: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), transparent);
  content: '';
  opacity: .5;
  pointer-events: none;
}
header .nav-inner.shell { width: 100%; min-height: 56px; padding: 0 10px; }
.brand { letter-spacing: -.01em; }
#primary-nav .nav-list { gap: 2px; }
#primary-nav .nav-list a {
  min-height: 34px;
  padding-inline: 13px;
  border-radius: 10px;
  color: rgba(245, 245, 247, .62);
  font: 500 13px/1 var(--font-body);
  transition: color var(--apple-duration-control) var(--apple-ease), background-color var(--apple-duration-control) var(--apple-ease);
}
#primary-nav .nav-list a::after { display: none !important; }
#primary-nav .nav-list a:hover,
#primary-nav .nav-list a:focus-visible,
#primary-nav .nav-list a.is-active {
  background: rgba(255, 255, 255, .08);
  color: var(--apple-text);
}
#primary-nav .nav-list a.is-active { box-shadow: none !important; }
header .nav-lang,
header .nav-contact-icon {
  border-color: var(--apple-hairline) !important;
  background: rgba(255, 255, 255, .04) !important;
  color: var(--apple-secondary) !important;
}

/* One editorial rhythm for every section. */
.section { padding: clamp(112px, 13vw, 168px) 0 clamp(104px, 12vw, 148px); }
.section-intro { margin-bottom: 42px; }
.section-intro .eyebrow,
.eyebrow {
  color: var(--apple-secondary) !important;
  font: 600 10px/1.4 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.section-title {
  margin-top: 12px;
  color: var(--apple-text);
  font-family: var(--font-display);
  font-size: var(--section-title-size);
  font-weight: var(--section-title-weight);
  line-height: var(--section-title-line-height);
  letter-spacing: var(--section-title-letter-spacing);
  text-shadow: none;
}
.page-title {
  color: var(--apple-text);
  font-family: var(--font-display);
  font-size: var(--page-title-size);
  font-weight: var(--page-title-weight);
  line-height: var(--page-title-line-height);
  letter-spacing: var(--page-title-letter-spacing);
}
.impact-title {
  margin: 17px 0 0;
  color: var(--apple-text);
  font-family: var(--font-display);
  font-size: var(--impact-title-size);
  font-weight: var(--impact-title-weight);
  line-height: var(--impact-title-line-height);
  letter-spacing: var(--impact-title-letter-spacing);
  white-space: normal;
  text-wrap: balance;
}
.section-note {
  max-width: 34ch;
  border-left-color: var(--apple-hairline);
  color: var(--apple-secondary);
  font: 400 var(--type-supporting)/1.65 var(--font-body);
}
.reveal {
  transform: translateY(14px);
  transition: opacity var(--apple-duration-section) var(--apple-ease), transform var(--apple-duration-section) var(--apple-ease);
}

/* Hero: one thesis, one action, one quiet secondary route.
   Positioning uses the existing type and color tokens, and must not
   replace or animate the real React typing headline. */
#top .hero-positioning {
  margin: 0;
  padding: 0;
  color: rgba(245, 245, 247, .88);
  font: 650 13px/1.5 var(--font-body);
  letter-spacing: .035em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .94), 0 0 14px rgba(0, 0, 0, .72);
  overflow-wrap: normal;
}
#top .hero-positioning + #hero-title-react-root .hero-title {
  margin-top: 15px;
}
@media (max-width: 720px) {
  #top .hero-positioning {
    font-size: 12px;
    line-height: 1.55;
    letter-spacing: .015em;
  }
}
#top { padding-top: 116px; padding-bottom: 76px; }
.hero-shell { min-height: calc(100svh - 192px); }
.hero-copy { max-width: 720px; margin-top: 0; padding-right: 0; }
.hero-title {
  margin-top: 22px;
  font: 600 clamp(4rem, 7.5vw, 7.2rem)/.94 var(--font-display);
  text-shadow: none;
}
#hero-title .hero-title__prefix { color: var(--apple-text); }
.hero-subtitle {
  max-width: 33ch;
  margin-top: 28px;
  color: var(--hero-subtitle-color);
  font: 400 clamp(15px, 1.4vw, 18px)/1.65 var(--font-body);
  text-shadow: none;
}
/* Hero CTA geometry, interaction and finish belong to HeroActions.css. */
.hero-proof { gap: 12px; }
.hero-proof-card {
  min-height: 112px;
  padding: 18px;
  border-radius: var(--portfolio-card-radius) !important;
}

/* Shared ProjectCard type and detail-marker contract for the home and library. */
.comet-archive__title {
  color: var(--apple-text);
  font-family: var(--font-display);
  font-size: var(--project-card-title-size);
  font-weight: var(--project-card-title-weight);
  line-height: var(--project-card-title-line-height);
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}
.comet-archive__details {
  display: grid;
  grid-template-columns: var(--project-card-marker-width) minmax(0, 1fr);
  align-items: start;
  column-gap: var(--project-card-detail-gap);
  box-sizing: border-box;
  min-width: 0;
  padding-inline-start: var(--project-card-detail-inset);
  text-align: left;
}
.comet-archive__details::before {
  content: '';
  display: block;
  width: var(--project-card-marker-width);
  height: var(--project-card-marker-height);
  margin-block-start: var(--project-card-marker-offset);
  border-radius: var(--heading-rule-radius);
  background: var(--project-card-marker-color);
}
.comet-archive__details strong {
  min-width: 0;
  color: var(--apple-secondary);
  font-family: var(--font-body);
  font-size: var(--project-card-detail-size);
  font-weight: var(--project-card-detail-weight);
  line-height: var(--project-card-detail-line-height);
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Selected work: image-led cards with the same edge and radius roles. */
#projects { padding-top: clamp(104px, 12vw, 150px); }
#projects .section-intro { margin-bottom: 28px; }
#projects .section-note { margin-top: 10px; padding-left: 0; border-left: 0; }
.comet-archive { gap: clamp(16px, 1.8vw, 26px); padding-top: 0; }
.comet-archive__card {
  row-gap: 10px;
  border-radius: var(--apple-radius-card);
  background: transparent;
}
.comet-archive__image {
  border: 1px solid rgba(255, 255, 255, .18) !important;
  border-radius: var(--apple-radius-card) !important;
  background: var(--comet-cover) center / cover no-repeat;
  box-shadow: var(--portfolio-content-shadow) !important;
  transition: border-color var(--apple-duration-control) var(--apple-ease), box-shadow var(--apple-duration-control) var(--apple-ease) !important;
}
.comet-card:hover .comet-archive__image,
.comet-card:focus-within .comet-archive__image {
  border-color: rgba(255, 255, 255, .4) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 18px 38px rgba(0, 0, 0, .34) !important;
}
.comet-archive__image::after { height: 28%; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .6)); }
.comet-archive__meta { color: rgba(245, 245, 247, .76); font-family: var(--font-body); text-decoration-color: rgba(245, 245, 247, .35); }

/* Work history: one panel, one active state, no competing surfaces. */

/* Impact proof: keep the editorial two-column reading order, but share materials. */
#recognition { padding-top: clamp(108px, 12vw, 152px); }
.impact-evidence { gap: 68px; }
.impact-evidence-row { gap: clamp(28px, 5vw, 70px); }
.impact-evidence-label p { color: var(--apple-secondary); font: 400 12px/1.7 var(--font-body); }
.impact-evidence-note,
.impact-logo-head,
.impact-reach-dossier-head { color: var(--apple-tertiary); font-family: var(--font-mono); }
.impact-reach-profile-media { clip-path: inset(0 round var(--portfolio-content-radius)); }
.impact-reach-profile {
  transition: transform var(--apple-duration-card) var(--apple-ease);
}
.impact-reach-profile-shot--link .impact-reach-profile-media {
  transition: box-shadow var(--apple-duration-card) var(--apple-ease),
    transform var(--apple-duration-card) var(--apple-ease);
}
.impact-reach-profile-shot--link .impact-reach-profile-media img {
  transition: transform var(--apple-duration-card) var(--apple-ease);
}

@media (min-width: 761px) and (hover: hover) and (pointer: fine) {
  .impact-reach-profile:hover,
  .impact-reach-profile:focus-within {
    transform: translateY(-4px);
  }
  #impact-reach .impact-reach-profile:hover .impact-reach-profile-media,
  #impact-reach .impact-reach-profile:focus-within .impact-reach-profile-media {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .34), 0 16px 32px rgba(0, 0, 0, .28) !important;
    transform: translateY(-1px);
  }
  #impact-reach .impact-reach-profile:hover .impact-reach-profile-media img,
  #impact-reach .impact-reach-profile:focus-within .impact-reach-profile-media img {
    transform: scale(1.05);
  }
  .impact-reach-profile:hover .impact-reach-profile-caption strong,
  .impact-reach-profile:focus-within .impact-reach-profile-caption strong {
    color: #fff;
  }
}

@media (max-width: 760px) {
  #impact-reach .impact-reach-profile-shot:active .impact-reach-profile-media {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .3), 0 8px 18px rgba(0, 0, 0, .24) !important;
    transform: translateY(-1px);
  }
  #impact-reach .impact-reach-profile-shot:active .impact-reach-profile-media img {
    transform: scale(1.03);
  }
}

/* Desktop impact tabs: one title row and one wide content canvas at a time. */
@media (min-width: 761px) {
  #recognition .recognition-react-root { width: 100%; }
  .impact-evidence-row { display: grid; min-height: 0; align-content: start; scroll-margin-top: 106px; }
  .impact-evidence-label {
    display: grid;
    align-items: end;
    column-gap: 42px;
    /* Align award, creator and media H2s with the parent section and Lab. */
    padding: 0;
  }
  .impact-evidence-label .impact-eyebrow { display: none; }
  .impact-evidence-label h2 {
    grid-row: 1;
  }
  .impact-evidence-label p {
    grid-column: 2;
    grid-row: 1;
    max-width: 32ch;
    margin: 0 0 3px;
    color: var(--apple-secondary);
    font: 400 15px/1.65 var(--font-body);
  }
  .impact-evidence-row > div:last-child { width: 100%; }
  .impact-evidence-row.is-desktop-active > div:last-child > .impact-glass { min-height: 0; }
  .impact-award-shell { display: flex; flex-direction: column; justify-content: center; min-height: 0; }
  .impact-logo-shell { min-height: 0; padding: 20px 28px; }
  .impact-logo-shell > .impact-logo-head,
  .impact-logo-shell > .logo-loop { display: none; }
  /* Keep desktop visibility above the component default after CSS chunk extraction. */
  .impact-logo-shell > .impact-platform-desktop-card { display: block; }
  .impact-platform-desktop-head { display: flex; justify-content: space-between; gap: 20px; color: var(--apple-tertiary); font: 500 10px/1.5 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
  .impact-platform-desktop-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid var(--apple-hairline-soft);
  }
  .impact-platform-desktop-tile {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    min-height: 78px;
    padding: 12px 16px;
    overflow: hidden;
  }
  .impact-platform-desktop-tile > div { min-width: 0; }
  .impact-platform-desktop-tile:not(:nth-child(4n + 1)) {
    border-left: 1px solid var(--apple-hairline-soft) !important;
  }
  .impact-platform-desktop-tile:nth-child(n + 5) {
    border-top: 1px solid var(--apple-hairline-soft) !important;
  }
  .impact-platform-desktop-tile img { display: block; flex: 0 0 36px; width: 36px; height: 36px; object-fit: contain; transition: transform var(--apple-duration-card) var(--apple-ease); }
  .impact-platform-desktop-tile img.logo-loop__image--light { filter: brightness(0) invert(1); }
  .impact-platform-desktop-tile strong { display: block; color: var(--apple-text); font: 600 15px/1.25 var(--font-display); }
  .impact-platform-desktop-tile span { display: block; margin-top: 3px; color: var(--apple-secondary); font: 400 12px/1.45 var(--font-body); overflow-wrap: anywhere; }
  .impact-reach-profile-shot { height: 220px; }
}



/* QR preview is portaled to body, so it needs its own explicit Apple surface
   instead of relying on impact-section variables inherited from the dossier. */
.impact-qr-lightbox {
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(18px) saturate(.9);
  -webkit-backdrop-filter: blur(18px) saturate(.9);
}
.impact-qr-dialog {
  border-radius: var(--apple-radius-panel);
  background: var(--apple-surface-solid);
  box-shadow: var(--apple-shadow-panel);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Selected-work and AI-media links share one quiet, anchored CTA treatment. */
.comet-archive__image > .comet-archive__meta {
  display: inline-flex !important;
  align-items: center;
  padding: 7px 10px !important;
  border: 1px solid rgba(255, 255, 255, .28) !important;
  border-radius: var(--apple-radius-control) !important;
  color: var(--apple-text) !important;
  background: rgba(20, 20, 22, .78) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
  font: 500 9px/1 var(--font-mono) !important;
  letter-spacing: .02em;
  text-decoration: none !important;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity var(--apple-duration-control) var(--apple-ease), transform var(--apple-duration-control) var(--apple-ease), border-color var(--apple-duration-control) var(--apple-ease), background-color var(--apple-duration-control) var(--apple-ease) !important;
}
.comet-card:hover .comet-archive__image > .comet-archive__meta,
.comet-card:focus-within .comet-archive__image > .comet-archive__meta {
  border-color: rgba(255, 255, 255, .56) !important;
  background: rgba(20, 20, 22, .88) !important;
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 720px) {
  .comet-archive-mobile-shell .comet-archive__image > .comet-archive__meta {
    right: 8px;
    bottom: 8px;
    padding: 6px 8px !important;
    font-size: 9px !important;
  }
}

/* AI lab: a quiet list with the same neutral hierarchy as the other modules. */
#experiments { padding-top: clamp(108px, 12vw, 150px); }

/* Footer closes the story with the same calm material and one clear ask. */
footer { padding: 128px 0 36px !important; }
footer::before { background: transparent !important; }
.footer-topline { padding-bottom: 26px; border-bottom-color: var(--apple-hairline-soft) !important; }
.footer-brand-copy strong { font: 600 22px/1 var(--font-display); letter-spacing: -.04em; }
.footer-nav { gap: 28px; }
.footer-nav a { color: var(--apple-secondary); font: 400 13px/1.3 var(--font-body); }
.footer-nav a:hover,
.footer-nav a:focus-visible { color: var(--apple-text); }
.footer-contact-copy {
  max-width: 720px;
  margin-bottom: 28px;
  padding: clamp(32px, 5vw, 56px) clamp(24px, 6vw, 70px);
}
.footer-contact-copy h2 { font: 600 clamp(2.8rem, 6vw, 5rem)/.98 var(--font-display); letter-spacing: -.065em; }
.footer-contact-copy > p { color: #f0f4f6 !important; font: 400 15px/1.65 var(--font-body); }
.footer-contact-direct strong { color: var(--apple-text); font: 500 14px/1.4 var(--font-body); }
.footer-contact-direct a:hover,
.footer-contact-direct a:focus-visible { color: var(--apple-blue); }
.floating-dock-item:hover,
.floating-dock-item:focus-visible { border-color: rgba(227, 237, 250, .52); background: rgba(238, 246, 255, .14); }
.footer-bottom { margin-top: 34px; padding-top: 22px; border-top-color: var(--apple-hairline-soft) !important; }
.footer-bottom-copy { color: var(--apple-tertiary); font: 400 12px/1.5 var(--font-body); }

/* Mobile is a deliberate layout, not a squeezed desktop. */
@media (max-width: 760px) {
  header,
  header.is-condensed { inset: 12px auto auto 50%; width: calc(100% - 24px); border-radius: var(--portfolio-panel-radius) !important; }
  header .nav-inner.shell { min-height: 54px; padding: 0 8px !important; }
  .nav-toggle { border-color: var(--apple-hairline) !important; background: rgba(255, 255, 255, .04) !important; color: var(--apple-text) !important; }
  .nav-toggle:hover,
  .nav-toggle:focus-visible,
  body.mobile-nav-open .nav-toggle { border-color: rgba(255, 255, 255, .34) !important; background: rgba(255, 255, 255, .1) !important; outline: none !important; }
  .mobile-nav-drawer { background: var(--portfolio-modal-surface, rgba(12, 12, 13, .9)) !important; backdrop-filter: var(--portfolio-modal-blur, blur(28px) saturate(1.02)) !important; -webkit-backdrop-filter: var(--portfolio-modal-blur, blur(28px) saturate(1.02)) !important; overscroll-behavior: contain; }
  #mobile-primary-nav .nav-list a { min-height: 58px; border-radius: 14px; font: 600 clamp(1.55rem, 7vw, 2rem)/1 var(--font-display); letter-spacing: -.05em; }
  #mobile-primary-nav .nav-list a:hover,
  #mobile-primary-nav .nav-list a.is-active,
  #mobile-primary-nav .nav-list a.nav-contact:hover,
  #mobile-primary-nav .nav-list a.nav-contact.is-active { border-color: transparent !important; background: transparent !important; box-shadow: none !important; }
  #mobile-primary-nav .nav-list a:focus-visible,
  #mobile-primary-nav .nav-list a.nav-contact:focus-visible { border-color: transparent !important; background: transparent !important; outline: 2px solid var(--apple-blue) !important; outline-offset: 4px; }
  #mobile-primary-nav .nav-list a { color: var(--apple-secondary) !important; }
  #mobile-primary-nav .nav-list a.is-active { color: var(--apple-text) !important; }
  #mobile-primary-nav .nav-list a.nav-contact { font-size: clamp(1.55rem, 7vw, 2rem); line-height: 1; letter-spacing: -.05em; }
  .section { padding: 96px 0 88px; }
  .shell { width: min(100% - 32px, 680px); }
  .section-intro { margin-bottom: 28px; }
  .section-title { margin-top: 10px; font-size: var(--section-title-size-mobile); }
  .section-note { font-size: var(--type-supporting-mobile); }
  #top { padding-top: 100px; padding-bottom: 52px; }
  .hero-shell { min-height: calc(100svh - 152px); align-items: center; }
  .hero-copy { width: 100%; margin-top: 6vh; }
  .hero-title { margin-top: 18px; font-size: clamp(3.4rem, 15vw, 5rem); line-height: .96; }
  .hero-subtitle { max-width: 28ch; margin-top: 24px; font-size: 15px; }
  .hero-proof { display: none; }
  #projects .section-intro { margin-bottom: 22px; }
  .comet-archive { gap: 12px; padding-bottom: 14px; }
  .impact-evidence { gap: 48px; }
  .impact-evidence-row { gap: 18px; }
  .impact-award-shell { border-radius: var(--apple-radius-panel) !important; }
  .impact-logo-shell { border-radius: var(--apple-radius-panel) !important; }
  .impact-reach-dossier { border-radius: var(--apple-radius-panel) !important; }
  footer { padding: 96px 0 28px !important; }
  .footer-topline { padding-bottom: 20px; }
  .footer-contact-copy { padding: 30px 22px; border-radius: var(--apple-radius-panel) !important; text-align: left; }
  .footer-contact-copy h2 { font-size: clamp(2.8rem, 14vw, 4rem); }
  .footer-contact-copy > p { margin-left: 0; }
  .footer-contact-direct { justify-content: flex-start; justify-items: start; }
  .footer-contact-direct a { text-align: left; }
  .footer-contact-panel { justify-self: start; }
  .footer-bottom { align-items: flex-start; margin-top: 24px; padding-top: 18px; }
  .footer-bottom-copy { text-align: left; }
}

/* Supporting legacy footer surfaces keep their own reduced-transparency
   fallback. Main glass and header are owned by their respective contracts. */
@media (prefers-reduced-transparency: reduce) {
  .footer-contact-copy,
  .floating-dock-panel { background: var(--apple-surface-solid) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .reveal { transform: none; }
  .comet-card:hover .comet-archive__image,
  .comet-card:focus-within .comet-archive__image,
  .floating-dock-item:hover,
  .floating-dock-item:focus-visible { transform: none; }
}

/* Mobile impact modules: use the same primary-heading rhythm as the other sections. */
@media (max-width: 720px) {
  #projects .section-note,
  .impact-evidence-label p { display: none; }
  .impact-evidence-label .impact-eyebrow { display: none; }
  .impact-evidence-label p {
    max-width: 30ch;
    margin-top: 14px;
  }
}

/* Motion hierarchy: feedback 180ms, cards 320ms, menus/modules 380ms,
   modals 240ms. Every state stays interruptible and uses the same Apple ease. */
.floating-dock-item {
  transition: transform var(--apple-duration-control) var(--apple-ease),
    background-color var(--apple-duration-control) var(--apple-ease),
    border-color var(--apple-duration-control) var(--apple-ease),
    color var(--apple-duration-control) var(--apple-ease) !important;
}
.floating-dock-item:hover,
.floating-dock-item:focus-visible { transform: translateY(-1px); }

.comet-archive__image > .comet-archive__meta,
.impact-reach-profile-hover-label {
  right: 10px !important;
  bottom: 10px !important;
  transition: opacity var(--apple-duration-control) var(--apple-ease),
    transform var(--apple-duration-control) var(--apple-ease),
    border-color var(--apple-duration-control) var(--apple-ease),
    background-color var(--apple-duration-control) var(--apple-ease) !important;
}

.hero-actions a:active,
.comet-archive__card:active,
.impact-reach-profile-shot--link:active,
.impact-reach-profile-qr:active,
.floating-dock-item:active,
header .nav-lang:active,
header .nav-contact-icon:active,
.nav-toggle:active,
.mobile-nav-close:active,
.footer-social a:active,
.impact-qr-dialog-actions a:active {
  transform: scale(.98);
}

/* Both modal types share one fade in/out envelope. React keeps them mounted
   for the short exit phase, then returns focus to the originating control. */
@keyframes apple-modal-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.impact-award-lightbox,
.impact-qr-lightbox {
  animation: apple-modal-in var(--apple-duration-modal) var(--apple-ease) both !important;
  transition: opacity var(--apple-duration-modal) var(--apple-ease) !important;
}
.impact-award-lightbox.is-closing,
.impact-qr-lightbox.is-closing {
  animation: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* The drawer stays anchored; only its contents and trigger carry motion. */
@media (max-width: 760px) {
  .mobile-nav-drawer,
  .mobile-nav-drawer.is-open {
    transition: opacity var(--apple-duration-menu) var(--apple-ease),
      visibility 0s linear var(--apple-duration-menu) !important;
  }
  .mobile-nav-drawer { transform: none !important; }
  .mobile-nav-drawer.is-open {
    transform: none !important;
    transition-delay: 0s !important;
  }
  body.mobile-nav-open #mobile-primary-nav .nav-list li {
    animation-duration: var(--apple-duration-menu) !important;
    animation-timing-function: var(--apple-ease) !important;
    animation-fill-mode: both !important;
  }
  body.mobile-nav-open #mobile-primary-nav .nav-list li:nth-child(1) { animation-delay: 0ms !important; }
  body.mobile-nav-open #mobile-primary-nav .nav-list li:nth-child(2) { animation-delay: 24ms !important; }
  body.mobile-nav-open #mobile-primary-nav .nav-list li:nth-child(3) { animation-delay: 48ms !important; }
  body.mobile-nav-open #mobile-primary-nav .nav-list li:nth-child(4) { animation-delay: 72ms !important; }
  body.mobile-nav-open #mobile-primary-nav .nav-list li:nth-child(5) { animation-delay: 96ms !important; }
  body.mobile-nav-open #mobile-primary-nav .nav-list li:nth-child(6) { animation-delay: 120ms !important; }
  body.mobile-nav-open #mobile-primary-nav .nav-list li:nth-child(7) { animation-delay: 144ms !important; }
  body.mobile-nav-open #mobile-primary-nav .nav-list li:nth-child(8) { animation-delay: 168ms !important; }
}

@media (prefers-reduced-motion: reduce) {
  .impact-award-lightbox,
  .impact-qr-lightbox,
  .mobile-nav-drawer,
  .mobile-nav-drawer.is-open {
    animation: none !important;
    transition: none !important;
  }
  .impact-award-lightbox.is-closing,
  .impact-qr-lightbox.is-closing { opacity: 0 !important; }
  .floating-dock-item:hover,
.floating-dock-item:focus-visible,
.hero-actions a:active,
.comet-archive__card:active,
.impact-reach-profile-shot--link:active,
.impact-reach-profile-qr:active,
.floating-dock-item:active,
header .nav-lang:active,
header .nav-contact-icon:active,
.nav-toggle:active,
.mobile-nav-close:active,
.footer-social a:active,
.impact-qr-dialog-actions a:active { transform: none !important; }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  body.mobile-nav-open #mobile-primary-nav .nav-list li { animation: none !important; }
}

/* Image tiles are media, not another glass layer. */
.impact-reach-profile-media { background: rgba(0, 0, 0, .24) !important; }
.impact-reach-profile-media img { mix-blend-mode: normal !important; }

/* The closing About and Contact content share one glass surface; the page
   background stays untouched so the story above remains visible as designed. */
#profile.closing-section {
  padding: 64px 0 24px;
  background: transparent;
}
#profile .closing-card {
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--portfolio-panel-border);
  border-radius: var(--portfolio-panel-radius);
  background: var(--portfolio-panel-surface);
  box-shadow: var(--portfolio-panel-shadow);
  -webkit-backdrop-filter: var(--portfolio-panel-blur);
  backdrop-filter: var(--portfolio-panel-blur);
}
.closing-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  align-items: start;
  gap: clamp(28px, 4vw, 56px);
}
/* Two equal reading columns: one role heading and one action heading. */
#profile .closing-about .section-intro { display: block; margin: 0 0 15px; }
#profile .closing-card #profile-title.about-role,
#profile .footer-contact-copy h2 {
  margin: 0;
  color: var(--apple-label);
  font: 600 clamp(24px, 2.3vw, 32px)/1.2 var(--font-display);
  letter-spacing: -.03em;
  text-wrap: balance;
}
#profile .about-copy { width: min(100%, 660px); max-width: 660px; margin: 0; }
#profile .about-description {
  margin: 0;
  max-width: 62ch;
  color: rgba(245, 245, 247, .78);
  font-size: clamp(16px, 1.15vw, 17px);
  line-height: 1.72;
  overflow-wrap: anywhere;
}
#profile .closing-contact { min-width: 0; padding-top: 0; }
#profile .footer-contact-copy {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  text-align: left;
}
#profile .footer-contact-copy > p {
  max-width: 34ch;
  margin: 15px 0 0;
  color: rgba(245, 245, 247, .78);
  line-height: 1.7;
}
#profile .footer-contact-direct {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 12px 20px;
  margin-top: 18px;
}
/* P1 / 2026-11-16 — contacts are primary actions, not passive metadata.
   Keep the established unboxed, right-aligned desktop composition, but
   provide full 44px targets and more legible values without adding buttons. */
#profile .footer-contact-direct a,
#profile .footer-contact-direct a:last-child {
  box-sizing: border-box;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 5px 0;
  border: 0;
  display: inline-grid;
  align-content: center;
  gap: 3px;
  text-underline-offset: 4px;
}
#profile .footer-contact-direct span {
  font: 500 10px/1.45 var(--font-body);
  letter-spacing: .04em;
  color: var(--apple-secondary);
}
#profile .footer-contact-direct strong {
  color: var(--apple-text);
  font: 600 15px/1.4 var(--font-body);
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
@media (hover: hover) and (pointer: fine) {
  #profile .footer-contact-direct a:hover strong {
    text-decoration: underline;
    text-decoration-thickness: 1px;
  }
}
#profile .footer-contact-direct a:focus-visible {
  outline: 2px solid var(--apple-blue);
  outline-offset: 3px;
  border-radius: 3px;
}
#profile .footer-contact-direct a:focus-visible strong {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}
.closing-social {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(22px, 2.6vw, 32px);
  padding-top: 16px;
  border-top: 1px solid var(--apple-hairline-soft);
}
/* Desktop footer shares the editorial columns used by the headings.
   At tablet widths, retain the flexible row to protect six-icon controls. */
@media (min-width: 1024px) {
  #profile .closing-social {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
    align-items: center;
    column-gap: clamp(28px, 4vw, 56px);
  }
  #profile .closing-social #footer-dock-react-root {
    width: 100%;
    justify-content: flex-start;
    min-width: 0;
  }
  #profile .closing-social .floating-dock-panel { gap: 8px; }
}
.closing-social-label {
  flex: 0 0 auto;
  color: var(--apple-tertiary);
  font: 500 10px/1.5 var(--font-mono);
  letter-spacing: .1em;
}
.closing-social #footer-dock-react-root { width: auto; display: flex; justify-content: flex-end; }
.closing-social .floating-dock-shell {
  position: relative;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  padding: 0;
  transform: none;
}
.closing-social .floating-dock-panel {
  gap: 10px;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.closing-social .floating-dock-item {
  min-width: 44px;
  min-height: 44px;
  border-radius: 50% !important;
}
.closing-social .floating-dock-icon,
.closing-social .floating-dock-icon img { width: 20px; height: 20px; }
.closing-social .floating-dock-label {
  top: auto;
  bottom: calc(100% + 8px);
}
.closing-social .floating-dock-status {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-height: 0;
  margin: 0;
  transform: none;
  white-space: normal;
}
/* Profile card composition: left editorial biography, right aligned contact.
   Social dock follows the right column edge on desktop, while phone pages
   stay naturally left-aligned. Match inner card padding, not viewport edges. */
@media (min-width: 721px) {
  #profile .closing-contact {
    display: flex;
    justify-content: flex-end;
  }
  #profile .footer-contact-copy {
    margin-left: auto;
    text-align: right;
  }
  #profile .footer-contact-copy > p { margin-left: auto; }
  #profile .footer-contact-direct { justify-content: flex-end; }
  #profile .footer-contact-direct a { text-align: right; }
  #profile .closing-social #footer-dock-react-root { justify-content: flex-end; }
  #profile .closing-social .floating-dock-panel { justify-content: flex-end; }
}

/* The brand is now a noninteractive visual mark within the contact card.
   Give it the same circular geometry as the adjacent social icon controls.
   No separate footer stacking context, copyright row or decorative line. */
#profile .closing-social .closing-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  min-width: 0;
  height: 46px;
  margin: 0;
  padding: 0 !important;
  background: transparent !important;
  isolation: auto;
  z-index: auto;
}
#profile .closing-footer::before { display: none; }
#profile .closing-social .footer-brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: auto;
  min-height: 46px;
  height: 46px;
  margin: 0;
  padding: 0;
  color: var(--apple-text);
  cursor: default;
  pointer-events: none;
}
#profile .closing-social .footer-avatar {
  box-sizing: border-box;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  margin: 0;
}
#profile .closing-social .footer-brand-copy strong {
  font-size: 17px;
  line-height: 1.15;
}
@media (max-width: 720px) {
  #profile.closing-section { padding: 36px 0 14px; }
  #profile .closing-card { padding: 19px 18px 16px; border-radius: 20px; }
  .closing-card-main { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  #profile .closing-about .section-intro { margin-bottom: 11px; }
  #profile .closing-card #profile-title.about-role,
  #profile .footer-contact-copy h2 { font-size: clamp(27px, 7.5vw, 32px); }
  #profile .about-copy { width: 100%; max-width: none; }
  #profile .about-description { font-size: 15.5px; line-height: 1.64; }
  #profile .closing-contact { padding-top: 0; }
  #profile .footer-contact-copy { width: 100%; max-width: none; }
  #profile .footer-contact-copy > p {
    margin-top: 11px;
    line-height: 1.55;
  }
  #profile .footer-contact-direct { display: grid; gap: 0; margin-top: 10px; }
  #profile .footer-contact-direct a,
  #profile .footer-contact-direct a:last-child {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 7px 0;
    border-top: 1px solid var(--apple-hairline-soft);
  }
  #profile .footer-contact-direct strong { overflow-wrap: anywhere; }
  .closing-social { align-items: flex-start; flex-direction: column; gap: 0; margin-top: 19px; padding-top: 18px; }
  .closing-social #footer-dock-react-root { width: 100%; justify-content: flex-start; }
  #profile .closing-social .floating-dock-shell,
  #profile .closing-social .floating-dock-panel { justify-content: flex-start; }
  .closing-social .floating-dock-shell { max-width: 100%; }
  .closing-social .floating-dock-panel { gap: clamp(2px, 1.2vw, 4px); }
  .closing-social .floating-dock-icon,
  .closing-social .floating-dock-icon img { width: 18px; height: 18px; }
  /* Mobile already identifies the creator in the global navigation.
     Hide the repeated brand row; leave the social icons in one clean line. */
  #profile .closing-social .closing-footer { display: none; }
  #profile .closing-social .floating-dock-item { min-width: 40px; min-height: 40px; }
}

/* Phone navigation spans up to 760px; hide the repeated footer signature
   through that breakpoint, including landscape phones (721–760px). */
@media (min-width: 721px) and (max-width: 760px) {
  #profile .closing-social .closing-footer { display: none; }
  #profile .closing-social { justify-content: flex-start; }
  #profile .closing-social #footer-dock-react-root { width: 100%; justify-content: flex-start; }
  #profile .closing-social .floating-dock-panel { justify-content: flex-start; }
}

@media (prefers-reduced-transparency: reduce) {
  #profile .closing-card {
    background: var(--apple-surface-solid);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Apple-like composition pass: hierarchy comes from type and spacing, not pills
   or hard section dividers. Keep blue for the action/cursor/status roles. */
.section::after { display: none !important; }

@media (min-width: 721px) {
  #primary-nav .nav-list a,
  #primary-nav .nav-list a:hover,
  #primary-nav .nav-list a:focus-visible,
  #primary-nav .nav-list a.is-active {
    border-radius: 0 !important;
    background: transparent !important;
  }
  #primary-nav .nav-list a.is-active {
    box-shadow: none !important;
  }
}

#hero-title .hero-title__rotating { color: var(--apple-text) !important; }
#hero-title .hero-title__rotating .text-type__cursor { background: var(--apple-blue) !important; }
.section-note { padding-left: 0; border-left: 0; }

/* 最终边界层：档案图片不再放大覆盖邻卡，获奖预览在手机端保持可读尺寸。 */
.comet-archive__image { border-color: rgba(255, 255, 255, .18) !important; }
.comet-card:hover .comet-archive__image,
.comet-card:focus-within .comet-archive__image { transform: none !important; }

/* 作品图默认保持干净的媒体边界；只有交互发生时才出现承托跳转标签的渐变，
   避免桌面端每张图的底部都像多出一块黑色漏边。 */
@media (min-width: 721px) {
  .comet-archive__image::after {
    opacity: 0;
    transition: opacity var(--apple-duration-control) var(--apple-ease);
  }
  .comet-card:hover .comet-archive__image::after,
  .comet-card:focus-within .comet-archive__image::after {
    opacity: 1;
  }
}

/* Icon controls share the language button's quiet feedback: edge, surface and
   icon color respond together, while the control keeps its exact geometry. */
.brand,
.footer-avatar,
header .nav-lang,
header .nav-contact-icon {
  transition: border-color var(--apple-duration-control) var(--apple-ease),
    background-color var(--apple-duration-control) var(--apple-ease),
    color var(--apple-duration-control) var(--apple-ease),
    box-shadow var(--apple-duration-control) var(--apple-ease) !important;
}
.brand:hover,
.brand:focus-visible,
.footer-avatar:hover,
.footer-avatar:focus-visible {
  border-color: rgba(255, 255, 255, .34) !important;
  background: rgba(255, 255, 255, .09) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .08) !important;
  transform: none !important;
}
header .nav-lang:hover,
header .nav-lang:focus-visible,
header .nav-contact-icon:hover,
header .nav-contact-icon:focus-visible {
  border-color: rgba(255, 255, 255, .34) !important;
  background: rgba(255, 255, 255, .09) !important;
  color: var(--apple-text) !important;
}
@media (prefers-reduced-motion: reduce) {
  .brand,
  .footer-avatar,
  header .nav-lang,
  header .nav-contact-icon { transition: none !important; }
}

/* Keep the mobile brand mark in the same circular control family as language
   and contact: no inset square, black backing, or extra halo. */
@media (max-width: 760px) {
  header .brand {
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    border-color: var(--apple-hairline) !important;
    background: rgba(255, 255, 255, .04) !important;
    box-shadow: none !important;
  }

  header .brand img {
    width: 100%;
    height: 100%;
    border-radius: 50% !important;
  }
}

/* Work history uses option A: five compact stage labels above one focused
   detail card. Mobile keeps all five labels visible and removes carousel peek. */

/* Mobile work history mirrors the award gallery's paging language. The
   existing five stage tabs remain the primary control; these dots provide a
   thumb-friendly second entry point at the end of the card. */
/* Mobile controls sit below media, never over the artwork. */
@media (max-width: 720px) {
  #projects .comet-archive-mobile-shell .comet-archive__details,
  #projects .comet-archive-mobile-shell .comet-archive__details strong {
    height: auto !important;
    min-height: 0 !important;
  }
  #projects .comet-archive-mobile-shell .comet-archive__image > .comet-archive__meta,
  #impact-reach .impact-reach-profile-hover-label { display: none !important; }
  #projects .comet-archive__mobile-link,
  #impact-reach .impact-reach-mobile-link {
    display: block;
    order: 4;
    padding-block: 6px;
    text-align: right;
    font: 500 11px/1.4 var(--font-body);
    color: var(--apple-secondary);
  }
  #impact-awards .impact-award-shell:not(.impact-award-shell--grid) {
    padding-bottom: 60px !important;
  }
  #impact-awards .impact-award-pagination {
    bottom: 8px;
    left: 58px;
    right: 58px;
  }
  #impact-awards .impact-award-pagination button { flex-shrink: 1 !important; }
  #impact-reach .impact-reach-profile-grid { gap: 16px 12px !important; }
  #impact-reach .impact-reach-profile-shot { flex-direction: column; align-items: stretch; height: auto; }
  #impact-reach .impact-reach-profile-caption { margin-top: 0 !important; }
  #impact-reach .impact-reach-profile-actions { margin-top: 0 !important; }
}

.comet-archive__mobile-link,
.impact-reach-mobile-link { display: none; }
.impact-award-pagination button,
.impact-award-lightbox-nav,
.impact-award-lightbox-close {
  touch-action: manipulation;
}

/* Featured on phones is an eight-card, two-column continuous archive.
   The retired 4-card carousel, swipe offset, paging arrows, dots and
   forward/back keyframes had no mounted React consumers and are removed.
   Keep only the artwork/caption consistency rules still used by ProjectCard;
   the CURRENT grid geometry is owned at the end of this file by #projects. */
.comet-archive-mobile-shell { display: contents; }
.comet-archive-page-arrow,
.comet-archive-pagination { display: none; }
.comet-archive__meta { text-decoration: none !important; }
@media (max-width: 720px) {
  .comet-archive-mobile-shell .comet-archive__item {
    min-width: 0 !important;
    min-height: 0 !important;
    height: 100% !important;
  }
  .comet-archive-mobile-shell .comet-archive__card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
    gap: 0 !important;
  }
  .comet-archive-mobile-shell .comet-archive__title-content--forced-break .comet-archive__title-line {
    display: block !important;
  }
  .comet-archive-mobile-shell .comet-archive__image {
    aspect-ratio: 3 / 4 !important;
    background-color: var(--portfolio-content-surface) !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
  }
  .comet-archive-mobile-shell .comet-archive__image::after,
  .comet-archive-mobile-shell .comet-archive__image > .comet-archive__meta {
    display: none !important;
  }
  .comet-archive-mobile-shell .comet-archive__details {
    height: auto !important;
    min-height: 0 !important;
    min-width: 0 !important;
  }
}

/* Mobile award gallery: one complete portrait at a time, with Apple-style
   paging dots and fixed side controls instead of a clipped carousel peek. */
.impact-award-pagination { display: none; }
@media (max-width: 720px) {
  #impact-awards .impact-award-shell { touch-action: pan-y; }
  .impact-award-pagination {
    position: absolute;
    right: 0;
    bottom: 12px;
    left: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 28px;
    padding: 0;
  }
  .impact-award-pagination button {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    cursor: pointer;
    transform: scaleX(1);
    transform-origin: center;
    transition: transform var(--apple-duration-control) var(--apple-ease), background-color var(--apple-duration-control) var(--apple-ease);
  }
  .impact-award-pagination button.is-active {
    background: var(--apple-text);
    transform: scaleX(3.43);
  }
  .impact-award-pagination button:focus-visible {
    outline: 2px solid var(--apple-text);
    outline-offset: 4px;
  }
}

@keyframes impact-award-mobile-enter {
  from { transform: translateX(8px); }
  to { transform: none; }
}

/* Mobile impact modules: one shared panel height and one title-to-card rhythm. */
@media (max-width: 720px) {
  .impact-evidence {
    --impact-mobile-card-height: 600px;
  }
  .impact-platform-mobile-grid { margin-top: 10px; }
  .impact-platform-mobile-tile {
    min-height: 64px;
    padding: 8px;
  }
  .impact-reach-profile-grid {
    gap: 26px 14px;
  }
  .impact-reach-dossier-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0 12px;
    white-space: nowrap;
  }
  .impact-reach-profile-caption {
    margin-top: 9px;
  }
  .impact-reach-profile-actions {
    display: flex;
    align-items: center;
    min-height: 24px;
    margin-top: 9px;
  }
  .impact-reach-profile-qr {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    color: var(--apple-secondary);
    cursor: pointer;
    font: 500 9px/1 var(--font-mono) !important;
    letter-spacing: .02em;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: none !important;
  }
  .impact-reach-profile-qr:hover,
  .impact-reach-profile-qr:focus-visible {
    color: var(--apple-text);
    outline: none;
  }
  .impact-qr-icon {
    display: block;
    width: 17px;
    height: 17px;
    color: var(--apple-tertiary);
    transition: color var(--apple-duration-control) var(--apple-ease), transform var(--apple-duration-control) var(--apple-ease);
  }
  .impact-reach-profile-qr:hover .impact-qr-icon,
  .impact-reach-profile-qr:focus-visible .impact-qr-icon {
    color: var(--apple-text);
    transform: scale(1.04);
  }
  .impact-qr-lightbox { padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); }
  .impact-qr-dialog { width: min(100%, 320px); padding: 26px 20px 20px; }
  .impact-qr-dialog img { width: min(100%, 220px); }
  .impact-qr-dialog-actions a { min-height: 42px; padding-inline: 13px; }
  .impact-qr-dialog > p:not(.impact-qr-dialog-kicker) { max-width: 100%; text-align: center; }
  html[lang="en"] .impact-platform-mobile-grid { margin-top: 10px; }
  html[lang="en"] .impact-platform-mobile-tile { min-height: 64px; }

}

@media (prefers-reduced-motion: reduce) {
  .impact-award-pagination button { transition: none !important; }
}

/* Desktop award cards keep the full portrait and expose its context below. */
@media (min-width: 761px) {
  .impact-evidence-label { grid-template-columns: minmax(0, 1fr); }
  .impact-evidence-label h2 { grid-column: 1; }
  .impact-award-description,
  .impact-platform-desktop-description,
  .impact-reach-dossier-description { color: var(--apple-secondary); font: 400 var(--type-caption)/1.55 var(--font-body); }
  .impact-award-description { margin: 0 24px 8px; }
  .impact-platform-desktop-description { max-width: 48ch; margin-top: 8px; }
  .impact-reach-dossier-description { margin: -8px 0 20px; }
  /* One quiet 4×2 credential index rather than eight nested glass cards. */
  .impact-platform-desktop-grid { margin-top: 12px; }
  .impact-reach-profile-hover-label {
    right: 12px;
    left: auto;
    transform: translateY(5px);
  }
  .impact-reach-profile-shot:hover .impact-reach-profile-hover-label,
  .impact-reach-profile-shot--link:focus-visible .impact-reach-profile-hover-label {
    transform: translateY(0);
  }
}

/* Featured and All Work share one always-visible Play/Pending glass badge
   inside the cover (ProjectCard.css); no separate caption-row hint. */

/* Expertise rhythm: align the three recognition modules and the nested Lab
   without changing their media layouts or interaction behavior. */
@media (min-width: 761px) {
  #recognition {
    padding-top: clamp(96px, 8vw, 115px);
    padding-bottom: var(--apple-impact-lab-edge);
  }
  #recognition + #experiments { padding-top: var(--apple-impact-lab-edge); }
  .impact-evidence { gap: var(--apple-impact-row-gap-desktop); }
  .impact-evidence-row { gap: var(--apple-impact-title-card-gap-desktop); }
}

@media (max-width: 720px) {
  /* Let the content establish the section height; 100svh belongs to Hero,
     not to every impact module. */
  #recognition { padding: 56px 0 40px; }
  #experiments { padding: var(--apple-impact-lab-edge) 0 56px; }
  .impact-evidence { gap: var(--apple-impact-row-gap-mobile); }
  .impact-evidence-row {
    min-height: 0;
    align-content: start;
    gap: var(--apple-impact-title-card-gap-mobile);
  }
  .impact-evidence-row > div:last-child > .impact-glass { height: auto; }
  .impact-award-shell {
    height: auto;
    padding: 20px 0 56px;
  }
}

/* Typography roles: the impact modules share the same editorial hierarchy.
   This block changes only type metrics and English wrapping; media, behavior,
   content, and section order remain untouched. */
#experiments .section-title,
.impact-platform-desktop-tile strong,
.impact-platform-mobile-tile strong,
.impact-reach-profile-caption strong {
  font-family: var(--font-display);
  font-weight: 600;
}

.impact-evidence-label p,
.impact-award-description,
.impact-platform-desktop-description,
.impact-platform-mobile-tile span,
.impact-reach-dossier-description {
  font-family: var(--font-body);
}

.impact-evidence-note,
.impact-platform-desktop-head,
.impact-platform-mobile-network-head,
.impact-reach-dossier-head,
.impact-reach-profile-caption span {
  font-family: var(--font-mono);
}

@media (max-width: 720px) {
  .impact-title { font-size: var(--impact-title-size-mobile); }

}

/* Round 1: keep the Hero title inside its reading column in every language.
   The legacy 7ch constraint was calibrated for one Chinese line and clips
   the rotating title at narrow mobile and mid-size desktop widths. */
.hero-title {
  max-width: 100% !important;
  font-size: clamp(3.35rem, 6.4vw, 6rem) !important;
  line-height: .98 !important;
  letter-spacing: -.035em !important;
  text-wrap: balance;
  white-space: normal !important;
}

#hero-title .hero-title__prefix,
#hero-title .hero-title__rotating {
  width: auto;
  max-width: 100%;
  overflow-wrap: normal;
}

@media (max-width: 720px) {
  .impact-award-pagination {
    width: fit-content !important;
    max-width: 100%;
    gap: 0 !important;
    min-height: 44px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  /* Award paging indicators are centered against the full gallery. */
  #impact-awards .impact-award-pagination {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
  }

  .impact-award-pagination button {
    position: relative;
    display: grid;
    place-items: center;
    width: 28px !important;
    height: 44px !important;
    min-width: 0;
    flex: 0 0 28px !important;
    min-height: 44px;
    padding: 0 !important;
    border: 0;
    border-radius: 50% !important;
    background: transparent !important;
    transform: none !important;
  }

  .impact-award-pagination button::before {
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    content: '';
    transform: none;
    transform-origin: center;
    transition: width var(--apple-duration-control) var(--apple-ease), background-color var(--apple-duration-control) var(--apple-ease);
  }

  .impact-award-pagination button.is-active::before {
    width: 20px;
    height: 7px;
    background: var(--apple-text);
    transform: none;
  }

  .impact-award-pagination button:focus-visible {
    outline: 2px solid var(--apple-blue) !important;
    outline-offset: -1px;
  }

  /* Award titles are content, not a one-line status label. Let the English
     caption wrap naturally on narrow cards instead of hiding its context. */

  .impact-reach-profile-qr {
    min-width: 44px;
    min-height: 44px;
    padding-inline: 6px;
    margin-inline: -6px;
  }
}

/* 8 award pagination targets cannot coexist with two 44px arrows at 320px
   using the 28px-wide slots. On ultra-narrow phones, retain 24px dot targets,
   keep the 44px arrows and align both edges with the card shell. */
@media (max-width: 389px) {
  #impact-awards .impact-award-pagination button {
    width: 24px !important;
    flex: 0 0 24px !important;
  }
}

/* Round 2: use one vertical rhythm for the impact group and the Lab handoff.
   The award rail keeps its proven portrait height; the platform panel itself
   remains content-sized and only its internal breathing space is reduced. */
@media (min-width: 721px) {
  #recognition {
    padding-bottom: 32px;
  }

  #recognition + #experiments {
    padding-top: 32px;
  }

  .impact-evidence {
    gap: 64px;
  }
}

@media (max-width: 720px) {
  #recognition {
    padding-bottom: 32px;
  }

  #experiments {
    padding-top: 32px;
  }

  .impact-platform-mobile-network {
    padding: 16px 16px 14px;
  }

  .impact-platform-mobile-grid,
  html[lang="en"] .impact-platform-mobile-grid { margin-top: 10px; }

  .impact-platform-mobile-tile,
  html[lang="en"] .impact-platform-mobile-tile {
    min-height: 64px;
    padding: 8px;
  }

  .impact-platform-mobile-tile img {
    width: 28px;
    height: 28px;
  }
}

/* Touch devices do not have a stable hover state. Keep desktop-only lift and
   lightbox hover feedback from sticking after a tap. Focus and :active remain
   available for keyboard and press feedback. */
@media (hover: none), (pointer: coarse) {

  .impact-award-lightbox-nav:hover:not(:focus-visible) {
    transform: none !important;
  }

}

/* Modal-only fallback. Keep normal material tokens and unrelated surfaces intact.
   These late rules intentionally outrank the drawer's earlier !important skin. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  #mobile-nav-drawer,
  .cinema-player::backdrop {
    background: var(--portfolio-modal-solid, #0c0c0d) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  /* Fade menu items, never an opaque fallback scrim. Keep close timing intact. */
  #mobile-nav-drawer { transition-property: visibility !important; }
  #mobile-nav-drawer.is-open,
  #mobile-nav-drawer.is-closing { opacity: 1 !important; }
}
@media (prefers-reduced-transparency: reduce) {
  #mobile-nav-drawer,
  .cinema-player::backdrop {
    background: var(--portfolio-modal-solid, #0c0c0d) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  #mobile-nav-drawer { transition-property: visibility !important; }
  #mobile-nav-drawer.is-open,
  #mobile-nav-drawer.is-closing { opacity: 1 !important; }
}

/* Only close/play icon controls use this material contract. Legacy navigation
   !important rules remain in the shell; this scoped final layer resolves them. */
body.mobile-nav-open header .nav-toggle,
.cinema-player__close,
.cinema-player__play {
  background: var(--portfolio-icon-surface) !important;
  border-color: var(--portfolio-icon-border) !important;
  color: var(--apple-text) !important;
  border-radius: var(--portfolio-icon-radius) !important;
  box-shadow: none !important;
  transition: background-color var(--apple-duration-control) var(--apple-ease), border-color var(--apple-duration-control) var(--apple-ease) !important;
}
body.mobile-nav-open header .nav-toggle:hover,
.cinema-player__close:hover,
.cinema-player__play:hover {
  background: var(--portfolio-icon-hover-surface) !important;
}
body.mobile-nav-open header .nav-toggle:active,
.cinema-player__close:active,
.cinema-player__play:active {
  background: var(--portfolio-icon-active-surface) !important;
  transform: none !important;
}
body.mobile-nav-open header .nav-toggle:focus-visible,
.cinema-player__close:focus-visible,
.cinema-player__play:focus-visible {
  outline: 2px solid var(--apple-blue) !important;
  outline-offset: 4px !important;
}
@media (prefers-reduced-motion: reduce) {
  body.mobile-nav-open header .nav-toggle,
  .cinema-player__close,
  .cinema-player__play { transition: none !important; }
}
/* Media overlays need a stable dark fill against bright footage. Reuse the
   panel material through the same control contract; close controls stay identical. */
.cinema-player__play {
  --portfolio-icon-surface: var(--portfolio-panel-surface);
  --portfolio-icon-hover-surface: var(--apple-surface-raised);
  --portfolio-icon-active-surface: var(--apple-surface-solid);
}

/* Expertise typography and spacing contract.
   H2: main section > four equally ranked child headings.
   The former Impact row gap (5vw / up to 72px), native heading margins,
   and Lab list margin combined into inconsistent title-to-panel distances.
   Own those distances here without changing cards, content or animations. */
:root {
  /* P2: clear hierarchy below the 64px primary section headline. */
  --expertise-subheading-size: clamp(34px, 2.75vw, 40px);
  --expertise-title-panel-gap: 28px;
  --expertise-main-subheading-gap: 44px;
}
#expertise-group > section[id] { scroll-margin-top: var(--anchor-offset); }
#recognition .section-intro {
  display: block;
  margin-bottom: var(--expertise-main-subheading-gap);
}
#recognition .section-intro .section-title { margin: 0; }
#recognition .impact-evidence-row {
  row-gap: var(--expertise-title-panel-gap);
}
#recognition .impact-evidence-label { padding-top: 0; }
#recognition .impact-evidence-label h2,
#experiments .section-title {
  margin: 0;
  font-size: var(--expertise-subheading-size);
  font-weight: var(--impact-title-weight);
  line-height: var(--impact-title-line-height);
  letter-spacing: var(--impact-title-letter-spacing);
}
/* The Lab heading and list are siblings. Do not stack both their old margins. */
#experiments > .shell {
  display: flex;
  flex-direction: column;
  gap: var(--expertise-title-panel-gap);
}
#experiments .section-intro {
  display: block;
  margin: 0;
}
#experiments .flip-experiment { margin-top: 0; }
@media (max-width: 760px) {
  :root {
    --expertise-subheading-size: clamp(26px, 7.3vw, 30px);
    --expertise-title-panel-gap: 20px;
    --expertise-main-subheading-gap: 36px;
    --expertise-card-heading-size: clamp(24px, 6.8vw, 28px);
  }
}

/* Readability only: moving highlights in the hero film must not wash out
   mobile copy. Keep the footage, layout and typing animation intact. */
@media (max-width: 720px) {
  #top .hero-copy .hero-title,
  #top .hero-copy .hero-subtitle {
    text-shadow: 0 2px 9px rgba(0, 0, 0, .77),
                 0 0 22px rgba(0, 0, 0, .46) !important;
  }
}


/* AI Lab is the fourth Expertise submodule, not a standalone page chapter.
   Its #experiments anchor, project previews and bilingual text remain intact. */
#expertise-group #experiments.expertise-lab-subsection {
  padding-top: 32px;
  padding-bottom: clamp(30px, 3vw, 44px);
}
#expertise-group #experiments.expertise-lab-subsection .section-title {
  text-shadow: 0 1px 6px rgba(0,0,0,.42);
}
/* The three Expertise evidence modules use a 28px vertical gap on
   narrow phones (<=720px). AI Lab uses that SAME gap. At 721–760px,
   Expertise itself uses the wider 64px row rhythm, so we keep its shared
   32px + 32px gap rather than making AI Lab feel unusually compressed. */
@media (max-width: 720px) {
  #expertise-group #recognition {
    padding-bottom: 0;
  }
  #expertise-group #experiments.expertise-lab-subsection {
    padding-top: 28px;
    padding-bottom: 28px;
  }
}
/* Copyright is plain metadata, never a second thin divider beneath the logo. */
#profile .closing-footer .footer-copyright-row .footer-bottom-copy {
  display: block !important;
  border: 0 !important;
}


@media (max-width: 359px) {
  /* Keep six 44px touch targets inside the footer card even at 320px:
     6 × 44px = 264px, so this narrow-only card needs 12px insets. */
  #profile .closing-card { padding-inline: 12px; }
  #profile .closing-social .floating-dock-panel {
    gap: 0;
    max-width: 100%;
    width: auto;
    justify-content: flex-start;
    padding: 0;
  }
  #profile .closing-social #footer-dock-react-root {
    margin-left: 0;
    width: 100%;
  }
}

/* 2026-11 | Featured mobile editorial grid — all eight works, no carousel.
   One 2-column / 4-row continuous gallery. Remove the redundant enclosing
   glass/frame; individual ProjectCards retain the identical A+ glass surface
   used on Works. Desktop four-column layout is untouched. */
@media (max-width: 720px) {
  #projects .comet-archive-mobile-shell {
    display: contents !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible !important;
  }
  #projects .comet-archive-mobile-shell .comet-archive {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: none !important;
    grid-auto-rows: auto !important;
    grid-auto-flow: row !important;
    column-gap: clamp(10px, 3vw, 14px) !important;
    row-gap: clamp(12px, 3.5vw, 16px) !important;
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    overscroll-behavior: auto !important;
    touch-action: pan-y !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
  }
  #projects .comet-archive-page-arrow,
  #projects .comet-archive-pagination { display: none !important; }
  #projects .archive-more {
    justify-content: flex-start;
    margin-top: 0;
  }
  /* More room is gained from two extra real rows; don't insert empty screens. */
  #projects { padding-bottom: 42px; }
}
/* Shared capsule geometry: the existing home capsule is the reference. */
html { scrollbar-gutter: stable; }
body > header, body > header.is-condensed, .cinema-player__navigation {
  position: fixed !important; inset: auto !important;
  left: 50% !important; top: max(14px, env(safe-area-inset-top)) !important;
  transform: translateX(-50%) !important;
  width: min(980px, calc(100% - 48px)) !important; height: 58px !important;
  box-sizing: border-box; border: 1px solid var(--portfolio-chrome-rim, rgba(235,244,255,.28)) !important;
  border-radius: var(--portfolio-panel-radius) !important;
  background: var(--portfolio-panel-surface) !important;
  -webkit-backdrop-filter: var(--portfolio-panel-blur) !important;
  backdrop-filter: var(--portfolio-panel-blur) !important;
  box-shadow: var(--portfolio-panel-shadow) !important;
  transition: none !important;
}
body > header { z-index: 70; }
.cinema-player__navigation { z-index: 3; }
header .nav-inner.shell { position: relative; width: 100%; height: 100%; min-height: 0 !important; padding: 0 !important; }
header #primary-nav { display: none !important; }
header .nav-contact-icon { display: none !important; }
header .brand, .cinema-player__brand {
  position: absolute !important; left: 10px; top: 10px; width: 36px; height: 36px;
  display: block; overflow: visible !important; padding: 0 !important; margin: 0 !important; box-sizing: border-box;
  border: 1px solid var(--portfolio-panel-border) !important; border-radius: 50% !important;
  background: var(--portfolio-tile-surface) !important;
}
header .brand img, .cinema-player__brand img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
header .nav-brand-name, .cinema-player__brand span {
  display: block !important; position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  color: var(--apple-text); font: 600 13px/1 var(--font-body); white-space: nowrap; letter-spacing: 0;
}
/* The Works return matches the home avatar's visible diameter (36px desktop,
   44px mobile) inside a permanent 44px touch target. Only the circular material
   brightens; the icon and label never move. */
.cinema-player__brand-arrow,
.cinema-player__brand-home { display: none !important; }
.library-page-navigation .cinema-player__brand--home-return {
  left: 6px !important;
  top: 6px !important;
  width: 44px !important;
  height: 44px !important;
  display: grid !important;
  place-items: center;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--apple-text) !important;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: none !important;
}
.library-page-navigation .cinema-player__brand--home-return::before {
  position: absolute;
  inset: 4px;
  border: 1px solid var(--portfolio-panel-border);
  border-radius: 50%;
  background: var(--portfolio-tile-surface);
  content: '';
  pointer-events: none;
  transition: background-color var(--apple-duration-control) var(--apple-ease);
}
.library-page-navigation .cinema-player__brand--home-return:hover::before {
  background: var(--portfolio-tile-surface-hover);
}
.library-page-navigation .cinema-player__brand--home-return:active::before {
  background: var(--portfolio-icon-active-surface);
}
.library-page-navigation .cinema-player__brand--home-return img,
.library-page-navigation .cinema-player__brand--home-return .cinema-player__brand-name { display: none !important; }
.library-page-navigation .cinema-player__brand--home-return .cinema-player__brand-arrow {
  position: relative;
  display: block !important;
  width: 16px;
  height: 16px;
}
.library-page-navigation .cinema-player__brand--home-return .cinema-player__brand-home {
  display: block !important;
  left: calc(100% + 8px);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--apple-text);
}
@media (max-width: 760px) {
  .library-page-navigation .cinema-player__brand--home-return { left: 8px !important; top: 5px !important; }
  .library-page-navigation .cinema-player__brand--home-return::before { inset: 0; border-color: var(--portfolio-icon-border); background: var(--portfolio-icon-surface); }
  .library-page-navigation .cinema-player__brand--home-return:hover::before { background: var(--portfolio-icon-hover-surface); }
  .library-page-navigation .cinema-player__brand--home-return .cinema-player__brand-arrow { width: 18px; height: 18px; }
  .library-page-navigation .cinema-player__brand--home-return .cinema-player__brand-home { left: calc(100% + 12px); font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .library-page-navigation .cinema-player__brand--home-return::before { transition: none; }
}

header .nav-toggle, .cinema-player__navigation .cinema-player__close {
  position: absolute !important; inset: auto !important; top: 6px !important;
  display: grid !important; place-items: center; width: 44px !important; height: 44px !important;
  min-width: 44px !important; min-height: 44px !important; padding: 0 !important; margin: 0 !important;
  border: 1px solid var(--portfolio-icon-border) !important; border-radius: var(--portfolio-icon-radius) !important;
  background: var(--portfolio-icon-surface) !important; color: var(--apple-text) !important;
  box-shadow: none !important; cursor: pointer; touch-action: manipulation;
  transition: background-color var(--apple-duration-control) var(--apple-ease), color var(--apple-duration-control) var(--apple-ease) !important;
}
header .nav-toggle, .cinema-player__navigation .cinema-player__close { right: 10px !important; }
header .nav-toggle svg, .cinema-player__navigation button svg { width: 18px; height: 18px; }
/* B++ quiet segmented language control; one shared material for the
   static header, Works landing, cinema, award and account viewers. */
.nav-language-switch {
  position: absolute !important;
  top: 9px !important;
  right: 10px !important;
  box-sizing: border-box;
  display: flex !important;
  align-items: stretch;
  flex: none;
  width: 100px !important;
  min-width: 100px !important;
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 2px !important;
  border: 1px solid var(--portfolio-icon-border) !important;
  border-radius: var(--portfolio-control-radius) !important;
  background: var(--portfolio-icon-surface) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06) !important;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--apple-text);
  isolation: isolate;
  white-space: nowrap;
}
/* The rightmost desktop action belongs to Close inside detail viewers,
   but to Language on the ordinary Works page. */
@media (min-width:761px) {
  .cinema-player__navigation .cinema-player__language { right: 68px !important; }
  .library-page-navigation .cinema-player__navigation .cinema-player__language { right: 10px !important; }
}
.nav-language-switch__thumb {
  position: absolute;
  z-index: 0;
  inset: 2px auto 2px 2px;
  width: calc((100% - 4px) / 2);
  border: 1px solid rgba(255,255,255,.19);
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09);
  transform: translateX(0);
  /* B+++ motion: a slower, balanced travel with restrained elastic
     stretch via WAAPI on individual scale, never on transform.
     Keeping translation in CSS makes rapid reversals continuous. */
  transition: transform 330ms cubic-bezier(.32,.72,.28,1);
  will-change: transform;
  pointer-events: none;
}
.nav-language-switch[data-active-lang="en"] .nav-language-switch__thumb { transform: translateX(100%); }
.nav-language-switch > button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(245,245,247,.7) !important;
  font: 600 11.5px/1 var(--font-body);
  letter-spacing: 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 265ms cubic-bezier(.32,.72,.28,1), scale 165ms ease-out !important;
}
.nav-language-switch > button:active { scale: .975; }
.nav-language-switch > button[aria-pressed="true"] { color: #fff !important; }
.nav-language-switch > button:hover { color: #fff !important; }
.nav-language-switch > button:focus-visible {
  outline: 2px solid var(--apple-blue) !important;
  outline-offset: -3px !important;
}
.nav-language-switch__zh-short { display: none; }
@media (max-width:760px) {
  .nav-language-switch {
    top: 7px !important;
    right: 60px !important;
    width: 94px !important;
    min-width: 94px !important;
    height: 40px !important;
    min-height: 40px !important;
  }
  /* The visual capsule stays 40px high; the transparent button hitboxes
     extend 2px past it to reach the 44x44px mobile touch target. */
  .nav-language-switch > button {
    height: 44px;
    min-height: 44px;
    align-self: center;
  }
  .nav-language-switch__zh-long { display: none; }
  .nav-language-switch__zh-short { display: inline; }
}
/* B++ detail-mode continuity: actions move, but their shared navigation
   capsule stays fixed. On exit these motions reverse before it unmounts.
   Do not apply to the ordinary Works bar or the mobile menu's '=' to '×'. */
@media (min-width:761px) and (prefers-reduced-motion:no-preference) {
  :is(.cinema-player,.impact-award-lightbox,.impact-profile-lightbox,.lab-project-lightbox) > .cinema-player__navigation .cinema-player__language {
    transform: translateX(58px);
    transition: transform 220ms var(--apple-ease) !important;
  }
  :is(.cinema-player,.impact-award-lightbox,.impact-profile-lightbox,.lab-project-lightbox).is-motion-visible > .cinema-player__navigation .cinema-player__language {
    transform: translateX(0);
  }
  :is(.cinema-player,.impact-award-lightbox,.impact-profile-lightbox,.lab-project-lightbox) > .cinema-player__navigation .cinema-player__close {
    opacity: 0;
    transform: scale(.92);
    transition: opacity 190ms var(--apple-ease),transform 220ms var(--apple-ease) !important;
  }
  :is(.cinema-player,.impact-award-lightbox,.impact-profile-lightbox,.lab-project-lightbox).is-motion-visible > .cinema-player__navigation .cinema-player__close {
    opacity: 1;
    transform: scale(1);
  }
}
/* Maintain the shared control material when OS transparency is reduced. */
@media (prefers-reduced-transparency:reduce) {
  .nav-language-switch { background: var(--portfolio-panel-solid) !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  .nav-language-switch { background: var(--portfolio-panel-solid) !important; }
}
@media (prefers-reduced-motion:reduce) {
  .nav-language-switch__thumb, .nav-language-switch > button { transition: none !important; }
  .nav-language-switch > button:active { scale: 1; }
}
:is(header .nav-toggle,.cinema-player__navigation .cinema-player__close):hover { background: var(--portfolio-icon-hover-surface) !important; }
:is(header .nav-toggle,.cinema-player__navigation .cinema-player__close):active { background: var(--portfolio-icon-active-surface) !important; }
:is(header .nav-toggle,.cinema-player__navigation .cinema-player__close,.cinema-player__brand):focus-visible {
  outline: 2px solid var(--apple-blue) !important; outline-offset: 4px !important;
}
/* Auto-focused Close remains in the accessibility tree. A touch-opened
   dialog should not get Safari's / Chromium's bright blue keyboard ring,
   but Tab navigation (including a paired phone keyboard) still must. */
@media (hover: none) and (pointer: coarse) {
  :is(header .nav-language-switch button, header .nav-toggle, .mobile-nav-close,
      .cinema-player__navigation button) {
    -webkit-tap-highlight-color: transparent;
  }
  html[data-nav-input="touch"]
    :is(header .nav-language-switch button, header .nav-toggle, .mobile-nav-close,
        .cinema-player__navigation button):focus-visible {
    outline: none !important;
  }
}
body.mobile-nav-open { overflow: hidden; }
/* All viewers hide the source-page navigation, showing only CinemaNavigation. */
body.cinema-open > header, body.award-viewer-open > header, body.profile-viewer-open > header, body.lab-viewer-open > header,
body.cinema-open .library-page-navigation, body.profile-viewer-open .library-page-navigation { visibility: hidden !important; }
.library-page-navigation .cinema-player__navigation { z-index: 70; }
.site-primary-nav {
  display: none;
  align-items: center;
  justify-content: center;
  gap: clamp(2px, .45vw, 8px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-primary-nav > li { flex: 0 0 auto; }
.site-primary-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 38px;
  padding: 0 clamp(7px, .7vw, 11px);
  border: 0;
  background: transparent;
  color: rgba(245,245,247,.68);
  font: 500 clamp(11px, .9vw, 13px)/1.2 var(--font-body);
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--apple-duration-control) var(--apple-ease);
}
.site-primary-nav a:hover,
.site-primary-nav a.is-active { color: var(--apple-text); }
/* Legacy container-bottom underline is intentionally retired: its spacing
   was unrelated to the text glyphs and varied between pages. */
.site-primary-nav a::after { display: none !important; }
/* Link emphasis: a single typography-owned underline vocabulary for the
   persistent desktop nav, social actions, AI Lab actions and GitHub source.
   The 5px offset is measured from text glyphs, not from a padded hit area.
   Blue is reserved for focus rings and other functional status indicators. */
:root {
  --portfolio-link-underline-offset: 5px;
  --portfolio-link-underline-weight: 1px;
  --portfolio-link-rule-active: rgba(245, 245, 247, .84);
  --portfolio-link-rule-hover: rgba(245, 245, 247, .66);
}
:is(.site-primary-nav a, .impact-reach-action, .flip-experiment__detail, .lab-project-source, .archive-more a) > .portfolio-link-label {
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-style: solid;
  text-decoration-thickness: var(--portfolio-link-underline-weight);
  text-underline-offset: var(--portfolio-link-underline-offset);
  text-decoration-skip-ink: none;
  transition: text-decoration-color var(--apple-duration-control) var(--apple-ease);
}
.site-primary-nav a.is-active > .portfolio-link-label {
  text-decoration-color: var(--portfolio-link-rule-active);
}
.site-primary-nav a:not(.is-active):is(:hover,:focus-visible) > .portfolio-link-label,
:is(.impact-reach-action, .flip-experiment__detail, .lab-project-source, .archive-more a):is(:hover,:focus-visible) > .portfolio-link-label {
  text-decoration-color: var(--portfolio-link-rule-hover);
}
:is(.impact-reach-action, .flip-experiment__detail, .lab-project-source, .archive-more a):is(:hover,:focus-visible) {
  color: var(--apple-text);
}
@media (prefers-reduced-motion: reduce) {
  :is(.site-primary-nav a, .impact-reach-action, .flip-experiment__detail, .lab-project-source, .archive-more a) > .portfolio-link-label {
    transition: none;
  }
}

.site-primary-nav a:focus-visible { outline: 2px solid var(--apple-blue); outline-offset: 3px; }
.library-page-navigation .cinema-player__navigation > .site-primary-nav { display: none; }
.library-page-navigation .cinema-player__navigation > .cinema-player__close { display: grid; }
.library-nav-space { height: 92px; }
.library-menu {
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none;
  margin: 0; padding: max(112px,calc(env(safe-area-inset-top) + 96px)) 24px max(28px,env(safe-area-inset-bottom));
  border: 0; box-sizing: border-box; background: transparent; color: var(--apple-text); overflow: auto;
}
.library-menu::backdrop, .impact-award-lightbox::before {
  background: var(--portfolio-modal-surface) !important;
  -webkit-backdrop-filter: var(--portfolio-modal-blur) !important; backdrop-filter: var(--portfolio-modal-blur) !important;
}
.shared-menu-links { display: grid; gap: 8px; width: min(932px,100%); margin: 24px auto 0; }
.shared-menu-links a { display: flex; align-items: center; min-height: 58px; padding: 0 14px; color: var(--apple-secondary); text-decoration: none; font: 600 clamp(1.55rem,7vw,2rem)/1 var(--font-display); letter-spacing: -.05em; }
.shared-menu-links a:hover { color: var(--apple-text); }
.shared-menu-links a:focus-visible { outline: 2px solid var(--apple-blue); outline-offset: 2px; }
/* Keep blur on a sibling paint layer: a filtered scroll container otherwise
   makes its fixed capsule scroll away with the award image. */
.impact-award-lightbox, .impact-award-lightbox.is-closing { background: transparent !important; opacity: 1 !important; animation: none !important; transition: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
/* Fade the image rather than the blur ancestor, which would prevent the
   pseudo-element from sampling the page behind it. */
/* Modal motion is reversible: the fixed glass layer stays anchored and only
   its opacity and the content's short GPU-composited offset change. */
.impact-award-lightbox figure {
  animation: none !important;
  opacity: 0;
  transform: translate3d(0,var(--apple-motion-modal-offset),0);
  transition: opacity var(--apple-duration-modal) var(--apple-ease),
              transform var(--apple-duration-modal) var(--apple-ease);
}
.impact-award-lightbox.is-motion-visible figure { opacity: 1; transform: translate3d(0,0,0); }
.impact-award-lightbox.is-closing figure {
  opacity: 0;
  transform: translate3d(0,6px,0);
  transition-duration: var(--apple-duration-modal-exit);
}
.impact-award-lightbox::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .94;
  transition: opacity var(--apple-duration-modal) var(--apple-ease);
}
.impact-award-lightbox.is-motion-visible::before { opacity: 1; }
.impact-award-lightbox.is-closing::before { opacity: 0; transition-duration: var(--apple-duration-modal-exit); }
/* Keyboard focus uses one functional blue across evidence cards, account
   actions and the shared viewer; hover styling remains component-owned. */
:is(#impact-awards .impact-award-card,
    #impact-reach .impact-reach-action,
    .impact-profile-dialog-action):focus-visible {
  outline: 2px solid var(--apple-blue) !important;
  outline-offset: 3px !important;
}

/* Unified ghost-circle navigation: Awards viewer and cinema work switcher.
   No background at rest; one circular hover/focus treatment without layout shift.
   44px/48px target sizes remain stable on touch, with the same 20px chevron. */
:is(.cinema-player__sequence > button,.impact-award-lightbox-nav,.impact-profile-pagination-arrow,.lab-project-pagination > button) {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: var(--apple-secondary);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color var(--apple-duration-control) var(--apple-ease),
    border-color var(--apple-duration-control) var(--apple-ease),
    color var(--apple-duration-control) var(--apple-ease),
    opacity var(--apple-duration-control) var(--apple-ease);
}
.cinema-player__sequence > button { flex: 0 0 44px; width: 44px; height: 44px; }
:is(.impact-profile-pagination-arrow,.lab-project-pagination > button) { box-sizing: border-box; flex: 0 0 44px; width: 44px; height: 44px; }
.impact-award-lightbox-nav { flex: 0 0 48px; width: 48px; height: 48px; }
:is(.cinema-player__sequence > button svg,.impact-award-lightbox-nav svg,.impact-profile-pagination-arrow svg,.lab-project-pagination > button svg) {
  display: block;
  width: 20px;
  height: 20px;
}
/* Hover is a fine-pointer affordance only: iOS tap must not latch the ring. */
@media (hover: hover) and (pointer: fine) {
  :is(.cinema-player__sequence > button,.impact-award-lightbox-nav,.impact-profile-pagination-arrow,.lab-project-pagination > button):hover:not(:disabled) {
    border-color: var(--portfolio-icon-border) !important;
    background: var(--portfolio-icon-hover-surface) !important;
    color: var(--apple-text);
    transform: none;
  }
}
:is(.cinema-player__sequence > button,.impact-award-lightbox-nav,.impact-profile-pagination-arrow,.lab-project-pagination > button):focus-visible {
  border-color: var(--portfolio-icon-border) !important;
  background: var(--portfolio-icon-hover-surface) !important;
  color: var(--apple-text);
}
:is(.cinema-player__sequence > button,.impact-award-lightbox-nav,.impact-profile-pagination-arrow,.lab-project-pagination > button):active:not(:disabled) {
  background: var(--portfolio-icon-active-surface) !important;
}
:is(.cinema-player__sequence > button,.impact-award-lightbox-nav,.impact-profile-pagination-arrow,.lab-project-pagination > button):focus-visible {
  outline: 2px solid var(--apple-blue);
  outline-offset: 4px;
}
:is(.cinema-player__sequence > button,.impact-profile-pagination-arrow,.lab-project-pagination > button):disabled { opacity: .32; cursor: progress; }
@media (prefers-reduced-motion: reduce) {
  :is(.cinema-player__sequence > button,.impact-award-lightbox-nav,.impact-profile-pagination-arrow,.lab-project-pagination > button) { transition: none; }
}
@media (max-width:760px) {
  body > header, body > header.is-condensed, .cinema-player__navigation { top: max(12px,env(safe-area-inset-top)) !important; width: calc(100% - 24px) !important; height: 56px !important; }
  header .brand, .cinema-player__brand { left: 8px; top: 5px; width: 44px; height: 44px; }
  header .nav-toggle, .cinema-player__navigation .cinema-player__close { top: 5px !important; }
  header .nav-toggle, .cinema-player__navigation .cinema-player__close { right: 8px !important; }
  .library-nav-space { height: 76px; }
}
/* Tablets have enough room for the existing four-label navigation.
   Keep the shared capsule, active state and language control identical to desktop. */
/* Mobile menu button must not visually jump when '=' morphs into '×'.
   Existing global :active scales controls and open/hover states brighten
   the circle. Keep the 44px hit area and material identical throughout;
   only the two SVG paths animate. Keyboard focus rules remain intact. */
@media (max-width:760px) {
  header .nav-inner.shell .nav-toggle,
  header .nav-inner.shell .nav-toggle:hover,
  header .nav-inner.shell .nav-toggle:active,
  body.mobile-nav-open header .nav-inner.shell .nav-toggle,
  body.mobile-nav-open header .nav-inner.shell .nav-toggle:hover,
  body.mobile-nav-open header .nav-inner.shell .nav-toggle:active {
    transform: none !important;
    background: var(--portfolio-icon-surface) !important;
    border-color: var(--portfolio-icon-border) !important;
    box-shadow: none !important;
    transition: none !important;
  }
}
@media (min-width:761px) {
  header #primary-nav {
    position: absolute !important;
    inset: 0 auto 0 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: max-content;
    min-width: 0;
    transform: translateX(-50%) !important;
  }
  header #primary-nav > #desktop-primary-nav-root { width: max-content; min-width: 0; }
  header #primary-nav .site-primary-nav { display: flex; }
  header .nav-toggle { display: none !important; }
  .library-page-navigation .cinema-player__navigation > .site-primary-nav {
    position: absolute;
    inset: 0 auto 0 50%;
    display: flex;
    width: max-content;
    min-width: 0;
    transform: translateX(-50%);
  }
  .library-page-navigation .cinema-player__navigation > .cinema-player__close { display: none !important; }
}
/* Extend the existing mobile menu to desktop; its links and click handlers stay
   authoritative, rather than adding a second home navigation implementation. */
@media (min-width:761px) {
  #mobile-nav-drawer { position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; padding: 112px max(24px,calc((100% - 980px)/2 + 24px)) 28px; overflow-y: auto; background: var(--portfolio-modal-surface) !important; -webkit-backdrop-filter: var(--portfolio-modal-blur) !important; backdrop-filter: var(--portfolio-modal-blur) !important; opacity: 0; visibility: hidden; pointer-events: none; transform: none; transition: opacity var(--apple-duration-menu) var(--apple-ease),visibility 0s linear var(--apple-duration-menu); }
  #mobile-nav-drawer.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
  #mobile-nav-drawer.is-closing { opacity: 0; visibility: visible; pointer-events: none; }
  #mobile-nav-drawer.is-closed { visibility: hidden; }
  .mobile-nav-drawer-head { display: none; }
  #mobile-primary-nav { position: static; display: block !important; margin: 24px 0 0; transform: none; }
  #mobile-primary-nav .nav-list { display: grid !important; gap: 8px; margin: 0; padding: 0; list-style: none; }
  #mobile-primary-nav .nav-list a { display: flex; align-items: center; min-height: 58px; padding: 0 14px; color: var(--apple-secondary); font: 600 2rem/1 var(--font-display); letter-spacing: -.05em; text-decoration: none; }
  #mobile-primary-nav .nav-list a .nav-short { display: none !important; }
  #mobile-primary-nav .nav-list a:hover, #mobile-primary-nav .nav-list a.is-active { color: var(--apple-text); }
  #mobile-primary-nav .nav-list a:focus-visible { outline: 2px solid var(--apple-blue) !important; outline-offset: 2px; }
  .nav-toggle-line { transform-box: fill-box; transform-origin: center; transition: transform var(--apple-duration-control) var(--apple-ease); }
  body.mobile-nav-open:not(.mobile-nav-closing) .nav-toggle-line--top { transform: translateY(4px) rotate(45deg); }
  body.mobile-nav-open:not(.mobile-nav-closing) .nav-toggle-line--bottom { transform: translateY(-4px) rotate(-45deg); }
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  body > header, .cinema-player__navigation { background: var(--portfolio-panel-solid) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  #mobile-nav-drawer, .library-menu::backdrop, .impact-award-lightbox::before { background: var(--portfolio-modal-solid) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .impact-award-lightbox { animation: none !important; }
  .impact-award-lightbox.is-closing { opacity: 1 !important; transition: none !important; }
  #mobile-nav-drawer { transition-property: visibility !important; }
  #mobile-nav-drawer:is(.is-open,.is-closing) { opacity: 1 !important; }
}
@media (prefers-reduced-transparency:reduce) {
  body > header, .cinema-player__navigation { background: var(--portfolio-panel-solid) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  #mobile-nav-drawer, .library-menu::backdrop, .impact-award-lightbox::before { background: var(--portfolio-modal-solid) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .impact-award-lightbox { animation: none !important; }
  .impact-award-lightbox.is-closing { opacity: 1 !important; transition: none !important; }
  #mobile-nav-drawer { transition-property: visibility !important; }
  #mobile-nav-drawer:is(.is-open,.is-closing) { opacity: 1 !important; }
}
@media (prefers-reduced-motion:reduce) {
  .shared-menu-links *, .cinema-player__navigation *, .nav-toggle-line { transition: none !important; }
  .impact-award-lightbox figure { animation: none; transition: none; }
}

/* Homepage floating navigation: keep the blurred-glass shape, but make the
   capsule sufficiently opaque off the Hero so passing section labels cannot
   visually overlap its language and menu controls on narrow screens. */
body:not(.is-on-hero) > header,
body:not(.is-on-hero) > header.is-condensed,
.library-page-navigation .cinema-player__navigation {
  background: var(--portfolio-panel-scrolled-surface) !important;
}
/* A menu owns the whole backdrop: its chrome returns to the same .72 glass
   role as the Works menu header and cinema viewer. */
body.mobile-nav-open > header {
  background: var(--portfolio-panel-surface) !important;
}
/* Material fallback must also cover this higher-opacity navigation token. */
@media (prefers-reduced-transparency: reduce) {
  body:not(.is-on-hero) > header,
  body:not(.is-on-hero) > header.is-condensed,
  .library-page-navigation .cinema-player__navigation,
  body.mobile-nav-open > header { background: var(--portfolio-panel-solid) !important; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body:not(.is-on-hero) > header,
  body:not(.is-on-hero) > header.is-condensed,
  .library-page-navigation .cinema-player__navigation,
  body.mobile-nav-open > header { background: var(--portfolio-panel-solid) !important; }
}

/* Shared editorial menu: the static homepage drawer and React Works dialog
   have independent modal lifecycles, but identical content, spacing and tokens.
   Buck is a layout reference only; existing dark glass and site capsule remain. */
@media (max-width: 760px) {
  #mobile-nav-drawer.mobile-nav-drawer,
  #library-menu.library-menu[open] {
    box-sizing: border-box;
    padding: clamp(148px, 19dvh, 196px) max(28px, calc(env(safe-area-inset-right) + 28px))
      max(28px, calc(env(safe-area-inset-bottom) + 28px))
      max(28px, calc(env(safe-area-inset-left) + 28px));
  }
  #library-menu.library-menu[open] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    width: 100%;
    height: 100dvh;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    background: transparent;
    -webkit-overflow-scrolling: touch;
  }
  #mobile-nav-drawer .mobile-menu__links,
  #library-menu .mobile-menu__links {
    display: block !important;
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    transform: none;
  }
  #mobile-nav-drawer .mobile-menu__links .nav-list,
  #library-menu .mobile-menu__links .nav-list {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(4px, 1vh, 10px);
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  #mobile-nav-drawer .mobile-menu__links .nav-list li,
  #library-menu .mobile-menu__links .nav-list li {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }
  #mobile-nav-drawer .mobile-menu__links .nav-list a,
  #library-menu .mobile-menu__links .nav-list a,
  #mobile-nav-drawer .mobile-menu__links .nav-list a.nav-contact {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: clamp(72px, 9.6dvh, 84px);
    padding: 0 4px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--apple-secondary) !important;
    font: 600 clamp(33px, 10.2vw, 44px)/1.13 var(--font-display);
    letter-spacing: -.055em;
    text-decoration: none;
    text-align: left;
    white-space: nowrap;
  }
  #mobile-nav-drawer .mobile-menu__links .nav-list a:hover,
  #library-menu .mobile-menu__links .nav-list a:hover,
  #mobile-nav-drawer .mobile-menu__links .nav-list a.is-active,
  #library-menu .mobile-menu__links .nav-list a.is-active {
    color: var(--apple-text) !important;
  }
  #mobile-nav-drawer .mobile-menu__links .nav-list a:focus-visible,
  #library-menu .mobile-menu__links .nav-list a:focus-visible {
    outline: 2px solid var(--apple-blue) !important;
    outline-offset: 2px;
  }
  #mobile-nav-drawer .mobile-menu__links .nav-list a.is-active > span:not(.nav-short),
  #library-menu .mobile-menu__links .nav-list a.is-active > span {
    text-decoration: underline;
    text-decoration-thickness: var(--portfolio-link-underline-weight);
    text-underline-offset: var(--portfolio-link-underline-offset);
  }
  /* BUCK-style social destination block; text links instead of extra icon tiles.
     Two columns retain 44px touch targets on short iPhone viewports. */
  #mobile-nav-drawer .mobile-menu__footer,
  #library-menu .mobile-menu__footer {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    gap: 11px;
    min-width: 0;
    width: 100%;
    margin-top: auto;
    padding: clamp(18px, 3dvh, 26px) 0 0;
    border-top: 1px solid var(--apple-hairline-soft);
    font: 400 11px/1.45 var(--font-body);
    letter-spacing: 0;
  }
  #mobile-nav-drawer .mobile-menu__social,
  #library-menu .mobile-menu__social { width: 100%; }
  #mobile-nav-drawer .mobile-menu__social-label,
  #library-menu .mobile-menu__social-label {
    margin: 0 0 6px;
    color: var(--apple-tertiary);
    font: 500 11px/1.3 var(--font-body);
    letter-spacing: .02em;
  }
  #mobile-nav-drawer .mobile-menu__social-list,
  #library-menu .mobile-menu__social-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 clamp(16px, 5vw, 28px);
  }
  #mobile-nav-drawer .mobile-menu__social-list a,
  #library-menu .mobile-menu__social-list a {
    display: flex;
    align-items: center;
    min-height: 44px;
    width: max-content;
    max-width: 100%;
    color: var(--apple-secondary);
    font: 500 clamp(15px, 4.2vw, 17px)/1.2 var(--font-body);
    text-decoration: none;
    transition: color var(--apple-duration-control) var(--apple-ease);
  }
  #mobile-nav-drawer .mobile-menu__social-list a:hover,
  #library-menu .mobile-menu__social-list a:hover { color: var(--apple-text); }
  #mobile-nav-drawer .mobile-menu__social-list a:focus-visible,
  #library-menu .mobile-menu__social-list a:focus-visible {
    color: var(--apple-text);
    outline: 2px solid var(--apple-blue);
    outline-offset: 2px;
  }
  #mobile-nav-drawer .mobile-menu__copyright,
  #library-menu .mobile-menu__copyright {
    display: block;
    margin: 0;
    color: var(--apple-tertiary);
    font: 400 10px/1.4 var(--font-body);
  }
}
@media (max-width: 760px) and (max-height: 700px) {
  #mobile-nav-drawer.mobile-nav-drawer,
  #library-menu.library-menu[open] {
    padding-top: max(112px, calc(env(safe-area-inset-top) + 90px));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }
  #mobile-nav-drawer .mobile-menu__links .nav-list,
  #library-menu .mobile-menu__links .nav-list { gap: 2px; }
  #mobile-nav-drawer .mobile-menu__links .nav-list a,
  #library-menu .mobile-menu__links .nav-list a,
  #mobile-nav-drawer .mobile-menu__links .nav-list a.nav-contact {
    min-height: 62px;
    font-size: clamp(30px, 9vw, 38px);
  }
  #mobile-nav-drawer .mobile-menu__footer,
  #library-menu .mobile-menu__footer { padding-top: 12px; gap: 6px; }
  #mobile-nav-drawer .mobile-menu__social-list a,
  #library-menu .mobile-menu__social-list a { min-height: 44px; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  #mobile-nav-drawer .mobile-menu__social-list a,
  #library-menu .mobile-menu__social-list a { transition: none; }
}


/* Stay-on-page anchors appear together. The separate Works library is last
   with a subtle boundary and a grid icon; it is not another scroll chapter. */
@media (min-width: 761px) {
  .site-primary-nav > .site-primary-nav__library-item {
    margin-left: clamp(5px, .9vw, 12px);
    padding-left: clamp(5px, .9vw, 12px);
    border-left: 1px solid rgba(245,245,247,.20);
  }
  .site-primary-nav .site-primary-nav__library-link {
    gap: 5px;
    color: rgba(245,245,247,.76);
  }
}
@media (max-width: 760px) {
  #mobile-primary-nav .nav-list li.nav-library-item,
  #library-menu .mobile-menu__links .nav-list li.nav-library-item {
    margin-top: 10px !important;
    padding-top: 8px !important;
    border-top: 1px solid var(--apple-hairline-soft) !important;
  }
}

/* Editorial mobile menu scrim: resolve the underlying film/text before the
   nav labels arrive. Preserve all BUCK layout, typography, and = → × motion. */
@media (max-width: 760px) {
  #mobile-nav-drawer.mobile-nav-drawer {
    background: rgba(12, 12, 13, .97) !important;
    transition: opacity 130ms var(--apple-ease), visibility 0s linear 380ms !important;
  }
  #mobile-nav-drawer.mobile-nav-drawer.is-open {
    transition: opacity 130ms var(--apple-ease), visibility 0s linear 0ms !important;
  }
  #mobile-nav-drawer.mobile-nav-drawer.is-closing {
    transition: opacity 240ms var(--apple-ease), visibility 0s linear 380ms !important;
  }
  #library-menu.library-menu::backdrop {
    background: rgba(12, 12, 13, .97) !important;
  }
}
/* Keep the mobile editorial scrim fully opaque before the first frame.
   These more specific late rules override the normal-mode fading transition. */
@media (prefers-reduced-transparency: reduce) and (max-width: 760px) {
  #mobile-nav-drawer.mobile-nav-drawer,
  #library-menu.library-menu::backdrop { background: var(--portfolio-modal-solid) !important; }
  #mobile-nav-drawer.mobile-nav-drawer { transition: visibility 0s !important; }
  #mobile-nav-drawer.mobile-nav-drawer:is(.is-open, .is-closing) {
    opacity: 1 !important;
    transition: visibility 0s !important;
  }
}
/* Keep fallback selectors direct under @supports. Chromium's simulated
   unsupported-feature test substitutes this condition at the CSSOM level. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  #mobile-nav-drawer.mobile-nav-drawer,
  #library-menu.library-menu::backdrop { background: var(--portfolio-modal-solid) !important; }
  #mobile-nav-drawer.mobile-nav-drawer { transition: visibility 0s !important; }
  #mobile-nav-drawer.mobile-nav-drawer:is(.is-open, .is-closing) {
    opacity: 1 !important;
    transition: visibility 0s !important;
  }
}
