/* ==========================================================================
   作品集 · 设计系统
   深色单色 · Barlow · 大图留白
   全部原创代码：仅复用开源库(GSAP/Lenis)与通用动效手法
   ========================================================================== */

/* ---- 设计令牌 ---- */
:root {
  /* 颜色：纯白底 + 纯黑字，字色层次以纯黑为基准按不透明度递减 */
  --bg:        #ffffff;
  --bg-soft:   #f0f0f0;   /* 图片占位/加载底色:纯白上的中性浅灰 */
  --ink:       #000000;
  --mute:      rgba(0, 0, 0, 0.55);
  --faint:     rgba(0, 0, 0, 0.32);
  --line:      rgba(0, 0, 0, 0.14);
  --panel:     #000000;   /* 转场帘用深色，形成利落明暗对比 */

  /* 字体:正文/UI 用 Inter;展示大标题用 League Gothic(仅拉丁,中文走系统回退) */
  --font: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-display: 'League Gothic', 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* 流式字号（clamp：最小, 视口缩放, 最大） */
  --fs-display-xl: clamp(3.2rem, 12.5vw, 12rem);
  --fs-display-l:  clamp(2.6rem, 8.5vw, 7.5rem);
  --fs-display-m:  clamp(2rem, 5.5vw, 4.5rem);
  --fs-h:          clamp(1.4rem, 3vw, 2.25rem);
  --fs-body:       clamp(1rem, 1.15vw, 1.2rem);
  --fs-small:      0.78rem;

  /* 间距 */
  --pad-x: clamp(20px, 4vw, 64px);        /* 页面左右安全边距 */
  --sec-y: clamp(90px, 13vw, 190px);      /* 大区块纵向节奏 */
  --gap:   clamp(16px, 2vw, 32px);

  /* 动效 */
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);   /* expo.out 手感 */
  --ease-io:  cubic-bezier(0.77, 0, 0.175, 1);  /* power4.inOut */
  --dur: 1.1s;

  /* 层级 */
  --z-nav: 100;
  --z-cursor: 1000;
  --z-transition: 2000;
  --z-preloader: 3000;
}

/* ---- 基础 ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }
html.lenis, html.lenis body { height: auto; }     /* Lenis 需要的标记 */
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100%;
  overscroll-behavior-x: none;   /* 阻止触控板左右滑触发浏览器前进/后退 */
}
/* 拖拽滑块期间:全页禁文字选中(JS 按下时加 no-select、松开移除) */
body.no-select, body.no-select * { user-select: none !important; -webkit-user-select: none !important; }

/* 弹性媒体：图/视频都不超出容器、保持原始纵横比，绝不拉伸。
   具体组件(hero/滑条/reveal)用更高优先级的 height/object-fit 覆盖此基础值。 */
img, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--ink); color: var(--bg); }

/* 桌面端隐藏系统光标（用自定义光标）；触屏/减弱动效时恢复 */
@media (hover: hover) and (pointer: fine) {
  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }
}

/* ---- 通用排版 ---- */
.display-xl, .display-l, .display-m, .h-style {
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  font-kerning: none;
}
.display-xl, .display-l, .display-m { font-family: var(--font-display); }  /* 展示大标题用 League Gothic */
.display-xl { font-size: var(--fs-display-xl); }
.display-l  { font-size: var(--fs-display-l); }
.display-m  { font-size: var(--fs-display-m); }
.h-style    { font-size: var(--fs-h); letter-spacing: -0.02em; }

