/* ============================================================
   周靖雄 · 新媒体运营作品集
   设计基调：暗色 / 克制 / 科技感
   参考：rainzt.cn/analytics（Fuwari 主题）—— 全屏视频壁纸 +
        悬浮胶囊导航 + 玻璃卡片 + hue 驱动配色
   版心：1700px，PC 端优先
   ============================================================ */

/* ---------- 1. 设计令牌 ---------- */
:root {
  /* 换色只需要改这一个数字：250 ≈ 参考站的冷蓝；165 ≈ 薄荷绿；30 ≈ 暖橙 */
  --hue: 250;

  /* 主色（oklch 生成，第一行是给老浏览器的回退值） */
  --accent: #8fa5f7;
  --accent: oklch(0.76 0.14 var(--hue));
  --accent-strong: oklch(0.88 0.09 var(--hue));
  --accent-ink: oklch(0.2 0.05 var(--hue));

  /* 底色与卡片（对应参考站的 page-bg / card-bg-transparent） */
  --bg: oklch(0.16 0.014 var(--hue));
  --bg-deep: oklch(0.12 0.012 var(--hue));
  --card-bg: rgb(23 23 23 / 0.55);
  --card-bg-solid: oklch(0.21 0.015 var(--hue));

  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: oklch(0.93 0.015 var(--hue));
  --dim: rgba(255, 255, 255, 0.62);
  --mute: rgba(255, 255, 255, 0.42);

  --shell: 1700px;
  --gutter: clamp(24px, 3.4vw, 64px);
  --radius: 16px;
  --radius-lg: 24px;
  --blur: 16px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  /* 入场动效用这条：起步快、收尾极慢，看着"丝滑"但不弹 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* 发光卡片的主色相：默认跟站点主色走，
     时间线里每一段实习各改一次（--stage-h），卡片再在它上面做小幅度偏移 */
  --stage-h: var(--hue);

  --font-cn: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei",
    "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono",
    "Cascadia Mono", Consolas, monospace;
}

/* 半透明主色，用来做描边、光晕与渐变（先给回退值，支持 color-mix 的浏览器再覆盖） */
:root {
  --accent-08: rgba(143, 165, 247, 0.08);
  --accent-14: rgba(143, 165, 247, 0.14);
  --accent-24: rgba(143, 165, 247, 0.24);
  --accent-40: rgba(143, 165, 247, 0.4);
  --accent-60: rgba(143, 165, 247, 0.6);
}

/* 两个由 JS 写入的滚动变量：
   --dim    0 → 1：遮罩浮现，视频逐渐压暗
   --reveal 0 → 1：首屏文字浮现（首屏文字默认完全隐藏，滚起来才出来） */
:root {
  --dim: 0;
  --reveal: 0;
}

@supports (color: color-mix(in oklab, red 50%, transparent)) {
  :root {
    --accent-08: color-mix(in oklab, var(--accent) 8%, transparent);
    --accent-14: color-mix(in oklab, var(--accent) 14%, transparent);
    --accent-24: color-mix(in oklab, var(--accent) 24%, transparent);
    --accent-40: color-mix(in oklab, var(--accent) 40%, transparent);
    --accent-60: color-mix(in oklab, var(--accent) 60%, transparent);
  }
}

/* ---------- 2. 基础 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-cn);
  font-size: 18px;
  line-height: 1.65;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 全局颗粒质感 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

::selection {
  background: var(--accent-40);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 3. 布局工具 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main {
  position: relative;
  z-index: 1;
}

.section {
  position: relative;
  padding-block: clamp(96px, 9vw, 152px);
}

/* ---------- 4. 全屏视频背景（对应参考站的 fullscreen 壁纸模式） ---------- */
.site-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(
      120% 90% at 50% 0%,
      color-mix(in oklab, var(--accent) 10%, transparent),
      transparent 60%
    ),
    var(--bg-deep);
}

.site-video,
.site-canvas,
.site-veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.site-video {
  object-fit: cover;
  /* 首屏保持通透，滚动时遮罩会逐层压暗（见 .site-veil） */
  filter: brightness(0.82) saturate(0.9) contrast(1.04);
  transform: scale(1.04);
}

.site-canvas {
  opacity: 0.6;
}

.site-veil {
  /* 左侧加权：内容都靠左，这里是"把字压住"的关键。
     延迟起步 —— 首屏很长一段滚动里视频都保持 100% 干净。 */
  opacity: calc(min(1, max(0, var(--dim) - 0.25) * 1.55));
  background:
    linear-gradient(
      100deg,
      rgba(8, 9, 13, 0.92) 0%,
      rgba(8, 9, 13, 0.72) 38%,
      rgba(8, 9, 13, 0.52) 72%,
      rgba(8, 9, 13, 0.68) 100%
    ),
    linear-gradient(
      180deg,
      rgba(8, 9, 13, 0.74) 0%,
      rgba(8, 9, 13, 0.6) 40%,
      rgba(8, 9, 13, 0.9) 100%
    );
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding-inline: 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease),
    border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), color 0.35s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 6px var(--accent-14), 0 18px 40px -18px var(--accent-60);
}

.btn-outline {
  border-color: var(--line-2);
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}

.btn-outline:hover {
  border-color: var(--accent-60);
  background: var(--accent-08);
  transform: translateY(-2px);
}

.btn-ghost {
  height: 44px;
  padding-inline: 20px;
  font-size: 16px;
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.btn-ghost:hover {
  border-color: var(--accent-60);
  color: var(--accent);
  background: var(--accent-08);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-24);
  flex: none;
}

/* ---------- 6. 顶部导航（参考截图：通栏 + 图标文字 + 圆形图标按钮） ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  /* 整条导航比原来大两号：高度、字号、按钮一起放大 */
  height: 84px;
  background: rgba(11, 12, 16, 0.56);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--line);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

.topbar.is-scrolled {
  background: rgba(9, 10, 14, 0.86);
  border-bottom-color: var(--line-2);
}

.topbar-inner {
  /* 三栏：品牌靠左 ｜ 导航正中 ｜ 按钮靠右（导航要居中排列） */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 26px;
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
  justify-self: start;
}

.topbar-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 13px;
  font-family: var(--font-mono);
  font-size: 15.5px;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-08);
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease);
}

.topbar-brand:hover .topbar-avatar {
  border-color: var(--accent-60);
  background: var(--accent-14);
}

.topbar-name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.3s var(--ease);
}

.topbar-brand:hover .topbar-name {
  color: var(--accent);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  justify-self: center;
}

.topbar-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 19px;
  color: var(--dim);
  white-space: nowrap;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}

.topbar-link svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.topbar-link.is-active {
  color: var(--accent);
  background: var(--accent-14);
}

.topbar-link.is-active::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
  flex: none;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.045);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease),
    background 0.3s var(--ease);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

/* 导航右侧的「联系我」也跟着放大两号 */
.topbar .btn-ghost {
  height: 52px;
  padding-inline: 24px;
  font-size: 18.5px;
  gap: 11px;
}

.topbar .btn-ghost .dot {
  width: 7px;
  height: 7px;
  box-shadow: 0 0 0 5px var(--accent-24);
}

.icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent-60);
  background: var(--accent-08);
}

