/* ============================================================
   LINXU — motion.css
   preloader / progress / cursor / reveals / project view
   ============================================================ */

/* ---------- 加载幕 ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: var(--black);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px var(--pad) 30px;
  transition: transform .4s cubic-bezier(.65, 0, .24, 1);
  will-change: transform;
}
.preloader.done { transform: translateY(-101%); pointer-events: none; }
.pl-top, .pl-bot { display: flex; justify-content: space-between; font-size: 9px; color: var(--dark-muted); letter-spacing: .12em; }
.pl-mid { flex: 1; display: grid; place-items: center; }
.pl-word { overflow: hidden; }
.pl-word span {
  display: block;
  font-size: clamp(48px, 11vw, 170px);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .95;
  transform: translateY(105%);
  animation: plUp .32s cubic-bezier(.16, 1, .3, 1) forwards;
}
.pl-word i { font-style: normal; color: var(--accent-text); }
@keyframes plUp { to { transform: none; } }
.pl-num { font-variant-numeric: tabular-nums; color: #fff; }

/* ---------- 进度线 ---------- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 130;
  pointer-events: none;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}
body:not(.menu-open):has(> .site-head.is-light) > .progress { --accent: var(--accent-on-light); }

/* ---------- 光标 ---------- */
.cur-dot, .cur-ring { position: fixed; left: 0; top: 0; z-index: 999; pointer-events: none; opacity: 0; }
/* The cursor can be over a different section than the fixed header. */
body:not(.menu-open):has(:where([data-theme="light"], .site-head.is-light, .mail-draft):hover):not(:has(:where(.step.is-active .step-sheet, .collab-banner, .collab-icon, .draft-open, .ed-chip):hover)) > :is(.cur-dot, .cur-ring) {
  --accent: var(--accent-on-light);
  --on-accent: var(--paper);
}
.cur-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  transition: opacity .3s;
}
.cur-ring {
  width: 38px; height: 38px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  transition: width .35s var(--ease-out), height .35s var(--ease-out),
              border-color .3s, background .3s, opacity .3s;
  mix-blend-mode: difference;
}
.cur-ring span {
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: .1em;
  color: #fff;
  opacity: 0;
  transition: opacity .25s;
}
body.cur-on .cur-dot, body.cur-on .cur-ring { opacity: 1; }
body.cur-view .cur-ring {
  width: 86px; height: 86px;
  background: #fff;
  border-color: #fff;
  mix-blend-mode: normal;
}
body.cur-view .cur-ring span { opacity: 1; color: var(--black); }
body.cur-view .cur-dot { opacity: 0; }
body.cur-open .cur-ring {
  width: 74px; height: 74px;
  border-color: var(--accent);
  background: var(--accent);
  mix-blend-mode: normal;
}
body.cur-open .cur-ring span { opacity: 1; color: var(--on-accent); }
body.cur-link .cur-ring { width: 62px; height: 62px; border-color: var(--accent); mix-blend-mode: normal; }

@media (hover: none), (max-width: 900px) {
  .cur-dot, .cur-ring { display: none !important; }
}

/* ---------- 文字入场 ---------- */
:root {
  --text-ease: cubic-bezier(.22, .72, .24, 1);
  --text-lift: 20px;
  --headline-lift: .78em;
  --footer-scroll-duration: 13s;
}
@keyframes text-rise {
  from { opacity: 0; translate: 0 var(--text-lift); }
  to { opacity: 1; translate: none; }
}
@keyframes hero-text-rise {
  from { opacity: 0; translate: 0 var(--text-lift); }
  to { opacity: var(--text-parallax-opacity, 1); translate: none; }
}
@keyframes text-headline {
  from { opacity: 0; translate: 0 var(--headline-lift); clip-path: inset(0 -4% 100%); }
  to { opacity: 1; translate: none; clip-path: inset(0 -4% -16%); }
}
.text-motion body:not(.ed-on) :is(
  [data-text-motion]:not([data-text-motion="group"], .in),
  [data-text-motion="group"]:not(.in) > *,
  .hero-title:not(.in) .hero-title-line > span,
  .hero :is(.hero-cta, .hero-intro):not(.in)
) { opacity: 0; }

