/* ============================================================================
   hero.css — 首页 Hero：七幕背景影像 + 逐屏栏目内容
   ----------------------------------------------------------------------------
   结构:
     .hero                      滚动轨道 (总权重 × 105vh)
       .hero__viewport          sticky 舞台视口 (100vh)
         .hero__stage           视差根容器 (--ptr-x / --ptr-y 由 JS 写入)
           .hero__ch[data-ch=n] 第 n 幕背景媒体层 (GSAP 控制 autoAlpha / scale)
             .hero__ch-media    背景层 (depth 慢)
           .hero__particles     前景粒子 (canvas)
           .hero__scrim         压暗遮罩 (--scrim 强度逐幕变化)
           .hero__flash/shock   第 5→6 幕能量爆发转场
         .hero__copy            内容卡（.hero-card：现场 / 精选 / 分类 / 技能 / 关于 / 联系）
         .hero__title           开场标题组
         .hero__rail            章节刻度导航（默认关闭）
   ========================================================================= */

.hero {
  position: relative;
  --hero-unit: 105vh;
  height: calc(var(--hero-weight, 7) * var(--hero-unit));
  z-index: var(--z-hero);
}

@supports (height: 100dvh) {
  .hero {
    --hero-unit: 105dvh;
  }
}

.hero__viewport {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--c-void);
}

/* ---------------------------------------------------------------- 舞台 */
.hero__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  contain: strict;
}

/* 每一幕 */
.hero__ch {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  backface-visibility: hidden;
}

.hero__ch.is-live {
  will-change: opacity, transform;
}

/* 背景 / 人物层：超出画框 7% 给视差留余量
   位移 = --ptr-x × --depth-bg × 0.1  （--ptr-x 由 JS 写入，最大 30px） */
.hero__ch-media,
.hero__ch-fg {
  position: absolute;
  inset: -7%;
  backface-visibility: hidden;
}

.hero__ch-media {
  transform: translate3d(
    calc(var(--ptr-x, 0px) * var(--depth-bg, 4) * 0.1),
    calc(var(--ptr-y, 0px) * var(--depth-bg, 4) * 0.1),
    0
  );
}

.hero__ch-fg {
  transform: translate3d(
    calc(var(--ptr-x, 0px) * var(--depth-fg, 11) * 0.1),
    calc(var(--ptr-y, 0px) * var(--depth-fg, 11) * 0.1),
    0
  );
}

.hero__ch-media > video,
.hero__ch-media > img,
.hero__ch-fg > video,
.hero__ch-fg > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focal, 50% 50%);
  filter: saturate(1.05) contrast(1.02);
}

/* 图层内图片：视频就绪前承担画面（海报 / 缺失回退） */
.hero__ch-media > img {
  opacity: 0;
  transition: opacity 0.7s var(--e-out);
}

.hero__ch-media > img.is-loaded {
  opacity: 1;
}

.hero__ch-media > video {
  opacity: 0;
  z-index: 1;
  transition: opacity 0.8s var(--e-out);
}

.hero__ch.is-video-ready .hero__ch-media > video {
  opacity: 1;
}

.hero__ch.is-video-ready .hero__ch-media > img {
  opacity: 0;
}

/* 尚未解码完成时先显示 LQIP 微缩图，避免黑屏 */
.hero__ch[data-lqip] {
  background-image: var(--lqip);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 亮部素材的压暗遮罩强度（逐幕由 JS 写入 --hero-scrim）
   跟随所属图层一起淡入淡出，所以亮度过渡是连续的 */
.hero__ch-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
      to top,
      rgba(2, 6, 13, calc(0.92 * var(--hero-scrim, 0.7))) 0%,
      rgba(2, 6, 13, calc(0.42 * var(--hero-scrim, 0.7))) 26%,
      rgba(2, 6, 13, calc(0.06 * var(--hero-scrim, 0.7))) 52%,
      rgba(2, 6, 13, 0) 100%
    ),
    linear-gradient(
      to right,
      rgba(2, 6, 13, calc(0.62 * var(--hero-scrim, 0.7))) 0%,
      rgba(2, 6, 13, 0) 46%
    ),
    linear-gradient(to bottom, rgba(2, 6, 13, 0.62) 0%, rgba(2, 6, 13, 0) 26%);
}

/* ------------------------------------------------- 能量爆发 (第 5→6 幕) */
.hero__flash {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 52%,
    #ffffff 0%,
    #dff6ff 18%,
    rgba(120, 222, 255, 0.9) 38%,
    rgba(0, 168, 216, 0.55) 62%,
    rgba(0, 40, 70, 0) 88%
  );
  mix-blend-mode: screen;
  will-change: opacity, transform;
}

.hero__shock {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 40vmax;
  height: 40vmax;
  margin: -20vmax 0 0 -20vmax;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(200, 244, 255, 0.85);
  box-shadow: 0 0 120px 12px rgba(0, 190, 255, 0.42),
    inset 0 0 90px rgba(180, 240, 255, 0.28);
  will-change: transform, opacity;
}

/* --------------------------------------------------------------- 粒子 */
.hero__particles {
  position: absolute;
  inset: -6%;
  width: 112%;
  height: 112%;
  pointer-events: none;
  opacity: 0.85;
  transform: translate3d(
    calc(var(--ptr-x) * var(--depth, 4) * 0.1),
    calc(var(--ptr-y) * var(--depth, 4) * 0.1),
    0
  );
  --depth: 4;
  will-change: transform;
}

/* ------------------------------------------------------- 内容卡容器 */
.hero__copy {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(84px, 15vh, 168px);
  width: min(620px, 78vw);
  z-index: 3;
  pointer-events: none;
}

/* 文字底部垫一层柔和暗角，保证在亮部素材上依然可读（不是卡片、不是描边） */
.hero__copy::before {
  content: "";
  position: absolute;
  inset: -18% -24% -20% -22%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    62% 68% at 14% 66%,
    rgba(2, 6, 13, 0.7) 0%,
    rgba(2, 6, 13, 0.34) 42%,
    rgba(2, 6, 13, 0) 78%
  );
}

.hero__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  will-change: opacity, transform;
}

/* 内容卡：半透明暗底 + 发丝线（保证列表可读），
   只有「查看 / 跳转」按钮是玻璃 —— 避免玻璃叠玻璃 */
.hero-card {
  pointer-events: auto;
  max-width: min(620px, 88vw);
  padding: clamp(18px, 2vw, 30px) clamp(20px, 2.2vw, 34px);
  border-radius: var(--glass-radius-lg);
  background: linear-gradient(
    150deg,
    rgba(3, 11, 22, 0.58) 0%,
    rgba(3, 11, 22, 0.42) 58%,
    rgba(6, 22, 38, 0.5) 100%
  );
  border: 1px solid rgba(226, 244, 255, 0.13);
  box-shadow: 0 26px 60px -30px rgba(0, 8, 20, 0.85);
}