/* 播放控制按钮：整条导航里唯一常亮的主色按钮，一眼能找到 */
.icon-btn--video {
  color: var(--accent);
  border-color: var(--accent-40);
  background: var(--accent-08);
}

.icon-btn--video:hover {
  background: var(--accent-14);
}

/* 声音已打开时同样点亮主色 */
.icon-btn.is-on {
  color: var(--accent);
  border-color: var(--accent-40);
  background: var(--accent-08);
}

/* ---------- 7. 首屏：视频完全裸露 → 滚动浮现标题 ---------- */
.hero {
  position: relative;
  /* 拉长首屏，给"文字浮现"留出滚动空间；这一屏里 .hero-pin 是吸顶的 */
  height: 170svh;
}

.hero-pin {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100svh;
  padding: 110px var(--gutter) 130px;
  text-align: center;
}

.hero-cover {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* 首屏完全隐藏，向下滚动时才浮现 */
  opacity: var(--reveal);
  transform: translateY(calc((1 - var(--reveal)) * 48px));
}

/* 只在文字背后加一层聚焦暗场，画面其余部分保持通透 */
.hero-cover::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: min(1340px, 96vw);
  height: 230%;
  transform: translate(-50%, -50%);
  background: radial-gradient(58% 46% at 50% 50%, rgba(5, 6, 10, 0.8), transparent 76%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(10, 11, 15, 0.42);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  font-size: 15.5px;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.02em;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 var(--accent-40);
  }
  70% {
    box-shadow: 0 0 0 9px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.hero-title {
  margin-top: 28px;
  /* 两行左对齐（整块仍然居中），这样第二行才能往右错开 */
  text-align: left;
  font-size: clamp(2.8rem, 6.4vw, 7.2rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 600;
  /* drop-shadow 对渐变文字同样生效，比 text-shadow 干净 */
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.75));
}

.hero-title .line {
  display: block;
  /* 滚上来的时候不是干巴巴地淡入：从下往上"擦"出来，两行错开一点 */
  --r: clamp(0, (var(--reveal) - var(--line-delay, 0)) * 1.55, 1);
  clip-path: inset(0 0 calc((1 - var(--r)) * 100%) 0);
  transform: translateY(calc((1 - var(--r)) * 30px));
  will-change: clip-path, transform;
}

.hero-title .line-1 {
  --line-delay: 0.02;
  color: #f4f6f9;
}

.hero-title .line-2 {
  --line-delay: 0.18;
  /* 错开排列：第二行首字落在第一行「科」的下面（缩进一个字） */
  margin-left: 1em;
  /* 原来是整行一条渐变（background-clip: text）。拆成单个字之后，
     整行的渐变穿不过 inline-block 的子元素（字会变透明），所以改成
     "按字算色号"：每个字的颜色由 lib/motion.js 写成 color-mix，
     这一行是兜底纯色，也给不支持 color-mix 的浏览器用。 */
  color: var(--accent-strong);
}

/* 标题逐字：每个字一个 span，进场时从左到右、第一排到第二排依次"擦"出来。
   顺序由 --gi（第几个字）决定，见 lib/motion.js 的拆字逻辑。 */
.hero-title .ch {
  display: inline-block;
  transform-origin: 50% 100%;
}

/* 首屏副标题：紧跟在主标题下面的一句，居中放，比主标题小一档 */
.hero-subtitle {
  margin-top: clamp(18px, 1.6vw, 26px);
  font-size: clamp(17px, 1.25vw, 22px);
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.04em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.72);
}

/* 身份行：名字 · 职位 · 学校专业，挂在副标题下面 */
.hero-sub {
  margin-top: 14px;
  font-size: clamp(16.5px, 1.1vw, 19px);
  color: rgba(255, 255, 255, 0.66);
  letter-spacing: 0.02em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 46px;
  z-index: 2;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.24em;
  color: rgba(255, 255, 255, 0.68);
  /* 首屏先亮着当引导，文字浮现时让位 */
  opacity: calc(1 - var(--reveal) * 1.8);
  transition: color 0.3s var(--ease);
}

.scroll-cue:hover {
  color: var(--accent);
}

.scroll-cue svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: cue-bounce 2.2s var(--ease) infinite;
}

@keyframes cue-bounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  50% {
    transform: translateY(7px);
    opacity: 1;
  }
}

/* ---------- 7.5 右下角浮动控件（滚动进度环 + 回到顶部） ---------- */
.dock {
  position: fixed;
  right: clamp(16px, 1.8vw, 30px);
  bottom: clamp(16px, 1.8vw, 30px);
  z-index: 55;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.dock-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(11, 12, 16, 0.6);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}

.dock-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.dock-ring circle {
  fill: none;
  stroke-width: 2;
}

.dock-ring .ring-bg {
  stroke: rgba(255, 255, 255, 0.14);
}

.dock-ring .ring-fg {
  stroke: var(--accent);
  stroke-linecap: round;
}

.dock-ring span {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--dim);
}

.dock-btn {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--dim);
  background: rgba(11, 12, 16, 0.6);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease),
    background 0.3s var(--ease);
}

.dock-btn:hover {
  color: var(--accent);
  border-color: var(--accent-60);
  background: var(--accent-08);
}

.dock-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 8. 通用区块标题 ---------- */
.sec-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 0 26px;
  margin-bottom: clamp(48px, 4.6vw, 80px);
}

.sec-index {
  padding-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.sec-title {
  font-size: clamp(1.9rem, 3vw, 3.1rem);
  letter-spacing: -0.028em;
}

.sec-sub {
  grid-column: 2;
  margin-top: 16px;
  max-width: 64ch;
  font-size: 17.5px;
  color: var(--dim);
}

/* ---------- 8.5 首屏式大标题（个人经历用，版式照首屏"从科研实证 / 到与用户共鸣"） ---------- */
.sec-head--display {
  display: block;
  /* 大标题删掉之后，这一屏只剩眉标，下面的间距跟着收一点 */
  margin-bottom: clamp(30px, 3vw, 54px);
}

.display-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.display-eyebrow::after {
  content: '';
  flex: 0 1 200px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-60), transparent);
}

.display-eyebrow .sec-index {
  padding-bottom: 0;
}

.display-title {
  margin-top: clamp(16px, 1.6vw, 26px);
  font-size: clamp(2.1rem, 4.4vw, 4.6rem);
  line-height: 1.14;
  letter-spacing: -0.035em;
  font-weight: 600;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.72));
}

.display-title .line {
  display: block;
}

.display-title .line-1 {
  color: #f4f6f9;
}

