/* ============================================================
   LINXU — style.css
   Tokens / reset / header / hero / about / services / works
   process / practice / pricing / cta / footer
   ============================================================ */

@font-face {
  font-family: 'Archivo';
  src: url('../assets/fonts/archivo-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo Black';
  src: url('../assets/fonts/ab-400.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Antonio';
  src: url('../assets/fonts/antonio-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../assets/fonts/jbmono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../assets/fonts/jbmono-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #141821;
  --ink: #252521;
  --cream: #F6F2E9;
  --accent-on-dark: #B9F04B;
  --accent: var(--accent-on-dark);
  --accent-hover: #D1F87A;
  --accent-on-light: #405C27;
  --accent-on-light-hover: #32471F;
  --accent-text: var(--accent);
  --on-accent: var(--black);
  --paper: #FFFCF5;
  --mist: #EDE9E0;
  --light-text: #FAF6ED;
  --dark-muted: #C9C3B7;
  --dark-copy: color-mix(in srgb, var(--light-text) 68%, var(--dark-muted));
  --title-secondary: var(--dark-muted);
  --nav-background: color-mix(in srgb, var(--black) 94%, transparent);
  --grey: #67635A;
  --body: #514D45;
  --line-l: rgb(from var(--ink) r g b / .20);
  --line-d: rgb(from var(--light-text) r g b / .19);

  --ff: 'Archivo', 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --fd: 'Archivo Black', 'Archivo', 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --fm: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --fn: 'Antonio', 'Archivo Narrow', 'Archivo', 'Helvetica Neue', Arial, sans-serif;

  --pad: 48px;
  --site-head-min-height: 68px;
  --section-inset: clamp(22px, 2.75vw, 68px);
  --chapter-inset: max(20px, 3.5%);
  --radius-pill: 999px;
  --radius-panel: clamp(24px, 2.8vw, 42px);
  --radius-media: clamp(20px, 2.1vw, 34px);
  --radius-thumb: clamp(12px, 1.2vw, 18px);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

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

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}
html.is-chapter-scroll-locked {
  overflow-y: hidden;
  overscroll-behavior-y: none;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--ff);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
body:not(.ed-on) :is(img, picture, video, canvas, figure, #pvStage, #pvGallery, #pvCaseMedia, [data-viewport-video], a:has(img), a[data-project]) {
  -webkit-touch-callout: none;
}
body:not(.ed-on) img {
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}
@media (any-pointer: coarse) {
  /* 封面和缩略图的点按交给外层链接或按钮。 */
  body:not(.ed-on) img { pointer-events: none; }
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p, dl, dd, dt, figure, figcaption { margin: 0; }
button { font-family: inherit; }
[data-theme="light"], body:not(.menu-open) > .site-head.is-light, .mail-draft {
  --accent: var(--accent-on-light);
  --accent-hover: var(--accent-on-light-hover);
  --accent-text: var(--accent);
  --on-accent: var(--paper);
  --title-secondary: var(--grey);
}
::selection { background: var(--accent); color: var(--on-accent); }

.mono {
  font-family: var(--fm);
  font-weight: 400;
  letter-spacing: .07em;
  text-transform: uppercase;
  font-size: 11px;
}
.title-en {
  display: block;
  margin-top: .5em;
  color: var(--title-secondary);
  font: 500 clamp(10px, .85vw, 12px) / 1.45 var(--fm);
  letter-spacing: .09em;
  text-transform: uppercase;
  text-wrap: pretty;
}
.title-en-lead {
  margin-top: clamp(10px, 1.1vw, 18px);
  font: 550 clamp(17px, 1.8vw, 28px) / 1.25 var(--fn);
  letter-spacing: .065em;
}
.wrap {
  width: 100%;
  max-width: 1620px;
  margin: 0 auto;
  padding: 0 var(--pad);
}
/* 展示级大标题统一字面 */
.hero-title, .stat-num, .pv-title {
  font-family: var(--fd);
  font-weight: 900;
}
i, em { font-style: normal; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-size: 12px;
  letter-spacing: .06em;
  padding: 15px 18px 15px 22px;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
  white-space: nowrap;
}
.btn .arrow {
  font-style: normal;
  display: grid;
  place-items: center;
  width: 30px;
  height: 24px;
  transition: transform .4s var(--ease-out);
}
.btn:hover .arrow { transform: translateX(4px); }

.btn-line {
  border: 1px solid var(--line-d);
  color: var(--light-text);
  background: rgb(from var(--light-text) r g b / .06);
}
.btn-line:hover { --accent-text: var(--accent-on-light); background: var(--paper); color: var(--ink); }
.btn-line .arrow { color: var(--accent-text); }

/* ============================================================
   HEADER
   ============================================================ */
.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--site-head-min-height);
  padding: 0 var(--pad);
  color: var(--light-text);
  transition: color .45s var(--ease), padding .45s var(--ease), background .45s var(--ease);
  mix-blend-mode: normal;
}
.site-head::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(from var(--black) r g b / .8), transparent);
  opacity: 1;
  transition: opacity .4s;
  pointer-events: none;
  z-index: -1;
}
.site-head.is-light { --nav-background: color-mix(in srgb, var(--cream) 95%, transparent); color: var(--ink); }

/* 滚动后用随主题变化的底色维持导航的可读性。 */
.site-head::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 68px;
  z-index: -1;
  background: var(--nav-background);
  border-bottom: 1px solid transparent;
  opacity: 0;
  transition: opacity .26s var(--ease), background-color .3s var(--ease), border-color .3s var(--ease);
  pointer-events: none;
}
body.scrolled .site-head::before { opacity: 0; }
body.scrolled .site-head::after { opacity: 1; border-bottom-color: var(--line-d); }
body.scrolled .site-head.is-light::after { border-bottom-color: var(--line-l); }

body.is-chapter-transitioning:not(.menu-open) .site-head::after,
body.scrolled:not(.menu-open) .site-head:has(.nav a[href="#about"][aria-current="location"])::after {
  height: calc(100% + 20px);
  background: linear-gradient(to bottom, var(--nav-background) 40%, transparent);
  border-bottom: 0;
}
body.is-chapter-transitioning #progress { visibility: hidden; }

.brand {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1;
  padding-top: 2px;
}
.brand span { color: var(--accent-text); }

.head-identity {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 30px);
}
.head-specialties {
  border-left: 1px solid currentColor;
  padding-left: clamp(16px, 2vw, 30px);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .04em;
  opacity: .72;
  white-space: nowrap;
}

.nav, .mobile-menu { --nav-accent: var(--accent-on-dark); }
.site-head.is-light .nav { --nav-accent: var(--accent-on-light); }
.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 1.28vw, 26px);
}
.nav a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: clamp(4px, .45vw, 7px);
  min-height: 44px;
  padding: 14px 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
  transition: color .24s var(--ease);
}
.nav-en, .nav-slash { font-weight: 400; }
.nav-en { font-size: 9px; letter-spacing: .06em; opacity: .7; }
.nav-slash { font-family: var(--fm); font-size: .75em; opacity: .48; }
.nav a:hover,
.nav a[aria-current],
.mobile-menu nav a[aria-current] { color: var(--nav-accent); }
.nav a:hover .nav-en,
.nav a[aria-current] .nav-en,
.mobile-menu nav a[aria-current] .nav-en { opacity: 1; }

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  height: 2px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: opacity .24s var(--ease), transform .24s var(--ease);
}
.nav a[aria-current]::after { opacity: 1; transform: scaleX(1); }
.mobile-menu nav a[aria-current] { border-bottom-color: var(--nav-accent); }
.site-head a:focus-visible,
.menu-btn:focus-visible,
.mobile-menu a:focus-visible {
  outline: 2px solid var(--nav-accent, var(--accent-text));
  outline-offset: 4px;
}