.hero-card__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.hero-card__eyebrow i {
  width: clamp(26px, 4vw, 56px);
  height: 1px;
  background: var(--line-brand);
}

.hero-card__title {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 2.9vw, 2.6rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--t-1);
}

.hero-card__title em {
  display: inline-block;
  font-style: normal;
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-tag);
  text-transform: uppercase;
  color: var(--t-3);
  margin-left: var(--sp-4);
  vertical-align: middle;
}

.hero-card__note {
  margin-top: var(--sp-3);
  font-size: var(--fs-meta);
  line-height: 1.7;
  color: rgba(226, 238, 250, 0.78);
  max-width: 46ch;
}

/* 统计行：展厅现场 */
.hero-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4) clamp(20px, 3vw, 44px);
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line-2);
}

.hero-card__stat b {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(1.2rem, 1.9vw, 1.7rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--t-1);
}

.hero-card__stat b small {
  font-size: 0.5em;
  margin-left: 2px;
  color: var(--c-brand-lift);
}

.hero-card__stat em {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-tag);
  text-transform: uppercase;
  color: var(--t-3);
}

/* 行列表：案例 / 作品 / 技能 / 信息 */
.hero-card__rows {
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line-2);
  display: flex;
  flex-direction: column;
}

.hero-card__rows li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-5);
  padding-block: 8px;
}

.hero-card__row-name,
.hero-card__rows--links a {
  font-family: var(--f-display);
  font-size: clamp(0.98rem, 1.3vw, 1.2rem);
  letter-spacing: -0.012em;
  color: var(--t-1);
  transition: color var(--d-2) var(--e-out);
}

.hero-card__rows--links a:hover,
.hero-card__row-name:hover {
  color: var(--c-ice);
}

.hero-card__row-meta {
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--t-3);
  text-align: right;
  white-space: nowrap;
}

.hero-card__row-key {
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-tag);
  text-transform: uppercase;
  color: var(--t-4);
}

.hero-card__rows--facts .hero-card__row-name {
  font-family: var(--f-body);
  font-size: var(--fs-meta);
  color: var(--t-2);
}

/* 磁贴行：分类 / 社交 */
.hero-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--sp-5);
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line-1);
  border-radius: var(--glass-radius-pill);
  font-size: var(--fs-meta);
  color: var(--t-2);
  transition: color var(--d-2) var(--e-out),
    border-color var(--d-2) var(--e-out), background-color var(--d-2) var(--e-out);
}

.hero-chip b {
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  font-weight: 400;
  color: var(--t-4);
}

.hero-chip svg {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  fill: none;
}

.hero-chip:hover {
  color: var(--t-1);
  border-color: rgba(226, 244, 255, 0.24);
  background: rgba(255, 255, 255, 0.045);
}

.hero-card__mail {
  font-family: var(--f-display);
  font-size: clamp(1.05rem, 1.6vw, 1.4rem);
  letter-spacing: -0.02em;
  color: var(--t-1);
  transition: color var(--d-2) var(--e-out);
}

.hero-card__mail:hover {
  color: var(--c-ice);
}

.hero-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: var(--sp-5);
}

.hero-card__cta svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  fill: none;
  transition: transform var(--d-2) var(--e-out);
}

.hero-card__cta:hover svg {
  transform: translate3d(3px, -3px, 0);
}

/* ------------------------------------------------------------ 开场标题
   两行英文大标题（蓝色渐变，无底板、无互动），放在画面中偏左（红框位置） */
.hero__title {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  padding-inline: var(--gutter);
  padding-bottom: 13vh; /* 视觉中心落到画面约 43% 高处（红框位置） */
  pointer-events: none;
}

.hero__title-inner {
  position: relative;
  /* 左对齐导航栏品牌区（父容器已含 gutter，这里只补玻璃条内边距） */
  width: min(1120px, 66vw);
  margin-left: var(--nav-pad-x);
  will-change: opacity, transform;
}

.hero__title-mark {
  position: relative;
  font-family: var(--f-display);
  font-size: clamp(3.4rem, 9.8vw, 10.6rem);
  line-height: 0.86;
  letter-spacing: -0.04em;
  font-weight: 600;
  margin-bottom: clamp(18px, 3.2vh, 38px);
}

.hero__title-line {
  display: block;
  /* 纯白无渐变、无阴影，靠字号与留白撑住画面 */
  color: #fff;
}

/* 两行做光学对齐：第一行字距放宽后，右端与第二行 PORTFOLIO 齐平
   （em 值随字号缩放，比例恒定） */
.hero__title-line--a {
  letter-spacing: 0.026em;
}

/* 服务方向：**白色玻璃**卡片，两排 × 四列，宽度与大标题一致（--title-w 由 hero.js 量出）
   玻璃材质来自 glass.css 的 .glass（data-glass 由 glass.js 接管光照 / 倾斜） */
.hero__roles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: var(--title-w, min(100%, 880px));
  max-width: 100%;
  margin-top: clamp(14px, 2.4vh, 26px);
}

.hero__roles li {
  /* 覆写 Glass 系统变量 → 白玻璃 */
  --glass-tint: rgba(255, 255, 255, 0.17);
  --glass-bg: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.32) 0%,
    rgba(255, 255, 255, 0.1) 100%
  );
  --glass-border: rgba(255, 255, 255, 0.48);
  --glass-blur: 16px;
  --glass-shadow: 0 12px 32px -14px rgba(4, 10, 22, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 14px;
  pointer-events: auto; /* 标题层整体 pointer-events:none，这里单独放行给玻璃光照 */
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 1px 12px rgba(4, 12, 24, 0.5);
  white-space: nowrap;
}

.hero__role-ic {
  display: block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: #fff;
  filter: drop-shadow(0 1px 6px rgba(4, 12, 24, 0.45));
}

.hero__role-ic svg {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 560px) {
  .hero__roles {
    gap: 7px;
  }

  .hero__roles li {
    padding: 10px 8px;
    gap: 6px;
  }

  .hero__role-ic {
    width: 16px;
    height: 16px;
  }
}

/* --------------------------------------------------------- 章节刻度轨
   V2.0：升级为漂浮在空间中的玻璃物体。
   · 深度层（--gdepth 小）→ 视差位移小、模糊更大，读起来更远
   · 位移由 --ptr-x / --ptr-y 驱动（JS 写在 .hero__viewport 上） */
.hero__rail {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  z-index: 4;
  --gdepth: 1.3;
  transform: translate3d(
    calc(var(--ptr-x, 0px) * var(--gdepth) * 0.1),
    calc(-50% + var(--ptr-y, 0px) * var(--gdepth) * 0.1),
    0
  );
}

/* 玻璃刻度面板：位于人物后方的深度层 —— 模糊更重、对比更低，
   但仍然能「隐约看到」人物与背景的轮廓 */
