/* ==========================================================================
   个人作品集 · 商业时尚品牌感 · 大气 · 优美 · 响应快 · 动效丝滑
   ========================================================================== */
:root {
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-56: 56px;
  --space-64: 64px;
  --space-80: 80px;
  --space-96: 96px;
  --space-120: 120px;
  --space-160: 160px;

  /* 苹果风：系统字体优先，丝滑高端 */
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-mono: "SF Mono", "Menlo", "Monaco", "Cascadia Code", "Consolas", monospace;
  --text-h1: 4.5rem;
  --text-h2: 2.75rem;
  --text-h3: 1.5rem;
  --text-body: 1.0625rem;
  --text-small: 0.9375rem;
  --text-caption: 0.875rem;
  --line-body: 1.5;
  --line-tight: 1.25;
  --letter-tight: -0.02em;

  /* 背景与文字 */
  --bg: #f5f8fa;
  --bg-image: url("../assets/background.png");
  --bg-secondary: rgba(255, 255, 255, 0.88);
  --text-primary: #1d1d1f;
  --text-secondary: #2d3748;
  --text-tertiary: #4a5568;
  --text-quaternary: #718096;

  /* 霓虹日落色系：粉蓝红金主色（Neon Sunset） */
  --neon-blue: #0ea5e9;
  --neon-pink: #ec4899;
  --neon-amber: #fbbf24;
  --neon-coral: #f97316;
  --sunset-cream: #fef3c7;
  --sunset-cream-dim: rgba(254, 243, 199, 0.92);
  --mint: #2dd4bf;
  --mint-soft: rgba(45, 212, 191, 0.15);
  --link: var(--neon-blue);
  --link-hover: #0284c7;
  --border: rgba(0, 0, 0, 0.055);
  --border-accent: rgba(14, 165, 233, 0.18);

  /* 商业时尚感：更柔和的大面积阴影、略大圆角 */
  --card-bg: rgba(255, 255, 255, 0.94);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 12px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 20px 56px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(14, 165, 233, 0.06);
  --radius: 20px;
  --radius-touch: 14px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-silk: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  /* 品牌感：丝滑长过渡、优雅缓动 */
  --ease-apple: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-apple-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-luxury: cubic-bezier(0.33, 0, 0.22, 1);
  --duration: 0.38s;
  --duration-apple: 0.6s;
  --duration-reveal: 1.2s;
  --duration-silk: 0.52s;
  /* HCI：三角向右微调，视觉平衡 */
  --scroll-hint-offset-x: 10px;
  --container-max: 1280px;
  --header-h: 64px;
  --touch: 44px;

  --focus-ring: 2px solid var(--neon-blue);
  --focus-offset: 2px;
  --font-scale: 1;
  /* 移动端与刘海屏：安全区域，避免内容被遮挡 */
  --safe-top: env(safe-area-inset-top, 0);
  --safe-right: env(safe-area-inset-right, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
  --safe-left: env(safe-area-inset-left, 0);
}

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

/* 全机型：防止横向滚动与右侧溢出 */
html {
  overflow-x: hidden;
  max-width: 100vw;
}
body {
  overflow-x: hidden;
  max-width: 100%;
  min-width: 0;
}
@media (min-width: 1025px) {
  html { overflow-x: visible; max-width: none; }
  body { overflow-x: visible; max-width: none; }
}

/* 全局字体缩放：侧边栏调节，限制范围避免换行；过渡使调节更丝滑 */
html {
  font-size: calc(100% * var(--font-scale, 1));
  transition: font-size 0.32s var(--ease-silk);
}
@media (prefers-reduced-motion: reduce) {
  html { transition: none; }
}

/* HCI：锚点滚动时为固定顶栏留出空间；沉浸式时顶栏收起，留白减小 */
html {
  --header-visible: 1;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-visible, 1) * (var(--header-h) + var(--safe-top)) + 12px);
  -webkit-overflow-scrolling: touch;
  min-height: 100%;
  /* 日落海滩：单一暖色底，不抢背景图，苹果风简洁 */
  background-color: #f6f2ec;
  background-image: none;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  overscroll-behavior-y: none;
}

/*  overscroll 时露出与背景图协调的暖色，不抢戏 */
html::before {
  content: "";
  position: fixed;
  top: -100vh;
  left: 0;
  right: 0;
  width: 100%;
  height: 300vh;
  z-index: -3;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(246, 242, 236, 0.98) 0%, #f6f2ec 30%, #f6f2ec 100%);
}
[data-theme="dark"] html::before {
  background: linear-gradient(180deg, rgba(18, 16, 14, 0.98) 0%, #12100e 30%, #12100e 100%);
}

/* 暗夜模式：data-theme="dark" 由侧边工具栏切换 */
[data-theme="dark"] {
  color-scheme: dark;
}
[data-theme="dark"],
[data-theme="dark"] body {
  --bg: #0f1419;
  --bg-secondary: rgba(21, 32, 43, 0.92);
  --text-primary: #e7e9ea;
  --text-secondary: #8b98a5;
  --text-tertiary: #6e767d;
  --text-quaternary: #536471;
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(14, 165, 233, 0.35);
  --card-bg: rgba(21, 32, 43, 0.95);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.28), 0 2px 12px rgba(0, 0, 0, 0.18);
  --shadow-hover: 0 20px 56px rgba(0, 0, 0, 0.38), 0 8px 24px rgba(14, 165, 233, 0.1);
}
[data-theme="dark"] html {
  background-color: #0f0e0c;
  background-image: none;
}
[data-theme="dark"] .site-overscroll-fill {
  background: linear-gradient(
    180deg,
    rgba(14, 165, 233, 0.18) 0%,
    rgba(12, 16, 22, 0.99) 25%,
    rgba(15, 20, 25, 0.99) 75%,
    rgba(236, 72, 153, 0.1) 100%
  );
}
[data-theme="dark"] ::selection {
  background: rgba(14, 165, 233, 0.35);
  color: var(--text-primary);
}
[data-theme="dark"] ::-moz-selection {
  background: rgba(14, 165, 233, 0.35);
  color: var(--text-primary);
}

/* 暗夜模式：第二屏与白天一致用你的背景图，略深遮罩 + 柔和光照，与首屏过渡丝滑 */
[data-theme="dark"] .site-bg {
  background-color: #0d0c0a;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
}
[data-theme="dark"] .site-bg::before {
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 45%,
    rgba(0, 0, 0, 0.12) 75%,
    rgba(0, 0, 0, 0.22) 100%
  );
}
[data-theme="dark"] .site-bg::after {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.02) 25%,
    transparent 50%,
    transparent 75%,
    rgba(255, 248, 242, 0.02) 100%
  );
}

/* 暗夜模式：首屏与白天同结构，底部长段渐隐透明，丝滑露出背景图 */
[data-theme="dark"] .hero-bg {
  background-color: transparent;
  background-image: linear-gradient(
    180deg,
    #1A1A2E 0%,
    #3A2442 22%,
    #5C303E 45%,
    #7D4B3D 58%,
    rgba(125, 75, 61, 0.98) 68%,
    rgba(125, 75, 61, 0.82) 75%,
    rgba(125, 75, 61, 0.58) 82%,
    rgba(125, 75, 61, 0.32) 88%,
    rgba(125, 75, 61, 0.12) 94%,
    transparent 100%
  );
}
[data-theme="dark"] .hero::before {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.08) 0%,
    rgba(0, 0, 0, 0.06) 30%,
    rgba(0, 0, 0, 0.04) 55%,
    rgba(0, 0, 0, 0.02) 75%,
    transparent 100%
  );
}
[data-theme="dark"] .hero-frame::after {
  background: rgba(15, 20, 25, 0.4);
}
[data-theme="dark"] .hero-content::before {
  background: transparent;
  border: none;
  box-shadow: none;
}
[data-theme="dark"] .hero-content:hover::before {
  background: transparent;
  box-shadow: none;
}
[data-theme="dark"] .hero.loaded .hero-content:hover {
  box-shadow: none;
}

/* 暗夜模式：首屏底部目录条，与亮色一致简约 */
[data-theme="dark"] .hero-directory {
  background: transparent;
  border: none;
  box-shadow: none;
}
[data-theme="dark"] .hero-directory:hover {
  box-shadow: none;
}
[data-theme="dark"] .hero-directory a {
  color: rgba(231, 233, 234, 0.9);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .hero h1 {
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .hero-subtitle,
[data-theme="dark"] .hero-expected-start {
  color: rgba(255, 255, 255, 0.92);
}
[data-theme="dark"] .hero-directory a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}
[data-theme="dark"] .hero-directory a:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
}
[data-theme="dark"] .scroll-hint::before {
  background: linear-gradient(180deg, var(--neon-blue) 0%, var(--neon-pink) 50%, var(--neon-amber) 100%);
}
[data-theme="dark"] .scroll-hint {
  filter: drop-shadow(0 4px 12px rgba(14, 165, 233, 0.4));
  opacity: var(--hero-fade, 0.9);
}

/* 暗夜模式：首屏右侧视觉区（已移除，保留兼容） */
[data-theme="dark"] .hero-visual {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .hero-visual:hover {
  box-shadow:
    0 30px 80px rgba(14, 165, 233, 0.2),
    0 0 60px rgba(236, 72, 153, 0.12),
    0 0 0 1px rgba(45, 212, 191, 0.25);
}
[data-theme="dark"] .hero-visual::before {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(14, 165, 233, 0.08) 100%
  );
}

/* 暗夜模式：首屏三按钮统一透明玻璃（与亮色一致） */
[data-theme="dark"] .hero-cta-wrap .btn-primary {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5) !important;
}
[data-theme="dark"] .hero-cta-wrap .btn-primary:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.8) !important;
}
[data-theme="dark"] .hero .btn-secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.8);
}

/* 暗夜模式：背景公式水印 */
[data-theme="dark"] .site-formulas .formula {
  color: rgba(255, 255, 255, 0.06);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--line-body);
  letter-spacing: 0.01em;
  color: var(--text-primary);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

/* 极轻暗角，不抢日落海滩主视觉 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 90% 80% at 50% 50%,
    transparent 0%,
    transparent 60%,
    rgba(0, 0, 0, 0.02) 100%
  );
  opacity: 1;
}
[data-theme="dark"] body::after {
  background: radial-gradient(
    ellipse 90% 80% at 50% 50%,
    transparent 0%,
    transparent 60%,
    rgba(0, 0, 0, 0.06) 100%
  );
}

/* ========== 每次进入网站：日落霓虹唯美入场 + 淡出衔接首屏 ========== */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
  cursor: pointer;
  transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0s linear;
}
.intro-overlay.is-done {
  pointer-events: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.6s ease-out;
  z-index: -9999 !important;
}
/* 霓虹日落：金橙粉紫渐变，苹果级丝滑缓动 */
.intro-overlay__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 150% 120% at 50% 85%, #0c0a1a 0%, #1e1b4b 28%, #312e81 45%, #4c1d95 58%, #581c87 72%, #0f172a 90%, #020617 100%);
  background-color: #050510;
  animation: intro-bg-sunset 16s cubic-bezier(0.33, 0, 0.22, 1) infinite alternate;
}
.intro-overlay__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.22) 0%, rgba(249, 115, 22, 0.14) 18%, rgba(236, 72, 153, 0.1) 38%, rgba(14, 165, 233, 0.05) 58%, transparent 78%, transparent 100%);
  pointer-events: none;
  animation: intro-bg-shimmer 12s cubic-bezier(0.33, 0, 0.22, 1) infinite alternate;
}
.intro-overlay__bg::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -15%;
  width: 130%;
  height: 70%;
  margin-left: -65%;
  background: radial-gradient(ellipse 65% 85% at 50% 0%, rgba(251, 191, 36, 0.32) 0%, rgba(249, 115, 22, 0.18) 32%, rgba(236, 72, 153, 0.08) 58%, transparent 78%);
  pointer-events: none;
  animation: intro-bg-dawn 8s cubic-bezier(0.33, 0, 0.22, 1) infinite alternate;
}
/* 破晓遮罩：开场黑暗，光逐渐突破（救赎感） */
.intro-overlay__veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 100% at 50% 50%, transparent 0%, transparent 35%, rgba(2, 6, 23, 0.95) 70%, rgba(1, 2, 8, 0.98) 100%);
  pointer-events: none;
  z-index: 1;
  animation: intro-veil-lift 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes intro-veil-lift {
  0% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}
@keyframes intro-bg-dawn {
  0% { opacity: 0.85; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}
@keyframes intro-bg-sunset {
  0% { opacity: 1; filter: brightness(1); }
  100% { opacity: 0.98; filter: brightness(1.03); }
}
@keyframes intro-bg-shimmer {
  0% { opacity: 0.9; }
  100% { opacity: 1; }
}
/* 希望的光：希冀 · 救赎 · 从上方洒落 */
.intro-overlay__light-of-hope {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(251, 191, 36, 0.52) 0%,
    rgba(251, 191, 36, 0.28) 10%,
    rgba(249, 115, 22, 0.22) 22%,
    rgba(236, 72, 153, 0.12) 42%,
    transparent 62%,
    transparent 100%
  );
  animation: intro-light-of-hope 8s ease-in-out infinite alternate;
}
.intro-overlay__light-of-hope::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 90%;
  height: 55%;
  margin-left: -45%;
  background: radial-gradient(ellipse 85% 100% at 50% 0%, rgba(255, 243, 200, 0.32) 0%, rgba(251, 191, 36, 0.18) 35%, transparent 65%);
  pointer-events: none;
  animation: intro-light-beam 7s ease-in-out infinite alternate;
}
/* 宏大光束层：纵向光柱感 */
.intro-overlay__rays {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: repeating-linear-gradient(
    105deg,
    transparent 0px,
    transparent 8%,
    rgba(251, 191, 36, 0.06) 8.5%,
    transparent 9%
  );
  mask-image: linear-gradient(180deg, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 15%, black 85%, transparent 100%);
  animation: intro-rays-shimmer 10s ease-in-out infinite alternate;
}
.intro-overlay__rays::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 25%, transparent 75%, rgba(251, 191, 36, 0.02) 100%);
  pointer-events: none;
}
@keyframes intro-light-of-hope {
  0% { opacity: 0.88; }
  100% { opacity: 1; }
}
@keyframes intro-light-beam {
  0% { opacity: 0.82; transform: scaleY(0.96); }
  100% { opacity: 1; transform: scaleY(1); }
}
@keyframes intro-rays-shimmer {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}
/* 日落霓虹浮动粒子 */
.intro-overlay__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.intro-overlay__particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.7);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.7);
  animation: intro-particle-float 6s cubic-bezier(0.33, 0, 0.22, 1) infinite;
}
.intro-overlay__particle:nth-child(1) { left: 18%; top: 82%; animation-delay: 0s; animation-duration: 7s; background: rgba(251, 191, 36, 0.65); box-shadow: 0 0 16px rgba(251, 191, 36, 0.6); }
.intro-overlay__particle:nth-child(2) { left: 38%; top: 88%; animation-delay: 1.2s; animation-duration: 6.5s; background: rgba(249, 115, 22, 0.55); box-shadow: 0 0 14px rgba(249, 115, 22, 0.5); }
.intro-overlay__particle:nth-child(3) { left: 58%; top: 78%; animation-delay: 0.6s; animation-duration: 7.2s; background: rgba(251, 191, 36, 0.7); box-shadow: 0 0 18px rgba(251, 191, 36, 0.65); }
.intro-overlay__particle:nth-child(4) { left: 75%; top: 85%; animation-delay: 1.5s; animation-duration: 6.8s; background: rgba(236, 72, 153, 0.5); box-shadow: 0 0 12px rgba(236, 72, 153, 0.45); }
.intro-overlay__particle:nth-child(5) { left: 88%; top: 72%; animation-delay: 0.4s; animation-duration: 7s; background: rgba(251, 191, 36, 0.5); box-shadow: 0 0 12px rgba(251, 191, 36, 0.45); }
.intro-overlay__particle:nth-child(6) { left: 25%; top: 65%; animation-delay: 1s; animation-duration: 6.5s; background: rgba(249, 115, 22, 0.55); box-shadow: 0 0 14px rgba(249, 115, 22, 0.5); }
.intro-overlay__particle:nth-child(7) { left: 50%; top: 90%; animation-delay: 0.3s; animation-duration: 8s; background: rgba(251, 191, 36, 0.45); box-shadow: 0 0 10px rgba(251, 191, 36, 0.4); }
.intro-overlay__particle:nth-child(8) { left: 12%; top: 75%; animation-delay: 1.8s; animation-duration: 7.5s; background: rgba(236, 72, 153, 0.4); box-shadow: 0 0 8px rgba(236, 72, 153, 0.4); }
.intro-overlay__particle:nth-child(9) { left: 92%; top: 80%; animation-delay: 0.9s; animation-duration: 7.8s; background: rgba(251, 191, 36, 0.5); box-shadow: 0 0 12px rgba(251, 191, 36, 0.45); }
@keyframes intro-particle-float {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.35;
  }
  100% {
    transform: translate(2px, -120px) scale(1.15);
    opacity: 0.9;
  }
}
.intro-overlay__content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: var(--space-24);
  animation: intro-content-breathe 6s ease-in-out 2s infinite alternate;
}
@keyframes intro-content-breathe {
  0% { transform: scale(1); }
  100% { transform: scale(1.02); }
}
.intro-overlay__glow--back,
.intro-overlay__glow--front {
  z-index: 0;
}
.intro-overlay__avatar-wrap,
.intro-overlay__title,
.intro-overlay__tagline,
.intro-overlay__hope-line {
  position: relative;
  z-index: 3;
}
/* 头像：日落霓虹环 */
.intro-overlay__avatar-wrap {
  margin-bottom: var(--space-20);
  position: relative;
}
.intro-overlay__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(254, 243, 199, 0.35);
  box-shadow:
    0 0 24px rgba(251, 191, 36, 0.35),
    0 0 48px rgba(236, 72, 153, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  animation: intro-avatar-in 1s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
  opacity: 0;
  transform: scale(0.88);
}
.intro-overlay__avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.45), rgba(236, 72, 153, 0.35), rgba(14, 165, 233, 0.25), rgba(45, 212, 191, 0.3)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
  opacity: 0.85;
  animation: intro-avatar-ring 3.5s cubic-bezier(0.33, 0, 0.22, 1) 0.5s infinite alternate;
}
@keyframes intro-avatar-in {
  0% { opacity: 0; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes intro-avatar-ring {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}
.intro-overlay__title {
  margin: 0 0 var(--space-12);
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 14vw, 6rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.18em;
  color: #fbbf24;
  text-shadow:
    0 0 28px rgba(251, 191, 36, 0.95),
    0 0 56px rgba(249, 115, 22, 0.7),
    0 0 88px rgba(236, 72, 153, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.35);
  animation: intro-title-glow 5s cubic-bezier(0.33, 0, 0.22, 1) 1s infinite alternate;
  opacity: 1;
  transform: translateY(0);
}
.intro-overlay__title::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 140%;
  height: 200%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse 50% 40% at 50% 50%, rgba(14, 165, 233, 0.08) 0%, transparent 55%);
  pointer-events: none;
  z-index: -1;
  animation: intro-title-halo 6s ease-in-out infinite alternate;
}
@keyframes intro-title-halo {
  0% { opacity: 0.75; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}
.intro-overlay__title-main {
  display: block;
  margin-bottom: 0.08em;
  font-size: 1.4em;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #fef3c7;
  text-shadow: inherit;
  opacity: 1;
  transform: scale(0.92) translateY(24px);
  animation: intro-title-main-in 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.12s forwards;
}
.intro-overlay__title-sub {
  display: block;
  font-size: 0.42em;
  font-weight: 400;
  letter-spacing: 0.48em;
  color: rgba(254, 243, 199, 0.9);
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.7), 0 0 40px rgba(249, 115, 22, 0.4);
  opacity: 1;
  transform: scale(0.94) translateY(16px);
  animation: intro-title-sub-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.28s forwards;
}
@keyframes intro-title-main-in {
  0% {
    transform: scale(0.88) translateY(20px);
  }
  70% {
    transform: scale(1.04) translateY(-4px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}
@keyframes intro-title-sub-in {
  0% {
    transform: scale(0.9) translateY(12px);
  }
  70% {
    transform: scale(1.02) translateY(-2px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}
.intro-overlay__tagline {
  margin: 0 0 var(--space-8);
  font-family: var(--font-sans);
  font-size: clamp(0.8125rem, 2.5vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.28em;
  color: rgba(254, 243, 199, 0.92);
  text-shadow: 0 0 24px rgba(251, 191, 36, 0.5), 0 1px 12px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(12px);
  animation: intro-tagline-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.6s forwards;
}
.intro-overlay__hope-line {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(0.75rem, 2vw, 0.9375rem);
  font-weight: 400;
  letter-spacing: 0.4em;
  color: rgba(254, 243, 199, 0.78);
  text-shadow: 0 0 18px rgba(251, 191, 36, 0.5), 0 1px 10px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: scale(0.96);
  animation: intro-hope-line-in 1.3s cubic-bezier(0.22, 1, 0.36, 1) 0.9s forwards;
}
@keyframes intro-tagline-in {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes intro-hope-line-in {
  0% { opacity: 0; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}
.intro-overlay__glow {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  pointer-events: none;
}
.intro-overlay__glow--back {
  width: 680px;
  height: 680px;
  margin: -340px 0 0 -340px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.14) 0%, rgba(249, 115, 22, 0.11) 28%, rgba(236, 72, 153, 0.07) 52%, transparent 72%);
  animation: intro-glow-pulse-back 5s ease-in-out 0.4s infinite alternate;
}
.intro-overlay__glow--front {
  width: 400px;
  height: 400px;
  margin: -200px 0 0 -200px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.22) 0%, rgba(236, 72, 153, 0.12) 38%, transparent 65%);
  animation: intro-glow-pulse-front 4s ease-in-out 0.6s infinite alternate;
}
@keyframes intro-title-glow {
  0% {
    text-shadow: 0 0 28px rgba(251, 191, 36, 0.95), 0 0 56px rgba(249, 115, 22, 0.7), 0 0 88px rgba(236, 72, 153, 0.45), 0 2px 8px rgba(0, 0, 0, 0.35);
  }
  100% {
    text-shadow: 0 0 36px rgba(251, 191, 36, 1), 0 0 72px rgba(249, 115, 22, 0.85), 0 0 108px rgba(236, 72, 153, 0.55), 0 2px 8px rgba(0, 0, 0, 0.3);
  }
}
@keyframes intro-glow-pulse-back {
  0% { opacity: 0.5; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.18); }
}
@keyframes intro-glow-pulse-front {
  0% { opacity: 0.65; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .intro-overlay { transition: opacity 0.4s ease-out, visibility 0s linear; }
  .intro-overlay.is-done {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-out, visibility 0s linear 0.4s;
  }
  .intro-overlay__veil { animation: intro-veil-lift 0.6s ease-out forwards; }
  .intro-overlay__bg::before,
  .intro-overlay__bg::after,
  .intro-overlay__light-of-hope,
  .intro-overlay__rays,
  .intro-overlay__particle,
  .intro-overlay__glow--back,
  .intro-overlay__glow--front,
  .intro-overlay__avatar-wrap::before { animation: none; }
  .intro-overlay__content { animation: none; }
  .intro-overlay__avatar { animation: intro-avatar-in 0.4s ease-out 0.1s forwards; }
  .intro-overlay__title-main { animation: intro-title-main-in 0.5s ease-out 0.15s forwards; }
  .intro-overlay__title-sub { animation: intro-title-sub-in 0.45s ease-out 0.25s forwards; }
  .intro-overlay__tagline { animation: intro-tagline-in 0.4s ease-out 0.35s forwards; }
  .intro-overlay__hope-line { animation: intro-hope-line-in 0.4s ease-out 0.5s forwards; }
}

/* 设计系统：选区颜色与主题一致，便于复制时识别 */
::selection {
  background: rgba(14, 165, 233, 0.25);
  color: var(--text-primary);
}
::-moz-selection {
  background: rgba(14, 165, 233, 0.25);
  color: var(--text-primary);
}

/* 顶部阅读进度条：细线，Apple 风格丝滑；沉浸式时略淡不抢眼 */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-pink), var(--mint));
  z-index: 101;
  transition: width 0.2s var(--ease-luxury), opacity 0.45s var(--ease-luxury);
}
body.is-immersive .scroll-progress {
  opacity: 0.55;
}
@media (prefers-reduced-motion: reduce) {
  .scroll-progress { display: none; }
}