.meta {
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
.lede {
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: -0.01em;
  max-width: 22ch;
}
.serif-accent { font-style: italic; font-weight: 400; text-transform: none; letter-spacing: 0; }

/* ---- 布局容器 ---- */
.wrap { padding-inline: var(--pad-x); }
.section { padding-block: var(--sec-y); }
.hr { height: 1px; background: var(--line); border: 0; }

/* ==========================================================================
   自定义光标
   ========================================================================== */
.cursor {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: var(--z-cursor);
  mix-blend-mode: difference;
  opacity: 0;                             /* JS 进入后淡入 */
}
.cursor__dot {
  position: fixed; width: 8px; height: 8px; border-radius: 50%;
  background: #fff; transform: translate(-50%, -50%);
}
.cursor__ring {
  position: fixed; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.7);
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  transition: width .35s var(--ease-out), height .35s var(--ease-out),
              background-color .35s, border-color .35s;
}
.cursor__label {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: #000; opacity: 0; transition: opacity .25s;
}
/* 悬停在可点目标上：放大成实心圆并显示文字 */
.cursor.is-active .cursor__ring {
  width: 88px; height: 88px; background: #fff; border-color: #fff;
}
.cursor.is-active .cursor__label { opacity: 1; }
.cursor.is-active .cursor__dot { opacity: 0; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ==========================================================================
   顶部导航（blend-difference，叠在大图上自动反色）
   ========================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav);
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--pad-x);
  mix-blend-mode: difference; color: #fff;
}
.nav__brand { font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; font-size: 0.95rem; display: inline-flex; align-items: center; }
/* 图形 logo(替换原文字标):原稿纯黑 → filter 反白,随导航 blend-difference 自适应(浅底显黑、深底显亮),与导航文字同色 */
.nav__logo { display: block; height: 56px; width: auto; filter: invert(1); transform: translate(-4px, -2px); }
.nav__menu { display: flex; gap: clamp(18px, 3vw, 44px); align-items: center; }
.nav__link { position: relative; font-size: 0.85rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.nav__link:hover::after, .nav__link.is-current::after { transform: scaleX(1); transform-origin: left; }
.nav__clock { font-size: 0.8rem; color: rgba(255,255,255,0.6); letter-spacing: 0.08em; }

/* ==========================================================================
   移动端导航 —— 汉堡按钮 + 全屏抽屉
   按钮与抽屉 DOM 由 core.js 注入(不改动任何 HTML 文件);仅 ≤768px 显示。
   抽屉在导航(--z-nav)之下、内容之上;导航保持 blend-difference,
   叠到骨白抽屉上时文字自动反成深色,汉堡/X 始终可读。
   ========================================================================== */
.nav__toggle {
  display: none;                                  /* 桌面端不显示(媒体查询里切 flex) */
  position: relative; z-index: 2;
  width: 44px; height: 44px;                      /* 触控目标 ≥ 44px */
  flex-direction: column; align-items: center; justify-content: center; gap: 7px;
}
.nav__toggle span {
  display: block; width: 26px; height: 2px; background: currentColor;
  transition: transform .45s var(--ease-out);
}
body.menu-open .nav__toggle span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
body.menu-open .nav__toggle span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* 全屏抽屉:骨白底,顶部对齐、内容超高可滚动(项目索引较多时) */
.menu {
  position: fixed; inset: 0; z-index: 95;
  background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column;
  padding: clamp(84px, 12vh, 110px) var(--pad-x) 6vh;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  visibility: hidden; opacity: 0; transform: translateY(-3%);
  transition: opacity .4s var(--ease-out), transform .5s var(--ease-out), visibility 0s .5s;
}
body.menu-open .menu {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity .4s var(--ease-out), transform .5s var(--ease-out), visibility 0s 0s;
}
/* 大号主导航(Work / Info) */
.menu__list { display: flex; flex-direction: column; }
.menu__link {
  display: flex; align-items: baseline; gap: 18px;
  padding: 14px 0; border-top: 1px solid var(--line);
  font-size: clamp(2.2rem, 9.5vw, 3.4rem); font-weight: 600;
  text-transform: uppercase; letter-spacing: -0.03em; line-height: 1;
}
.menu__link:last-child { border-bottom: 1px solid var(--line); }
.menu__idx { font-size: 0.85rem; font-weight: 500; letter-spacing: 0.12em; color: var(--faint); }
.menu__link.is-current { color: var(--faint); }
/* 项目索引网格(JS 从当前页 DOM 收集,单指直达任一项目) */
.menu__index { margin-top: 6vh; }
.menu__index > .meta { display: block; margin-bottom: 6px; }
/* 抽屉索引按分类分组:组头(可点进分类页) + 该组项目 */
.menu__group { margin-top: 3.6vh; }
.menu__index .menu__group:first-child { margin-top: 0; }
.menu__grouplink {
  display: inline-block; margin-bottom: 6px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink);
}
.menu__grouplink::after { content: " →"; color: var(--faint); }
.menu__grouplink.is-current { color: var(--faint); }
.menu__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
.menu__cell {
  display: block; padding: 10px 0; border-top: 1px solid var(--line);
  font-size: 0.98rem; font-weight: 500; letter-spacing: 0.02em; line-height: 1.3;
}
.menu__foot {
  margin-top: 7vh; display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap;
  font-size: 0.8rem; letter-spacing: 0.08em; color: var(--mute);
}
/* 抽屉展开时的统一进场(主导航 → 索引 → 底部,级联延迟) */
.menu__link, .menu__index, .menu__foot {
  opacity: 0; transform: translateY(26px);
  transition: opacity .5s var(--ease-out), transform .55s var(--ease-out);
}
body.menu-open .menu__link, body.menu-open .menu__index, body.menu-open .menu__foot { opacity: 1; transform: none; }
body.menu-open .menu__link:nth-child(1) { transition-delay: .08s; }
body.menu-open .menu__link:nth-child(2) { transition-delay: .14s; }
body.menu-open .menu__index { transition-delay: .2s; }
body.menu-open .menu__foot { transition-delay: .28s; }
body.menu-open { overflow: hidden; }              /* 抽屉打开时锁定底层滚动(JS 同步停 Lenis) */