.display-title .line-2 {
  background: linear-gradient(98deg, #ffffff 2%, var(--accent-strong) 46%, var(--accent) 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sec-head--display .sec-sub {
  grid-column: auto;
  margin-top: clamp(14px, 1.4vw, 22px);
  max-width: 60ch;
  font-size: clamp(17px, 1.05vw, 19px);
}

/* 滚到这一屏时，一行一行"切"出来 */
.sec-head--display .line,
.sec-head--display .sec-sub {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.sec-head--display.is-in .line-1 {
  opacity: 1;
  transform: none;
  transition-delay: 0.08s;
}

.sec-head--display.is-in .line-2 {
  opacity: 1;
  transform: none;
  transition-delay: 0.24s;
}

.sec-head--display.is-in .sec-sub {
  opacity: 1;
  transform: none;
  transition-delay: 0.4s;
}

/* ---------- 9. 个人经历 ---------- */
.about-grid {
  display: grid;
  /* 左栏那张图的基准尺寸：高度跟着视口走（对齐参考图里红框的高度），宽度按原片比例推出来
     （原片 1118 x 1738 = 0.6433），原片一点都不裁；再挂一道"别把右边文字挤没"的宽度保险 */
  --portrait-h: min(clamp(440px, 85svh, 1120px), 62vw);
  --portrait-ratio: 0.6433;
  /* 图片左边缘相对版心再往里推一点：放大之后位置和参考图里那个红框一致 */
  --portrait-shift: clamp(0px, 4.5vw, 130px);
  /* 左栏 = 图片宽度 + 左边这点留白；右栏吃掉剩下的空间 */
  grid-template-columns: calc(var(--portrait-h) * var(--portrait-ratio) + var(--portrait-shift)) minmax(0, 1fr);
  column-gap: clamp(40px, 4.2vw, 120px);
  row-gap: 0;
  /* 文字那一列相对左图垂直居中（右边红框：文字位于框的正中） */
  align-items: center;
}

.portrait-card {
  /* 整块缩到一屏内之后不需要再吸顶了 */
  position: relative;
  top: auto;
  /* 卡片（图 + 名字）跟着图片的宽度走：高度定死了，宽度按原片比例算 */
  width: calc(var(--portrait-h) * var(--portrait-ratio));
  /* 贴着左栏右边站，左边留出来的空档就是上面那个 shift */
  justify-self: end;
}

/* 右边文字块：在整栏里水平 + 竖直居中（竖直由 .about-grid 的 align-items 负责） */
.about-body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-intro {
  width: 100%;
  max-width: 980px;
  margin-inline: auto;
}

.portrait-frame {
  position: relative;
  /* 参考图三：原片整张缩小放进来、一点都不裁；高度按视口限高，宽度由上面的比例算出来 */
  width: 100%;
  height: var(--portrait-h);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  /* 不裁切：整张原片缩放进框内（框的比例就是原片比例，所以正好铺满、不留边） */
  object-fit: contain;
  filter: grayscale(0.3) contrast(1.04);
  transition: filter 0.6s var(--ease);
}

.portrait-card:hover .portrait-frame img {
  /* 悬停只调色调，不再放大——放大就又把画面裁掉了 */
  filter: grayscale(0) contrast(1.06);
}

.corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid var(--accent-60);
  pointer-events: none;
}

.corner-tl {
  top: 12px;
  left: 12px;
  border-right: 0;
  border-bottom: 0;
}

.corner-tr {
  top: 12px;
  right: 12px;
  border-left: 0;
  border-bottom: 0;
}

.corner-bl {
  bottom: 12px;
  left: 12px;
  border-right: 0;
  border-top: 0;
}

.corner-br {
  bottom: 12px;
  right: 12px;
  border-left: 0;
  border-top: 0;
}

.portrait-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}

.portrait-name {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
}

.portrait-name span {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--mute);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--accent-40);
  border-radius: 999px;
  background: var(--accent-08);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent);
  white-space: nowrap;
}

.about-intro .lead {
  /* 图片放大、右栏变窄之后，正文走到栏宽即可（和下面那排信息卡对齐） */
  max-width: 92ch;
  /* 左边图片缩小之后，右边文字整体小两号，两边体量才配得上 */
  font-size: clamp(17px, 1.15vw, 20px);
  line-height: 1.85;
  color: #dfe4ea;
}

/* 参考图的版式：小标签 → 超大名字 → 中文职位 → 正文 */
.about-role {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}

.about-name {
  margin: 0 0 12px;
  font-size: clamp(58px, 6.9vw, 120px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0.02em;
  color: var(--text);
}

.about-role-cn {
  margin: 0 0 26px;
  font-size: clamp(20px, 1.95vw, 31px);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #e7ebf1;
}

.about-intro .muted {
  margin-top: 16px;
  max-width: 92ch;
  font-size: clamp(16.5px, 1.1vw, 19px);
  color: var(--dim);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}

.meta-item {
  padding: 17px 20px;
  background: rgba(20, 21, 26, 0.55);
}

.meta-item dt {
  font-size: 13.5px;
  letter-spacing: 0.08em;
  color: var(--mute);
}

.meta-item dd {
  margin-top: 6px;
  font-size: clamp(16.5px, 1vw, 19px);
  font-weight: 500;
  color: #eef1f5;
}

.contact-rows {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.contact-row {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 15px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease),
    transform 0.35s var(--ease);
}

.contact-row .k {
  font-size: 14.5px;
  color: var(--mute);
}

.contact-row .v {
  font-family: var(--font-mono);
  font-size: 16.5px;
  color: #eef1f5;
  letter-spacing: 0.01em;
}

.contact-row .arrow {
  font-size: 15px;
  color: var(--mute);
  transition: transform 0.35s var(--ease), color 0.35s var(--ease);
}

.contact-row:hover {
  border-color: var(--accent-60);
  background: var(--accent-08);
  transform: translateY(-2px);
}

.contact-row:hover .arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.metric-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}

.metric-board li {
  padding: 26px 22px;
  background: rgba(20, 21, 26, 0.5);
}

