/* ============================================================
   SUMU-DESIGN · 阿木作品集
   Material & Light — 材质光影
   ============================================================ */

/* ============ TOKENS ============ */
:root {
  /* color */
  --bg-0: #100D09;
  --bg-1: #17130E;
  --bg-2: #1F1A13;
  --bg-3: #2A231A;
  --line: #342A1E;
  --line-2: #54432E;
  --ink: #EDE4D1;
  --ink-2: #B4A488;
  --ink-3: #746856;
  --amber: #D08845;
  --amber-soft: rgba(208, 136, 69, .14);
  --copper: #A87F5C;

  /* font */
  --f-display: 'Fraunces', 'Noto Serif SC', 'Songti SC', serif;
  --f-body: 'Inter', 'Noto Sans SC', -apple-system, sans-serif;
  --f-mono: 'JetBrains Mono', 'Noto Sans SC', ui-monospace, monospace;

  /* layout */
  --pad-x: clamp(24px, 6vw, 96px);
  --max-w: 1680px;
  --header-h: 76px;
  --sidenav-w: 76px;

  /* motion */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: .25s;
  --t-mid: .5s;
  --t-slow: .9s;
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  background: var(--bg-1);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
ul, ol { list-style: none; }
em { font-style: normal; }
i { font-style: normal; }

::selection { background: var(--amber); color: var(--bg-0); }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--copper); }

/* ============ GRAIN ============ */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 9990;
  opacity: .035;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(255,255,255,.6) 1px, transparent 1px),
    radial-gradient(circle at 75% 75%, rgba(255,255,255,.4) 1px, transparent 1px);
  background-size: 4px 4px, 6px 6px;
  will-change: transform;
  animation: grain-shift 1.8s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-2%, 3%, 0); }
  50% { transform: translate3d(3%, -2%, 0); }
  75% { transform: translate3d(-3%, -3%, 0); }
  100% { transform: translate3d(2%, 2%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
}

/* ============ CURSOR ============ */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--amber);
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid rgba(237, 228, 209, .6);
  transition: width .3s var(--ease-out), height .3s var(--ease-out), border-color .3s;
}
body.is-hovering-link .cursor-ring { width: 56px; height: 56px; border-color: var(--amber); }
@media (hover: none), (max-width: 768px) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ============ PRELOADER ============ */
.preloader {
  position: fixed; inset: 0;
  background: var(--bg-0);
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .8s var(--ease-in-out), visibility .8s;
}
.preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-inner {
  width: min(420px, 80vw);
  text-align: center;
}
.preloader-logo {
  font-family: var(--f-display);
  font-size: 56px;
  font-weight: 300;
  letter-spacing: .04em;
  color: var(--ink);
  margin-bottom: 48px;
  display: flex; align-items: baseline; justify-content: center; gap: 12px;
}
.preloader-logo-sub {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .4em;
  color: var(--amber);
  font-weight: 400;
}
.preloader-bar {
  width: 100%; height: 1px;
  background: var(--line);
  position: relative;
  margin-bottom: 20px;
  overflow: hidden;
}
.preloader-bar-fill {
  position: absolute; left: 0; top: 0;
  width: 0%; height: 100%;
  background: var(--amber);
  transition: width .3s var(--ease-out);
}
.preloader-meta {
  display: flex; justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--ink-3);
  margin-bottom: 40px;
}
.preloader-pct { color: var(--ink-2); }
.preloader-enter {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 14px 32px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink-3);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .3em;
  cursor: not-allowed;
  opacity: .4;
  transition: all .4s var(--ease-out);
}
.preloader-enter:not([disabled]) {
  color: var(--ink);
  border-color: var(--amber);
  opacity: 1;
  cursor: pointer;
}
.preloader-enter:not([disabled]):hover {
  background: var(--amber);
  color: var(--bg-0);
  gap: 22px;
}
.preloader-enter-arrow { transition: transform .3s var(--ease-out); }
.preloader-enter:not([disabled]):hover .preloader-enter-arrow { transform: translateX(4px); }