.hero__rail-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
  padding: 16px 13px;
  border-radius: var(--glass-radius-lg);
  --glass-blur: 20px;
  --glass-tint: rgba(6, 14, 26, 0.28);
  --glass-bg: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(190, 232, 255, 0.035) 100%
  );
  opacity: 0.94;
}

.hero__rail-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 2px 0;
  opacity: 0.4;
  transition: opacity var(--d-2) var(--e-out);
}

.hero__rail-btn:hover,
.hero__rail-btn.is-active {
  opacity: 1;
}

/* 悬停时显示该幕标题 */
.hero__rail-name {
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  color: var(--t-1);
  white-space: nowrap;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  text-shadow: 0 1px 10px rgba(2, 6, 13, 0.8);
  transition: max-width 0.55s var(--e-out), opacity 0.4s var(--e-out);
}

.hero__rail-btn:hover .hero__rail-name,
.hero__rail-btn.is-active .hero__rail-name {
  max-width: 120px;
  opacity: 1;
}

.hero__rail-num {
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  color: var(--t-2);
  text-shadow: 0 1px 10px rgba(2, 6, 13, 0.75);
}

.hero__rail-tick {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--t-3);
  transition: width var(--d-2) var(--e-out), background var(--d-2) var(--e-out);
}

.hero__rail-btn.is-active .hero__rail-tick {
  width: 44px;
  background: var(--c-brand-lift);
}

.hero__rail-btn.is-passed .hero__rail-tick {
  background: rgba(0, 168, 216, 0.6);
}

/* ---------------------------------------------------------- 滚动提示 */
.hero__cue {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(28px, 5vh, 48px);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--t-3);
  transition: opacity var(--d-2) var(--e-out);
}

.hero__cue-line {
  display: block;
  width: 1px;
  height: 36px;
  background: linear-gradient(
    to bottom,
    var(--line-brand),
    transparent
  );
  position: relative;
  overflow: hidden;
}

.hero__cue-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c-ice);
  animation: cueDrop 2.4s var(--e-in-out) infinite;
}

@keyframes cueDrop {
  0% {
    transform: translateY(-100%);
  }
  60%,
  100% {
    transform: translateY(100%);
  }
}

.hero.is-scrolled .hero__cue {
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   精选作品屏：卡片纸片 → 汇聚成球
   卡片位置全部由 JS 按滚动进度写入 transform（散点 → 球面 → 整球旋转），
   整层淡入淡出；只有卡片可点，层本身不拦截滚动。
   ========================================================================== */
.hero-works {
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  will-change: opacity;
}

.hero-works__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* 3D 舞台：透视 + 汇聚点（卡片在球体坐标系里由 JS 摆放） */
.hero-orb {
  position: absolute;
  inset: 0;
  perspective: 1500px;
  perspective-origin: 50% 50%;
}

.hero-orb__ball {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

/* 卡片：图片铺满卡面（圆角交给 overflow 裁剪），信息条固定在图片下方；
   序号角标在图片左上，hover 时右上浮出箭头 */
.hero-work {
  --orb-w: clamp(112px, 11.6vw, 198px);
  position: absolute;
  left: 0;
  top: 0;
  width: var(--orb-w);
  pointer-events: auto;
  display: block;
  /* 4px 内边距（视觉 ≈ 8px）：作品页卡片的 8px 内边距 / 编辑感留白 */
  padding: 4px;
  overflow: hidden;
  transform-style: flat;
  will-change: transform;
  backface-visibility: visible;
  border-radius: 12px;
  border: 1px solid rgba(226, 244, 255, 0.16);
  background: linear-gradient(
    172deg,
    rgba(23, 43, 70, 0.72) 0%,
    rgba(9, 20, 37, 0.86) 100%
  );
  box-shadow: 0 30px 60px -36px rgba(0, 8, 20, 0.98),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 0.5s var(--e-out), background 0.5s var(--e-out),
    box-shadow 0.5s var(--e-out);
}

/* 卡面尺寸都按「半尺版」写：卡片在整墙姿态下会被 transform 放大
   ≈ 2×（见 measureGallery 的 scale），乘回来正好是作品页卡片的视觉尺寸 */
.hero-work__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(6, 16, 28, 0.55);
}

.hero-work__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--e-out), filter 0.6s var(--e-out);
  /* 略微压暗 + 降饱和：作品封面里有大量白底 PPT 稿，
     不统一色调的话整面卡片墙会花 */
  filter: brightness(0.88) saturate(0.9) contrast(1.02);
}

/* hover 光层（参考作品页卡片）：底部压暗 + 中心柔光 */
.hero-work__media::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(
      to top,
      rgba(2, 6, 13, 0.6) 0%,
      rgba(2, 6, 13, 0) 46%
    ),
    radial-gradient(
      72% 58% at 50% 64%,
      rgb(var(--glass-blue) / 0.22),
      transparent 72%
    );
  transition: opacity 0.5s var(--e-out);
}

.hero-work:hover .hero-work__media::after {
  opacity: 1;
}

/* 序号角标（左上）：玻璃小胶囊 */
.hero-work__idx {
  position: absolute;
  z-index: 1;
  top: 5px;
  left: 5px;
  padding: 3px 7px;
  border-radius: var(--glass-radius-pill);
  border: 1px solid rgba(170, 226, 255, 0.24);
  background: rgba(4, 12, 24, 0.48);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: var(--f-mono);
  font-size: 0.38rem;
  line-height: 1;
  letter-spacing: 0.16em;
  color: rgba(206, 240, 255, 0.84);
  transition: border-color 0.45s var(--e-out), background 0.45s var(--e-out);
}

/* 文字层（参考作品页卡片）：标题 + 箭头 / 摘要 / 信息条 */
.hero-work__body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 6px 6px;
}