.metric-board .num {
  font-size: clamp(1.7rem, 2.3vw, 2.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.metric-board .num em {
  margin-left: 3px;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.44em;
  color: var(--accent-60);
}

.metric-board .cap {
  margin-top: 12px;
  font-size: 15px;
  color: var(--dim);
}

/* 时间线 */
.timeline {
  margin-top: clamp(64px, 6vw, 108px);
}

/*
 * 每段经历 = 一块独立区域：
 * 1) 顶部一条带"实习 01 / 个人项目"标签的分隔线，一眼能看出换阶段了；
 * 2) 整块比背景稍微亮一点点，做成一块"底板"，把这一段的文字和作品框在一起。
 * 底板是用"负外边距 + 等量内边距"撑出来的，内容位置和以前一模一样，不改网格排版。
 */
.tl-item {
  --tl-bleed: clamp(-30px, -2vw, -14px);
  /* 每段实习的"自己的颜色"，默认取站点主色相；下面按第几段各改一次 */
  --stage-h: var(--hue);
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(190px, 250px) 1fr;
  gap: clamp(20px, 2.6vw, 52px);
  margin-inline: var(--tl-bleed);
  padding-block: clamp(30px, 2.8vw, 46px) clamp(36px, 3.4vw, 56px);
  padding-inline: calc(var(--tl-bleed) * -1);
  border-top: 0;
  border-radius: 20px;
  background:
    linear-gradient(
      180deg,
      hsl(var(--glow-h) 78% 62% / 0.07),
      hsl(var(--glow-h) 78% 62% / 0.012) 30%
    ),
    rgba(255, 255, 255, 0.016);
  box-shadow: inset 0 1px 0 hsl(var(--glow-h) 85% 72% / 0.16);
}

.tl-item + .tl-item {
  margin-top: clamp(28px, 2.8vw, 44px);
}

.tl-item:last-child {
  border-bottom: 0;
}

/*
 * 四段经历各一个色相，肉眼一眼能分清换阶段了：
 * 实习 01 天蓝 → 实习 02 紫 → 实习 03 粉 → 个人项目 青。
 * 卡片发光的颜色也跟着这一段走。
 */
.timeline > .tl-item:nth-child(1) {
  --stage-h: 208;
}

.timeline > .tl-item:nth-child(2) {
  --stage-h: 272;
}

.timeline > .tl-item:nth-child(3) {
  --stage-h: 330;
}

.timeline > .tl-item:nth-child(4) {
  --stage-h: 168;
}

/* 阶段分隔行：标签 + 一条渐隐的横线，横跨整块区域 */
.tl-stage {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(16px, 1.5vw, 24px);
}

.tl-stage-tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  border: 1px solid hsl(var(--glow-h) 82% 72% / 0.4);
  border-radius: 999px;
  background: hsl(var(--glow-h) 82% 62% / 0.1);
  color: hsl(var(--glow-h) 88% 76%);
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.tl-stage-tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px hsl(var(--glow-h) 88% 72% / 0.75);
}

.tl-stage-rule {
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(
    90deg,
    hsl(var(--glow-h) 85% 70% / 0.45),
    var(--line) 40%,
    transparent
  );
}

.tl-rail {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.tl-rail::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: -1px;
  width: 1px;
  background: linear-gradient(180deg, var(--line-2), rgba(255, 255, 255, 0.03));
}

.tl-dot {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  /* 轨道上的圆点也跟这一段的主题色走：一眼能看出"现在读的是哪一段" */
  background: hsl(var(--stage-h) 82% 62% / 0.24);
  border: 1px solid hsl(var(--stage-h) 82% 72% / 0.55);
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.tl-item:hover .tl-dot {
  background: hsl(var(--stage-h) 88% 68%);
  border-color: hsl(var(--stage-h) 88% 76%);
  box-shadow: 0 0 0 5px hsl(var(--stage-h) 88% 68% / 0.16);
}

.tl-head {
  padding-top: 2px;
}

.tl-period {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--dim);
}

.tl-place {
  margin-top: 8px;
  font-size: 14.5px;
  letter-spacing: 0.06em;
  color: var(--mute);
}

.tl-title {
  font-size: clamp(1.225rem, 1.35vw, 1.525rem);
  letter-spacing: -0.015em;
}

.tl-company {
  margin-left: 10px;
  font-size: 0.72em;
  font-weight: 400;
  color: var(--dim);
  letter-spacing: 0;
}

.tl-points {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: 92ch;
}

.tl-points li {
  position: relative;
  padding-left: 20px;
  font-size: 17px;
  line-height: 1.8;
  color: rgba(214, 220, 228, 0.86);
}

.tl-points li::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 2px;
  width: 7px;
  height: 1px;
  background: var(--accent-60);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tag-row li {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.tl-item:hover .tag-row li,
.project-card:hover .tag-row li {
  border-color: var(--line-2);
  color: #d8dee6;
}

/* ---------- 10. 精选项目 ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 2.2vw, 40px);
}

.project-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur)) saturate(130%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(130%);
  transition: border-color 0.5s var(--ease), transform 0.5s var(--ease),
    box-shadow 0.5s var(--ease);
}

.project-card:hover {
  border-color: var(--accent-40);
  transform: translateY(-6px);
  box-shadow: 0 40px 80px -50px rgba(0, 0, 0, 0.95);
}

.project-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-deep);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 1s var(--ease), filter 0.6s var(--ease);
}

.project-card:hover .project-media img {
  transform: scale(1.06);
  filter: brightness(1.08);
}

.project-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(9, 10, 14, 0.5) 0%,
    rgba(9, 10, 14, 0.04) 40%,
    rgba(9, 10, 14, 0.82) 100%
  );
  pointer-events: none;
}

.project-index {
  position: absolute;
  top: 16px;
  left: 22px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.62);
}

.project-year {
  position: absolute;
  top: 18px;
  right: 22px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.68);
}

.project-body {
  padding: clamp(24px, 2vw, 34px);
}

.project-title {
  font-size: clamp(1.25rem, 1.6vw, 1.7rem);
  letter-spacing: -0.02em;
}

.project-subtitle {
  margin-top: 8px;
  font-size: 15.5px;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.project-desc {
  margin-top: 16px;
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--dim);
  max-width: 62ch;
}

.project-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.project-metrics li {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 12px;
}

.project-metrics li + li {
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.project-metrics strong {
  font-size: clamp(1.125rem, 1.15vw, 1.345rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f2f5f9;
}

.project-metrics span {
  font-size: 14px;
  color: var(--mute);
}

/* ---------- 11. 个人优势 ---------- */
.strengths {
  padding-bottom: 0;
}

.strength-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 1.6vw, 26px);
}

.strength-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 2.2vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  overflow: hidden;
  transition: border-color 0.45s var(--ease), transform 0.45s var(--ease),
    background 0.45s var(--ease);
}

.strength-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-40);
  background: rgba(23, 23, 23, 0.62);
}

.strength-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-2);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--accent);
  transition: border-color 0.45s var(--ease), background 0.45s var(--ease);
}

.strength-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.strength-card:hover .strength-icon {
  border-color: var(--accent-60);
  background: var(--accent-14);
}

.strength-card h3 {
  margin-top: 24px;
  font-size: 1.285rem;
  letter-spacing: -0.015em;
}

.strength-card > p {
  margin-top: 12px;
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--dim);
}

.strength-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 24px;
}

.strength-list li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: rgba(220, 226, 234, 0.82);
  background: rgba(255, 255, 255, 0.04);
}

.award-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 1.6vw, 26px);
  margin-top: clamp(28px, 2.6vw, 44px);
}

.award {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent-60);
  border-radius: var(--radius);
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}

.award strong {
  font-size: 17.5px;
  font-weight: 600;
}

.award span {
  font-size: 15px;
  color: var(--mute);
}

.marquee {
  position: relative;
  margin-top: clamp(56px, 5vw, 92px);
  padding-block: 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 42s linear infinite;
}

.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  padding-right: 30px;
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--mute);
  white-space: nowrap;
}

.marquee-track i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-60);
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- 12. 联系方式 ---------- */
.contact {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding-top: 140px;
  padding-bottom: 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.contact-glow {
  position: absolute;
  left: 50%;
  bottom: -30%;
  width: 76vw;
  height: 46vw;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-14), transparent 64%);
  filter: blur(100px);
  pointer-events: none;
}

.contact-inner {
  position: relative;
  z-index: 1;
  margin-block: auto;
}

.contact-eyebrow {
  font-family: var(--font-mono);
  font-size: 14.5px;
  letter-spacing: 0.24em;
  color: var(--accent);
}

