/* =========================================================
   作品集 — design system
   near-black canvas / hairline rules / enormous type
   ========================================================= */

:root {
  --bg: #000;
  --bg-card: #111114;
  --fg: #f5f5f7;
  --muted: #86868b;
  --line: rgba(255, 255, 255, 0.14);
  --line-soft: rgba(255, 255, 255, 0.07);

  --pad: clamp(20px, 5vw, 72px);
  --max: 1440px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: 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: #f5f5f7; color: #000; }

/* grain ------------------------------------------------------- */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: 0.035; mix-blend-mode: screen;
  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.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* progress ---------------------------------------------------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 1px; z-index: 70; }
.progress i {
  display: block; height: 100%; width: 0%;
  background: var(--fg); opacity: 0.55; transition: width 0.1s linear;
}

/* nav --------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 64px; padding: 0 var(--pad);
  border-bottom: 1px solid transparent;
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease);
}
.nav.is-stuck {
  background: rgba(8, 8, 10, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--line-soft);
}
.nav__mark {
  font-family: var(--display);
  font-weight: 700; letter-spacing: 0.16em; font-size: 15px; text-transform: lowercase;
}
.nav__links { display: flex; gap: clamp(18px, 2.8vw, 40px); font-size: clamp(14px, 1.05vw, 15.5px); }
.nav__links a { color: var(--muted); transition: color 0.3s var(--ease); position: relative; }
.nav__links a:hover { color: var(--fg); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); }
.nav__cta {
  font-size: clamp(13px, 1vw, 14.5px); padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--line);
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.nav__cta:hover { background: var(--fg); color: #000; border-color: var(--fg); }

/* hero -------------------------------------------------------- */
.hero {
  position: relative; min-height: 100svh;
  display: grid; align-content: center;
  padding: clamp(96px, 14vh, 150px) var(--pad) clamp(190px, 26vh, 260px);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img, .hero__media video {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06); filter: saturate(0.9) contrast(1.05);
}
.hero__video { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s var(--ease); }
.hero__video.is-on { opacity: 1; }

.hero__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(58% 46% at 50% 40%, rgba(120, 142, 200, 0.11) 0%, transparent 68%),
    radial-gradient(120% 80% at 50% 0%, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.5) 55%, #000 100%),
    linear-gradient(to top, #000 4%, rgba(0,0,0,0.2) 42%, rgba(0,0,0,0.3) 100%);
}

.hero__inner { max-width: var(--max); width: 100%; margin: 0 auto; }
.eyebrow {
  margin: 0 0 22px; font-size: 11.5px; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--muted);
}
.hero__title {
  font-family: var(--display); margin: 0;
  font-size: clamp(4rem, 15vw, 13rem);
  line-height: 0.9; letter-spacing: -0.05em; font-weight: 700;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span {
  display: block; transform: translateY(105%);
  animation: riseIn 1.25s var(--ease) forwards;
}
@keyframes riseIn { to { transform: translateY(0); } }

.hero__desc {
  margin: clamp(20px, 3vw, 32px) 0 0; max-width: 36ch;
  font-size: clamp(15px, 1.5vw, 18px); color: rgba(245, 245, 247, 0.72);
  text-wrap: pretty;
}
.hero__meta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero__meta span {
  font-size: 11.5px; letter-spacing: 0.08em; color: var(--muted);
  border: 1px solid var(--line); padding: 6px 13px; border-radius: 999px;
}

.scrollcue {
  position: absolute; right: var(--pad);
  bottom: calc(clamp(110px, 22vh, 190px) + 26px);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
}
.scrollcue em { font-style: normal; writing-mode: vertical-rl; }
.scrollcue span {
  width: 1px; height: 60px;
  background: linear-gradient(to bottom, transparent, var(--fg));
  animation: cue 2.4s var(--ease) infinite; transform-origin: top;
}
@keyframes cue {
  0% { transform: scaleY(0); opacity: 0; }
  35% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* 首屏底部作品带 --------------------------------------------- */
.hero__strip {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  height: clamp(110px, 22vh, 190px);
  display: flex; gap: clamp(8px, 1vw, 14px);
  padding: 0 var(--pad);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 46%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 46%, transparent 100%);
}
.strip__item {
  flex: 1 1 0; min-width: 0; position: relative;
  overflow: hidden; border-radius: 14px 14px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: none;
  opacity: 0.5;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.strip__item:hover { opacity: 0.95; transform: translateY(-4px); }
.strip__item img { width: 100%; height: 100%; object-fit: cover; }
.strip__item span {
  position: absolute; left: 14px; bottom: 12px;
  font-size: 11px; letter-spacing: 0.14em;
  color: rgba(245, 245, 247, 0.8);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
}
.strip__item:nth-child(1) { opacity: 0.62; }

/* 分类索引 ---------------------------------------------------- */
.index {
  display: flex; gap: 8px;
  padding: 0 var(--pad) 0;
  margin: 0 auto;
  max-width: var(--max);
  overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 18px;
  padding-top: 6px;
}
.index::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line-soft);
  white-space: nowrap;
  font-size: 13px; color: var(--muted);
  transition: border-color 0.35s var(--ease), color 0.35s var(--ease), background 0.35s var(--ease);
}
.chip:hover { color: var(--fg); border-color: var(--line); background: rgba(255,255,255,0.03); }
.chip__no { font-size: 10.5px; letter-spacing: 0.12em; opacity: 0.55; }
.chip__label { color: var(--fg); }
.chip__count { font-size: 10.5px; opacity: 0.5; }

