/* ════════════════════════════════════════════════════════════
   SHUAIXIAO® — PORTFOLIO 2026
   暗色编辑风 / 大字排版 / 发丝网格 / 噪点 / 生成式音乐互动
   ════════════════════════════════════════════════════════════ */

:root {
  --ink: #0b0b0c;
  --ink-2: #121214;
  --ink-3: #1a1a1d;
  --bone: #edeae2;
  --bone-dim: #b8b4a9;
  --mute: #76746c;
  --line: rgba(237, 234, 226, 0.14);
  --acid: #c8f542;
  --f-display: "Archivo", "Noto Sans SC", sans-serif;
  --f-serif: "Instrument Serif", "Noto Sans SC", serif;
  --f-mono: "Space Mono", "Noto Sans SC", monospace;
  --pad: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f-display);
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
}
body.no-cursor, body.no-cursor * { cursor: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { background: none; border: none; color: inherit; font: inherit; cursor: none; }
.mono { font-family: var(--f-mono); letter-spacing: 0.04em; }
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; }

::selection { background: var(--acid); color: var(--ink); }

/* ── 背景层 ─────────────────────────────────────────────── */
#field {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
/* 磨砂玻璃光斑：纯黑底上缓慢漂移的冷白磨砂团 */
.frost {
  position: fixed; inset: 0; z-index: 1;
  overflow: hidden; pointer-events: none;
}
.frost i {
  position: absolute; border-radius: 50%;
  filter: blur(130px);
}
.frost .f1 {
  width: 58vw; height: 58vw; left: -16vw; top: -22vh;
  background: radial-gradient(circle at 42% 42%, rgba(237, 234, 226, 0.055), transparent 62%);
  animation: frost1 44s ease-in-out infinite alternate;
}
.frost .f2 {
  width: 52vw; height: 52vw; right: -18vw; bottom: -26vh;
  background: radial-gradient(circle at 58% 55%, rgba(237, 234, 226, 0.045), transparent 62%);
  animation: frost2 56s ease-in-out infinite alternate;
}
@keyframes frost1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(10vw, 9vh) scale(1.15); } }
@keyframes frost2 { from { transform: translate(0, 0) scale(1.12); } to { transform: translate(-9vw, -8vh) scale(0.95); } }
.noise {
  position: fixed; inset: -50%; z-index: 2;
  pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.6s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}
main, .footer { position: relative; z-index: 3; }

/* ── 预加载屏 ───────────────────────────────────────────── */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: transform 1s var(--ease);
}
.preloader.done { transform: translateY(-101%); }
.pre-center { text-align: center; }
.pre-mark {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900; letter-spacing: -0.02em;
}
.pre-mark sup { color: var(--acid); font-size: 0.4em; }
.pre-sub { margin-top: 10px; font-size: 11px; color: var(--mute); }
.pre-line {
  width: min(420px, 70vw); height: 1px;
  background: var(--line); margin: 34px auto 14px;
}
.pre-line span { display: block; height: 100%; width: 0%; background: var(--acid); }
.pre-count { font-size: 12px; color: var(--bone-dim); }
.pre-corner {
  position: absolute; bottom: 26px; left: var(--pad);
  font-size: 10px; color: var(--mute);
}

/* ── 自定义光标 ─────────────────────────────────────────── */
/* 经典版：酸绿小圆点贴手 + 细描边圆环延迟跟随 */
.cursor-dot {
  position: fixed; z-index: 300; top: 0; left: 0;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--acid);
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  position: fixed; z-index: 299; top: 0; left: 0;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(237, 234, 226, 0.5);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: border-color 0.35s;
}
/* 悬停可交互元素时圆环描边变酸绿 */
.cursor-ring.hover { border-color: var(--acid); }
/* 游荡小圆点：在画面中自由飘动，但始终被拉回到鼠标附近 */
.cursor-pet {
  position: fixed; z-index: 298; top: 0; left: 0;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--acid);
  opacity: 0.75;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