[data-text-motion="rise"].in,
[data-text-motion="group"].in > * {
  animation: text-rise .64s var(--text-ease) var(--text-delay, 0s) backwards;
}
[data-text-motion="group"].in > :nth-child(2) { --text-delay: .075s; }
[data-text-motion="group"].in > :nth-child(3) { --text-delay: .15s; }
[data-text-motion="group"].in > :nth-child(n+4) { --text-delay: .22s; }

[data-text-motion="headline"].in,
.hero-title.in .hero-title-line > span,
body:not(.ed-on) [data-profile-entrance="headline"] > [data-ed] {
  animation: text-headline .94s var(--text-ease) var(--text-delay, 0s) backwards;
}
@media screen and (prefers-reduced-motion: no-preference) {
  body:not(.ed-on) [data-profile-entrance="waiting"] { opacity: 0; }
}
[data-profile-entrance="headline"] > [lang="en"] { --text-delay: .26s; }
.hero-title-line:nth-child(2) { --text-delay: .26s; }

.hero .hero-cta.in,
.hero-intro.in:not([data-hero-lines]),
.hero-intro.in:not([data-hero-entered]) > .hero-copy-line {
  animation: hero-text-rise .68s var(--text-ease) var(--text-delay, .28s) backwards;
}
.hero-cta { --text-delay: .06s; }
.hero-intro { --text-delay: .32s; }

.text-motion body [data-text-motion]:has(:focus-visible),
.text-motion body [data-text-motion]:focus-visible,
.text-motion body [data-text-motion="group"]:has(:focus-visible) > *,
.text-motion body .hero .hero-cta:has(:focus-visible) {
  opacity: 1;
  animation: none;
}
body.ed-on :is(
  [data-text-motion], [data-text-motion="group"] > *,
  .hero-title-line > span, .hero-cta, .hero-intro
) { animation: none; }

/* ---------- 随滚动变化的文案层次 ---------- */
@media (prefers-reduced-motion: no-preference) {
  body:not(.ed-on) [data-text-parallax] {
    transform: translate3d(0, var(--text-parallax-y, 0px), 0);
  }
  body:not(.ed-on) .hero [data-text-parallax] {
    opacity: var(--text-parallax-opacity, 1);
    transition: opacity .12s linear;
  }
}

/* ---------- 能力清单：行入场 / 标题逐字 / 抽屉 ----------
   标题逐字由 main.js 用 Web Animations 逐字驱动（blur + 上浮），
   这里只负责"未入场时藏住"，以及行内小元素的错开上浮。 */
.ab-row .ab-idx,
.ab-row .ab-side {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.ab-row.in .ab-idx { opacity: 1; transform: none; transition-delay: .1s; }
.ab-row.in .ab-side { opacity: 1; transform: none; transition-delay: .34s; }

.ab-title .hw { display: inline-block; white-space: nowrap; }
.ab-title .ch {
  display: inline-block;
  opacity: 0;
  will-change: auto;
}
.ab-row.in .ab-title .ch { opacity: 1; }

/* 编辑模式下展开所有抽屉，方便编辑图注和图片。 */
body.ed-on .ab-row .ab-body {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition: none;
}
body.ed-on .ab-title .ch { opacity: 1 !important; filter: none !important; transform: none !important; }

/* ---------- 项目详情视图 ---------- */
.pview {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--black);
  color: var(--light-text);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  clip-path: inset(100% 0 0 0);
  transition: clip-path .9s cubic-bezier(.76, 0, .24, 1), opacity .5s, visibility 0s linear .9s;
}
.pview.open {
  opacity: 1;
  visibility: visible;
  clip-path: inset(0 0 0 0);
  transition-delay: 0s;
}
.pv-close {
  position: fixed;
  top: 22px; right: var(--pad);
  z-index: 4;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: var(--radius-pill);
  color: #fff;
  font-size: 10px;
  font-family: var(--fm);
  letter-spacing: .1em;
  padding: 9px 14px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: center;
  transition: background .3s, color .3s, border-color .3s;
}
.pv-close:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.pv-close i { font-style: normal; }