.hero-work__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.hero-work__name {
  min-width: 0;
  font-family: var(--f-display);
  font-size: 0.55rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: rgba(232, 242, 252, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.4s var(--e-out);
}

.hero-work__arrow {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 13px;
  height: 13px;
  border: 1px solid var(--line-1);
  border-radius: 50%;
  opacity: 0.55;
  transition: opacity 0.45s var(--e-out), border-color 0.45s var(--e-out),
    transform 0.45s var(--e-out);
}

.hero-work__arrow svg {
  width: 5px;
  height: 5px;
  stroke: var(--t-2);
}

.hero-work__summary {
  font-size: 0.38rem;
  line-height: 1.6;
  color: var(--t-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-work__foot {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
  padding-top: 5px;
  border-top: 1px solid var(--line-2);
  font-family: var(--f-mono);
  font-size: 0.34rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--t-3);
  white-space: nowrap;
  overflow: hidden;
}

.hero-work__cat {
  color: var(--c-brand-lift);
}

.hero-work__dot {
  flex: 0 0 auto;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--t-4);
}

.hero-work__industry {
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-work__meta {
  margin-left: auto;
  color: var(--t-4);
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-work:hover {
  border-color: rgba(206, 236, 255, 0.42);
  background: linear-gradient(
    172deg,
    rgba(32, 58, 92, 0.78) 0%,
    rgba(12, 26, 46, 0.9) 100%
  );
  box-shadow: 0 36px 72px -34px rgba(0, 24, 52, 0.98),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.hero-work:hover .hero-work__media img {
  transform: scale(1.04);
  filter: none;
}

.hero-work:hover .hero-work__name {
  color: var(--t-1);
}

.hero-work:hover .hero-work__arrow {
  opacity: 1;
  border-color: var(--line-brand);
  transform: translate3d(2px, -2px, 0);
}

.hero-work:hover .hero-work__arrow svg {
  stroke: var(--c-ice);
}

.hero-work:hover .hero-work__idx {
  border-color: rgba(196, 236, 255, 0.5);
  background: rgba(8, 22, 40, 0.62);
}

/* 眉标（左上）与底部按钮 */
.hero-works__head {
  position: absolute;
  left: var(--gutter);
  top: calc(var(--nav-h) + clamp(14px, 3vh, 34px));
  pointer-events: none;
}

.hero-works > .hero-card__cta {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(30px, 6vh, 62px);
  margin-top: 0;
}

/* ---------------------------------------------------- 后续内容衔接遮罩 */
.hero__tail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30vh;
  pointer-events: none;
  z-index: 4;
  background: linear-gradient(
    to bottom,
    rgba(2, 6, 13, 0) 0%,
    rgba(2, 6, 13, 0.55) 55%,
    var(--c-void) 100%
  );
}

@media (max-width: 900px) {
  .hero {
    --hero-unit: 88vh;
  }

  @supports (height: 100dvh) {
    .hero {
      --hero-unit: 88dvh;
    }
  }

  .hero__rail {
    display: none;
  }

  .hero__copy {
    width: min(560px, 88vw);
    bottom: clamp(126px, 19vh, 200px);
  }

  .hero-card {
    padding: var(--sp-5) var(--sp-5) var(--sp-6);
  }

  .hero-card__rows li:nth-child(n + 4) {
    display: none;
  }

  .hero__title {
    align-items: flex-end;
    padding-bottom: clamp(150px, 24vh, 240px);
  }

  .hero__title-mark {
    margin-bottom: var(--sp-4);
  }

  .hero__roles {
    display: none;
  }
}

/* ==========================================================================
   展厅案例屏：案例视频编排（参考 ponder.ai 首屏）
   自上而下：标题 + 计量（黄色块）→ 放大的当前案例 + 右侧文字简介 →
   案例条（5 张）→ 科技进度条（竖直光标随滚动左右移动）。
   动画全部由 JS 写 transform / opacity；层不拦截滚动，只有卡片可点。
   ========================================================================== */
.hero-cases {
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hero-cases__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* 渐变蒙版：下方为主（给案例条垫底），顶部轻微压暗给标题 */
.hero-cases__scrim {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(
      to top,
      rgba(3, 8, 16, 0.86) 0%,
      rgba(3, 8, 16, 0.48) 20%,
      rgba(3, 8, 16, 0) 44%
    ),
    linear-gradient(
      to bottom,
      rgba(3, 8, 16, 0.62) 0%,
      rgba(3, 8, 16, 0.26) 16%,
      rgba(3, 8, 16, 0) 32%
    ),
    linear-gradient(
      to left,
      rgba(3, 8, 16, 0.52) 0%,
      rgba(3, 8, 16, 0.22) 16%,
      rgba(3, 8, 16, 0) 40%
    );
}

/* 标题 + 计量（顶部居中） */
.hero-cases__head {
  position: absolute;
  left: 50%;
  top: 9%;
  width: min(900px, 92vw);
  transform: translate(-50%, 0);
  text-align: center;
  will-change: transform, opacity;
}

.hero-cases__head .hero-card__eyebrow {
  justify-content: center;
}

.hero-cases__title {
  font-family: var(--f-display);
  font-size: clamp(1.8rem, 3.6vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--t-1);
}

/* 统计行压成一行（数字 + 标签并排），给视频窗口腾出高度 */
.hero-cases__head .hero-card__stats {
  justify-content: center;
  align-items: baseline;
  gap: clamp(18px, 2.6vw, 44px);
  margin-top: 10px;
  padding-top: 10px;
}

.hero-cases__head .hero-card__stat {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
}

.hero-cases__head .hero-card__stat b {
  font-size: clamp(1.24rem, 1.7vw, 1.6rem);
}

.hero-cases__head .hero-card__stat em {
  margin-top: 0;
  font-size: clamp(0.66rem, 0.72vw, 0.76rem);
}

/* 大卡片底板：兜住「放大的案例 + 右侧简介」（几何由 JS 按内容量出来） */
.cases-panel {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  opacity: 0;
  border-radius: clamp(20px, 2.2vw, 34px);
  border: 1px solid rgba(226, 244, 255, 0.15);
  background: linear-gradient(
    142deg,
    rgba(6, 16, 30, 0.72) 0%,
    rgba(9, 24, 44, 0.5) 48%,
    rgba(20, 48, 84, 0.58) 100%
  );
  backdrop-filter: blur(12px) saturate(1.06);
  -webkit-backdrop-filter: blur(12px) saturate(1.06);
  box-shadow: 0 60px 130px -66px rgba(0, 8, 20, 0.96),
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 0 0 1px rgba(120, 200, 255, 0.04);
  pointer-events: none;
  will-change: opacity, transform;
}

/* 放大的当前案例（视频 / 封面）——宽高由 JS 按可用空间写入（见 measureCases），
   这里只是首帧回退值：视频尽量大，上不压标题、下不碰案例条 */
.cases-display {
  position: absolute;
  left: 41%;
  top: 46%;
  width: clamp(340px, 44vw, 800px);
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
}

.cases-display__frame {
  position: relative;
  /* 19:10 影院感画幅：比 16:9 更宽，同样高度下视频窗口更大气
     （16:9 素材用 cover 裁掉上下各 ~3%） */
  aspect-ratio: 19 / 10;
  overflow: hidden;
  border-radius: var(--glass-radius);
  border: 1px solid rgba(226, 244, 255, 0.2);
  background: rgba(8, 20, 36, 0.5);
  box-shadow: 0 40px 80px -40px rgba(0, 8, 20, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* 渐变描边（科技感边框） */
.cases-display__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(111, 216, 255, 0.7),
    rgba(138, 123, 255, 0.35) 38%,
    rgba(111, 216, 255, 0.05) 62%,
    rgba(74, 224, 208, 0.6)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.cases-display__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: brightness(0.95) saturate(0.95);
}

/* 右侧文字简介（随当前案例切换；位置由 JS 对齐视频中心） */
.cases-intro {
  position: absolute;
  left: 65%;
  top: 46%;
  width: min(32%, 460px);
  min-height: clamp(200px, 30vh, 320px);
  transform: translateY(-50%);
}

.cases-intro__item {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.5vh, 20px);
  opacity: 0;
  will-change: transform, opacity;
}

/* 序号：01 / 05 + 渐隐横线 */
.cases-intro__idx {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: clamp(0.66rem, 0.74vw, 0.78rem);
  letter-spacing: 0.22em;
  color: rgba(143, 230, 255, 0.78);
}

.cases-intro__idx::after {
  content: "";
  width: 48px;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(143, 230, 255, 0.55),
    rgba(143, 230, 255, 0)
  );
}

.cases-intro__name {
  font-family: var(--f-display);
  font-size: clamp(1.55rem, 2.4vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--t-1);
}

.cases-intro__meta {
  font-family: var(--f-mono);
  font-size: clamp(0.76rem, 0.86vw, 0.92rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(186, 212, 236, 0.92);
  text-shadow: 0 1px 14px rgba(3, 8, 16, 0.8);
}

.cases-intro__note {
  font-size: clamp(1.04rem, 1.2vw, 1.34rem);
  line-height: 1.75;
  color: rgba(236, 245, 255, 0.94);
  max-width: 32ch;
  text-shadow: 0 1px 16px rgba(3, 8, 16, 0.85);
}

/* 「查看项目」：做成一眼可点的胶囊按钮（玻璃 + 描边 + 悬停提亮） */
.cases-intro__more {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  align-self: flex-start;
  margin-top: clamp(4px, 1vh, 12px);
  padding: 11px 22px;
  border-radius: var(--glass-radius-pill);
  border: 1px solid rgba(170, 224, 255, 0.72);
  background: linear-gradient(
    120deg,
    rgba(79, 176, 239, 0.44),
    rgba(138, 123, 255, 0.34) 96%
  );
  box-shadow: 0 16px 38px -14px rgba(0, 26, 56, 0.95),
    0 0 22px rgba(110, 200, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--f-mono);
  font-size: clamp(0.72rem, 0.82vw, 0.86rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.35s var(--e-out), border-color 0.35s var(--e-out),
    box-shadow 0.35s var(--e-out), transform 0.35s var(--e-out);
}

/* 箭头：描边 + 光晕，循环往前窜一下又回到起点（动态光效箭头） */
.cases-intro__more svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  overflow: visible;
  animation: moreArrow 2.2s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}

@keyframes moreArrow {
  0% {
    opacity: 0.72;
    transform: translateX(0);
    filter: drop-shadow(0 0 4px rgba(150, 220, 255, 0.45));
  }
  36% {
    opacity: 1;
    transform: translateX(3.5px);
    filter: drop-shadow(0 0 9px rgba(196, 240, 255, 1));
  }
  58% {
    opacity: 0;
    transform: translateX(7px);
  }
  59% {
    opacity: 0;
    transform: translateX(-4px);
  }
  80%,
  100% {
    opacity: 0.72;
    transform: translateX(0);
    filter: drop-shadow(0 0 4px rgba(150, 220, 255, 0.45));
  }
}

.cases-intro__more:hover {
  border-color: rgba(196, 234, 255, 0.85);
  background: linear-gradient(
    120deg,
    rgba(96, 196, 255, 0.42),
    rgba(138, 123, 255, 0.32) 96%
  );
  box-shadow: 0 18px 44px -16px rgba(30, 90, 160, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

/* 案例条（5 张；位置由 JS 按舞台宽度写入 left/top，动画走 transform） */
.case-card {
  position: absolute;
  left: 0;
  top: 0;
  width: 200px;
  transform: translate(-50%, -50%);
  display: block;
  padding: 6px;
  border-radius: calc(var(--glass-radius) - 2px);
  border: 1px solid rgba(226, 244, 255, 0.16);
  background: rgba(8, 20, 36, 0.3);
  box-shadow: 0 24px 48px -30px rgba(0, 8, 20, 0.95);
  pointer-events: auto;
  will-change: transform, opacity;
  transition: border-color 0.45s var(--e-out), background 0.45s var(--e-out);
}

.case-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: calc(var(--glass-radius) - 8px);
  background: rgba(6, 16, 28, 0.55);
}

.case-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.82) saturate(0.85) contrast(1.02);
  transition: filter 0.5s var(--e-out);
}

.case-card__name {
  display: block;
  padding: 8px 2px 1px;
  font-size: var(--fs-micro);
  color: var(--t-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 当前案例：渐变描边亮起 */
.case-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(
    140deg,
    rgba(111, 216, 255, 0.8),
    rgba(138, 123, 255, 0.4) 45%,
    rgba(74, 224, 208, 0.7)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.45s var(--e-out);
  pointer-events: none;
}

.case-card.is-current {
  border-color: rgba(150, 220, 255, 0.5);
  background: rgba(14, 34, 58, 0.44);
}

.case-card.is-current::after {
  opacity: 1;
}

.case-card.is-current .case-card__media img {
  filter: brightness(1) saturate(1);
}

.case-card:hover {
  border-color: rgba(206, 236, 255, 0.45);
  background: rgba(14, 32, 54, 0.4);
}

/* 底部刻度：只保留竖线，每根错峰呼吸（横向进度线已取消） */
.cases-track {
  position: absolute;
  left: 50%;
  bottom: 5.5%;
  width: min(92vw, 1480px);
  height: 26px;
  transform: translateX(-50%);
  opacity: 0;
  will-change: transform, opacity;
}

.cases-track__ruler {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% - 9px);
  height: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 6%,
    #000 94%,
    transparent
  );
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.cases-track__ruler i {
  display: block;
  width: 1px;
  height: 58%;
  border-radius: 1px;
  background: linear-gradient(
    180deg,
    rgba(196, 236, 255, 0.95),
    rgba(111, 216, 255, 0.22)
  );
  filter: drop-shadow(0 0 6px rgba(110, 200, 255, 0.55));
  transform-origin: 50% 100%;
  animation: casesTickBreathe 3s ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * 1ms);
}

.cases-track__ruler i.is-major {
  height: 100%;
}

@keyframes casesTickBreathe {
  0%,
  100% {
    opacity: 0.28;
    transform: scaleY(0.5);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

.cases-track__cursor {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 2px;
  height: 200px;
  transform: translateX(-1px);
  background: linear-gradient(
    180deg,
    rgba(214, 244, 255, 0.98),
    rgba(111, 216, 255, 0.55) 55%,
    rgba(138, 123, 255, 0.3)
  );
  animation: casesCursorGlow 2.8s ease-in-out infinite;
}

.cases-track__cursor i {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 24px;
  border-radius: 5px;
  background: linear-gradient(180deg, #eaf9ff, #7fd0ff 55%, #8a7bff);
  box-shadow: 0 0 18px rgba(140, 215, 255, 0.9),
    0 0 40px rgba(110, 150, 255, 0.45), inset 0 0 6px rgba(255, 255, 255, 0.65);
}

@keyframes casesCursorGlow {
  0%,
  100% {
    box-shadow: 0 0 12px rgba(111, 216, 255, 0.5),
      0 0 26px rgba(90, 140, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(138, 200, 255, 0.85),
      0 0 48px rgba(120, 120, 255, 0.45);
  }
}

/* ==========================================================================
   技能屏：叠牌式分类卡（参考 raulvbrito 的 services deck）
   四张长条卡叠成一摞（z-index 递增），被压住的卡只露出标题条；
   位置 / 尺寸由 JS 按舞台写入，动画全部走 transform / opacity。
   ========================================================================== */
.hero-skills {
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hero-skills__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* 下方渐变蒙版（给叠牌垫底）+ 顶部轻微压暗 */
.hero-skills__scrim {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(
      to top,
      rgba(3, 8, 16, 0.86) 0%,
      rgba(3, 8, 16, 0.46) 26%,
      rgba(3, 8, 16, 0) 52%
    ),
    linear-gradient(to bottom, rgba(3, 8, 16, 0.5) 0%, rgba(3, 8, 16, 0) 22%);
}

.hero-skills__head {
  position: absolute;
  left: var(--gutter);
  top: calc(var(--nav-h) + clamp(14px, 3vh, 34px));
  opacity: 0;
  pointer-events: none;
}

.hero-skills__deck {
  position: absolute;
  inset: 0;
}

/* 整宽分类卡：标题行（标题 / 标签 / 查看全部）+ 四个 16:9 案例 + 底部留白 */
.skill-card {
  --accent: #6fd8ff;
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--sp-4);
  padding: clamp(14px, 1.5vw, 22px) clamp(18px, 2vw, 34px)
    clamp(26px, 4vh, 54px);
  border-radius: var(--glass-radius);
  border: 1px solid rgba(226, 244, 255, 0.16);
  /* 实色：叠牌时下层内容只露标题条，不能透出文字（玻璃感靠描边 + 高光） */
  background: linear-gradient(120deg, #0a1b30, #081624);
  box-shadow: 0 34px 70px -40px rgba(0, 8, 20, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: auto;
  will-change: transform, opacity;
  overflow: hidden;
}

.skill-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.skill-card__title {
  font-family: var(--f-display);
  font-size: clamp(1.3rem, 2vw, 1.9rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--t-1);
  white-space: nowrap;
}

.skill-card__trail {
  margin-left: var(--sp-4);
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t-3);
}

.skill-card__no {
  flex: 0 0 auto;
  font-family: var(--f-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.1em;
  color: var(--accent);
}

.skill-card__end {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 28px);
  flex: 0 0 auto;
}

/* 右上角「查看全部案例」跳转入口 */
.skill-card__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.85;
  transition: opacity var(--d-2) var(--e-out), transform var(--d-2) var(--e-out);
}

.skill-card__more svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
}

.skill-card__more:hover {
  opacity: 1;
  transform: translate3d(2px, -1px, 0);
}

/* 标题下方一排四个 3:4 案例（高度不足时由 JS 写入 --case-h 压缩） */
.skill-card__cases {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 0.7vw, 12px);
  margin-top: var(--sp-4);
}

.skill-card__case {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: calc(var(--glass-radius) - 8px);
  overflow: hidden;
  background: #050b14;
  cursor: zoom-in;
  isolation: isolate;
}

.skill-card__case img {
  display: block;
  width: 100%;
  height: var(--case-h, auto);
  /* 案例图比例 = 长图素材比例（1920×2190，整张展示不裁切）；
     16:9 的封面在这类卡里按「上对齐」裁，保住标题区 */
  aspect-ratio: 1920 / 2190;
  object-fit: cover;
  object-position: center top;
  border-radius: inherit;
  border: 1px solid rgba(226, 244, 255, 0.12);
  background-size: cover;
  background-position: center;
  filter: saturate(0.92);
  transition: transform 0.6s var(--e-out), filter 0.6s var(--e-out);
}

.skill-card__case:hover img,
.skill-card__case:focus-visible img {
  transform: scale(1.035);
  filter: saturate(1);
}

/* 项目名（左下）：常显，底部渐变压暗保证可读性；右侧给「查看大图」留位 */
.skill-card__case-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 14px 36px 8px 9px;
  background: linear-gradient(
    to top,
    rgba(3, 9, 18, 0.88) 0%,
    rgba(3, 9, 18, 0.44) 58%,
    rgba(3, 9, 18, 0) 100%
  );
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  color: rgba(214, 232, 248, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.4s var(--e-out);
}

/* 全息刷新（一）：hover 时卡片内发光（边缘内晕 + 底部往上漫的冷光） */
.skill-card__case::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(
    130% 92% at 50% 108%,
    rgba(143, 230, 255, 0.34) 0%,
    rgba(143, 230, 255, 0.08) 46%,
    rgba(143, 230, 255, 0) 74%
  );
  box-shadow: inset 0 0 30px rgba(126, 212, 255, 0.3),
    inset 0 -14px 30px -16px rgba(176, 238, 255, 0.6);
  transition: opacity 0.5s var(--e-out);
}

/* 名字下方的亮线周期性「刷新」（保留） */
.skill-card__case-name::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 36px;
  bottom: 6px;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(143, 230, 255, 0),
    rgba(143, 230, 255, 0.9) 22%,
    #ffffff 50%,
    rgba(143, 230, 255, 0.9) 78%,
    rgba(143, 230, 255, 0)
  );
  box-shadow: 0 0 10px rgba(143, 230, 255, 0.55);
  opacity: 0;
  transform: scaleX(0.2);
}

.skill-card__case:hover .skill-card__case-name,
.skill-card__case:focus-visible .skill-card__case-name {
  color: #ffffff;
}

.skill-card__case:hover::after,
.skill-card__case:focus-visible::after {
  opacity: 1;
  animation: caseHoloGlow 2.6s ease-in-out infinite;
}

.skill-card__case:hover .skill-card__case-name::after,
.skill-card__case:focus-visible .skill-card__case-name::after {
  animation: caseHoloLine 2.6s cubic-bezier(0.5, 0, 0.25, 1) infinite;
}

/* 内发光：与底线同频呼吸（有频率地循环） */
@keyframes caseHoloGlow {
  0%,
  100% {
    opacity: 0.55;
  }
  45% {
    opacity: 1;
  }
}

@keyframes caseHoloLine {
  0% {
    opacity: 0.2;
    transform: scaleX(0.15);
  }
  34% {
    opacity: 1;
    transform: scaleX(1);
  }
  72% {
    opacity: 0.85;
    transform: scaleX(1);
  }
  100% {
    opacity: 0.2;
    transform: scaleX(0.15);
  }
}

/* 悬停 / 聚焦时右下角出现「查看大图」提示 */
.skill-card__case-zoom {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(4, 12, 24, 0.68);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--c-ice);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.35s var(--e-out), transform 0.35s var(--e-out);
  pointer-events: none;
}

.skill-card__case-zoom svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
}

