html, body.home { height: 100%; overflow: hidden; overscroll-behavior: none; }

.stage { position: fixed; inset: 0; z-index: 1; }
html.no-fluid .stage { background: var(--bg); }
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--nav-h) 0 calc(var(--nav-h) * .6);
  visibility: hidden; overflow: hidden;
}
.screen.on { visibility: visible; z-index: 2; }
.screen.off { visibility: visible; z-index: 1; }

/* 右侧进度 */
.rail {
  position: fixed; right: var(--gutter); top: 50%; z-index: 55;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 6px;
}
.rail a {
  position: relative; display: flex; align-items: center; justify-content: flex-end;
  height: 22px; width: 60px;
}
.rail a i {
  display: block; height: 2px; width: 14px; background: var(--fg-3);
  transition: width .6s var(--ease-out), background .4s;
}
.rail a span {
  position: absolute; right: 34px; white-space: nowrap;
  font-size: 12px; letter-spacing: .04em; color: var(--fg-2);
  opacity: 0; transform: translateX(8px); transition: opacity .4s, transform .5s var(--ease-out);
}
.rail a:hover span { opacity: 1; transform: none; }
.rail a:hover i { width: 22px; background: var(--fg); }
.rail a.on i { width: 30px; background: var(--accent); }

/* 开场 */
.intro {
  position: fixed; inset: 0; z-index: 97; pointer-events: none;
  display: grid; place-items: center;
  background: #000;
  font-size: 14px; letter-spacing: .1em; color: var(--fg);
}
.intro.done { display: none; }