/* ==========================================================================
   预加载 / 首屏帘
   ========================================================================== */
.preloader {
  position: fixed; inset: 0; z-index: var(--z-preloader);
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 18px;
}
.preloader__word { overflow: hidden; }
.preloader__word span { display: inline-block; transform: translateY(110%); }
.preloader__count { font-size: 0.8rem; letter-spacing: 0.2em; color: var(--mute); }

/* ==========================================================================
   页面转场帘
   ========================================================================== */
.transition {
  position: fixed; inset: 0; z-index: var(--z-transition);
  pointer-events: none; visibility: hidden;
}
.transition__panel {
  position: absolute; inset: 0; background: var(--panel);
  transform: scaleY(0); transform-origin: bottom;
}
.transition.is-busy { pointer-events: all; visibility: visible; }

/* ==========================================================================
   首页：Hero —— 左上大字标题 + 底部项目循环滑条
   ========================================================================== */
.hero { position: relative; height: 100svh; overflow: hidden; }

/* Info 页首段:不再整屏(消除底部大留白),顶部留白避开导航 logo,位置更自然 */
[data-page="about"] .hero {
  height: auto;
  padding-top: clamp(130px, 18vh, 170px);
  padding-bottom: clamp(120px, 18vh, 180px);
}
/* 分类集合页首段:同自适应高度,底部留白收紧(下面接项目网格) */
[data-page="category"] .hero {
  height: auto;
  padding-top: clamp(130px, 18vh, 170px);
  padding-bottom: clamp(40px, 6vh, 70px);
}
.cat-count { margin-top: 2.4vh; }

