/* ═══════════════════════════════════════════
   Bauhaus Portfolio — Design Tokens & Base
   8pt grid · Form follows function
   ═══════════════════════════════════════════ */

:root {
  --bg: #ffffff;
  --bg-elevated: #f7f7f7;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --border: #e5e5e5;
  --border-strong: #1a1a1a;
  --accent: #e63946;
  --accent-blue: #1d3557;
  --accent-yellow: #f4a261;
  --header-h: 64px;
  --sidebar-w: 52px;
  --sidebar-w-open: 220px;
  --container: 1280px;
  --gutter: 24px;
  --section-y: 96px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", "Helvetica Neue", "PingFang SC", "Noto Sans SC",
    "Source Han Sans SC", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #11151b;
  --bg-elevated: #1a1f27;
  --text: #f1f3f5;
  --text-muted: #9aa3ad;
  --border: #2a313b;
  --border-strong: #f1f3f5;
  --accent: #ff5a6a;
  --accent-blue: #6aa8d8;
  --accent-yellow: #f5b673;
  color-scheme: dark;
}

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

html {
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

body {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

/* ═══════════════════════════════════════════
   全局粒子网络背景（canvas）
   ═══════════════════════════════════════════ */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.55;
}

[data-theme="dark"] .bg-canvas {
  opacity: 0.75;
}
.bg-pattern {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* 点阵网格 —— 工程蓝图感 */
.bg-grid {
  position: absolute;
  inset: -20px;
  background-image: radial-gradient(
    circle,
    color-mix(in srgb, var(--text) 22%, transparent) 1px,
    transparent 1.4px
  );
  background-size: 28px 28px;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 30%, transparent 90%);
}

[data-theme="dark"] .bg-grid {
  opacity: 0.4;
}

/* 漂浮的代码符号 / 二进制 —— 由 JS 注入 */
.bg-symbols {
  position: absolute;
  inset: 0;
}

.bg-symbols .sym {
  position: absolute;
  font-family: "JetBrains Mono", "SF Mono", "Consolas", "Menlo", monospace;
  font-weight: 600;
  color: var(--text);
  opacity: 0.06;
  white-space: nowrap;
  user-select: none;
  will-change: transform;
}

[data-theme="dark"] .bg-symbols .sym {
  opacity: 0.09;
}

.bg-symbols .sym--accent { color: var(--accent); opacity: 0.1; }
.bg-symbols .sym--blue { color: var(--accent-blue); opacity: 0.1; }

/* ═══════════════════════════════════════════
   切屏过渡：纯淡入淡出 + 方向标签闪现 + 内容弹入
   ═══════════════════════════════════════════ */

/* 主题切换圆形扩散层 */
.theme-wipe {
  position: fixed;
  z-index: 300;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.theme-wipe.is-active {
  opacity: 1;
  visibility: visible;
  animation: theme-wipe-grow 0.42s var(--ease) forwards;
}

@keyframes theme-wipe-grow {
  from {
    clip-path: circle(0% at var(--tx, 50%) var(--ty, 50%));
  }
  to {
    clip-path: circle(var(--tr, 100%) at var(--tx, 50%) var(--ty, 50%));
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-wipe.is-active {
    animation: none;
  }
}

/* ─── 开屏动画 ─── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  background: var(--bg);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s var(--ease), visibility 0s linear 0s;
  overflow: hidden;
}

.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.splash-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1a1a1a;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(10px);
  animation: sg-in 0.45s var(--ease) 0.02s forwards;
}

.splash-geo {
  display: flex;
  align-items: center;
  gap: 18px;
}

.splash-geo .sg {
  display: block;
  opacity: 0;
  transform: translateY(10px);
  animation: sg-in 0.45s var(--ease) forwards;
}

.splash-geo .sg-sq {
  width: 26px;
  height: 26px;
  background: var(--accent);
  animation-delay: 0.05s;
}

.splash-geo .sg-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-blue);
  animation-delay: 0.18s;
}

.splash-geo .sg-tri {
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 26px solid var(--accent-yellow);
  animation-delay: 0.31s;
}

@keyframes sg-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.splash-brand {
  margin: 0;
  font-size: clamp(34px, 8vw, 72px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  opacity: 0;
  animation: splash-fade 0.5s var(--ease) 0.35s forwards;
}

.splash-sub {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  animation: splash-fade 0.5s var(--ease) 0.5s forwards;
}

.splash-bar {
  width: 120px;
  height: 3px;
  background: var(--border);
  position: relative;
  overflow: hidden;
  margin-top: 8px;
  opacity: 0;
  animation: splash-fade 0.4s var(--ease) 0.6s forwards;
}

.splash-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-100%);
  animation: splash-fill 0.9s var(--ease) 0.45s forwards;
}

@keyframes splash-fill {
  to {
    transform: translateX(0);
  }
}

@keyframes splash-fade {
  to {
    opacity: 1;
  }
}

/* 结束 = 原地淡出：入场动画定格后整层直接淡出，无位移错峰 */
.splash.is-done {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s var(--ease), visibility 0s linear 0.6s;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .splash,
  .splash .sg,
  .splash-mark,
  .splash-brand,
  .splash-sub,
  .splash-bar,
  .splash-bar::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    opacity: 1;
  }

}

/* 过渡标签层：屏幕居中，纯淡入淡出闪现 */
.page-transition {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 200;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: "Inter", "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  opacity: 0;
  white-space: nowrap;
}
.page-transition .pt-from { color: var(--text-muted); }
.page-transition .pt-arrow {
  color: var(--accent);
  font-size: 0.7em;
}
.page-transition .pt-to { color: var(--accent); }

/* 标签闪现：淡入→短暂停留→淡出，无位移 */
.page-transition.is-active {
  animation: pt-flash 380ms var(--ease) forwards;
}
@keyframes pt-flash {
  0% { opacity: 0; }
  30% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

/* 下一页内容从上到下依次弹入（新页 fade-in 后触发） */
.section.is-entering > .container > *,
.hero.is-entering .hero-content > * {
  animation: enter-drop 600ms var(--ease) both;
}
.section.is-entering > .container > *:nth-child(1) { animation-delay: 60ms; }
.section.is-entering > .container > *:nth-child(2) { animation-delay: 170ms; }
.section.is-entering > .container > *:nth-child(3) { animation-delay: 280ms; }
.section.is-entering > .container > *:nth-child(4) { animation-delay: 400ms; }

@keyframes enter-drop {
  0% { opacity: 0; transform: translateY(-22px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* reduced-motion：关闭切屏动画 */
@media (prefers-reduced-motion: reduce) {
  .page-transition { display: none; }
  .section.is-entering > .container > *,
  .hero.is-entering .hero-content > * { animation: none; }
}

/* ═══════════════════════════════════════════
   右侧圆环进度 —— 仅替代原进度条（×1.5）
   ═══════════════════════════════════════════ */
.ring-progress-ui {
  --ring: clamp(198px, 30vw, 252px);
  position: fixed;
  right: max(12px, 1.5vw);
  /* 原位置再下移约一个半径，避开背景几何 */
  top: calc(clamp(72px, 12vh, 120px) + var(--ring) * 0.5);
  transform: none;
  z-index: 90;
  width: var(--ring);
  height: var(--ring);
  pointer-events: none;
}

.ring-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}

.ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* 两环之间的槽底（暗环带，增强立体深度） */
.ring-groove {
  stroke: color-mix(in srgb, var(--text) 10%, transparent);
  stroke-width: 26;
}

.ring-track-outer,
.ring-track-inner {
  stroke: color-mix(in srgb, var(--text) 22%, transparent);
  stroke-width: 2.5;
}

.ring-track-inner {
  stroke-width: 2;
  opacity: 0.9;
}

/* 当前扇区高亮：固定 60° 环带，整组旋转切换 */
.ring-highlight {
  transform-origin: 100px 100px;
  transition: transform 0.55s var(--ease);
}

.ring-band {
  fill: var(--accent);
  opacity: 0.95;
  filter:
    drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 85%, transparent))
    drop-shadow(0 0 16px color-mix(in srgb, var(--accent) 55%, transparent))
    drop-shadow(0 0 32px color-mix(in srgb, var(--accent) 35%, transparent));
}

.ring-band-shade {
  fill: color-mix(in srgb, var(--accent) 55%, #000 45%);
  opacity: 0.45;
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--accent) 30%, transparent));
  transform: translate(1px, 1.4px);
}

.ring-dividers line {
  stroke: color-mix(in srgb, var(--text) 28%, transparent);
  stroke-width: 1.25;
}

.ring-marks text {
  fill: var(--text-muted);
  font-family: "JetBrains Mono", "SF Mono", "Consolas", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-anchor: middle;
  dominant-baseline: middle;
  opacity: 0.75;
}

.ring-marks text.is-active {
  fill: var(--accent);
  opacity: 1;
  font-weight: 800;
}

.ring-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42%;
  height: 42%;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--text) 16%, transparent);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(6px);
}