.skill-card__case:hover .skill-card__case-zoom,
.skill-card__case:focus-visible .skill-card__case-zoom {
  opacity: 1;
  transform: none;
}

/* 标签：标题右侧一排（最右是「查看全部案例」+ 序号） */
.skill-card__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
  margin-left: auto;
  max-width: 56%;
}

.skill-card__tag {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  font-size: var(--fs-micro);
  letter-spacing: 0.04em;
  color: var(--t-2);
  white-space: nowrap;
}

/* 矮屏：收起标签行，卡片收窄后标题行仍保持单行（案例图得以保持 3:4） */
@media (max-height: 860px) {
  .skill-card__tags {
    display: none;
  }
}

@media (max-width: 700px) {
  .hero-skills__head {
    top: calc(var(--nav-h) + 10px);
  }

  .skill-card {
    padding: 12px 16px 20px;
  }

  .skill-card__top {
    flex-wrap: wrap;
  }

  .skill-card__tags {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .skill-card__end {
    gap: 10px;
    margin-left: auto;
  }

  .skill-card__more {
    font-size: 0.6rem;
    letter-spacing: 0.04em;
  }

  .skill-card__tag {
    padding: 3px 8px;
  }

  .hero-cases__head {
    top: 6%;
  }

  .cases-display {
    left: 50%;
    top: 33%;
    width: 84vw;
  }

  .cases-intro {
    left: 50%;
    top: 47%;
    width: 84vw;
    min-height: 0;
    transform: translateX(-50%);
    text-align: center;
  }

  .cases-intro__item {
    align-items: center;
    gap: 9px;
  }

  .cases-intro__more {
    align-self: center;
  }

  .cases-intro__note {
    max-width: 42ch;
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .cases-track {
    bottom: 4%;
  }

  .case-card {
    padding: 5px;
  }

  .case-card__name {
    padding: 6px 1px 0;
    font-size: 0.6rem;
  }

  .hero-work {
    --orb-w: clamp(86px, 25vw, 116px);
  }

  .hero-work__name {
    font-size: 0.62rem;
  }

  .hero-work__summary {
    font-size: 0.42rem;
  }

  .hero-work__industry,
  .hero-work__meta {
    display: none;
  }

  .hero-works__head {
    top: calc(var(--nav-h) + 10px);
  }
}

/* ==========================================================================
   结尾屏：个人简介（左工牌 / 右文字信息 / 底部工作经历时间线）
   由 hero.js 的 buildProfile() 渲染，随滚动进度淡入淡出
   ========================================================================== */
.hero-profile {
  position: absolute;
  inset: 0;
  z-index: 4;
  padding: calc(var(--nav-h) + clamp(16px, 3vh, 34px)) var(--gutter)
    clamp(58px, 11vh, 118px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  will-change: opacity, transform;
}

/* 文字后方柔和暗场（不是卡片、不是描边）：背景是工作台画面，亮部较多 */
.hero-profile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
      64% 70% at 60% 42%,
      rgba(2, 6, 13, 0.88) 0%,
      rgba(2, 6, 13, 0.56) 46%,
      rgba(2, 6, 13, 0) 80%
    ),
    linear-gradient(
      to top,
      rgba(2, 6, 13, 0.84) 0%,
      rgba(2, 6, 13, 0.4) 26%,
      rgba(2, 6, 13, 0) 52%
    );
}

/* 柔边磨砂层：中心清楚、四周化开（蒙版过渡），只在宽屏启用 */
.hero-profile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  backdrop-filter: blur(14px) saturate(0.92);
  -webkit-backdrop-filter: blur(14px) saturate(0.92);
  -webkit-mask-image: radial-gradient(
    74% 80% at 58% 44%,
    #000 0%,
    rgba(0, 0, 0, 0.7) 46%,
    transparent 80%
  );
  mask-image: radial-gradient(
    74% 80% at 58% 44%,
    #000 0%,
    rgba(0, 0, 0, 0.7) 46%,
    transparent 80%
  );
}