/* ============ HEADER ============ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad-x);
  z-index: 1000;
  transition: transform .4s var(--ease-out), background .4s;
}
.site-header.is-scrolled {
  background: linear-gradient(to bottom, rgba(16,13,9,.88), rgba(16,13,9,0));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.logo {
  display: flex; align-items: baseline; gap: 6px;
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: .02em;
}
.logo-main { font-size: 20px; color: var(--ink); }
.logo-sub {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--amber);
}
.header-meta {
  display: flex; align-items: center; gap: 32px;
}
.header-index {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--ink-3);
}
.header-index em { color: var(--amber); font-weight: 500; }
.header-index i { margin: 0 6px; color: var(--line-2); }
.header-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--ink);
  transition: all .3s var(--ease-out);
}
.header-cta:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--bg-0);
}
.header-cta-arrow { transition: transform .3s var(--ease-out); }
.header-cta:hover .header-cta-arrow { transform: translate(2px, -2px); }

/* ============ SIDE NAV ============ */
.side-nav {
  position: fixed;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex; flex-direction: column; gap: 20px;
}
.side-nav-item {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--ink-3);
  transition: color .3s;
}
.side-num { min-width: 20px; }
.side-line {
  width: 24px; height: 1px;
  background: var(--line-2);
  transition: width .4s var(--ease-out), background .3s;
}
.side-label {
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .3s, transform .3s var(--ease-out);
}
.side-nav-item:hover .side-label,
.side-nav-item.is-active .side-label {
  opacity: 1;
  transform: translateX(0);
}
.side-nav-item.is-active { color: var(--ink); }
.side-nav-item.is-active .side-num { color: var(--amber); }
.side-nav-item.is-active .side-line { width: 40px; background: var(--amber); }

/* ============ MOBILE RIGHT NAV ============ */
.m-nav { display: none; }

/* 返回首页按钮 */
.contact-back {
  position: relative;
  display: inline-flex; align-items: center; gap: 14px;
  margin-top: auto;
  margin-bottom: 24px;
  padding: 18px 32px;
  border: 1px solid rgba(237, 228, 209, .22);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--ink-2);
  background: rgba(16, 13, 9, .45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all .4s var(--ease-out);
}
.contact-back-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border: 1px solid rgba(237, 228, 209, .3);
  border-radius: 50%;
  font-size: 11px;
  color: var(--amber);
  transition: all .4s var(--ease-out);
}
.contact-back-text { white-space: nowrap; }
.contact-back-line {
  width: 24px; height: 1px;
  background: rgba(237, 228, 209, .25);
  transition: all .4s var(--ease-out);
}
.contact-back:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--bg-0);
  gap: 22px;
}
.contact-back:hover .contact-back-icon {
  background: var(--bg-0);
  color: var(--amber);
  border-color: var(--bg-0);
  transform: translateY(-2px);
}
.contact-back:hover .contact-back-line {
  width: 36px;
  background: var(--bg-0);
}

/* ============ SECTION BASE ============ */
.section {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--header-h) + 60px) var(--pad-x) 120px calc(var(--pad-x) + var(--sidenav-w));
  max-width: var(--max-w);
  margin: 0 auto;
}
.section-head { margin-bottom: 72px; }
.sec-label {
  display: flex; align-items: baseline; gap: 24px;
  margin-bottom: 24px;
}
.sec-num {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--amber);
  font-weight: 500;
}
.sec-tag {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .28em;
  color: var(--ink-3);
}
.sec-desc {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--ink-2);
  margin-top: 8px;
}
.sec-desc i { margin: 0 8px; color: var(--amber); }

/* scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* ============ 01 HERO ============ */
.hero {
  padding: 0;
  height: 100vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  max-width: none;
}
.hero-media {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-video {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(.62) saturate(.92);
}
.hero-veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 70%, rgba(16,13,9,.1) 0%, rgba(16,13,9,.75) 70%),
    linear-gradient(to top, rgba(16,13,9,.92) 0%, rgba(16,13,9,.3) 40%, rgba(16,13,9,.1) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: 0 var(--pad-x) 60px calc(var(--pad-x) + var(--sidenav-w));
}
.hero-meta {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .26em;
  color: var(--ink-2);
  margin-bottom: 32px;
}
.hero-meta-dot {
  width: 4px; height: 4px;
  background: var(--amber);
  border-radius: 50%;
}
.hero-title {
  margin-bottom: 28px;
  line-height: .9;
}
.hero-title-en {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(100px, 16vw, 260px);
  font-weight: 300;
  letter-spacing: -.02em;
  color: var(--ink);
  line-height: .88;
}
.hero-title-cn {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(28px, 3.6vw, 56px);
  font-weight: 400;
  letter-spacing: .5em;
  color: var(--copper);
  margin-top: 18px;
  padding-left: 8px;
}
.hero-row {
  display: flex; align-items: baseline; gap: 32px;
  margin-bottom: 48px;
}
.hero-sub {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--amber);
}
.hero-tagline {
  font-size: 14px;
  letter-spacing: .12em;
  color: var(--ink-2);
}
.hero-tagline i { margin: 0 10px; color: var(--copper); }
.hero-cta {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 16px 32px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--ink);
  background: rgba(16, 13, 9, .4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all .4s var(--ease-out);
}
.hero-cta:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--bg-0);
  gap: 22px;
}
.hero-cta-arrow { transition: transform .3s var(--ease-out); }
.hero-cta:hover .hero-cta-arrow { transform: translateX(4px); }

.hero-foot {
  position: relative;
  z-index: 1;
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px var(--pad-x) 24px calc(var(--pad-x) + var(--sidenav-w));
  border-top: 1px solid rgba(237, 228, 209, .08);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .24em;
  color: var(--ink-3);
}

/* Hero 入场动画:默认元素隐藏,等 body.is-entered 后滑入 */
.hero-meta, .hero-title-en, .hero-title-cn, .hero-row, .hero-cta, .hero-foot {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
body.is-entered .hero-meta      { opacity: 1; transform: translateY(0); transition-delay: .15s; }
body.is-entered .hero-title-en  { opacity: 1; transform: translateY(0); transition-delay: .28s; }
body.is-entered .hero-title-cn  { opacity: 1; transform: translateY(0); transition-delay: .45s; }
body.is-entered .hero-row       { opacity: 1; transform: translateY(0); transition-delay: .60s; }
body.is-entered .hero-cta       { opacity: 1; transform: translateY(0); transition-delay: .75s; }
body.is-entered .hero-foot      { opacity: 1; transform: translateY(0); transition-delay: .90s; }
/* 视频淡入 */
.hero-media { opacity: 0; transition: opacity 1.2s var(--ease-out); }
body.is-entered .hero-media { opacity: 1; }
.hero-loop {
  display: flex; align-items: center; gap: 8px;
}
.loop-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border: 1px solid var(--amber);
  border-radius: 50%;
  color: var(--amber);
  font-size: 11px;
  font-weight: 400;
  font-family: var(--f-mono);
  line-height: 1;
}
.hero-scroll {
  display: flex; align-items: center; gap: 12px;
}
.hero-scroll-line {
  width: 40px; height: 1px;
  background: var(--line-2);
  position: relative;
  overflow: hidden;
}
.hero-scroll-line::after {
  content: '';
  position: absolute; left: -100%; top: 0;
  width: 100%; height: 100%;
  background: var(--amber);
  animation: scroll-line-slide 2s var(--ease-in-out) infinite;
}
@keyframes scroll-line-slide {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* ============ 02 ABOUT ============ */
.about { background: var(--bg-1); }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 48px 80px;
  align-items: start;
}
.about-lead {
  grid-column: 1;
  font-family: var(--f-display);
  font-size: clamp(28px, 3.6vw, 52px);
  font-weight: 300;
  line-height: 1.28;
  letter-spacing: -.01em;
  color: var(--ink);
}
.about-lead em {
  font-style: italic;
  color: var(--amber);
  font-weight: 400;
}
.about-body { grid-column: 1; padding-top: 0; }
.about-frame { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: calc(var(--header-h) + 40px); }
.about-paragraph {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-2);
  margin-bottom: 24px;
}
.about-paragraph em {
  color: var(--amber);
  font-weight: 500;
  border-bottom: 1px solid var(--amber-soft);
  padding-bottom: 2px;
}
.about-skills {
  margin-top: 48px;
  border-top: 1px solid var(--line);
}
.skill-item {
  display: grid;
  grid-template-columns: 60px 1fr 1.4fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition: padding-left .3s var(--ease-out);
}
.skill-item:hover { padding-left: 12px; }
.skill-num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--amber);
}
.skill-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}
.skill-value {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-3);
}
.about-frame {
  position: relative;
}
.about-frame-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-2);
}
.about-frame-media video {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(.85) contrast(1.05);
  transition: transform .8s var(--ease-out);
}
.about-frame:hover .about-frame-media video { transform: scale(1.03); }
.frame-loop {
  position: absolute;
  top: 16px; right: 16px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: rgba(16, 13, 9, .65);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .2em;
  color: var(--ink-2);
}
.frame-loop .loop-badge {
  width: 14px; height: 14px;
  font-size: 9px;
}
.about-frame-cap {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 14px;
  padding: 0 4px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--ink-3);
}
.frame-num { color: var(--amber); }