.ring-pct {
  font-family: "JetBrains Mono", "SF Mono", "Consolas", monospace;
  font-size: clamp(12px, 1.6vw, 15px);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 1023px) {
  .ring-progress-ui {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ring-highlight {
    transition: none !important;
  }
}


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

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

ul,
ol {
  list-style: none;
}

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

em {
  font-style: normal;
  color: var(--accent);
  font-weight: 700;
}

/* ─── A11y ─── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--gutter);
  z-index: 1000;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.skip-link:focus {
  top: 8px;
}

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

/* ─── Layout ─── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: fixed;
  inset: 0;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s var(--ease), visibility 0s linear 0.12s;
  pointer-events: none;
}

/* 当前可见页 */
.section.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.12s var(--ease);
  pointer-events: auto;
}

/* section 内的 container 撑满并垂直居中内容 */
.section > .container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 48px;
}

.section-index {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.section-title {
  font-size: clamp(36px, 4.2vw, 48px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

/* ─── 左侧竖向导航边栏 ─── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: var(--sidebar-w);
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid var(--border);
  overflow: hidden;
  transition: width 0.4s var(--ease);
}

.sidebar:hover,
.sidebar:focus-within {
  width: var(--sidebar-w-open);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 26px;
  height: 32px;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1a1a1a;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  line-height: 1;
}

[data-theme="dark"] .logo-mark,
[data-theme="dark"] .splash-mark {
  background: #e8e8e8;
  color: #1a1a1a;
}

.logo-text {
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s var(--ease) 0.08s, transform 0.3s var(--ease) 0.08s;
}

.sidebar:hover .logo-text,
.sidebar:focus-within .logo-text {
  opacity: 1;
  transform: translateX(0);
}

.nav {
  margin-top: 56px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 44px;
  padding-left: 26px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  transition: color 0.2s var(--ease), background 0.25s var(--ease);
}

.nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
  transform: translateY(-50%);
  transition: height 0.25s var(--ease);
}

.nav-idx {
  font-family: "JetBrains Mono", "SF Mono", "Consolas", monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.55;
  flex-shrink: 0;
  width: 20px;
  transition: color 0.2s var(--ease), opacity 0.2s var(--ease);
}

.nav-label {
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.3s var(--ease) 0.1s, transform 0.3s var(--ease) 0.1s;
}

.sidebar:hover .nav-label,
.sidebar:focus-within .nav-label {
  opacity: 1;
  transform: translateX(0);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 6%, transparent);
}

.nav-link:hover::before,
.nav-link:focus-visible::before,
.nav-link.is-active::before {
  height: 24px;
}

.nav-link.is-active,
.nav-link.is-active .nav-idx,
.nav-link:hover .nav-idx {
  color: var(--accent);
}

.nav-link.is-active .nav-idx,
.nav-link:hover .nav-idx {
  opacity: 1;
}

.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 16px;
}

.sidebar:hover .sidebar-foot,
.sidebar:focus-within .sidebar-foot {
  align-items: flex-start;
  padding-left: 22px;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--text);
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.theme-toggle:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  padding: 10px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
}

.menu-bar {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.menu-toggle[aria-expanded="true"] .menu-bar:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-bar:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

.mobile-nav {
  background: var(--bg);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav-list {
  list-style: none;
  padding: 8px 0 20px;
  margin: 0;
}

.mobile-nav-list a {
  display: block;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.mobile-nav-list a:hover {
  color: var(--accent);
}

/* main 内容右移，避开边栏 */
body {
  padding-left: var(--sidebar-w);
}

/* ─── Hero ─── */
.hero {
  position: fixed;
  inset: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-block: 28px 24px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s var(--ease), visibility 0s linear 0.12s;
  pointer-events: none;
}
.hero.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.12s var(--ease);
  pointer-events: auto;
}

/* 漂浮的原色光晕 —— 包豪斯三色，低饱和、缓慢呼吸 */
/* spotlight 已移至全局 .aurora 层，跟随全页鼠标 */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* 全局彩色光晕：fixed 贯穿整页，消除滚动割裂感 */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* 全局几何装饰层：曲线 + 圆环 + 色块 + 水印字，全站共享
   页内静止；切页时曲线改变排版（由 body[data-page] 驱动过渡） */
.global-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.global-curves {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--accent-blue);
  opacity: 0.22;
}

.global-curves path,
.global-curves circle {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.7s var(--ease);
}

/* ── 各页曲线构图 ── */

/* hero：默认排版（左上偏置） */
body[data-page="hero"] .global-curves path:nth-child(1) { transform: translate(0, 0) rotate(0deg); }
body[data-page="hero"] .global-curves path:nth-child(2) { transform: translate(0, 0) rotate(0deg); }
body[data-page="hero"] .global-curves path:nth-child(3) { transform: translate(0, 0) rotate(0deg); }
body[data-page="hero"] .global-curves circle:nth-child(4) { transform: translate(0, 0); }
body[data-page="hero"] .global-curves circle:nth-child(5) { transform: translate(0, 0); }
body[data-page="hero"] .global-curves circle:nth-child(6) { transform: translate(0, 0); }

/* about：右移 + 轻微旋转 */
body[data-page="about"] .global-curves path:nth-child(1) { transform: translate(60px, -28px) rotate(3deg); }
body[data-page="about"] .global-curves path:nth-child(2) { transform: translate(40px, 20px) rotate(-2deg); }
body[data-page="about"] .global-curves path:nth-child(3) { transform: translate(24px, -16px) rotate(2deg); }
body[data-page="about"] .global-curves circle:nth-child(4) { transform: translate(70px, -30px); }
body[data-page="about"] .global-curves circle:nth-child(5) { transform: translate(50px, 40px); }
body[data-page="about"] .global-curves circle:nth-child(6) { transform: translate(40px, 10px); }

/* skills：聚拢居中，更密 */
body[data-page="skills"] .global-curves path:nth-child(1) { transform: translate(-30px, -20px) scale(1.06) rotate(-3deg); }
body[data-page="skills"] .global-curves path:nth-child(2) { transform: translate(30px, 10px) scale(1.05) rotate(2deg); }
body[data-page="skills"] .global-curves path:nth-child(3) { transform: translate(-20px, 30px) scale(1.08) rotate(3deg); }
body[data-page="skills"] .global-curves circle:nth-child(4) { transform: translate(-20px, -40px); }
body[data-page="skills"] .global-curves circle:nth-child(5) { transform: translate(50px, -20px); }
body[data-page="skills"] .global-curves circle:nth-child(6) { transform: translate(-40px, 30px); }

/* projects：对角拉伸感 */
body[data-page="projects"] .global-curves path:nth-child(1) { transform: translate(-50px, -40px) scale(1.1) rotate(-5deg); }
body[data-page="projects"] .global-curves path:nth-child(2) { transform: translate(60px, 50px) scale(1.12) rotate(4deg); }
body[data-page="projects"] .global-curves path:nth-child(3) { transform: translate(30px, -50px) scale(1.08) rotate(5deg); }
body[data-page="projects"] .global-curves circle:nth-child(4) { transform: translate(-60px, -30px); }
body[data-page="projects"] .global-curves circle:nth-child(5) { transform: translate(70px, 60px); }
body[data-page="projects"] .global-curves circle:nth-child(6) { transform: translate(30px, -50px); }

/* experience：下沉横展 */
body[data-page="experience"] .global-curves path:nth-child(1) { transform: translate(0, 60px) scaleX(1.08) rotate(-2deg); }
body[data-page="experience"] .global-curves path:nth-child(2) { transform: translate(0, 80px) scaleX(1.1) rotate(2deg); }
body[data-page="experience"] .global-curves path:nth-child(3) { transform: translate(0, 40px) scaleX(1.06) rotate(1deg); }
body[data-page="experience"] .global-curves circle:nth-child(4) { transform: translate(40px, 70px); }
body[data-page="experience"] .global-curves circle:nth-child(5) { transform: translate(-30px, 90px); }
body[data-page="experience"] .global-curves circle:nth-child(6) { transform: translate(20px, 50px); }

/* contact：终章，略强调 */
body[data-page="contact"] .global-curves path:nth-child(1) { transform: translate(20px, -10px) scale(1.04) rotate(2deg); }
body[data-page="contact"] .global-curves path:nth-child(2) { transform: translate(-30px, 20px) scale(1.05) rotate(-3deg); }
body[data-page="contact"] .global-curves path:nth-child(3) { transform: translate(10px, 30px) scale(1.06) rotate(3deg); }
body[data-page="contact"] .global-curves circle:nth-child(4) { transform: translate(50px, 20px); }
body[data-page="contact"] .global-curves circle:nth-child(5) { transform: translate(-40px, -20px); }
body[data-page="contact"] .global-curves circle:nth-child(6) { transform: translate(30px, -40px); }

[data-theme="dark"] .global-curves {
  opacity: 0.2;
}

@media (prefers-reduced-motion: reduce) {
  .global-curves path,
  .global-curves circle {
    transition: none !important;
  }
}

/* 保证各页内容叠在曲线之上 */
.hero,
.section,
.site-footer {
  z-index: 1;
}

.blob {
  position: absolute;
  display: block;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  opacity: 0.5;
  will-change: transform;
}

.blob-red {
  top: -18vmax;
  left: -12vmax;
  background: radial-gradient(circle at 50% 50%, var(--accent) 0%, color-mix(in srgb, var(--accent) 30%, transparent) 40%, transparent 72%);
  animation: float-a 18s var(--ease) infinite;
}

.blob-blue {
  bottom: -22vmax;
  right: -14vmax;
  width: 64vmax;
  height: 64vmax;
  background: radial-gradient(circle at 50% 50%, var(--accent-blue) 0%, color-mix(in srgb, var(--accent-blue) 30%, transparent) 40%, transparent 72%);
  animation: float-b 22s var(--ease) infinite;
  opacity: 0.4;
}

.blob-yellow {
  top: 30%;
  left: 45%;
  width: 42vmax;
  height: 42vmax;
  background: radial-gradient(circle at 50% 50%, var(--accent-yellow) 0%, color-mix(in srgb, var(--accent-yellow) 30%, transparent) 40%, transparent 72%);
  animation: float-c 26s var(--ease) infinite;
  opacity: 0.35;
}

@keyframes float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vmax, 4vmax) scale(1.08); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-5vmax, -3vmax) scale(1.1); }
}
@keyframes float-c {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-4vmax, 5vmax) scale(0.92); }
}

