﻿/* ==========================================================================
   ChangNong Zuo — portfolio
   Dark cinema editorial. Black canvas, warm off-white type, muted gold accent.
   ========================================================================== */

:root {
  --ink: #070707;
  --ink-2: #0c0c0c;
  --ink-3: #121212;
  --paper: #f4f1ec;
  --dim: rgba(244, 241, 236, 0.58);
  --faint: rgba(244, 241, 236, 0.42);
  --line: rgba(244, 241, 236, 0.13);
  --line-2: rgba(244, 241, 236, 0.07);
  --gold: #c9a063;
  /* 与黑白灰同级使用的金色：只做细线与小字，永远不做大面积底色 */
  --gold-text: rgba(214, 176, 118, 0.95);
  --gold-text-2: rgba(222, 186, 130, 0.96);
  --gold-line: rgba(201, 160, 99, 0.40);
  --gold-glow: rgba(201, 160, 99, 0.17);

  --pad: clamp(18px, 4.2vw, 68px);
  --maxw: 1560px;
  --nav-h: 68px;

  --fs-display: clamp(2.5rem, 7.2vw, 6.4rem);
  --fs-h2: clamp(1.7rem, 3.4vw, 2.9rem);
  --fs-h3: clamp(1.05rem, 1.5vw, 1.3rem);
  --fs-body: clamp(0.94rem, 1vw, 1.04rem);
  --fs-small: 0.83rem;

  --sans: "Inter Tight", "Inter", "Segoe UI Variable Display", "Segoe UI",
    "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

::selection {
  background: var(--gold);
  color: #0a0a0a;
}

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

/* film grain ------------------------------------------------------------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.mono {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------------------------------------------------------------- nav ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 var(--pad);
  border-bottom: 1px solid transparent;
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease),
    backdrop-filter 0.5s var(--ease);
}

.nav.is-stuck {
  background: rgba(7, 7, 7, 0.72);
  backdrop-filter: blur(18px) saturate(120%);
  border-bottom-color: var(--gold-glow);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand b {
  font-weight: 500;
  color: var(--paper);
}

.brand span {
  color: var(--faint);
  font-size: 0.62rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 34px);
  margin-left: auto;
}

.nav-links a,
.lang-btn {
  position: relative;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 6px 0;
  transition: color 0.3s var(--ease);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transition: right 0.4s var(--ease);
}

.nav-links a:hover,
.lang-btn:hover {
  color: var(--paper);
}

.nav-links a:hover::after {
  right: 0;
}

.nav-links a[aria-current="page"] {
  color: var(--paper);
}

.nav-links a[aria-current="page"]::after {
  right: 0;
  background: var(--gold);
}

.lang-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  margin-left: 6px;
  letter-spacing: 0.1em;
}

.lang-btn:hover {
  border-color: var(--paper);
}

.nav-toggle {
  display: none;
}

/* --------------------------------------------------------------- hero ---- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: clamp(28px, 6vh, 72px);
  isolation: isolate;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: -8% 0 -8%;
  z-index: -2;
  will-change: transform;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  filter: saturate(0.92) contrast(1.04);
  animation: hero-drift 26s var(--ease) infinite alternate;
}

@keyframes hero-drift {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.09) translate3d(-1.4%, -1%, 0);
  }
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
      to bottom,
      rgba(7, 7, 7, 0.72) 0%,
      rgba(7, 7, 7, 0.18) 32%,
      rgba(7, 7, 7, 0.55) 68%,
      var(--ink) 100%
    ),
    radial-gradient(120% 80% at 50% 100%, rgba(7, 7, 7, 0.9), transparent 60%);
}

.hero-top {
  position: absolute;
  top: calc(var(--nav-h) + clamp(20px, 5vh, 54px));
  left: var(--pad);
  right: var(--pad);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.hero-top p {
  margin: 0;
  max-width: 46ch;
  font-family: var(--mono);
  font-size: 0.66rem;
  line-height: 1.9;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.hero-title {
  margin: 0 0 clamp(18px, 3vh, 34px);
  font-size: var(--fs-display);
  line-height: 0.94;
  letter-spacing: -0.035em;
  font-weight: 500;
}

.hero-title .thin {
  font-weight: 300;
  color: var(--dim);
}

.hero-title em {
  font-style: normal;
  -webkit-text-stroke: 1px var(--paper);
  color: transparent;
}

.hero-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.hero-foot .who {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
}

.hero-foot .who b {
  font-weight: 500;
  color: var(--paper);
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}

.scroll-cue i {
  display: block;
  width: 44px;
  height: 1px;
  background: linear-gradient(to right, var(--faint), transparent);
  animation: cue 2.6s var(--ease) infinite;
  transform-origin: left;
}

@keyframes cue {
  0%,
  100% {
    transform: scaleX(0.35);
    opacity: 0.5;
  }
  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

/* ------------------------------------------------------------- section --- */
.section {
  padding: clamp(64px, 11vh, 140px) 0;
  position: relative;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(26px, 4.5vh, 52px);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-2);
}