.pv-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  min-height: 100vh;
}
.pv-media {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(28px, 5vh, 64px) clamp(18px, 3.5vw, 56px);
  background: var(--black);
}
.pv-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 230px;
  overflow: hidden;
  border-radius: var(--radius-media);
  background: var(--black);
}
.pv-stage > :is(img, video) { display: block; width: 100%; max-height: 72svh; object-fit: contain; }
.pv-gallery { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-gallery[hidden] { display: none; }
.pv-gallery button {
  position: relative;
  width: 72px;
  padding: 2px;
  border: 1px solid var(--line-d);
  border-radius: var(--radius-thumb);
  background: var(--black);
  color: var(--light-text);
  cursor: pointer;
}
.pv-gallery button[aria-pressed="true"] { border-color: var(--accent); }
.pv-gallery button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pv-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: calc(var(--radius-thumb) - 3px); }
.pv-gallery button span { position: absolute; bottom: 2px; right: 4px; }
.pv-body {
  padding: clamp(80px, 10vh, 120px) clamp(24px, 4vw, 64px) 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.pv-kicker { font-size: 9px; color: var(--accent-text); letter-spacing: .14em; }
.pv-title { font-size: clamp(28px, 3.2vw, 50px); font-weight: 800; letter-spacing: -.04em; line-height: 1.12; }
.pv-intro > p { font-size: 14px; line-height: 1.8; color: #B2AEA5; max-width: 440px; }
.pv-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  margin-top: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--line-d);
}
.pv-meta dt { font-size: 9px; color: #7C786F; letter-spacing: .1em; margin-bottom: 5px; }
.pv-meta dd { font-size: 13px; margin: 0; color: var(--dark-copy); }
.pv-next { align-self: flex-start; margin-top: 14px; }

.is-portfolio.open :is(.pv-intro, .pv-details) > * {
  animation: text-rise .68s var(--text-ease) var(--text-delay, .19s) backwards;
}
.pview .pv-title { --text-delay: .24s; }
.pview .pv-intro > p { --text-delay: .3s; }
.pview .pv-meta { --text-delay: .35s; }
.pview .pv-next { --text-delay: .4s; }

@media (max-width: 900px) {
  .pv-inner { grid-template-columns: 1fr; }
  .pv-media { padding-top: 74px; }
  .pv-stage { min-height: 160px; }
  .pv-stage > :is(img, video) { max-height: 46svh; }
  .pv-body { padding: 28px var(--pad) 50px; justify-content: flex-start; }
}

/* ---------- 项目案例：照片手风琴 ---------- */
.pview:not(.is-portfolio) {
  --pv-case-top: clamp(68px, 8svh, 112px);
  --pv-case-pad: clamp(18px, 4.2vw, 90px);
  clip-path: none;
  transition: opacity .26s var(--ease-out), visibility 0s linear .26s;
}
.pview.open:not(.is-portfolio) { transition-delay: 0s; }
.pv-case-media[hidden], .pv-case-current[hidden],
.pview:not(.is-portfolio) .pv-media { display: none; }
.pview:not(.is-portfolio) .pv-close {
  top: max(20px, env(safe-area-inset-top));
  right: var(--pv-case-pad);
  min-height: 38px;
  background: rgb(from var(--black) r g b / .94);
  font-size: 12px;
}
.pview:not(.is-portfolio) .pv-close:hover { background: var(--accent); }
.pview:not(.is-portfolio) :is(.pv-close, .pv-next):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.pview:not(.is-portfolio) .pv-inner {
  display: block;
  width: min(100%, 2160px);
  margin-inline: auto;
  padding: var(--pv-case-top) var(--pv-case-pad) max(54px, env(safe-area-inset-bottom));
}
.pview:not(.is-portfolio) .pv-body {
  display: block;
  padding: 0;
}
.pview:not(.is-portfolio) .pv-summary {
  display: grid;
  grid-template-columns: minmax(0, 2.65fr) minmax(240px, 1fr);
  grid-template-rows: minmax(auto, 1fr) minmax(auto, 1fr);
  gap: clamp(16px, 2.7svh, 26px) clamp(25px, 4vw, 82px);
  min-height: calc(100svh - var(--pv-case-top) - 36px);
}
.pview:not(.is-portfolio) .pv-intro {
  grid-area: 1 / 2;
  align-self: end;
  display: grid;
  gap: 12px;
}
.pview:not(.is-portfolio) .pv-summary:has(.pv-case-current[hidden]) .pv-intro {
  grid-row: 1 / 3;
  align-self: center;
}
.pview:not(.is-portfolio) .pv-kicker { color: var(--dark-muted); font-size: 11px; }
.pview:not(.is-portfolio) .pv-title { font-size: clamp(30px, 3vw, 54px); }
.pview:not(.is-portfolio) .pv-title .title-en { font-size: .48em; }
.pview:not(.is-portfolio) .pv-intro > p { color: var(--dark-muted); }
.pview:not(.is-portfolio) .pv-details {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px 48px;
  padding-top: clamp(26px, 4svh, 52px);
  border-top: 1px solid var(--line-d);
}
.pview:not(.is-portfolio) .pv-meta {
  flex: 1 1 480px;
  max-width: 820px;
  margin: 0;
  padding: 0;
  border: 0;
  gap: 12px clamp(18px, 4vw, 56px);
}
.pview:not(.is-portfolio) .pv-meta dt { color: var(--dark-muted); font-size: 11px; }
.pview:not(.is-portfolio) .pv-meta dd { font-size: 14px; line-height: 1.65; }
.pview:not(.is-portfolio) .pv-next { align-self: auto; margin: 0; }

.pv-case-media {
  --pv-case-strip: clamp(68px, 5.8vw, 112px);
  --pv-case-gap: clamp(6px, .65vw, 12px);
  --pv-case-bar: 40px;
  --pv-case-closed-width: calc(var(--pv-case-closed-count) * (var(--pv-case-strip) + var(--pv-case-gap)));
  --pv-case-expanded: calc(100cqw - var(--pv-case-closed-width));
  grid-area: 1 / 1 / 3 / 2;
  align-self: center;
  justify-self: center;
  display: flex;
  gap: var(--pv-case-gap);
  min-width: 0;
  width: 100%;
  max-width: calc(min(68svh, 820px) * 16 / 9 + var(--pv-case-closed-width));
  container-type: inline-size;
}
.pv-case-media:has(.pv-case-figure:nth-child(3)) { --pv-case-strip: clamp(62px, 5.2vw, 100px); }
.pv-case-media.is-single { --pv-case-bar: 0px; }
.pv-case-figure {
  --case-light-radius: clamp(78px, 8vw, 144px);
  position: relative;
  flex: 0 0 var(--pv-case-strip);
  min-width: 0;
  height: calc(var(--pv-case-expanded) * 9 / 16 + var(--pv-case-bar));
  overflow: hidden;
  border-radius: clamp(10px, 1.2vw, 20px);
  background: var(--black);
  transition: flex-grow .52s cubic-bezier(.24, .72, .26, 1);
}
.pv-case-figure.is-active { --case-light-radius: clamp(105px, 11vw, 185px); flex-grow: 12; }
.pv-case-figure::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 1px solid rgb(from var(--light-text) r g b / .24);
  border-radius: inherit;
  pointer-events: none;
  transition: border-color .2s;
}
.pv-case-figure.is-active::before { border-color: rgb(from var(--light-text) r g b / .48); }
.pv-case-figure::after { z-index: 5; }
.pv-case-frame {
  position: absolute;
  inset-block: 0 var(--pv-case-bar);
  left: var(--pv-case-focus, 50%);
  width: var(--pv-case-expanded);
  transform: translateX(calc(-1 * var(--pv-case-focus, 50%)));
}
.pv-case-frame > :is(img, video) {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pv-case-tab {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  align-content: end;
  gap: 3px;
  min-width: 0;
  width: 100%;
  padding: 8px 4px 12px;
  border: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, transparent 52%, rgb(from var(--black) r g b / .90) 93%),
    rgb(from var(--black) r g b / .22);
  color: var(--light-text);
  text-align: center;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.pv-case-tab[aria-pressed="true"] {
  inset-block-start: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--pv-case-bar);
  padding: 0 14px;
  border-radius: 0;
  background: var(--black);
  text-align: left;
}
.pv-case-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.pv-case-tab .mono { font-size: 10px; }
.pv-case-tab-label {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
}
.pv-case-tab[aria-pressed="true"] .mono { color: var(--accent); }
@media (hover: hover) {
  .pv-case-tab:not([aria-pressed="true"]):hover {
    color: var(--accent);
    background-color: rgb(from var(--black) r g b / .12);
  }
}
.pv-case-figure:not(.is-active) .case-badge { visibility: hidden; }
.pv-case-current {
  grid-area: 2 / 2;
  align-self: start;
  padding: 13px 0 0;
  border-top: 1px solid var(--line-d);
}
.pv-case-count { display: block; margin-bottom: 6px; color: var(--accent); font-size: 11px; }
.pv-case-text h3 { font-size: clamp(19px, 1.5vw, 25px); line-height: 1.3; }
.pv-case-text p {
  margin-top: 6px;
  color: var(--dark-muted);
  font-size: 14px;
  line-height: 1.7;
}
.pv-case-copy .pv-case-text { animation: pv-case-copy-in .22s var(--ease-out) both; }
@keyframes pv-case-copy-in {
  from { opacity: 0; translate: 0 4px; }
  to { opacity: 1; translate: none; }
}