/* ---- 分类集合页卡片:统一方形双列(更大气、不零碎),悬停整图覆盖 ---- */
[data-page="category"] .showcase__grid { grid-template-columns: repeat(2, 1fr); }
[data-page="category"] .reveal { --ar: 1/1; }
[data-page="category"] .shot { overflow: hidden; }   /* 图片 hover 放大时裁在方框内,不外溢 */
/* 卡片信息:默认(含手机)标题在图下、常显、墨色 */
[data-page="category"] .shot__meta {
  position: static; inset: auto; opacity: 1; transform: none;
  display: flex; align-items: baseline; gap: 14px; padding: 12px 2px 0;
  color: var(--ink);
}
[data-page="category"] .shot__title { color: var(--ink); }
[data-page="category"] .shot__idx { color: var(--faint); }
[data-page="category"] .shot__cat { color: var(--mute); }
[data-page="category"] .shot::after { display: none; }
/* 桌面(可悬停):整图均匀遮罩 + 标题居中,悬停才浮现(替代底部渐变,干净不杂乱) */
@media (hover: hover) and (pointer: fine) {
  [data-page="category"] .shot::after { display: block; background: rgba(0,0,0,0.45); opacity: 0; }
  [data-page="category"] .shot:hover::after { opacity: 1; }
  [data-page="category"] .shot__meta {
    position: absolute; inset: 0; z-index: 2; padding: 20px;
    flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
    color: #fff; opacity: 0; transform: translateY(14px);
  }
  [data-page="category"] .shot__title, [data-page="category"] .shot__idx, [data-page="category"] .shot__cat { color: #fff; }
  [data-page="category"] .shot__title { font-size: clamp(1.8rem, 3vw, 2.8rem); }  /* 悬停标题放大,更大气 */
  [data-page="category"] .shot:hover .shot__meta { opacity: 1; transform: translateY(0); }
}

/* 左上：大标题 + 小文案(对比排版) */
.hero__inner { position: relative; z-index: 3; padding-top: clamp(84px, 12vh, 130px); }
.hero__title { margin: 0; }
.hero__title .line { display: block; }

/* 首页大字:更粗、更紧、更成块面(Barlow 上限 700;两行收紧咬合,减"碎"感)。
   只作用首页标题,不影响项目页/Info 页的 display 标题。 */
[data-page="home"] .hero__title {
  font-weight: 700;
  line-height: 0.84;
  letter-spacing: 0;               /* 字距归零 */
  margin-left: calc(-0.04em + 8px);  /* 再往左移 1px */
  transform: translateY(19px);       /* 大字再下移 3px */
}
/* 桌面:大字上移至左上,与 logo 左对齐、跟滑条图拉开呼吸空隙(移动端 feed 版式不动) */
@media (min-width: 769px) {
  [data-page="home"] .hero__title { font-size: clamp(3.58rem, 15.16vw, 12rem); }  /* 上限定为 12rem */
  [data-page="home"] .hero__inner { padding-top: clamp(62px, 6.5vh, 80px); }        /* 再上移 ~20px */
}
/* 手机:首页大字放大(×2.2),League Gothic 瘦长不溢出;位置/留白见下方 feed 调整 */
@media (max-width: 768px) {
  [data-page="home"] .hero__title { font-size: clamp(5.28rem, 29.7vw, 11.44rem); }
}
.hero__meta { margin-top: 3.2vh; display: flex; flex-direction: column; gap: 7px; max-width: 46ch; }
.hero__role { color: var(--ink); font-weight: 600; }
.hero__slash { color: var(--faint); }
.hero__loc { color: var(--faint); }

/* 底部：项目循环滑条(整屏为拖拽面,图锚在底边) */
.hero__rail { position: absolute; inset: 0; z-index: 1; cursor: grab; touch-action: none; }
.hero__rail.is-drag { cursor: grabbing; }
.hero__rail, .rail__item, .rail__item img { -webkit-user-select: none; user-select: none; }
.rail__item {
  position: absolute; left: 0; bottom: 0;
  width: 34vw; aspect-ratio: 1/1;
  transform-origin: bottom left; will-change: transform;
  overflow: hidden; background: var(--bg-soft);
}
.rail__item img, .rail__item video {
  position: absolute; left: -30%; top: 0; width: 160%; max-width: none; height: 100%;
  object-fit: cover; will-change: transform; -webkit-user-drag: none;
}

/* 底部左角：操作提示 */
.hero__hint { position: absolute; left: var(--pad-x); bottom: 3.4vh; z-index: 4; display: inline-flex; align-items: center; gap: 10px; }
.hero__hint .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

/* 减弱动效：退化为普通横向滚动条 */
.rail--static { position: static; inset: auto; display: flex; gap: 12px; overflow-x: auto; padding: 0 var(--pad-x) 4vh; cursor: default; }
.rail--static .rail__item { position: static; transform: none !important; width: 52vw; max-width: none; flex: none; }

/* ==========================================================================
   移动端首屏:纵向项目流(触屏 / 窄屏时,JS 给 .hero 加 .hero--feed)
   把拖拽滑条转成「大图 + 序号 + 标题」的纵向流:原生惯性滚动、单指轻点。
   图片自然比例零裁剪(比例不失真)。桌面滑条永远不加这个类,完全不受影响。
   ========================================================================== */
.hero--feed { height: auto; overflow: visible; }
.hero--feed .hero__inner { padding-bottom: 7vh; }
.hero--feed .hero__rail {
  position: static; inset: auto; cursor: default; touch-action: auto;   /* 恢复纵向滚动 */
  display: flex; flex-direction: column; gap: clamp(30px, 7vw, 48px);
  padding: 0 var(--pad-x) 7vh;
}
.hero--feed .rail__item {
  position: static; left: auto; bottom: auto; display: block;
  width: 100%; aspect-ratio: auto; transform: none !important;
  background: none; overflow: visible;
}
.hero--feed .rail__item img, .hero--feed .rail__item video {
  position: static; left: auto; top: auto; display: block;
  width: 100%; height: auto; max-width: 100%;
  background: var(--bg-soft);
}
.hero--feed .rail__cap { display: flex; align-items: baseline; gap: 14px; padding: 12px 2px 0; line-height: 1.2; }
.hero--feed .rail__num { font-size: 0.75rem; color: var(--faint); letter-spacing: 0.1em; }
.hero--feed .rail__name { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: -0.01em; }
.hero--feed .hero__hint { display: none; }

/* ==========================================================================
   桌面滑条:悬停单个项目时,图上浮现「序号 + 标题」
   与移动端 feed 共用 .rail__cap 标记;桌面为图上覆层(随图缩放、默认隐藏、悬停显示)。
   只作用于非 feed 的桌面滑条(:not(.hero--feed)),不挡拖拽/点击,不动引擎与版式。
   ========================================================================== */
/* 桌面滑条:图包进裁剪层,项恢复 overflow 可见,标题才能移到图上方空白处不被裁掉 */
.rail__clip { position: absolute; inset: 0; overflow: hidden; }
.rail--clipped .rail__item { overflow: visible; }
/* 悬停单个项目时,「序号 + 标题」出现在图上方空白背景:黑字、与图左对齐、距图 10px */
.hero:not(.hero--feed) .rail__cap {
  position: absolute; bottom: 100%; left: 0; z-index: 2;
  transform-origin: bottom left;   /* 反向缩放的锚点(JS 每帧写 transform 抵消图缩放) */
  display: flex; align-items: baseline; gap: 9px;
  color: var(--ink);
  opacity: 0; pointer-events: none; white-space: nowrap;
  transition: opacity .35s var(--ease-out);
}
.hero:not(.hero--feed) .rail__item:hover .rail__cap { opacity: 1; }
.hero:not(.hero--feed) .rail__num { font-size: 0.7rem; letter-spacing: 0.1em; opacity: 0.8; }
.hero:not(.hero--feed) .rail__name { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: -0.01em; }

/* ==========================================================================
   首页：作品索引列表
   ========================================================================== */
.work-head { display: flex; justify-content: space-between; align-items: baseline; padding-block: 24px; border-top: 1px solid var(--line); }
.work-list { border-bottom: 1px solid var(--line); }
.work-item {
  position: relative; display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: baseline; gap: clamp(16px, 4vw, 64px);
  padding: clamp(22px, 3.4vw, 44px) 0;
  border-top: 1px solid var(--line);
}
.work-item__idx { font-size: 0.8rem; color: var(--faint); font-weight: 500; }
.work-item__title {
  font-size: clamp(1.8rem, 5.2vw, 4.2rem); font-weight: 600; letter-spacing: -0.02em;
  line-height: 1; text-transform: uppercase;
  transition: transform .5s var(--ease-out), color .4s;
}
.work-item__cat, .work-item__year { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.work-item:hover .work-item__title { transform: translateX(1.2vw); }
/* 悬停整行微亮 */
.work-item::before {
  content: ""; position: absolute; inset: 0; background: var(--ink);
  transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease-out);
  z-index: -1;
}
.work-item:hover::before { transform: scaleY(1); }
.work-item:hover > * { color: var(--bg); }
.work-item:hover .work-item__cat, .work-item:hover .work-item__year, .work-item:hover .work-item__idx { color: rgba(11,11,11,0.6); }

/* ==========================================================================
   图片墙（多列视差，首页核心惊艳区）
   ========================================================================== */
.showcase__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 28px); align-items: start;
}