/* 颗粒噪点，弱化色块边缘、增加质感 */
.grain {
  position: absolute;
  inset: -50%;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

[data-theme="dark"] .blob { opacity: 0.32; }
[data-theme="dark"] .blob-blue { opacity: 0.26; }
[data-theme="dark"] .blob-yellow { opacity: 0.22; }
[data-theme="dark"] .grain { opacity: 0.08; }

/* blob 透明度随当前页过渡（背景配色随页变） */
.blob {
  transition: opacity 0.6s var(--ease);
}
/* 默认：三个光晕都半亮 */
body[data-page] .blob-red { opacity: 0.4; }
body[data-page] .blob-blue { opacity: 0.3; }
body[data-page] .blob-yellow { opacity: 0.25; }

/* hero / projects 主打红色 */
body[data-page="hero"] .blob-red,
body[data-page="projects"] .blob-red { opacity: 0.55; }
body[data-page="hero"] .blob-blue,
body[data-page="hero"] .blob-yellow,
body[data-page="projects"] .blob-blue,
body[data-page="projects"] .blob-yellow { opacity: 0.18; }

/* about 主打蓝色；contact 终章红+蓝双主 */
body[data-page="about"] .blob-blue { opacity: 0.5; }
body[data-page="about"] .blob-red,
body[data-page="about"] .blob-yellow { opacity: 0.18; }
body[data-page="contact"] .blob-red { opacity: 0.48; }
body[data-page="contact"] .blob-blue { opacity: 0.42; }
body[data-page="contact"] .blob-yellow { opacity: 0.22; }

body[data-page="skills"] .blob-red { opacity: 0.5; }
body[data-page="skills"] .blob-blue { opacity: 0.35; }
body[data-page="skills"] .blob-yellow { opacity: 0.2; }

/* experience 主打黄色 */
body[data-page="experience"] .blob-yellow { opacity: 0.45; }
body[data-page="experience"] .blob-red,
body[data-page="experience"] .blob-blue { opacity: 0.18; }

[data-theme="dark"] body[data-page] .blob-red { opacity: 0.28; }
[data-theme="dark"] body[data-page] .blob-blue { opacity: 0.22; }
[data-theme="dark"] body[data-page] .blob-yellow { opacity: 0.18; }
[data-theme="dark"] body[data-page="hero"] .blob-red,
[data-theme="dark"] body[data-page="projects"] .blob-red { opacity: 0.38; }
[data-theme="dark"] body[data-page="about"] .blob-blue { opacity: 0.34; }
[data-theme="dark"] body[data-page="contact"] .blob-red { opacity: 0.36; }
[data-theme="dark"] body[data-page="contact"] .blob-blue { opacity: 0.32; }
[data-theme="dark"] body[data-page="contact"] .blob-yellow { opacity: 0.2; }
[data-theme="dark"] body[data-page="experience"] .blob-yellow { opacity: 0.3; }

/* 鼠标跟随的聚光灯 —— 柔和暖光，跟随光标移动 */
.spotlight {
  position: absolute;
  left: 0;
  top: 0;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--accent) 22%, transparent) 0%,
    transparent 60%
  );
  filter: blur(40px);
  pointer-events: none;
  /* JS 写入 translate(x,y) translate(-50%,-50%) —— 纯 transform，不触发布局 */
  transform: translate(50vw, 40vh) translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  z-index: 0;
  will-change: transform;
}
.spotlight.is-active {
  opacity: 0.7;
}