/* 下拉/上拉时露出区域：与 html::before 同色系、无纯白，避免白条感 */
.site-overscroll-fill {
  position: fixed;
  top: -150vh;
  left: 0;
  right: 0;
  height: 400vh;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(14, 165, 233, 0.26) 0%,
    rgba(14, 165, 233, 0.12) 12%,
    rgba(232, 240, 250, 0.98) 25%,
    rgba(245, 248, 250, 0.98) 50%,
    rgba(248, 242, 250, 0.98) 75%,
    rgba(236, 72, 153, 0.12) 88%,
    rgba(236, 72, 153, 0.22) 100%
  );
}

/* ========== 第二屏起：你的背景图 + 光照感 + 丝滑衔接首屏 ========== */
.site-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  z-index: -1;
  background-color: #1a1a2e;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform;
  transform: translateZ(0);
}
/* 底部柔和遮罩，保证正文可读 */
.site-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 45%,
    rgba(0, 0, 0, 0.06) 75%,
    rgba(0, 0, 0, 0.14) 100%
  );
  pointer-events: none;
}
/* 光照感：自上而下柔光，与首屏过渡自然 */
.site-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.04) 25%,
    transparent 50%,
    transparent 75%,
    rgba(255, 248, 242, 0.03) 100%
  );
  pointer-events: none;
}

/* ========== 背景漂浮图形学公式：大、浅灰、微透明，不影响正文 ========== */
.site-formulas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.site-formulas .formula {
  position: absolute;
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 400;
  color: rgba(0, 0, 0, 0.08);
  white-space: nowrap;
  user-select: none;
  animation: formula-float 25s ease-in-out infinite;
}
/* 分散排布，避免重叠：左右靠边、上下分层间距加大 */
.site-formulas .formula-1 { top: 6%; left: 5%; animation-delay: 0s; }
.site-formulas .formula-2 { top: 6%; right: 5%; animation-delay: -4s; }
.site-formulas .formula-3 { top: 20%; left: 6%; animation-delay: -8s; }
.site-formulas .formula-4 { top: 20%; right: 6%; animation-delay: -2s; }
.site-formulas .formula-5 { top: 34%; left: 5%; animation-delay: -6s; }
.site-formulas .formula-6 { top: 34%; right: 5%; animation-delay: -10s; }
.site-formulas .formula-7 { top: 48%; left: 6%; animation-delay: -3s; }
.site-formulas .formula-8 { top: 48%; right: 6%; animation-delay: -7s; }
.site-formulas .formula-9 { top: 62%; left: 5%; animation-delay: -11s; }
.site-formulas .formula-10 { top: 62%; right: 5%; animation-delay: -1s; }
/* 下方公式：统一用 top 定位，每行间隔 10%，避免重叠 */
.site-formulas .formula-11 { top: 70%; left: 6%; animation-delay: -5s; }
.site-formulas .formula-12 { top: 70%; right: 6%; animation-delay: -9s; }
.site-formulas .formula-13 { top: 80%; left: 5%; animation-delay: -2s; }
.site-formulas .formula-14 { top: 80%; right: 5%; animation-delay: -6s; }
.site-formulas .formula-15 { top: 90%; left: 6%; animation-delay: -10s; }
.site-formulas .formula-16 { top: 90%; right: 6%; animation-delay: -4s; }
.site-formulas .formula-17 { top: 96%; left: 8%; animation-delay: -8s; }
.site-formulas .formula-18 { top: 96%; right: 8%; animation-delay: -12s; }
@keyframes formula-float {
  0%, 100% { transform: translate(0, 0); opacity: 0.88; }
  33% { transform: translate(6px, -8px); opacity: 1; }
  66% { transform: translate(-4px, 6px); opacity: 0.92; }
}
/* 较长公式略小字号，避免溢出 */
.site-formulas .formula-6 { font-size: clamp(1.4rem, 3.2vw, 2.8rem); }
.site-formulas .formula-3 { font-size: clamp(1.3rem, 2.8vw, 2.4rem); }
@media (max-width: 768px) {
  .site-formulas .formula { font-size: clamp(1.2rem, 3.5vw, 2rem); }
  .site-formulas .formula-6 { font-size: clamp(1rem, 2.8vw, 1.6rem); }
  .site-formulas .formula-3 { font-size: clamp(1rem, 2.5vw, 1.5rem); }
  .site-formulas .formula-13 { font-size: clamp(1rem, 2.5vw, 1.5rem); }
}
@media (prefers-reduced-motion: reduce) {
  .site-formulas .formula { animation: none; }
}

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

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--duration-apple) var(--ease-apple), opacity var(--duration-apple) var(--ease-apple), transform var(--duration-apple) var(--ease-apple);
}
a:hover { color: var(--link-hover); }
a:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }
/* 移动端：焦点环更明显，便于键盘/辅助技术用户 */
@media (max-width: 768px) {
  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  [tabindex]:focus-visible { outline-offset: 3px; }
}

/* 跳过导航：键盘聚焦时显示，提升可访问性与可发现性 */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-24);
  z-index: 200;
  padding: var(--space-12) var(--space-24);
  font-size: var(--text-body);
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-pink));
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  transition: top 0.3s var(--ease-out-expo), transform 0.3s var(--ease-out-expo);
}
.skip-link:focus,
.skip-link:focus-visible {
  top: var(--space-24);
  outline: none;
  transform: translateY(0);
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.4);
}
/* HR 友好：回到顶部 + 悬停提示，丝滑出现（在 AI 悬浮按钮左侧，避免被遮挡） */
.back-to-top {
  position: fixed;
  right: calc(var(--space-24) + 48px + var(--space-12) + var(--safe-right));
  bottom: calc(var(--space-32) + var(--safe-bottom));
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-blue), var(--mint));
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.5s var(--ease-silk), visibility 0.5s var(--ease-silk), transform 0.5s var(--ease-out-expo), box-shadow 0.4s var(--ease-silk);
}
.back-to-top::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -8px 0 0 -6px;
  border-left: 2px solid #fff;
  border-top: 2px solid #fff;
  transform: rotate(45deg);
  transition: transform 0.35s var(--ease-silk);
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.back-to-top:hover {
  box-shadow: 0 8px 36px rgba(14, 165, 233, 0.5);
  transform: translateY(-5px) scale(1.1);
  transition-duration: 0.45s;
}
.back-to-top:hover::after {
  transform: rotate(45deg) scale(1.12);
  transition-duration: 0.4s;
}
.back-to-top:hover::before {
  opacity: 1;
  transform: translateX(-100%) translateY(-50%);
}
.back-to-top::before {
  content: "回到顶部";
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateX(-80%) translateY(-50%);
  margin-right: var(--space-8);
  padding: var(--space-8) var(--space-12);
  font-size: var(--text-caption);
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-silk), transform 0.3s var(--ease-out-expo);
}
.back-to-top:focus-visible { outline: var(--focus-ring); outline-offset: 3px; }

/* 回到顶部引导：在回到顶部按钮左侧 */
.back-to-top-guide {
  position: fixed;
  right: calc(var(--space-24) + 48px + var(--space-12) + 48px + var(--space-12) + var(--safe-right));
  bottom: calc(var(--space-32) + var(--safe-bottom));
  z-index: 89;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(8px);
  transition: opacity 0.42s var(--ease-silk), visibility 0s linear 0.42s, transform 0.42s var(--ease-silk);
}
.back-to-top-guide.is-visible {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: opacity 0.42s var(--ease-silk), visibility 0s, transform 0.42s var(--ease-silk);
}
.back-to-top-guide__inner {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: var(--space-16) var(--space-20);
  max-width: 220px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow: visible;
}
[data-theme="dark"] .back-to-top-guide__inner {
  background: rgba(15, 23, 42, 0.72);
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}
.back-to-top-guide__text {
  margin: 0 0 var(--space-12);
  padding: 2px 0 0;
  font-size: var(--text-caption);
  color: var(--text-primary);
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.back-to-top-guide__text strong {
  color: var(--neon-blue);
  font-weight: 500;
}
.back-to-top-guide__dismiss {
  display: block;
  width: 100%;
  min-height: 32px;
  padding: 0 var(--space-12);
  border: none;
  border-radius: 8px;
  background: rgba(14, 165, 233, 0.75);
  color: #fff;
  font-size: var(--text-caption);
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.25s var(--ease);
}
.back-to-top-guide__dismiss:hover {
  background: rgba(14, 165, 233, 0.9);
}
.back-to-top-guide__dismiss:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
.back-to-top-guide__arrow {
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border: 8px solid transparent;
  border-left-color: rgba(255, 255, 255, 0.72);
  border-right: none;
  filter: drop-shadow(1px 0 2px rgba(0, 0, 0, 0.04));
}
[data-theme="dark"] .back-to-top-guide__arrow {
  border-left-color: rgba(15, 23, 42, 0.72);
}

/* ========== 布局 ========== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-32);
}
@media (max-width: 768px) {
  .container { padding-inline: var(--space-24); }
}

/* 正文白底：毛玻璃 + 品牌感丝滑过渡；区块大气留白 */
.section .container {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  padding: var(--space-120) var(--space-56);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--duration-reveal) var(--ease-luxury), box-shadow var(--duration-apple) var(--ease-luxury), border-color var(--duration-apple) var(--ease-luxury);
}
.section .container:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--border-accent);
  transform: translateY(-4px);
  transition: transform 0.5s var(--ease-apple-out), box-shadow 0.5s var(--ease-apple-out), border-color 0.4s var(--ease-apple);
}
@media (max-width: 768px) {
  .section .container {
    padding: var(--space-80) calc(var(--space-24) + var(--safe-right)) var(--space-80) calc(var(--space-24) + var(--safe-left));
  }
}

main { position: relative; z-index: 2; scroll-margin-top: calc(var(--header-h) + var(--safe-top) + 12px); }
.section { scroll-margin-top: calc(var(--header-h) + var(--safe-top) + 12px); }
#hero { scroll-margin-top: 0; }

/* ========== 区块：大气留白、品牌感节奏 ========== */
.section {
  position: relative;
  padding: var(--space-160) 0;
  overflow: hidden;
}
.section::before {
  content: "CHEN HONGQI";
  position: absolute;
  left: 5%;
  bottom: 14%;
  top: auto;
  transform: none;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: clamp(1.75rem, 7vw, 5.5rem);
  font-weight: 400;
  letter-spacing: 0.52em;
  -webkit-font-smoothing: none;
  font-smoothing: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-pink) 50%, var(--mint) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.85;
  white-space: nowrap;
  pointer-events: none;
  z-index: -1;
  user-select: none;
  animation: watermark-float 4s ease-in-out infinite;
  transition: opacity 0.5s var(--ease-smooth), transform 0.4s var(--ease-smooth);
}
/* 沉浸式阅读：背景水印减弱，减少干扰 */
body.is-immersive .section::before {
  opacity: 0.42;
}
body.music-playing .section::before {
  animation: watermark-float 4s ease-in-out infinite, watermark-pulse 1.4s ease-in-out infinite;
}
@keyframes watermark-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes watermark-pulse {
  0%, 100% { opacity: 0.82; }
  50% { opacity: 0.98; }
}
@media (prefers-reduced-motion: reduce) {
  .section::before { animation: none; }
  body.music-playing .section::before { animation: none; }
}
.section.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--duration-reveal) var(--ease-apple-out), transform var(--duration-reveal) var(--ease-apple-out);
}
.section.reveal .container {
  transform: scale(0.992);
  transition: transform var(--duration-reveal) var(--ease-apple-out), box-shadow var(--duration-apple) var(--ease-apple-out), border-color var(--duration-apple) var(--ease-apple);
}
.section.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.section.reveal.is-visible .container {
  transform: scale(1);
}
.section.reveal.is-visible .container:hover {
  transform: scale(1) translateY(-4px);
  transition: transform 0.5s var(--ease-apple-out), box-shadow 0.5s var(--ease-apple-out);
}
@media (prefers-reduced-motion: reduce) {
  .section.reveal .container { transform: none; }
  .section.reveal.is-visible .container { transform: none; }
  .section.reveal.is-visible .container:hover { transform: none; }
  .section .container:hover { transform: none; }
}
.section.reveal.is-visible .animate-item {
  animation: revealUp var(--duration-reveal) var(--ease-apple-out) forwards;
}
.section.reveal .animate-item { opacity: 0; }
@keyframes revealUp {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.section.reveal.is-visible .animate-item:nth-child(1) { animation-delay: 0.05s; }
.section.reveal.is-visible .animate-item:nth-child(2) { animation-delay: 0.1s; }
.section.reveal.is-visible .animate-item:nth-child(3) { animation-delay: 0.15s; }
.section.reveal.is-visible .animate-item:nth-child(4) { animation-delay: 0.2s; }
.section.reveal.is-visible .animate-item:nth-child(5) { animation-delay: 0.25s; }
.section.reveal.is-visible .animate-item:nth-child(6) { animation-delay: 0.3s; }
.section.reveal.is-visible .animate-item:nth-child(7) { animation-delay: 0.35s; }
.section.reveal.is-visible .animate-item:nth-child(8) { animation-delay: 0.4s; }
.section.reveal.is-visible .animate-item:nth-child(9) { animation-delay: 0.45s; }
.section.reveal.is-visible .animate-item:nth-child(10) { animation-delay: 0.5s; }

/* 致敬暗黑破坏神 / 最终幻想：区块显现时自动播放光效 */
.section-projects,
.section-works {
  position: relative;
}
.section-tribute {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.section-tribute--diablo {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  margin-top: -60px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 107, 53, 0.4), rgba(196, 30, 58, 0.25) 50%, transparent 70%);
  opacity: 0;
  transition: opacity 0.6s var(--ease-smooth);
}
.section.reveal.is-visible .section-tribute--diablo {
  opacity: 1;
  animation: diabloPortal 3s ease-in-out infinite;
}
@keyframes diabloPortal {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.7; }
  50% { transform: translateX(-50%) scale(1.15); opacity: 0.9; }
}
.section-tribute--ff {
  top: 0;
  right: 5%;
  width: 160px;
  height: 160px;
  margin-top: -40px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(224, 247, 255, 0.5), rgba(14, 165, 233, 0.3) 50%, transparent 70%);
  opacity: 0;
  transition: opacity 0.6s var(--ease-smooth);
}
.section.reveal.is-visible .section-tribute--ff {
  opacity: 1;
  animation: ffCrystalBurst 2.8s ease-in-out infinite;
}
@keyframes ffCrystalBurst {
  0%, 100% { transform: scale(1); opacity: 0.6; filter: brightness(1); }
  50% { transform: scale(1.1); opacity: 0.85; filter: brightness(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .section-tribute--diablo,
  .section-tribute--ff { animation: none; opacity: 0.5; }
}

/* ========== AI 帮手：与回到顶部同款蓝色圆形悬浮按钮，第二屏起显示 ========== */
.ai-float {
  position: fixed;
  right: calc(var(--space-24) + var(--safe-right));
  bottom: calc(var(--space-32) + var(--safe-bottom));
  z-index: 100;
  font-family: var(--font-sans);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.5s var(--ease-silk), visibility 0.5s var(--ease-silk), transform 0.5s var(--ease-out-expo);
}
.ai-float.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* AI 弱引导：表明已配置 AI，点击可对话 */
.ai-float-guide {
  position: absolute;
  right: calc(100% + var(--space-8));
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateX(6px);
  transition: opacity 0.3s var(--ease-silk), visibility 0.3s var(--ease-silk), transform 0.3s var(--ease-out-expo);
  pointer-events: none;
  z-index: 1;
}
.ai-float.is-visible .ai-float-guide:not(.is-dismissed) {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}
.ai-float-guide.is-dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.ai-float-guide__text {
  font-weight: 500;
  line-height: 1.3;
}
.ai-float-guide__dismiss {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-tertiary);
  font-size: 0.875rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.ai-float-guide__dismiss:hover {
  background: rgba(14, 165, 233, 0.12);
  color: var(--neon-blue);
}
.ai-float-guide__dismiss:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 1px;
}

.ai-float-toggle {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-blue), var(--mint));
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 0.4s var(--ease-silk), transform 0.35s var(--ease-silk);
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.ai-float-toggle:hover {
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.5);
  transform: translateY(-4px) scale(1.08);
}
.ai-float-toggle:hover::before {
  opacity: 1;
  transform: translateX(-100%) translateY(-50%);
}
.ai-float-toggle::before {
  content: "AI 帮手";
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateX(-80%) translateY(-50%);
  margin-right: var(--space-8);
  padding: var(--space-8) var(--space-12);
  font-size: var(--text-caption);
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-silk), transform 0.3s var(--ease-out-expo);
}
.ai-float-toggle:focus-visible { outline: var(--focus-ring); outline-offset: 3px; }
.ai-float-toggle-icon { line-height: 1; }