.section-head h2 {
  margin: 8px 0 0;
  font-size: var(--fs-h2);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.section-head .meta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
  padding-bottom: 6px;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.link-more:hover {
  color: var(--paper);
  border-color: var(--paper);
}

.link-more::after {
  content: "→";
  transition: transform 0.3s var(--ease);
}

.link-more:hover::after {
  transform: translateX(4px);
}

/* --------------------------------------------------------------- cards --- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(10px, 1.4vw, 22px);
}

.feat {
  grid-column: span 6;
  position: relative;
}

.feat.is-lead {
  grid-column: span 12;
}

.feat.is-third {
  grid-column: span 4;
}

.feat .card > img,
.feat .card > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feat.is-lead .card > img {
  aspect-ratio: 21 / 9;
}

.feat.is-third .card > img {
  aspect-ratio: 4 / 5;
}

.card {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--ink-3);
  cursor: pointer;
  text-align: left;
}

.card > img,
.card > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out), filter 0.7s var(--ease),
    opacity 0.5s var(--ease);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.5) 26%,
    rgba(0, 0, 0, 0.06) 58%,
    rgba(0, 0, 0, 0) 78%
  );
  opacity: 0.9;
  transition: opacity 0.6s var(--ease);
  pointer-events: none;
}

.card:hover > img,
.card:hover > video {
  transform: scale(1.045);
  filter: brightness(1.06);
}

.card:hover::after {
  opacity: 1;
}

.card-info {
  position: absolute;
  left: clamp(12px, 1.5vw, 22px);
  right: clamp(12px, 1.5vw, 22px);
  bottom: clamp(12px, 1.5vw, 20px);
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.card-info h3 {
  margin: 0 0 5px;
  font-size: clamp(0.95rem, 1.35vw, 1.22rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.7);
}

.card-info .sub {
  display: flex;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 241, 236, 0.62);
}

.card-info .idx {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: rgba(244, 241, 236, 0.5);
  white-space: nowrap;
  padding-bottom: 3px;
}

.play-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 62px;
  height: 62px;
  margin: -31px 0 0 -31px;
  border-radius: 50%;
  border: 1px solid rgba(244, 241, 236, 0.5);
  display: grid;
  place-items: center;
  z-index: 3;
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease),
    background 0.45s var(--ease);
  backdrop-filter: blur(3px);
  background: rgba(10, 10, 10, 0.18);
}

.play-dot::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 4px;
  border-left: 9px solid var(--paper);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.card:hover .play-dot {
  opacity: 1;
  transform: scale(1);
}

.card:hover .play-dot {
  background: rgba(201, 160, 99, 0.22);
  border-color: var(--gold);
}

/* ------------------------------------------------------ works gallery ---- */
.filters {
  position: sticky;
  top: var(--nav-h);
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 0 15px;
  margin-bottom: clamp(18px, 3vh, 32px);
  background: linear-gradient(to bottom, var(--ink) 62%, rgba(7, 7, 7, 0.86) 88%, rgba(7, 7, 7, 0));
  backdrop-filter: blur(6px);
}

.chip {
  position: relative;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease),
    background 0.3s var(--ease);
}

.chip small {
  color: var(--faint);
  margin-left: 5px;
  font-size: 0.58rem;
}

.chip:hover {
  color: var(--paper);
  border-color: rgba(244, 241, 236, 0.35);
}

.chip[aria-pressed="true"] {
  color: #0a0a0a;
  background: var(--paper);
  border-color: var(--paper);
}

.chip[aria-pressed="true"] small {
  color: rgba(10, 10, 10, 0.55);
}

