/* ============================================================
   Jaden · 个人网站 共享样式
   深色工程台风格：近黑底 / 冷蓝主色 / 薄荷绿辅色
   ============================================================ */

:root {
  --bg: #070a10;
  --bg-soft: #0a0f18;
  --panel: rgba(14, 21, 33, 0.72);
  --panel-solid: #0d1420;
  --line: rgba(148, 163, 184, 0.13);
  --line-strong: rgba(148, 163, 184, 0.24);
  --text: #e9eff8;
  --text-2: #a9b7ca;
  --muted: #7c8ba1;
  --dim: #55657c;
  --accent: #5aa9ff;
  --accent-soft: rgba(90, 169, 255, 0.12);
  --accent-line: rgba(90, 169, 255, 0.34);
  --mint: #72e3bf;
  --mint-soft: rgba(114, 227, 191, 0.1);
  --warm: #f0c879;
  --danger: #ff8080;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Noto Sans SC", monospace;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
::selection { background: rgba(90, 169, 255, 0.28); color: #fff; }

/* 背景：细网格 + 顶部冷光 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(90, 169, 255, 0.13), transparent 62%),
    radial-gradient(700px 420px at 8% 18%, rgba(114, 227, 191, 0.055), transparent 68%),
    linear-gradient(180deg, #070a10 0%, #070a10 55%, #080c13 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 12%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 12%, #000 0%, transparent 78%);
}

.container { width: min(var(--container), calc(100% - 48px)); margin: 0 auto; }
.narrow { width: min(880px, calc(100% - 48px)); margin: 0 auto; }

/* ============ 导航 ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: 68px;
  display: flex;
  align-items: center;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 10, 16, 0.82);
  border-bottom-color: var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: min(var(--container), calc(100% - 48px)); margin: 0 auto; position: relative; z-index: 4; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--accent-line);
  background: linear-gradient(145deg, rgba(90, 169, 255, 0.16), rgba(90, 169, 255, 0.03));
  border-radius: 10px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b { font-size: 14px; letter-spacing: 0.08em; font-weight: 600; }
.brand-text span { font-size: 10px; font-family: var(--font-mono); color: var(--dim); letter-spacing: 0.16em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-size: 13px;
  color: var(--text-2);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-strong);
  padding: 8px 14px;
  border-radius: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2) !important;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.nav-cta:hover { border-color: var(--accent-line); color: #fff !important; background: var(--accent-soft); }
.nav-cta::after { display: none; }
.nav-toggle {
  display: none;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 9px;
  color: var(--text);
  padding: 0;
}
.nav-toggle span { display: block; width: 16px; height: 1px; background: currentColor; margin: 4px auto; transition: transform 0.2s, opacity 0.2s; }

/* ============ 通用 ============ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent-line); }
.section { padding: 112px 0 0; position: relative; }
section[id] { scroll-margin-top: 88px; }
.section-head {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 36px;
  align-items: start;
  padding-bottom: 38px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 46px;
}
.section-index { font-family: var(--font-mono); font-size: 12px; color: var(--dim); letter-spacing: 0.1em; padding-top: 8px; }
.section-index b { display: block; font-size: 30px; color: var(--line-strong); font-weight: 500; line-height: 1; margin-top: 6px; }
.section-title-wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.section-title { font-size: clamp(28px, 3vw, 38px); line-height: 1.18; letter-spacing: -0.02em; font-weight: 700; }
.section-sub { max-width: 420px; color: var(--muted); font-size: 14px; line-height: 1.8; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 18px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 500;
  transition: transform 0.18s ease, background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #05101f; font-weight: 600; box-shadow: 0 10px 30px rgba(90, 169, 255, 0.16); }
.btn-primary:hover { background: #73b8ff; }
.btn-ghost { border-color: var(--line-strong); color: var(--text-2); background: rgba(255, 255, 255, 0.015); }
.btn-ghost:hover { border-color: var(--accent-line); color: #fff; background: var(--accent-soft); }
.btn-small { padding: 8px 13px; font-size: 12.5px; border-radius: 7px; }
.btn svg { width: 15px; height: 15px; flex: none; }

.tag {
  display: inline-flex; align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.018);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
  white-space: nowrap;
}
.tag.accent { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }

/* ============ Hero ============ */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 120px 0 80px; overflow: hidden; }
#net { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; z-index: 0; pointer-events: none; }
.hero-inner {
  position: relative; z-index: 1;
  width: min(var(--container), calc(100% - 48px)); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 64px; align-items: center;
}
.hero-copy { min-width: 0; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--line);
  background: rgba(10, 15, 24, 0.62);
  border-radius: 999px;
  padding: 5px 12px 5px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(114, 227, 191, 0.1); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 3px rgba(114, 227, 191, 0.08); } 50% { box-shadow: 0 0 0 7px rgba(114, 227, 191, 0.02); } }