@media (max-width: 820px) {
  .pview:not(.is-portfolio) .pv-inner {
    width: min(100%, 720px);
  }
  .pview:not(.is-portfolio) .pv-summary {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 0;
  }
  .pview:not(.is-portfolio) :is(.pv-intro, .pv-case-current) { align-self: stretch; }
  .pview:not(.is-portfolio) .pv-details { margin-top: 30px; }
  .pview:not(.is-portfolio) .pv-meta { grid-template-columns: 1fr; }
  .pv-case-media, .pv-case-media:has(.pv-case-figure:nth-child(3)) { --pv-case-strip: 52px; --pv-case-bar: 36px; }
  .pv-case-tab-label { font-size: 10px; }
}

@media (max-width: 600px) {
  .pv-case-media:has(.pv-case-figure:nth-child(4)) {
    --pv-case-closed-width: 0px;
    display: grid;
    grid-template-columns: repeat(var(--pv-case-closed-count), minmax(0, 1fr));
  }
  .pv-case-media:has(.pv-case-figure:nth-child(4)) .pv-case-figure.is-active {
    grid-area: 1 / 1 / 2 / -1;
  }
  .pv-case-media:has(.pv-case-figure:nth-child(4)) .pv-case-figure:not(.is-active) {
    height: clamp(66px, 21vw, 100px);
  }
  .pv-case-media:has(.pv-case-figure:nth-child(4)) .pv-case-figure:not(.is-active) .pv-case-frame {
    inset: 0;
    width: 100%;
    transform: none;
  }
  .pv-case-media:has(.pv-case-figure:nth-child(4)) .pv-case-figure:not(.is-active) .pv-case-frame > :is(img, video) {
    object-fit: cover;
    object-position: var(--pv-case-focus, 50%) center;
  }
}