/* 单张作品图 */
.shot { position: relative; display: block; }
.shot .reveal { transition: transform .7s var(--ease-out); }
.shot:hover .reveal { transform: scale(1.04); }
/* 底部渐变 + 悬停显示 */
.shot::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent 50%);
  opacity: 0; transition: opacity .5s var(--ease-out);
}
.shot:hover::after { opacity: 1; }
.shot__meta {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 2;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: clamp(14px, 2vw, 22px); color: #fff;
  opacity: 0; transform: translateY(12px);
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out);
}
.shot:hover .shot__meta { opacity: 1; transform: translateY(0); }
.shot__idx { font-size: 0.75rem; letter-spacing: 0.12em; opacity: 0.7; }
.shot__title { font-size: clamp(1.1rem, 1.8vw, 1.6rem); font-weight: 600; text-transform: uppercase; letter-spacing: -0.01em; }
.shot__cat { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.75; }

/* ==========================================================================
   图片遮罩 reveal + 视差（核心动效容器）
   ========================================================================== */
.reveal { position: relative; overflow: hidden; aspect-ratio: var(--ar, 4/5); background: var(--bg-soft); }
.reveal > img, .reveal > video {
  position: absolute; left: 0; top: -10%; width: 100%; height: 120%;
  object-fit: cover; will-change: transform;
}
/* 纵横比工具类 */
.ar-34 { --ar: 3/4; } .ar-45 { --ar: 4/5; } .ar-11 { --ar: 1/1; }
.ar-169 { --ar: 16/9; } .ar-1610 { --ar: 16/10; } .ar-32 { --ar: 3/2; }
.reveal--full { aspect-ratio: auto; height: 100svh; }
.reveal--full > img { top: -10%; height: 120%; }