.hero h1 {
  margin: 26px 0 0;
  font-size: clamp(48px, 7.2vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 900;
}
.hero h1 .grad {
  display: block;
  background: linear-gradient(96deg, #ffffff 8%, #bcd6f5 44%, #6fa9e8 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 .outline {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(148, 163, 184, 0.34);
  font-size: 0.44em;
  letter-spacing: 0.16em;
  font-weight: 500;
  margin-top: 16px;
  font-family: var(--font-mono);
}
.hero-role { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2); letter-spacing: 0.06em; }
.hero-role i { width: 4px; height: 4px; border-radius: 50%; background: var(--dim); display: inline-block; }
.hero-lead { max-width: 560px; margin: 24px 0 0; color: var(--text-2); font-size: 16px; line-height: 1.9; }
.hero-lead strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 54px; border-top: 1px solid var(--line); }
.stat { padding: 18px 18px 0 0; }
.stat + .stat { padding-left: 18px; border-left: 1px solid var(--line); }
.stat-num { font-family: var(--font-mono); font-size: 24px; line-height: 1; color: var(--text); font-weight: 500; letter-spacing: -0.02em; }
.stat-num em { font-style: normal; color: var(--accent); }
.stat-label { margin-top: 8px; font-size: 11.5px; color: var(--dim); line-height: 1.5; }