.ai-float-panel {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  width: 320px;
  max-height: 420px;
  border: 3px solid #5d3a1a;
  border-radius: 12px;
  background: linear-gradient(180deg, #fef9e7 0%, #fef3c7 50%, #fdeaa0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 0 #5d3a1a, 0 10px 24px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.96);
  transition: opacity 0.25s var(--ease-apple-out), visibility 0.25s, transform 0.25s var(--ease-apple-out);
}
.ai-float-panel[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.ai-float-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-12) var(--space-16);
  background: rgba(93, 58, 26, 0.12);
  border-bottom: 2px solid #5d3a1a;
}
.ai-float-title {
  font-size: 1rem;
  font-weight: 700;
  color: #5d3a1a;
  letter-spacing: 0.02em;
}
.ai-float-close {
  width: 28px;
  height: 28px;
  border: 2px solid #5d3a1a;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.8);
  color: #5d3a1a;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.ai-float-close:hover {
  background: #fff;
  transform: scale(1.05);
}
.ai-float-close:active { transform: scale(0.98); }

.ai-float-messages {
  min-height: 180px;
  max-height: 280px;
  overflow-y: auto;
  padding: var(--space-16);
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  flex: 1;
  background: rgba(255, 255, 255, 0.4);
}
.ai-float .ai-msg { display: flex; }
.ai-float .ai-msg--user { justify-content: flex-end; }
.ai-float .ai-msg--bot { justify-content: flex-start; }
.ai-float .ai-msg-bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.9375rem;
  line-height: 1.45;
  border: 2px solid transparent;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
}
.ai-float .ai-msg--user .ai-msg-bubble {
  background: linear-gradient(180deg, #8b5a2b 0%, #6d4420 100%);
  color: #fef9e7;
  border-color: #5d3a1a;
  border-bottom-right-radius: 4px;
}
.ai-float .ai-msg--bot .ai-msg-bubble {
  background: #fff;
  color: #3d2a0f;
  border-color: #c4960e;
  border-bottom-left-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 0 rgba(0, 0, 0, 0.06);
}
.ai-float-input-wrap {
  display: flex;
  gap: var(--space-8);
  padding: var(--space-12);
  border-top: 2px solid #5d3a1a;
  background: rgba(93, 58, 26, 0.08);
}
.ai-float-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  border: 2px solid #5d3a1a;
  border-radius: 8px;
  background: #fef9e7;
  color: #3d2a0f;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ai-float-input:focus {
  outline: none;
  border-color: #c4960e;
  box-shadow: 0 0 0 2px rgba(196, 150, 14, 0.3);
}
.ai-float-input::placeholder { color: rgba(93, 58, 26, 0.5); }
.ai-float-send {
  flex-shrink: 0;
  padding: 10px 18px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #5d3a1a;
  background: linear-gradient(180deg, #f7dc6f 0%, #e8b923 100%);
  border: 2px solid #5d3a1a;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 3px 0 #5d3a1a;
  transition: transform 0.2s, box-shadow 0.2s;
}
.ai-float-send:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 0 #5d3a1a;
}
.ai-float-send:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 0 #5d3a1a;
}
.ai-float-send:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}
.ai-float .ai-msg[data-ai-loading="true"] .ai-msg-bubble { opacity: 0.9; }
@media (max-width: 480px) {
  .ai-float { right: calc(var(--space-16) + var(--safe-right)); bottom: calc(var(--space-16) + var(--safe-bottom)); }
  .ai-float-panel { width: calc(100vw - 32px - var(--safe-left) - var(--safe-right)); max-width: 320px; right: -8px; }
}
[data-theme="dark"] .ai-float-panel {
  background: linear-gradient(180deg, #2d2416 0%, #1f1810 100%);
  border-color: #8b7355;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 0 #3d2a1a, 0 10px 24px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .ai-float-header { background: rgba(139, 115, 85, 0.2); border-color: #8b7355; }
[data-theme="dark"] .ai-float-title { color: #fef3c7; }
[data-theme="dark"] .ai-float-close { border-color: #8b7355; background: rgba(255,255,255,0.1); color: #fef3c7; }
[data-theme="dark"] .ai-float-messages { background: rgba(0,0,0,0.15); }
[data-theme="dark"] .ai-float .ai-msg--bot .ai-msg-bubble { background: #3d3225; color: #fef9e7; border-color: #6d5a3a; }
[data-theme="dark"] .ai-float-input-wrap { background: rgba(139,115,85,0.15); border-color: #8b7355; }
[data-theme="dark"] .ai-float-input { background: #2d2416; border-color: #8b7355; color: #fef9e7; }
[data-theme="dark"] .ai-float-send { background: linear-gradient(180deg, #6d5a3a 0%, #5d4a2a 100%); border-color: #8b7355; color: #fef9e7; }
[data-theme="dark"] .ai-float-guide {
  background: rgba(45, 36, 22, 0.95);
  border-color: rgba(139, 115, 85, 0.35);
  color: #e8e0d0;
}
[data-theme="dark"] .ai-float-guide__dismiss {
  background: rgba(255, 255, 255, 0.08);
  color: #c4b8a8;
}
[data-theme="dark"] .ai-float-guide__dismiss:hover {
  background: rgba(139, 115, 85, 0.3);
  color: #fef3c7;
}

/* 仅对屏幕阅读器可见 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== 标题：品牌感简约、大气留白；点击标题使模块内容居中 + 丝滑动效 ========== */
.section-title-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-20);
  margin-bottom: var(--space-56);
  padding-bottom: var(--space-20);
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--neon-blue), var(--neon-pink), var(--mint)) 1;
  transition:
    border-image 0.45s var(--ease-luxury),
    padding 0.45s var(--ease-luxury),
    border-left-color 0.45s var(--ease-luxury),
    box-shadow 0.6s var(--ease-luxury),
    opacity 0.25s var(--ease-luxury);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.section-title-wrap:hover {
  padding-left: var(--space-8);
}
.section-title-wrap:active {
  opacity: 0.92;
}
/* 当前可见区块：左侧细线提示「你在这里」，辅助定位 */
.section.in-view .section-title-wrap {
  padding-left: var(--space-12);
  border-left: 3px solid var(--neon-blue);
  border-radius: 0 2px 2px 0;
}
.section-title-wrap::after { display: none; }
.section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  color: var(--neon-blue);
  background: var(--mint-soft);
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: var(--radius);
  transition: color var(--duration) var(--ease-smooth), transform var(--duration) var(--ease-out-expo), box-shadow var(--duration) var(--ease-smooth);
}
.section-icon svg { width: 22px; height: 22px; }
.section:hover .section-icon {
  color: var(--mint);
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(45, 212, 191, 0.25);
}
.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: var(--letter-tight);
  line-height: var(--line-tight);
  transition: color var(--duration-apple) var(--ease-luxury);
}
.section:hover .section-title { color: var(--neon-blue); }
/* 点击标题后：丝滑动效，模块内容居中时高亮一圈（长时长 + 柔和缓动减少卡顿） */
.section.is-title-focused .section-title-wrap {
  animation: section-title-focus 0.9s var(--ease-luxury) forwards;
}
.section.is-title-focused > .container {
  will-change: transform;
  animation: section-content-focus 0.9s var(--ease-luxury) forwards;
}
@keyframes section-title-focus {
  0% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
  }
  45% {
    box-shadow:
      0 0 0 3px rgba(14, 165, 233, 0.12),
      0 0 16px rgba(14, 165, 233, 0.06);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
  }
}
@keyframes section-content-focus {
  0% { transform: scale(1); }
  50% { transform: scale(1.004); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .section.is-title-focused .section-title-wrap,
  .section.is-title-focused > .container {
    animation: none;
    will-change: auto;
  }
}
.section-desc {
  margin: 0 0 var(--space-40);
  font-size: var(--text-body);
  color: var(--text-secondary);
  line-height: var(--line-body);
  font-weight: 400;
}

/* 致敬魂斗罗：区块显现时散弹式线条 */
.section-title-wrap--games { position: relative; }
.section-spread-shot {
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 4px;
  pointer-events: none;
  opacity: 0;
}
.section-spread-shot i {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 3px;
  height: 20px;
  background: linear-gradient(180deg, var(--neon-blue), var(--neon-pink));
  border-radius: 2px;
  transform-origin: center bottom;
  opacity: 0;
}
.section.reveal.is-visible .section-spread-shot { opacity: 1; }
.section.reveal.is-visible .section-spread-shot i:nth-child(1) {
  animation: spreadShotLeft 0.5s var(--ease-out-expo) 0.2s forwards;
}
.section.reveal.is-visible .section-spread-shot i:nth-child(2) {
  animation: spreadShotMid 0.5s var(--ease-out-expo) 0.25s forwards;
}
.section.reveal.is-visible .section-spread-shot i:nth-child(3) {
  animation: spreadShotRight 0.5s var(--ease-out-expo) 0.3s forwards;
}
@keyframes spreadShotLeft {
  0% { height: 0; opacity: 0; transform: translateX(-50%) rotate(-25deg) scaleY(0); }
  100% { height: 32px; opacity: 0.7; transform: translateX(-50%) rotate(-25deg) translateY(-28px) scaleY(1); }
}
@keyframes spreadShotMid {
  0% { height: 0; opacity: 0; transform: translateX(-50%) rotate(0deg) scaleY(0); }
  100% { height: 36px; opacity: 0.8; transform: translateX(-50%) rotate(0deg) translateY(-32px) scaleY(1); }
}
@keyframes spreadShotRight {
  0% { height: 0; opacity: 0; transform: translateX(-50%) rotate(25deg) scaleY(0); }
  100% { height: 32px; opacity: 0.7; transform: translateX(-50%) rotate(25deg) translateY(-28px) scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
  .section-spread-shot i { animation: none; opacity: 0; }
}

/* ========== 导航：HCI 美感 · 清晰、留白、可点击区 ========== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding-top: var(--safe-top);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  min-height: calc(var(--header-h) + var(--safe-top));
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.045);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: transform 0.55s var(--ease-luxury), background var(--duration-apple) var(--ease-luxury), box-shadow var(--duration-apple) var(--ease-luxury), border-color var(--duration-apple) var(--ease-luxury);
}
/* 沉浸式阅读：向下滚动时顶栏上滑收起，视线聚焦正文（仅桌面端；手机端顶栏始终显示） */
body.is-immersive .site-header {
  transform: translateY(-100%);
  pointer-events: none;
}
@media (max-width: 768px) {
  body.is-immersive .site-header {
    transform: none;
    pointer-events: auto;
  }
  /* 顶栏略低于侧边设置栏，导航下拉不遮挡设置按钮 */
  .site-header { z-index: 150; }
}
@media (prefers-reduced-motion: reduce) {
  body.is-immersive .site-header,
  body.is-immersive .side-toolbar {
    transition: none;
  }
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 5%, var(--neon-blue) 20%, var(--neon-pink) 50%, var(--mint) 80%, transparent 95%);
  background-size: 200% 100%;
  opacity: 0.7;
  pointer-events: none;
  animation: headerNeonLine 10s ease-in-out infinite;
}
@keyframes headerNeonLine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}
.site-header.is-scrolled::after { opacity: 0.85; animation: none; }
@media (prefers-reduced-motion: reduce) {
  .site-header::after { animation: none; }
}
/* 导航栏：Logo 贴左、导航居中、音乐贴右 */
.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-12);
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0;
}
.site-header .logo {
  grid-column: 1;
  justify-self: start;
  transform: translateX(-64px);
  z-index: 0;
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-pink) 55%, var(--mint) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity var(--duration-apple) var(--ease-apple), filter var(--duration-apple) var(--ease-apple), transform var(--duration-apple) var(--ease-apple);
}
.site-header .logo:hover {
  opacity: 0.92;
  filter: brightness(1.06);
  text-decoration: none;
  color: transparent;
  transform: translateX(-64px) scale(1.02);
}
.site-header .nav {
  grid-column: 2;
  justify-self: center;
  z-index: 1;
  padding-left: var(--space-24);
  padding-right: var(--space-24);
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.music-control {
  grid-column: 3;
  justify-self: end;
  transform: translateX(80px);
  z-index: 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.site-header .nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--space-8);
  flex-wrap: wrap;
}
/* 中英文导航均单行，不换行不重叠 */
html[lang="zh-CN"] .site-header .nav ul,
html[lang="en"] .site-header .nav ul {
  flex-wrap: nowrap;
}
.site-header .nav li {
  display: flex;
  align-items: center;
}
.site-header .nav a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  position: relative;
  padding: var(--space-8) var(--space-16);
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: var(--radius-touch);
  transition: color var(--duration-apple) var(--ease-apple), background var(--duration-apple) var(--ease-apple), transform var(--duration-apple) var(--ease-apple), opacity var(--duration-apple) var(--ease-apple);
}
.site-header .nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 0;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--neon-blue), var(--mint));
  transform: translateX(-50%);
  transition: width 0.5s var(--ease-apple-out);
}
.site-header .nav a:hover {
  color: var(--neon-blue);
  background: rgba(14, 165, 233, 0.08);
  text-decoration: none;
  transform: translateY(-2px);
}
.site-header .nav a:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.12s;
}
.site-header .nav a:hover::after { width: calc(100% - var(--space-16)); }
.site-header .nav a.active {
  color: var(--neon-blue);
  text-decoration: none;
}
.site-header .nav a.active::after { width: calc(100% - var(--space-16)); }
.site-header .nav a:focus-visible {
  outline: 2px solid var(--neon-blue);
  outline-offset: 2px;
}
.site-header .nav a:focus-visible::before { opacity: 0; }

/* 英文时导航更紧凑：略小字号 + 缩小内边距与间距，单行不重叠；空间不足时可横向滚动 */
html[lang="en"] .site-header .nav ul {
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
html[lang="en"] .site-header .nav ul::-webkit-scrollbar {
  display: none;
}
html[lang="en"] .site-header .nav a {
  font-size: 0.8125rem;
  padding: 6px 10px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--duration) var(--ease);
}
.nav-toggle::before { top: 50%; margin-top: -6px; }
.nav-toggle::after { bottom: 50%; margin-bottom: -6px; }
.nav-toggle[aria-expanded="true"]::before { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"]::after { transform: translateY(-4px) rotate(-45deg); }

/* 音乐提示：固定在导航栏右下方，高对比易读，整条气泡可点击关闭 */
.music-hint {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: var(--space-16);
  padding: var(--space-12) var(--space-20);
  min-width: 240px;
  max-width: 520px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(14, 165, 233, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04);
  transition: opacity 0.35s var(--ease-smooth), transform 0.35s var(--ease-smooth), visibility 0.35s var(--ease-smooth);
  z-index: 10;
  cursor: pointer;
}
.music-hint.is-dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
}
.music-hint-text {
  flex: 1;
  min-width: 0;
  font-size: 0.9375rem;
  color: #1a1a2e;
  font-weight: 500;
  white-space: normal;
  line-height: 1.45;
}
.music-hint-dismiss {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.08);
  color: var(--neon-blue);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.music-hint-dismiss:hover {
  background: rgba(14, 165, 233, 0.2);
  color: var(--neon-blue);
  border-color: var(--neon-blue);
}
.music-hint-dismiss:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}
.music-progress-wrap {
  flex-shrink: 1;
  min-width: 72px;
  width: 100px;
}
.music-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  cursor: pointer;
  overflow: hidden;
  transition: background 0.2s;
}
.music-progress:hover {
  background: rgba(0, 0, 0, 0.12);
}
.music-progress:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}
.music-progress-track {
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
}
.music-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--neon-blue), var(--mint));
  transition: width 0.1s linear;
}
.music-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color 0.3s var(--ease-smooth), background 0.3s var(--ease-smooth), transform 0.25s var(--ease-smooth);
}
.music-toggle:hover {
  color: var(--neon-blue);
  background: rgba(14, 165, 233, 0.08);
}
.music-toggle:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}
.music-toggle-icon {
  font-size: 0.875rem;
  line-height: 1;
}
.music-toggle-icon--pause { display: none; }
.music-toggle-icon--play { display: inline; }
.music-toggle.is-playing .music-toggle-icon--pause { display: inline; }
.music-toggle.is-playing .music-toggle-icon--play { display: none; }

/* 导航栏语言切换：显示将要切换到的语言，中文页显示 EN，英文页显示 中 */
.nav-lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-left: 20px;
  padding: 0 var(--space-12);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.25s var(--ease-smooth), background 0.25s var(--ease-smooth), border-color 0.25s var(--ease-smooth);
}
.nav-lang-toggle:hover {
  color: var(--neon-blue);
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.3);
}
.nav-lang-toggle:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}
.nav-lang-toggle-label {
  white-space: nowrap;
}

