/* ============================================================
   杨颖健 · 个人项目展示 — 深色科技风（与面试 PPT 同一视觉品牌）
   调色板：深藏青 0D1B2A / 青 4CC3E8 / 琥珀 FFB703
   ============================================================ */
:root {
  --bg: #0D1B2A;
  --card: #16293C;
  --card-hi: #1A3350;
  --line: #2A4664;
  --cyan: #4CC3E8;
  --cyan-soft: #7FD4F0;
  --struct: #1E5A7A;
  --amber: #FFB703;
  --text: #EAF2F8;
  --muted: #8FA8BC;
  --dim: #9FB8CC;
  --nav-h: 64px;
  --radius: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(255, 183, 3, 0.28); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--struct); }

a { color: var(--cyan-soft); text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- 顶部进度条 ---------- */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  z-index: 100; transition: width 0.1s linear;
}

/* ---------- 导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  background: rgba(13, 27, 42, 0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(42, 70, 100, 0.55);
  z-index: 90;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15.5px; color: var(--text);
}
.brand-mark {
  width: 14px; height: 14px; border-radius: 4px; flex: none;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--amber) 100%);
}
.brand-sub { color: var(--muted); font-weight: 400; font-size: 14px; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: var(--dim); font-size: 14px; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--cyan); }
.nav-cta {
  font-size: 13.5px; font-weight: 600; color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 14px; transition: border-color 0.2s, color 0.2s;
}
.nav-cta:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- 右侧圆点导航 ---------- */
.dots {
  position: fixed; right: 22px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 16px; z-index: 80;
}
.dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: background 0.2s, transform 0.2s; }
.dot:hover, .dot.active { background: var(--amber); transform: scale(1.25); }
.dot span {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  white-space: nowrap; font-size: 12px; color: var(--dim);
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: 2px 10px; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.dot:hover span { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 32px) clamp(20px, 6vw, 96px) 64px;
  position: relative;
  background:
    radial-gradient(620px 420px at 88% 6%, rgba(30, 90, 122, 0.5), transparent 70%),
    radial-gradient(520px 380px at 2% 96%, rgba(30, 90, 122, 0.42), transparent 70%),
    var(--bg);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(76, 195, 232, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 195, 232, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(720px 520px at 70% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(720px 520px at 70% 30%, #000 30%, transparent 75%);
}
.hero-inner { max-width: 980px; }
.kicker {
  color: var(--cyan); font-size: 13.5px; font-weight: 700;
  letter-spacing: 0.32em; margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(42px, 7.2vw, 76px);
  line-height: 1.16; font-weight: 800; letter-spacing: 0.01em;
}
.hero h1 em {
  font-style: normal; color: var(--amber);
  text-shadow: 0 0 44px rgba(255, 183, 3, 0.25);
}
.lead {
  margin-top: 26px; font-size: clamp(15.5px, 1.6vw, 18px);
  color: var(--dim); max-width: 46em;
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.chip {
  font-size: 13.5px; font-weight: 600; color: var(--cyan-soft);
  border: 1px solid rgba(76, 195, 232, 0.35); border-radius: 999px;
  padding: 6px 16px; background: rgba(30, 90, 122, 0.22);
}
.hero-stats { display: flex; flex-wrap: wrap; gap: clamp(24px, 4vw, 52px); margin-top: 40px; }
.stat { display: flex; flex-direction: column; }
.stat b { font-size: clamp(24px, 3vw, 34px); color: var(--amber); font-weight: 800; line-height: 1.2; }
.stat span { font-size: 13px; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 42px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 10px; padding: 12px 26px;
  font-size: 15px; font-weight: 700; transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}
.btn-primary {
  background: var(--amber); color: #0D1B2A;
  box-shadow: 0 6px 26px rgba(255, 183, 3, 0.22);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 34px rgba(255, 183, 3, 0.3); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }

/* ---------- 项目区块 ---------- */
.project {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 56px) clamp(20px, 6vw, 96px) 72px;
  border-top: 1px solid rgba(42, 70, 100, 0.4);
  scroll-margin-top: var(--nav-h);
}
.project.alt { background: linear-gradient(180deg, rgba(26, 51, 80, 0.24), rgba(13, 27, 42, 0) 55%); }
.proj-grid {
  display: grid; grid-template-columns: 1.04fr 0.96fr;
  gap: clamp(32px, 5vw, 72px); align-items: center;
  width: 100%; max-width: 1240px; margin: 0 auto;
}
.project.alt .proj-text { order: 2; }
.project.alt .proj-panel { order: 1; }

.proj-kicker {
  display: flex; align-items: center; gap: 12px;
  color: var(--cyan); font-size: 13.5px; font-weight: 700;
  letter-spacing: 0.18em; margin-bottom: 18px;
}
.proj-kicker .num {
  font-size: 15px; color: var(--amber); font-weight: 800;
  border: 1px solid rgba(255, 183, 3, 0.4); border-radius: 8px;
  padding: 1px 10px; letter-spacing: 0;
}
.project h2 {
  font-size: clamp(26px, 3.1vw, 36px); line-height: 1.32;
  font-weight: 800; margin-bottom: 18px;
}
.proj-lead { color: var(--dim); font-size: 15.5px; margin-bottom: 26px; }

.metrics { display: flex; gap: clamp(20px, 3vw, 40px); margin-bottom: 26px; }
.metric { display: flex; flex-direction: column; }
.metric b { font-size: clamp(24px, 2.6vw, 32px); color: var(--amber); font-weight: 800; line-height: 1.25; }
.metric .unit { font-size: 0.55em; font-weight: 700; margin-left: 2px; }
.metric span { font-size: 12.5px; color: var(--muted); }

.points { list-style: none; margin-bottom: 26px; }
.points li {
  position: relative; padding-left: 22px;
  color: var(--dim); font-size: 14.5px; margin-bottom: 10px;
}
.points li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 8px; height: 8px; border-radius: 2.5px;
  background: var(--cyan); opacity: 0.85;
}
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.stack span {
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 12.5px; color: var(--dim);
  background: var(--card); border: 1px solid var(--line);
  border-radius: 6px; padding: 4px 10px;
}

/* ---------- 右侧展示面板 ---------- */
.proj-panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  display: flex; flex-direction: column; gap: 20px;
}
.shot { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.shot img { width: 100%; height: auto; }
.shot figcaption {
  background: var(--card-hi); color: var(--muted);
  font-size: 12.5px; padding: 10px 14px; line-height: 1.55;
  border-top: 1px solid var(--line);
}
.bars-title { font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.bars { display: flex; flex-direction: column; }
.bar-row { display: grid; grid-template-columns: 118px 1fr 52px; align-items: center; gap: 12px; margin-bottom: 9px; }
.bar-label { font-size: 12px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.bar-track { height: 12px; background: rgba(13, 27, 42, 0.75); border-radius: 6px; overflow: hidden; border: 1px solid rgba(42, 70, 100, 0.6); }
.bar-fill {
  height: 100%; width: var(--w); border-radius: 6px;
  background: linear-gradient(90deg, var(--struct), var(--cyan));
  transform-origin: left; animation: grow 1s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-play-state: paused;
}
.bar-fill.bar-dim { background: linear-gradient(90deg, #3a4a5c, #56697e); }
.bar-val { font-size: 12.5px; color: var(--text); font-family: ui-monospace, Consolas, monospace; text-align: right; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- 双条对比（微调前后） ---------- */
.duals { display: flex; flex-direction: column; gap: 18px; }
.dual-name { font-size: 13px; color: var(--text); font-weight: 600; margin-bottom: 8px; }
.dual-row { display: grid; grid-template-columns: 1fr 46px; align-items: center; gap: 10px; margin-bottom: 6px; }
.dual-bar { height: 13px; border-radius: 7px; }
.dual-bar.before { width: var(--w); background: #46617c; }
.dual-bar.after { width: var(--w); background: linear-gradient(90deg, var(--struct), var(--cyan)); }
.dual-row span { font-size: 12.5px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.dual-row span.hot { color: var(--amber); font-weight: 700; }
.bars-note { font-size: 12px; color: var(--muted); line-height: 1.6; border-left: 2px solid var(--struct); padding-left: 12px; }

/* ---------- 部署指标条 ---------- */
.deploy-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  border-top: 1px solid var(--line); padding-top: 18px;
}
.deploy { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.deploy b { font-size: 19px; color: var(--cyan-soft); font-weight: 800; }
.deploy span { font-size: 11.5px; color: var(--muted); }

/* ---------- 部署流程链 ---------- */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.flow span {
  font-size: 12.5px; color: var(--dim);
  background: var(--card-hi); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 12px; white-space: nowrap;
}
.flow span.flow-hot { color: #0D1B2A; background: var(--cyan); border-color: var(--cyan); font-weight: 700; }
.flow i { color: var(--muted); font-style: normal; font-size: 13px; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid rgba(42, 70, 100, 0.4);
  text-align: center;
  padding: 96px clamp(20px, 6vw, 96px) 56px;
  background: radial-gradient(560px 320px at 50% 0%, rgba(30, 90, 122, 0.32), transparent 70%);
}
.foot-big { font-size: clamp(24px, 3.4vw, 36px); font-weight: 800; }
.foot-sub { color: var(--muted); margin-top: 12px; font-size: 15px; }
.footer .cta { justify-content: center; }
.foot-small { color: #56718A; font-size: 12.5px; margin-top: 52px; }

/* ---------- 入场动画 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .bar-fill { animation: none; }
}

/* ---------- 核心能力卡片组 ---------- */
.proj-solo {
  width: 100%; max-width: 1240px; margin: 0 auto;
}
.proj-solo h2 {
  font-size: clamp(26px, 3.1vw, 36px); line-height: 1.32;
  font-weight: 800; margin-bottom: 30px;
}
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cap-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, border-color 0.2s;
}
.cap-card:hover { transform: translateY(-4px); border-color: rgba(76, 195, 232, 0.55); }
.cap-tag {
  align-self: flex-start; font-size: 11px; letter-spacing: 0.14em;
  color: var(--cyan); border: 1px solid rgba(76, 195, 232, 0.35);
  border-radius: 999px; padding: 3px 12px; font-weight: 600;
}
.cap-name { font-size: 17px; font-weight: 800; line-height: 1.4; color: var(--text); }
.cap-desc { font-size: 13px; color: var(--muted); line-height: 1.7; }

/* ---------- 开源分区带 ---------- */
.zone { padding: 26px clamp(20px, 6vw, 96px) 34px; text-align: center; }
.zone-rule { display: flex; align-items: center; gap: 18px; max-width: 760px; margin: 0 auto; }
.zone-rule::before, .zone-rule::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line));
}
.zone-rule::after { background: linear-gradient(90deg, var(--line), transparent); }
.zone-kicker { color: var(--cyan); font-size: 12.5px; font-weight: 700; letter-spacing: 0.3em; white-space: nowrap; }
.zone-title { font-size: clamp(21px, 2.5vw, 27px); font-weight: 800; margin-top: 14px; }
.zone-sub { color: var(--muted); font-size: 13.5px; margin-top: 8px; }

/* ---------- 响应式 ---------- */
.br-desktop { display: inline; }

/* ---------- 静态截图模式（?static，仅构建期渲染验收用） ---------- */
body.static .hero, body.static .project { min-height: auto; }
body.static .hero { padding-top: calc(var(--nav-h) + 72px); }
body.static .project { padding-top: 88px; padding-bottom: 64px; }
body.static .reveal { opacity: 1 !important; transform: none !important; }
body.static .bar-fill { animation: none; transform: scaleX(1); }
@media (max-width: 960px) {
  .proj-grid { grid-template-columns: 1fr; gap: 36px; }
  .project { padding-top: calc(var(--nav-h) + 36px); padding-bottom: 48px; }
  .project.alt .proj-text { order: 1; }
  .project.alt .proj-panel { order: 2; }
  .dots { display: none; }
  .nav-links { display: none; }
  .br-desktop { display: none; }
  .deploy-strip { grid-template-columns: repeat(2, 1fr); row-gap: 16px; }
  .bar-row { grid-template-columns: 96px 1fr 46px; }
  .metrics { flex-wrap: wrap; gap: 18px; }
  .cap-grid { grid-template-columns: 1fr; }
  .proj-solo h2 { margin-bottom: 22px; }
}