.menu-btn {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill);
  color: inherit;
  font-size: 13px;
  cursor: pointer;
}
.menu-icon { display: grid; gap: 5px; }
.menu-icon i {
  display: block; width: 16px; height: 1px;
  background: currentColor;
  transition: transform .35s var(--ease);
}
body.menu-open .site-head { --accent-text: var(--accent); color: var(--light-text); }
body.menu-open .site-head::after { background: var(--black); }
body.menu-open .menu-icon i:first-child { transform: translateY(3px) rotate(45deg); }
body.menu-open .menu-icon i:last-child { transform: translateY(-3px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: var(--black);
  color: #fff;
  padding: 78px var(--pad) 22px;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .7s var(--ease-out);
  pointer-events: none;
}
.mobile-menu.open { clip-path: inset(0 0 0 0); pointer-events: auto; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu nav a {
  display: flex;
  align-items: baseline;
  gap: clamp(7px, 2.4vw, 14px);
  font-size: clamp(23px, 6.8vw, 37px);
  font-weight: 600;
  letter-spacing: -.03em;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  transform: translateY(16px);
  opacity: 0;
  transition: transform .6s var(--ease-out), opacity .5s;
}
.mobile-menu nav a .mm-num { margin-right: 4px; font-size: 10px; color: var(--dark-muted); }
.mobile-menu nav a[aria-current] .mm-num { color: var(--nav-accent); }
.mobile-menu nav a .nav-en { font-size: 10px; }
.mobile-menu nav a .nav-slash { font-size: 16px; }
.mobile-menu.open nav a { transform: none; opacity: 1; }
.mobile-menu.open nav a:nth-child(1) { transition-delay: .1s; }
.mobile-menu.open nav a:nth-child(2) { transition-delay: .15s; }
.mobile-menu.open nav a:nth-child(3) { transition-delay: .2s; }
.mobile-menu.open nav a:nth-child(4) { transition-delay: .25s; }
.mobile-menu.open nav a:nth-child(5) { transition-delay: .3s; }
.mobile-menu.open nav a:nth-child(6) { transition-delay: .35s; }
.mm-foot { font-size: 10px; color: var(--dark-muted); letter-spacing: .08em; line-height: 2; }

/* ============================================================
   HERO
   ============================================================ */

:is(.hero, .about) {
  --chapter-height: 100dvh;
  --chapter-seam: clamp(38px, 6svh, 96px);
  --chapter-seam-fade: var(--black), rgb(from var(--black) r g b / .89) 22%,
    rgb(from var(--black) r g b / .46) 58%, rgb(from var(--black) r g b / .08) 87%, transparent;
}
.hero {
  /* 宽屏按比例放大，较矮的窗口按高度限制。 */
  --hero-layout-unit: clamp(.84px, min(calc(100vw / 1440), calc(100svh / 900)), 2.4px);
  position: relative;
  block-size: var(--chapter-height);
  background: var(--black);
  color: var(--light-text);
  overflow: hidden;
  isolation: isolate;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero.is-chapter-overlay {
  z-index: 10;
  translate: 0 var(--chapter-overlay-offset);
  background: color-mix(in srgb, var(--black) calc(var(--chapter-cover) * 100%), transparent);
  pointer-events: none;
}
.hero.is-chapter-overlay .hero-media { background: none; }
.hero.is-chapter-overlay:has(.has-tile-renderer) { background: transparent; }
.hero.is-chapter-overlay .hero-media.has-tile-renderer > :is(img, video) { visibility: hidden; }
.hero.is-chapter-overlay .hero-media:not(.has-tile-renderer) { opacity: var(--chapter-cover); }
body:not(.ed-on) .hero-media {
  touch-action: pan-y pinch-zoom;
  -webkit-touch-callout: none;
}
.hero-media > img,
.hero-media > video {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
}
.hero-media.video-started > img { visibility: hidden; }
.hero-media > video { opacity: 0; transition: opacity .32s var(--ease); }
.hero-media.video-started > video { opacity: 1; }
.hero-media > .ed-chip { top: 80px; left: var(--pad); }
.hero-media:not(.has-media) {
  background: var(--black);
}
.hero-tiles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}
.hero-media > :is(img, video) {
  --flight: var(--chapter-tile-flight, 0);
  scale: calc(1 + .38 * var(--flight));
  translate: calc(5vw * var(--flight)) 0;
  filter: brightness(calc(.43 - .24 * var(--flight))) blur(calc(6px * var(--flight)));
}
body.ed-on .hero-tiles { visibility: hidden; }
body.ed-on .hero-media > :is(img, video) { filter: none; }
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: var(--chapter-home-shade, 1);
  background:
    linear-gradient(90deg, var(--black) 0% 25%, rgb(from var(--black) r g b / .976) 30%,
      rgb(from var(--black) r g b / .855) 34%, rgb(from var(--black) r g b / .592) 38%,
      rgb(from var(--black) r g b / .278) 42%, rgb(from var(--black) r g b / .071) 45%, transparent 47%),
    linear-gradient(180deg, rgb(from var(--black) r g b / .808), rgb(from var(--black) r g b / .251) 14%, transparent 27%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  block-size: 100%;
  padding: clamp(102px, 13svh, 146px) max(var(--pad), min(5.2vw, 10svh)) clamp(46px, 7.5svh, 80px);
  pointer-events: none;
}
body.ed-on .hero-inner [contenteditable] { pointer-events: auto; }

.hero-content {
  width: min(49vw, calc(680 * var(--hero-layout-unit)));
}
.hero-title-line:not(.hero-title-en) {
  --flight: var(--chapter-home-title, 0);
  --flight-scale: 1.65;
  --flight-x: -112vw;
  --flight-y: -68svh;
  --flight-blur: 24px;
  --flight-streak-x: 35px;
  --flight-streak-y: 14px;
}
.hero-title-en {
  --flight: var(--chapter-home-english, 0);
  --flight-scale: 1.15;
  --flight-x: -108vw;
  --flight-y: -61svh;
  --flight-blur: 16px;
  --flight-streak-x: 22px;
  --flight-streak-y: 7px;
}
.hero-intro {
  --flight: var(--chapter-home-intro, 0);
  --flight-scale: .78;
  --flight-x: -94vw;
  --flight-y: 51svh;
  --flight-blur: 9px;
  --flight-streak-x: 13px;
  --flight-streak-y: -6px;
}
.hero-cta {
  --flight: var(--chapter-home-actions, 0);
  --flight-scale: .66;
  --flight-x: -80vw;
  --flight-y: 60svh;
  --flight-blur: 7px;
  --flight-streak-x: 8px;
  --flight-streak-y: -4px;
}
.hero-content :is(.hero-title-line, .hero-intro, .hero-cta) {
  --blur-amount: clamp(0, (var(--flight) - .40) * 3.65, 1);
  --exit-opacity: clamp(0, (1 - var(--flight)) * 4, 1);
  --travel: calc(var(--flight) * var(--flight) * var(--flight));
  transform-origin: left center;
  scale: calc(1 + var(--flight) * var(--flight-scale));
  translate: calc(var(--travel) * var(--flight-x)) calc(var(--travel) * var(--flight-y));
  filter:
    drop-shadow(
      calc(var(--flight-streak-x) * var(--blur-amount))
      calc(var(--flight-streak-y) * var(--blur-amount))
      calc(var(--blur-amount) * 5px)
      rgb(233 243 217 / calc(.33 * var(--blur-amount))))
    blur(calc(var(--flight-blur) * var(--blur-amount)))
    opacity(var(--exit-opacity));
}
.hero-title {
  color: var(--light-text);
  font-family: var(--ff);
  font-weight: 650;
  font-size: clamp(38px, 4.25vw, calc(61.2 * var(--hero-layout-unit)));
  line-height: 1.24;
  letter-spacing: .004em;
}
.hero-title-line {
  display: block;
  overflow: hidden;
  padding-block: .025em;
}
.hero-title-line > span { display: block; }
.hero-title-en {
  margin-top: .15em;
  padding-block: .04em .12em;
  font-family: var(--fn);
  font-size: .89em;
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: .032em;
  text-transform: uppercase;
}
.hero-title-accent { color: var(--accent); }
.hero-intro {
  max-width: 33em;
  margin-top: clamp(19px, 3svh, calc(32 * var(--hero-layout-unit)));
  color: var(--dark-muted);
  font-size: clamp(15px, 1.18vw, calc(16 * var(--hero-layout-unit)));
  line-height: 1.8;
  text-wrap: pretty;
}
.hero-copy-line {
  display: block;
  white-space: nowrap;
  --text-delay: calc(.23s + var(--hero-line-index, 0) * .07s);
}

.hero-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  width: fit-content;
  gap: 10px clamp(20px, 2.6vw, calc(38 * var(--hero-layout-unit)));
  margin-top: clamp(23px, 3.7svh, calc(36 * var(--hero-layout-unit)));
  pointer-events: auto;
}
.hero-action {
  display: inline-flex;
  align-items: center;
  min-height: calc(54 * var(--hero-layout-unit));
  gap: calc(16 * var(--hero-layout-unit));
  font-size: calc(15 * var(--hero-layout-unit));
  font-weight: 650;
  line-height: 1;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.hero-action:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 5px;
}
.hero-action-main {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: calc(7 * var(--hero-layout-unit));
  padding-inline: calc(22 * var(--hero-layout-unit)) calc(7 * var(--hero-layout-unit));
  background: var(--accent);
  color: var(--black);
  box-shadow: 0 9px 24px rgb(from var(--accent) r g b / .18);
  transition: color .28s, transform .3s var(--ease-out), box-shadow .3s var(--ease);
}
.hero-action-main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid rgb(from var(--accent) r g b / .62);
  border-radius: inherit;
  background: var(--black);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .46s var(--ease-out);
}
.hero-action-label { display: block; overflow: hidden; line-height: 1.5; }
.hero-action-label > span { display: block; }
.hero-action-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(40 * var(--hero-layout-unit));
  aspect-ratio: 1;
  border-radius: 50%;
  font-size: calc(22 * var(--hero-layout-unit));
  line-height: 1;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
.hero-action-icon > span {
  display: block;
  transition: transform .38s var(--ease-out);
}
.hero-action-main .hero-action-icon { background: var(--black); color: var(--light-text); }
.hero-action-main:is(:hover, :focus-visible) {
  color: var(--light-text);
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgb(from var(--black) r g b / .48);

  &::before { transform: scaleX(1); }
  & .hero-action-label > span { animation: hero-action-roll .44s var(--ease) both; }
  & .hero-action-icon { background: var(--accent); color: var(--black); }
  & .hero-action-icon > span { transform: rotate(-42deg); }
}
.hero-action-alt { gap: calc(11 * var(--hero-layout-unit)); }
.hero-action-alt .hero-action-text {
  padding-block: 4px;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 0 1px no-repeat;
  transition: background-size .37s var(--ease);
}
.hero-action-alt .hero-action-icon {
  width: calc(32 * var(--hero-layout-unit));
  font-size: calc(18 * var(--hero-layout-unit));
  border: 1px solid rgb(from var(--light-text) r g b / .68);
}
.hero-action-alt:is(:hover, :focus-visible) .hero-action-text { background-size: 100% 1px; }
.hero-action-alt:is(:hover, :focus-visible) .hero-action-icon > span { transform: rotate(-42deg); }