/* 音乐律动条：首屏 + 页面下方空白处，播放时随音乐律动 */
.music-bars {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  height: 48px;
  z-index: 0;
  pointer-events: none;
}
.music-bar {
  width: 6px;
  min-height: 8px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--neon-blue), var(--mint));
  opacity: 0.45;
  transform-origin: bottom center;
  transform: scaleY(0.35);
  transition: opacity 0.4s var(--ease-smooth);
}
body.music-playing .music-bars .music-bar {
  animation: music-bar-pulse 0.6s ease-in-out infinite;
}
body.music-playing .music-bars .music-bar:nth-child(1) { animation-delay: 0s; }
body.music-playing .music-bars .music-bar:nth-child(2) { animation-delay: 0.08s; }
body.music-playing .music-bars .music-bar:nth-child(3) { animation-delay: 0.16s; }
body.music-playing .music-bars .music-bar:nth-child(4) { animation-delay: 0.24s; }
body.music-playing .music-bars .music-bar:nth-child(5) { animation-delay: 0.32s; }
body.music-playing .music-bars .music-bar:nth-child(6) { animation-delay: 0.16s; }
body.music-playing .music-bars .music-bar:nth-child(7) { animation-delay: 0.08s; }
body.music-playing .music-bars .music-bar:nth-child(8) { animation-delay: 0.24s; }
body.music-playing .music-bars .music-bar:nth-child(9) { animation-delay: 0.32s; }
body.music-playing .music-bars .music-bar:nth-child(10) { animation-delay: 0s; }
body.music-playing .music-bars .music-bar:nth-child(11) { animation-delay: 0.08s; }
body.music-playing .music-bars .music-bar:nth-child(12) { animation-delay: 0.16s; }
body.music-playing .music-bars .music-bar:nth-child(13) { animation-delay: 0.24s; }
body.music-playing .music-bars .music-bar:nth-child(14) { animation-delay: 0.32s; }
body.music-playing .music-bars .music-bar:nth-child(15) { animation-delay: 0.16s; }
@keyframes music-bar-pulse {
  0%, 100% { transform: scaleY(0.35); opacity: 0.45; }
  50% { transform: scaleY(1); opacity: 0.85; }
}
/* 页面下方空白处：更宽更大的律动条 */
.music-bars--bottom {
  position: relative;
  bottom: auto;
  left: auto;
  transform: none;
  width: 100%;
  max-width: 100%;
  height: 72px;
  padding: var(--space-32) var(--space-24);
  gap: 14px;
  margin-top: var(--space-48);
}
.music-bars--bottom .music-bar {
  width: 10px;
  min-height: 12px;
  border-radius: 5px;
  flex: 1;
  max-width: 24px;
}
@media (prefers-reduced-motion: reduce) {
  body.music-playing .music-bars .music-bar {
    animation: none;
    opacity: 0.6;
    transform: scaleY(0.7);
  }
}

/* 移动端：顶栏单行显示 Logo + 音乐 + 汉堡，下拉导航独立；窄屏必须能完整看见 */
@media (max-width: 768px) {
  .site-header {
    overflow: visible;
    width: 100%;
    left: 0;
    right: 0;
  }
  .header-inner {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-8);
    padding-left: calc(var(--space-12) + var(--safe-left));
    padding-right: calc(var(--space-12) + var(--safe-right));
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .site-header .logo {
    flex-shrink: 1;
    min-width: 0;
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: none;
  }
  .site-header .logo:hover { transform: scale(1.02); }
  .site-header .nav {
    position: fixed;
    top: calc(var(--header-h) + var(--safe-top));
    left: auto;
    right: 56px;
    width: min(280px, calc(100vw - 56px - 56px - var(--safe-left) - var(--safe-right)));
    display: none;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--border);
    border-radius: 12px 0 0 12px;
    padding: var(--space-16);
    padding-left: calc(var(--space-16) + var(--safe-left));
    padding-right: var(--space-16);
    box-shadow: var(--shadow);
    max-height: calc(100vh - var(--header-h) - var(--safe-top));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 99;
  }
  .site-header .nav.is-open { display: block; }
  .site-header .nav ul { flex-direction: column; gap: var(--space-8); }
  .site-header .nav a { min-height: var(--touch); padding: var(--space-12) var(--space-16); font-size: 1rem; }
  .music-control {
    transform: none;
    margin-left: auto;
    flex-shrink: 0;
    gap: var(--space-8);
    min-width: 0;
  }
  .nav-toggle {
    display: flex;
    flex-shrink: 0;
    min-width: var(--touch);
    min-height: var(--touch);
    padding: var(--space-12);
    align-items: center;
    justify-content: center;
  }
  .music-toggle, .nav-lang-toggle {
    min-width: var(--touch);
    min-height: var(--touch);
    padding: 0 var(--space-12);
  }
  .music-hint { max-width: min(280px, 85vw); }
  .music-hint .music-hint-text { font-size: 0.8125rem; }
  .music-progress-wrap { min-width: 48px; width: 56px; }
  .music-bars { bottom: 14%; gap: 8px; height: 40px; }
  .music-bar { width: 5px; min-height: 6px; }
  .music-bars--bottom { height: 56px; padding: var(--space-24) var(--space-16); gap: 10px; margin-top: var(--space-32); }
  .music-bars--bottom .music-bar { width: 8px; max-width: 18px; }
  .section { padding: var(--space-64) 0; min-height: 100vh; min-height: 100dvh; }
  .section-title { font-size: 1.75rem; }
  /* 首屏：一屏高度，目录栏与三角固定在底部；左右留出安全区不贴边 */
  .hero {
    min-height: 100vh;
    min-height: 100dvh;
    padding: calc(var(--header-h) + var(--safe-top)) calc(var(--space-16) + var(--safe-right)) calc(var(--space-32) + var(--safe-bottom)) calc(var(--space-16) + var(--safe-left));
  }
  .hero-directory { flex-shrink: 0; margin-bottom: 0; }
  .scroll-hint { flex-shrink: 0; }
  /* 各区块与主内容左右留出安全区，右侧不被裁切 */
  .section .container {
    padding: var(--space-80) calc(var(--space-24) + var(--safe-right)) var(--space-80) calc(var(--space-24) + var(--safe-left));
  }
  /* 横向滚动区不超出安全区，避免右侧看不见 */
  .projects-grid,
  .works-gallery,
  .notes-list {
    margin-left: 0;
    margin-right: 0;
    padding-left: calc(var(--space-24) + var(--safe-left));
    padding-right: calc(var(--space-24) + var(--safe-right));
  }
  .skip-link:focus,
  .skip-link:focus-visible { top: calc(var(--space-24) + var(--safe-top)); left: calc(var(--space-24) + var(--safe-left)); }
}


/* ========== 首屏 Hero：沿用页面渐变背景，国际风排版与高对比文字 ========== */
.hero {
  --hero-fade: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--header-h) + var(--safe-top)) var(--space-24) calc(var(--space-48) + var(--safe-bottom));
  overflow: visible;
  position: relative;
  z-index: 1;
  background: transparent;
}
/* 第一屏：深蓝黑→深紫→暗红棕→深棕，底部长段渐隐透明，更丝滑露出背景图 */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: transparent;
  background-image: linear-gradient(
    180deg,
    #1A1A2E 0%,
    #3A2442 22%,
    #5C303E 45%,
    #7D4B3D 58%,
    rgba(125, 75, 61, 0.98) 68%,
    rgba(125, 75, 61, 0.82) 75%,
    rgba(125, 75, 61, 0.58) 82%,
    rgba(125, 75, 61, 0.32) 88%,
    rgba(125, 75, 61, 0.12) 94%,
    transparent 100%
  );
}
/* 首屏遮罩：更早、更缓地淡出，与背景图衔接更丝滑 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.08) 0%,
    rgba(0, 0, 0, 0.06) 30%,
    rgba(0, 0, 0, 0.04) 55%,
    rgba(0, 0, 0, 0.02) 75%,
    transparent 100%
  );
}
.hero-inner {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 720px;
  padding: var(--space-40) var(--space-32);
}

/* 致敬经典游戏：首屏暗黑破坏神血球 + 最终幻想水晶（自动播放） */
.hero-tributes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.tribute-orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
}
.tribute-orb--diablo {
  display: none;
}
@keyframes diabloPulse {
  0%, 100% { transform: scale(1); opacity: 0.2; }
  50% { transform: scale(1.05); opacity: 0.3; }
}

/* Hero 大外框：极简，仅作视觉边界（可选隐藏） */
.hero-frame {
  position: absolute;
  inset: -24px;
  border-radius: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
}
.hero-frame::before,
.hero-frame::after {
  display: none;
}

/* Hero 内容区：苹果风大留白、纯文字、丝滑入场，HCI 细节 */
.hero-content {
  text-align: center;
  flex: 0 1 auto;
  min-width: 0;
  width: 100%;
  position: relative;
  padding: var(--space-56) 0 var(--space-64);
  z-index: 1;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-reveal) var(--ease-apple-out), transform var(--duration-reveal) var(--ease-apple-out);
}
.hero.loaded .hero-content {
  opacity: 1;
  transform: translateY(0);
}

.hero-content::after,
.hero-content::before {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .hero-content { opacity: 1; transform: none; transition: none; }
  .hero.loaded .hero-content { opacity: 1; transform: none; }
}

/* 首屏主标题：苹果风大白字、高对比、留白足，细节阴影 */
.hero-title-wrap { margin-bottom: var(--space-32); }
.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 9vw, 5.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: #ffffff;
  text-shadow:
    0 2px 12px rgba(0, 0, 0, 0.4),
    0 1px 4px rgba(0, 0, 0, 0.35);
  -webkit-font-smoothing: antialiased;
  transition: text-shadow var(--duration-silk) var(--ease-apple);
}
.hero h1:hover {
  text-shadow:
    0 2px 16px rgba(0, 0, 0, 0.45),
    0 1px 6px rgba(0, 0, 0, 0.4);
}
html[lang="en"] .hero h1 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  padding-bottom: 0.05em;
}

.hero:hover h1 {
  color: #ffffff;
}

/* 副标题与状态：白字、层级清晰、不抢主标题 */
.hero-subtitle {
  margin: 0 0 var(--space-12);
  font-size: clamp(1.375rem, 2.8vw, 1.75rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.01em;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.hero-expected-start {
  margin: 0 0 var(--space-40);
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4), 0 0 24px rgba(14, 165, 233, 0.25);
  letter-spacing: 0.04em;
  line-height: 1.5;
  display: inline-block;
  padding: var(--space-12) var(--space-32);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  transition: transform 0.45s var(--ease-apple-out), box-shadow 0.45s var(--ease-apple), background 0.45s var(--ease-apple), border-color 0.45s var(--ease-apple);
}
.hero-expected-start:hover {
  transform: scale(1.04);
  box-shadow: 0 0 28px rgba(14, 165, 233, 0.2);
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.55);
}
.hero-content .btn.btn-primary { margin-top: var(--space-8); margin-bottom: 0; }
/* 首屏 CTA：三按钮统一透明玻璃风格，简洁大气 */
.hero-cta-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-20);
  flex-wrap: wrap;
  min-height: 56px;
}
/* 首屏内下载简历与另外两个按钮统一为透明描边风格，丝滑动效 */
.hero-cta-wrap .btn-primary {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.08);
  transition: background var(--duration-apple) var(--ease-apple), border-color var(--duration-apple) var(--ease-apple), box-shadow var(--duration-apple) var(--ease-apple), transform var(--duration-apple) var(--ease-apple-out);
}
.hero-cta-wrap .btn-primary:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}
.hero-cta-wrap .btn-primary:active {
  transform: translateY(0);
  transition-duration: 0.12s;
}
/* 两按钮共用 .hero-cta-btn，同一套样式保证严格同高，HCI 微动效 */
.hero-cta-wrap .hero-cta-btn {
  flex: 0 0 auto;
  width: auto;
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  box-sizing: border-box !important;
  padding: 0 var(--space-32) !important;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid transparent !important;
  overflow: hidden;
  white-space: nowrap;
  transition: background var(--duration-apple) var(--ease-apple), border-color var(--duration-apple) var(--ease-apple), box-shadow var(--duration-apple) var(--ease-apple), transform var(--duration-apple) var(--ease-apple-out);
}
.hero-cta-wrap .btn-secondary:hover {
  transform: translateY(-2px);
}
.hero-cta-wrap .btn-secondary:active {
  transform: translateY(0);
  transition-duration: 0.12s;
}
/* 两按钮统一图标：同款下箭头，上下对齐 */
.hero-cta-wrap .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: var(--space-8);
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
  font-size: 0.95em;
  line-height: 1;
}
.hero-cta-wrap .btn-icon::before {
  content: "↓";
  font-weight: 700;
  color: inherit;
}
.hero-cta-wrap .btn-icon--download::before {
  content: "↓";
  font-weight: 700;
  color: inherit;
}
.hero-cta-wrap .btn-primary .btn-icon--download::before {
  content: "📄";
  font-weight: 400;
}
.hero-cta-wrap button.hero-easter-egg {
  margin: 0;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hero-easter-egg--mario {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px !important;
  height: 56px !important;
  min-width: 56px;
  min-height: 56px !important;
  max-height: 56px;
  box-sizing: border-box;
  font-size: 1.5rem;
  flex-shrink: 0;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #8b5a2b;
  background: linear-gradient(180deg, #f7dc6f 0%, #e8b923 50%, #c4960e 100%);
  border: 3px solid #5d3a1a;
  border-radius: 4px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.4), 0 4px 0 #5d3a1a, 0 6px 12px rgba(0,0,0,0.2);
  transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s var(--ease-smooth);
  text-decoration: none;
  cursor: pointer;
}
.hero-easter-egg--mario:hover {
  transform: translateY(-8px);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.4), 0 12px 0 #5d3a1a, 0 14px 20px rgba(0,0,0,0.25);
  color: #8b5a2b;
}
.hero-easter-egg--mario:active {
  transform: translateY(-2px);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.3), 0 6px 0 #5d3a1a, 0 8px 12px rgba(0,0,0,0.2);
  color: #8b5a2b;
}
.hero-easter-egg--mario:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 4px;
}

/* 首屏底部：模块导航，一行显示、无横向滚动条，左右边界放宽完整显现 */
.hero-directory {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: min(1280px, 96vw);
  margin: 0 auto var(--space-40);
  padding: var(--space-16) 0 var(--space-20);
  overflow: visible;
  opacity: var(--hero-fade, 1);
  transition: opacity 0.45s var(--ease-smooth);
  pointer-events: auto;
  box-sizing: border-box;
}
/* 内层：单行、左右留白，首尾项与左右边界完整显现 */
.hero-directory__inner {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-8);
  justify-content: center;
  align-items: center;
  padding-left: var(--space-24);
  padding-right: var(--space-24);
}
.hero-dir-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: var(--space-8);
  opacity: 0.9;
  color: inherit;
  transition: transform var(--duration-apple) var(--ease-apple-out), opacity var(--duration-apple) var(--ease-apple);
}
.hero-directory a:hover .hero-dir-icon {
  transform: scale(1.08);
  opacity: 1;
}
.hero-directory a:active .hero-dir-icon {
  transform: scale(0.97);
  transition-duration: 0.1s;
}
/* 模块导航：白色字 + 透明玻璃感，丝滑悬停，HCI 细节 */
.hero-directory a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  padding: 0 var(--space-16);
  font-size: 0.9375rem;
  font-weight: 500;
  color: #ffffff;
  text-decoration: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: background var(--duration-apple) var(--ease-apple), border-color var(--duration-apple) var(--ease-apple), box-shadow var(--duration-apple) var(--ease-apple), transform var(--duration-apple) var(--ease-apple-out);
}
.hero-directory a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}
.hero-directory a:hover .hero-dir-icon { color: currentColor; }
.hero-directory a:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 12px rgba(255, 255, 255, 0.08);
  transition-duration: 0.1s;
}
.hero-directory a:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
/* 移动端：目录栏多行换行、悬浮按钮垂直堆叠、内容不贴边 */
@media (max-width: 768px) {
  .hero-directory {
    padding: var(--space-12) 0 var(--space-32);
    margin-bottom: 0;
    max-width: 100%;
    width: 100%;
  }
  .hero-directory__inner {
    flex-wrap: wrap;
    justify-content: center;
    padding-left: calc(var(--space-16) + var(--safe-left));
    padding-right: calc(var(--space-16) + var(--safe-right));
    gap: var(--space-8);
  }
  .hero-directory a {
    min-height: 40px;
    padding: 0 var(--space-12);
    font-size: 0.8125rem;
    color: #ffffff;
  }
  .hero-dir-icon { margin-right: var(--space-4); }
  /* 两个悬浮按钮垂直堆叠：AI 在下，回到顶部在上，不重叠 */
  .ai-float {
    right: calc(var(--space-16) + var(--safe-right));
    bottom: calc(var(--space-24) + var(--safe-bottom));
  }
  .back-to-top {
    right: calc(var(--space-16) + var(--safe-right));
    bottom: calc(var(--space-24) + 48px + var(--space-12) + var(--safe-bottom));
  }
  .back-to-top-guide {
    right: calc(var(--space-16) + 48px + var(--space-12) + var(--safe-right));
    bottom: calc(var(--space-24) + 48px + var(--space-12) + var(--safe-bottom));
  }
}

/* 首屏三角：尖头朝下，略向右偏（HCI 视觉平衡），丝滑动效 */
.scroll-hint {
  position: absolute;
  bottom: var(--space-16);
  left: 50%;
  width: 48px;
  height: 28px;
  margin-left: -24px;
  border: none;
  background: none;
  cursor: pointer;
  text-decoration: none;
  filter: drop-shadow(0 4px 12px rgba(14, 165, 233, 0.3)) drop-shadow(0 0 14px rgba(236, 72, 153, 0.15));
  opacity: var(--hero-fade, 1);
  --hint-x: calc(-50% + var(--scroll-hint-offset-x, 0px));
  transform: translateX(var(--hint-x));
  transition: transform var(--duration-apple) var(--ease-apple-out), filter var(--duration-apple) var(--ease-apple), opacity var(--duration-apple) var(--ease-apple);
  animation: scrollHintBounce 3s var(--ease-apple) infinite;
  z-index: 5;
  pointer-events: auto;
}
.scroll-hint::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 28px;
  background: linear-gradient(180deg, var(--neon-blue) 0%, var(--neon-pink) 50%, var(--neon-coral) 100%);
  clip-path: polygon(50% 100%, 0% 0%, 100% 0%);
  transition: opacity var(--duration-silk) var(--ease-apple);
}
.scroll-hint:hover {
  transform: translateX(var(--hint-x)) translateY(4px) scale(1.12);
  filter: drop-shadow(0 8px 20px rgba(14, 165, 233, 0.4)) drop-shadow(0 0 22px rgba(236, 72, 153, 0.25));
}
.scroll-hint:active {
  transform: translateX(var(--hint-x)) translateY(6px) scale(1.02);
  transition-duration: 0.12s;
}
@keyframes scrollHintBounce {
  0%, 100% { transform: translateX(calc(-50% + var(--scroll-hint-offset-x, 0px))) translateY(0); }
  50% { transform: translateX(calc(-50% + var(--scroll-hint-offset-x, 0px))) translateY(5px); }
}
.scroll-hint:hover { animation: none; }
/* 点击三角后渐隐，丝滑滚动 */
.scroll-hint.scroll-hint--fading {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity var(--duration-apple) var(--ease-apple);
}
@media (prefers-reduced-motion: reduce) {
  .scroll-hint { animation: none; }
  .scroll-hint.scroll-hint--fading { transition-duration: 0.2s; }
}