.count-note {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.masonry {
  column-gap: clamp(10px, 1.3vw, 18px);
  columns: 3;
}

.masonry .item {
  break-inside: avoid;
  margin-bottom: clamp(10px, 1.3vw, 18px);
  display: block;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.masonry .item.is-hidden {
  display: none;
}

.masonry .item.is-in {
  animation: item-in 0.55s var(--ease-out) both;
}

@keyframes item-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.masonry .card {
  aspect-ratio: auto;
}

.masonry .card > img {
  height: auto;
}

.empty-note {
  grid-column: 1 / -1;
  padding: 60px 0;
  text-align: center;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ----------------------------------------------------------- photo wall -- */
.scroller {
  display: flex;
  gap: clamp(10px, 1.2vw, 16px);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 0 var(--pad) 18px 0;
  margin: 0 calc(var(--pad) * -1) 0 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 241, 236, 0.22) transparent;
  cursor: grab;
}

.scroller.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.scroller::-webkit-scrollbar {
  height: 4px;
}

.scroller::-webkit-scrollbar-thumb {
  background: rgba(244, 241, 236, 0.2);
  border-radius: 2px;
}

.scroller figure {
  flex: 0 0 auto;
  margin: 0;
  width: clamp(190px, 21vw, 300px);
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
  background: var(--ink-3);
  cursor: pointer;
}

.scroller figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 1s var(--ease-out), filter 0.6s var(--ease);
}

.scroller figure:hover img {
  transform: scale(1.05);
}

.scroller figcaption {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(244, 241, 236, 0.82);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
}

/* ---------------------------------------------------------------- about -- */
.statement {
  font-size: clamp(1.35rem, 2.9vw, 2.5rem);
  line-height: 1.42;
  letter-spacing: -0.015em;
  font-weight: 300;
  max-width: 34ch;
  margin: 0;
}

.statement b {
  font-weight: 500;
  color: var(--gold);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}

.prose p {
  margin: 0 0 1.1em;
  color: var(--dim);
  max-width: 54ch;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--paper);
  font-weight: 500;
}

.resume {
  border-top: 1px solid var(--line);
}

.resume-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 6px 26px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-2);
}

.resume-row .when {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: var(--faint);
  padding-top: 3px;
}

.resume-row h4 {
  margin: 0 0 4px;
  font-size: var(--fs-h3);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.resume-row p {
  margin: 0;
  color: var(--dim);
  font-size: 0.95rem;
}

.resume-row .role {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 6px 10px;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.contact-btn:hover {
  border-color: var(--paper);
  background: rgba(244, 241, 236, 0.05);
}

.contact-btn svg {
  width: 13px;
  height: 13px;
  opacity: 0.65;
}

.contact-btn.is-copied {
  border-color: var(--gold);
  color: var(--gold);
}

/* --------------------------------------------------------------- modal --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 40px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 4, 0.94);
  backdrop-filter: blur(10px);
}

.modal-body {
  position: relative;
  z-index: 2;
  width: min(1180px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(14px) scale(0.99);
  opacity: 0;
  transition: transform 0.5s var(--ease-out), opacity 0.4s var(--ease);
}

.modal.is-open .modal-body {
  transform: none;
  opacity: 1;
}

.modal-stage {
  position: relative;
  background: transparent;
  display: grid;
  place-items: center;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.modal-stage video,
.modal-stage img {
  width: 100%;
  height: auto;
  max-height: min(78vh, 900px);
  object-fit: contain;
  background: #000;
}

.modal-stage video {
  aspect-ratio: 16 / 9;
}

.modal-stage video.is-portrait {
  aspect-ratio: 9 / 16;
  max-height: min(84vh, 900px);
  width: auto;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 28px;
}

.modal-meta h3 {
  margin: 0 0 5px;
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.modal-meta p {
  margin: 0;
  color: var(--dim);
  font-size: 0.9rem;
  max-width: 66ch;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(244, 241, 236, 0.24);
  background: rgba(7, 7, 7, 0.55);
  backdrop-filter: blur(6px);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.modal-close:hover {
  border-color: var(--paper);
  transform: rotate(90deg);
}

.modal-close::before,
.modal-close::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 1px;
  background: var(--paper);
}

.modal-close::before {
  transform: rotate(45deg);
}

.modal-close::after {
  transform: rotate(-45deg);
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(244, 241, 236, 0.2);
  background: rgba(7, 7, 7, 0.45);
  backdrop-filter: blur(6px);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.modal-nav:hover {
  border-color: var(--paper);
  background: rgba(7, 7, 7, 0.75);
}

.modal-nav::before {
  content: "";
  width: 9px;
  height: 9px;
  border-top: 1px solid var(--paper);
  border-right: 1px solid var(--paper);
}

.modal-nav.prev {
  left: 12px;
}

.modal-nav.prev::before {
  transform: rotate(-135deg);
  margin-left: 3px;
}

.modal-nav.next {
  right: 12px;
}

.modal-nav.next::before {
  transform: rotate(45deg);
  margin-right: 3px;
}

.counter {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  color: var(--faint);
  white-space: nowrap;
}

.modal-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.link-copy {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 7px 13px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.link-copy:hover {
  color: var(--paper);
  border-color: rgba(244, 241, 236, 0.4);
}

.link-copy.is-copied {
  color: var(--gold);
  border-color: var(--gold);
}

/* -------------------------------------------------------------- footer --- */
.footer {
  border-top: 1px solid var(--line-2);
  padding: clamp(44px, 7vh, 80px) 0 clamp(26px, 4vh, 40px);
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.8fr));
  gap: clamp(24px, 4vw, 60px);
  padding-bottom: clamp(30px, 5vh, 56px);
}