.hero-profile__inner {
  height: 100%;
  width: min(100%, calc(var(--shell-max) - var(--gutter) * 2));
  margin-inline: auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(16px, 3vh, 38px);
}

/* 眉标移到右上：给左侧垂下来的挂绳让位 */
.hero-profile__head {
  display: flex;
  justify-content: flex-end;
}

.hero-profile__head .hero-card__eyebrow {
  flex-direction: row-reverse;
  margin-bottom: 0;
}

.hero-profile__body {
  min-height: 0;
  width: min(100%, 1460px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 4vw, 84px);
}

/* ---- 左：互动工牌（挂绳物理 + 鼠标光照；结构复用 05 的 .id-stage / .id-card） */
.hero-profile__badge {
  min-height: 0;
  align-self: stretch; /* 撑满行高：挂绳才有从导航条后垂下来的空间 */
  padding-block: 0;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

/* 挂绳画布（lanyard.js 逐帧绘制，位于工牌下层） */
.hero-profile__badge .lanyard {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-profile__badge .id-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 330px);
  height: auto;
  margin-inline: auto;
  padding: 18px 20px 14px;
  overflow: visible; /* 夹扣 / 挂绳要露在卡片上沿之外 */
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  /* 边框光效：外圈冰蓝 / 蓝紫辉光 + 参考 Vercel Ship 互动工牌的旋转描边 */
  box-shadow: 0 34px 80px -34px rgba(0, 12, 28, 0.9),
    0 0 42px -12px rgba(126, 214, 255, 0.5),
    0 0 120px -26px rgba(130, 140, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.hero-profile__badge.is-dragging .id-card {
  cursor: grabbing;
}

/* 卡片高光层需要自己收圆角（卡片已不再裁剪） */
.hero-profile__badge .id-card::after {
  border-radius: inherit;
}

/* 旋转渐变描边：@property 让角度可动画；不支持时退化为静态光边 */
@property --badge-rim {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.hero-profile__badge .id-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.6px;
  background: conic-gradient(
    from var(--badge-rim),
    rgba(126, 226, 255, 0) 0%,
    rgba(126, 226, 255, 0.95) 10%,
    rgba(111, 157, 255, 0.92) 22%,
    rgba(168, 140, 255, 0.8) 34%,
    rgba(126, 226, 255, 0) 50%,
    rgba(126, 226, 255, 0) 100%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: badge-rim 7s linear infinite;
  opacity: 0.85;
  pointer-events: none;
}

@keyframes badge-rim {
  to {
    --badge-rim: 360deg;
  }
}

.hero-profile__badge.is-near .id-card::before {
  opacity: 1;
}

.hero-profile__badge .id-card__photo {
  flex: 0 0 auto;
  aspect-ratio: 1 / 1.06;
  min-height: 0;
  margin-top: 16px;
}

/* 矮屏（≤ 820 高）：压缩简介文字，避免压到时间线 */
@media (max-height: 820px) {
  .hero-profile__intro {
    gap: 10px;
  }

  .hero-profile__hello {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
  }

  .hero-profile__bio p:last-child {
    display: none;
  }

  .hero-profile__facts {
    gap: 10px clamp(20px, 3vw, 40px);
    margin-top: 0;
    padding-top: 10px;
  }
}

/* 矮屏（≤ 980 高）：工牌拉伸填满可用高度，照片自适应，保证不裁切 */
@media (max-height: 980px) {
  .hero-profile__badge {
    align-self: stretch;
  }

  .hero-profile__badge .id-card {
    width: min(100%, 300px);
    height: 100%;
    padding: 14px 16px 10px;
  }

  .hero-profile__badge .id-card__photo {
    flex: 1 1 auto;
    min-height: 96px;
    aspect-ratio: auto;
    margin-top: 12px;
  }

  .hero-profile__badge .id-card__foot {
    display: none;
  }

  .hero-profile__badge .id-card__name {
    margin-top: 10px;
  }
}

/* ---- 右：简介文字 */
.hero-profile__intro {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(12px, 2vh, 22px);
}

.hero-profile__hello {
  font-family: var(--f-display);
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--t-1);
  text-shadow: 0 2px 28px rgba(2, 6, 13, 0.62);
}

.hero-profile__hello em {
  font-style: normal;
  font-weight: 700;
  color: var(--c-brand-lift);
}

.hero-profile__bio {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 68ch;
}

.hero-profile__bio p {
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.8;
  color: rgba(236, 246, 255, 0.92);
  text-shadow: 0 1px 18px rgba(2, 6, 13, 0.55);
}

.hero-profile__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2vh, 20px) clamp(24px, 4vw, 64px);
  max-width: 760px;
  margin-top: clamp(4px, 1vh, 12px);
  padding-top: clamp(14px, 2vh, 22px);
  border-top: 1px solid var(--line-2);
}