/* ============ 03 WORKS ============ */
.works { background: var(--bg-0); }
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-bottom: 72px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.filter-btn {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--ink-2);
  transition: all .3s var(--ease-out);
}
.filter-btn sup {
  font-family: var(--f-mono);
  font-size: 9px;
  color: var(--ink-3);
  margin-left: 4px;
  transition: color .3s;
}
.filter-btn:hover {
  border-color: var(--copper);
  color: var(--ink);
}
.filter-btn.is-active {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--bg-0);
}
.filter-btn.is-active sup { color: var(--bg-0); }

.works-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.work-card {
  position: relative;
  display: block;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .4s var(--ease-out), transform .4s var(--ease-out);
  /* 让前 5 个作品稍微大一点,通过 grid-column 跨列 */
}
.work-card.is-featured {
  grid-column: span 2;
  grid-row: span 1;
}
.work-card.is-hidden { display: none; }
.work-card:hover {
  border-color: var(--copper);
  transform: translateY(-4px);
}
.work-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-3);
}
.work-card.is-featured .work-media { aspect-ratio: 8 / 3.4; }
.work-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  backface-visibility: hidden;
  transition: transform .9s var(--ease-out), filter .4s;
  filter: saturate(.92);
}
.work-card:hover .work-media img {
  transform: scale(1.05);
  filter: saturate(1.05);
}
.work-num-badge {
  position: absolute;
  top: 14px; left: 14px;
  padding: 5px 10px;
  background: rgba(16, 13, 9, .7);
  backdrop-filter: blur(8px);
  border-radius: 3px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--amber);
  border: 1px solid rgba(208, 136, 69, .3);
}
.work-view {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--amber);
  color: var(--bg-0);
  border-radius: 50%;
  font-size: 14px;
  opacity: 0;
  transform: translate(6px, -6px);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
.work-card:hover .work-view {
  opacity: 1;
  transform: translate(0, 0);
}
.work-info {
  padding: 18px 20px 20px;
}
.work-meta {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 8px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--ink-3);
}
.work-meta i { color: var(--amber); }
.work-title {
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: .01em;
  line-height: 1.35;
  transition: color .3s;
}
.work-card:hover .work-title { color: var(--amber); }
.work-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: .04em;
}