.footer .f-title {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 400;
}

.footer-cta {
  font-size: clamp(1.4rem, 3vw, 2.3rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 300;
  margin: 0 0 18px;
  max-width: 20ch;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.footer li a,
.footer li span {
  font-size: 0.92rem;
  color: var(--dim);
  transition: color 0.3s var(--ease);
}

.footer li a:hover {
  color: var(--paper);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 241, 236, 0.46);
}

/* ------------------------------------------------------------- page top -- */
.page-head {
  padding-top: calc(var(--nav-h) + clamp(50px, 11vh, 130px));
  padding-bottom: clamp(20px, 3vh, 34px);
}

.page-head h1 {
  margin: 10px 0 0;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 500;
}

.page-head .lede {
  margin: 18px 0 0;
  max-width: 56ch;
  color: var(--dim);
  font-size: clamp(0.98rem, 1.2vw, 1.12rem);
}

.page-head .row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

/* --------------------------------------------------------------- reveal -- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0ms);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* -------------------------------------------------- page transitions ---- */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: vt-out 0.32s var(--ease) both;
}

::view-transition-new(root) {
  animation: vt-in 0.45s var(--ease) both;
}

@keyframes vt-out {
  to {
    opacity: 0;
    transform: scale(0.995);
  }
}

@keyframes vt-in {
  from {
    opacity: 0;
    transform: scale(1.005);
  }
}

body {
  animation: page-in 0.5s var(--ease) both;
}

@keyframes page-in {
  from {
    opacity: 0;
  }
}