.contact-title {
  margin-top: 26px;
  font-size: clamp(2.6rem, 6.4vw, 7rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.contact-title span {
  display: block;
}

.contact-title .accent {
  background: linear-gradient(96deg, #ffffff 0%, var(--accent-strong) 42%, var(--accent) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.contact-lead {
  margin-top: 30px;
  max-width: 56ch;
  font-size: clamp(17px, 1.15vw, 19px);
  color: var(--dim);
}

.contact-mail {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  margin-top: 44px;
  padding: 22px 34px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  font-family: var(--font-mono);
  font-size: clamp(15px, 1.5vw, 21px);
  color: #f2f5f9;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease),
    box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}

.contact-mail .arrow {
  color: var(--accent);
  transition: transform 0.4s var(--ease);
}

.contact-mail:hover {
  transform: translateY(-3px);
  border-color: var(--accent-60);
  background: var(--accent-08);
  box-shadow: 0 26px 60px -34px var(--accent-60);
}

.contact-mail:hover .arrow {
  transform: translateX(6px);
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(48px, 4.4vw, 78px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}

.channel-grid a,
.channel-grid .static {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 26px 24px;
  background: rgba(20, 21, 26, 0.5);
  transition: background 0.4s var(--ease);
}

.channel-grid a:hover {
  background: var(--accent-08);
}

.channel-grid .k {
  font-size: 14.5px;
  letter-spacing: 0.08em;
  color: var(--mute);
}

.channel-grid .v {
  font-family: var(--font-mono);
  font-size: 17px;
  color: #eef1f5;
}

.site-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(48px, 4vw, 80px);
  padding-block: 30px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--mute);
}

.foot-note {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.08em;
}

.to-top {
  transition: color 0.3s var(--ease);
}

.to-top:hover {
  color: var(--accent);
}

/* ---------- 13. 入场动效 ---------- */
.reveal {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity 1.05s var(--ease-out), transform 1.05s var(--ease-out);
  transition-delay: var(--d, 0ms);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* 区块标题：从下往上"擦"出来的遮罩式进场，比单纯淡入有分量 */
.sec-head .sec-title,
.contact-title {
  clip-path: inset(0 0 105% 0);
  transition: clip-path 1.05s var(--ease-out), transform 1.05s var(--ease-out);
}

.sec-head.is-in .sec-title,
.contact-title.is-in {
  clip-path: inset(0 0 0 0);
}

/* 标题下的那句说明再晚一拍跟上 */
.sec-head .sec-sub {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s var(--ease-out) 0.2s, transform 0.9s var(--ease-out) 0.2s;
}

.sec-head.is-in .sec-sub {
  opacity: 1;
  transform: none;
}

/* ---------- 14. 响应式（PC 优先，向下兼容） ---------- */
@media (max-width: 1360px) {
  .strength-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .award-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .about-grid {
    --portrait-h: min(clamp(400px, 72svh, 900px), 58vw);
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: clamp(36px, 5vw, 90px);
  }

  .metric-board,
  .channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 0;
  }

  .project-metrics li:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .project-metrics li:nth-child(4) {
    border-left: 1px solid var(--line);
  }
}

@media (max-width: 980px) {
  .topbar-nav {
    display: none;
  }

  .topbar-inner {
    /* 导航收起后只剩两栏，右边的按钮照样贴右 */
    grid-template-columns: 1fr auto;
    gap: 16px;
  }

  .about-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  /* 单栏之后图片不再按视口高度撑，改成按容器宽度等比例排 */
  .about-grid {
    --portrait-h: clamp(320px, 52svh, 560px);
  }

  .portrait-card {
    position: static;
    width: calc(var(--portrait-h) * var(--portrait-ratio));
    max-width: 100%;
    /* 单栏时图片独立成一行，居中放 */
    justify-self: center;
  }

  .portrait-frame {
    height: auto;
    aspect-ratio: 1 / 1.5546; /* 原片 1118 x 1738 */
  }

  .tl-item {
    grid-template-columns: 22px 1fr;
  }

  .tl-head,
  .tl-body {
    grid-column: 2;
  }
}

@media (max-width: 720px) {
  .topbar-name {
    display: none;
  }

  .dock {
    right: 14px;
    bottom: 14px;
  }

  .strength-grid,
  .award-strip,
  .meta-grid,
  .metric-board,
  .channel-grid {
    grid-template-columns: 1fr;
  }

  .site-foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .sec-head--display .line,
  .sec-head--display .sec-sub {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .marquee-track,
  .pulse,
  .scroll-cue svg {
    animation: none;
  }
}

/* ============================================================
   18. 开场加载动画（假加载 2.5s → 点"进入"才真正进站）
   角色图本身当进度条：左边已经"加载出来"的部分慢慢显现，
   未加载到的位置留着极淡的轮廓；加载完成后进度条下面出现「进入」。
   ============================================================ */

/* 加载期间锁死滚动 */
html.is-loading,
body.is-loading {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.intro-loader {
  position: fixed;
  inset: 0;
  z-index: 200; /* 高于导航(60)与右下角控件(55) */
  display: grid;
  place-items: center;
  padding: var(--gutter);
  /* 和角色图自带的深色底几乎同色，加上两团光晕过渡，接缝看不出来 */
  background:
    radial-gradient(115% 82% at 50% 46%, rgba(30, 41, 58, 0.3), transparent 62%),
    radial-gradient(70% 52% at 50% 52%, var(--accent-08), transparent 74%),
    #090e13;
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}

.intro-loader.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: min(1000px, 86vw);
  text-align: center;
  transition: transform 0.6s var(--ease);
}

/* 点「进入」时整体轻轻推近，像镜头穿过加载页 */
.intro-loader.is-leaving .intro-stage {
  transform: scale(1.04);
}

/* 图片本身 = 进度条 */
.intro-strip {
  position: relative;
  width: 100%;
  aspect-ratio: 1185 / 147;
  /* 素材本身已经抠成透明底了，所以空白处＝背景本身，颜色天然一致，也不需要羽化遮罩 */
}

.intro-strip img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
}

/* 还没加载到的部分：只留一层很淡的轮廓，人物是"慢慢浮出来"的 */
.intro-ghost {
  opacity: 0.08;
  filter: grayscale(1) blur(1px);
}

/* 已经加载出来的部分，按进度从左往右切开 */
.intro-fill {
  clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0);
  /* 轻微加一点对比与饱和，让角色看起来更"实"、更清晰 */
  filter: contrast(1.03) saturate(1.05);
}

/* 进度前沿的一道亮光 */
.intro-edge {
  position: absolute;
  top: 5%;
  bottom: 5%;
  left: var(--p, 0%);
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 16px var(--accent-60);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.intro-loader.is-running .intro-edge {
  opacity: 1;
}

.intro-loader.is-ready .intro-edge {
  opacity: 0;
}

.intro-track {
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.intro-track i {
  display: block;
  width: var(--p, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-40), var(--accent));
}

.intro-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--mute);
}

.intro-percent {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* 加载完成后才出现 */
.intro-enter {
  margin-top: 8px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease),
    box-shadow 0.35s var(--ease);
}