/* ============ 04 MOTION ============ */
.motion { background: var(--bg-1); }
.motion-list {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
}
.motion-row {
  display: grid;
  grid-template-columns: 100px 200px 1fr 200px 60px;
  gap: 32px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: padding-left .4s var(--ease-out), background .4s;
}
.motion-row:hover {
  padding-left: 24px;
  background: linear-gradient(to right, var(--amber-soft), transparent 40%);
}
.motion-num {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--amber);
}
.motion-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 3px;
  background: var(--bg-2);
}
.motion-thumb video {
  width: 100%; height: 100%;
  object-fit: cover;
  backface-visibility: hidden;
  filter: saturate(.85);
  transition: transform .8s var(--ease-out), filter .4s;
}
.motion-row:hover .motion-thumb video {
  transform: scale(1.04);
  filter: saturate(1.05);
}
.motion-info {
  display: flex; flex-direction: column; gap: 6px;
}
.motion-title {
  font-family: var(--f-display);
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0;
  transition: color .3s;
}
.motion-row:hover .motion-title { color: var(--amber); }
.motion-meta {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--ink-3);
}
.motion-meta i { color: var(--copper); margin: 0 8px; }
.motion-badge {
  display: inline-flex; align-items: center; gap: 8px;
  justify-self: end;
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--ink-2);
}
.motion-arrow {
  justify-self: end;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-3);
  font-size: 16px;
  transition: all .3s var(--ease-out);
}
.motion-row:hover .motion-arrow {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--bg-0);
  transform: rotate(45deg);
}

/* ============ 05 CONTACT ============ */
.contact {
  background: var(--bg-0);
  min-height: 100vh;
  display: flex; flex-direction: column;
  /* 与 hero 一致的真全屏:不受 .section 基类宽度/内边距限制 */
  max-width: none;
  margin: 0;
  padding: 0;
}
.contact-bg {
  position: absolute; inset: 0;
  z-index: 0;
  overflow: hidden;
}
.contact-bg video {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(.32) saturate(.7);
}
.contact-veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(16,13,9,.3), rgba(16,13,9,.85) 80%),
    linear-gradient(to top, rgba(16,13,9,.6), transparent 50%);
}
.contact-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  /* 内容保持与其他章节对齐 */
  padding: calc(var(--header-h) + 60px) var(--pad-x) 120px calc(var(--pad-x) + var(--sidenav-w));
}
.sec-label.light .sec-tag { color: var(--ink-2); }
.contact-title {
  font-family: var(--f-display);
  font-size: clamp(56px, 8.5vw, 128px);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -.015em;
  margin: 24px 0 16px;
  /* 上行描边镂空,与下行实心琥珀形成张力 */
  color: transparent;
  -webkit-text-stroke: 1px rgba(237, 228, 209, .75);
}
.contact-title em {
  font-style: italic;
  color: var(--amber);
  -webkit-text-stroke: 0;
  font-weight: 400;
}
.contact-sub {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .24em;
  color: var(--ink-2);
  margin-bottom: 72px;
}
.contact-rows {
  border-top: 1px solid rgba(237, 228, 209, .12);
}
.contact-row {
  position: relative;
  display: grid;
  grid-template-columns: 160px 1fr 40px;
  align-items: center;
  gap: 32px;
  width: 100%;
  padding: 28px 0;
  border-bottom: 1px solid rgba(237, 228, 209, .12);
  text-align: left;
  transition: padding-left .4s var(--ease-out);
}
/* hover 时琥珀色带从左侧扫入整行 */
.contact-row::before {
  content: '';
  position: absolute;
  inset: 0 -24px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .45s var(--ease-out);
  z-index: -1;
}
.contact-row:hover::before { transform: scaleX(1); }
.contact-row:hover { padding-left: 16px; }
.contact-row:hover .cr-label { color: rgba(16, 13, 9, .65); }
.contact-row:hover .cr-value { color: var(--bg-0); }
.contact-row:hover .cr-arrow { color: var(--bg-0); transform: translate(4px, -4px); }
.cr-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .28em;
  color: var(--copper);
  transition: color .3s;
}
.cr-value {
  font-family: var(--f-display);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 300;
  color: var(--ink);
  letter-spacing: .01em;
  transition: color .3s;
}
.cr-arrow {
  justify-self: end;
  font-size: 18px;
  color: var(--ink-3);
  transition: transform .3s var(--ease-out), color .3s;
}