/* ------------------------------------------------------------ responsive -*/
@media (max-width: 1080px) {
  .masonry {
    columns: 2;
  }
  .feat.is-tall,
  .feat.is-soft,
  .feat.is-third {
    grid-column: span 6;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .footer-main {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  :root {
    --nav-h: 56px;
  }

  .nav {
    gap: 8px;
    padding: 0 14px;
  }

  .nav-links {
    gap: 11px;
  }

  .nav-links a,
  .lang-btn {
    font-size: 0.58rem;
    letter-spacing: 0.05em;
  }

  .lang-btn {
    padding: 4px 8px;
    margin-left: 0;
  }

  .brand span {
    display: none;
  }

  .hero-top {
    display: none;
  }

  .hero-title {
    letter-spacing: -0.02em;
  }

  .feat,
  .feat.is-lead,
  .feat.is-tall,
  .feat.is-soft,
  .feat.is-third {
    grid-column: span 12;
  }

  .masonry {
    columns: 1;
  }

  .resume-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .footer-main {
    grid-template-columns: 1fr;
  }

  .modal-nav {
    width: 38px;
    height: 38px;
  }

  .modal-stage video.is-portrait {
    max-height: 70vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   金色体系 —— 和黑/白/灰同级，只出现在 1px 线与小号字上，从不做底色
   ========================================================================== */

.brand span,
.section-head .mono,
.page-head .mono,
.footer .f-title {
  color: var(--gold-text);
}

.hero-top p {
  color: var(--gold-text);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55);
}

.card-info .idx {
  color: var(--gold-text);
}

.card-info .sub span:first-child {
  color: var(--gold-text-2);
}

.chip small {
  color: var(--gold-text);
}

.chip[aria-pressed="true"] small {
  color: rgba(10, 10, 10, 0.5);
}

.chip:hover {
  border-color: var(--gold-line);
}

.lang-btn:hover {
  border-color: var(--gold-line);
  color: var(--gold);
}

.link-more:hover {
  color: var(--gold);
  border-color: var(--gold-line);
}

.contact-btn:hover {
  border-color: var(--gold-line);
  color: var(--gold);
}

.counter {
  color: var(--gold-text);
}

.scroll-cue i {
  background: linear-gradient(to right, var(--gold-line), transparent);
}

.modal-nav:hover {
  border-color: var(--gold-line);
}

.link-copy:hover {
  color: var(--gold);
  border-color: var(--gold-line);
}

.hero-foot .who a {
  transition: color 0.3s var(--ease);
}

.hero-foot .who a:hover {
  color: var(--gold);
}

/* 金色的第二种用法：结构线。1px、低透明度，把区块和区块分开，
   让金色像灰色分割线一样成为版式的一部分，而不是装饰。 */
.section-head {
  border-bottom-color: var(--gold-glow);
}

.hero-foot {
  border-top-color: var(--gold-glow);
}

.filters {
  border-bottom: 1px solid var(--gold-glow);
}

.resume {
  border-top-color: var(--gold-glow);
}

.footer {
  border-top-color: var(--gold-glow);
}

.resume-row {
  border-bottom-color: rgba(201, 160, 99, 0.12);
}

.modal-meta {
  border-top: 1px solid var(--gold-glow);
  padding-top: 14px;
}

.card:hover {
  box-shadow: inset 0 0 0 1px var(--gold-line);
}

.card:hover .idx {
  color: var(--gold);
}

/* 视频加载失败的兜底：保留封面，压一层提示，不出现纯黑块 */
.media-error {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border: 1px solid var(--gold-line);
  border-radius: 2px;
  background: rgba(7, 7, 7, 0.86);
  backdrop-filter: blur(8px);
  font-size: 0.82rem;
  color: var(--dim);
  white-space: nowrap;
  z-index: 5;
}

.media-error .link-copy {
  padding: 4px 10px;
}

@media (max-width: 720px) {
  .media-error {
    white-space: normal;
    max-width: calc(100% - 36px);
    text-align: left;
  }
}

/* 灯箱：先出 2000px 预览，原图到了再换 —— 让"原画质"不牺牲等待体验 */
.modal-stage img.is-placeholder {
  filter: saturate(0.98);
}

/* ==========================================================================
   时间轴（关于页 · 2023–2026）—— 桌面左右分栏，手机上下堆叠
   ========================================================================== */
.tl-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 34px;
}

@media (min-width: 900px) {
  .tl-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 56px;
    align-items: start;
  }
  .tl-panels {
    margin-top: 54px;
  }
}

.tl-track {
  position: relative;
  height: 158px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: ew-resize;
}

.tl-ticks {
  position: absolute;
  left: 0;
  right: 0;
  top: 44px;
  height: 10px;
  background-image: linear-gradient(to right, rgba(244, 241, 236, 0.24) 0 1px, transparent 1px);
  background-size: 6.25% 10px;
  background-repeat: repeat-x;
  background-position: 0 100%;
}

.tl-base {
  position: absolute;
  left: 0;
  right: 0;
  top: 54px;
  height: 1px;
  background: var(--line);
}

.tl-progress {
  position: absolute;
  left: 0;
  top: 54px;
  height: 1px;
  width: 0;
  background: var(--gold);
  opacity: 0.5;
  transition: width 0.5s var(--ease-out);
}

.tl-playhead {
  position: absolute;
  left: 0;
  top: 14px;
  height: 40px;
  width: 1px;
  background: var(--gold);
  opacity: 0;
  transition: left 0.5s var(--ease-out), opacity 0.3s;
  pointer-events: none;
}

.tl-playhead::before {
  content: "";
  position: absolute;
  bottom: -3px;
  left: -2.5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.tl-playhead.on {
  opacity: 1;
}

.tl-years {
  position: absolute;
  left: 0;
  right: 0;
  top: 50px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}

.tl-year {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 88px;
  padding: 0 0 16px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(244, 241, 236, 0.4);
  background: var(--ink);
  transition: background 0.3s, border-color 0.3s, transform 0.35s var(--ease-out);
}

.tl-yl {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  color: var(--faint);
  transition: color 0.3s;
}

.tl-tag {
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--faint);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.3s, transform 0.3s;
}

.tl-year:hover .tl-dot,
.tl-year[aria-selected="true"] .tl-dot {
  border-color: var(--gold);
  background: var(--gold);
  transform: scale(1.3);
}

.tl-year:hover .tl-yl,
.tl-year[aria-selected="true"] .tl-yl {
  color: var(--gold-text);
}

.tl-year[aria-selected="true"] .tl-tag {
  opacity: 1;
  transform: none;
  color: var(--dim);
}

.tl-year:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
  border-radius: 2px;
}