.intro-loader.is-ready .intro-enter {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.intro-enter span {
  transition: transform 0.35s var(--ease);
}

.intro-enter:hover span {
  transform: translateX(4px);
}

@media (max-width: 720px) {
  .intro-stage {
    width: 92vw;
    gap: 16px;
  }

  .intro-meta {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-loader,
  .intro-enter,
  .intro-edge {
    transition: none;
  }
}

/* ============================================================
   19. 进站问候 / 阅读音乐卡片
   ============================================================ */

/* ---------- 19.1 右下角提示卡片（欢迎卡 + 提示卡，两张一样大） ---------- */
.toast-stack {
  position: fixed;
  right: 100px; /* 让开右下角那组控件（进度环 + 回到顶部） */
  bottom: 24px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(486px, calc(100vw - 40px));
  pointer-events: none;
}

.site-toast {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 16px;
  /* 图标和文字块整体竖直居中：图标不会看着偏上 */
  align-items: center;
  padding: 19px 48px 20px 18px;
  border-radius: 16px;
  border: 1px solid rgba(130, 175, 255, 0.16);
  background: linear-gradient(180deg, rgba(26, 34, 48, 0.94), rgba(13, 18, 26, 0.96));
  box-shadow:
    0 26px 60px -24px rgba(0, 0, 0, 0.9),
    0 0 40px -12px rgba(111, 158, 240, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  /* 收起时高度与间距都归零 —— 这样上面的卡片能平滑落到它原来的位置 */
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    max-height 0.55s var(--ease),
    margin-top 0.55s var(--ease),
    opacity 0.45s var(--ease),
    transform 0.55s var(--ease),
    visibility 0.55s var(--ease);
}

.site-toast.is-in {
  max-height: 360px;
  min-height: 106px;
  margin-top: 14px;
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.toast-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #ffffff;
}

.toast-icon--welcome {
  background: linear-gradient(155deg, #d8ecff 0%, #8fbaf5 55%, #6f9ef0 100%);
  box-shadow: 0 10px 26px -10px rgba(120, 180, 255, 0.9);
}

.toast-icon--tip {
  background: linear-gradient(155deg, #e4dcff 0%, #a99bf5 58%, #8576f0 100%);
  box-shadow: 0 10px 26px -10px rgba(150, 130, 245, 0.85);
}

.toast-label {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.2em;
  color: #8fbaf5;
}

.toast-title {
  margin: 5px 0 5px;
  font-size: 20.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
}

.toast-sub {
  margin: 0;
  /* 第二行（地区那行）只比标题小一号，之前太小了 */
  font-size: 19px;
  line-height: 1.62;
  color: var(--mute);
}

/* 问候卡里的具体地名：用蓝色挑出来 */
.toast-place {
  color: #8fbaf5;
  font-weight: 600;
}

.toast-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--mute);
  cursor: pointer;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.toast-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

/* ---------- 19.2 阅读音乐卡片（左侧悬挂） ---------- */
.music-card {
  position: fixed;
  left: 24px;
  top: 50%;
  z-index: 70;
  /* 封面和文字都比原来大两号，卡片跟着加宽一点 */
  width: 344px;
  padding: 18px 20px 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 82% 0%, var(--accent-08), transparent 62%),
    linear-gradient(180deg, rgba(20, 25, 34, 0.94), rgba(12, 16, 22, 0.96));
  box-shadow: 0 30px 70px -28px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  /* 平时挂在屏幕外稍微靠下，滑出来 / 沉下去都走这个状态 */
  transform: translate(-118%, calc(-50% + 30px));
  opacity: 0;
  visibility: hidden;
  transition: transform 0.62s var(--ease), opacity 0.5s var(--ease), visibility 0.62s var(--ease);
  pointer-events: none;
}

.music-card.is-in {
  transform: translate(0, -50%);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 挂着一段时间不动 → 向左收纳，只留一个带右箭头的小把手 */
.music-card.is-collapsed {
  transform: translate(calc(-100% + 62px), -50%);
  pointer-events: none;
}

.music-card.is-collapsed .music-head,
.music-card.is-collapsed .music-body,
.music-card.is-collapsed .music-time-row,
.music-card.is-collapsed .music-progress,
.music-card.is-collapsed .music-actions {
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.music-tab {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.3s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.music-card.is-collapsed .music-tab {
  opacity: 1;
  pointer-events: auto;
  box-shadow: 0 0 18px -6px var(--accent-60);
}

.music-tab:hover {
  background: var(--accent-14);
  border-color: var(--accent-60);
}

.music-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
}

.music-head::before {
  content: '';
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-40);
}

.music-head-title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}

/* 收起键：卡片右上角一个左箭头，点它主动把卡片收到左边 */
.music-collapse {
  margin-left: auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--mute);
  cursor: pointer;
  transition: color 0.25s var(--ease), background 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.music-collapse:hover {
  color: var(--accent);
  background: var(--accent-14);
  border-color: var(--accent-60);
}

.music-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.music-cover {
  width: 78px;
  height: 78px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 26px -14px rgba(0, 0, 0, 0.9);
}

.music-info {
  min-width: 0;
}

.music-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-artist {
  margin: 5px 0 0;
  font-size: 16.5px;
  color: var(--mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-time-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
}

.music-time {
  font-family: var(--font-mono);
  font-size: 14.5px;
  color: var(--mute);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.music-vol-icon {
  display: grid;
  place-items: center;
  color: var(--mute);
  flex: none;
}

.music-vol {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  outline: none;
  cursor: pointer;
}

.music-vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-60);
}

.music-vol::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
}

.music-progress {
  position: relative;
  margin-top: 13px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.music-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-40), var(--accent));
}

.music-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.music-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

.music-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.music-btn.is-on {
  color: var(--accent);
}

.music-btn.is-disabled {
  opacity: 0.32;
  cursor: default;
}

.music-btn.is-disabled:hover {
  color: var(--dim);
  background: transparent;
}

.music-play {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 12px 28px -12px var(--accent-60);
}

.music-play:hover {
  background: var(--accent-strong);
  color: var(--accent-ink);
  transform: scale(1.05);
}

@media (max-width: 1180px) {
  .music-card {
    left: 14px;
    width: 296px;
    padding: 15px 16px 13px;
  }

  .music-cover {
    width: 66px;
    height: 66px;
  }
}

@media (max-width: 720px) {
  .toast-stack {
    right: 14px;
    bottom: 150px; /* 手机上放到控件上方，避免挤在一起 */
    width: min(320px, calc(100vw - 28px));
  }

  .site-toast {
    grid-template-columns: 44px 1fr;
    padding: 15px 40px 16px 15px;
  }

  .toast-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .toast-title {
    font-size: 18.5px;
  }

  .toast-sub {
    font-size: 15.5px;
  }

  /* 手机屏幕太窄，音乐卡片就收起来（音乐本身照常放） */
  .music-card {
    display: none;
  }
}

/* ============================================================
   20. 实习产出（作品集网格，参考图四的排版）
   每张卡片从上到下：视频/表格封面 → 标题 → 关键词 + 负责部分
   ============================================================ */

.tl-works {
  /* 作品网格占满整行：左边不再被"时间 + 公司"那两栏占去一大块空白 */
  grid-column: 1 / -1;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px dashed var(--line);
}

/* 独立成区块的作品集（在校期间作品集），不需要那条虚线 */
.tl-works--plain {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.tl-works-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  font-size: 16px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

.tl-works-title::before {
  content: '';
  width: 4px;
  height: 14px;
  border-radius: 2px;
  /* 同理：这一段的主题色（没在时间线里的"在校作品集"沿用站点主色） */
  background: hsl(var(--stage-h) 88% 68%);
  box-shadow: 0 0 12px hsl(var(--stage-h) 88% 68% / 0.45);
}

.tl-works-count {
  color: var(--mute);
  letter-spacing: 0.04em;
}

.work-grid {
  display: grid;
  /* 比原来多排一列（版心 1572px 内正好 5 列），卡片和字都比之前大一档 */
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 28px 22px;
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: 14px;
  transition: transform 0.4s var(--ease);
}

.work-card:hover {
  transform: translateY(-4px);
}

.work-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0b0d12;
}