/* ==========================================================================
   项目详情页
   ========================================================================== */
.pj-hero { position: relative; height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.pj-hero__media { position: absolute; inset: 0; }
.pj-hero__media img, .pj-hero__media video { width: 100%; height: 120%; object-fit: cover; object-position: center top; position: relative; top: -10%; }
.pj-hero__scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 55%); }
.pj-hero__inner { position: relative; z-index: 2; width: 100%; padding-bottom: 6vh; }
.pj-hero__title { color: #fff; }

/* 元信息列 */
.pj-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); padding-block: 28px; border-bottom: 1px solid var(--line); }
.pj-meta .meta { display: block; margin-bottom: 8px; color: var(--faint); }
.pj-meta .val { font-size: 0.95rem; font-weight: 500; }

/* 图文区块 */
.pj-block { padding-block: var(--sec-y); }
.pj-grid { display: grid; gap: var(--gap); }
.pj-grid--2 { grid-template-columns: repeat(2, 1fr); align-items: start; }
.pj-grid--offset { grid-template-columns: 1.2fr 0.8fr; align-items: start; }
.pj-caption { margin-top: 14px; display: flex; justify-content: space-between; gap: 12px; }

/* 大陈述句 */
.pj-statement { padding-block: var(--sec-y); }

/* 下一个项目 */
.next { display: block; position: relative; padding-block: var(--sec-y); text-align: center; overflow: hidden; border-top: 1px solid var(--line); }
.next__media { position: absolute; inset: 0; opacity: 0; transition: opacity .6s var(--ease-out); }
.next__media img, .next__media video { width: 100%; height: 100%; object-fit: cover; }
.next__media::after { content:""; position:absolute; inset:0; background: rgba(0,0,0,0.55); }
.next:hover .next__media { opacity: 1; }
.next__inner { position: relative; z-index: 2; }
.next__title { transition: transform .5s var(--ease-out), color .4s; }
.next:hover .next__title { transform: scale(0.97); color: #fff; }
.next:hover .next__inner .meta { color: rgba(255,255,255,0.75); }

/* ==========================================================================
   页脚
   ========================================================================== */
.footer { border-top: 1px solid var(--line); padding-top: var(--sec-y); margin-top: var(--sec-y); }
.footer__cta { font-size: var(--fs-display-m); font-weight: 600; text-transform: uppercase; letter-spacing: -0.02em; line-height: 1; }
.footer__cta a { display: inline-block; }
.footer__grid { display: flex; justify-content: space-between; gap: var(--gap); flex-wrap: wrap; padding-block: 6vh; }
.footer__col .meta { display: block; margin-bottom: 14px; }
.footer__col a { display: block; padding: 3px 0; color: var(--mute); transition: color .3s, transform .3s; }
.footer__col a:hover { color: var(--ink); transform: translateX(6px); }
.footer__base { display: flex; justify-content: space-between; gap: var(--gap); flex-wrap: wrap; padding-block: 22px; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.78rem; letter-spacing: 0.06em; }

/* ==========================================================================
   详情页：自然比例图片流（不裁剪）+ 大数字 + 视频
   ========================================================================== */
.reveal--natural { aspect-ratio: auto; background: transparent; }
.reveal--natural > img { position: static; width: 100%; height: auto; top: 0; }
/* 详情视频:保持原始比例、不强制满宽、限高——竖屏视频不再被拉到特别高 */
.reveal--natural > video { position: static; display: block; width: auto; max-width: 100%; max-height: 88vh; margin-inline: auto; top: 0; }
.reveal--video { max-width: min(100%, 880px); margin-inline: auto; }

/* 单张竖图居中（限宽） */
.pj-solo { max-width: min(100%, 620px); margin-inline: auto; }

/* 双列错落：自然高度、顶部对齐，第二张下移形成节奏 */
.pj-grid--2 > :nth-child(2) { margin-top: 9%; }

/* 大数字亮点 */
.pj-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--gap); }
.stat__num { display: block; font-size: clamp(2.4rem, 5.5vw, 4.4rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1; margin-bottom: 12px; }

/* ==========================================================================
   Info 页
   ========================================================================== */
/* 核心数据 */
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 3.6vw, 56px); }
.fact__num { display: block; font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1; margin-bottom: 10px; }