@keyframes hero-action-roll {
  0%, 100% { transform: translateY(0); }
  44% { transform: translateY(-112%); }
  45% { transform: translateY(112%); }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  --profile-copy-phase: clamp(0, var(--portfolio-progress, 0) / .42, 1);
  --profile-title-phase: clamp(0, (var(--portfolio-progress, 0) - .04) / .48, 1);
  --profile-portrait-phase: clamp(0, (var(--portfolio-progress, 0) - .10) / .81, 1);
  --profile-copy-exit: calc(var(--profile-copy-phase) * var(--profile-copy-phase) * (3 - 2 * var(--profile-copy-phase)));
  --profile-title-exit: calc(var(--profile-title-phase) * var(--profile-title-phase) * (3 - 2 * var(--profile-title-phase)));
  --profile-portrait-exit: calc(var(--profile-portrait-phase) * var(--profile-portrait-phase) * (3 - 2 * var(--profile-portrait-phase)));
  --profile-title-lift: calc(-1 * clamp(148px, 36svh, 440px) * var(--profile-title-exit));
  --profile-top-space: max(var(--chapter-seam), var(--site-head-min-height));
  --profile-street-lead: var(--profile-top-space);
  --profile-gutter: max(var(--pad), min(5.2vw, 10svh));
  --profile-art-height: clamp(106px, min(21vw, 39svh - 100px), 356px);
  --profile-drop: clamp(20px, 3svh, 38px);
  --profile-foot-height: clamp(112px, 13.8svh, 160px);
  --profile-copy-shift: clamp(4px, 1svh, 10px);
  --profile-content-top: calc(clamp(16px, 2.5svh, 34px) + var(--profile-drop) + var(--profile-copy-shift));
  --profile-tab-inset: 10px;
  --profile-accent: var(--accent-on-dark);
  --profile-copy: var(--dark-copy);
  --profile-rule: var(--line-d);
  block-size: var(--chapter-height);
  padding-block-start: var(--profile-top-space);
  overflow: clip;
  background: var(--black);
  color: var(--cream);
}
.profile-layout {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  isolation: isolate;
  block-size: 100%;
  padding-block-end: var(--profile-foot-height);
}
.profile-visual {
  grid-area: 1 / 1;
  position: relative;
  isolation: isolate;
  overflow: visible;
  clip-path: inset(calc(-1 * max(64px, var(--profile-street-lead))) 0 calc(-1 * var(--profile-foot-height)));
  background: var(--black);
  color: var(--light-text);
}
.profile-backdrop {
  --profile-focus-blur: calc(3px * (1 - var(--profile-focus-arrival, 1)));
  position: absolute;
  inset: calc(-1 * var(--profile-street-lead)) 0 calc(-1 * var(--profile-foot-height));
  margin: 0;
  overflow: clip;
  pointer-events: none;
  opacity: var(--profile-street-arrival, 1);
}
body.ed-on .profile-backdrop { pointer-events: auto; }
.profile-backdrop > :is(img, video) {
  position: absolute;
  inset: -26px;
  width: calc(100% + 52px);
  max-width: none;
  height: calc(100% + 52px);
  object-fit: cover;
  object-position: 53% calc(66% + .34 * var(--profile-street-lead));
  transform-origin: 53% 42%;
  animation: profile-street-breathe 7.5s ease-in-out infinite alternate paused;
  transform: translate(
    calc(var(--profile-street-x, 0px) + var(--frame-shift-x, 0px)),
    calc(var(--profile-street-y, 0px) + var(--frame-shift-y, 0px))
  ) scale(var(--profile-street-scale, 1));
  filter: blur(max(var(--frame-blur, 0px), var(--profile-focus-blur)));
  transition: transform .13s ease-out;
}
.profile-visual.is-in-view:not(.is-portrait-active) .profile-backdrop > :is(img, video) { animation-play-state: running; }
@keyframes profile-street-breathe {
  from { scale: 1; }
  to { scale: 1.14; }
}
@media (any-hover: hover) and (any-pointer: fine) and (prefers-reduced-motion: no-preference) {
  .profile-backdrop > :is(img, video) {
    filter: url(#profileStreetChroma) blur(max(var(--profile-street-blur, 0px), var(--frame-blur, 0px), var(--profile-focus-blur)));
  }
}
.profile-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, var(--chapter-seam-fade)) top / 100% calc(var(--profile-street-lead) + var(--chapter-seam)) no-repeat,
    linear-gradient(180deg, rgb(from var(--black) r g b / .56), rgb(from var(--black) r g b / .30) 28%, transparent 61%),
    radial-gradient(ellipse 63% 58% at 0 30%, rgb(from var(--black) r g b / .68) 34%, transparent),
    linear-gradient(90deg, rgb(from var(--black) r g b / .54), rgb(from var(--black) r g b / .17) 42%, transparent 69%);
  pointer-events: none;
}
.profile-atmosphere,
.profile-hover-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.profile-hover-light {
  opacity: var(--profile-street-strength, 0);
  background: radial-gradient(ellipse 31% 64% at var(--profile-light-x, 50%) var(--profile-light-y, 50%),
    rgb(231 230 205 / .35), rgb(96 153 179 / .20) 46%, transparent 86%);
  mix-blend-mode: screen;
}
.profile-filters { position: absolute; }
.profile-word {
  --profile-about-width: clamp(.72, calc(.75 + (100vw - 1440px) / 2400px), 1);
  --profile-me-width: clamp(.36, calc(.45 + (100vw - 1440px) / 1600px), 1);
  position: absolute;
  z-index: 1;
  inset-inline-start: var(--profile-gutter);
  inset-block-end: calc(-1 * var(--profile-drop));
  width: calc(100% - var(--profile-gutter) - var(--pad));
  height: var(--profile-art-height);
  overflow: visible;
  translate: 0 var(--profile-title-lift);
  pointer-events: none;
}
.profile-word-start { transform: scaleX(var(--profile-about-width)); }
.profile-word-end {
  transform: translateX(calc((1 - var(--profile-me-width)) * 1px)) scaleX(var(--profile-me-width));
}
.profile-word path {
  stroke-width: var(--profile-word-stroke-width);
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.profile-word-face {
  --profile-word-stroke-width: clamp(1.25px, .38vw, 8px);
  clip-path: url(#profile-word-face-clip);
  fill: var(--cream);
  stroke: var(--cream);
  opacity: var(--profile-word-arrival, 1);
}
.profile-word-flight {
  --profile-word-stroke-width: clamp(1.25px, .38vw, 8px);
  fill: var(--cream);
  stroke: var(--cream);
  opacity: 0;
}
.profile-word-flight-shape {
  --flight-distance: var(--word-flight-distance, 1);
  transform-box: view-box;
  transform-origin: 61% 56%;
  transform: translateY(calc(-17% * var(--flight-distance)))
    scale(calc(1 + 12 * var(--flight-distance) * var(--flight-distance) * var(--flight-distance)));
}
.profile-portrait-frame {
  --portrait-headroom: 56px;
  --portrait-face-x: 36%;
  position: absolute;
  z-index: 2;
  inset-block-end: calc(-1 * var(--profile-foot-height));
  left: calc(clamp(58%, calc(68% - 144px), 62%) - clamp(12px, 1.1vw, 26px));
  /* The visible hair starts about 2.1% into the transparent cutout. */
  height: calc((100% + var(--profile-foot-height) - var(--profile-content-top) - var(--profile-tab-inset) - 2px) / .979);
  box-sizing: content-box;
  aspect-ratio: 1279 / 1459;
  padding-block-start: var(--portrait-headroom);
  transform: translateX(calc(-1 * var(--portrait-face-x)));
  filter: blur(calc(clamp(8px, 1.35svh, 16px) * var(--profile-portrait-exit)));
  opacity: calc(var(--profile-portrait-arrival, 1) * (2 - var(--profile-portrait-arrival, 1)) * (1 - var(--profile-portrait-exit)));
  pointer-events: none;
}
.profile-portrait {
  position: absolute;
  inset: var(--portrait-headroom) 0 0;
  margin: 0;
  pointer-events: none;
}
.profile-portrait > :is(img, video, .profile-portrait-depth),
.profile-portrait::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(var(--portrait-scale, 1));
  transform-origin: var(--portrait-face-x) 36%;
  transition: transform .35s ease-out;
}
.profile-portrait::after {
  content: "";
  background: linear-gradient(90deg, transparent 42%, rgb(from var(--black) r g b / .13) 60%,
    rgb(from var(--black) r g b / .34) 78%, rgb(from var(--black) r g b / .52));
  mask: var(--portrait-tone-source, url("../assets/sam-portrait-clear.webp")) center / contain no-repeat;
  pointer-events: none;
}
/* 肖像跟随层：半透明、轻微模糊的肖像副本，带滞后地跟随指针平移；
   中间挖空五官区，只让头发/肩线/边缘跟随。 */
.profile-ghost {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  filter: blur(1.4px);
  transition: transform .26s cubic-bezier(.22,.8,.23,1), opacity .32s ease-out;
  -webkit-mask-image: radial-gradient(ellipse 25% 32% at var(--portrait-face-x) 34%, transparent 0 64%, #000 100%);
  mask-image: radial-gradient(ellipse 25% 32% at var(--portrait-face-x) 34%, transparent 0 64%, #000 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.profile-ghost.is-visible { opacity: 0.46; }
/* 离开后的回弹更慢 */
.profile-ghost.is-returning {
  transition: transform 1.1s cubic-bezier(.22,.8,.23,1), opacity .85s ease-out;
}
/* 远层：更大、更虚、边缘渐隐的副本，垫在原图后面，与近层形成前后错位 */
.profile-ghost-far {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  filter: blur(2.6px);
  transform: scale(1.08);
  transform-origin: var(--portrait-face-x) 34%;
  transition: transform .55s cubic-bezier(.2,.7,.3,1), opacity .5s ease-out;
  -webkit-mask-image: radial-gradient(ellipse 68% 78% at var(--portrait-face-x) 35%, #000 0 42%, transparent 84%);
  mask-image: radial-gradient(ellipse 68% 78% at var(--portrait-face-x) 35%, #000 0 42%, transparent 84%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.profile-ghost-far.is-visible { opacity: 0.22; }
.profile-ghost-far.is-returning {
  transition: transform 1.4s cubic-bezier(.2,.7,.3,1), opacity 1s ease-out;
}
.profile-portrait-depth {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  mix-blend-mode: soft-light;
  pointer-events: none;
}
.profile-portrait-depth.is-ready { display: block; }
.profile-portrait-depth::before,
.profile-portrait-depth::after {
  content: "";
  position: absolute;
  inset: 0;
  mask: var(--key-mask) center / contain no-repeat;
  transition: opacity 220ms ease-out;
}
.profile-portrait-depth::before {
  background: rgb(244 234 219);
  opacity: var(--key-boost, 0);
}
.profile-portrait-depth::after {
  background: var(--black);
  opacity: var(--key-cut, 0);
}
.profile-portrait-depth.is-resting::before,
.profile-portrait-depth.is-resting::after { transition-duration: 440ms; }

.profile-identity {
  position: absolute;
  z-index: 3;
  inset-block-end: calc(clamp(10px, 1.8svh, 23px) - var(--profile-foot-height));
  inset-inline-start: var(--profile-gutter);
  opacity: var(--profile-portrait-arrival, 1);
  translate: 0 var(--profile-title-lift);
  display: grid;
  gap: 7px;
  text-shadow: 0 1px 8px var(--black);
}
.profile-identity b {
  font-weight: 660;
  font-size: clamp(20px, 2.25vw, 34px);
  line-height: 1.1;
}
.profile-identity span {
  color: var(--profile-copy);
  font-size: clamp(12px, 1.08vw, 15px);
  letter-spacing: .075em;
}
body.ed-on .profile-portrait { pointer-events: auto; }

.about-copy {
  --profile-card-max: clamp(300px, 44svh, 500px);
  display: grid;
  grid-template-columns: minmax(99px, .52fr) minmax(0, 1.48fr);
  grid-template-rows: auto minmax(0, 1fr);
  column-gap: clamp(16px, 1.55vw, 32px);
  row-gap: clamp(18px, 3.4svh, 44px);
  grid-area: 1 / 1;
  z-index: 3;
  min-block-size: 0;
  width: min(42%, 760px);
  margin-inline-start: var(--profile-gutter);
  padding-block-start: max(16px, calc(var(--profile-content-top) - clamp(7px, 1.8svh, 26px)));
  padding-block-end: calc(var(--profile-art-height) + clamp(26px, 3.25svh, 44px) - var(--profile-drop) - var(--profile-copy-shift));
  pointer-events: none;
  translate: 0 calc(-1 * clamp(64px, 12svh, 142px) * var(--profile-copy-exit));
}
.about-copy :is(.profile-choices, .profile-panels) { pointer-events: auto; }
.about[data-chapter-transition] .profile-visual { pointer-events: none; }
.profile-choices {
  grid-area: 2 / 1;
  opacity: var(--profile-tabs-arrival, 1);
  display: grid;
  align-content: start;
  min-inline-size: 0;
  max-block-size: var(--profile-card-max);
  padding-inline-end: clamp(12px, 1.2vw, 28px);
  border-inline-end: 1px solid var(--profile-rule);
}
.profile-choices button {
  position: relative;
  width: 100%;
  min-height: 44px;
  padding: 8px 0 8px 13px;
  border: 0;
  background: transparent;
  color: var(--dark-muted);
  font: 650 clamp(15px, 1.3vw, 19px) / 1.3 var(--ff);
  text-align: start;
  cursor: pointer;
}
.profile-choices button:is(:hover, [aria-selected="true"]) { color: var(--profile-accent); }
.profile-choices button[aria-selected="true"]::before {
  content: "";
  position: absolute;
  inset-block-start: 10px;
  inset-inline-start: 0;
  width: 2px;
  height: 1em;
  background: currentColor;
}
.profile-choice-detail {
  display: none;
  margin-top: 5px;
  color: var(--profile-copy);
  font-size: clamp(11px, .95vw, 14px);
  font-weight: 450;
  line-height: 1.45;
}
.profile-choices [aria-selected="true"] .profile-choice-detail { display: block; }
.profile-choices button:focus-visible,
.profile-panel:focus-visible { outline: 2px solid var(--profile-accent); outline-offset: 4px; }
.profile-panel:focus-visible { outline-offset: -2px; }
.profile-panels {
  grid-area: 2 / 2;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-block-size: 0;
  max-block-size: var(--profile-card-max);
  overflow: clip;
  overflow-clip-margin: 22px;
  perspective: clamp(460px, 43vw, 690px);
  perspective-origin: 50% 48%;
  opacity: var(--profile-headline-arrival, 1);
}
.profile-panel {
  grid-area: 1 / 1;
  min-width: 0;
  min-block-size: 0;
  padding: clamp(17px, 1.75vw, 28px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--profile-rule) transparent;
  border: 1px solid transparent;
  border-radius: 13px 0 0 13px;
  background:
    linear-gradient(90deg, rgb(from var(--black) r g b / .96), rgb(from var(--black) r g b / .85) 43%,
      rgb(from var(--black) r g b / .64) 67%, rgb(from var(--black) r g b / .30) 85%, transparent) padding-box,
    linear-gradient(90deg, rgb(from var(--light-text) r g b / .27),
      rgb(from var(--light-text) r g b / .095) 43%, transparent 96%) border-box;
}
.profile-panel[inert]:not(.is-leaving) { display: none; }
.profile-panel.is-leaving { z-index: 1; pointer-events: none; }
.profile-panel > :not(.profile-card-title) { opacity: var(--profile-copy-arrival, 1); }
.profile-card-title {
  font-size: clamp(19px, 1.52vw, 27px);
  line-height: 1.25;
  font-weight: 650;
  text-wrap: pretty;
}
.profile-card-subtitle {
  margin-block-start: 6px;
  color: var(--profile-copy);
  font-size: clamp(10px, .86vw, 13px);
  letter-spacing: .035em;
}
.about-lead {
  grid-column: 1 / -1;
  font-size: clamp(30px, 2.8vw, 61px);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -.032em;
  opacity: var(--profile-headline-arrival, 1);
  translate: 0 calc(-.24em * (1 - var(--profile-headline-arrival, 1)));
}
.about[data-chapter-transition] .about-lead > [data-ed]:not(.title-en-lead) {
  --headline-fill: var(--profile-headline-fill-arrival, 1);
  color: color-mix(in srgb, var(--cream) calc(100% * var(--headline-fill)), transparent);
  -webkit-text-stroke: clamp(.65px, .024em, 1.15px)
    color-mix(in srgb, var(--cream) calc(100% * (1 - var(--headline-fill))), transparent);
}
.about-lead .title-en-lead {
  opacity: var(--profile-headline-fill-arrival, 1);
  display: block;
  margin-top: 12px;
  color: var(--profile-copy);
  font: 600 clamp(13px, 1.12vw, 20px) / 1.35 var(--fn);
  letter-spacing: .045em;
  text-transform: uppercase;
}
.about-lead > [data-ed] {
  display: block;
  line-break: strict;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.about-text {
  max-width: 28em;
  margin-top: clamp(10px, 1.65svh, 19px);
  color: var(--profile-copy);
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.7;
  letter-spacing: .015em;
  text-wrap: pretty;
}
.about-text p + p { margin-top: .85em; }
.practice-facts { margin-top: 13px; }
.practice-facts > div {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  padding-block: 6px;
  border-block-start: 1px solid var(--profile-rule);
  font-size: clamp(12px, .92vw, 14px);
  line-height: 1.4;
}
.practice-facts .mono { color: var(--profile-copy); }
.about-stats {
  margin-top: clamp(16px, 2.4svh, 30px);
}
.stat {
  display: grid;
  grid-template-columns: clamp(98px, 10.2vw, 181px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(12px, 1.45vw, 24px);
  border-block-start: 1px solid var(--profile-rule);
  padding-block: clamp(13px, 2.35svh, 29px);
  min-width: 0;
}
.stat-num {
  display: flex;
  align-items: baseline;
  gap: .04em;
  color: var(--cream);
  font: 760 clamp(33px, 3.95vw, 72px) / .94 var(--ff);
  letter-spacing: -.06em;
  white-space: nowrap;
}
.stat-num b { font-weight: inherit; font-variant-numeric: tabular-nums; }
.stat-num sup { align-self: start; margin: .25em 0 0 .09em; font-size: .43em; line-height: 1; color: var(--profile-accent); }
.stat-num small { margin-left: .35em; color: var(--profile-copy); font: 600 clamp(11px, .84vw, 13px)/1.2 var(--ff); letter-spacing: 0; }
.stat-cap {
  display: block;
  color: var(--profile-copy);
  font-size: clamp(13px, 1vw, 17px);
  line-height: 1.5;
  text-wrap: pretty;
}
/* 数据卡片磁性倾斜 */
.stat[data-stat-interactive] {
  cursor: default;
  transform: perspective(600px) rotateX(var(--stat-rx, 0deg)) rotateY(var(--stat-ry, 0deg));
  transition: transform .3s cubic-bezier(.16,1,.3,1);
  will-change: transform;
}
.stat-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 1051px) and (max-height: 950px) {
  .profile-panel { padding-block: 16px; }
  .profile-detail .about-text { margin-block-start: 10px; line-height: 1.6; }
  .practice-facts { margin-top: 8px; }
  .practice-facts > div { padding-block: 4px; }
  .stat { padding-block: clamp(11px, 1.6svh, 15px); }
}

@media (min-width: 1051px) and (max-height: 760px) {
  .about {
    --profile-content-top: clamp(18px, 4svh, 30px);
    --profile-art-height: clamp(95px, calc(36svh - 96px), 178px);
  }
  .about-copy { row-gap: 16px; }
  .about-lead { font-size: clamp(26px, 2.55vw, 35px); }
  .about-lead .title-en-lead { margin-top: 7px; }
  .profile-panel { padding: 16px; }
  .about-text { line-height: 1.6; }
}

@media (max-width: 1050px), (max-aspect-ratio: 1/1) {
  :is(.hero, .about) { --chapter-seam: clamp(26px, 4.5svh, 58px); }
  .about {
    --profile-street-lead: var(--chapter-street-lead, 0px);
    --profile-drop: clamp(14px, 2.3svh, 24px);
    --profile-portrait-trim: clamp(16px, 3.4svh, 34px);
    --profile-foot-height: clamp(62px, 8svh, 92px);
    --profile-scene-min: clamp(62px, 25svh, 350px);
  }
  .profile-layout { grid-template-rows: auto minmax(0, 1fr); }
  .profile-visual { grid-area: 2 / 1; }
  .profile-word {
    --profile-about-width: clamp(.64, calc(.64 + (100vw - 390px) / 700px), .79);
    --profile-me-width: .709;
    height: min(76%, clamp(96px, 27vw, 205px));
    inset-block: clamp(10px, 24%, 72px) auto;
  }
  .profile-portrait-frame {
    left: 59%;
    height: calc(100% + var(--profile-foot-height) - var(--profile-portrait-trim));
  }
  .profile-backdrop::after {
    background:
      linear-gradient(180deg, var(--black), rgb(from var(--black) r g b / .42) 10%, transparent 43%),
      linear-gradient(90deg, rgb(from var(--black) r g b / .43), transparent 76%);
  }
  .about.is-chapter-street-extended .profile-backdrop::after {
    --profile-reading-shade: var(--profile-copy-arrival, 1);
    background:
      linear-gradient(180deg, var(--black),
        rgb(from var(--black) r g b / calc(.43 + .32 * var(--profile-reading-shade))) calc(.48 * var(--profile-street-lead)),
        rgb(from var(--black) r g b / calc(.34 + .29 * var(--profile-reading-shade))) calc(.88 * var(--profile-street-lead)),
        transparent calc(var(--profile-street-lead) + 210px)),
      linear-gradient(90deg, rgb(from var(--black) r g b / .43), transparent 76%);
  }
  .about-copy {
    width: auto;
    max-inline-size: 810px;
    margin: 0;
    block-size: min(388px, calc(var(--chapter-height) - var(--profile-top-space) - var(--profile-foot-height) - var(--profile-scene-min)));
    padding: calc(14px + var(--profile-drop)) var(--profile-gutter) 12px;
  }
}
@media (max-width: 760px) {
  .profile-backdrop > :is(img, video) { object-position: 54% 70%; }
}
@media (max-width: 600px) {
  .about-copy {
    grid-template-columns: minmax(84px, .43fr) minmax(0, 1.57fr);
    gap: 12px;
    padding-inline: clamp(14px, 4vw, 23px);
  }
  .about-lead { font-size: clamp(21px, 6vw, 30px); }
  .about-lead .title-en-lead { margin-top: 4px; }
  .profile-choices { padding-inline-end: 7px; }
  .profile-choices button { min-height: 44px; padding-inline-start: 8px; font-size: 13px; }
  .profile-choices button[aria-selected="true"]::before { inset-block-start: 8px; }
  .profile-panels { overflow-clip-margin: 12px; }
  .profile-panel { padding: 12px; border-radius: 10px 0 0 10px; }
  .stat-num { font-size: clamp(25px, 7vw, 39px); flex-wrap: wrap; }
  .about-stats { margin-top: 10px; }
  .stat { grid-template-columns: minmax(62px, .85fr) minmax(0, 1.15fr); gap: 8px; padding-block: 9px; }
  .stat-cap { font-size: 12px; line-height: 1.42; }
}
@media (prefers-reduced-motion: reduce) {
  .profile-backdrop > :is(img, video) { animation: none; }
  .profile-portrait > :is(img, video, .profile-portrait-depth),
  .profile-portrait::after { transition: none; }
}

/* ============================================================
   PORTFOLIO — 分类标题与作品抽屉
   ============================================================ */
.ability {
  --ability-entry-phase: clamp(0, (var(--portfolio-progress, 1) - .22) / .49, 1);
  --ability-arrival: calc(var(--ability-entry-phase) * var(--ability-entry-phase) * (3 - 2 * var(--ability-entry-phase)));
  background: var(--black);
  color: var(--light-text);
  padding: clamp(104px, 11vw, 160px) 0 clamp(64px, 8vw, 112px);
  overflow-anchor: none;
  position: relative;
}
.ability > .wrap {
  max-width: none;
  padding-inline: max(var(--pad), min(5.2vw, 10svh));
  translate: 0 calc(clamp(94px, 19svh, 225px) * (1 - var(--ability-arrival)));
}
.about + .ability { padding-block-start: clamp(28px, 2.75vw, 44px); }

.ab-head {
  display: grid;
  gap: clamp(12px, 1.6vw, 24px);
  padding-bottom: clamp(35px, 4.8vw, 68px);
}
.ab-head-top { display: flex; align-items: center; gap: clamp(12px, 1.3vw, 20px); }
.ab-badge {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-d);
  color: var(--dark-muted);
  font-size: 10px;
  letter-spacing: .04em;
  flex: none;
}
.ab-h-zh {
  font: 650 clamp(20px, 2.1vw, 34px) / 1.25 var(--ff);
  letter-spacing: .04em;
}
.ab-h {
  font-family: var(--fn);
  font-weight: 700;
  font-size: clamp(52px, 6.7vw, 110px);
  line-height: .86;
  letter-spacing: -.012em;
  text-transform: uppercase;
  color: var(--cream);
}
.ab-display { display: block; line-height: 1.05; }
.ab-h > .ab-display { margin-top: clamp(12px, 1.45vw, 22px); }
.ab-intro {
  justify-self: start;
  max-width: 430px;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--dark-muted);
}

/* ---------- 行 ---------- */
.ab-rows { border-top: 1px solid rgba(255, 255, 255, .08); }
.ab-row {
  --ab-idx: clamp(64px, 7vw, 132px);
  --ab-gap: clamp(20px, 3vw, 54px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  transition: background .5s var(--ease);
}

.ab-main {
  display: grid;
  grid-template-columns: var(--ab-idx) minmax(0, 1fr) auto;
  gap: var(--ab-gap);
  align-items: center;
  min-height: clamp(145px, 11vw, 270px);
  padding-block: clamp(24px, 2.3vw, 54px);
  cursor: pointer;
}

.ab-idx { display: flex; align-items: baseline; gap: 10px; }
.ab-idx b {
  color: var(--dark-muted);
  font-size: clamp(16px, 1.18vw, 21px);
  font-weight: 600;
  letter-spacing: .02em;
}
.ab-row.is-open .ab-idx b { color: var(--accent-text); }
.ab-cat {
  display: block;
  margin-bottom: 7px;
  font: 650 clamp(15px, 1.35vw, 21px) / 1.35 var(--ff);
  letter-spacing: .04em;
  color: var(--dark-muted);
  transition: color .3s;
}
.ab-row:is(.is-open, :hover) .ab-cat { color: var(--light-text); }

.ab-title {
  font-family: var(--fn);
  font-weight: 700;
  font-size: clamp(34px, 3.55vw, 60px);
  line-height: .92;
  letter-spacing: -.025em;
  text-transform: uppercase;
  color: var(--light-text);
}

.ab-side { display: flex; }
.ab-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: clamp(9px, 1vh, 13px) clamp(18px, 1.35vw, 26px);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--light-text);
  font-family: var(--ff);
  font-size: clamp(12.5px, 1.05vw, 16px);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .4s var(--ease), color .35s var(--ease),
              border-color .35s var(--ease), box-shadow .45s var(--ease);
}
.ab-btn .ar { font-style: normal; display: inline-block; transition: transform .45s var(--ease-out); }
.ab-btn:hover {
  border-color: var(--accent);
  color: var(--accent-text);
  background: rgba(255, 255, 255, .03);
}
.ab-btn:hover .ar { transform: translateX(4px); }
/* 展开态：强调色底与深色文字 */
.ab-row.is-open .ab-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--black);
  box-shadow: 0 8px 24px rgb(from var(--accent) r g b / .14);
}
.ab-row.is-open .ab-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--black); }
.ab-row.is-open .ab-btn .ar { transform: rotate(-90deg); }
.ab-row.is-open .ab-btn:hover .ar { transform: rotate(-90deg); }

/* ---------- 抽屉 ---------- */
.ab-body {
  --ab-duration: var(--ab-scroll-duration, .48s);
  --ab-motion: cubic-bezier(.25, .65, .3, 1);
  display: grid;
  grid-template-rows: minmax(0, 0fr);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: grid-template-rows var(--ab-duration) var(--ab-motion),
              opacity var(--ab-duration) var(--ab-motion),
              visibility 0s linear var(--ab-duration);
}
.ab-row.is-open .ab-body {
  grid-template-rows: minmax(0, 1fr);
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}
.ab-instant .ab-body { transition: none; }
/* 离屏收起时由脚本补偿高度，避免浏览器重复调整滚动位置。 */
html:has(.ability) { overflow-anchor: none; }

.ab-body-in {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  height: max-content;
  align-self: start;
  align-content: start;
  gap: clamp(32px, 5vw, 110px);
  padding-bottom: clamp(28px, 4vw, 64px);
  min-height: 0;
}
.ab-card {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: var(--black);
}
.ab-card-media {
  width: 100%;
  aspect-ratio: 16 / 9;
}
.ab-detail-media { display: none; }
.ab-types { width: 100%; max-width: 34rem; }
.ab-types-label { margin-bottom: clamp(10px, 1.3vw, 22px); font-size: 13px; letter-spacing: .10em; color: var(--dark-muted); }
.ab-types li { border-top: 1px solid rgb(255 255 255 / .16); }
.ab-types li:last-child { border-bottom: 1px solid rgb(255 255 255 / .16); }
.ab-types li > :is(button, span) {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: clamp(13px, 1.25vw, 22px);
  font: 550 clamp(18px, 1.65vw, 32px)/1.35 var(--ff);
  overflow-wrap: anywhere;
}
.ab-types li > button {
  width: 100%; min-height: 44px; border: 0; padding-inline: 0;
  background: transparent; color: var(--dark-muted); text-align: start; cursor: pointer;
}
.ab-types li > button::after {
  content: ""; width: .42em; height: .42em; margin-right: .2em; flex: none;
  border-block-start: 1px solid; border-inline-end: 1px solid;
  transform: rotate(45deg); opacity: 0; transition: opacity .2s ease;
}
.ab-types li > button:is(:hover, :focus-visible, [aria-pressed="true"]) { color: var(--accent-text); }
.ab-types li > button[aria-pressed="true"]::after { opacity: 1; }
.ab-types li > span { color: color-mix(in srgb, var(--dark-muted) 72%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .ab-types { opacity: 0; transition: opacity .18s ease; }
  .ab-row.is-open .ab-types { opacity: 1; transition: opacity .28s .08s ease; }
}
.ab-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.005);
  transition: transform 1.4s var(--ease-out);
}
.ab-card-media:hover img { transform: scale(1.04); }
/* 图注落款区：只压底部三分之一，够字清楚又不至于像旧版那样整块发黑 */
.ab-card-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgb(from var(--black) r g b / .5));
  pointer-events: none;
  z-index: 1;
}
.ab-card-media figcaption {
  position: absolute;
  z-index: 2;
  left: clamp(16px, 1.4vw, 22px);
  right: clamp(16px, 1.4vw, 22px);
  bottom: clamp(14px, 1.3vw, 20px);
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  transition: transform .6s var(--ease-out);
}
.ab-card-media:hover figcaption { transform: translateY(-3px); }
.ab-cap-k {
  margin-top: 0;
  color: var(--dark-muted);
  text-shadow: 0 1px 14px rgba(0, 0, 0, .8);
}
.ab-cap-t {
  font-size: clamp(14px, 1.25vw, 19px);
  font-weight: 600;
  line-height: 1.45;
  color: #fff;
  text-shadow: 0 1px 16px rgba(0, 0, 0, .7);
}
.ab-project-link {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: clamp(10px, 1.1vw, 16px);
  border-radius: inherit;
}
.ab-project-link span {
  padding: 5px 9px;
  background: var(--black);
  color: var(--light-text);
  font-size: 11px;
  border-radius: var(--radius-pill);
}
.ab-project-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.ab-mirror-media, .ab-preview-action { display: none; }
body:not(.ed-on) .ab-body-in.has-preview {
  isolation: isolate;
  grid-template-columns: minmax(0, 32%) minmax(0, 1fr);
  grid-template-rows: minmax(clamp(318px, 30vw, 530px), auto);
  align-items: stretch;
  column-gap: 0;
  row-gap: 0;
  width: min(100%, max(88%, 54rem));
  margin-inline: auto;
}
body:not(.ed-on) .ab-body-in.has-preview::before {
  content: "";
  grid-area: 1 / 1 / 2 / -1;
  border-radius: 6px;
  background: var(--black);
  pointer-events: none;
}
body:not(.ed-on) .has-preview .ab-card-media {
  display: block;
  grid-area: 1 / 1 / 2 / -1;
  width: 76%;
  justify-self: end;
  min-width: 0;
  aspect-ratio: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  border-radius: 0 6px 6px 0;
  mask-image: linear-gradient(90deg, transparent 0 4%, #0008 28%, #000 54%);
  transition: opacity .28s var(--ease-out), visibility 0s linear .28s;
}
body:not(.ed-on) .has-preview .ab-card-media.is-preview {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
body:not(.ed-on) .has-preview .ab-card-media > :is(img, video) {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
}
body:not(.ed-on) .has-preview .ab-card-media[data-fit="contain"] > :is(img, video) {
  object-fit: contain;
  transform: none;
}
body:not(.ed-on) .has-preview .ab-card-media figcaption { left: 35%; align-items: flex-end; text-align: end; }
body:not(.ed-on) .has-preview .ab-project-link span { display: none; }
body:not(.ed-on) .has-preview .ab-types {
  grid-area: 1 / 1 / 2 / 2;
  z-index: 2;
  position: relative;
  align-self: center;
  max-width: none;
  padding: clamp(20px, 3vw, 54px) 0 clamp(20px, 3vw, 54px) clamp(20px, 3vw, 54px);
}
.has-preview .ab-types-label { margin-bottom: clamp(10px, 1.15vw, 16px); }
.has-preview .ab-types li > :is(button, span) {
  gap: 10px;
  padding-block: clamp(10px, 1.05vw, 16px);
  font-size: clamp(15px, 1.32vw, 23px);
}
body:not(.ed-on) .has-preview .ab-preview-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  margin-top: clamp(9px, 1.4vw, 23px);
  padding-inline: 3px;
  font-size: 14px;
  font-weight: 650;
}
.ab-preview-action span, .ab-preview-action:hover { color: var(--accent-text); }
.has-preview :is(.ab-preview-action, .ab-types button):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
@media (max-width: 760px) {
  body:not(.ed-on) .ab-body-in.has-preview {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    width: 100%;
  }
  body:not(.ed-on) .ab-body-in.has-preview::before { grid-row: 1 / 3; }
  body:not(.ed-on) .has-preview .ab-card-media {
    grid-area: 1 / 1 / 2 / 2;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 6px 6px 0 0;
    mask-image: linear-gradient(180deg, #000 0 74%, transparent 100%);
  }
  body:not(.ed-on) .has-preview .ab-card-media figcaption { bottom: 15%; }
  body:not(.ed-on) .has-preview .ab-types {
    grid-area: 2 / 1 / 3 / 2;
    padding: 10px clamp(14px, 4vw, 28px) 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body:not(.ed-on) .has-preview .ab-card-media,
  .ab-types li > button::after { transition: none; }
}
.ab-summary { margin-top: 9px; max-width: 560px; color: var(--dark-muted); font-size: 14px; line-height: 1.65; }
.ab-case-link { display: inline-block; margin-top: 4px; padding-block: 5px; color: var(--light-text); font-size: 14px; text-decoration: underline; text-decoration-color: var(--dark-muted); text-underline-offset: 4px; }
.ab-case-link:is(:hover, :focus-visible) { color: var(--accent); text-decoration-color: currentColor; }


/* ============================================================
   CASE STUDIES
   ============================================================ */
.works {
  --study-stride: clamp(220px, 42svh, 500px);
  --focus-x: 70%;
  --focus-y: 46%;
  background: var(--cream);
  color: var(--ink);
}
.works.study-pinned::after {
  content: ""; display: block; height: calc(var(--study-stride) * var(--study-gaps, 2));
}
.study-wrap {
  position: relative; isolation: isolate; overflow: clip;
  min-height: 100svh; min-height: 100dvh; max-width: none;
  display: flex; flex-direction: column;
  padding: clamp(84px, 11svh, 152px) clamp(24px, 5vw, 110px) clamp(38px, 7svh, 98px);
}
.study-pinned .study-wrap { position: sticky; top: 0; }
.study-wrap::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgb(from var(--cream) r g b / .93), rgb(from var(--cream) r g b / .58) 16%, transparent 36%),
    linear-gradient(18deg, var(--cream) 3%, rgb(from var(--cream) r g b / .97) 16%,
      rgb(from var(--cream) r g b / .60) 32%, transparent 52%),
    linear-gradient(90deg, rgb(from var(--cream) r g b / .78), transparent 65%);
}
.study-head, .study-copy { position: relative; z-index: 1; }
.study-head {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.study-kicker { display: block; color: var(--accent-text); font-size: 12px; letter-spacing: .14em; margin-bottom: 5px; }
.works-title { font-size: clamp(26px, 3.2vw, 58px); line-height: 1.12; letter-spacing: -.055em; }
.study-index, .study-steps { display: flex; flex-wrap: wrap; align-items: center; }
.study-index { gap: 5px; }
.study-index button, .study-steps button { font: inherit; color: var(--body); cursor: pointer; min-height: 44px; }
.study-index button {
  background: var(--cream); border: 1px solid var(--line-l); border-radius: var(--radius-pill);
  padding: 6px clamp(13px, 1.4vw, 26px); font-size: 14px; overflow-wrap: anywhere;
}
.study-index button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.study-index button:hover, .study-steps button:hover { border-color: var(--accent); }
.study-index button:focus-visible, .study-steps button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#studyPages { margin-top: auto; padding-top: clamp(96px, 19svh, 250px); }
.study-page[hidden], .study-page [hidden], .study-page.is-leaving .study-copy, .study-page.is-leaving figcaption { display: none; }
.study-copy { width: fit-content; max-width: min(47vw, 720px); }
.study-steps { gap: clamp(14px, 1.65vw, 28px); margin-bottom: clamp(10px, 1.8svh, 20px); }
.study-steps button {
  padding: 4px 0; border: 0; border-bottom: 2px solid transparent;
  background: transparent; font-size: 14px; font-weight: 600;
}
.study-steps button[aria-pressed="true"] { color: var(--accent-text); border-color: currentColor; }
.study-text { overflow-wrap: anywhere; }
.study-text h3 { font-size: clamp(30px, 4.3vw, 72px); font-weight: 750; line-height: 1.14; letter-spacing: -.045em; text-wrap: balance; }
.study-text p { margin-top: 14px; max-width: 34em; font-size: clamp(15px, 1.2vw, 19px); line-height: 1.7; color: var(--body); }
.study-board {
  position: absolute; inset: 0; z-index: -2; overflow: hidden;
  transform-origin: var(--focus-x) var(--focus-y); background: #d6d6bf;
}
.study-page.is-leaving .study-board { z-index: -1; }
.study-sheet, .study-guide, .study-media { position: absolute; inset: 0; }
.study-sheet { transform-origin: var(--focus-x) var(--focus-y); transition: transform .72s var(--ease-out); }
.study-page[data-stage="1"] .study-sheet { transform: scale(1.18); }
.study-guide {
  --ring-w: 21%; --ring-h: 33%; --ring-pitch: 8.5%; --ring-tone: #a5ae8e;
  background:
    radial-gradient(ellipse var(--ring-w) var(--ring-h) at var(--focus-x) var(--focus-y), #f0ecda 0 12%, transparent 13%),
    repeating-radial-gradient(ellipse var(--ring-w) var(--ring-h) at var(--focus-x) var(--focus-y),
      #e0dfcc 0%, #edead9 2%, var(--ring-tone) 3.6%, #d5d7bf 5.2%, #e6e4d0 var(--ring-pitch));
}
#study-02 .study-guide { --ring-w: 39%; --ring-h: 20%; --ring-pitch: 13%; --ring-tone: #94a19a; }
#study-03 .study-guide { --ring-w: 19%; --ring-h: 46%; --ring-pitch: 16%; --ring-tone: #b2a493; }
.study-guide i {
  position: absolute; top: var(--focus-y); left: var(--focus-x); transform: translate(-50%,-50%);
  width: clamp(28px, 4vw, 80px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 34% 25%, #fffced, #d8d8bd 52%, #9fa88c 90%);
  box-shadow: 2px 5px 9px #6d735745;
}
.study-media { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .4s ease, visibility 0s .4s; }
.study-media.is-active { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.study-media > img, .study-media > video, .study-media.is-active > video.ed-video {
  width: 100%; height: 100%; object-fit: cover; object-position: var(--focus-x) var(--focus-y);
}
/* 横屏保留整张设定图，三个镜头都从左侧肖像的眼部拉开。 */
.study-board:has(.study-media.is-active:not(.has-media) > img[src^="assets/case-preview/study-"]) {
  --focus-x: 21%; --focus-y: 48%;
}
.study-media > img[src^="assets/case-preview/study-"] {
  box-sizing: border-box; padding-top: clamp(60px, 14svh, 170px);
  object-fit: contain; object-position: center; background: #fff;
}
@media (orientation: portrait) {
  #study-01 { --portrait-crop: 9%; }
  #study-02 { --portrait-crop: 13%; }
  #study-03 { --portrait-crop: 1%; }
  .study-board:has(.study-media.is-active:not(.has-media) > img[src^="assets/case-preview/study-"]) {
    --focus-x: 55%;
  }
  .study-media > img[src^="assets/case-preview/study-"] {
    padding: 0; object-fit: cover; object-position: var(--portrait-crop) center;
  }
}
.study-media.has-media { background: var(--paper); }
.study-figure figcaption {
  position: absolute; bottom: clamp(22px, 4svh, 52px); right: clamp(24px, 5vw, 110px); z-index: 1;
  max-width: 34%; padding: 2px 7px; background: rgb(from var(--cream) r g b / .91); color: var(--body); font-size: 12px;
}
.study-figure:has(.study-media.is-active:not(.has-media) img[src^="data:image/gif"]) figcaption::after { content: ' · 待补充'; }
.study-hint { margin: 18px 0 0; color: var(--grey); font-size: 12px; position: relative; z-index: 1; width: fit-content; }
@keyframes study-copy-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .study-cued .study-board { transform: scale(2.25); }
  .study-page:not([hidden], .is-leaving) .study-text:not([hidden]) { animation: study-copy-in .38s ease-out; }
}
@media (prefers-reduced-motion: reduce) { .study-sheet, .study-media { transition: none; } }
@media (max-width: 760px) {
  .works { --focus-x: 63%; --focus-y: 42%; }
  .study-wrap { padding: 86px var(--pad) max(30px, env(safe-area-inset-bottom)); }
  .study-head { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
  .study-index { gap: 4px; }
  .study-index button { padding: 5px 10px; font-size: 12px; }
  .study-copy { max-width: 100%; }
  .study-steps { margin-bottom: 10px; }
  .study-text p { margin-top: 8px; }
  .study-wrap::after {
    background: linear-gradient(180deg, rgb(from var(--cream) r g b / .95) 2%, rgb(from var(--cream) r g b / .60) 19%,
      transparent 32% 50%, rgb(from var(--cream) r g b / .93) 72%, var(--cream) 98%);
  }
  .study-figure figcaption { right: var(--pad); bottom: max(30px, env(safe-area-inset-bottom)); }
}
body.ed-on .study-sheet { transform: none; }
body.ed-on .study-media.is-active .ed-chip { top: 38%; right: 18%; pointer-events: auto; }
body.ed-on .study-board { z-index: auto; }
body.ed-on .study-index, body.ed-on .study-steps { position: relative; z-index: 2; }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .pv-case-figure::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    padding: 2px;
    border-radius: inherit;
    background: radial-gradient(circle var(--case-light-radius, clamp(165px, 19vw, 300px)) at var(--case-x, 50%) var(--case-y, 50%),
      rgb(from var(--accent) r g b / .82), rgb(from var(--accent) r g b / .32) 45%, transparent 100%);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    pointer-events: none;
    transition: opacity .38s var(--ease-out);
  }
  .pv-case-figure:hover::after { opacity: 1; }
}
.case-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 5px 8px;
  background: var(--black);
  color: var(--light-text);
  font-size: 10px;
  border-radius: var(--radius-pill);
  pointer-events: none;
}

/* ============================================================
   PROCESS
   ============================================================ */
.process {
  background: var(--mist); color: var(--ink);
  padding: clamp(60px, 7vw, 100px) 0 clamp(70px, 8vw, 120px); overflow: hidden;
}
.proc-stage { margin-inline: var(--chapter-inset); }
.proc-title-en {
  display: block; margin-top: 6px;
  font: 600 clamp(15px, 1.45vw, 25px)/1.25 var(--fn);
  color: var(--accent-text); letter-spacing: .13em; text-transform: uppercase;
}
.chapter-zh {
  display: block;
  font-size: clamp(24px, 3vw, 43px);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -.025em;
}
.proc-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 30%);
  gap: 5vw;
  align-items: end;
}
.proc-head { display: grid; gap: clamp(16px, 2.8svh, 30px); }
.proc-sub { font-size: clamp(14px, 1.1vw, 18px); line-height: 1.65; color: var(--body); max-width: 30em; }
.proc-num { display: block; text-align: right; font-size: clamp(24px, 2.6vw, 40px); color: var(--grey); letter-spacing: -.025em; line-height: 1; }
.proc-rule { height: 1px; background: var(--line-l); margin-top: 10px; }
.proc-rule i { display: block; height: 100%; background: var(--accent); transform: scaleX(.25); transform-origin: left; transition: transform .36s var(--ease-out); }
.proc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  position: relative; isolation: isolate; overflow: clip;
  margin-top: clamp(28px, 5svh, 68px);
  border: 1px solid var(--line-l);
}
.step { display: grid; position: relative; min-width: 0; }
.proc-pinned .step { transform: translateX(var(--step-shift, 0%)); }
.step-sheet {
  --scene-shade: linear-gradient(180deg, rgb(from var(--black) r g b / .88), rgb(from var(--black) r g b / .66) 30%,
    rgb(from var(--black) r g b / .14) 50%, rgb(from var(--black) r g b / .80) 76%, rgb(from var(--black) r g b / .94));
  position: relative; isolation: isolate;
  display: grid; grid-template-rows: auto 1fr auto;
  gap: clamp(10px, 1.3svh, 20px);
  width: 100%;
  aspect-ratio: 1 / 1.618034;
  padding: clamp(22px, 3.6svh, 48px) clamp(20px, 2.15vw, 54px);
  border-inline-end: 1px solid var(--line-l);
  background: var(--mist);
}
.step:last-child .step-sheet { border-inline-end: 0; }
.step-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--scene-shade), url('../assets/process-city-dusk.webp') var(--scene-x, 13%) center / cover no-repeat;
  opacity: 0;
  pointer-events: none;
}
.step-title { font-size: clamp(23px, 2.4vw, 51px); font-weight: 750; letter-spacing: -.045em; line-height: 1.16; }
.step-trigger {
  display: grid;
  justify-items: start;
  gap: 9px;
  padding: 0;
  text-align: start;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.step-trigger:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.step-idx { font: 600 clamp(22px, 2.25vw, 46px)/1 var(--fn); color: var(--accent-text); }
.step-heading .title-en { margin-top: 8px; color: var(--grey); font-size: clamp(10px, .68vw, 13px); letter-spacing: .12em; }
/* 常态展示各步底稿，选中时由城市暮景占据中段。 */
.step-study {
  justify-self: center;
  align-self: center;
  width: min(100%, 335px);
  aspect-ratio: 252 / 86;
  background-color: var(--accent-on-light);
  mask: url('../assets/process-studies.png') center var(--study-y, 0%) / 100% 400% no-repeat;
  pointer-events: none;
}
.step[data-step="1"] { --study-y: 33.333333%; --scene-x: 38%; }
.step[data-step="2"] { --study-y: 66.666667%; --scene-x: 63%; }
.step[data-step="3"] { --study-y: 100%; --scene-x: 87%; }
.step-detail { padding-top: 13px; border-top: 1px solid var(--line-l); }
.step ul { display: grid; gap: 6px; }
.step li { display: flex; align-items: baseline; gap: 8px; font-size: clamp(14px, 1vw, 18px); line-height: 1.6; color: var(--body); }
.step li::before { content: ""; flex: 0 0 6px; height: 1px; background: currentColor; opacity: .65; transform: translateY(-.32em); }
.step-sheet::before { transition: opacity .32s var(--ease); }
.step-study, .step-trigger, .step-idx, .step-heading .title-en, .step li { transition: opacity .22s, color .22s; }
.proc-ready .step.is-active .step-sheet::before { opacity: 1; }
.proc-ready .step.is-active :is(.step-trigger, .step-idx, .title-en, li) { color: var(--light-text); }
.proc-ready .step.is-active .step-study { opacity: 0; }
.proc-ready .step.is-active .step-detail { border-color: rgb(255 255 255 / .3); }
@media (max-width: 1000px) and (prefers-reduced-motion: no-preference) {
  @keyframes process-row-enter {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .proc-ready .step.has-entered :is(.step-heading, .step-detail) {
    animation: process-row-enter .38s var(--ease-out) backwards;
  }
  .proc-ready .step.has-entered .step-detail { animation-delay: .06s; }
}
@media (min-width: 1001px) {
  .step-study { width: min(92%, 27svh, 335px); }
}
@media (min-width: 1001px) and (min-height: 560px) and (prefers-reduced-motion: no-preference) {
  .process.proc-ready { padding: var(--proc-header, 68px) 0 0; overflow: clip; }
  .proc-ready .proc-stage {
    display: flex; flex-direction: column; justify-content: center;
    min-height: calc(100svh - var(--proc-header, 68px));
    padding-block: clamp(12px, 1.6svh, 24px);
  }
  .proc-ready .proc-grid { margin-top: clamp(20px, 3svh, 36px); }
  .proc-pinned .proc-stage { position: sticky; top: var(--proc-pin-top, var(--proc-header, 68px)); }
  .proc-pinned .proc-track::after { content: ""; display: block; height: clamp(500px, 94svh, 1080px); }
  .process.proc-pinned :is(#processTitle, .proc-sub) { transform: none; }
  .text-motion .proc-pinned .proc-stage [data-text-motion] { animation: none; opacity: 1; }
}
@media (min-width: 1001px) and (max-height: 740px) {
  .proc-grid { margin-top: 24px; }
  .step-sheet { padding-block: 15px; gap: 5px; }
  .step-study { width: min(80%, 150px); }
}
/* ============================================================
   PRICING
   ============================================================ */
.pricing {
  position: relative;
  isolation: isolate;
  background: var(--black);
  color: var(--paper);
  --contact-rule: rgb(from var(--light-text) r g b / .36);
}
.collab-banner {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--black);
}
.collab-banner::after {
  --mist-depth: 48%;
  --contact-shade: linear-gradient(0deg, var(--black), rgb(from var(--black) r g b / .92) 13%,
    rgb(from var(--black) r g b / .82) 30%, rgb(from var(--black) r g b / .6) 46%, rgb(from var(--black) r g b / .06) 70%);
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, var(--mist), rgb(from var(--mist) r g b / .96) 12%,
      rgb(from var(--mist) r g b / .81) 28%, rgb(from var(--mist) r g b / .5) 50%,
      rgb(from var(--mist) r g b / .19) 72%, rgb(from var(--mist) r g b / .04) 88%, transparent)
      top / 100% var(--mist-depth) no-repeat,
    var(--contact-shade);
}
.collab-banner img, .collab-banner video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 46%;
}
.collab-layout {
  display: grid;
  max-width: none;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-content: end; align-items: start;
  gap: clamp(40px, 6vw, 96px);
  min-height: clamp(480px, 39vw, 1180px);
  padding: clamp(225px, 23vw, 515px) 0 clamp(46px, 4.5vw, 108px) var(--section-inset);
}
body.ed-on .collab-layout { pointer-events: none; }
body.ed-on .collab-layout > * { pointer-events: auto; }
.collab-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: .12em;
}
.collab-kicker::before { content: ''; width: 26px; height: 2px; background: currentColor; }
.collab-intro h2 {
  margin-block: 12px;
  font-size: clamp(43px, 5vw, 100px);
  line-height: 1.12;
  letter-spacing: -.055em;
}
.collab-intro h2 span { color: var(--accent); }
.collab-intro p, .collab-copy > span, .mail-draft p {
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.7;
  color: var(--body);
  text-wrap: pretty;
}
.collab-intro p, .collab-copy > span { color: var(--dark-copy); }
.collab-options { border-bottom: 1px solid var(--contact-rule); }
.collab-route {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: clamp(20px, 2.1vw, 52px);
  padding-inline: 0 var(--section-inset);
  text-align: start;
  background: transparent;
  color: inherit;
  border: 0;
  border-top: 1px solid var(--contact-rule);
  cursor: pointer;
}
.collab-copy { min-width: 0; }
.collab-copy strong {
  display: block;
  width: fit-content;
  max-width: 88%;
  margin-bottom: 3px;
  font-size: clamp(22px, 1.9vw, 40px);
  line-height: 1.4;
  transform-origin: left bottom;
}
.collab-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: clamp(36px, 3.2vw, 46px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / .62);
  background: var(--route-icon-bg, rgb(from var(--black) r g b / .42));
  color: var(--route-icon-ink, var(--paper));
  font: 22px/1 'Segoe UI Symbol', sans-serif;
  transform-origin: right center;
}
body:not(.ed-on) .collab-route:is(:focus-visible, :active) {
  --route-scale: 1.13;
  --route-icon-bg: var(--accent);
  --route-icon-ink: var(--on-accent);
}
@media (hover: hover) and (pointer: fine) {
  body:not(.ed-on) .collab-route:hover {
    --route-scale: 1.13;
    --route-icon-bg: var(--accent);
    --route-icon-ink: var(--on-accent);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .collab-copy strong, .collab-icon {
    transform: scale(var(--route-scale, 1));
    transition: transform .32s var(--ease-out), background-color .18s, color .18s;
  }
}
.draft-open:is(:hover, :focus-visible) { background: var(--accent); color: var(--on-accent); }
.collab-route:focus-visible, .mail-draft :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mail-draft {
  margin: auto;
  width: min(430px, calc(100% - 32px));
  padding: clamp(22px, 3vw, 34px);
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line-l);
}
.mail-draft::backdrop { background: rgb(from var(--black) r g b / .55); }
.draft-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.draft-head button { padding: 10px 0 10px 10px; font: inherit; color: inherit; border: 0; background: transparent; text-decoration: underline; cursor: pointer; }
.mail-draft h2 { margin: 16px 0 10px; font-size: 26px; }
.draft-recipient, .foot-email { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
.draft-recipient { margin-bottom: 16px; font-size: 15px; }
.copy-email { background: transparent; color: var(--accent-text); border: 0; padding: 8px 0; font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.draft-open { display: inline-flex; align-items: center; min-height: 44px; margin-top: 24px; padding: 8px 18px; background: var(--black); color: var(--paper); border-radius: var(--radius-pill); font-size: 14px; }

@media (max-width: 700px) {
  .collab-banner :is(img, video) { object-position: 57% 50%; }
  .collab-banner::after {
    --mist-depth: 34%;
    --contact-shade: linear-gradient(0deg, var(--black), rgb(from var(--black) r g b / .91) 26%,
      rgb(from var(--black) r g b / .76) 54%, transparent 80%);
  }
  .collab-layout {
    grid-template-columns: 1fr; gap: 24px;
    min-height: 0; padding: clamp(168px, 44vw, 235px) var(--section-inset) 38px;
  }
  .collab-route { padding-inline-end: 0; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  display: flex;
  flex-direction: column;
  background: var(--black);
  color: var(--light-text);
  padding-top: clamp(56px, 7vw, 96px);
  overflow: hidden;
}
.footer > .wrap { max-width: none; padding-inline: var(--section-inset); }
.foot-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  padding-bottom: clamp(40px, 6vw, 84px);
}
.foot-news h2 { font-size: clamp(22px, 2.3vw, 32px); font-weight: 700; letter-spacing: -.025em; }
.foot-news p { margin-top: 12px; font-size: 13.5px; line-height: 1.75; color: var(--dark-muted); max-width: 380px; }
.foot-email { margin-top: 16px; }
.foot-news .foot-email .foot-line { margin: 0; font-size: 16px; }

.foot-cap { font-size: 15px; line-height: 1.3; font-weight: 650; }
.foot-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(4, auto);
  grid-auto-flow: column;
  gap: 11px 20px;
  margin-top: 18px;
}
.foot-cols a { font-size: 13.5px; color: var(--dark-copy); transition: color .3s, transform .3s; display: inline-block; }
.foot-cols a:hover { color: var(--accent-text); transform: translateX(3px); }

.foot-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--dark-copy);
}
.foot-line i { color: var(--accent-text); font-style: normal; font-size: 12px; line-height: 1.5; flex: 0 0 auto; }
.foot-line:hover { color: var(--light-text); }