@media (hover: none) { .cursor-dot, .cursor-ring, .cursor-pet { display: none; } }

/* ── 顶栏 ───────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad);
  border: 1px solid transparent; border-radius: 999px;
  transition: top 0.55s var(--ease), left 0.55s var(--ease), right 0.55s var(--ease),
              padding 0.55s var(--ease), background 0.55s, border-color 0.55s,
              box-shadow 0.55s, backdrop-filter 0.55s;
}
/* 滚动后：收缩为顶部居中的磨砂悬浮胶囊 */
.topbar.tb-float {
  top: 14px;
  left: max(16px, calc(50% - 540px));
  right: max(16px, calc(50% - 540px));
  padding: 10px 26px;
  gap: clamp(14px, 2.5vw, 32px);
  border-color: var(--line);
  background: rgba(18, 18, 20, 0.55);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5);
}
.topbar.tb-float > * { white-space: nowrap; }
.topbar.tb-float .topnav a { white-space: nowrap; }
/* 胶囊内三列等宽网格：左右空白等距，中间导航绝对居中 */
.topbar.tb-float {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.topbar.tb-float .brand { justify-self: start; }
.topbar.tb-float .topnav { justify-self: center; }
.topbar.tb-float .top-right { justify-self: end; }
/* 胶囊模式下内层导航不再自带边框与底（融入整体磨砂框） */
.topbar.tb-float .topnav {
  border-color: transparent; background: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  padding: 4px 0;
}
.brand { font-weight: 900; font-size: 18px; letter-spacing: -0.02em; display: inline-flex; align-items: baseline; gap: 8px; mix-blend-mode: difference; white-space: nowrap; }
.brand sup { font-size: 0.5em; }
.brand-cn { font-size: 11px; font-weight: 500; letter-spacing: 0.3em; color: var(--bone-dim); white-space: nowrap; }
.topnav {
  display: flex; gap: clamp(14px, 3vw, 40px); font-size: 11px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 20px;
  background: rgba(11, 11, 12, 0.35);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.topnav > * { mix-blend-mode: difference; }
/* 导航：默认中文，悬停切换为英文；英文界面始终纯英文 */
.topnav .n-en { display: none; }
.topnav a:hover .n-cn { display: none; }
.topnav a:hover .n-en { display: inline; }
body.lang-en .topnav .n-cn { display: none; }
body.lang-en .topnav .n-en { display: inline; }
.topnav a { position: relative; padding: 4px 0; color: var(--bone-dim); transition: color 0.3s; }
.topnav a:hover { color: var(--bone); }
.topnav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--bone);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.topnav a:hover::after { transform: scaleX(1); transform-origin: left; }
.top-right { display: flex; align-items: center; gap: 18px; }
.clock { font-size: 11px; color: var(--mute); mix-blend-mode: difference; }
.lang-btn {
  font-size: 11px; color: var(--bone);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; min-width: 54px; text-align: center;
  background: rgba(11, 11, 12, 0.35);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.lang-btn:hover { border-color: var(--acid); color: var(--acid); background: rgba(200, 245, 66, 0.08); }
body.lang-en .as-cn { display: none; }

/* 音效开关 + 音量调节 */
.sound-wrap { position: relative; }
.sound-btn {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: var(--bone);
  border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 999px;
  background: rgba(11, 11, 12, 0.35);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.3s, background 0.3s;
}
.sound-btn:hover { border-color: var(--bone); }
.eq { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 2px; height: 3px; background: var(--acid); transition: height 0.1s; }
.sound-btn.on .eq i { animation: eqb 0.7s ease-in-out infinite alternate; }
.sound-btn.on .eq i:nth-child(2) { animation-delay: 0.15s; }
.sound-btn.on .eq i:nth-child(3) { animation-delay: 0.3s; }
.sound-btn.on .eq i:nth-child(4) { animation-delay: 0.45s; }
@keyframes eqb { from { height: 3px; } to { height: 12px; } }
.vol-pop {
  position: absolute; right: 0; top: calc(100% + 12px);
  display: flex; align-items: center; gap: 10px;
  background: #111;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  opacity: 0; transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease);
  z-index: 110;
}
.vol-pop.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.vol-ico { font-size: 9px; color: var(--mute); }
.vol-val { font-size: 10px; color: var(--acid); min-width: 20px; text-align: right; }
#volSlider {
  -webkit-appearance: none; appearance: none;
  width: 110px; height: 2px;
  background: rgba(237, 234, 226, 0.25);
  border-radius: 2px; outline: none;
}
#volSlider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 10px rgba(200, 245, 66, 0.6);
}
#volSlider::-moz-range-thumb {
  width: 12px; height: 12px; border: none; border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 10px rgba(200, 245, 66, 0.6);
}