/* hero 内容置于光晕之上 */
.hero-grid,
.hero-meta {
  position: relative;
  z-index: 1;
}

/* 状态徽章 —— 脉冲点 + 文案 */
.hero-label {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, var(--text) 20%, transparent);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-label-meta {
  font-family: "JetBrains Mono", "SF Mono", "Consolas", "Menlo", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: none;
}

/* section 元标注 —— 等宽，右对齐 */
.section-header { position: relative; }
.section-meta {
  margin-left: auto;
  font-family: "JetBrains Mono", "SF Mono", "Consolas", "Menlo", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  align-self: center;
}

/* 姓名逐字入场 */
.hero-name .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em) rotate(6deg);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
.hero-name.is-visible .char {
  opacity: 1;
  transform: translateY(0) rotate(0);
}


.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
  flex: 1;
  min-height: 0;
}

.hero-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.hero-name {
  font-size: clamp(52px, 10vw, 88px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 16px;
}

/* 姓名末尾闪烁光标 */
.hero-name .caret {
  display: inline-block;
  font-family: "JetBrains Mono", "SF Mono", "Consolas", monospace;
  font-weight: 400;
  color: var(--accent);
  animation: caret-blink 1s steps(1) infinite;
  margin-left: 4px;
  transform: translateY(-4px);
}
@keyframes caret-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hero-tagline {
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
  max-width: 34ch;
  margin-bottom: 28px;
}

.hero-tagline-sub {
  display: inline-block;
  margin-top: 4px;
  color: var(--text-muted);
  font-weight: 400;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}



.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1.5px solid transparent;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, #000);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover {
  color: var(--accent);
}

/* Hero 展示时词条错峰淡入（仅 opacity，不干扰公转 transform） */
body[data-page="hero"] .skill-orbit .chip {
  animation: chip-in 0.5s var(--ease) backwards;
}
body[data-page="hero"] .skill-orbit .chip:nth-child(1) { animation-delay: 0.05s; }
body[data-page="hero"] .skill-orbit .chip:nth-child(2) { animation-delay: 0.12s; }
body[data-page="hero"] .skill-orbit .chip:nth-child(3) { animation-delay: 0.19s; }
body[data-page="hero"] .skill-orbit .chip:nth-child(4) { animation-delay: 0.26s; }
body[data-page="hero"] .skill-orbit .chip:nth-child(5) { animation-delay: 0.33s; }
body[data-page="hero"] .skill-orbit .chip:nth-child(6) { animation-delay: 0.4s; }
body[data-page="hero"] .skill-orbit .chip:nth-child(7) { animation-delay: 0.47s; }
body[data-page="hero"] .skill-orbit .chip:nth-child(8) { animation-delay: 0.54s; }
body[data-page="hero"] .skill-orbit .chip:nth-child(9) { animation-delay: 0.61s; }
body[data-page="hero"] .skill-orbit .chip:nth-child(10) { animation-delay: 0.68s; }
body[data-page="hero"] .skill-orbit .chip:nth-child(11) { animation-delay: 0.75s; }
body[data-page="hero"] .skill-orbit .chip:nth-child(12) { animation-delay: 0.82s; }

@keyframes chip-in {
  from { opacity: 0; }
  to { opacity: 0.5; }
}

/* 技能椭圆轨道：绝对铺满 hero，词条绕左侧文字（左焦点）公转 */
.skill-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.chip {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-block;
  font-size: clamp(14px, 2vw, 20px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--c, var(--text));
  background: transparent;
  padding: 2px 4px;
  cursor: default;
  white-space: nowrap;
  pointer-events: auto;
  opacity: 0.5;
  /* 仅公转位移（JS 写入 --ox/--oy），不自转、不推开 */
  transform: translate(var(--ox, 0px), var(--oy, 0px));
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease), color 0.25s var(--ease);
  will-change: transform;
  user-select: none;
}

/* hover 放大并提亮，不影响其它词条 */
.chip:hover {
  transform: translate(var(--ox, 0px), var(--oy, 0px)) scale(1.2);
  opacity: 1;
  z-index: 5;
}

/* 错落字号 */
.chip:nth-child(3n) { font-size: clamp(16px, 2.4vw, 24px); }
.chip:nth-child(5n) { font-size: clamp(12px, 1.6vw, 16px); font-weight: 600; }

/* hover 显示分类提示气泡 */
.chip[data-cat]::after {
  content: attr(data-cat);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  background: var(--text);
  color: var(--bg);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 0.2s var(--ease);
  z-index: 6;
}
.chip[data-cat]:hover::after {
  opacity: 1;
}

.skill-cloud-note {
  font-family: "JetBrains Mono", "SF Mono", "Consolas", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
}

.hero-meta {
  margin-top: 24px;
  padding-top: 4px;
}