.foot-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  border-top: 1px solid var(--line-d);
  padding: 16px 0;
  font-size: 9px;
  color: var(--dark-muted);
  letter-spacing: .06em;
}
.foot-bottom > span:last-child { text-align: right; }
.foot-social { display: flex; gap: 18px; }
.foot-social a { font-size: 10px; letter-spacing: .1em; color: var(--dark-copy); transition: color .3s; }
.foot-social a:hover { color: var(--accent-text); }

.foot-giant {
  --word-scale-y: .82;
  container-type: inline-size;
  width: 100%;
  overflow: hidden;
  margin-top: clamp(22px, 2.8vw, 44px);
  text-align: center;
}
.foot-giant-track {
  display: flex;
  align-items: flex-start;
  font-size: 15cqw;
  line-height: .85;
  height: calc(1lh * var(--word-scale-y));
}
.foot-giant span {
  flex: 0 0 100%;
  min-width: 0;
  color: color-mix(in srgb, var(--light-text) 43%, var(--black));
  font-weight: 800;
  transform: scaleY(var(--word-scale-y));
  transform-origin: center top;
  letter-spacing: -.05em;
  white-space: nowrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1240px) {
  :root { --pad: 32px; }
}

@media (max-width: 1160px) {
  .head-specialties { display: none; }
}