/* ── HERO ───────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(70px + 2vw) var(--pad) 40px;
  position: relative;
}
.hero-meta {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--mute);
}
.hero-title { margin: 2vh 0; }
.ht-row { display: flex; align-items: baseline; gap: clamp(14px, 3vw, 48px); }
.ht-word {
  display: inline-flex;
  font-size: clamp(72px, 16.5vw, 250px);
  font-weight: 900; line-height: 0.92; letter-spacing: -0.04em;
}
.ht-word .ch { display: inline-block; transform: translateY(110%); }
.hero.in .ht-word .ch { animation: chUp 1.1s var(--ease) both; }
@keyframes chUp { to { transform: translateY(0); } }
.ht-word .chi { display: inline-block; transform-origin: 50% 100%; will-change: transform; }
.ht-word.outline .chi {
  color: transparent;
  -webkit-text-stroke: 2px var(--bone);
}
.ht-serif {
  font-family: var(--f-serif); font-style: italic; font-weight: 400;
  font-size: clamp(22px, 4vw, 64px);
  color: var(--acid);
  opacity: 0; transform: translateX(-20px);
}
.hero.in .ht-serif { animation: serifIn 1.1s var(--ease) 0.55s both; }
@keyframes serifIn { to { opacity: 1; transform: translateX(0); } }
.ht-cn {
  display: flex; align-items: center; gap: 18px;
  margin-top: 3vh;
  font-size: clamp(20px, 2.6vw, 38px);
  font-weight: 700; letter-spacing: 0.55em;
  color: var(--bone);
}
.ht-cn i { display: block; width: clamp(30px, 5vw, 80px); height: 1px; background: var(--acid); }
.hfade { opacity: 0; transform: translateY(16px); }
.hero.in .hfade { animation: serifIn 1s var(--ease) 0.8s both; }
.hero-foot {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 30px; flex-wrap: wrap; margin-top: 4vh;
}
.hero-intro { font-size: clamp(14px, 1.3vw, 17px); line-height: 1.9; color: var(--bone-dim); max-width: 620px; }
.hero-intro strong { color: var(--bone); }
.hero-roles { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--mute); text-align: right; }
.hero-roles span::before { content: "● "; color: var(--acid); font-size: 8px; }
.scroll-hint { font-size: 11px; color: var(--bone-dim); display: inline-flex; align-items: center; gap: 8px; }
.sh-arrow { display: inline-block; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* 发光绿星徽章：缓慢旋转 + 呼吸光晕 */
.orbit-badge {
  position: absolute; right: calc(var(--pad) + 1vw); top: 32%;
  width: clamp(90px, 10vw, 140px); height: clamp(90px, 10vw, 140px);
  display: flex; align-items: center; justify-content: center;
}
.ob-halo {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 245, 66, 0.22), transparent 65%);
  filter: blur(12px);
  animation: haloPulse 3.6s ease-in-out infinite;
}
.ob-star {
  position: relative;
  font-size: clamp(30px, 3.4vw, 48px);
  color: var(--acid);
  text-shadow: 0 0 18px rgba(200, 245, 66, 0.9), 0 0 46px rgba(200, 245, 66, 0.5);
  animation: spin 12s linear infinite;
}
@keyframes haloPulse { 0%, 100% { opacity: 0.55; transform: scale(0.92); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 跑马灯 ─────────────────────────────────────────────── */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; padding: 16px 0;
  background: rgba(18, 18, 20, 0.5);
}
.marquee-track { display: flex; white-space: nowrap; width: max-content; animation: mq 28s linear infinite; }
.marquee-track span {
  font-size: clamp(15px, 1.8vw, 24px); font-weight: 800;
  letter-spacing: 0.06em; color: var(--bone-dim); padding-right: 8px;
  transition: color 0.35s, text-shadow 0.35s;
}
/* 鼠标经过：暂停滚动；附近的词由 JS 按距离加 hot/warm 发光 */
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track i { font-style: normal; transition: color 0.3s, text-shadow 0.3s; }
.marquee-track i.warm { color: var(--bone); }
.marquee-track i.hot { color: var(--acid); text-shadow: 0 0 18px rgba(200, 245, 66, 0.5); }
@keyframes mq { to { transform: translateX(-50%); } }

/* ── 章节过渡：滚动视差大字 + 生长发丝线 ────────────────── */
.divider {
  position: relative;
  padding: clamp(60px, 10vh, 130px) 0 clamp(18px, 3vh, 36px);
  overflow: hidden;
}
.divider-word {
  display: block;
  font-size: clamp(90px, 15vw, 240px);
  font-weight: 900; line-height: 0.9; letter-spacing: -0.03em;
  /* 填充色随滚动由 --fill 淡出，外框描边保留 */
  color: rgba(237, 234, 226, var(--fill, 0));
  -webkit-text-stroke: 1.5px rgba(237, 234, 226, 0.22);
  white-space: nowrap;
  will-change: transform;
}
.divider-sub {
  display: block;
  padding: 14px var(--pad) 0;
  font-size: 11px; color: var(--acid);
}
.divider-line {
  display: block;
  margin: 18px var(--pad) 0;
  height: 1px;
  background: var(--line);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s var(--ease);
}
.divider.in .divider-line { transform: scaleX(1); }

/* ── 通用节标题 ─────────────────────────────────────────── */
section { padding: clamp(80px, 12vh, 160px) var(--pad); }
.sec-head { margin-bottom: clamp(40px, 7vh, 90px); }
.sec-tag { font-size: 11px; color: var(--acid); margin-bottom: 22px; }
.sec-title {
  font-size: clamp(34px, 5.5vw, 84px);
  font-weight: 900; line-height: 1.08; letter-spacing: -0.03em;
}
.sec-title .serif { color: var(--acid); letter-spacing: 0; }

/* ── 滚动显现 ───────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(44px); }
.reveal.in { animation: revIn 0.9s var(--ease) both; }
@keyframes revIn { to { opacity: 1; transform: translateY(0); } }

/* ── 关于 ───────────────────────────────────────────────── */
.about { background: linear-gradient(180deg, transparent, rgba(18, 18, 20, 0.65) 20%, rgba(18, 18, 20, 0.65) 80%, transparent); }
/* 宣言：中文模式中文大在上，英文小在下；英文模式只留英文大标题 */
.about-statement { margin-bottom: clamp(40px, 7vh, 90px); }
.as-cn { display: none; }
.as-cn em { font-family: var(--f-serif); font-style: italic; color: var(--acid); }
body.lang-cn .as-cn {
  display: block;
  font-size: clamp(26px, 3.8vw, 56px);
  font-weight: 800; line-height: 1.4; letter-spacing: 0.02em;
  max-width: 1100px;
}
body.lang-cn .as-en {
  margin-top: 22px; padding-left: 18px;
  border-left: 2px solid var(--acid);
  font-family: var(--f-serif); font-style: italic;
  font-size: clamp(14px, 1.6vw, 22px); line-height: 1.7;
  color: var(--mute); font-weight: 400; letter-spacing: 0;
}
.as-en {
  font-size: clamp(26px, 3.8vw, 56px);
  font-weight: 800; line-height: 1.25; letter-spacing: -0.02em;
  max-width: 1100px;
}
.as-en .serif { color: var(--acid); }
/* 节标题英文小字 */
.sec-title-en { margin-top: 18px; font-size: 11px; color: var(--mute); letter-spacing: 0.08em; }
body.lang-en .sec-title-en { display: none; }
.about-grid {
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: clamp(30px, 5vw, 80px);
  margin-bottom: clamp(50px, 8vh, 100px);
}
.about-cn p { font-size: 15px; line-height: 2; color: var(--bone-dim); margin-bottom: 18px; }
.about-small { font-size: 11px !important; color: var(--mute) !important; }
/* 统计：编号 + 大数字横排，无框 */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.5vw, 40px);
  align-content: start;
}
.stat { border-top: 1px solid var(--line); padding-top: 16px; }
.stat-idx { font-size: 10px; color: var(--acid); }
.stat-top { margin-top: 14px; font-size: clamp(34px, 4vw, 62px); font-weight: 900; letter-spacing: -0.03em; }
.stat-top em { font-style: normal; color: var(--acid); }
.stat-label { margin-top: 10px; font-family: var(--f-mono); font-size: 10px; color: var(--mute); }
/* 技能：产品徽标卡片 */
.skills { display: flex; flex-direction: column; gap: clamp(30px, 5vh, 56px); }
.skill-title { font-size: 12px; color: var(--acid); margin-bottom: 20px; }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 10px;
}
.tool-tile {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line);
  padding: 14px 16px;
  background: rgba(18, 18, 20, 0.5);
  transition: transform 0.35s var(--ease), border-color 0.35s, background 0.35s;
}
.tool-tile:hover {
  transform: translateY(-4px);
  border-color: var(--acid);
  background: var(--ink-3);
}
.tool-badge {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(237, 234, 226, 0.04);
  flex-shrink: 0;
}
.tool-badge img { width: 20px; height: 20px; object-fit: contain; border-radius: 5px; }
.tool-badge i {
  font-style: normal; font-weight: 800; font-size: 13px;
  letter-spacing: -0.02em; color: var(--tb, var(--bone));
}
.tool-name { font-size: 11px; color: var(--bone-dim); }
.pill {
  font-family: var(--f-mono); font-size: 11px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; color: var(--bone-dim);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.pill:hover { background: var(--acid); color: var(--ink); border-color: var(--acid); }

/* ── 经历 ───────────────────────────────────────────────── */
.path-list { border-top: 1px solid var(--line); }
.path-row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: clamp(16px, 3vw, 48px);
  padding: clamp(24px, 4vh, 44px) 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}