.meta-line {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.meta-sep {
  margin-inline: 10px;
  opacity: 0.5;
}

/* ─── About · Profile ─── */
.about-profile {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

.about-kicker {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.about-display {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 16px;
}

.about-display-accent {
  color: var(--accent);
}

.about-lead-bio {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.65;
  color: var(--text);
  max-width: 44ch;
  margin-bottom: 12px;
}

.about-desc {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 46ch;
}

/* Identity constellation (Bauhaus polyline grid) */
.id-constellation {
  position: relative;
  min-height: 300px;
  padding: 4px 0 0;
}

.id-const-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 12px;
}

.id-const-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.id-const-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  background: color-mix(in srgb, var(--accent-yellow) 55%, transparent);
  padding: 4px 10px;
  transform: rotate(-3deg);
}

.id-map {
  position: relative;
  width: 100%;
  aspect-ratio: 360 / 280;
  max-height: 300px;
}

.id-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.id-axis {
  stroke: color-mix(in srgb, var(--text) 18%, transparent);
  stroke-width: 1.25;
}

.id-wire {
  stroke: color-mix(in srgb, var(--text) 28%, transparent);
  stroke-width: 1.25;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.9s var(--ease);
}

.id-constellation.is-drawn .id-wire {
  stroke-dashoffset: 0;
}

.id-wire-1 { stroke: color-mix(in srgb, var(--accent) 55%, transparent); transition-delay: 0.05s; }
.id-wire-2 { stroke: color-mix(in srgb, var(--accent-blue) 50%, transparent); transition-delay: 0.12s; }
.id-wire-3 { stroke: color-mix(in srgb, var(--accent-yellow) 55%, transparent); transition-delay: 0.19s; }
.id-wire-4 { stroke: color-mix(in srgb, var(--accent) 40%, transparent); transition-delay: 0.26s; }
.id-wire-5 { stroke: color-mix(in srgb, var(--accent-blue) 40%, transparent); transition-delay: 0.33s; }

.id-mark-sq { fill: var(--accent); }
.id-mark-tri { fill: var(--accent-blue); }
.id-mark-dot { fill: var(--accent-yellow); }
.id-mark-sq2 { fill: none; stroke: var(--accent); stroke-width: 2; }
.id-mark-plus-h,
.id-mark-plus-v {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: square;
}

.id-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 3px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  max-width: 55%;
}

.id-constellation.is-drawn .id-node {
  opacity: 1;
  transform: translateY(0);
}

.id-node-name { left: 38%; top: 10%; transition-delay: 0.1s; }
.id-node-major { left: 46%; top: 28%; transition-delay: 0.18s; }
.id-node-school { left: 56%; top: 46%; transition-delay: 0.26s; }
.id-node-period { left: 48%; top: 62%; transition-delay: 0.34s; }
.id-node-base { left: 62%; top: 76%; transition-delay: 0.42s; }

.id-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.id-node-name .id-label { color: var(--accent); }
.id-node-major .id-label { color: var(--accent-blue); }
.id-node-school .id-label { color: var(--accent-yellow); }
.id-node-period .id-label { color: var(--accent); }
.id-node-base .id-label { color: var(--accent-blue); }

.id-value {
  font-size: clamp(14px, 1.5vw, 17px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.id-const-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px dashed color-mix(in srgb, var(--text) 14%, transparent);
}

.id-const-tags li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.id-const-tags i {
  width: 6px;
  height: 6px;
  background: var(--t, var(--accent));
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .id-map {
    aspect-ratio: auto;
    max-height: none;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 8px 0 4px 18px;
    border-left: 2px solid var(--border);
  }

  .id-links {
    display: none;
  }

  .id-node {
    position: static;
    opacity: 1;
    transform: none;
    max-width: none;
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
  }

  .id-label {
    min-width: 56px;
  }

  .id-constellation.is-drawn .id-node {
    transform: none;
  }
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 12px;
}

.about-stats-row {
  margin-bottom: 32px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-principles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  list-style: none;
}

.about-principles li {
  padding-left: 14px;
  border-left: 2px solid var(--cap, var(--accent));
}

.about-p-no {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--cap, var(--accent));
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.about-principles strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 6px;
}

.about-principles p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 36ch;
}

/* ─── Skills page top ─── */
.skills-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.skills-side {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 36ch;
}

.about-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.about-stat-icon {
  width: 9px;
  height: 9px;
  background: var(--stat, var(--accent));
}

.about-stat-icon-tri {
  width: 0;
  height: 0;
  background: none;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 9px solid var(--stat, var(--accent-blue));
}

.about-stat-icon-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--stat, var(--accent-yellow));
}

.about-stat-icon-plus {
  width: 11px;
  height: 11px;
  background: transparent;
  position: relative;
}

.about-stat-icon-plus::before,
.about-stat-icon-plus::after {
  content: "";
  position: absolute;
  background: var(--stat, var(--accent));
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.about-stat-icon-plus::before {
  width: 11px;
  height: 2px;
}

.about-stat-icon-plus::after {
  width: 2px;
  height: 11px;
}

.about-stat-num {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--stat, var(--accent));
  font-variant-numeric: tabular-nums;
}

.about-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Capability path */
.cap-path {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 8px 12px;
  align-items: stretch;
}

.cap-spine {
  grid-row: 1;
  grid-column: 1;
  width: 40px;
  height: 100%;
  min-height: 280px;
  color: var(--border);
  overflow: visible;
}

.cap-spine-track {
  opacity: 0.7;
}

.cap-spine-draw {
  stroke: var(--accent);
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 1.1s var(--ease);
}

.cap-path.is-drawn .cap-spine-draw {
  stroke-dashoffset: 0;
}

.cap-list {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cap-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.cap-item:last-child {
  border-bottom: none;
}

.cap-path.is-drawn .cap-item {
  opacity: 1;
  transform: translateY(0);
}

.cap-path.is-drawn .cap-item:nth-child(1) {
  transition-delay: 0.15s;
}

.cap-path.is-drawn .cap-item:nth-child(2) {
  transition-delay: 0.3s;
}

.cap-path.is-drawn .cap-item:nth-child(3) {
  transition-delay: 0.45s;
}

.cap-node {
  position: absolute;
  left: -44px;
  top: 28px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 1.5px solid var(--cap, var(--accent));
  z-index: 1;
}

.cap-node i {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--cap, var(--accent));
  font-variant-numeric: tabular-nums;
}

/* Skills 节点 hover：节点放大 + 卡片轻微左移提亮 */
.cap-item:hover .cap-node,
.cap-item:focus-within .cap-node {
  transform: scale(1.14);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--cap, var(--accent)) 16%, transparent);
}

.cap-node {
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.cap-item:hover .cap-card,
.cap-item:focus-within .cap-card {
  transform: translateX(4px);
}

.cap-card {
  transition: transform 0.25s var(--ease);
}

.cap-item:hover .cap-title,
.cap-item:focus-within .cap-title {
  color: var(--cap, var(--accent));
}

.cap-title {
  transition: color 0.2s var(--ease);
}

.cap-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 16px;
  align-items: start;
}

.cap-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  position: relative;
}

.cap-icon-sq {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--cap, var(--text));
}

.cap-icon-sq:first-child {
  top: 10px;
  left: 10px;
}

.cap-icon-sq:last-child {
  bottom: 10px;
  right: 10px;
}

.cap-icon-net {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--cap, var(--accent-blue));
  border-radius: 50%;
  position: relative;
}

.cap-icon-net::before,
.cap-icon-net::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cap, var(--accent-blue));
}

.cap-icon-net::before {
  top: -3px;
  left: -3px;
}

.cap-icon-net::after {
  bottom: -3px;
  right: -3px;
}

.cap-icon-box {
  width: 14px;
  height: 12px;
  border: 1.5px solid var(--cap, var(--accent-yellow));
  border-radius: 2px 2px 0 0;
  position: relative;
}

.cap-icon-box::after {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  bottom: -4px;
  height: 3px;
  border: 1.5px solid var(--cap, var(--accent-yellow));
  border-top: none;
}

.cap-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 6px;
}

.cap-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 36ch;
}

.cap-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.cap-tags li {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 4px 10px;
  border: 1px solid var(--border);
}