.tl-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  color: var(--faint);
}

.tl-hint i {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--gold-line);
}

.tl-panels {
  display: grid;
}

.tl-panel {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  border-top: 1px solid var(--gold-line);
  padding-top: 22px;
  transition: opacity 0.38s ease, transform 0.5s var(--ease-out), visibility 0.38s;
}

.tl-panel.on {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.tl-yr {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--gold-text);
}

.tl-panel h3 {
  margin: 0 0 4px;
  font-size: 1.14rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.tl-co {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--dim);
}

.tl-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tl-panel li {
  position: relative;
  margin-bottom: 5px;
  padding-left: 15px;
  color: var(--dim);
  font-size: 0.88rem;
  line-height: 1.72;
}

.tl-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 1px;
  background: var(--gold-line);
}

/* ==========================================================================
   关于我 · 晚霞通栏（16:9，海平面以上的裁切）
   桌面：文案压在图上；手机：图为 16:9 横幅，底部渐隐进背景，文案紧随其下
   ========================================================================== */
.about-hero {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0b0b0b;
}

.about-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}

.about-hero-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(100deg, rgba(7, 7, 7, 0.95) 0%, rgba(7, 7, 7, 0.88) 26%,
      rgba(7, 7, 7, 0.55) 48%, rgba(7, 7, 7, 0.12) 72%, rgba(7, 7, 7, 0) 100%),
    linear-gradient(to top, rgba(7, 7, 7, 0.45), rgba(7, 7, 7, 0) 38%);
}

.about-hero-copy {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
}

.about-hero .prose {
  max-width: 54ch;
  padding: 0 clamp(24px, 3.6vw, 68px);
}

.about-hero .prose p {
  margin: 0 0 1.05em;
  color: rgba(246, 243, 238, 0.9);
  font-size: clamp(0.94rem, 1.05vw, 1.06rem);
  line-height: 1.78;
  text-shadow: 0 1px 22px rgba(0, 0, 0, 0.55);
}

.about-hero .prose p:last-child {
  margin-bottom: 0;
}

.about-hero .prose strong {
  color: #fff;
  font-weight: 500;
}

@media (max-width: 860px) {
  .about-hero {
    aspect-ratio: auto;
    overflow: visible;
    background: var(--ink);
  }

  .about-hero > img {
    position: relative;
    inset: auto;
    height: auto;
    aspect-ratio: 16 / 9;
    object-position: 50% 38%;
    display: block;
  }

  .about-hero-scrim {
    bottom: auto;
    height: auto;
    aspect-ratio: 16 / 9;
    background: linear-gradient(
      to bottom,
      rgba(7, 7, 7, 0) 46%,
      rgba(7, 7, 7, 0.55) 76%,
      rgba(7, 7, 7, 0.95) 94%,
      var(--ink) 100%
    );
  }

  .about-hero-copy {
    position: relative;
    inset: auto;
    display: block;
    margin-top: -6vw;
    padding-bottom: 4px;
  }

  .about-hero .prose {
    max-width: none;
    padding: 0 var(--pad);
  }

  .about-hero .prose p {
    color: rgba(246, 243, 238, 0.82);
    text-shadow: none;
  }
}

/* ==========================================================================
   叠放相册 · R1（首图右下，层向左上退，近大远小）
   ========================================================================== */
.stack-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 92px 44px;
  margin: 4px 0 8px;
}