/* 终端卡片 */
.terminal {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(17, 25, 39, 0.92), rgba(10, 15, 24, 0.92));
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: rotate(0.4deg);
  min-width: 0;
}
.terminal::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(130deg, rgba(90, 169, 255, 0.055), transparent 42%);
  pointer-events: none;
}
.term-bar { display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.term-dot { width: 8px; height: 8px; border-radius: 50%; background: #2a3546; }
.term-dot:nth-child(1) { background: rgba(255, 128, 128, 0.65); }
.term-dot:nth-child(2) { background: rgba(240, 200, 121, 0.6); }
.term-dot:nth-child(3) { background: rgba(114, 227, 191, 0.55); }
.term-file { margin-left: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--dim); letter-spacing: 0.05em; }
.term-body { padding: 22px 22px 26px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.95; }
.term-line { display: flex; gap: 10px; }
.term-line .p { color: var(--mint); flex: none; }
.term-line .cmd { color: var(--text); }
.term-out { margin: 7px 0 18px 22px; color: var(--text-2); overflow-wrap: anywhere; }
.term-paths { display: flex; flex-wrap: wrap; column-gap: 12px; }
.term-out b { color: var(--accent); font-weight: 500; }
.term-out .warm { color: var(--warm); }
.term-cursor { display: inline-block; width: 7px; height: 14px; background: var(--accent); vertical-align: -2px; margin-left: 3px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.term-foot { display: flex; justify-content: space-between; gap: 16px; padding: 12px 22px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 10.5px; color: var(--dim); }
.term-foot span { white-space: nowrap; }

/* ============ 研究方向 ============ */
.research-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.research-card {
  position: relative;
  padding: 26px 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.008));
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s, background 0.25s;
}
.research-card::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
  opacity: 0; transition: opacity 0.25s;
}
.research-card:hover { border-color: var(--accent-line); transform: translateY(-3px); background: linear-gradient(180deg, rgba(90, 169, 255, 0.055), rgba(255, 255, 255, 0.008)); }
.research-card:hover::after { opacity: 1; }
.research-num { font-family: var(--font-mono); font-size: 11px; color: var(--dim); letter-spacing: 0.1em; }
.research-card h3 { margin: 20px 0 10px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.research-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.85; }
.research-key { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.research-key span { font-family: var(--font-mono); font-size: 10px; color: var(--dim); letter-spacing: 0.04em; }

/* ============ 项目 ============ */
.projects { display: flex; flex-direction: column; gap: 28px; }
.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(15, 22, 34, 0.72), rgba(10, 15, 24, 0.62));
  overflow: hidden;
  transition: border-color 0.3s;
}
.project:hover { border-color: var(--line-strong); }
.project.reverse .project-copy { order: 2; }
.project.reverse .project-media { order: 1; border-left: 0; border-right: 1px solid var(--line); }
.project-copy { padding: 38px 38px 34px; display: flex; flex-direction: column; min-width: 0; }
.project-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.project-no { font-family: var(--font-mono); font-size: 11px; color: var(--dim); letter-spacing: 0.12em; }
.project-period { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.project h3 { margin: 18px 0 6px; font-size: clamp(23px, 2.2vw, 29px); line-height: 1.25; letter-spacing: -0.025em; font-weight: 700; }
.project h3 .en { display: block; font-family: var(--font-mono); font-size: 11.5px; font-weight: 400; letter-spacing: 0.18em; color: var(--accent); margin-bottom: 8px; text-transform: uppercase; }
.project-sub { color: var(--text-2); font-size: 13px; margin: 0 0 4px; text-wrap: balance; }
.project-desc { color: var(--muted); font-size: 13.5px; line-height: 1.85; margin: 16px 0 0; text-wrap: pretty; }
.project-points { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 9px; }
.project-points li { position: relative; padding-left: 16px; color: var(--text-2); font-size: 12.8px; line-height: 1.75; }
.project-points li::before { content: ""; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: 0.7; }
.project-points li b { color: var(--text); font-weight: 600; }
.project-metrics { display: flex; flex-wrap: wrap; gap: 26px; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.pm-val { font-family: var(--font-mono); font-size: 19px; color: var(--accent); line-height: 1; }
.pm-label { margin-top: 6px; font-size: 10.5px; color: var(--dim); }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.project-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 26px; }
.project-media {
  position: relative;
  padding: 30px 30px 30px 0;
  border-left: 1px solid var(--line);
  display: flex; align-items: center;
  background:
    radial-gradient(520px 300px at 65% 40%, rgba(90, 169, 255, 0.09), transparent 70%),
    linear-gradient(160deg, rgba(90, 169, 255, 0.03), transparent 50%);
  min-width: 0;
}
.project.reverse .project-media { padding: 30px 0 30px 30px; }
.shot {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  background: #0b111b;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
}
.project:hover .shot { transform: translateY(-4px) scale(1.008); }
.shot-bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.shot-bar i { width: 6px; height: 6px; border-radius: 50%; background: #26303f; display: block; }
.shot-bar span { margin-left: 6px; font-family: var(--font-mono); font-size: 9.5px; color: var(--dim); letter-spacing: 0.05em; }
.shot img { width: 100%; height: auto; }
.shot-note { position: absolute; right: 42px; bottom: 16px; font-family: var(--font-mono); font-size: 9.5px; color: var(--dim); letter-spacing: 0.04em; }
.project.reverse .shot-note { right: auto; left: 42px; }

/* ============ Demo 索引 ============ */
.demo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.demo-card {
  position: relative;
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  overflow: hidden;
  transition: transform 0.28s, border-color 0.28s, box-shadow 0.28s;
}
.demo-card:hover { transform: translateY(-5px); border-color: var(--accent-line); box-shadow: 0 26px 60px rgba(0,0,0,.32); }
.demo-visual { position: relative; height: 176px; border-bottom: 1px solid var(--line); overflow: hidden; background: #080d15; }
.demo-visual .glow { position: absolute; inset: 0; background: radial-gradient(380px 180px at 50% 20%, rgba(90,169,255,.14), transparent 70%); }
.demo-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.demo-kicker { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: var(--dim); letter-spacing: .1em; }
.demo-body h3 { margin: 12px 0 8px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.demo-body p { margin: 0 0 18px; color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.demo-link { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.demo-link svg { width: 14px; height: 14px; transition: transform .2s; }
.demo-card:hover .demo-link svg { transform: translateX(4px); }

/* 四个 mini 视觉 */
.mini-chat { position: absolute; inset: 0; padding: 26px 24px; display: flex; flex-direction: column; gap: 8px; }
.mini-bubble { height: 9px; border-radius: 4px; background: rgba(148, 163, 184, 0.14); }
.mini-bubble.me { width: 46%; align-self: flex-end; background: rgba(90, 169, 255, 0.36); }
.mini-bubble.ai { width: 72%; background: rgba(148, 163, 184, 0.13); }
.mini-bubble.ai2 { width: 58%; background: rgba(148, 163, 184, 0.1); }
.mini-pipe { margin-top: auto; display: flex; gap: 5px; }
.mini-pipe i { height: 3px; flex: 1; background: rgba(90,169,255,.28); border-radius: 2px; }
.mini-pipe i:nth-child(2) { background: rgba(90,169,255,.44); }
.mini-pipe i:nth-child(3) { background: rgba(114,227,191,.45); }
.mini-trace { position: absolute; inset: 0; padding: 24px 26px; display: flex; flex-direction: column; gap: 0; }
.trace-row { display: flex; gap: 10px; align-items: flex-start; min-height: 34px; }
.trace-node { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--accent-line); background: #0a111c; margin-top: 5px; flex: none; position: relative; }
.trace-row:not(:last-child) .trace-node::after { content: ""; position: absolute; left: 3px; top: 10px; width: 1px; height: 24px; background: var(--line-strong); }
.trace-line { height: 7px; border-radius: 3px; background: rgba(148,163,184,.16); margin-top: 6px; }
.trace-line.w30 { width: 30%; } .trace-line.w45 { width: 45%; } .trace-line.w60 { width: 60%; } .trace-line.w75 { width: 75%; }
.trace-line.hl { background: rgba(90,169,255,.36); }
.mini-cal { position: absolute; inset: 0; padding: 26px 24px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; align-content: center; }
.mini-cal i { height: 13px; border-radius: 3px; background: rgba(148,163,184,.09); }
.mini-cal i.on { background: rgba(114,227,191,.26); }
.mini-cal i.hot { background: rgba(90,169,255,.45); }
.mini-cal i.hot2 { background: rgba(240,200,121,.3); }
.mini-jd { position: absolute; inset: 0; padding: 24px 26px; display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: center; gap: 20px; }
.mini-jd-score {
  position: relative; width: 78px; height: 78px; border-radius: 50%;
  background: conic-gradient(from -90deg, var(--accent) 0 96%, rgba(148,163,184,.12) 96%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.mini-jd-score::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #0a111c; }
.mini-jd-score b { position: relative; z-index: 1; font-family: var(--font-mono); font-size: 23px; font-weight: 600; line-height: 1; color: var(--text); }
.mini-jd-score span { position: relative; z-index: 1; margin-top: 3px; font-family: var(--font-mono); font-size: 8px; color: var(--dim); }
.mini-jd-bars { display: flex; flex-direction: column; gap: 10px; }
.mini-jd-bars i { display: block; height: 5px; border-radius: 3px; background: linear-gradient(90deg, rgba(90,169,255,.28), var(--accent)); }
.mini-jd-bars i:nth-child(3) { background: linear-gradient(90deg, rgba(240,200,121,.25), var(--warm)); }

/* ============ 技术栈 ============ */
.stack-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.stack-group { border: 1px solid var(--line); border-radius: 12px; padding: 20px 18px; background: rgba(255,255,255,.014); }
.stack-group h4 { margin: 0 0 14px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.stack-group .tag { display: flex; margin-bottom: 6px; white-space: normal; }
.stack-group .tag:last-child { margin-bottom: 0; }

/* ============ 时间线 ============ */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(180deg, var(--accent-line), var(--line) 30%, var(--line) 80%, transparent); }
.tl-item { position: relative; padding: 0 0 34px 0; display: grid; grid-template-columns: 128px 1fr; gap: 22px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -30px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--accent); box-shadow: 0 0 0 4px rgba(90,169,255,.07); }
.tl-time { font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); letter-spacing: .04em; padding-top: 1px; }
.tl-body h4 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.tl-body .org { color: var(--accent); font-size: 12.5px; margin-top: 3px; }
.tl-body p { margin: 8px 0 0; color: var(--muted); font-size: 12.8px; line-height: 1.8; max-width: 640px; }

/* ============ 联系 ============ */
.contact-panel {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  padding: 56px 52px;
  overflow: hidden;
  background:
    radial-gradient(600px 320px at 12% 0%, rgba(90, 169, 255, 0.16), transparent 65%),
    radial-gradient(500px 280px at 95% 100%, rgba(114, 227, 191, 0.09), transparent 68%),
    linear-gradient(180deg, #0c1422, #080d15);
}
.contact-panel::after {
  content: "";
  position: absolute; right: -40px; top: -60px;
  width: 260px; height: 260px;
  border: 1px solid rgba(90, 169, 255, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 40px rgba(90, 169, 255, 0.03), 0 0 0 80px rgba(90, 169, 255, 0.015);
  pointer-events: none;
}
.contact-panel h2 { position: relative; z-index: 1; margin: 0; max-width: 720px; font-size: clamp(30px, 4vw, 46px); line-height: 1.25; letter-spacing: -.03em; font-weight: 700; text-wrap: pretty; }
.contact-panel h2 span { color: var(--accent); white-space: nowrap; }
.contact-panel p { position: relative; z-index: 1; margin: 18px 0 0; color: var(--muted); max-width: 560px; font-size: 14px; }
.contact-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.contact-meta { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 28px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 11px; color: var(--dim); }
.contact-meta b { color: var(--text-2); font-weight: 400; }

.footer { padding: 56px 0 42px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding-top: 26px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 10.5px; color: var(--dim); letter-spacing: .04em; }
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--accent); }

/* ============ 动效 ============ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .06s; } .reveal.d2 { transition-delay: .12s; } .reveal.d3 { transition-delay: .18s; } .reveal.d4 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  #net, .status-dot, .term-cursor { animation: none; }
}

/* ============ 响应式 ============ */
@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .terminal { max-width: 560px; transform: none; }
  .research-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .demo-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stack-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .project { grid-template-columns: 1fr; }
  .project.reverse .project-copy { order: 1; }
  .project.reverse .project-media { order: 2; border-right: 0; border-left: 0; border-top: 1px solid var(--line); }
  .project-media, .project.reverse .project-media { padding: 26px; border-left: 0; }
  .project.reverse .shot-note { left: 38px; }
  .shot-note { right: 38px; }
}
@media (max-width: 760px) {
  .container, .narrow, .hero-inner, .nav-inner { width: calc(100% - 36px); }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: 68px; left: 0; right: 0;
    padding: 14px 18px 18px;
    background: #070a10;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
    z-index: 3;
    border-bottom: 1px solid var(--line);
  }
  .nav.open::after {
    content: "";
    position: fixed; top: 68px; left: 0; right: 0; bottom: 0;
    background: rgba(3, 5, 9, 0.72);
    backdrop-filter: blur(2px);
    z-index: 1;
  }
  .nav.open .nav-links a:not(.nav-cta) { border-bottom: 1px solid var(--line); }
  .nav.open .nav-toggle span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  .nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.open .nav-toggle span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
  .nav.open .nav-links a { width: 100%; padding: 10px 0; font-size: 14px; }
  .nav.open .nav-links a::after { display: none; }
  .nav.open .nav-cta { margin-top: 8px; }
  .hero { padding: 104px 0 64px; min-height: 0; }
  .hero h1 { font-size: 52px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 16px 16px 0 0; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); margin-top: 16px; }
  .stat:nth-child(4) { border-top: 1px solid var(--line); margin-top: 16px; }
  .term-body { font-size: 11.5px; padding: 18px; }
  .term-file { display: none; }
  .section { padding-top: 86px; }
  .section-head { grid-template-columns: 1fr; gap: 18px; margin-bottom: 34px; padding-bottom: 26px; }
  .section-index b { display: inline; margin-left: 8px; font-size: 20px; }
  .section-title-wrap { flex-direction: column; align-items: flex-start; gap: 12px; }
  .section-sub { font-size: 13px; }
  .research-grid { grid-template-columns: 1fr; }
  .demo-grid { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .project-copy { padding: 26px 22px; }
  .project-media, .project.reverse .project-media { padding: 18px; }
  .project-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
  .tl-item { grid-template-columns: 1fr; gap: 4px; padding-bottom: 30px; }
  .tl-time { padding-top: 0; }
  .contact-panel { padding: 36px 24px; border-radius: 18px; }
  .contact-meta { gap: 14px; }
  .footer { padding-top: 36px; }
}
@media (max-width: 420px) {
  .hero h1 { font-size: 44px; }
  .hero-lead { font-size: 14.5px; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .stack-grid { grid-template-columns: 1fr; }
  .term-foot { flex-direction: column; gap: 4px; }
  .btn { padding: 10px 14px; }
}

/* ============ 顶部图标与主题按钮 ============ */
.nav-right { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-2);
  transition: border-color .2s, color .2s, background .2s, transform .18s;
}
.icon-btn:hover { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.icon-btn svg { width: 16px; height: 16px; display: block; }
.icon-btn .icon-sun { width: 17px; height: 17px; }
.theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ============ 亮色主题 ============ */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fb;
  --bg-soft: #eef3f9;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --line: rgba(15, 23, 42, 0.1);
  --line-strong: rgba(15, 23, 42, 0.2);
  --text: #101828;
  --text-2: #344054;
  --muted: #5b6b80;
  --dim: #7b889b;
  --accent: #1b6fd0;
  --accent-soft: rgba(27, 111, 208, 0.08);
  --accent-line: rgba(27, 111, 208, 0.3);
  --mint: #0b8f73;
  --mint-soft: rgba(11, 143, 115, 0.09);
  --warm: #9c6500;
  --danger: #c0392b;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] body::before {
  background:
    radial-gradient(980px 600px at 80% -10%, rgba(27, 111, 208, 0.12), transparent 62%),
    radial-gradient(760px 460px at 4% 16%, rgba(11, 143, 115, 0.05), transparent 68%),
    linear-gradient(180deg, #f8fafd 0%, #f4f7fb 55%, #edf2f8 100%);
}
html[data-theme="light"] body::after {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
}
html[data-theme="light"] ::selection { background: rgba(27, 111, 208, 0.18); color: #0f172a; }
html[data-theme="light"] .nav.scrolled { background: rgba(247, 250, 253, 0.84); }
html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links a.active { color: var(--text); }
html[data-theme="light"] .nav-cta:hover { color: var(--text) !important; }
html[data-theme="light"] .nav-toggle { background: rgba(255, 255, 255, 0.6); }
html[data-theme="light"] .icon-btn { background: rgba(255, 255, 255, 0.72); }
html[data-theme="light"] #net { opacity: 0.38; }

html[data-theme="light"] .hero-badge { background: rgba(255, 255, 255, 0.7); }
html[data-theme="light"] .hero h1 .grad {
  background: linear-gradient(96deg, #0b1220 6%, #1d4f86 48%, #1b6fd0 94%);
  -webkit-background-clip: text; background-clip: text;
}
html[data-theme="light"] .hero h1 .outline { -webkit-text-stroke-color: rgba(15, 23, 42, 0.28); }
html[data-theme="light"] .status-dot { box-shadow: 0 0 0 4px rgba(11, 143, 115, 0.12); }

html[data-theme="light"] .terminal {
  background: linear-gradient(180deg, #ffffff, #f2f7fb);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}
html[data-theme="light"] .terminal::before { background: linear-gradient(130deg, rgba(27, 111, 208, 0.055), transparent 42%); }
html[data-theme="light"] .term-dot { background: #c9d4e2; }
html[data-theme="light"] .term-dot:nth-child(1) { background: rgba(214, 78, 78, 0.55); }
html[data-theme="light"] .term-dot:nth-child(2) { background: rgba(190, 138, 0, 0.55); }
html[data-theme="light"] .term-dot:nth-child(3) { background: rgba(11, 143, 115, 0.55); }

html[data-theme="light"] .research-card { background: linear-gradient(180deg, #ffffff, #f8fbfd); }
html[data-theme="light"] .research-card:hover { background: linear-gradient(180deg, rgba(27, 111, 208, 0.055), #ffffff); }

html[data-theme="light"] .btn-primary { color: #ffffff; box-shadow: 0 10px 26px rgba(27, 111, 208, 0.18); }
html[data-theme="light"] .btn-primary:hover { background: #155bad; }
html[data-theme="light"] .btn-ghost { background: rgba(255, 255, 255, 0.66); }
html[data-theme="light"] .btn-ghost:hover { color: var(--text); }
html[data-theme="light"] .tag { background: rgba(15, 23, 42, 0.025); }

html[data-theme="light"] .project { background: linear-gradient(180deg, #ffffff, #f7fafc); }
html[data-theme="light"] .project-media {
  background:
    radial-gradient(520px 300px at 65% 40%, rgba(27, 111, 208, 0.09), transparent 70%),
    linear-gradient(160deg, rgba(27, 111, 208, 0.025), transparent 52%);
}
html[data-theme="light"] .shot {
  background: #eef3f9;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
}
html[data-theme="light"] .shot-bar { background: rgba(15, 23, 42, 0.035); }
html[data-theme="light"] .shot-bar i { background: #c9d4e2; }

html[data-theme="light"] .demo-card:hover { box-shadow: 0 24px 55px rgba(15, 23, 42, 0.12); }
html[data-theme="light"] .demo-visual { background: #eef4fa; }
html[data-theme="light"] .demo-visual .glow { background: radial-gradient(380px 180px at 50% 20%, rgba(27, 111, 208, 0.12), transparent 70%); }
html[data-theme="light"] .mini-bubble { background: rgba(15, 23, 42, 0.13); }
html[data-theme="light"] .mini-bubble.me { background: rgba(27, 111, 208, 0.3); }
html[data-theme="light"] .mini-bubble.ai { background: rgba(15, 23, 42, 0.11); }
html[data-theme="light"] .mini-bubble.ai2 { background: rgba(15, 23, 42, 0.08); }
html[data-theme="light"] .mini-pipe i { background: rgba(27, 111, 208, 0.3); }
html[data-theme="light"] .mini-pipe i:nth-child(2) { background: rgba(27, 111, 208, 0.48); }
html[data-theme="light"] .mini-pipe i:nth-child(3) { background: rgba(11, 143, 115, 0.45); }
html[data-theme="light"] .trace-node { background: #ffffff; }
html[data-theme="light"] .trace-line { background: rgba(15, 23, 42, 0.17); }
html[data-theme="light"] .trace-line.hl { background: rgba(27, 111, 208, 0.34); }
html[data-theme="light"] .mini-cal i { background: rgba(15, 23, 42, 0.08); }
html[data-theme="light"] .mini-cal i.on { background: rgba(11, 143, 115, 0.22); }
html[data-theme="light"] .mini-cal i.hot { background: rgba(27, 111, 208, 0.38); }
html[data-theme="light"] .mini-cal i.hot2 { background: rgba(156, 101, 0, 0.28); }
html[data-theme="light"] .mini-jd-score { background: conic-gradient(from -90deg, var(--accent) 0 96%, rgba(15, 23, 42, 0.12) 96%); }
html[data-theme="light"] .mini-jd-score::before { background: #ffffff; }

html[data-theme="light"] .stack-group { background: rgba(255, 255, 255, 0.72); }

html[data-theme="light"] .contact-panel {
  background:
    radial-gradient(600px 320px at 12% 0%, rgba(27, 111, 208, 0.13), transparent 65%),
    radial-gradient(500px 280px at 95% 100%, rgba(11, 143, 115, 0.07), transparent 68%),
    linear-gradient(180deg, #ffffff, #eff5fb);
}
html[data-theme="light"] .contact-panel::after {
  border-color: rgba(27, 111, 208, 0.18);
  box-shadow: 0 0 0 40px rgba(27, 111, 208, 0.03), 0 0 0 80px rgba(27, 111, 208, 0.018);
}
html[data-theme="light"] .footer-inner a:hover { color: var(--accent); }

@media (max-width: 760px) {
  .nav-right { gap: 8px; }
  html[data-theme="light"] .nav.open .nav-links { background: #f8fafd; box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16); }
  html[data-theme="light"] .nav.open::after { background: rgba(15, 23, 42, 0.3); }
}
@media (max-width: 420px) {
  .icon-btn { width: 33px; height: 33px; }
  .nav-right { gap: 6px; }
}
/* 导航头像 */
.brand-avatar {
  width: 36px; height: 36px;
  flex: none;
  border-radius: 10px;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--accent-line);
  box-shadow: 0 0 0 3px rgba(90, 169, 255, 0.06);
  background: #0b1220;
}
html[data-theme="light"] .brand-avatar { box-shadow: 0 0 0 3px rgba(27, 111, 208, 0.08); }
@media (min-width: 761px) and (max-width: 900px) {
  .brand-text span { display: none; }
  .nav-right { gap: 16px; }
  .nav-links { gap: 20px; }
  .nav-tools { gap: 6px; }
  .icon-btn { width: 34px; height: 34px; }
}
@media (max-width: 360px) {
  .brand-text span { display: none; }
}