/* 能力清单：非链接，去掉悬停反色；描述缩进对齐标题 */
.work-item--cap:hover::before { transform: scaleY(0); }
.work-item--cap:hover > * { color: inherit; }
.cap-desc { margin-top: -14px; padding: 0 0 32px clamp(44px, 7vw, 116px); color: var(--mute); line-height: 1.7; max-width: 62ch; }

/* 职业经历 */
.exp-list { border-bottom: 1px solid var(--line); }
.exp { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: var(--gap); padding: clamp(26px, 3.4vw, 44px) 0; border-top: 1px solid var(--line); }
.exp__yr { padding-top: 8px; }
.exp__co { font-size: clamp(1.35rem, 2.7vw, 2.1rem); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; }
.exp__role { font-weight: 500; margin-top: 8px; }
.exp__desc { color: var(--mute); line-height: 1.7; margin-top: 12px; max-width: 66ch; }

/* 荣誉奖项 */
.award-list { border-bottom: 1px solid var(--line); }
.award-list li { padding: 20px 0; border-top: 1px solid var(--line); font-size: clamp(1.05rem, 1.7vw, 1.35rem); font-weight: 500; }

/* ==========================================================================
   响应式 —— 流式断点阶梯(Fluid Grid + Fluid Typography)
   >1024px   桌面基准(不改动)
   ≤1024px   iPad 横屏 / 小笔电:多列网格开始收拢
   ≤768px    iPad 竖屏 / 平板:汉堡导航上线,网格转单/双列,压低字阶地板
   ≤480px    手机:全面单列,间距/字阶进一步收紧
   原则:断点只调「列数 / 间距地板 / 字号地板 / 导航形态」,桌面表现一律不变。
   ========================================================================== */

/* ---- iPad 横屏 / 小型桌面:网格轻度收拢 ---- */
@media (max-width: 1024px) {
  .showcase__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { gap: clamp(24px, 4vw, 48px); }
}