.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease), filter 0.5s var(--ease);
  filter: saturate(0.94) brightness(0.96);
}

.work-card:hover .work-media img {
  transform: scale(1.04);
  filter: saturate(1) brightness(1);
}

.work-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: #eaf0f8;
  background: rgba(8, 10, 14, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
}

/* 一叠标签：容器只负责定位，每颗小标签各是原来那颗胶囊，从上到下排 */
.work-badge--multi {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.work-badge--multi i {
  padding: 5px 11px;
  border-radius: 999px;
  font-style: normal;
  color: #eaf0f8;
  background: rgba(8, 10, 14, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.work-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.work-card:hover .work-play {
  opacity: 1;
  transform: none;
}

.work-title {
  margin: 0;
  /* 字号放大之后，最长的两条标题一行放不下：允许折成两行（最多两行），
     并给两行的高度兜底，这样同一排卡片的蓝色关键词仍然落在同一条水平线上 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: clamp(1.125rem, 1.06vw, 1.325rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.012em;
  color: var(--text);
  min-height: 2.8em;
}

.work-tags {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.5;
  /* 卡片上的关键词跟着所在板块的主题色，不再一律是站点主色 */
  color: hsl(var(--stage-h) 85% 78%);
}

.work-role {
  margin: 0;
  /* 比标题小一号 */
  font-size: 16.5px;
  line-height: 1.72;
  color: var(--mute);
}

/* 表格类作品的"文档封面"：Excel 图标 + 文档名字 */
.work-file {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 22px;
  text-align: center;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(31, 122, 77, 0.22), transparent 62%),
    linear-gradient(180deg, rgba(18, 24, 30, 0.97), rgba(11, 13, 18, 0.99));
}

.work-file-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.6));
}

.work-file-icon svg {
  width: 100%;
  height: 100%;
}

.work-file-name {
  font-size: 15px;
  line-height: 1.5;
  color: var(--dim);
  word-break: break-word;
}

.work-file-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.32);
}

/* 视频放大播放 */
.work-lightbox {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  padding: 5vh 5vw;
  background: rgba(4, 6, 9, 0.86);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}

.work-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.work-lightbox video {
  max-width: 100%;
  max-height: 84vh;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
}

.work-lightbox-close {
  position: absolute;
  top: 26px;
  right: 30px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.work-lightbox-close:hover {
  border-color: var(--accent-60);
  color: var(--accent);
}

@media (max-width: 720px) {
  .work-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 22px 16px;
  }

  .work-title {
    /* 手机上只用调字号：换行与两行上限沿用上面那套（box + line-clamp） */
    font-size: 19px;
  }

  .work-tags {
    font-size: 15px;
  }

  .work-role {
    font-size: 16px;
  }
}

/* ============================================================
   21. 发光卡片（照着 React Bits 的 BorderGlow 做的免依赖版本）
   鼠标靠近哪条边，那一段描边就亮起来（越靠边越亮），卡片里再叠一层柔光。
   色相取 --glow-h = 所在区块的 --stage-h + 这张卡自己的 --glow-shift：
   四段实习各自一档颜色、组内再按顺序微调，所以一眼能分清在哪个阶段。
   位置 / 方向 / 强度由 lib/border-glow.js 写进
   --glow-x / --glow-y / --glow-angle / --glow-a。
   ============================================================ */
.tl-item,
.work-card,
.work-media,
.strength-card,
.award,
.portrait-frame,
.contact-mail,
.meta-grid,
.channel-grid,
.music-card,
.site-toast,
.project-card {
  /* 光斑圆心（跟着指针）与"离边缘多近" 0 → 1 */
  --glow-x: 50%;
  --glow-y: 50%;
  --glow-a: 0;
  /* 指向指针的光锥角度：决定亮的是哪一段描边（对应文档里的 coneSpread） */
  --glow-angle: 0deg;
  /* 光斑半径 / 描边宽度 */
  --glow-r: 320px;
  --glow-w: 1.6px;
  /* 描边光的三个色标：同一色相下拉开一点，扫过时是一小段彩虹 */
  --glow-c1: hsl(calc(var(--glow-h) + 30) 96% 78%);
  --glow-c2: hsl(var(--glow-h) 94% 72%);
  --glow-c3: hsl(calc(var(--glow-h) - 26) 92% 70%);
  --glow-h: calc(var(--stage-h) + var(--glow-shift, 0));
  position: relative;
  isolation: isolate;
}

.tl-item {
  --glow-r: 520px;
}

.work-media {
  --glow-r: 260px;
}

.contact-mail,
.award,
.meta-grid,
.channel-grid,
.music-card,
.site-toast {
  --glow-r: 240px;
}

/* 亮边：conic 决定"哪一段亮"，radial 决定"多亮"，
   两层叠好再用 mask 抠成一圈 1.6px 的描边 */
.tl-item::before,
.work-media::before,
.strength-card::before,
.award::before,
.portrait-frame::before,
.contact-mail::before,
.meta-grid::before,
.channel-grid::before,
.music-card::before,
.site-toast::before,
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  padding: var(--glow-w);
  background:
    conic-gradient(
      from var(--glow-angle) at var(--glow-x) var(--glow-y),
      transparent 0deg,
      var(--glow-c3) 8deg,
      var(--glow-c2) 19deg,
      var(--glow-c1) 31deg,
      transparent 46deg
    ),
    radial-gradient(
      var(--glow-r) circle at var(--glow-x) var(--glow-y),
      hsl(var(--glow-h) 95% 76% / calc(var(--glow-a) * 0.92)),
      transparent 68%
    );
  -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: var(--glow-a);
  pointer-events: none;
}

/* 柔光：垫在内容下面（-1 层），只染底色，不挡文字 */
.tl-item::after,
.work-card::after,
.strength-card::after,
.award::after,
.contact-mail::after,
.meta-grid::after,
.channel-grid::after,
.music-card::after,
.site-toast::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(
    var(--glow-r) circle at var(--glow-x) var(--glow-y),
    hsl(var(--glow-h) 90% 62% / calc(var(--glow-a) * 0.2)),
    transparent 72%
  );
  pointer-events: none;
}

/* 封面图进场：轻微放大 + 从下往上揭开。
   只动 scale / clip-path，hover 用的 transform 留给原来那套。 */
.work-card .work-media img {
  scale: 1.07;
  clip-path: inset(13% 0 13% 0);
  transition: transform 0.9s var(--ease), filter 0.5s var(--ease),
    scale 1.2s var(--ease-out) var(--d, 0ms), clip-path 1.2s var(--ease-out) var(--d, 0ms);
}

.work-card.is-in .work-media img {
  scale: 1;
  clip-path: inset(0 0 0 0);
}

/* ============================================================
   22. 高级动效（开场 / 大标题 / 卡片错开 / 图片视差）
   目标：动得幅度大、但节奏慢、缓动丝滑；不弹、不抖、不占主线程。
   滚动驱动的那几处尽量交给 CSS（合成的、不走主线程），
   只有"标题一次性进场"这种需要和滚动状态联动的才用 JS（lib/motion.js）。
   ============================================================ */