.path-period { font-family: var(--f-mono); font-size: 12px; color: var(--acid); padding-top: 6px; }
.path-role { font-size: clamp(18px, 2.2vw, 30px); font-weight: 800; letter-spacing: -0.02em; }
.path-company { font-size: 13px; color: var(--bone-dim); margin-top: 6px; }
.path-note { font-size: 13px; line-height: 1.9; color: var(--mute); margin-top: 12px; max-width: 760px; }
.edu { margin-top: 34px; font-size: 12px; color: var(--mute); }
.edu strong { color: var(--bone-dim); }

/* ── 作品列表 ───────────────────────────────────────────── */
.work-list { border-top: 1px solid var(--line); }
.work-row {
  position: relative;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center; gap: clamp(14px, 3vw, 40px);
  padding: clamp(26px, 4.5vh, 52px) 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.5s var(--ease);
}
.work-row:hover { padding-left: clamp(10px, 2vw, 32px); }
.work-index { font-family: var(--f-mono); font-size: 13px; color: var(--mute); transition: color 0.3s; }
.work-main { min-width: 0; }
.work-title {
  font-size: clamp(34px, 6.5vw, 96px);
  font-weight: 900; line-height: 1; letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--bone-dim);
  transition: color 0.45s, -webkit-text-stroke-color 0.45s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.work-row:hover .work-title { color: var(--row-accent, var(--acid)); -webkit-text-stroke-color: var(--row-accent, var(--acid)); }