/* ---- iPad 竖屏 / 平板:移动导航上线 + 布局收拢 ---- */
@media (max-width: 768px) {
  :root {
    /* 流式字阶:压低移动端地板与上限,长标题等比缩小、干净折行不溢出 */
    --fs-display-xl: clamp(2.4rem, 13.5vw, 5.2rem);
    --fs-display-l:  clamp(2.1rem, 11vw, 4rem);
    --fs-display-m:  clamp(1.7rem, 8vw, 2.8rem);
    /* 大面积留白按比例有机收缩,小屏仍保呼吸感(非死板截断) */
    --sec-y: clamp(56px, 12vw, 100px);
  }

  /* 桌面内联菜单 → 汉堡 + 全屏抽屉(按钮/抽屉由 JS 注入) */
  .nav__menu { display: none; }
  .nav__toggle { display: flex; }

  /* 首屏:标题区上移留白收紧,滑条由触摸拖拽驱动(见 JS)。
     移动端导航因汉堡按钮变高(≈84px),hero 顶部留白需随之加高,避免标题被压。 */
  .hero__inner { padding-top: clamp(92px, 15vh, 120px); }
  .hero__meta { margin-top: 4vh; gap: 4px; }   /* 大字↔第二行拉开(2.4→4vh);第二行↔第三行收紧(7→4px) */
  .hero__hint { bottom: 2.4vh; }

  /* 网格收拢:双列 / 错落 → 单列流式 */
  .pj-grid--2, .pj-grid--offset { grid-template-columns: 1fr; }
  .pj-grid--2 > :nth-child(2) { margin-top: 0; }
  .pj-meta { grid-template-columns: repeat(2, 1fr); }
  .pj-solo { max-width: 100%; }
  .exp { grid-template-columns: 1fr; gap: 8px; }
  .cap-desc { padding-left: 0; margin-top: -10px; }
  .facts { grid-template-columns: repeat(2, 1fr); gap: 22px; }

  /* 作品列表:精简为「序号 + 标题」,藏起 hover 才需要的列 */
  .work-item { grid-template-columns: auto 1fr; gap: 14px; padding: 20px 0; }
  .work-item__cat, .work-item__year { display: none; }
  .work-item__title { font-size: clamp(1.4rem, 6.4vw, 2.2rem); }

  /* 页脚:列堆叠为纵向 */
  .footer__grid { flex-direction: column; gap: 34px; }
  .footer__base { flex-direction: column; gap: 6px; }
}

/* ---- 手机:全面单列 + 进一步收紧 ---- */
@media (max-width: 480px) {
  .showcase__grid { grid-template-columns: 1fr; }
  .facts { gap: 18px; }
  .pj-meta { gap: 18px 12px; }
  .work-item__idx { font-size: 0.72rem; }
  .stat__num { font-size: clamp(2rem, 11vw, 3rem); }
  .fact__num { font-size: clamp(1.7rem, 9vw, 2.4rem); }
}

/* ---- 触屏通用(任意宽度):去 hover 依赖,改单指轻触 ---- */
@media (hover: none), (pointer: coarse) {
  /* 悬停才显示的图注与渐变 → 触屏常显(信息不再藏在 hover 后) */
  .shot::after { opacity: 1; background: linear-gradient(to top, rgba(0,0,0,0.45), transparent 55%); }
  .shot__meta { opacity: 1; transform: none; }
  /* 取消所有 hover 位移 / 反色 / 缩放态 */
  .shot:hover .reveal { transform: none; }
  .work-item:hover::before { transform: scaleY(0); }
  .work-item:hover > * { color: inherit; }
  .work-item:hover .work-item__title { transform: none; }
  .nav__link:hover::after { transform: scaleX(0); }
  .next:hover .next__media { opacity: 0; }
  .next:hover .next__title { transform: none; color: inherit; }
  .next:hover .next__inner .meta { color: var(--mute); }
  /* 单指轻触的即时反馈 */
  .shot:active .reveal { transform: scale(.985); }
  .work-item:active { opacity: .55; }
  .menu__link:active, .menu__cell:active, .footer__col a:active, .nav__toggle:active { opacity: .55; }
}

/* ==========================================================================
   无障碍：减弱动效
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