.stack-bar {
  display: none;
  align-items: center;
  gap: 16px;
  margin: 0 0 26px;
}

.stack-bar[hidden] { display: none; }

.stack-cat {
  font-size: 1.05rem;
  letter-spacing: -.01em;
}

.stack-back {
  font-family: var(--mono, monospace);
  font-size: .64rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  background: none;
  border: 1px solid var(--line);
  padding: 8px 14px;
  cursor: pointer;
  transition: color .3s, border-color .3s;
}

.stack-back:hover { color: var(--gold); border-color: var(--gold-line); }

[data-expanded] { display: none; }

.is-expanded .stack-wall { display: none; }
.is-expanded .stack-bar { display: flex; }
.is-expanded [data-expanded] { display: block; }
.is-expanded .filters { display: none; }

.folder {
  position: relative;
  width: calc(220px + 96px);
  height: 372px;
  flex: 0 0 auto;
  cursor: pointer;
  perspective: 900px;
  perspective-origin: 22% 76%;
  transform-style: preserve-3d;
  transition: opacity .45s ease, transform .45s cubic-bezier(.16,1,.3,1);
}

.folder .deck {
  position: absolute;
  right: 0;
  top: 50%;
  width: 220px;
  height: 290px;
  margin-top: -145px;
  transform: rotateY(30deg);
  transform-style: preserve-3d;
  transition: transform .62s cubic-bezier(.16,1,.3,1);
}

.folder .card3 {
  position: absolute;
  inset: 0;
  border-radius: 2px;
  overflow: hidden;
  background: #161616;
  box-shadow: 0 22px 44px rgba(0, 0, 0, .6), 0 0 0 1px rgba(244, 241, 236, .13);
  backface-visibility: hidden;
  transition: transform .5s cubic-bezier(.16,1,.3,1), opacity .4s;
}

.folder .card3 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.folder .card3.is-buried { opacity: 0; }
.folder .card3.is-front { box-shadow: 0 36px 64px rgba(0, 0, 0, .78), 0 0 0 1px rgba(244, 241, 236, .16); }

.folder::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: border-color .3s;
  pointer-events: none;
}

.folder:hover::after,
.folder:focus-visible::after { border-color: var(--gold-line); }

.folder .meta {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 12px);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.folder .name { font-size: .9rem; }
.folder .count {
  font-family: var(--mono, monospace);
  font-size: .62rem;
  letter-spacing: .12em;
  color: var(--gold-text);
}

.folder.is-shrink {
  opacity: .18;
  transform: scale(.9);
  pointer-events: none;
}

@media (max-width: 840px) {
  /* 手机：两列 + 9:16 原始画面比例，格子宽度按两列自己算 */
  .stack-wall {
    --cell: calc((100vw - 40px - 10px) / 2);
    --cw: calc(var(--cell) * 0.76);
    flex-direction: row; flex-wrap: wrap; align-content: flex-start;
    gap: 28px 10px; padding: 0 0 0 2px; justify-content: space-between;
  }
  .folder {
    width: var(--cell); height: calc(var(--cw) * 16 / 9 + 6px);
    perspective: 760px;
  }
  .folder .deck {
    width: var(--cw); height: auto; aspect-ratio: 9 / 16;
    right: 0; top: 0; margin-top: 0; transform: rotateY(20deg);
  }
  .folder .count { font-size: .56rem; }
  .folder .meta { top: calc(100% + 4px); }
  .folder .name { font-size: .74rem; }
  .folder .count { font-size: .56rem; }
  .folder .meta { top: calc(100% + 6px); }
  .folder .card3 { box-shadow: 0 12px 24px rgba(0,0,0,.55), 0 0 0 1px rgba(244,241,236,.1); }
  .stack-bar { margin-bottom: 16px; }
  .stack-cat { font-size: .95rem; }
}


/* 视频详情：先看封面，点播放才播 */
.detail-cover {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
  border: 0;
  background: #0b0b0b;
  cursor: pointer;
  z-index: 3;
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, .18), rgba(0, 0, 0, .5));
}

.detail-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 74px;
  height: 74px;
  margin: -37px 0 0 -37px;
  border-radius: 50%;
  border: 1px solid rgba(244, 241, 236, .55);
  background: rgba(10, 10, 10, .35);
  backdrop-filter: blur(2px);
  z-index: 2;
  transition: border-color .3s, transform .3s, background .3s;
}