.work-row:hover .work-index { color: var(--row-accent, var(--acid)); }
.work-sub { margin-top: 10px; font-size: clamp(12px, 1.1vw, 15px); color: var(--mute); }
.work-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.work-year { font-family: var(--f-mono); font-size: 12px; color: var(--bone-dim); }
.work-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.work-tags li {
  font-family: var(--f-mono); font-size: 10px; color: var(--mute);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
}
.work-arrow {
  position: absolute; right: 0; top: 50%;
  transform: translateY(-50%) translateX(10px);
  font-size: 26px; color: var(--row-accent, var(--acid));
  opacity: 0; transition: opacity 0.35s, transform 0.35s var(--ease);
}
.work-row:hover .work-arrow { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ── 联系 ───────────────────────────────────────────────── */
.contact { text-align: left; padding-bottom: clamp(100px, 16vh, 200px); }
.contact-title {
  font-size: clamp(44px, 9vw, 140px);
  font-weight: 900; line-height: 0.98; letter-spacing: -0.04em;
  margin: 10px 0 clamp(36px, 6vh, 64px);
}
.contact-title .serif { color: var(--acid); }
.contact-mail {
  display: inline-block;
  font-size: clamp(22px, 4.5vw, 64px);
  font-weight: 800; letter-spacing: -0.02em;
  padding-bottom: 10px;
  word-break: break-all;
  /* 滚到联系区时荧光绿下划线从左到右描画 */
  background-image: linear-gradient(var(--acid), var(--acid));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 3px;
  transition: background-size 1.4s var(--ease) 0.5s, color 0.3s;
}
.contact-title.in + .contact-mail { background-size: 100% 3px; }
.contact-mail:hover { color: var(--acid); }

/* 联系区：左文案 + 右虚拟搜索栏 */
.contact-grid {
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(32px, 5vw, 80px);
}
.contact-left { min-width: 0; }
.contact-search { flex: 0 1 480px; min-width: 320px; }
.cs-bar {
  display: flex; align-items: center; gap: 12px;
  background: #f4f4f2; color: #17171a;
  border-radius: 999px; padding: 16px 22px;
  font-size: 15px; font-weight: 500;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.65);
}
.cs-bar svg { flex: none; opacity: 0.5; }
.cs-typed { white-space: nowrap; overflow: hidden; }
.cs-caret {
  flex: none; width: 2px; height: 1.15em;
  background: #17171a;
  animation: csBlink 0.9s steps(1) infinite;
}
@keyframes csBlink { 50% { opacity: 0; } }
.cs-drop {
  margin-top: 10px; padding: 10px;
  background: #f4f4f2; color: #17171a;
  border-radius: 26px;
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  pointer-events: none;
}
.cs-drop.show { opacity: 1; transform: none; pointer-events: auto; }
.cs-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 18px;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), background 0.2s;
}
.cs-row.in { opacity: 1; transform: none; }
a.cs-row:hover { background: rgba(23, 23, 26, 0.06); }
.cs-ico {
  flex: none; width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--acid); color: #17171a;
}
.cs-term { display: block; font-weight: 700; font-size: 15px; color: #17171a; word-break: break-all; }
.cs-desc { display: block; font-family: var(--f-mono); font-size: 11px; color: #8a887f; margin-top: 2px; }
@media (max-width: 900px) {
  .contact-grid { flex-direction: column; align-items: flex-start; }
  .contact-search { flex: none; width: 100%; min-width: 0; }
}

/* ── 页脚 ───────────────────────────────────────────────── */
.footer {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  padding: 26px var(--pad);
  border-top: 1px solid var(--line);
  font-size: 11px; color: var(--mute);
}
.footer a:hover { color: var(--bone); }

/* ── 项目详情弹窗 ───────────────────────────────────────── */
.case { position: fixed; inset: 0; z-index: 150; visibility: hidden; }
.case.open { visibility: visible; }
.case-backdrop {
  position: absolute; inset: 0;
  background: rgba(6, 6, 7, 0.7);
  backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.5s;
}
.case.open .case-backdrop { opacity: 1; }
.case-panel {
  position: absolute; inset: 3vh 3vw;
  background: var(--ink-2);
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transform: translateY(4vh); opacity: 0;
  transition: transform 0.6s var(--ease), opacity 0.5s;
}
.case.open .case-panel { transform: translateY(0); opacity: 1; }
.case-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--line);
  font-size: 11px; color: var(--mute);
}
.case-head-title { color: var(--bone-dim); }
.case-close { font-family: var(--f-mono); font-size: 11px; color: var(--bone); }
.case-close:hover { color: var(--acid); }
.case-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.case-heroimg { aspect-ratio: 16 / 9; overflow: hidden; }
.case-heroimg img { width: 100%; height: 100%; object-fit: cover; }
.case-info { padding: clamp(24px, 4vw, 56px); }
.case-title { font-size: clamp(34px, 5vw, 72px); font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.case-sub { margin-top: 12px; color: var(--mute); font-size: 14px; }
.case-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  margin: 34px 0;
}
.case-fact { background: var(--ink-2); padding: 18px; }
.case-fact .n { font-size: clamp(22px, 2.6vw, 38px); font-weight: 900; color: var(--acid); }
.case-fact .l { font-family: var(--f-mono); font-size: 10px; color: var(--mute); margin-top: 6px; }
.case-body { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(24px, 4vw, 60px); }
.case-desc p { font-size: 14.5px; line-height: 2; color: var(--bone-dim); margin-bottom: 16px; }
.case-desc .en { font-family: var(--f-serif); font-style: italic; font-size: 16px; color: var(--mute); }
.case-meta { font-size: 11px; color: var(--mute); }
.case-meta .row { border-top: 1px solid var(--line); padding: 12px 0; }
.case-meta .row b { color: var(--bone-dim); display: block; margin-bottom: 4px; font-weight: 400; }
.case-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.case-pages-tag {
  padding: 0 clamp(24px, 4vw, 56px) 18px;
  font-size: 11px; color: var(--acid);
}
/* 整页顺序浏览：一张图占一个画面 */
.case-gallery {
  display: flex; flex-direction: column; gap: 14px;
  padding: 0 clamp(24px, 4vw, 56px) clamp(24px, 4vw, 56px);
}
.case-gallery figure { overflow: hidden; position: relative; border: 1px solid var(--line); }
.case-gallery img { width: 100%; height: auto; }
.case-gallery figcaption {
  position: absolute; right: 0; bottom: 0;
  padding: 6px 12px;
  background: rgba(11, 11, 12, 0.78);
  font-size: 10px; color: var(--bone-dim);
}
.case-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; border-top: 1px solid var(--line);
  font-size: 11px; color: var(--mute);
}
.case-nav { color: var(--bone-dim); transition: color 0.3s; font-family: var(--f-mono); font-size: 11px; }
.case-nav:hover { color: var(--acid); }