/* ---------- 创作实践：封面移入主画面 ---------- */
html:has(.pview.is-portfolio.open) { scrollbar-gutter: stable; background: var(--black); }
.pview.is-portfolio {
  --pv-pad: clamp(16px, 4.6vw, 76px);
  --pv-thumb: clamp(72px, 10vw, 114px);
  --pv-step: calc(var(--pv-thumb) + clamp(10px, 1.4vw, 23px));
  clip-path: none;
  pointer-events: none;
  transition: opacity .26s var(--ease-out), visibility 0s linear .26s;
}
.pview.is-portfolio.open { pointer-events: auto; transition-delay: 0s; }
.pview.is-portfolio.is-returning { opacity: 0; pointer-events: none; }
.is-portfolio .pv-inner {
  display: block;
  max-width: 1700px;
  margin-inline: auto;
  padding: clamp(70px, 8svh, 106px) var(--pv-pad) 0;
}
.is-portfolio .pv-media { padding: 0; gap: 18px; background: transparent; }
.is-portfolio .pv-stage {
  height: min(62svh, 760px);
  min-height: 210px;
  background: var(--black);
}
.is-portfolio .pv-stage > :is(img, video) {
  position: absolute;
  inset: 0;
  height: 100%;
  max-height: none;
}
.is-portfolio .pv-close {
  background: rgb(from var(--black) r g b / .90);
}
.is-portfolio .pv-close:hover { background: var(--accent); }
.is-portfolio .pv-body {
  max-width: 940px;
  margin-inline: auto;
  padding: clamp(25px, 5vw, 64px) 0 clamp(44px, 8svh, 104px);
}
.is-portfolio :is(.pv-summary, .pv-intro, .pv-details) { display: contents; }
.is-portfolio.open :is(.pv-intro, .pv-details) > * { animation-duration: .46s; }
.is-portfolio.open .pv-gallery { animation: pv-rail-in .48s var(--ease-out) .24s both; }
@keyframes pv-rail-in {
  from { opacity: 0; translate: 0 9px; }
  to { opacity: 1; translate: none; }
}
.is-portfolio .pv-gallery:not([hidden]) {
  display: block;
  position: relative;
  height: calc(var(--pv-thumb) * .68 + 24px);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}