.detail-play::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -11px 0 0 -6px;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #f4f1ec;
}

.detail-cover:hover .detail-play {
  border-color: var(--gold);
  background: rgba(10, 10, 10, .55);
  transform: scale(1.06);
}


/* 影像页：更大的展示面（两列为主，图更大） */
@media (min-width: 900px) {
  .masonry {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 34px 30px !important;
  }
}
@media (max-width: 899px) {
  .masonry { grid-template-columns: 1fr !important; gap: 22px !important; }
}


/* ==========================================================================
   载入与过渡：任何等待都要有反馈，不让访客对着空白
   ========================================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* 整页淡入 */
body { animation: pageFade .45s ease both; }

@keyframes pageFade { from { opacity: 0; } to { opacity: 1; } }

/* 图片解码完成再淡入，避免半张图闪 */
.card img,
.grid img,
.masonry img,
.folder .card3 {
  opacity: 0;
  transition: opacity .5s ease;
}

.card img.is-loaded,
.grid img.is-loaded,
.masonry img.is-loaded,
.folder .card3.is-loaded {
  opacity: 1;
}

/* 叠放墙骨架：等 works.json 时先给占位，不闪白 */
.stack-wall:empty::after {
  content: "";
  display: block;
  width: 100%;
  height: 360px;
  background: linear-gradient(100deg, #0c0c0c 30%, #141414 50%, #0c0c0c 70%);
  background-size: 240% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

/* 详情页切条时的淡入 */
.wk-stage img,
.wk-stage video {
  animation: fadeUp .45s cubic-bezier(.16, 1, .3, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  body, .card img, .grid img, .masonry img, .folder .card3, .wk-stage img, .wk-stage video {
    animation: none !important;
    opacity: 1 !important;
    transition: none !important;
  }
}


/* 详情页播放器：横竖屏共用一个固定画布，封面与视频几何完全一致 */
.wk-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  max-height: 78vh;
  background: #0b0b0b;
  overflow: hidden;
}

.wk-stage.is-portrait { aspect-ratio: 4 / 3; }

/* 封面层与视频层：同一套 inset + object-fit，切换时不产生任何位移 */
.wk-stage > img,
.wk-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0b0b0b;
  display: block;
}

.wk-stage.is-playing > img,
.wk-stage.is-playing .wk-cover { display: none !important; }


/* 无标题照片：不占信息区高度 */
.card.is-untitled { padding-bottom: 0; }


/* 灯箱：无论页面滚到哪，都完整居中、不裁切、不需要滚动 */
.modal { padding: clamp(10px, 2.4vw, 32px); }
.modal-body {
  height: 100%;
  max-height: 100%;
  min-height: 0;
  width: min(1280px, 100%);
}
.modal-stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-stage img,
.modal-stage video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
/* 无标题的照片：信息区整块不显示 */
.modal-meta.is-empty { display: none; }


/* 细节打磨 */
.masonry:empty::after {
  content: "";
  display: block;
  width: 100%;
  height: 320px;
  background: linear-gradient(100deg, #0c0c0c 30%, #161616 50%, #0c0c0c 70%);
  background-size: 240% 100%;
  animation: shimmer 1.4s linear infinite;
}

.stack-tip {
  margin: 26px 0 0;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .12em;
  color: var(--gold-text);
  opacity: 0;
  animation: tipIn .5s ease forwards;
}
.stack-tip.is-gone { transition: opacity .6s ease; opacity: 0 !important; }
@keyframes tipIn { to { opacity: .9; } }

img.is-failed {
  background: repeating-linear-gradient(45deg, #101010, #101010 8px, #161616 8px, #161616 16px);
}


/* 手机端图片不可放大：去掉手型光标和点击反馈 */
@media (max-width: 840px), (pointer: coarse) {
  .masonry .card { cursor: default; }
  .masonry .card:active { transform: none; }
  .masonry .card img { pointer-events: none; }
}


/* 灯箱最终方案：图片绝对定位在舞台内，max-* 有确定参照，永远完整居中 */
.modal-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: block;
}

.modal-stage img,
.modal-stage video {
  position: absolute;
  inset: 0;
  margin: auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}


/* 灯箱：固定到视口本身，不依赖祖先（避免被 transform 劫持） */
.modal {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
}
.modal-body { height: 100%; max-height: 100%; }