/* ── 响应式 ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .topnav { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .work-row { grid-template-columns: 44px 1fr; }
  .work-side { display: none; }
  .orbit-badge { display: none; }
  .hero-roles { text-align: left; }
  .stats { grid-template-columns: 1fr 1fr; }
  .case-body { grid-template-columns: 1fr; }
  .clock { display: none; }
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}


/* ══════════════════════════════════════════════════════════
   关于区：拼贴卡片 / 技能区：双向跑马灯
   ══════════════════════════════════════════════════════════ */

/* ── 拼贴卡片 ─────────────────────────────────────────── */
.about-collage { position: relative; margin-bottom: clamp(48px, 9vh, 110px); }
.ac-card {
  position: relative;
  background: #131315;
  border: 1px solid var(--line); border-radius: 18px;
  padding: clamp(22px, 3vw, 46px);
  transform: none;
  opacity: 0;
  transition: opacity 0.8s var(--ease), border-color 0.35s, box-shadow 0.35s;
  will-change: transform;
}
.ac-card.ac-vis { opacity: 1; }
.ac-card:hover {
  z-index: 5;
  border-color: rgba(200, 245, 66, 0.45);
  box-shadow: 0 34px 70px -30px rgba(0, 0, 0, 0.7);
}
.ac-statement { width: 63%; }
.ac-text { width: 38%; margin: -7vh 0 0 auto; }
.ac-stats { width: 46%; margin: -5vh 0 0 5%; align-content: center; }