/* 下滑时三角变为像素礼花，明显引出正文 */
.hero.hero-confetti-burst {
  overflow: visible;
}
.hero.hero-confetti-burst .scroll-hint {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.hero-confetti {
  position: absolute;
  bottom: var(--space-16);
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 1px;
  overflow: visible;
  pointer-events: none;
  z-index: 100;
  visibility: hidden;
}
.hero.hero-confetti-burst .hero-confetti {
  visibility: visible;
}
.hero-confetti .particle {
  position: absolute;
  left: 0;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  opacity: 0;
  background: currentColor;
  box-shadow: 0 0 12px currentColor, 0 0 24px currentColor;
  will-change: transform, opacity;
}
.hero-confetti.is-burst .particle {
  animation: confetti-burst 1.4s var(--ease-out-expo) forwards;
}
@keyframes confetti-burst {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  70% {
    opacity: 0.95;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0.4);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-confetti.is-burst .particle { animation: none; opacity: 0; }
}

.hero-role {
  font-size: inherit;
  color: inherit;
  font-weight: inherit;
}

.hero-desc {
  margin: var(--space-24) 0 var(--space-32);
  font-size: 1.125rem;
  color: var(--text-tertiary);
  line-height: 1.7;
  max-width: 32em;
}

/* 按钮组样式 */
.hero-buttons,
.hero-cta-wrap {
  display: flex;
  gap: var(--space-16);
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 var(--space-32);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    var(--neon-blue) 0%, 
    var(--neon-pink) 50%, 
    var(--mint) 100%);
  opacity: 0;
  transition: opacity 0.3s var(--ease-smooth);
  z-index: -1;
}

.btn:hover::before {
  opacity: 1;
}

/* 主 CTA：霓虹日落渐变，简洁大气 */
.btn-primary {
  background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-pink) 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35), 0 0 30px rgba(236, 72, 153, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(14, 165, 233, 0.45), 0 0 40px rgba(236, 72, 153, 0.3);
}

/* 次 CTA：透明玻璃描边，与首屏统一 */
.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.12);
}

/* 视觉区域：右边离得远、只占一点点，原比例不裁剪，加很多透明度 */
.hero-visual {
  flex-shrink: 0;
  width: min(320px, 30vw);
  border-radius: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
  transition: all 0.6s var(--ease-out-expo);
  position: relative;
  z-index: 1;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.02) 100%
  );
  opacity: 0.8;
  transition: opacity 0.5s var(--ease-smooth);
  z-index: 1;
  pointer-events: none;
}

.hero-visual:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.hero-visual:hover::before {
  opacity: 0.6;
}

.hero-visual img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
  opacity: 0.9;
  transition: transform 1s var(--ease-out-expo), opacity 0.5s var(--ease-smooth);
}

.hero-visual:hover img {
  opacity: 1;
}

.hero:hover .hero-visual img {
  transform: scale(1.03);
}

/* 移动端适配 */
@media (max-width: 1024px) {
  .hero-inner {
    flex-direction: column;
    gap: var(--space-64);
    max-width: 800px;
  }
  
  .hero-frame {
    inset: -20px;
  }
  
  .hero h1 {
    font-size: 2.8rem;
  }
  
  .hero-visual {
    width: min(220px, 48vw);
  }
}

@media (max-width: 768px) {
  .hero {
    padding: var(--header-h) var(--space-24) var(--space-64);
  }
  
  .hero-inner {
    gap: var(--space-48);
  }
  
  .hero-frame {
    inset: -15px;
    display: none; /* 移动端隐藏霓虹框，避免性能问题 */
  }
  
  .hero-content {
    padding: var(--space-32) 0;
  }
  
  .hero h1 {
    font-size: 2.4rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
  }
  
  .hero-desc {
    font-size: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .btn {
    min-height: 52px;
    width: 100%;
  }
  
  /* 首屏 CTA 两按钮保持同高 */
  .hero-cta-wrap .hero-cta-btn {
    height: 56px !important;
    min-height: 56px !important;
    width: auto;
  }
  .hero-easter-egg--mario {
    height: 56px !important;
    min-height: 56px !important;
    width: 56px !important;
  }
}

/* 小屏手机（≤480px）：更紧凑排版、保证可读与触控；顶栏只保留 Logo + 播放 + 语言 + 菜单 */
@media (max-width: 480px) {
  /* 窄屏顶栏：隐藏音乐提示与进度条，保证 iPhone SE 等窄机完整看见导航栏 */
  .site-header .music-hint,
  .site-header .music-progress-wrap { display: none !important; }
  .site-header .logo { max-width: 50%; font-size: 1.125rem; }
  .site-header .music-control { gap: var(--space-4); }
  .site-header .header-inner { padding-left: calc(var(--space-8) + var(--safe-left)); padding-right: calc(var(--space-8) + var(--safe-right)); }
  .hero {
    padding: calc(var(--header-h) + var(--safe-top)) var(--space-16) calc(var(--space-40) + var(--safe-bottom));
  }
  .hero h1 { font-size: 2rem; }
  .hero-subtitle { font-size: 1.125rem; }
  .hero-expected-start { font-size: 1.125rem; padding: var(--space-10) var(--space-24); }
  .hero-directory__inner { padding-left: var(--space-16); padding-right: var(--space-16); gap: var(--space-6); }
  .hero-directory a { min-height: var(--touch); padding: 0 var(--space-10); font-size: 0.875rem; }
  .hero-cta-wrap { flex-direction: column; gap: var(--space-12); }
  .hero-cta-wrap .hero-cta-btn { width: 100%; min-height: var(--touch); }
  .section { padding: var(--space-48) 0; }
  .section .container {
    padding: var(--space-48) calc(var(--space-16) + var(--safe-right)) var(--space-48) calc(var(--space-16) + var(--safe-left));
  }
  .section-title { font-size: 1.5rem; }
  body { font-size: 1rem; }
  .about-intro { flex-direction: column; gap: var(--space-20); text-align: center; }
  .about-intro-text { font-size: 1rem; line-height: 1.6; }
  .about-row { padding: var(--space-12) calc(var(--space-16) + var(--safe-right)) var(--space-12) calc(var(--space-16) + var(--safe-left)); }
  .edu-blocks { gap: var(--space-24); }
  .edu-card { padding: var(--space-24) var(--space-20); }
  .timeline { padding-left: var(--space-24); }
  .timeline-content { padding: var(--space-16) var(--space-20); }
  .projects-grid { gap: var(--space-24); }
  .project-info { padding: var(--space-16); }
  .project-info h3 { font-size: 1.125rem; }
  .project-desc { font-size: 1rem; }
  .contact-item { padding: var(--space-12) var(--space-16); min-height: var(--touch); }
  .site-footer {
    padding: var(--space-40) calc(var(--space-24) + var(--safe-right)) calc(var(--space-40) + var(--safe-bottom)) calc(var(--space-24) + var(--safe-left));
  }
  /* 悬浮按钮在 768px 已垂直堆叠，480px 保持同位置 */
  .back-to-top { right: calc(var(--space-16) + var(--safe-right)); bottom: calc(var(--space-24) + 48px + var(--space-12) + var(--safe-bottom)); }
  .back-to-top-guide { right: calc(var(--space-16) + 48px + var(--space-12) + var(--safe-right)); bottom: calc(var(--space-24) + 48px + var(--space-12) + var(--safe-bottom)); }
  /* 移动端输入框 ≥16px，避免 iOS 聚焦时自动放大 */
  .ai-float-input,
  .contact-compose__input,
  .contact-compose__textarea,
  .works-search-input { font-size: 16px; min-height: var(--touch); }
  /* 首屏三角与底部目录：避开安全区域 */
  .scroll-hint { bottom: calc(var(--space-16) + var(--safe-bottom)); }
}

/* 超小屏（≤360px）：保证内容不溢出、触控区充足、安全区留白 */
@media (max-width: 360px) {
  .hero h1 { font-size: 1.75rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-expected-start { font-size: 1rem; padding: var(--space-8) var(--space-20); }
  .hero-directory a { font-size: 0.8125rem; padding: 0 var(--space-8); }
  .hero-directory__inner { padding-left: calc(var(--space-12) + var(--safe-left)); padding-right: calc(var(--space-12) + var(--safe-right)); }
  .section .container {
    padding: var(--space-40) calc(var(--space-12) + var(--safe-right)) var(--space-40) calc(var(--space-12) + var(--safe-left));
  }
  .section-title { font-size: 1.375rem; }
  .header-inner { padding-left: calc(var(--space-8) + var(--safe-left)); padding-right: calc(var(--space-8) + var(--safe-right)); }
  .site-header .logo { font-size: 1rem; max-width: 42%; }
}

/* ========== 手机端 HCI：商业产品级体验（触控、反馈、节奏、无障碍） ========== */
@media (max-width: 768px) {
  /* 移动端专用变量：触控区 ≥44px、阅读行高、节奏间距、手感时长 */
  :root {
    --touch-mobile: 48px;
    --line-mobile: 1.6;
    --section-gap-mobile: 56px;
    --tap-duration: 0.12s;
    --tap-ease: cubic-bezier(0.2, 0, 0, 1);
  }
  /* 正文可读性：行高 1.6、最小字号 16px 防 iOS 自动放大 */
  body {
    line-height: var(--line-mobile);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  /* 手感：触控即响应，减少延迟感 */
  a, button, [role="button"], input, select, textarea, [tabindex]:not([tabindex="-1"]) {
    -webkit-tap-highlight-color: rgba(14, 165, 233, 0.15);
    touch-action: manipulation;
  }
  /* 主按钮：快速下沉 + 轻微透明度，按下即有反馈 */
  .btn, .hero-cta-btn, .btn-primary, .btn-secondary {
    min-height: var(--touch-mobile);
    padding: var(--space-12) var(--space-24);
    transition: transform var(--tap-duration) var(--tap-ease), box-shadow var(--tap-duration) var(--tap-ease), opacity var(--tap-duration) var(--tap-ease);
  }
  .btn:active, .hero-cta-btn:active, .btn-primary:active, .btn-secondary:active {
    transform: scale(0.97);
    opacity: 0.92;
  }
  /* 顶栏与导航：触控区充足 */
  .site-header .logo, .music-toggle, .nav-lang-toggle, .nav-toggle {
    min-height: var(--touch-mobile);
    min-width: var(--touch-mobile);
    transition: opacity var(--tap-duration) var(--tap-ease), transform var(--tap-duration) var(--tap-ease);
  }
  .site-header .logo:active, .music-toggle:active, .nav-lang-toggle:active, .nav-toggle:active {
    opacity: 0.85;
  }
  .site-header .nav a {
    min-height: var(--touch-mobile);
    padding: var(--space-14) var(--space-16);
    border-radius: 12px;
    transition: background var(--tap-duration) var(--tap-ease), transform var(--tap-duration) var(--tap-ease), opacity var(--tap-duration) var(--tap-ease);
  }
  .site-header .nav a:active {
    background: rgba(14, 165, 233, 0.14);
    transform: scale(0.98);
    opacity: 0.95;
  }
  /* 首屏目录：快速按压反馈 */
  .hero-directory a {
    min-height: var(--touch-mobile);
    padding: var(--space-12) var(--space-16);
    border-radius: 12px;
    transition: transform var(--tap-duration) var(--tap-ease), background var(--tap-duration) var(--tap-ease), opacity var(--tap-duration) var(--tap-ease);
  }
  .hero-directory a:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.25);
    opacity: 0.92;
  }
  /* 区块标题：层级清晰、留白舒适 */
  .section-title {
    line-height: 1.3;
    margin-bottom: var(--space-24);
  }
  .section .container {
    padding-top: var(--section-gap-mobile);
    padding-bottom: var(--section-gap-mobile);
  }
  /* 卡片/列表项：快速反馈 */
  .about-row, .contact-item, .project-card, .work-thumb, .game-card, .note-item, .edu-card {
    min-height: 0;
    transition: transform var(--tap-duration) var(--tap-ease), background var(--tap-duration) var(--tap-ease);
  }
  .about-row:active, .contact-item:active {
    background: var(--mint-soft);
    transition-duration: 0.08s;
  }
  .project-card:active, .work-thumb:active, .game-card:active {
    transform: scale(0.985);
    transition-duration: 0.08s;
  }
  .note-item:active {
    transform: translateX(2px) scale(0.995);
    transition-duration: 0.08s;
  }
  /* 侧栏设置：快速按压 */
  .side-toolbar__trigger {
    min-height: 56px;
    min-width: 48px;
    transition: transform var(--tap-duration) var(--tap-ease), opacity var(--tap-duration) var(--tap-ease);
  }
  .side-toolbar__trigger:active {
    transform: translateY(-50%) scale(0.94);
    opacity: 0.9;
  }
  .side-toolbar__action, .side-toolbar__close, .side-toolbar__theme-btn, .side-toolbar__lang-btn {
    min-height: var(--touch-mobile);
    padding: var(--space-12) var(--space-16);
    border-radius: 12px;
    transition: transform var(--tap-duration) var(--tap-ease), opacity var(--tap-duration) var(--tap-ease);
  }
  .side-toolbar__action:active, .side-toolbar__close:active,
  .side-toolbar__theme-btn:active, .side-toolbar__lang-btn:active {
    transform: scale(0.97);
    opacity: 0.9;
  }
  /* 悬浮按钮：按下即沉 */
  .back-to-top, .ai-float-toggle {
    transition: transform var(--tap-duration) var(--tap-ease), opacity var(--tap-duration) var(--tap-ease);
  }
  .back-to-top:active, .ai-float-toggle:active {
    transform: translateY(0) scale(0.92);
    opacity: 0.9;
  }
  /* 焦点环：键盘/读屏可见 */
  a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--neon-blue);
    outline-offset: 2px;
  }
  /* 首屏三角：快速下沉 */
  .scroll-hint {
    min-width: 48px;
    min-height: 48px;
    padding: 10px;
    margin-left: -34px;
    transition: transform var(--tap-duration) var(--tap-ease);
  }
  .scroll-hint:active {
    transform: translateX(var(--hint-x)) translateY(4px) scale(0.94);
    transition-duration: 0.08s;
  }
  /* 入场动画跳过：大触控区 */
  .intro-overlay {
    cursor: pointer;
  }
  .intro-overlay__content {
    padding: var(--space-32);
  }
  /* 横向滚动区：顺滑惯性 */
  .projects-grid, .works-gallery, .notes-list {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
}

@media (max-width: 480px) {
  :root { --section-gap-mobile: 48px; --touch-mobile: 44px; }
  .section .container { padding-top: var(--section-gap-mobile); padding-bottom: var(--section-gap-mobile); }
  .section-title { font-size: 1.5rem; margin-bottom: var(--space-20); }
}

@media (max-width: 360px) {
  :root { --section-gap-mobile: 40px; }
}

/* 减少动画的辅助功能支持 */
@media (prefers-reduced-motion: reduce) {
  .hero-frame::before {
    animation: none;
  }
  
  .hero-visual:hover,
  .hero-visual img,
  .btn-primary:hover {
    transform: none;
  }
  /* 手机端 HCI 按压反馈：在「减少动画」时取消 scale/opacity 动效，保留颜色反馈 */
  .btn:active, .hero-cta-btn:active, .btn-primary:active, .btn-secondary:active,
  .site-header .nav a:active, .hero-directory a:active,
  .about-row:active, .contact-item:active,
  .project-card:active, .work-thumb:active, .game-card:active, .note-item:active,
  .side-toolbar__trigger:active, .side-toolbar__action:active, .side-toolbar__close:active,
  .side-toolbar__theme-btn:active, .side-toolbar__lang-btn:active,
  .back-to-top:active, .ai-float-toggle:active, .scroll-hint:active {
    transform: none;
    opacity: 1;
  }
  .site-header .logo:active, .music-toggle:active, .nav-lang-toggle:active, .nav-toggle:active {
    opacity: 1;
  }
}

/* ========== 个人简介 ========== */
.about-intro {
  display: flex;
  align-items: center;
  gap: var(--space-32);
  margin-bottom: var(--space-32);
  flex-wrap: wrap;
}
.about-avatar {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform var(--duration) var(--ease);
}
.about-avatar:hover { transform: scale(1.02); box-shadow: var(--shadow); }
.about-avatar img { width: 100%; height: 100%; object-fit: cover; }
.about-avatar-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(201, 61, 92, 0.06), rgba(0, 168, 148, 0.06));
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary); font-size: var(--text-caption); padding: var(--space-8);
}
.about-intro-text {
  flex: 1;
  margin: 0;
  min-width: 200px;
  color: var(--text-secondary);
  line-height: 1.75;
  font-size: var(--text-body);
  font-weight: 600;
  text-shadow: none;
}
.about-list { list-style: none; margin: 0; padding: 0; border-radius: var(--radius); overflow: hidden; background: var(--card-bg); border: 1px solid var(--border); }
.about-row {
  display: grid;
  grid-template-columns: auto 5.5em 1fr;
  align-items: start;
  gap: var(--space-12) var(--space-16);
  padding: var(--space-16) var(--space-24);
  border-bottom: 1px solid var(--border);
  transition: background 0.45s var(--ease-smooth), transform 0.45s var(--ease-apple-out);
}
.about-row:last-child { border-bottom: none; }
.about-row:hover { background: var(--mint-soft); transform: translateX(4px); }
.about-row-icon { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; color: var(--neon-blue); flex-shrink: 0; transition: color 0.4s var(--ease-smooth), transform 0.4s var(--ease-out-expo); }
.about-row:hover .about-row-icon { color: var(--mint); transform: scale(1.12); }
.about-row-icon svg { width: 18px; height: 18px; }
.about-row-label { font-size: var(--text-small); color: var(--text-secondary); flex-shrink: 0; font-weight: 600; text-shadow: none; }
.about-row-value { font-size: var(--text-body); color: var(--text-primary); min-width: 0; }
/* HCI：占位文案与正文区分，便于填写与扫读 */
.about-row-value span[data-placeholder] { color: var(--text-secondary); }
.about-row-full { grid-template-columns: auto 5.5em 1fr; }
.about-row-full .about-row-value-block { display: block; margin-top: var(--space-4); line-height: 1.75; color: var(--text-tertiary); font-size: var(--text-small); }
@media (max-width: 480px) {
  .about-row { grid-template-columns: auto 1fr; gap: var(--space-8) var(--space-12); }
  .about-row-label { grid-column: 1; grid-row: 2; margin-left: 36px; }
  .about-row-value { grid-column: 1 / -1; margin-left: 36px; }
  .about-row-full .about-row-value-block { margin-left: 0; }
}

/* ========== 教育背景：独立大模块，显眼 ========== */
.section-education .section-title-wrap { margin-bottom: var(--space-48); }
.edu-blocks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-32);
  max-width: 720px;
  margin: 0 auto;
}
.edu-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-32) var(--space-32);
  transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-smooth), border-color 0.4s var(--ease-smooth), background 0.4s var(--ease-smooth);
  position: relative;
  overflow: hidden;
}
.edu-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--neon-blue), var(--mint));
  opacity: 0.9;
  transition: opacity 0.4s var(--ease-smooth);
}
.edu-card.edu-master::before { background: linear-gradient(90deg, var(--neon-pink), var(--neon-blue)); }
.edu-card.edu-bachelor::before { background: linear-gradient(90deg, var(--neon-blue), var(--mint)); }
.edu-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-accent);
}
.edu-card:hover::before { opacity: 1; }
.edu-degree {
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--neon-blue), var(--mint));
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius);
  margin-bottom: var(--space-16);
}
.edu-card.edu-master .edu-degree { background: linear-gradient(135deg, var(--neon-pink), var(--neon-blue)); }
.edu-school {
  margin: 0 0 var(--space-8);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}