/* 首页：三行错位标题，第二行缩进最多，第三行居中缩进 */
.s-hero { padding: 0; }
.hero-head {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  margin: 0; font-weight: 400;
  pointer-events: none; user-select: none;
}
.hl-set { position: absolute; inset: 0; display: block; }
.hl-line {
  position: absolute; white-space: nowrap; line-height: 1;
  font-family: var(--serif); font-size: var(--hs); letter-spacing: .03em; font-weight: 500;
  will-change: transform, opacity;
}
.hl-line.en {
  font-family: var(--italic); 
  font-weight: 400; letter-spacing: -.035em;
  font-size: calc(var(--hs) * 1.08);
}
.hl-a {
  -webkit-mask-image: radial-gradient(circle var(--lr, 0px) at var(--lx, -999px) var(--ly, -999px), transparent 98%, #000 100%);
          mask-image: radial-gradient(circle var(--lr, 0px) at var(--lx, -999px) var(--ly, -999px), transparent 98%, #000 100%);
}
/* 透镜里：同一组字放大一点，带位移扭曲和三色分离 */
.hl-b {
  transform-origin: var(--lx, 0) var(--ly, 0);
  transform: scale(1.16);
  filter: url(#lensWarp);
  text-shadow: -2.5px 0 rgba(255, 40, 80, .85), 2.5px 0 rgba(40, 200, 255, .85), 0 1.5px rgba(255, 230, 60, .6);
  -webkit-mask-image: radial-gradient(circle var(--lrb, 0px) at var(--lx, -999px) var(--ly, -999px), #000 98%, transparent 100%);
          mask-image: radial-gradient(circle var(--lrb, 0px) at var(--lx, -999px) var(--ly, -999px), #000 98%, transparent 100%);
}

/* ---------- 全站版式：和导航共用一套列 ----------
   左上角小号栏目名在第 1 列，大字从第 2 列起错位排，底部信息落在第 2、3、4 列 */
.g-label {
  position: absolute; left: var(--gutter); top: calc(var(--nav-h) + 9vh);
  display: flex; align-items: baseline; gap: 14px;
  font-size: 14px; letter-spacing: .06em; color: var(--fg-2);
}
.g-label > b { font-family: var(--num); font-weight: 500; letter-spacing: .04em; color: var(--fg); }
.g-label em, .pj-index em {
  font-style: normal; font-family: var(--num); font-size: 11px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); margin-left: 6px;
}

.stag {
  position: absolute; left: var(--c2); top: calc(var(--nav-h) + 9vh);
  margin: 0; font-weight: 500; line-height: 1.3; letter-spacing: .04em;
  pointer-events: none;
}
.stag .sl { display: block; white-space: nowrap; }
.stag .sl:nth-child(4n + 2) { margin-left: 16.5vw; }
.stag .sl:nth-child(4n + 3) { margin-left: 10.4vw; }
.stag .sl:nth-child(4n + 4) { margin-left: 4vw; }
.s-md { font-size: clamp(30px, 3.6vw, 64px); }
.s-xl { font-size: clamp(56px, 9vw, 168px); line-height: 1.12; }

.gfoot, .hero-foot {
  position: absolute; left: 0; right: 0; bottom: clamp(26px, 4.6vh, 48px);
  padding: 0 var(--gutter);
  display: grid; grid-template-columns: var(--cols); align-items: end;
  font-size: 17px; line-height: 1.5;
}
.gfoot > div { padding-right: 20px; }
.hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.hero-foot > div { padding: 0; }
.gfoot p:first-child, .hero-foot p:first-child { color: var(--fg); font-weight: 500; }
.gfoot p + p, .hero-foot p + p { color: var(--fg-2); }
.g-num {
  font-family: "Avenir Next", "Helvetica Neue", var(--num); font-weight: 400 !important;
  font-size: clamp(44px, 4.6vw, 84px); line-height: 1; letter-spacing: -.02em;
  margin-bottom: 10px;
}
.g-num small { font-family: var(--font); font-size: .3em; font-weight: 500; margin-left: 6px; letter-spacing: .04em; }

/* ---------- 每屏一个完整的内容块，栏目名紧贴在标题上方 ---------- */
.blk { position: absolute; left: var(--c2); right: calc(var(--gutter) + 60px); top: 50%; translate: 0 -50%; }
.eb { display: flex; align-items: baseline; gap: 12px; margin-bottom: clamp(32px, 6vh, 64px); font-size: 15px; color: var(--fg-2); }
.eb b { font-family: var(--num); font-weight: 500; color: var(--fg); }
.eb span { font-family: var(--num); color: var(--fg-3); }
.eb em { font-style: normal; font-family: var(--num); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); }

/* ---------- 关于 ---------- */
/* 关于页和经历页共用一条左对齐线：对齐经历曲线上第一段经历的文字 */
.s-about, .s-career { --tl-x: calc(var(--gutter) + (100vw - 2 * var(--gutter) - 72px) * .07 + 26px); }
.s-about .blk { left: var(--tl-x); right: calc(var(--gutter) + 60px); }
.ab-title { margin: 0; font-weight: 500; font-size: clamp(52px, 6.4vw, 124px); line-height: 1.1; letter-spacing: -.01em; white-space: nowrap; }
.ab-body { margin-top: clamp(32px, 5.4vh, 56px); }
.ab-title .sl { display: block; }
.ab-intro {
  max-width: 30em;
  font-size: clamp(20px, 1.8vw, 32px); line-height: 1.6; color: rgba(241, 239, 233, .86); text-wrap: pretty;
}
.ab-meta { display: flex; gap: clamp(48px, 8vw, 150px); margin-top: clamp(44px, 8vh, 88px); font-size: 17px; line-height: 1.6; }
.ab-meta p:first-child { font-weight: 500; }
.ab-meta p + p { color: var(--fg-2); }

/* ---------- 经历：标题在左上，关键数字在右上，曲线占满下半屏 ---------- */
.cr-head { position: absolute; left: var(--tl-x); top: calc(var(--nav-h) + 13vh); }
.cr-title { margin: 0; font-weight: 500; font-size: clamp(44px, 5vw, 96px); line-height: 1.1; letter-spacing: -.01em; }
.cr-title .sl { display: block; }
.cr-stats { display: flex; gap: clamp(28px, 3.4vw, 60px); margin-top: clamp(22px, 3.6vh, 40px); }
.cr-stats li p + p { margin-top: 6px; font-size: 15px; color: var(--fg-2); }
.cr-stats .g-num { font-family: var(--num); font-weight: 300; font-size: clamp(34px, 3vw, 56px); letter-spacing: -.03em; margin: 0; }
.tl { position: absolute; left: var(--gutter); right: calc(var(--gutter) + 72px); top: 41%; bottom: 25%; }
.tl-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tl-line { fill: none; stroke: var(--fg); stroke-width: 2; stroke-linecap: round; }
.tl-area { fill: url(#tlFade); }
.tl-head { fill: #fff; filter: drop-shadow(0 0 10px #fff) drop-shadow(0 0 22px rgba(255, 255, 255, .7)); opacity: 0; }
.tl-node { position: absolute; width: 0; height: 0; }
.tl-dot {
  position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--fg); box-shadow: 0 0 0 7px rgba(241, 239, 233, .14);
  transform: scale(0); transition: transform .7s cubic-bezier(.34, 1.56, .64, 1);
}
.tl-card {
  position: absolute; left: 26px; top: 20px; width: max-content; max-width: 18vw;
  opacity: 0; transform: translateY(14px); transition: opacity .8s, transform .9s var(--ease-out);
}
.tl-node.on .tl-dot { transform: none; }
.tl-node.on .tl-card { opacity: 1; transform: none; }
.tl-years { font-family: var(--num); font-size: 16px; line-height: 1.2; margin-bottom: 8px; color: var(--fg-2); }
.tl-years em { font-style: normal; margin: 0 .2em; color: var(--fg-3); }
.tl-co { font-size: clamp(16px, 1.3vw, 21px); white-space: nowrap; font-weight: 500; line-height: 1.35; }
.tl-role { margin-top: 6px; font-size: 14px; line-height: 1.6; color: var(--fg-2); text-wrap: pretty; }
.tl-role b { font-weight: 500; color: var(--fg); margin-right: 8px; }
.tl-node:hover .tl-dot { transform: scale(1.3); }

/* ---------- 作品：左边一整块信息，按钮跟在信息后面；右边封面 ---------- */
.pj-info { position: absolute; right: calc(100% - var(--gutter) - 35.5vw); top: 50%; translate: 0 -50%; width: 30vw; }
.pj-info .eb { margin-bottom: clamp(24px, 4.4vh, 44px); }
.pj-type { font-size: 16px; color: var(--fg-2); }
.pj-name { margin: 8px 0 0; font-weight: 500; font-size: clamp(56px, 6vw, 116px); line-height: 1.08; letter-spacing: -.01em; }
.pj-name .sl { display: block; white-space: nowrap; }
.pj-headline { margin-top: 16px; font-size: clamp(19px, 1.55vw, 27px); line-height: 1.55; text-wrap: balance; }
.pj-metrics { display: flex; gap: clamp(20px, 2.4vw, 40px); margin-top: clamp(28px, 4.4vh, 44px); }
.pj-metrics > div { white-space: nowrap; }
.pj-metrics p + p { margin-top: 4px; font-size: 14px; color: var(--fg-2); }
.pj-metrics .g-num { font-family: var(--num); font-weight: 300; font-size: clamp(36px, 3.2vw, 58px); letter-spacing: -.03em; margin: 0; }
.pj-role { margin-top: clamp(20px, 3.2vh, 30px); font-size: 15px; color: var(--fg-2); }
.pj-info .pill { margin-top: clamp(28px, 4.4vh, 44px); }
.pj-cover { position: absolute; left: calc(var(--gutter) + 41.5vw); right: calc(var(--gutter) + 60px); top: 50%; translate: 0 -50%; display: block; perspective: 1400px; }
.pj-card {
  position: relative; aspect-ratio: var(--ar, 16 / 9); border-radius: 6px; overflow: hidden;
  background: var(--bg-2); transform-style: preserve-3d; will-change: transform;
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .6);
}
.pj-card img { position: absolute; inset: -2%; width: 104%; height: 104%; max-width: none; object-fit: cover; will-change: transform; }

/* ---------- 联系 ---------- */
.ct-title { margin: 0; font-weight: 500; font-size: clamp(80px, 12vw, 230px); line-height: 1.02; letter-spacing: -.01em; white-space: nowrap; }
.ct-title .sl { display: block; }
.ct-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4vw; margin-top: clamp(40px, 8vh, 96px); padding-top: clamp(24px, 4vh, 40px); }
.ct-item { display: block; }
.ct-item p:first-child { font-size: 15px; color: var(--fg-2); }
.ct-val {
  margin-top: 6px; font-family: var(--num); font-size: clamp(22px, 2vw, 34px); color: var(--fg); letter-spacing: -.01em;
  overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .6s var(--ease-out);
}
.ct-item:hover .ct-val { background-size: 100% 1px; }
.s-contact .blk { left: var(--gutter); right: var(--gutter); }
.ct-foot { position: absolute; left: var(--gutter); bottom: clamp(22px, 4vh, 40px); font-family: var(--num); font-size: 14px; color: var(--fg-3); }

/* 窄屏：改成上下排 */
@media (max-width: 820px) {
  .rail { display: none; }
  .hero-foot { display: grid; grid-template-columns: 1fr 1fr; row-gap: 16px; font-size: 13px; }
  .s-about .blk { left: var(--gutter); right: var(--gutter); }
  .ab-title { white-space: normal; }
  .s-about .blk, .cr-head { left: var(--gutter); }
  .blk { left: var(--gutter); right: var(--gutter); }
  .ab-title { font-size: 36px; }
  .ab-intro { font-size: 17px; }
  .ab-meta, .ct-list { flex-direction: column; gap: 18px; }
  .cr-stats { left: var(--gutter); right: auto; top: calc(var(--nav-h) + 22vh); }
  .tl { top: 44%; left: var(--gutter); right: var(--gutter); bottom: 12%; }
  .tl-card { max-width: 46vw; }
  .tl-role { display: none; }
  .pj-info { top: calc(var(--nav-h) + 4vh); translate: none; left: var(--gutter); right: var(--gutter); width: auto; }
  .pj-name { font-size: 42px; }
  .pj-headline, .pj-role { display: none; }
  .pj-cover { left: var(--gutter); right: var(--gutter); top: 74%; }
  .ct-title { font-size: 18vw; }
}