/* ---------- 22.1 点「进入」之后的整站开场：画面推进 → 导航落下 ---------- */
html.is-entering .site-backdrop {
  animation: stage-push 1.15s var(--ease-out) both;
}

html.is-entering .topbar {
  animation: bar-drop 1s var(--ease-out) 0.18s both;
}

html.is-entering .topbar-brand,
html.is-entering .topbar-nav .topbar-link,
html.is-entering .topbar-actions > * {
  animation: nav-item-in 0.9s var(--ease-out) both;
}

html.is-entering .topbar-brand {
  animation-delay: 0.3s;
}

html.is-entering .topbar-nav .topbar-link:nth-child(1) {
  animation-delay: 0.36s;
}

html.is-entering .topbar-nav .topbar-link:nth-child(2) {
  animation-delay: 0.42s;
}

html.is-entering .topbar-nav .topbar-link:nth-child(3) {
  animation-delay: 0.48s;
}

html.is-entering .topbar-nav .topbar-link:nth-child(4) {
  animation-delay: 0.54s;
}

html.is-entering .topbar-nav .topbar-link:nth-child(5) {
  animation-delay: 0.6s;
}

html.is-entering .topbar-actions > *:nth-child(1) {
  animation-delay: 0.66s;
}

html.is-entering .topbar-actions > *:nth-child(2) {
  animation-delay: 0.72s;
}

html.is-entering .topbar-actions > *:nth-child(3) {
  animation-delay: 0.78s;
}

html.is-entering .scroll-cue {
  animation: nav-item-in 1.1s var(--ease-out) 0.9s both;
}

html.is-entering .dock {
  animation: nav-item-in 1s var(--ease-out) 1s both;
}

@keyframes stage-push {
  from {
    opacity: 0;
    transform: scale(1.09);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bar-drop {
  from {
    opacity: 0;
    transform: translateY(-22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes nav-item-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 22.2 首屏大标题：一次性"遮罩揭开 + 压缩归位" ----------
   和 --reveal 的分工：滚动仍然负责整块浮现（方便来回滚），
   但真正滚到位那一刻，标题按自己的节奏演一遍，比纯跟随滚动有分量得多。 */
.hero-cover.is-title-in .hero-eyebrow {
  animation: hero-badge-in 0.95s var(--ease-out) both;
}

/* 整行先整体压一点、再随着上面的字往上归位（"压缩后归位"的那一半） */
.hero-cover.is-title-in .hero-title .line {
  /* 演出期间不再跟随滚动裁切，逐字的遮罩由每个字自己负责 */
  clip-path: none;
  animation: hero-line-settle 1.15s var(--ease-out) both;
}

.hero-cover.is-title-in .hero-title .line-2 {
  animation-delay: 0.08s;
}

/* 逐字进场：第 1 个字开始，从左到右、第一排到第二排（--gi 是全局第几个字） */
.hero-cover.is-title-in .hero-title .ch {
  will-change: clip-path, transform, opacity;
  animation: hero-char-in 0.82s var(--ease-out) both;
  animation-delay: calc(var(--gi, 0) * 78ms + 60ms);
}

.hero-cover.is-title-in .hero-subtitle {
  animation: hero-fade-in 1.1s var(--ease-out) 1.15s both;
}

.hero-cover.is-title-in .hero-sub {
  animation: hero-fade-in 1.1s var(--ease-out) 1.32s both;
}

/* 每个字：从下沿往上擦出来 + 略压扁再归位 */
@keyframes hero-char-in {
  from {
    opacity: 0;
    clip-path: inset(102% 0 0 0);
    transform: translateY(0.34em) scale(1, 0.9);
  }
  to {
    opacity: 1;
    clip-path: inset(-18% 0 -18% 0);
    transform: none;
  }
}

@keyframes hero-line-settle {
  from {
    transform: translateY(0.1em) scale(1, 0.945);
  }
  to {
    transform: none;
  }
}

@keyframes hero-badge-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-fade-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 标题两行共用一条时间轴：故意把 will-change 限制在演出的那几秒 */
.hero-cover.is-title-in .hero-title .line {
  will-change: clip-path, transform;
}

/* ---------- 22.3 滚动到模块：大标题先大幅进场 ---------- */
.sec-head .sec-index {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-out);
}

.sec-head.is-in .sec-index {
  opacity: 1;
  transform: none;
}

.sec-head .sec-title {
  /* 比原来更大幅度：从下方"擦"上来 + 竖直方向先压扁一点 */
  clip-path: inset(0 0 108% 0);
  transform: translateY(0.24em) scale(1, 0.9);
  transform-origin: 0 100%;
  transition: clip-path 1.2s var(--ease-out) 0.12s, transform 1.2s var(--ease-out) 0.12s;
}

.sec-head.is-in .sec-title {
  clip-path: inset(0 0 0 0);
  transform: none;
}

.contact-title {
  clip-path: inset(0 0 108% 0);
  transform: translateY(0.16em);
  transform-origin: 0 100%;
  transition: clip-path 1.25s var(--ease-out), transform 1.25s var(--ease-out);
}

.contact-title.is-in {
  clip-path: inset(0 0 0 0);
  transform: none;
}

/* 说明句再晚一拍跟上 */
.sec-head .sec-sub {
  transition: opacity 0.95s var(--ease-out) 0.34s, transform 0.95s var(--ease-out) 0.34s;
}

/* ---------- 22.4 图片视差：交给 CSS 滚动驱动，跑在合成线程上 ----------
   用独立的 translate 属性，不和图片自己的 scale / hover transform 抢。 */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .portrait-frame {
      animation-name: parallax-card;
      animation-duration: 1ms;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: view(block);
      animation-range: cover 0% cover 100%;
    }

    .work-card .work-media img {
      animation-name: parallax-cover;
      animation-duration: 1ms;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: view(block);
      animation-range: cover 0% cover 100%;
    }

    @keyframes parallax-card {
      from {
        translate: 0 22px;
      }
      to {
        translate: 0 -22px;
      }
    }

    @keyframes parallax-cover {
      from {
        translate: 0 -2.4%;
      }
      to {
        translate: 0 2.4%;
      }
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title .line {
    clip-path: none;
    transform: none;
  }

  .sec-head .sec-title,
  .contact-title {
    clip-path: none;
    transform: none;
  }

  .sec-head .sec-index,
  .sec-head .sec-sub {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .work-card .work-media img {
    scale: 1;
    clip-path: none;
    translate: none;
    transition: transform 0.9s var(--ease), filter 0.5s var(--ease);
  }

  html.is-entering .site-backdrop,
  html.is-entering .topbar,
  html.is-entering .topbar-brand,
  html.is-entering .topbar-nav .topbar-link,
  html.is-entering .topbar-actions > *,
  html.is-entering .scroll-cue,
  html.is-entering .dock,
  .hero-cover.is-title-in .hero-eyebrow,
  .hero-cover.is-title-in .hero-title .line,
  .hero-cover.is-title-in .hero-title .ch,
  .hero-cover.is-title-in .hero-subtitle,
  .hero-cover.is-title-in .hero-sub {
    animation: none;
  }
}