.cap-tags li::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cap, var(--accent));
  margin-right: 6px;
  vertical-align: middle;
}

.about-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text);
}

.about-foot-line {
  width: 24px;
  height: 1.5px;
  background: var(--border-strong);
}

.about-foot-cn {
  font-weight: 400;
  color: var(--text-muted);
}

.about-foot-flow {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ─── Projects ─── */
.projects-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.projects-grid.is-expanded .project-card {
  pointer-events: none;
}

.project-card {
  position: relative;
  padding: 24px 0 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transform-origin: center;
  transition: transform 0.45s var(--ease), opacity 0.45s var(--ease);
}

/* 左侧指示竖线：hover/聚焦时显现，作为非框式的选中提示 */
.project-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  background: var(--accent);
  border-radius: 3px;
  transform: translateY(-50%);
  transition: height 0.35s var(--ease);
}

/* hover 当前卡：放大 + 左竖线展开；非 hover 卡：缩小 + 被 JS 推开 */
.projects-grid:not(.is-expanded):hover .project-card {
  opacity: 0.45;
  transform: translate(var(--bx, 0px), var(--by, 0px)) scale(0.94);
}
.projects-grid:not(.is-expanded) .project-card:hover {
  opacity: 1;
  transform: scale(1.04);
  z-index: 2;
}
.projects-grid:not(.is-expanded) .project-card:hover::before {
  height: 70%;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.project-num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  font-variant-numeric: tabular-nums;
  background: var(--accent);
  flex-shrink: 0;
}
/* 4 个卡片用不同包豪斯几何形状 + 颜色 */
.project-card:nth-child(1) .project-num {
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 100%, 0 100%); /* 三角 */
  padding-top: 6px;
}
.project-card:nth-child(2) .project-num {
  background: var(--accent-blue);
  border-radius: 50%; /* 圆 */
}
.project-card:nth-child(3) .project-num {
  background: var(--accent-yellow);
  /* 方块（默认矩形） */
}
.project-card:nth-child(4) .project-num {
  background: var(--accent);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); /* 六边 */
}

.project-role {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.project-name {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.project-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 48ch;
}

.project-result {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  padding-top: 12px;
  margin-top: 4px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin-top: 4px;
}

.tag-list li {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.tag-list li + li::before {
  content: "·";
  margin: 0 8px;
  color: var(--border);
}

.project-link {
  position: absolute;
  bottom: 28px;
  right: 28px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  pointer-events: none;
}

.project-card:hover .project-link,
.project-card:focus-visible .project-link {
  opacity: 1;
  transform: translateX(0);
}

/* ─── Project Expand (card → full grid) ─── */
.project-expand {
  position: absolute;
  z-index: 5;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  overflow: hidden;
  box-sizing: border-box;
  will-change: top, left, width, height;
}

.project-expand[hidden] {
  display: none;
}

.project-expand.is-animating {
  display: block;
}

.expand-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  opacity: 0;
  transition: opacity 0.25s var(--ease) 0.12s;
}

.project-expand.is-open .expand-inner {
  opacity: 1;
}

.project-expand.is-closing .expand-inner {
  opacity: 0;
  transition-delay: 0s;
  transition-duration: 0.15s;
}

.expand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.expand-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.modal-index {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.modal-role {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  color: var(--text);
  flex-shrink: 0;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.modal-close:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.expand-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 48px;
  align-content: start;
}

.expand-main .modal-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.modal-title {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.modal-tags {
  margin-bottom: 8px;
}

.modal-section {
  margin-bottom: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.modal-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.modal-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  max-width: 56ch;
}

.modal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-list li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}

.modal-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 1.5px;
  background: var(--border-strong);
}

.modal-list-accent li {
  color: var(--text);
}

.modal-list-accent li::before {
  background: var(--accent);
}

.modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.modal-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1.5px solid var(--border-strong);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.modal-links a:hover {
  background: var(--text);
  color: var(--bg);
}

@media (min-width: 768px) {
  .expand-body {
    grid-template-columns: 1.1fr 0.9fr;
    padding: 32px 36px 40px;
    gap: 24px 56px;
  }

  .expand-side .modal-section:first-child {
    border-top: none;
    padding-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-expand {
    transition: none !important;
  }

  .expand-inner {
    transition: none !important;
  }
}

/* ─── Experience · Horizontal square journey ─── */
.exp-intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 36px;
}

.exp-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.exp-kicker-line {
  width: 32px;
  height: 1.5px;
  background: var(--accent);
}

.exp-display {
  font-size: clamp(24px, 3.6vw, 36px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
}

.exp-display span {
  color: var(--text-muted);
  font-weight: 700;
}

.exp-intro-side {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 32ch;
  padding-left: 14px;
  border-left: 2px solid var(--border);
}

/* Journey line + nodes */
.exp-journey {
  position: relative;
  margin: 8px 0 28px;
  padding: 8px 0 0;
}

.exp-line {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 42px;
  height: 2px;
  pointer-events: none;
}

.exp-line-track {
  position: absolute;
  inset: 0;
  background: var(--border);
}

.exp-line-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--accent);
  transition: width 0.7s var(--ease);
}

.exp-journey.is-drawn .exp-line-fill {
  width: 100%;
}

.exp-nodes {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  list-style: none;
}

.exp-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 4px 8px;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.exp-journey.is-drawn .exp-node {
  opacity: 1;
  transform: translateY(0);
}

.exp-journey.is-drawn .exp-node:nth-child(1) { transition-delay: 0.05s; }
.exp-journey.is-drawn .exp-node:nth-child(2) { transition-delay: 0.12s; }
.exp-journey.is-drawn .exp-node:nth-child(3) { transition-delay: 0.19s; }
.exp-journey.is-drawn .exp-node:nth-child(4) { transition-delay: 0.26s; }

.exp-node-no {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--cap, var(--accent));
  font-variant-numeric: tabular-nums;
}

.exp-node-sq {
  width: 18px;
  height: 18px;
  background: var(--bg);
  border: 2px solid var(--cap, var(--accent));
  transition: background 0.25s var(--ease), transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
  flex-shrink: 0;
}

.exp-node:hover .exp-node-sq,
.exp-node:focus-visible .exp-node-sq {
  transform: scale(1.12);
}

.exp-node.is-active .exp-node-sq {
  background: var(--cap, var(--accent));
  transform: scale(1.2);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--cap, var(--accent)) 22%, transparent);
}

.exp-node-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.exp-node-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cap, var(--accent));
  border: 1px solid color-mix(in srgb, var(--cap, var(--accent)) 40%, var(--border));
  padding: 2px 7px;
}

.exp-node-time {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.exp-node-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  max-width: 14ch;
}

.exp-node.is-active .exp-node-label {
  color: var(--text);
}

/* Detail panel */
.exp-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px 40px;
  padding: 28px 0 8px;
  border-top: 1px solid var(--border);
  min-height: 200px;
}

.exp-detail.is-swap .exp-detail-left,
.exp-detail.is-swap .exp-detail-right {
  opacity: 0;
  transform: translateY(6px);
}