.is-portfolio .pv-gallery button {
  position: absolute;
  left: 50%;
  top: 5px;
  width: var(--pv-thumb);
  padding: 2px;
  cursor: grab;
  opacity: var(--pv-thumb-opacity, 1);
  transform: translate3d(calc(-50% + var(--pv-step) * var(--pv-slot, 0) + var(--pv-drag, 0px)), var(--pv-thumb-drop, 0px), 0)
    rotate(var(--pv-thumb-tilt, 0deg)) scale(var(--pv-thumb-scale, 1));
  transition: transform .36s var(--ease-out), opacity .25s, border-color .25s;
}
.is-portfolio .pv-gallery button:hover { opacity: 1; }
.is-portfolio .pv-gallery button img { aspect-ratio: 16 / 10; }
.is-portfolio .pv-gallery button[aria-pressed="true"] { z-index: 1; }
.is-portfolio .pv-gallery.is-dragging button { cursor: grabbing; transition: none; }
.is-portfolio .pv-stage > .pv-media-enter { animation: pv-media-in .26s var(--ease-out) both; }
@keyframes pv-media-in {
  from { opacity: .35; translate: 0 4px; }
  to { opacity: 1; translate: none; }
}
.pv-stage.is-moving > * { visibility: hidden; }
.pv-source-hidden { visibility: hidden; }
.pv-flight {
  position: fixed;
  z-index: 310;
  overflow: hidden;
  pointer-events: none;
  contain: paint;
}
.pv-flight img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
@media (max-width: 900px) {
  .is-portfolio .pv-stage { height: clamp(180px, min(76vw, 52svh), 430px); min-height: 0; }
}

/* ---------- 移动端菜单锁滚动 ---------- */
body.is-locked, body:has(.pview.open) { overflow: hidden; }

/* 离屏复位时跳回起始样式。 */
.ab-row:not(.in) :is(.ab-idx, .ab-side) {
  transition-duration: 0s;
  transition-delay: 0s;
}
body.ed-on :is(.ab-row .ab-idx, .ab-row .ab-side) { opacity: 1; transform: none; }

/* 两组同宽文字接续，离开页脚时停在当前进度。 */
.text-motion body:not(.ed-on) .foot-giant-track {
  animation: footer-scroll var(--footer-scroll-duration) linear infinite paused;
}
.text-motion body:not(.ed-on) .foot-giant.in .foot-giant-track { animation-play-state: running; }
@media (hover: hover) {
  .text-motion body:not(.ed-on) .foot-giant.in:hover .foot-giant-track { animation-play-state: paused; }
}
@keyframes footer-scroll {
  to { transform: translateX(-100%); }
}
@media (max-width: 680px) {
  :root {
    --text-lift: 16px;
    --headline-lift: .65em;
    --footer-scroll-duration: 8s;
  }
}

/* ---------- 减少动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .preloader { display: none; }
  .hero-title.in .hero-title-line > span,
  .hero :is(.hero-cta, .hero-intro).in,
  [data-text-motion].in,
  [data-text-motion="group"].in > *,
  .is-portfolio.open :is(.pv-intro, .pv-details) > *,
  .is-portfolio.open .pv-gallery,
  .is-portfolio .pv-stage > .pv-media-enter { animation: none; }
  .cur-dot, .cur-ring { display: none; }
  .ab-row .ab-idx, .ab-row .ab-side { opacity: 1 !important; transform: none !important; }
  .ab-row .ab-body { transition: none; }
  .ab-title .ch { opacity: 1 !important; filter: none !important; transform: none !important; }
}

/* The accessible, editable heading supplies the layout. Only lifted glyphs
   are painted on this temporary layer, which never receives pointer input. */
::highlight(sam-rising-ink) { color: transparent; text-shadow: none; }
[data-rising-ink] {
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  user-select: none; -webkit-user-select: none; overflow: clip;
}
[data-rising-ink="detail"] { z-index: 301; }
ink-letter { position: absolute; display: block; width: max-content; white-space: pre; line-height: normal; visibility: hidden; }
ink-letter > i { display: block; font: inherit; letter-spacing: inherit; transform-origin: center; }
ink-letter > .ink-side { position: absolute; inset: 0; color: transparent; }
ink-letter > .ink-face { position: relative; }