.site-footer {
  position: relative;
  z-index: 1;
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px var(--pad-x) 24px calc(var(--pad-x) + var(--sidenav-w));
  border-top: 1px solid rgba(237, 228, 209, .1);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .26em;
  color: var(--ink-3);
}
.footer-left i { color: var(--amber); margin: 0 4px; }
.footer-right em { color: var(--amber); font-weight: 500; }

/* ============ MODALS ============ */
.modal {
  position: fixed; inset: 0;
  z-index: 5000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s var(--ease-out), visibility .4s;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 8, 5, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.modal-panel {
  position: relative;
  z-index: 1;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  max-height: 90vh;
  overflow: hidden;
  transform: translateY(20px) scale(.97);
  transition: transform .5s var(--ease-spring);
}
.modal.is-open .modal-panel { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 10;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(16, 13, 9, .7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--ink);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  transition: all .3s;
}
.modal-close:hover {
  background: var(--amber);
  color: var(--bg-0);
  border-color: var(--amber);
  transform: rotate(90deg);
}

/* project modal */
.modal-panel-project {
  width: min(1400px, 94vw);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
}
.pm-media {
  position: relative;
  background: var(--bg-3);
  min-height: 560px;
  display: flex; flex-direction: column;
}
.pm-media > img {
  flex: 1;
  width: 100%;
  object-fit: contain;
  background: #0D0B08;
  min-height: 460px;
  max-height: 68vh;
  transition: opacity .3s var(--ease-out);
}
.pm-media > img.is-fading { opacity: 0; }
/* 全屏大图查看 */
.pm-lightbox {
  position: fixed; inset: 0;
  z-index: 30;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 8, 6, .95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease-out), visibility .3s;
  cursor: zoom-out;
}
.pm-lightbox.is-open { opacity: 1; visibility: visible; }
.pm-lightbox img {
  max-width: 94vw;
  max-height: 92vh;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
}
.pm-lightbox-hint {
  position: absolute;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .24em;
  color: var(--ink-3);
  pointer-events: none;
}