.exp-detail-left,
.exp-detail-right {
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.exp-detail-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.exp-detail-date {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-height: 1.1em;
  white-space: nowrap;
}

.exp-detail-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cap, var(--accent));
  border: 1px solid color-mix(in srgb, var(--cap, var(--accent)) 40%, var(--border));
  padding: 3px 8px;
  margin-bottom: 12px;
}

.exp-detail-title {
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 10px;
}

.exp-detail-text {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 48ch;
  margin-bottom: 16px;
  min-height: calc(1.75em * 3);
}

.exp-detail-text em {
  color: var(--cap, var(--accent));
  font-weight: 700;
  font-style: normal;
}

.exp-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exp-detail-tags li {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 4px 10px;
  border: 1px solid var(--border);
}

.exp-detail-tags li::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cap, var(--accent));
  margin-right: 6px;
  vertical-align: middle;
}

.exp-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.exp-foot-key {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.exp-foot-note {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* ─── Contact · Scheme C: left CTA + right rail ─── */
.contact {
  overflow: hidden;
}

.gb-watermark {
  position: absolute;
  right: 6%;
  bottom: 2%;
  transform: translateX(12%);
  font-size: clamp(120px, 22vw, 280px);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.8;
  color: var(--text);
  opacity: 0.045;
  user-select: none;
  white-space: nowrap;
  transition: opacity 0.25s ease;
}

/* 长标签略缩小，避免溢出（EXPERIENCE / PROJECTS / CONTACT） */
body[data-page="experience"] .gb-watermark,
body[data-page="projects"] .gb-watermark,
body[data-page="contact"] .gb-watermark {
  font-size: clamp(84px, 15vw, 190px);
  letter-spacing: -0.04em;
}

[data-theme="dark"] .gb-watermark {
  opacity: 0.06;
}

.gb-geo {
  position: absolute;
  border-radius: 50%;
}

.gb-ring-a {
  width: min(30vw, 300px);
  height: min(30vw, 300px);
  top: -6%;
  right: 4%;
  border: 2px solid var(--accent-blue);
  opacity: 0.16;
}

.gb-ring-b {
  width: min(15vw, 150px);
  height: min(15vw, 150px);
  bottom: 14%;
  left: 6%;
  border: 2px solid var(--accent-yellow);
  opacity: 0.3;
}

.gb-blob {
  width: min(26vw, 260px);
  height: min(26vw, 260px);
  bottom: 6%;
  right: 10%;
  background: var(--accent);
  opacity: 0.07;
}

.contact > .contact-stage-c.container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
  justify-content: center;
  padding-block: 24px;
  width: 100%;
}

.cc-left {
  min-width: 0;
}

.cc-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 28px;
}

.cc-head .section-title {
  margin: 0;
}

.cm-signal,
.cc-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.cc-status {
  margin-bottom: 28px;
  padding: 10px 14px;
  border: 1.5px solid var(--text);
  width: fit-content;
  background: #0a0a0a;
  color: #f1f3f5;
}

[data-theme="dark"] .cc-status {
  background: #000;
  border-color: #2a313b;
  color: #f1f3f5;
}

.status-lamp {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.55);
  animation: status-pulse 1.8s ease-out infinite;
  flex-shrink: 0;
}

@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.cm-headline {
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.96;
  margin: 0 0 16px;
}

.cm-line {
  display: block;
}

.cm-headline em {
  font-style: normal;
  color: var(--accent);
}

.cm-sub {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0;
}

/* 右：无框竖排渠道 */
.cc-rail {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  width: 100%;
  max-width: 480px;
  margin-inline: auto 0;
}

.cc-item {
  --ch: var(--accent);
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  column-gap: 14px;
  width: 100%;
  padding: 18px 4px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-decoration: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease), border-color 0.2s var(--ease);
}

.cc-item:first-child {
  border-top: 1px solid var(--border);
}

.cc-item.ch-red { --ch: var(--accent); }
.cc-item.ch-blue { --ch: var(--accent-blue); }
.cc-item.ch-yellow { --ch: var(--accent-yellow); }

.cc-item:hover,
.cc-item:focus-visible {
  color: var(--ch);
  transform: translateX(6px);
  border-bottom-color: var(--ch);
  outline: none;
}

.cc-no {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  min-width: 1.6em;
  transition: color 0.2s var(--ease);
}

.cc-item:hover .cc-no {
  color: var(--ch);
}

.cc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ch);
  flex-shrink: 0;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--ch) 40%, transparent);
  transition: box-shadow 0.25s var(--ease), transform 0.2s var(--ease);
}

.cc-item:hover .cc-dot {
  transform: scale(1.15);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--ch) 18%, transparent);
}

.cc-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cc-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.cc-meta {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s var(--ease);
}

.cc-item:hover .cc-meta {
  color: inherit;
  opacity: 0.8;
}