.hero-profile__fact dt {
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-tag);
  text-transform: uppercase;
  color: var(--t-4);
}

.hero-profile__fact dd {
  margin-top: 6px;
  font-size: var(--fs-meta);
  font-weight: 500;
  color: var(--t-1);
}

/* ---- 底：工作经历时间线 */
.hero-profile__timeline {
  min-height: 0;
}

.hero-profile__timeline-head {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: clamp(14px, 2.4vh, 26px);
}

.hero-profile__timeline-head i {
  flex: 1 1 auto;
  height: 1px;
  background: var(--line-2);
}

.hero-profile__rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(20px, 4vw, 64px);
}

.hero-profile__row {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: clamp(14px, 2vh, 22px);
  border-top: 1px solid var(--line-2);
}

.hero-profile__row::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-ice);
  box-shadow: 0 0 14px rgba(143, 230, 255, 0.8);
}

.hero-profile__years {
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  color: var(--c-brand-lift);
}

.hero-profile__org {
  font-family: var(--f-display);
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  letter-spacing: -0.015em;
  color: var(--t-1);
}

.hero-profile__role {
  align-self: flex-start;
  margin-top: 2px;
  padding: 4px 12px;
  border-radius: var(--glass-radius-pill);
  border: 1px solid color-mix(in srgb, var(--c-ice) 42%, transparent);
  background: color-mix(in srgb, var(--c-ice) 10%, transparent);
  font-size: var(--fs-micro);
  color: var(--t-2);
}