/* ============ MOBILE GALLERY ============ */
.gallery {
  position: fixed; inset: 0;
  z-index: 3000;
  background: rgba(8, 6, 4, .98);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s ease, visibility .3s;
}
.gallery.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.gallery-strip {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gallery-strip::-webkit-scrollbar { display: none; }
.gallery-slide {
  flex: 0 0 100vw;
  height: 100%;
  scroll-snap-align: center;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.gallery-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 3px;
}
.gallery-close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: 16px;
  z-index: 2;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(16, 13, 9, .72);
  color: var(--ink);
  font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.gallery-count {
  position: absolute;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%);
  z-index: 2;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--ink-2);
  pointer-events: none;
}
.gallery-hint {
  position: absolute;
  bottom: calc(52px + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%);
  z-index: 2;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--ink-3);
  pointer-events: none;
  transition: opacity .5s;
}
.gallery-hint.is-hidden { opacity: 0; }
/* 档案袋:缩略图像插在袋里的照片,下半截藏袋中,上半截露出袋口,悬停再抽出一截(不完全抽出) */
.pm-deck {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: min(94vw, 1280px);
  height: 96px;
  padding: 0 96px;
  pointer-events: none; /* 只让缩略图响应鼠标 */
}
/* 袋身(后壁) */
.pm-deck::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 56px;
  background: rgba(16, 13, 9, .94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 12px 12px 16px 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
  z-index: 0;
}
/* 袋口前襟:与袋身同高,盖住照片没入袋内的部分 */
.pm-deck::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 56px;
  background: linear-gradient(to bottom, #262017, #17130E);
  border-top: 1px solid var(--line-2);
  border-radius: 12px 12px 16px 16px;
  z-index: 2;
  pointer-events: none;
}
.pm-deck-count {
  position: absolute;
  left: 22px; bottom: 9px;
  z-index: 3;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--ink-3);
  pointer-events: none;
}
.pm-deck img {
  position: relative;
  z-index: 1;
  width: 72px; height: 54px;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: 2px;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, .4);
  margin-left: -36px;
  margin-bottom: 26px; /* 底部 26px 留在袋内,被前襟盖住 */
  cursor: pointer;
  pointer-events: auto;
  transition: transform .28s var(--ease-spring), border-color .3s;
}
.pm-deck img:first-of-type { margin-left: 0; }
/* 悬停:再向外抽出一截,但仍不完全抽出 */
.pm-deck img:hover {
  transform: translateY(-16px);
  border-color: var(--amber);
}
.pm-deck img.is-active { border-color: var(--amber); }
/* 悬停预览:浮在缩略图上方,不占用牌列空间 */
.pm-preview {
  position: fixed;
  z-index: 20;
  width: 240px;
  aspect-ratio: 4 / 3;
  transform: translate(-50%, -100%);
  background: var(--bg-0);
  border: 2px solid var(--amber);
  border-radius: 4px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .6);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s var(--ease-out);
}
.pm-preview.is-show { opacity: 1; }
.pm-preview img { width: 100%; height: 100%; object-fit: cover; }
.pm-info {
  padding: 40px 36px;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.pm-head {
  display: flex; align-items: baseline; gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.pm-num {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--amber);
}
.pm-meta {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--ink-3);
}
.pm-title {
  font-family: var(--f-display);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 8px;
}
.pm-sub {
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 32px;
}
.pm-specs {
  margin-top: auto;
  border-top: 1px solid var(--line);
}
.pm-spec {
  display: flex; justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.pm-spec-label {
  font-family: var(--f-mono);
  letter-spacing: .18em;
  color: var(--ink-3);
}
.pm-spec-value { color: var(--ink); }

/* qr modal */
.modal-panel-qr {
  width: min(380px, 88vw);
  padding: 40px;
  text-align: center;
}
.qr-frame {
  width: 100%;
  aspect-ratio: 1;
  background: #fff;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 24px;
}
.qr-frame img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.qr-label {
  font-family: var(--f-display);
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 6px;
}
.qr-hint {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .24em;
  color: var(--ink-3);
}

/* video modal */
.modal-panel-video {
  width: min(1200px, 92vw);
  padding: 24px;
}
.modal-panel-video video {
  width: 100%;
  max-height: 70vh;
  border-radius: 4px;
  background: #000;
}
/* 隐藏原生全屏按钮:用自建全屏,避免浏览器退出全屏时强制滚动页面 */
.modal-panel-video video::-webkit-media-controls-fullscreen-button { display: none; }
.vm-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}
.vm-foot .vm-title { margin-top: 0; flex: 1; }
.vm-expand {
  padding: 8px 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .24em;
  color: var(--ink-2);
  transition: all .3s var(--ease-out);
}
.vm-expand:hover { background: var(--amber); border-color: var(--amber); color: var(--bg-0); }
/* 自建全屏:面板铺满视口,不走浏览器全屏 API,退出时滚动位置不动 */
.modal-panel-video.is-expanded {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  max-height: none;
  height: 100vh;
  border: none;
  border-radius: 0;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(10, 8, 6, .97);
  transform: none;
}
.modal-panel-video.is-expanded video {
  flex: 1;
  min-height: 0;
  max-height: none;
  width: 100%;
  object-fit: contain;
}
.vm-title {
  margin-top: 16px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--ink-2);
  text-align: center;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1280px) {
  .works-grid { grid-template-columns: repeat(3, 1fr); }
  .work-card.is-featured { grid-column: span 2; }
  .about-grid { gap: 48px 60px; }
}