/* section ----------------------------------------------------- */
.section {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(80px, 13vh, 170px) var(--pad);
  scroll-margin-top: 64px;
}
.section__head { max-width: 900px; margin-bottom: clamp(36px, 5vw, 68px); }
.kicker {
  margin: 0 0 18px; font-size: 11px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--muted);
}
.h2 {
  font-family: var(--display); margin: 0;
  font-size: clamp(2rem, 4.4vw, 4.2rem);
  line-height: 1.04; letter-spacing: -0.035em; font-weight: 700;
}
.h2 .dim { color: var(--muted); }
.lede {
  margin: 20px 0 0; max-width: 52ch;
  color: var(--muted); font-size: clamp(14.5px, 1.35vw, 17px);
}

/* reveal ------------------------------------------------------ */
[data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: 0.09s; }
[data-reveal][data-delay="2"] { transition-delay: 0.18s; }
[data-reveal][data-delay="3"] { transition-delay: 0.27s; }

/* 16:9 wide grid ---------------------------------------------- */
.grid--wide {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(14px, 1.6vw, 24px);
}
.card {
  position: relative; display: block; overflow: hidden;
  border-radius: 18px; background: var(--bg-card);
  border: 1px solid var(--line-soft);
  aspect-ratio: 16 / 10; isolation: isolate;
}
.grid--wide .card:first-child { grid-column: span 2; aspect-ratio: 16 / 7.6; }

.card__media { position: absolute; inset: 0; }
.card__media img, .card__media video {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease), opacity 0.6s var(--ease);
}
.card__media video { position: absolute; inset: 0; opacity: 0; }
.card:hover .card__media img { transform: scale(1.045); }
.card:hover .card__media video.is-on { opacity: 1; }

.card__shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.12) 46%, transparent 72%);
}
.card__body {
  position: absolute; left: clamp(18px, 2vw, 30px); right: clamp(18px, 2vw, 30px);
  bottom: clamp(16px, 2vw, 28px);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
}
.card__title {
  font-family: var(--display); font-size: clamp(1.1rem, 1.9vw, 1.8rem);
  letter-spacing: -0.02em; margin: 0 0 6px; font-weight: 600;
}
.card__tag {
  font-size: 11.5px; letter-spacing: 0.12em;
  color: rgba(245,245,247,0.62); text-transform: uppercase;
}
.card__year { font-size: 11.5px; color: rgba(245,245,247,0.62); letter-spacing: 0.1em; }

/* 9:16 vertical grid ------------------------------------------ */
.grid--vertical {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 258px));
  justify-content: start;
  gap: clamp(12px, 1.4vw, 20px);
}
.vcard {
  position: relative; overflow: hidden; border-radius: 14px;
  background: var(--bg-card); border: 1px solid var(--line-soft);
  aspect-ratio: 9 / 16; cursor: pointer;
  transition: transform 0.6s var(--ease), border-color 0.6s var(--ease);
}
.vcard:hover { transform: translateY(-4px); border-color: var(--line); }
.vcard__media { position: absolute; inset: 0; }
.vcard__media img, .vcard__media video {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease), opacity 0.6s var(--ease);
}
.vcard__media video { position: absolute; inset: 0; opacity: 0; }
.vcard:hover .vcard__media img { transform: scale(1.05); }
.vcard:hover .vcard__media video.is-on { opacity: 1; }

.vcard__cap {
  position: absolute; left: 14px; right: 14px; bottom: 12px;
  display: flex; flex-direction: column; gap: 3px;
  text-shadow: 0 1px 12px rgba(0,0,0,0.6);
}
.vcard__cap b { font-size: 13px; font-weight: 500; letter-spacing: -0.01em; }
.vcard__cap span { font-size: 10.5px; color: rgba(245,245,247,0.6); letter-spacing: 0.1em; }
.vcard::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.62), transparent 45%);
  pointer-events: none;
}

.play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.82);
  width: 56px; height: 56px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.28);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  opacity: 0; transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.play--sm { width: 42px; height: 42px; }
.vcard:hover .play, .card:hover .play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.play::after {
  content: ""; width: 0; height: 0;
  border-left: 12px solid #fff;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  margin-left: 4px;
}
.play--sm::after { border-left-width: 9px; border-top-width: 6px; border-bottom-width: 6px; }