.edu-major {
  margin: 0 0 var(--space-8);
  font-size: var(--text-body);
  color: var(--text-secondary);
}
.edu-time {
  margin: 0;
  font-size: var(--text-small);
  color: var(--text-quaternary);
}
@media (max-width: 640px) {
  .edu-blocks { grid-template-columns: 1fr; gap: var(--space-24); }
  .edu-card { padding: var(--space-24) var(--space-24); }
}

/* ========== 实习经历 ========== */
.timeline { position: relative; padding-left: var(--space-32); border-left: 2px solid var(--border); }
.timeline-item { position: relative; padding-bottom: var(--space-32); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
  position: absolute;
  left: calc(-1 * var(--space-32));
  top: var(--space-8);
  transform: translateX(50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-blue), var(--mint));
  border: 2px solid #fff;
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.4);
  transition: transform 0.45s var(--ease-out-expo), box-shadow 0.45s var(--ease-smooth);
}
.timeline-item:hover .timeline-marker { transform: translateX(50%) scale(1.25); box-shadow: 0 0 24px rgba(45, 212, 191, 0.55); }
.timeline-content {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-24) var(--space-32);
  transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-smooth), border-color 0.4s var(--ease-smooth), background 0.4s var(--ease-smooth);
}
.timeline-content:hover { background: rgba(255, 255, 255, 0.96); box-shadow: var(--shadow-hover); border-color: var(--border-accent); transform: translateX(8px); }
.timeline-content .company { margin: 0 0 var(--space-8); font-size: var(--text-h3); font-weight: 600; color: var(--text-primary); }
.timeline-content .time { margin: 0 0 var(--space-16); font-size: var(--text-small); color: var(--text-quaternary); }
.timeline-content .role, .timeline-content .duty, .timeline-content .result { margin: 0 0 var(--space-8); font-size: var(--text-body); color: var(--text-quaternary); }
.timeline-content .role span { color: var(--text-primary); }

/* ========== 项目经历：横向划栏，可放多个视频/项目 ========== */
/* 项目筛选：Gameplay / 数字孪生 / 互动投影 / 游戏引擎，横向滚动条 */
.projects-filter-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 calc(-1 * var(--space-32)) var(--space-20);
  padding: 0 var(--space-32) var(--space-16);
  -webkit-overflow-scrolling: touch;
}
.projects-filter-wrap::-webkit-scrollbar { height: 6px; }
.projects-filter-wrap::-webkit-scrollbar-track { background: rgba(0,0,0,0.04); border-radius: 3px; }
.projects-filter-wrap::-webkit-scrollbar-thumb { background: rgba(14, 165, 233, 0.3); border-radius: 3px; }
.projects-filter {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-8);
  min-width: min-content;
}
.projects-filter-btn {
  flex-shrink: 0;
  min-height: 36px;
  padding: 0 var(--space-16);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: var(--text-small);
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.35s var(--ease-apple-out), border-color 0.4s var(--ease-apple), background 0.4s var(--ease-apple), color 0.4s var(--ease-apple);
}
.projects-filter-btn:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
  transform: translateY(-2px);
}
.projects-filter-btn.is-active {
  border-color: var(--neon-blue);
  background: rgba(14, 165, 233, 0.12);
  color: var(--neon-blue);
}
.projects-filter-btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
.project-card.is-hidden {
  display: none !important;
}

/* 项目列表：与「全部」一致，每个筛选下都可横向滑动（inner 保证最小宽度） */
.projects-grid {
  overflow-x: scroll;
  overflow-y: hidden;
  padding-bottom: var(--space-16);
  margin: 0 calc(-1 * var(--space-32)) 0 calc(-1 * var(--space-32));
  padding-left: var(--space-32);
  padding-right: var(--space-32);
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.projects-grid:active { cursor: grabbing; }
.projects-grid::-webkit-scrollbar { height: 8px; }
.projects-grid::-webkit-scrollbar-track { background: rgba(0,0,0,0.04); border-radius: 4px; }
.projects-grid::-webkit-scrollbar-thumb { background: rgba(14, 165, 233, 0.3); border-radius: 4px; }
.projects-grid::-webkit-scrollbar-thumb:hover { background: rgba(14, 165, 233, 0.5); }
.projects-grid-inner {
  display: flex;
  gap: var(--space-24);
  min-width: 120%;
  padding-right: var(--space-32);
  scroll-snap-type: x proximity;
}
.project-card {
  flex: 0 0 auto;
  width: min(420px, 88vw);
  min-width: 320px;
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-24);
  align-items: start;
  background: var(--card-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.5s var(--ease-apple-out), box-shadow 0.5s var(--ease-apple-out), border-color 0.45s var(--ease-apple), background 0.45s var(--ease-apple);
}
.project-card:hover { background: rgba(255, 255, 255, 0.96); box-shadow: var(--shadow-hover); border-color: var(--border-accent); transform: translateY(-6px); }
.project-card:active { transform: translateY(-2px); transition-duration: 0.15s; }
.project-media {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg-secondary);
  overflow: hidden;
}
.project-media[data-video]:not([data-video=""]) { cursor: pointer; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-apple-out); }
.project-card:hover .project-media img { transform: scale(1.08); }
.project-media-play {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  font-size: 0;
  line-height: 0;
  pointer-events: none;
  transition: background 0.3s var(--ease-smooth);
}
.project-media-play::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 24px 0 24px 40px;
  border-color: transparent transparent transparent #fff;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}
.project-media[data-video]:not([data-video=""]) .project-media-play {
  display: flex;
}
.project-media[data-video]:not([data-video=""]):hover .project-media-play {
  background: rgba(0, 0, 0, 0.5);
}
.project-video-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-8);
  color: var(--text-tertiary); font-size: var(--text-small);
  border: 1px dashed var(--border);
}
.project-info { padding: var(--space-24); }
.project-info h3 { margin: 0 0 var(--space-12); font-size: var(--text-h3); color: var(--text-primary); }
.project-desc { margin: 0 0 var(--space-16); font-size: var(--text-body); color: var(--text-tertiary); }
.link-github { display: inline-flex; align-items: center; gap: var(--space-8); font-weight: 500; transition: opacity var(--duration) var(--ease); }
.link-github:hover { text-decoration: none; opacity: 0.85; }
@media (max-width: 640px) {
  .project-card { grid-template-columns: 1fr; min-width: 280px; width: min(320px, 92vw); }
  .projects-grid {
    margin-left: 0;
    margin-right: 0;
    padding-left: calc(var(--space-24) + var(--safe-left));
    padding-right: calc(var(--space-24) + var(--safe-right));
  }
}
@media (max-width: 480px) {
  .projects-grid {
    margin-left: 0;
    margin-right: 0;
    padding-left: calc(var(--space-16) + var(--safe-left));
    padding-right: calc(var(--space-16) + var(--safe-right));
  }
  .works-gallery,
  .notes-list {
    margin-left: 0;
    padding-left: calc(var(--space-16) + var(--safe-left));
    padding-right: calc(var(--space-16) + var(--safe-right));
  }
}

/* 项目视频播放模态框：缩略图点击后直接播放 assets 下本地视频 */
.project-video-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-24);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-smooth), visibility 0.35s var(--ease-smooth);
}
.project-video-modal.is-open {
  opacity: 1;
  visibility: visible;
}
.project-video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  cursor: pointer;
}
.project-video-modal-inner {
  position: relative;
  width: 100%;
  max-width: 900px;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.project-video-modal-close {
  position: absolute;
  top: var(--space-12);
  right: var(--space-12);
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s var(--ease-smooth);
}
.project-video-modal-close:hover { background: rgba(0, 0, 0, 0.85); }
.project-video-modal-close:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }
.project-video-modal-player {
  width: 100%;
  display: block;
  max-height: 80vh;
}

/* 头像查看模态框：放大/缩小/下载（不影响原头像布局） */
.avatar-modal {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-24);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-smooth), visibility 0.35s var(--ease-smooth);
}
.avatar-modal.is-open {
  opacity: 1;
  visibility: visible;
}
.avatar-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  cursor: pointer;
}
.avatar-modal-inner {
  position: relative;
  width: min(920px, 92vw);
  height: min(720px, 88vh);
  background: rgba(10, 12, 14, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
}
.avatar-modal-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-12);
  justify-content: flex-end;
}
.avatar-modal-btn,
.avatar-modal-close,
.avatar-modal-download {
  height: 40px;
  min-width: 40px;
  padding: 0 var(--space-12);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.25s var(--ease-out-expo), background 0.25s var(--ease-smooth), border-color 0.25s var(--ease-smooth);
}
.avatar-modal-download {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.avatar-modal-btn:hover,
.avatar-modal-close:hover,
.avatar-modal-download:hover {
  transform: translateY(-1px);
  background: rgba(14, 165, 233, 0.18);
  border-color: rgba(14, 165, 233, 0.35);
}
.avatar-modal-btn:active,
.avatar-modal-close:active,
.avatar-modal-download:active {
  transform: translateY(0) scale(0.98);
}
.avatar-modal-btn:focus-visible,
.avatar-modal-close:focus-visible,
.avatar-modal-download:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
.avatar-modal-stage {
  position: relative;
  flex: 1;
  overflow: hidden;
  display: grid;
  place-items: center;
  cursor: grab;
  user-select: none;
}
.avatar-modal-stage:active { cursor: grabbing; }
.avatar-modal-img {
  max-width: 92%;
  max-height: 92%;
  display: block;
  transform-origin: center center;
  will-change: transform;
}
.avatar-modal-hint {
  padding: var(--space-12);
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--text-caption);
  text-align: center;
}
@media (prefers-reduced-motion: reduce) {
  .avatar-modal { transition: none; }
  .avatar-modal-btn,
  .avatar-modal-close,
  .avatar-modal-download { transition: none; }
}

/* ========== 笔记文档：横向划栏，可放多个笔记 ========== */
.notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-16);
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: var(--space-16);
  margin: 0 calc(-1 * var(--space-32)) 0 calc(-1 * var(--space-32));
  padding-left: var(--space-32);
  padding-right: var(--space-32);
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.notes-list:active { cursor: grabbing; }
.notes-list::-webkit-scrollbar { height: 8px; }
.notes-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.04); border-radius: 4px; }
.notes-list::-webkit-scrollbar-thumb { background: rgba(45, 212, 191, 0.3); border-radius: 4px; }
.notes-list::-webkit-scrollbar-thumb:hover { background: rgba(45, 212, 191, 0.5); }
.note-row {
  flex: 0 0 auto;
  width: min(300px, 85vw);
  min-width: 260px;
  scroll-snap-align: start;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-bg);
  overflow: hidden;
  transition: transform 0.45s var(--ease-apple-out), box-shadow 0.45s var(--ease-apple), border-color 0.4s var(--ease-apple);
}
.note-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--border-accent); }
.note-row:last-child { border-bottom: 1px solid var(--border); }
.note-item {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  padding: var(--space-16) var(--space-20);
  min-height: var(--touch);
  color: var(--text-primary);
  text-decoration: none;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  transition: background 0.45s var(--ease-apple), color 0.45s var(--ease-apple), transform 0.45s var(--ease-apple-out);
}
.note-item:hover { background: var(--mint-soft); color: var(--text-primary); transform: translateX(6px); }
.note-item:active { transform: translateX(3px) scale(0.995); transition-duration: 0.12s; }
.note-item-icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; color: var(--neon-blue); transition: color var(--duration-apple) var(--ease-apple), transform var(--duration-apple) var(--ease-apple-out); order: 0; }
.note-item:hover .note-item-icon { color: var(--mint); transform: scale(1.06); }
.note-item-icon svg { width: 20px; height: 20px; }
/* 两行布局：第一行 图标+标题+类型，第二行 分类+浏览量，避免文字重叠 */
.note-item {
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-8) var(--space-12);
}
.note-item .note-title {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  font-weight: 500;
  font-size: var(--text-body);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  order: 1;
}
.note-type {
  flex-shrink: 0;
  font-size: var(--text-caption);
  font-weight: 600;
  font-family: var(--font-mono);
  padding: var(--space-8) var(--space-12);
  border-radius: var(--radius);
  color: var(--text-quaternary);
  background: var(--mint-soft);
  border: 1px solid rgba(45, 212, 191, 0.3);
  transition: background var(--duration-apple) var(--ease-apple), color var(--duration-apple) var(--ease-apple), transform var(--duration-apple) var(--ease-apple-out);
  order: 2;
}
.note-meta {
  flex: 1 1 100%;
  font-size: var(--text-caption);
  color: var(--text-quaternary);
  order: 3;
}
.note-views {
  font-size: var(--text-caption);
  color: var(--text-quaternary);
  flex-shrink: 0;
  white-space: nowrap;
  transition: color 0.3s var(--ease-smooth);
  order: 4;
}
.note-item:hover .note-views { color: var(--text-tertiary); }
.note-item:hover .note-type { background: rgba(45, 212, 191, 0.25); color: var(--text-primary); transform: scale(1.02); }
.note-item--pdf .note-item-icon { color: var(--neon-blue); }
.note-item--md .note-item-icon { color: var(--text-secondary); }
.note-item--url .note-item-icon { color: var(--mint); }

/* ========== 技术栈 ========== */
.tech-groups { display: flex; flex-direction: column; gap: var(--space-32); }
.tech-group h4 { margin: 0 0 var(--space-16); font-size: var(--text-body); font-weight: 600; color: var(--text-secondary); text-shadow: none; }
.tech-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-8); }
.tech-tags li {
  padding: var(--space-8) var(--space-16);
  font-size: var(--text-small);
  font-family: var(--font-mono);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  transition: transform 0.35s var(--ease-out-expo), box-shadow 0.35s var(--ease-smooth), border-color 0.3s var(--ease-smooth), background 0.3s var(--ease-smooth);
}
.tech-tags li:hover { background: var(--mint-soft); border-color: rgba(45, 212, 191, 0.4); transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.tech-tags li.tech-mint { border-color: rgba(45, 212, 191, 0.35); background: var(--mint-soft); }
.tech-tags li.tech-mint:hover { border-color: var(--mint); background: rgba(45, 212, 191, 0.25); color: var(--text-primary); }

/* ========== 作品展示：横向划栏，可放多个作品/视频 ========== */
/* 作品筛选：名称搜索 + 分类（Gameplay / 图形学 / 建模与动画 / 性能优化），横向滚动条 */
.works-search-wrap {
  margin-bottom: var(--space-16);
}
.works-search-label {
  display: block;
  font-size: var(--text-caption);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}
.works-search-input {
  width: 100%;
  max-width: 320px;
  min-height: 40px;
  padding: 0 var(--space-16);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: var(--text-body);
  font-family: inherit;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.works-search-input::placeholder {
  color: var(--text-quaternary);
}
.works-search-input:hover {
  border-color: var(--border-accent);
}
.works-search-input:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}
.works-filter-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 calc(-1 * var(--space-32)) var(--space-24);
  padding: 0 var(--space-32) var(--space-16);
  -webkit-overflow-scrolling: touch;
}
.works-filter-wrap::-webkit-scrollbar { height: 6px; }
.works-filter-wrap::-webkit-scrollbar-track { background: rgba(0,0,0,0.04); border-radius: 3px; }
.works-filter-wrap::-webkit-scrollbar-thumb { background: rgba(236, 72, 153, 0.25); border-radius: 3px; }
.works-filter {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-8);
  min-width: min-content;
}
.works-filter-btn {
  flex-shrink: 0;
  min-height: 36px;
  padding: 0 var(--space-16);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: var(--text-small);
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.35s var(--ease-apple-out), border-color 0.4s var(--ease-apple), background 0.4s var(--ease-apple), color 0.4s var(--ease-apple);
}
.works-filter-btn:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
  transform: translateY(-2px);
}
.works-filter-btn.is-active {
  border-color: var(--neon-blue);
  background: rgba(14, 165, 233, 0.12);
  color: var(--neon-blue);
}
.works-filter-btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
.work-thumb.is-hidden {
  display: none !important;
}

/* 作品列表：与「全部」一致，每个筛选下都可横向滑动（inner 保证最小宽度） */
.works-gallery {
  overflow-x: scroll;
  overflow-y: hidden;
  padding-bottom: var(--space-16);
  margin: 0 calc(-1 * var(--space-32)) 0 calc(-1 * var(--space-32));
  padding-left: var(--space-32);
  padding-right: var(--space-32);
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.works-gallery:active { cursor: grabbing; }
.works-gallery::-webkit-scrollbar { height: 8px; }
.works-gallery::-webkit-scrollbar-track { background: rgba(0,0,0,0.04); border-radius: 4px; }
.works-gallery::-webkit-scrollbar-thumb { background: rgba(236, 72, 153, 0.25); border-radius: 4px; }
.works-gallery::-webkit-scrollbar-thumb:hover { background: rgba(236, 72, 153, 0.45); }
.works-gallery-inner {
  display: flex;
  gap: var(--space-24);
  min-width: 120%;
  padding-right: var(--space-32);
  scroll-snap-type: x proximity;
}
.work-thumb {
  flex: 0 0 auto;
  width: min(320px, 85vw);
  min-width: 260px;
  scroll-snap-align: start;
  position: relative;
  display: block;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.55s var(--ease-apple-out), box-shadow 0.55s var(--ease-apple-out), border-color 0.45s var(--ease-apple), background 0.45s var(--ease-apple);
}
.work-thumb:hover { background: rgba(255, 255, 255, 0.96); transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: var(--border-accent); color: var(--text-primary); }
.work-thumb:active { transform: translateY(-2px); transition-duration: 0.15s; }
.work-thumb-img { position: absolute; inset: 0; }
.work-thumb-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-apple-out); }
.work-thumb:hover .work-thumb-img img { transform: scale(1.08); }
.work-thumb-play {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  font-size: 0;
  line-height: 0;
  pointer-events: none;
  z-index: 1;
  transition: background 0.3s var(--ease-smooth);
}
.work-thumb-play::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 24px 0 24px 40px;
  border-color: transparent transparent transparent #fff;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}
.work-thumb[data-video]:not([data-video=""]) { cursor: pointer; }
.work-thumb[data-video]:not([data-video=""]) .work-thumb-play { display: flex; }
.work-thumb[data-video]:not([data-video=""]):hover .work-thumb-play { background: rgba(0, 0, 0, 0.5); }
.work-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(14, 165, 233, 0.15) 40%, rgba(236, 72, 153, 0.2) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-24);
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s var(--ease-smooth);
}
.work-thumb:hover .work-thumb-overlay { opacity: 1; }
.work-thumb-title { font-size: var(--text-h3); font-weight: 600; color: #fff; margin: 0 0 var(--space-8); text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.work-thumb-tag { font-size: var(--text-caption); color: rgba(255,255,255,0.85); font-family: var(--font-mono); }
.work-thumb--no-img .work-thumb-overlay { opacity: 1; background: rgba(255, 252, 248, 0.95); }
.work-thumb--no-img .work-thumb-overlay .work-thumb-title,
.work-thumb--no-img .work-thumb-overlay .work-thumb-tag { color: var(--text-primary); }
.work-thumb--no-img .work-thumb-overlay .work-thumb-tag { color: var(--text-quaternary); }
.work-detail-panel { display: none; margin-top: var(--space-48); padding: var(--space-32); background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); }
.work-detail-panel[aria-hidden="false"] { display: block; }
.work-detail-close {
  float: right;
  padding: var(--space-8) var(--space-16);
  font-size: var(--text-small);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-tertiary);
  border-radius: var(--radius);
  cursor: pointer;
  min-height: var(--touch);
  transition: color var(--duration) var(--ease), border-color var(--duration) var(--ease), background var(--duration) var(--ease);
}
.work-detail-close:hover { color: var(--text-primary); border-color: var(--link); background: rgba(201, 61, 92, 0.06); }