@media (max-width: 1024px) {
  :root { --sidenav-w: 0px; }
  .side-nav { display: none; }

  /* 移动端右侧导航 */
  .m-nav {
    display: flex;
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 998;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 14px 8px;
    border-radius: 999px;
    background: rgba(16, 13, 9, .55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(237, 228, 209, .08);
  }
  .m-nav-track {
    position: absolute;
    top: 14px; bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: rgba(237, 228, 209, .12);
    pointer-events: none;
  }
  .m-nav-fill {
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    height: 0%;
    background: var(--amber);
    border-radius: 2px;
    transition: height .15s linear;
  }
  .m-nav-dot {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--bg-2);
    border: 1px solid var(--line-2);
    z-index: 1;
    transition: all .3s var(--ease-out);
  }
  .m-nav-num {
    font-family: var(--f-mono);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: .08em;
    color: var(--ink-3);
    transition: color .3s;
  }
  .m-nav-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid var(--amber);
    opacity: 0;
    transform: scale(.6);
    transition: opacity .3s, transform .3s var(--ease-spring);
    pointer-events: none;
  }
  .m-nav-dot.is-active {
    background: var(--amber);
    border-color: var(--amber);
    transform: scale(1.15);
  }
  .m-nav-dot.is-active .m-nav-num {
    color: var(--bg-0);
    font-weight: 600;
  }
  .m-nav-dot.is-active .m-nav-ring {
    opacity: 1;
    transform: scale(1);
  }
  .m-nav-dot:active { transform: scale(.9); }

  /* 恢复原有内边距, 让内容保持居中 */
  .section { padding-right: var(--pad-x); }
  .contact-inner { padding-right: var(--pad-x); }
  .site-footer { padding-right: var(--pad-x); }
  .hero-inner { padding-right: var(--pad-x); }
  .hero-foot { padding-right: var(--pad-x); }

  .works-grid { grid-template-columns: repeat(2, 1fr); }
  .work-card.is-featured { grid-column: span 2; }
  .motion-row {
    grid-template-columns: 60px 140px 1fr 60px;
    gap: 20px;
  }
  .motion-badge { display: none; }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-lead { grid-column: 1; }
  .about-body { grid-column: 1; }
  .about-frame {
    grid-column: 1;
    grid-row: auto;
    position: static;
    max-width: 480px;
  }
}

@media (max-width: 768px) {
  :root {
    --pad-x: 40px;
    --header-h: 64px;
  }
  body { font-size: 14px; }
  .section { padding-top: calc(var(--header-h) + 40px); padding-bottom: 80px; }
  .section-head { margin-bottom: 40px; }
  .hero-inner { padding-bottom: 40px; }
  .hero-title-en { font-size: clamp(72px, 22vw, 120px); }
  .hero-title-cn { font-size: clamp(22px, 6vw, 32px); letter-spacing: .4em; }
  .hero-row { flex-direction: column; gap: 8px; align-items: flex-start; margin-bottom: 32px; }
  .header-meta { gap: 16px; }
  .header-cta { padding: 8px 14px; font-size: 10px; }
  .works-grid { grid-template-columns: 1fr; gap: 16px; }
  .work-card.is-featured { grid-column: span 1; }
  .work-card.is-featured .work-media { aspect-ratio: 4 / 3; }
  .motion-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px 0;
  }
  .motion-num { order: -1; }
  .motion-thumb { width: 100%; }
  .motion-arrow { display: none; }
  .contact-row { grid-template-columns: 1fr; gap: 6px; padding: 16px 0; }
  .cr-label { font-size: 10px; letter-spacing: .22em; }
  .cr-value { font-size: 15px; font-weight: 300; }
  .cr-arrow { display: none; }
  .modal-panel-project { grid-template-columns: 1fr; max-height: 88vh; overflow-y: auto; }
  .pm-media { min-height: 280px; }
  .pm-media > img { min-height: 240px; max-height: 40vh; }
  .pm-info { padding: 28px 24px; }
  .pm-title { font-size: 24px; }
  .site-footer { flex-direction: column; gap: 8px; font-size: 9px; }
  .hero-foot { padding: 16px var(--pad-x); }
  .filter-bar { gap: 8px; }
  .filter-btn { padding: 8px 14px; font-size: 12px; }
  .about-lead { font-size: clamp(26px, 7vw, 40px); }
  .contact-title { font-size: clamp(40px, 11vw, 72px); }
}

/* ============ MISC ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}