/* poster wall ------------------------------------------------- */
.wall { columns: 3; column-gap: clamp(12px, 1.4vw, 20px); }
.pcard {
  break-inside: avoid; margin: 0 0 clamp(12px, 1.4vw, 20px);
  position: relative; overflow: hidden; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--line-soft);
  cursor: zoom-in;
}
.pcard img {
  width: 100%; height: auto;
  transition: transform 1.1s var(--ease), filter 0.6s var(--ease);
  filter: saturate(0.95);
}
.pcard:hover img { transform: scale(1.03); filter: saturate(1.05); }
.pcard figcaption {
  position: absolute; left: 14px; right: 14px; bottom: 12px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  text-shadow: 0 1px 10px rgba(0,0,0,0.7);
}
.pcard:hover figcaption { opacity: 1; transform: none; }
.pcard figcaption b { font-size: 12.5px; font-weight: 500; }
.pcard figcaption span { font-size: 10.5px; color: rgba(245,245,247,0.6); letter-spacing: 0.1em; }

/* about ------------------------------------------------------- */
.about__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 90px); align-items: start;
  border-top: 1px solid var(--line-soft);
  padding-top: clamp(40px, 6vw, 72px);
}
.about__body p {
  margin: 0 0 1.15em; color: rgba(245,245,247,0.74);
  font-size: clamp(14.5px, 1.35vw, 17px); max-width: 46ch;
}
.about__body p:first-child { color: var(--fg); font-size: clamp(16px, 1.6vw, 19px); }

.contact { margin-top: clamp(56px, 8vw, 110px); border-top: 1px solid var(--line-soft); }
.contact__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: clamp(20px, 2.6vw, 34px) 0;
  border-bottom: 1px solid var(--line-soft);
}
.contact__label {
  font-size: 11.5px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted);
}
.contact__mail {
  font-family: var(--display); font-size: clamp(1.1rem, 2.6vw, 2.2rem);
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #f5f5f7, #8a8a90);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: opacity 0.35s var(--ease);
}
.contact__mail:hover { opacity: 0.72; }
.contact__links { display: flex; gap: clamp(16px, 3vw, 40px); font-size: 13.5px; }
.contact__links a { color: var(--muted); transition: color 0.3s var(--ease); }
.contact__links a:hover { color: var(--fg); }

/* footer ------------------------------------------------------ */
.foot {
  max-width: var(--max); margin: 0 auto;
  padding: 30px var(--pad) 46px;
  display: flex; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px; color: var(--muted); letter-spacing: 0.06em;
}

/* lightbox ---------------------------------------------------- */
.lb {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px);
  opacity: 0; transition: opacity 0.45s var(--ease);
  padding: clamp(16px, 4vw, 64px);
}
.lb.is-open { opacity: 1; }
.lb[hidden] { display: none; }
.lb__stage { margin: 0; max-width: min(1360px, 100%); max-height: 80vh; }
.lb__stage img, .lb__stage video {
  max-width: 100%; max-height: 80vh; width: auto; height: auto;
  border-radius: 10px; object-fit: contain;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}
.lb__cap {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: clamp(18px, 4vh, 42px);
  display: flex; gap: 14px; align-items: baseline;
  font-size: 13px; color: var(--muted); text-align: center;
}
.lb__cap strong { color: var(--fg); font-weight: 500; }
.lb__close {
  position: absolute; top: 18px; right: 22px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.lb__close:hover { background: var(--fg); color: #000; }
.lb__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); font-size: 20px;
  display: grid; place-items: center; color: var(--muted);
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.lb__arrow:hover { background: rgba(255,255,255,0.1); color: var(--fg); }
.lb__arrow--prev { left: clamp(10px, 2vw, 28px); }
.lb__arrow--next { right: clamp(10px, 2vw, 28px); }

/* cursor ------------------------------------------------------ */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 80;
  width: 82px; height: 82px; border-radius: 50%;
  background: var(--fg); color: #000;
  display: grid; place-items: center;
  font-size: 11.5px; letter-spacing: 0.08em;
  pointer-events: none; opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  transition: opacity 0.35s var(--ease);
  mix-blend-mode: difference;
}

/* responsive -------------------------------------------------- */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .hero { padding-bottom: clamp(150px, 22vh, 200px); }
  .strip__item:nth-child(n + 4) { display: none; }
  .scrollcue { display: none; }
  .grid--wide { grid-template-columns: 1fr; }
  .grid--wide .card:first-child { grid-column: span 1; aspect-ratio: 16 / 11; }
  .grid--vertical { grid-template-columns: repeat(2, 1fr); }
  .wall { columns: 2; }
  .about__grid { grid-template-columns: 1fr; }
  .foot { flex-direction: column; }
}
@media (max-width: 560px) {
  .grid--vertical { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .wall { columns: 1; }
  .nav__cta { display: none; }
  .contact__row { flex-direction: column; align-items: flex-start; }
}

/* reduced motion ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .hero__title .line > span { transform: none; }
}