/* ========== 联系方式：HR 快速联系，一键复制 ========== */
.section-contact .container--contact {
  position: relative;
  border: 1px solid rgba(14, 165, 233, 0.2);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.15), 0 16px 48px rgba(14, 165, 233, 0.08);
}
.section-desc--contact {
  margin-top: calc(-1 * var(--space-16));
  margin-bottom: var(--space-32);
  font-size: var(--text-small);
  color: var(--text-tertiary);
}

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-24); }
.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  padding: var(--space-16) var(--space-20);
  min-height: var(--touch);
  font-size: 0.875rem;
  white-space: nowrap;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-smooth), border-color 0.4s var(--ease-smooth), background 0.4s var(--ease-smooth);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.contact-item--copy {
  width: 100%;
  border: none;
  outline: none;
}
.contact-item:hover { background: var(--mint-soft); transform: translateX(8px); box-shadow: var(--shadow-hover); border-color: var(--border-accent); text-decoration: none; color: var(--text-primary); }
.contact-item:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }
.contact-icon { font-size: 1rem; font-weight: 700; color: var(--neon-blue); flex-shrink: 0; transition: transform 0.35s var(--ease-out-expo), color 0.35s var(--ease-smooth); }
.contact-icon svg { width: 1em; height: 1em; display: block; }
.contact-item:hover .contact-icon { transform: scale(1.12); color: var(--mint); }
.contact-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.contact-copy-hint {
  font-size: var(--text-caption);
  color: var(--text-quaternary);
  opacity: 0;
  transition: opacity 0.3s var(--ease-smooth);
}
.contact-item:hover .contact-copy-hint { opacity: 1; color: var(--neon-blue); }

/* 联系方式：网页发邮件编辑区 — 美观大气简洁丝滑，布局重设计 */
.contact-compose {
  margin-top: var(--space-64);
  padding-top: var(--space-56);
  border-top: 1px solid var(--border);
}
.contact-compose__card {
  max-width: 580px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--duration-apple) var(--ease-apple), border-color var(--duration-apple) var(--ease-apple), transform var(--duration-apple) var(--ease-apple-out);
}
/* 邮件卡片入场：父级 reveal 后卡片轻微缩放落地 */
.section.reveal .contact-compose .contact-compose__card {
  transform: scale(0.97);
}
.section.reveal.is-visible .contact-compose .contact-compose__card {
  animation: composeCardIn 0.6s var(--ease-apple-out) 0.2s forwards;
}
@keyframes composeCardIn {
  to { transform: scale(1); }
}
.contact-compose__card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--border-accent);
}
[data-theme="dark"] .contact-compose__card {
  background: rgba(21, 32, 43, 0.72);
}

/* 头部：可点击折叠，左侧色条 + 标题强调 */
.contact-compose__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-16);
  padding: var(--space-32) var(--space-40);
  border-left: 4px solid var(--neon-blue);
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.06) 0%, transparent 100%);
  border-radius: 0 12px 12px 0;
  margin-left: 0;
  cursor: pointer;
  transition: border-color var(--duration-apple) var(--ease-apple), background var(--duration-apple) var(--ease-apple);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.contact-compose__head:hover {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.1) 0%, transparent 100%);
}
.contact-compose__card:hover .contact-compose__head {
  border-left-color: var(--mint);
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.08) 0%, rgba(45, 212, 191, 0.04) 40%, transparent 100%);
}
.contact-compose__card:hover .contact-compose__head:hover {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.12) 0%, rgba(45, 212, 191, 0.06) 40%, transparent 100%);
}
.contact-compose__chevron {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  transition: transform var(--duration-apple) var(--ease-apple), color var(--duration-apple) var(--ease-apple);
}
.contact-compose__head:hover .contact-compose__chevron {
  color: var(--neon-blue);
}
.contact-compose__card.is-collapsed .contact-compose__chevron {
  transform: rotate(-90deg);
}
.contact-compose__head-text {
  flex: 1;
  min-width: 0;
}
/* 可折叠内容区：展开时留足高度以便动画 */
.contact-compose__body {
  max-height: 720px;
  overflow: hidden;
  transition: max-height var(--duration-reveal) var(--ease-apple-out), opacity 0.35s var(--ease-apple);
}
.contact-compose__card.is-collapsed .contact-compose__body {
  max-height: 0;
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .contact-compose__body {
    transition: none;
  }
  .contact-compose__card.is-collapsed .contact-compose__body {
    display: none;
  }
}
.contact-compose__title {
  margin: 0 0 var(--space-12);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--neon-blue);
  letter-spacing: var(--letter-tight);
  line-height: 1.3;
  background: linear-gradient(135deg, var(--neon-blue) 0%, var(--mint) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: filter var(--duration-apple) var(--ease-apple);
}
.contact-compose__card:hover .contact-compose__title {
  filter: brightness(1.08);
}
.contact-compose__desc {
  margin: 0;
  font-size: var(--text-small);
  line-height: 1.6;
  color: var(--text-tertiary);
}

/* 表单区：与头部留白加大；各区块间距拉开更美观 */
.contact-compose__form {
  padding: var(--space-40) var(--space-40) var(--space-32);
  display: flex;
  flex-direction: column;
  gap: var(--space-32);
}
.contact-compose__field--body {
  margin-top: var(--space-24);
  padding-top: var(--space-28);
  border-top: 1px solid var(--border);
}
.contact-compose__row {
  display: flex;
  flex-direction: column;
  gap: var(--space-28);
}
@media (min-width: 520px) {
  .contact-compose__row--two {
    flex-direction: row;
    gap: var(--space-28);
  }
  .contact-compose__row--two .contact-compose__field {
    flex: 1;
    min-width: 0;
  }
}
.contact-compose__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}
.contact-compose__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--duration-apple) var(--ease-apple);
}
.contact-compose__field:focus-within .contact-compose__label {
  color: var(--neon-blue);
}
.contact-compose__field-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  transition: color var(--duration-apple) var(--ease-apple);
}
.contact-compose__field:focus-within .contact-compose__field-icon {
  color: var(--neon-blue);
}
.contact-compose__input,
.contact-compose__textarea {
  width: 100%;
  min-height: var(--touch);
  padding: var(--space-14) var(--space-18);
  font-size: var(--text-body);
  font-family: inherit;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  transition: border-color var(--duration-apple) var(--ease-apple), box-shadow var(--duration-apple) var(--ease-apple), background var(--duration-apple) var(--ease-apple), transform var(--duration-apple) var(--ease-apple-out);
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
.contact-compose__input:hover,
.contact-compose__textarea:hover {
  border-color: rgba(14, 165, 233, 0.25);
}
.contact-compose__input:focus,
.contact-compose__textarea:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
  background: #fff;
  transform: translateY(-1px);
}
[data-theme="dark"] .contact-compose__input:focus,
[data-theme="dark"] .contact-compose__textarea:focus {
  background: rgba(21, 32, 43, 0.95);
}
.contact-compose__input::placeholder,
.contact-compose__textarea::placeholder {
  color: var(--text-quaternary);
}
.contact-compose__textarea {
  min-height: 140px;
  resize: vertical;
  padding-top: var(--space-14);
  transition: border-color var(--duration-apple) var(--ease-apple), box-shadow var(--duration-apple) var(--ease-apple), background var(--duration-apple) var(--ease-apple), transform var(--duration-apple) var(--ease-apple-out), min-height 0.35s var(--ease-apple);
}
/* 正文区获得焦点时轻微上浮与阴影，更易区分 */
.contact-compose__field--body:focus-within .contact-compose__textarea {
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12), 0 4px 16px rgba(14, 165, 233, 0.08);
}
@media (prefers-reduced-motion: reduce) {
  .section.reveal .contact-compose .contact-compose__card,
  .section.reveal.is-visible .contact-compose .contact-compose__card {
    animation: none;
    transform: scale(1);
  }
}
.contact-compose__hint {
  font-size: var(--text-caption);
  color: var(--text-quaternary);
  line-height: 1.5;
  transition: opacity var(--duration-apple) var(--ease-apple);
}
.contact-compose__field--body:focus-within .contact-compose__hint {
  opacity: 0.9;
}
@media (prefers-reduced-motion: reduce) {
  .contact-compose__input:focus,
  .contact-compose__textarea:focus {
    transform: none;
  }
}

/* 底部：与表单区留白加大，按钮收在卡片内 */
.contact-compose__footer {
  padding: var(--space-32) var(--space-40) var(--space-40);
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.02);
  transition: background var(--duration-apple) var(--ease-apple);
}
.contact-compose__card:hover .contact-compose__footer {
  background: rgba(14, 165, 233, 0.04);
}
[data-theme="dark"] .contact-compose__footer {
  background: rgba(0, 0, 0, 0.15);
}
[data-theme="dark"] .contact-compose__card:hover .contact-compose__footer {
  background: rgba(14, 165, 233, 0.08);
}
.contact-compose__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-12);
  min-height: 52px;
  padding: 0 var(--space-40);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, var(--neon-blue) 0%, var(--mint) 100%);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35);
  transition: transform var(--duration-apple) var(--ease-apple-out), box-shadow var(--duration-apple) var(--ease-apple), filter var(--duration-apple) var(--ease-apple);
  -webkit-tap-highlight-color: transparent;
}
.contact-compose__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(14, 165, 233, 0.45);
  filter: brightness(1.05);
}
.contact-compose__btn:hover .contact-compose__btn-icon {
  transform: translate(2px, -2px);
  transition: transform var(--duration-apple) var(--ease-apple-out);
}
.contact-compose__btn:active {
  transform: translateY(0);
}
.contact-compose__btn:active .contact-compose__btn-icon {
  transform: translate(0, 0);
}
.contact-compose__btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}
.contact-compose__btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--duration-apple) var(--ease-apple-out);
}
@media (prefers-reduced-motion: reduce) {
  .contact-compose__btn:hover .contact-compose__btn-icon {
    transform: none;
  }
}
@media (max-width: 519px) {
  .contact-compose__head {
    padding-left: var(--space-24);
    padding-right: var(--space-24);
  }
  .contact-compose__form,
  .contact-compose__footer {
    padding-left: var(--space-24);
    padding-right: var(--space-24);
  }
  .contact-compose__form {
    padding-top: var(--space-32);
    padding-bottom: var(--space-24);
    gap: var(--space-28);
  }
  .contact-compose__footer {
    padding-top: var(--space-28);
    padding-bottom: var(--space-32);
  }
  .contact-compose__btn {
    width: 100%;
  }
}

/* 复制成功提示 */
.toast-copy {
  position: fixed;
  bottom: calc(var(--space-32) + 56px);
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: var(--space-12) var(--space-24);
  background: var(--text-primary);
  color: #fff;
  font-size: var(--text-small);
  font-weight: 500;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-smooth), transform 0.35s var(--ease-out-expo), visibility 0.35s;
  z-index: 999;
}
.toast-copy.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ========== 玩过的游戏 ========== */
/* 致敬经典：MARIO · CONTRA · DIABLO · FINAL FANTASY 更大标签，自动播放动画 */
.classic-game-tribute {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-20);
  margin-bottom: var(--space-32);
  flex-wrap: wrap;
}
.tribute-label {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: var(--space-12) var(--space-24);
  border-radius: 6px;
  border: 2px solid;
  image-rendering: pixelated;
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s var(--ease-smooth);
  animation: tributeBlink 3s ease-in-out infinite;
}
.tribute-label--mario {
  color: #c4960e;
  border-color: #8b5a2b;
  background: linear-gradient(180deg, rgba(247,220,111,0.35) 0%, rgba(196,150,14,0.25) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 3px 0 #5d3a1a;
}
.tribute-label--contra {
  color: #0ea5e9;
  border-color: #0284c7;
  background: linear-gradient(180deg, rgba(56,189,248,0.3) 0%, rgba(14,165,233,0.25) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 3px 0 #0369a1;
  animation-delay: 0.5s;
}
.tribute-label--diablo {
  color: #ff6b35;
  border-color: #c41e3a;
  background: linear-gradient(180deg, rgba(255, 107, 53, 0.35) 0%, rgba(196, 30, 58, 0.3) 50%, rgba(92, 10, 10, 0.25) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 3px 0 #5c0a0a;
  animation: diabloGlow 2.5s ease-in-out infinite;
}
.tribute-label--ff {
  color: #38bdf8;
  border-color: #0ea5e9;
  background: linear-gradient(180deg, rgba(224, 247, 255, 0.4) 0%, rgba(14, 165, 233, 0.3) 50%, rgba(3, 105, 161, 0.25) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 3px 0 #0369a1;
  animation: ffSparkle 3s ease-in-out infinite;
  animation-delay: 0.8s;
}
.tribute-label:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35);
}
@keyframes tributeBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.88; }
}
@keyframes diabloGlow {
  0%, 100% { opacity: 1; box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 3px 0 #5c0a0a; }
  50% { opacity: 0.95; box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 6px 20px rgba(196, 30, 58, 0.4); }
}
@keyframes ffSparkle {
  0%, 100% { opacity: 1; filter: brightness(1); }
  50% { opacity: 0.92; filter: brightness(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .tribute-label,
  .tribute-label--diablo,
  .tribute-label--ff { animation: none; }
}

.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-24); }
.game-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-smooth), border-color 0.4s var(--ease-smooth), background 0.4s var(--ease-smooth);
}
.game-card:hover { background: rgba(255, 255, 255, 0.96); transform: translateY(-10px); box-shadow: var(--shadow-hover); border-color: var(--border-accent); }
.game-card:active { transform: translateY(-4px); transition-duration: 0.15s; }
.game-cover { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-secondary); }
.game-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.75s var(--ease-out-expo); }
.game-card:hover .game-cover img { transform: scale(1.1); }
.game-cover-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(201, 61, 92, 0.06), rgba(0, 168, 148, 0.06));
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary); font-size: var(--text-small);
}
.game-card .game-body { padding: var(--space-24) var(--space-32); }
.game-platform { display: inline-block; margin-bottom: var(--space-12); padding: var(--space-8) var(--space-12); font-size: var(--text-caption); font-weight: 600; font-family: var(--font-mono); color: var(--text-primary); background: var(--mint-soft); border: 1px solid rgba(45, 212, 191, 0.3); border-radius: var(--radius); transition: background 0.3s var(--ease-smooth), border-color 0.3s var(--ease-smooth); }
.game-card:hover .game-platform { border-color: rgba(45, 212, 191, 0.5); }
.game-card h3 { margin: 0 0 var(--space-8); font-size: 1.125rem; color: var(--text-primary); }
.game-card p { margin: 0; font-size: var(--text-small); color: var(--text-tertiary); }

/* ========== 页脚 ========== */
/* HCI/艺术：页脚收尾感，与整体风格一致 */
.site-footer {
  position: relative;
  padding: var(--space-56) var(--space-48);
  margin-top: 0;
  text-align: center;
  background: linear-gradient(180deg, transparent 0%, rgba(14, 165, 233, 0.04) 50%, rgba(236, 72, 153, 0.04) 100%);
  border-top: 1px solid var(--border-accent);
}
.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-blue), var(--neon-pink), var(--mint), transparent);
  opacity: 0.6;
  pointer-events: none;
}
/* 笔记区块内点赞：在浏览量旁，与笔记列表同一区域 */
.notes-like-area {
  position: relative;
  margin-bottom: var(--space-20);
}
.notes-like-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-12) var(--space-20);
  padding: var(--space-16) var(--space-20);
  background: rgba(14, 165, 233, 0.06);
  border-radius: var(--radius);
  border: 1px solid var(--border-accent);
}
.notes-like-label {
  font-size: var(--text-body);
  color: var(--text-secondary);
  font-weight: 500;
}
.site-like-count {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--neon-blue);
  min-width: 1.5em;
  text-align: center;
}
.site-like-unit,
.notes-like-unit {
  font-size: var(--text-small);
  color: var(--text-tertiary);
}
.site-like-btn {
  min-height: 44px;
  padding: 0 var(--space-24);
  border: 2px solid var(--neon-blue);
  border-radius: var(--radius);
  background: rgba(14, 165, 233, 0.15);
  color: var(--neon-blue);
  font-size: var(--text-body);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--duration-apple) var(--ease-apple), border-color var(--duration-apple) var(--ease-apple), transform var(--duration-apple) var(--ease-apple), color var(--duration-apple) var(--ease-apple), box-shadow 0.35s ease-out;
  -webkit-tap-highlight-color: transparent;
}
.site-like-btn:hover:not(:disabled) {
  background: rgba(14, 165, 233, 0.25);
  border-color: var(--link-hover);
  color: var(--link-hover);
  transform: translateY(-2px);
}
.site-like-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}
.site-like-btn:disabled {
  opacity: 0.8;
  cursor: default;
  border-color: var(--border);
  background: var(--border);
  color: var(--text-tertiary);
}
/* 点赞成功小动画：变为「已点赞」时轻弹 + 光晕 */
.site-like-btn.is-liked {
  animation: like-success 0.55s var(--ease-out-expo) forwards;
}
@keyframes like-success {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
  }
  35% {
    transform: scale(1.14);
    box-shadow: 0 0 24px 6px rgba(14, 165, 233, 0.35), 0 0 0 2px rgba(14, 165, 233, 0.2);
  }
  60% {
    transform: scale(1.06);
    box-shadow: 0 0 16px 4px rgba(14, 165, 233, 0.2);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .site-like-btn.is-liked { animation: none; }
}
.site-like-btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}

.site-footer-text {
  margin: 0;
  font-size: var(--text-small);
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
  line-height: 1.6;
}
.site-footer a { transition: transform 0.5s var(--ease-apple-out), opacity 0.45s var(--ease-apple); }
.site-footer a:hover { transform: scale(1.1); opacity: 0.92; }
.site-footer a:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); border-radius: 4px; }

/* ==========================================================================
   PART 2：苹果级丝滑 · 动效与材质（不修改 HTML，仅类名 + 现有选择器）
   - 玻璃态升级、物理缓动、呼吸感标题、焦点亮度、按钮按压感
   - 移动端降级：prefers-reduced-motion 与 768px 以下简化
   ========================================================================== */