@media (max-width: 1000px) {
  :root { --pad: 24px; }
  .nav { display: none; }
  .menu-btn, .mobile-menu { display: flex; }

  .ab-head { gap: 16px; }
  .ab-intro { justify-self: start; max-width: 100%; font-size: 14px; }
  .ab-h { font-size: clamp(52px, 15vw, 92px); }
  .ab-main {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px 12px;
    min-height: 0;
    padding-block: 25px;
  }
  .ab-idx { grid-column: 1; grid-row: 1; }
  .ab-side { grid-column: 2; grid-row: 1; }
  .ab-core { grid-column: 1 / -1; }
  .ab-title { font-size: clamp(25px, 8vw, 52px); }


  .proc-intro { grid-template-columns: minmax(0, 1fr) minmax(210px, 36%); }
  .proc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(even) .step-sheet { border-inline-end: 0; }
  .step:nth-child(n+3) .step-sheet { border-top: 1px solid var(--line-l); }
  .step-study { width: min(72%, 215px); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-news { grid-column: 1 / -1; }
}


@media (max-width: 760px) {
  .proc-intro { grid-template-columns: 1fr; gap: 17px; }
  .proc-head { gap: 12px; }
  .proc-num { font-size: 20px; }
  .proc-grid { margin-top: 20px; }
}

@media (max-width: 600px) {
  .ability > .wrap { padding-inline: clamp(14px, 4vw, 23px); }
  .ab-head { gap: 12px; }
  .ab-h { font-size: clamp(43px, 12.8vw, 72px); }
}

@media (max-width: 900px) and (orientation: portrait) {
  .hero-media[data-viewport-video] > :is(img, video) { object-position: 58% center; }
  .hero-shade {
    background:
      linear-gradient(75deg, rgb(from var(--black) r g b / .918) 12%, rgb(from var(--black) r g b / .522) 37%, transparent 65%),
      linear-gradient(180deg, rgb(from var(--black) r g b / .769), transparent 16% 35%,
        rgb(from var(--black) r g b / .333) 49%, rgb(from var(--black) r g b / .612) 68%, rgb(from var(--black) r g b / .722));
  }
  .hero-inner {
    align-content: center;
    padding-top: clamp(152px, 37svh, 400px);
    padding-bottom: max(7svh, env(safe-area-inset-bottom));
    padding-inline: max(var(--pad), 5.2vw);
  }
  .hero-content { width: min(100%, 32rem); }
  .hero-title { font-size: clamp(30px, 9.8vw, 52px); }
  .hero-intro { margin-top: clamp(16px, 2.5svh, 25px); font-size: clamp(14px, 3.75vw, 16px); line-height: 1.72; }
  .hero-cta { gap: 8px 18px; margin-top: clamp(18px, 3svh, 28px); }
  .hero-action { min-height: 48px; font-size: 13px; gap: 10px; }
  .hero-action-main { padding: 6px 6px 6px 16px; }
  .hero-action-icon { width: 36px; height: 36px; font-size: 19px; }
  .hero-action-alt .hero-action-icon { width: 28px; height: 28px; font-size: 15px; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .hero-inner { padding-block: 70px 24px; }
  .hero-title { font-size: clamp(29px, 7svh, 38px); }
  .hero-intro { margin-top: 12px; line-height: 1.55; }
  .hero-cta { margin-top: 14px; }
}

@media (max-width: 680px) {
  .ab-body-in { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .ab-types { max-width: none; }

  .brand { font-size: 22px; }
  .btn { font-size: 11px; padding: 13px 14px 13px 18px; }

  .process { padding-top: 88px; }




  .foot-grid { grid-template-columns: 1fr; gap: 34px; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  /* 底栏是 grid 不是 flex，写 flex-direction 没用 —— 三栏挤在 390 里会折成一团 */
  .foot-bottom { grid-template-columns: 1fr; gap: 8px; align-items: start; }
  .foot-bottom > span:last-child { text-align: left; }
}

@media (max-width: 599px) {
  .proc-grid { grid-template-columns: 1fr; }
  .step-sheet { aspect-ratio: auto; min-height: clamp(238px, 35svh, 318px); padding: 21px 24px; gap: 10px; border-inline-end: 0; }
  .step + .step .step-sheet { border-top: 1px solid var(--line-l); }
  .step-study { width: min(60%, 196px); }
}

@media (min-width: 1001px) {
  .study-wrap, .collab-layout, .footer > .wrap { max-width: none; padding-inline: var(--chapter-inset); }
  .study-figure figcaption { right: var(--chapter-inset); }
  .collab-route { padding-inline-end: 0; }
}
@media (min-width: 701px) and (max-width: 1000px) {
  .collab-layout { padding-inline: var(--chapter-inset); }
  .collab-route { padding-inline-end: 0; }
}

@media (prefers-reduced-motion: reduce) {
  #process .step-sheet::before, #process :is(.step-study, .step-trigger) { transition: none; }
  #process :is(.step-sheet, .step-idx, .title-en, li), #procRule { transition: none; }
}