/* ── 技能双向跑马灯 ───────────────────────────────────── */
.skill-mq {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.skill-mq-track {
  display: flex; gap: 14px;
  width: max-content; padding: 8px 0;
  animation: skillMq 40s linear infinite;
}
.skill-mq[data-dir="right"] .skill-mq-track { animation-direction: reverse; }
@keyframes skillMq { to { transform: translateX(-50%); } }
.skill-mq:hover .skill-mq-track { animation-play-state: paused; }
.mq-tile {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 18px 8px 9px;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
  will-change: transform;
}
.mq-tile:hover {
  transform: scale(1.12);
  border-color: var(--tb, var(--acid));
  background: color-mix(in srgb, var(--tb, var(--acid)) 12%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--tb, var(--acid)) 35%, transparent);
}
.mq-tile .tool-badge {
  width: 32px; height: 32px; border-radius: 50%;
  transition: background-color 0.3s, border-color 0.3s;
}
.mq-tile:hover .tool-badge {
  background: var(--tb, var(--acid));
  border-color: var(--tb, var(--acid));
}
.mq-tile:hover .tool-badge i { color: #0b0b0c; }
.mq-tile .tool-badge img { width: 17px; height: 17px; transition: filter 0.3s; }
.mq-tile:hover .tool-badge img { filter: brightness(0) saturate(100%); }
.mq-tile .tool-name { font-size: 12px; transition: color 0.3s; }
.mq-tile:hover .tool-name { color: var(--bone); }

/* ── 移动端：卡片纵向堆叠、无旋转视差 ─────────────────── */
@media (max-width: 900px) {
  .ac-statement, .ac-text, .ac-stats { width: 100%; margin: 0 0 14px; transform: none; }
  .skill-mq-track { animation-duration: 26s; }
}

/* ── Hero 介绍：重点短语斜体加色 ─────────────────────── */
.hero-intro .hl {
  font-family: var(--f-serif); font-style: italic; font-weight: 400;
  color: var(--acid); font-size: 1.08em;
}

/* ── 正文卡：排版层级（标签 + 细字重 + 重点高亮） ────── */
.ac-label {
  font-size: 10px; color: var(--acid); letter-spacing: 0.18em;
  margin-bottom: 10px;
}
.ac-text p:not(.ac-label):not(.about-small) {
  font-size: 14px; font-weight: 400;
  line-height: 1.95; color: var(--bone-dim);
}
.ac-text p + .ac-label { margin-top: 24px; }
.ac-text strong { color: var(--bone); font-weight: 700; }
.ac-text strong.k { color: var(--acid); }