/* 玻璃态升级：卡片自适应模糊 + 连续性曲率（squircle 感） */
.about-list,
.notes-list,
.timeline-content,
.project-card,
.tech-tags li,
.work-thumb,
.contact-item,
.game-card {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@media (max-width: 768px) {
  .about-list, .notes-list, .timeline-content, .project-card,
  .tech-tags li, .work-thumb, .contact-item, .game-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}


/* 图片渐进：从模糊到清晰（由 JS 添加 .img-reveal） */
.img-reveal {
  filter: blur(8px);
  opacity: 0.7;
  transition: filter 1s var(--ease-out-expo), opacity 1s var(--ease-out-expo);
}
.img-reveal.is-visible {
  filter: blur(0);
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .img-reveal { filter: none; opacity: 1; }
  .img-reveal.is-visible { filter: none; opacity: 1; }
}

/* ========== 更多丝滑动效：图片、元素、入场 ========== */
/* 图片容器：统一 overflow + 丝滑缩放 */
.hero-visual,
.project-media,
.work-thumb-img,
.game-cover {
  overflow: hidden;
}
.hero-visual img,
.project-media img,
.work-thumb-img img,
.about-avatar img,
.game-cover img {
  transition: transform 0.85s var(--ease-out-expo);
  will-change: transform;
}
.hero:hover .hero-visual img { transform: scale(1.06); }
.project-card:hover .project-media img { transform: scale(1.08); }
.work-thumb:hover .work-thumb-img img { transform: scale(1.1); }
.game-card:hover .game-cover img { transform: scale(1.1); }
.about-avatar img { transition: transform 0.6s var(--ease-out-expo); }
.about-avatar:hover img { transform: scale(1.06); }

/* 图片悬停光带（可选）：从左到右轻微扫过 */
.project-media,
.work-thumb,
.game-cover {
  position: relative;
}
.project-media::after,
.work-thumb::after,
.game-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 45%,
    rgba(255, 255, 255, 0.05) 55%,
    transparent 100%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-smooth);
}
.project-card:hover .project-media::after,
.work-thumb:hover::after,
.game-card:hover .game-cover::after {
  opacity: 1;
}

/* 区块标题入场：section 可见时标题轻微滑入，更明显丝滑 */
.section.reveal .section-title-wrap {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out-expo) 0.15s, transform 0.7s var(--ease-out-expo) 0.15s;
}
.section.reveal.is-visible .section-title-wrap {
  opacity: 1;
  transform: translateY(0);
}
.section.reveal .section-title { transition: color 0.45s var(--ease-smooth); }
.section.reveal.is-visible .section-icon {
  animation: iconPop 0.6s var(--ease-out-expo) 0.2s backwards;
}
@keyframes iconPop {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

/* 网格/列表错峰：项目、作品、游戏卡片依次出现 */
.section.reveal.is-visible .projects-grid .project-card:nth-child(1) { animation-delay: 0.1s; }
.section.reveal.is-visible .projects-grid .project-card:nth-child(2) { animation-delay: 0.2s; }
.section.reveal.is-visible .projects-grid .project-card:nth-child(3) { animation-delay: 0.3s; }
.section.reveal.is-visible .projects-grid .project-card:nth-child(4) { animation-delay: 0.4s; }
.section.reveal.is-visible .works-gallery .work-thumb:nth-child(1) { animation-delay: 0.08s; }
.section.reveal.is-visible .works-gallery .work-thumb:nth-child(2) { animation-delay: 0.16s; }
.section.reveal.is-visible .works-gallery .work-thumb:nth-child(3) { animation-delay: 0.24s; }
.section.reveal.is-visible .works-gallery .work-thumb:nth-child(4) { animation-delay: 0.32s; }
.section.reveal.is-visible .works-gallery .work-thumb:nth-child(5) { animation-delay: 0.4s; }
.section.reveal.is-visible .games-grid .game-card:nth-child(1) { animation-delay: 0.08s; }
.section.reveal.is-visible .games-grid .game-card:nth-child(2) { animation-delay: 0.16s; }
.section.reveal.is-visible .games-grid .game-card:nth-child(3) { animation-delay: 0.24s; }
.section.reveal.is-visible .games-grid .game-card:nth-child(4) { animation-delay: 0.32s; }
.section.reveal.is-visible .edu-blocks .edu-card:nth-child(1) { animation-delay: 0.08s; }
.section.reveal.is-visible .edu-blocks .edu-card:nth-child(2) { animation-delay: 0.18s; }

/* 导航链接：悬停明显上浮，按下微缩（丝滑触感） */
.site-header .nav a:hover,
.site-header .nav a.active {
  transform: translateY(-2px);
}
.site-header .nav a:active { transform: translateY(0) scale(0.98); }
@media (prefers-reduced-motion: reduce) {
  .site-header .nav a:hover,
  .site-header .nav a.active { transform: none; }
  .site-header .nav a:active { transform: none; }
}

/* 卡片悬停：内部文字/标签明显上滑，丝滑过渡 */
.work-thumb-overlay .work-thumb-title,
.work-thumb-overlay .work-thumb-tag {
  transition: transform 0.55s var(--ease-apple-out), opacity 0.5s var(--ease-apple);
  transform: translateY(12px);
  opacity: 0.88;
}
.work-thumb:hover .work-thumb-overlay .work-thumb-title,
.work-thumb:hover .work-thumb-overlay .work-thumb-tag {
  transform: translateY(0);
  opacity: 1;
}
.edu-card .edu-degree,
.edu-card .edu-school {
  transition: transform var(--duration-apple) var(--ease-apple-out), color var(--duration-apple) var(--ease-apple);
}
.edu-card:hover .edu-degree { transform: scale(1.03); }
.edu-card:hover .edu-school { color: var(--neon-blue); }

/* 按钮：通用 hover 明显上抬，丝滑过渡 */
.btn {
  transition: transform 0.5s var(--ease-apple-out), background 0.45s var(--ease-apple), box-shadow 0.45s var(--ease-apple);
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(0) scale(0.98); transition-duration: 0.12s; }

@media (prefers-reduced-motion: reduce) {
  .section.reveal .section-title-wrap { opacity: 1; transform: none; transition: none; }
  .section.reveal.is-visible .section-icon { animation: none; }
  .site-header .nav a:hover,
  .site-header .nav a.active { transform: none; }
  .work-thumb-overlay .work-thumb-title,
  .work-thumb-overlay .work-thumb-tag { transform: none; opacity: 1; }
  .btn:hover { transform: none; }
  .about-row:hover { transform: none; }
  .note-row:hover { transform: none; }
  .hero-expected-start:hover { transform: none; }
  .projects-filter-btn:hover,
  .works-filter-btn:hover { transform: none; }
}

/* 按钮材质按压感 */
.btn-primary:active,
.contact-item:active,
.nav-toggle:active {
  transform: scale(0.98);
}
.btn-primary { transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), background var(--duration) var(--ease); }
.contact-item { transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease); }


/* HCI/沉浸式阅读：行距与字距放松，静心阅读 */
.section-desc,
.hero-desc,
.about-intro-text {
  line-height: clamp(1.58, 2.2vw + 1.45, 1.78);
  letter-spacing: 0.02em;
}
.section-desc,
.about-intro-text {
  max-width: 68ch;
}
/* 正文区卡片：轻微内光感，品牌感层次 */
.section .container {
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
[data-theme="dark"] .section .container {
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.about-row-value-block {
  max-width: 68ch;
}
.timeline-content .duty,
.timeline-content .result {
  max-width: 68ch;
}
.project-info .project-desc {
  max-width: 68ch;
}

/* ========== 侧边工具栏：主题、字体、就业导向快捷操作 ========== */
.side-toolbar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  pointer-events: none;
  transition: transform 0.5s var(--ease-apple-out);
}
/* 沉浸式阅读：侧栏右滑收起，与顶栏同步 */
body.is-immersive .side-toolbar {
  transform: translateX(100%);
  pointer-events: none;
}
.side-toolbar__trigger {
  pointer-events: auto;
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 48px;
  height: 88px;
  border: none;
  border-radius: 14px 0 0 14px;
  background: var(--card-bg);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s var(--ease-silk), box-shadow 0.4s var(--ease-silk), background 0.4s var(--ease-silk), color 0.4s var(--ease-silk);
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
}
.side-toolbar__trigger:hover {
  transform: translateY(-50%) translateX(-4px);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(14, 165, 233, 0.15);
  color: var(--neon-blue);
}
.side-toolbar__trigger:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
.side-toolbar__trigger-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s var(--ease-silk);
}
.side-toolbar__trigger-icon svg {
  flex-shrink: 0;
}
.side-toolbar.is-open .side-toolbar__trigger {
  transform: translateY(-50%) translateX(-4px);
  color: var(--neon-blue);
}
.side-toolbar.is-open .side-toolbar__trigger-icon {
  transform: rotate(90deg);
}
.side-toolbar__panel {
  pointer-events: auto;
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  max-width: calc(100vw - 56px);
  height: 100%;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.1), 0 0 0 1px var(--border);
  transform: translateX(100%);
  transition: transform 0.5s var(--ease-out-expo), box-shadow 0.4s var(--ease-silk);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px 0 0 16px;
  z-index: 1;
}
.side-toolbar.is-open .side-toolbar__panel {
  transform: translateX(0);
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.14), 0 0 0 1px var(--border);
}
.side-toolbar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-20) var(--space-24);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.5);
}
[data-theme="dark"] .side-toolbar__header {
  background: rgba(21, 32, 43, 0.5);
}
.side-toolbar__title {
  display: inline-flex;
  align-items: center;
  gap: var(--space-10);
  font-size: var(--text-h3);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: var(--letter-tight);
}
.side-toolbar__close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s var(--ease-silk), color 0.3s var(--ease-silk), transform 0.25s var(--ease-silk);
}
.side-toolbar__close:hover {
  background: var(--border);
  color: var(--text-primary);
  transform: scale(1.05);
}
.side-toolbar__close:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
.side-toolbar__body {
  padding: var(--space-24);
  overflow-y: auto;
  flex: 1;
}
.side-toolbar__section {
  margin-bottom: var(--space-40);
}
.side-toolbar__section:last-child {
  margin-bottom: 0;
}
.side-toolbar__section-title {
  display: block;
  font-size: var(--text-caption);
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-16);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--border);
}
.side-toolbar__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}
.side-toolbar__action {
  display: inline-flex;
  align-items: center;
  gap: var(--space-12);
  width: 100%;
  min-height: var(--touch);
  padding: 0 var(--space-16);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-primary);
  font-size: var(--text-body);
  font-family: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--duration-apple) var(--ease-apple), background var(--duration-apple) var(--ease-apple), color var(--duration-apple) var(--ease-apple), transform var(--duration-apple) var(--ease-apple-out), box-shadow var(--duration-apple) var(--ease-apple);
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}
.side-toolbar__action:hover {
  border-color: var(--border-accent);
  background: rgba(14, 165, 233, 0.08);
  color: var(--neon-blue);
  transform: translateX(4px);
  box-shadow: 0 2px 12px rgba(14, 165, 233, 0.12);
}
.side-toolbar__action:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
.side-toolbar__action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-tertiary);
  transition: color var(--duration-apple) var(--ease-apple);
}
.side-toolbar__action:hover .side-toolbar__action-icon {
  color: var(--neon-blue);
}
.side-toolbar__action-icon svg {
  flex-shrink: 0;
}
.side-toolbar__action-text {
  flex: 1;
  text-align: left;
}
.side-toolbar__item {
  margin-bottom: var(--space-28);
}
.side-toolbar__item:last-child {
  margin-bottom: 0;
}
.side-toolbar__label {
  display: block;
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.side-toolbar__theme {
  display: flex;
  gap: var(--space-8);
}
.side-toolbar__theme-btn {
  flex: 1;
  min-height: var(--touch);
  padding: 0 var(--space-12);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-secondary);
  font-size: var(--text-body);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.35s var(--ease-silk), background 0.35s var(--ease-silk), color 0.35s var(--ease-silk), transform 0.25s var(--ease-silk);
}
.side-toolbar__theme-btn:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.side-toolbar__theme-btn.is-active,
.side-toolbar__theme-btn[aria-pressed="true"] {
  border-color: var(--neon-blue);
  background: rgba(14, 165, 233, 0.12);
  color: var(--neon-blue);
}
.side-toolbar__theme-btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
.side-toolbar__lang {
  display: flex;
  gap: var(--space-8);
}
.side-toolbar__lang-btn {
  flex: 1;
  min-height: var(--touch);
  padding: 0 var(--space-12);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-secondary);
  font-size: var(--text-body);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.35s var(--ease-silk), background 0.35s var(--ease-silk), color 0.35s var(--ease-silk), transform 0.25s var(--ease-silk);
}
.side-toolbar__lang-btn:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.side-toolbar__lang-btn.is-active,
.side-toolbar__lang-btn[aria-pressed="true"] {
  border-color: var(--neon-blue);
  background: rgba(14, 165, 233, 0.12);
  color: var(--neon-blue);
}
.side-toolbar__lang-btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
.side-toolbar__range {
  width: 100%;
  height: 8px;
  margin: 0 0 var(--space-8);
  accent-color: var(--neon-blue);
  cursor: pointer;
}
.side-toolbar__range-value {
  display: block;
  font-size: var(--text-caption);
  color: var(--text-tertiary);
}
/* 侧边栏引导：首次访问提示，优美气泡 + 一段时间自动消失 */
.side-toolbar-guide {
  position: fixed;
  right: 52px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  z-index: 199;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-smooth), visibility 0s linear 0.35s, transform 0.35s var(--ease-smooth);
}
.side-toolbar-guide.is-visible {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
  transition: opacity 0.35s var(--ease-smooth), visibility 0s, transform 0.35s var(--ease-smooth);
}
.side-toolbar-guide__inner {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: var(--space-16) var(--space-20);
  max-width: 240px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
[data-theme="dark"] .side-toolbar-guide__inner {
  background: rgba(15, 23, 42, 0.72);
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}
.side-toolbar-guide__text {
  margin: 0 0 var(--space-12);
  font-size: var(--text-small);
  color: var(--text-primary);
  line-height: 1.45;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.side-toolbar-guide__text strong {
  color: var(--neon-blue);
  font-weight: 500;
}
/* 中文页时引导内英文副行：略小、次要色，方便外国人找到语言设置 */
.side-toolbar-guide__en {
  display: block;
  margin-top: 6px;
  font-size: 0.9em;
  color: var(--text-tertiary);
  font-weight: 400;
}
.side-toolbar-guide__en strong {
  color: var(--neon-blue);
}
.side-toolbar-guide__dismiss {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 0 var(--space-12);
  border: none;
  border-radius: 8px;
  background: rgba(14, 165, 233, 0.75);
  color: #fff;
  font-size: var(--text-small);
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.25s var(--ease);
}
.side-toolbar-guide__dismiss:hover {
  background: rgba(14, 165, 233, 0.9);
}
.side-toolbar-guide__dismiss:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
.side-toolbar-guide__arrow {
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border: 8px solid transparent;
  border-left-color: rgba(255, 255, 255, 0.72);
  border-right: none;
  filter: drop-shadow(1px 0 2px rgba(0, 0, 0, 0.04));
}
[data-theme="dark"] .side-toolbar-guide__arrow {
  border-left-color: rgba(15, 23, 42, 0.72);
}
@media (prefers-reduced-motion: reduce) {
  .side-toolbar__panel,
  .side-toolbar-guide {
    transition: none;
  }
}

/* ==========================================================================
   GSAP 漫画 / 游戏原画艺术方向 · 滚动动效增强
   仅在 <html class="js-gsap"> 时接管；无 GSAP 时回退到上方 CSS 动画
   ========================================================================== */

/* --- 交接：GSAP 可用时，关闭重复的 CSS 显现动画，改由 GSAP 控制 --- */
html.js-gsap .section.reveal .animate-item { opacity: 0; }
/* 封面：交给 GSAP 做入场，避免 CSS 的 opacity:0 与滚动动画冲突导致文字消失 */
html.js-gsap .hero-content { opacity: 1; transform: none; transition: none; }
html.js-gsap .section.reveal.is-visible .animate-item { animation: none; }
html.js-gsap .section-title .ch { display: inline-block; will-change: transform, opacity; }
/* 时间线彩虹主线由 GSAP 绘制，关闭致敬徽标的入场关键帧避免与视差 transform 抖动 */
html.js-gsap .section-tribute { animation: none !important; opacity: 1; }
html.js-gsap .contact-compose .contact-compose__card {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* --- 网点 halftone 全站叠层：漫画质感，低干扰 --- */
.site-halftone {
  position: fixed;
  inset: -80px;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(14, 165, 233, 0.11) 1.3px, transparent 1.7px);
  background-size: 22px 22px;
  opacity: 0.5;
}
[data-theme="dark"] .site-halftone {
  background-image: radial-gradient(rgba(56, 189, 248, 0.12) 1.3px, transparent 1.7px);
  opacity: 0.4;
}
@media (max-width: 768px) {
  .site-halftone { background-size: 16px 16px; opacity: 0.38; }
}

/* --- 集中線 speed lines：hero 离场 / 重点区块入场时扫过 --- */
.site-speedlines {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    rgba(17, 24, 39, 0.16) 0deg 0.55deg,
    transparent 0.55deg 3deg
  );
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 26%, #000 66%);
  mask-image: radial-gradient(circle at 50% 50%, transparent 26%, #000 66%);
}
[data-theme="dark"] .site-speedlines {
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    rgba(226, 232, 240, 0.18) 0deg 0.55deg,
    transparent 0.55deg 3deg
  );
}
.site-speedlines.is-active {
  animation: speedlines-flash 0.76s var(--ease-out-expo);
}
@keyframes speedlines-flash {
  0% { opacity: 0; transform: scale(1.18); }
  28% { opacity: 0.85; }
  100% { opacity: 0; transform: scale(1); }
}

/* --- 实习时间线：随滚动绘制的彩虹主线 --- */
.timeline-draw {
  position: absolute;
  top: 0;
  left: -2px;
  width: 2px;
  height: 100%;
  transform-origin: top center;
  transform: scaleY(0);
  background: linear-gradient(180deg, var(--neon-blue), var(--mint) 45%, var(--neon-pink));
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.45);
  pointer-events: none;
}

/* --- 章节标题：盖章式逐字落入的贴纸星点 --- */
.section-title-wrap { position: relative; }
html.js-gsap .section-title-wrap::before {
  content: "★";
  position: absolute;
  top: -14px;
  left: -14px;
  font-size: 1rem;
  line-height: 1;
  color: var(--neon-pink);
  transform: rotate(-14deg);
  opacity: 0.85;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.6);
  pointer-events: none;
}
[data-theme="dark"] html.js-gsap .section-title-wrap::before {
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}
@media (max-width: 768px) {
  html.js-gsap .section-title-wrap::before { display: none; }
}

/* --- 卡片：漫画贴纸式硬投影，hover 时轻微翘起 --- */
.project-card:hover,
.game-card:hover,
.tech-group:hover,
.note-item:hover {
  box-shadow: var(--shadow-hover), 7px 7px 0 rgba(14, 165, 233, 0.16);
}
.work-thumb:hover {
  box-shadow: var(--shadow-hover), 6px 6px 0 rgba(236, 72, 153, 0.18);
}
[data-theme="dark"] .project-card:hover,
[data-theme="dark"] .game-card:hover,
[data-theme="dark"] .tech-group:hover,
[data-theme="dark"] .note-item:hover {
  box-shadow: var(--shadow-hover), 7px 7px 0 rgba(56, 189, 248, 0.22);
}
[data-theme="dark"] .work-thumb:hover {
  box-shadow: var(--shadow-hover), 6px 6px 0 rgba(244, 114, 182, 0.24);
}

/* --- 新增视觉的降级：reduced-motion 下保持静态、不隐藏内容 --- */
@media (prefers-reduced-motion: reduce) {
  .site-speedlines { display: none; }
  .site-halftone { opacity: 0.32; }
  html.js-gsap .section.reveal .animate-item { opacity: 1; }
  .timeline-draw { transform: scaleY(1); }
}