.cc-go {
  font-size: 18px;
  font-weight: 700;
  color: var(--ch);
  opacity: 0.35;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.cc-item:hover .cc-go {
  opacity: 1;
  transform: translateX(3px);
}

.cc-item.is-copied .cc-meta,
.contact-wechat.is-copied .cc-meta {
  color: var(--accent);
  font-weight: 700;
}

/* 复制成功：箭头闪成勾号 + 短脉冲 */
.cc-item.is-copied .cc-go,
.contact-wechat.is-copied .cc-go {
  content: "";
  opacity: 1;
  color: #2ecc71;
  animation: cc-copied 1s var(--ease);
}

@keyframes cc-copied {
  0% { transform: scale(0.6); opacity: 0; }
  30% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .status-lamp {
    animation: none !important;
  }
}

/* ─── Footer ─── */
.site-footer {
  padding-block: 28px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-inner p {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-geo {
  display: flex;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
}

.dot-red {
  background: var(--accent);
}

.dot-blue {
  background: var(--accent-blue);
}

.dot-yellow {
  background: var(--accent-yellow);
}

/* ─── Reveal animation ─── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 入场动画差异化：各 section 用不同的初始姿态 */
/* About */
.about .reveal {
  transform: translateY(20px);
}
.about .reveal.is-visible {
  transform: translateY(0);
}
.about .about-stats-row.reveal {
  transition-delay: 0.08s;
}
.about .about-principles.reveal {
  transition-delay: 0.14s;
}

/* Skills */
.skills .reveal {
  transform: translateY(20px);
}
.skills .reveal.is-visible {
  transform: translateY(0);
}
.skills .cap-path.reveal {
  transition-delay: 0.1s;
}
.skills .about-foot.reveal {
  transition-delay: 0.18s;
}

/* Projects：卡片从下方错位淡入 */
.projects .project-card.reveal {
  transform: translateY(40px);
}
.projects .project-card.reveal.is-visible {
  transform: translateY(0);
}
.projects .project-card.reveal:nth-child(2) { transition-delay: 0.08s; }
.projects .project-card.reveal:nth-child(3) { transition-delay: 0.16s; }
.projects .project-card.reveal:nth-child(4) { transition-delay: 0.24s; }

/* Experience */
.experience .reveal {
  transform: translateY(16px);
}
.experience .reveal.is-visible {
  transform: translateY(0);
}
.experience .exp-journey.reveal {
  transition-delay: 0.06s;
}
.experience .exp-detail.reveal {
  transition-delay: 0.12s;
}
.experience .exp-foot.reveal {
  transition-delay: 0.16s;
}

/* Contact C 入场 */
.contact .cc-left.reveal {
  transform: translateX(-20px);
}
.contact .cc-left.reveal.is-visible {
  transform: translateX(0);
}
.contact .cc-rail.reveal {
  transform: translateX(20px);
}
.contact .cc-rail.reveal.is-visible {
  transform: translateX(0);
}
.contact .cc-rail.reveal.is-visible .cc-item {
  animation: rail-in 0.4s var(--ease) both;
}
.contact .cc-rail.reveal.is-visible .cc-item:nth-child(1) { animation-delay: 0.04s; }
.contact .cc-rail.reveal.is-visible .cc-item:nth-child(2) { animation-delay: 0.1s; }
.contact .cc-rail.reveal.is-visible .cc-item:nth-child(3) { animation-delay: 0.16s; }
.contact .cc-rail.reveal.is-visible .cc-item:nth-child(4) { animation-delay: 0.22s; }
.contact .cc-rail.reveal.is-visible .cc-item:nth-child(5) { animation-delay: 0.28s; }

@keyframes rail-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact .cc-rail.reveal.is-visible .cc-item {
    animation: none !important;
  }
}

/* ─── Breakpoints ─── */
@media (min-width: 768px) {
  :root {
    --gutter: 40px;
    --section-y: 120px;
  }

  .nav-list {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .mobile-nav {
    display: none !important;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
  }

  .hero {
    padding-block: 36px 24px;
  }

  .about-profile {
    grid-template-columns: 1.15fr 0.95fr;
    gap: 40px 40px;
    align-items: start;
  }

  .id-constellation {
    min-height: 320px;
  }

  .id-map {
    max-height: 320px;
  }

  .about-stats-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .about-principles {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 32px;
  }

  .skills-top {
    grid-template-columns: 1.3fr 0.7fr;
    gap: 40px;
    align-items: end;
  }

  .skills-side {
    justify-self: end;
    border-left: 2px solid var(--border);
    padding-left: 18px;
  }

  .cap-card {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px 24px;
  }

  .cap-tags {
    grid-column: auto;
    justify-content: flex-end;
    max-width: 280px;
    margin-top: 0;
  }

  .cap-text {
    max-width: 40ch;
  }

  .exp-intro {
    grid-template-columns: 1.35fr 0.65fr;
    gap: 40px;
    align-items: end;
    margin-bottom: 28px;
  }

  .exp-intro-side {
    justify-self: end;
    max-width: 26ch;
  }

  .exp-detail {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 32px 56px;
    align-items: start;
    padding: 32px 0 4px;
  }

  .exp-node-label {
    max-width: 16ch;
  }

  .projects-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 56px;
    row-gap: 32px;
  }

  .contact > .contact-stage-c.container {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
    gap: 48px 56px;
    align-items: center;
  }

  .cm-headline {
    font-size: clamp(56px, 6.5vw, 80px);
  }

  .cc-rail {
    max-width: none;
  }

  .cc-item {
    padding: 20px 6px;
  }

  .cc-name {
    font-size: 20px;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 48px;
  }

  .hero-name {
    font-size: 92px;
  }

  .about-stat-num {
    font-size: 40px;
  }

  .about-display {
    font-size: 52px;
  }

  .section-title {
    font-size: 48px;
  }

  .contact > .contact-stage-c.container {
    gap: 56px 72px;
  }

  .project-card {
    padding: 28px 0 28px 24px;
  }

  .project-name {
    font-size: 24px;
  }
}

/* ── 窄屏：移动端恢复原生滚动，section 不再 fixed 堆叠 ── */
@media (max-width: 767px) {
  body {
    overflow: auto;
  }
  .hero,
  .section {
    position: relative;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    min-height: auto;
  }
  .section {
    display: block;
  }
  .section > .container {
    display: block;
  }

  .sidebar,
  .sidebar:hover,
  .sidebar:focus-within {
    width: var(--sidebar-w);
    padding: 20px 0;
    align-items: center;
  }

  .logo {
    padding: 0;
    justify-content: center;
  }

  .logo-text {
    display: none;
  }

  .nav-list,
  .nav {
    display: none;
  }

  .sidebar-foot {
    align-items: center;
    padding-left: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .mobile-nav {
    position: absolute;
    top: 0;
    left: 100%;
    width: 200px;
    height: 100vh;
    padding: 80px 20px 20px;
    border-right: 1px solid var(--border);
    border-left: 1px solid var(--border);
    box-shadow: 4px 0 24px -12px rgba(0, 0, 0, 0.25);
  }

  .mobile-nav[hidden] {
    display: none;
  }
}

/* ═══════════════════════════════════════════
   包豪斯几何元素工具类
   纯 CSS 几何：三角/半圆/圆环/十字/方块/斜线
   ═══════════════════════════════════════════ */
.bh {
  --bh-c: var(--accent);
  --bh-s: 48px;
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

/* 实心方块 */
.bh-square {
  width: var(--bh-s);
  height: var(--bh-s);
  background: var(--bh-c);
}

/* 圆 */
.bh-circle {
  width: var(--bh-s);
  height: var(--bh-s);
  border-radius: 50%;
  background: var(--bh-c);
}

/* 圆环（空心描边） */
.bh-ring {
  width: var(--bh-s);
  height: var(--bh-s);
  border-radius: 50%;
  border: 4px solid var(--bh-c);
  background: transparent;
}

/* 半圆 */
.bh-semicircle {
  width: var(--bh-s);
  height: calc(var(--bh-s) / 2);
  background: var(--bh-c);
  border-radius: calc(var(--bh-s) / 2) calc(var(--bh-s) / 2) 0 0;
}

/* 三角形（向上） */
.bh-triangle {
  width: 0;
  height: 0;
  border-left: calc(var(--bh-s) / 2) solid transparent;
  border-right: calc(var(--bh-s) / 2) solid transparent;
  border-bottom: var(--bh-s) solid var(--bh-c);
  background: transparent;
}

/* 十字（加号） */
.bh-cross {
  width: var(--bh-s);
  height: var(--bh-s);
  position: absolute;
}
.bh-cross::before,
.bh-cross::after {
  content: "";
  position: absolute;
  background: var(--bh-c);
}
.bh-cross::before {
  left: 50%;
  top: 0;
  width: 4px;
  height: 100%;
  transform: translateX(-50%);
}
.bh-cross::after {
  top: 50%;
  left: 0;
  height: 4px;
  width: 100%;
  transform: translateY(-50%);
}

/* 斜线条 */
.bh-bar {
  width: var(--bh-s);
  height: 6px;
  background: var(--bh-c);
  transform: rotate(-25deg);
}

/* 三色横条组（红蓝黄小色块排列） */
.bh-tristripe {
  display: flex;
  gap: 4px;
}
.bh-tristripe > i {
  display: block;
  width: 18px;
  height: 18px;
}
.bh-tristripe > i:nth-child(1) { background: var(--accent); }
.bh-tristripe > i:nth-child(2) { background: var(--accent-blue); }
.bh-tristripe > i:nth-child(3) { background: var(--accent-yellow); }