.hero-profile__desc {
  font-size: var(--fs-meta);
  line-height: 1.7;
  color: var(--t-3);
  max-width: 52ch;
}

@media (max-width: 900px) {
  .hero-profile {
    padding-top: calc(var(--nav-h) + 12px);
    padding-bottom: 88px;
  }

  .hero-profile::after {
    display: none;
  }

  .hero-profile__inner {
    overflow: hidden;
  }

  .hero-profile__body {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .hero-profile__badge {
    display: none;
  }

  .hero-profile__intro {
    justify-content: flex-start;
  }

  .hero-profile__facts {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .hero-profile__bio p:last-child {
    display: none;
  }

  .hero-profile__rows {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .hero-profile__desc {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-profile__badge .id-card::before {
    animation: none;
  }

  .cases-intro__more svg,
  .skill-card__case:hover::after,
  .skill-card__case:focus-visible::after,
  .skill-card__case:hover .skill-card__case-name::after,
  .skill-card__case:focus-visible .skill-card__case-name::after {
    animation: none;
  }
}

/* ==========================================================================
   大图查看浮层（技能卡案例图点击打开）
   渐变蒙版背景：中心浅、四周深，柔边过渡，压暗的同时保留背景影像
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vh, 44px) var(--gutter);
  opacity: 0;
  transition: opacity 0.34s var(--e-out);
}

.lightbox[hidden] {
  display: none;
}

.lightbox.is-on {
  opacity: 1;
}

.lightbox__mask {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      62% 58% at 50% 46%,
      rgba(4, 10, 20, 0.28) 0%,
      rgba(3, 8, 16, 0.72) 54%,
      rgba(2, 6, 13, 0.94) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(2, 6, 13, 0.62) 0%,
      rgba(2, 6, 13, 0.86) 100%
    );
  backdrop-filter: blur(12px) saturate(0.9);
  -webkit-backdrop-filter: blur(12px) saturate(0.9);
}

.lightbox__figure {
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(12px, 2vh, 20px);
  max-width: min(1120px, 100%);
  transform: translateY(14px) scale(0.985);
  transition: transform 0.5s var(--e-out);
}

.lightbox.is-on .lightbox__figure {
  transform: none;
}

.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: min(80vh, 900px);
  width: auto;
  height: auto;
  border-radius: var(--glass-radius);
  border: 1px solid rgba(226, 244, 255, 0.14);
  box-shadow: 0 40px 120px -40px rgba(0, 8, 20, 0.95),
    0 0 60px -20px rgba(126, 214, 255, 0.28);
  background: #05070c;
}

.lightbox__cap {
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-tag);
  text-transform: uppercase;
  color: var(--t-2);
  text-shadow: 0 2px 20px rgba(2, 6, 13, 0.8);
}

.lightbox__cap[hidden] {
  display: none;
}

.lightbox__close {
  position: absolute;
  top: clamp(14px, 3vh, 28px);
  right: var(--gutter);
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--glass-radius-pill);
  border: 1px solid rgba(226, 244, 255, 0.18);
  background: rgba(6, 14, 26, 0.58);
  backdrop-filter: blur(9px) saturate(1.2);
  -webkit-backdrop-filter: blur(9px) saturate(1.2);
  color: var(--t-1);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.24s var(--e-out), transform 0.24s var(--e-out);
}

.lightbox__close:hover {
  background: rgba(6, 14, 26, 0.8);
  transform: scale(1.05);
}

@media (max-width: 900px) {
  .lightbox__mask {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
