/* ============================================================
   黄秒 · AI 应用开发工程师 — 赛博 AI 风简历
   深空黑 × 霓虹青紫 × 玻璃拟态 × 大量动画
   ============================================================ */

:root {
  --bg: #050a14;
  --bg2: #0a1222;
  --cyan: #00f0ff;
  --purple: #a855f7;
  --pink: #f472b6;
  --green: #4ade80;
  --text: #dbe4f0;
  --muted: #7d8aa0;
  --glass: rgba(13, 22, 40, 0.55);
  --glass-border: rgba(0, 240, 255, 0.16);
  --grad: linear-gradient(90deg, var(--cyan), var(--purple));
  --font-en: 'Orbitron', 'Rajdhani', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Rajdhani', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

::selection { background: rgba(0, 240, 255, 0.3); }

/* ---------- 霓虹滚动条 ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #060b16; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cyan), var(--purple));
  border-radius: 5px;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

/* ============================================================
   0. 开机动画
   ============================================================ */
#boot-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: #03060d;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: opacity 0.6s ease, visibility 0.6s;
}
#boot-overlay.done { opacity: 0; visibility: hidden; }
.boot-box { width: min(560px, 88vw); }
.boot-title {
  font-family: var(--font-en);
  font-size: clamp(18px, 3vw, 26px);
  letter-spacing: 4px;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
  animation: bootFlicker 2s infinite;
}
@keyframes bootFlicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.4; }
  94% { opacity: 1; }
  97% { opacity: 0.6; }
}
.boot-log {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 13px;
  color: var(--green);
  min-height: 150px;
  white-space: pre-line;
  text-shadow: 0 0 6px rgba(74, 222, 128, 0.5);
}
.boot-bar {
  margin-top: 18px; height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px; overflow: hidden;
}
#boot-progress {
  height: 100%; width: 0%;
  background: var(--grad);
  box-shadow: 0 0 12px var(--cyan);
  transition: width 0.25s ease;
}
.boot-skip {
  margin-top: 14px; text-align: center;
  color: var(--muted); font-size: 12px; letter-spacing: 2px;
  animation: fadeBlink 1.6s infinite;
}
@keyframes fadeBlink { 0%,100% { opacity: 0.35; } 50% { opacity: 0.9; } }

/* ============================================================
   1. 背景层
   ============================================================ */
#neural-canvas {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
}
.grid-overlay {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 75%);
}
body::after { /* 全局柔光 */
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 15% 10%, rgba(168, 85, 247, 0.12), transparent 60%),
    radial-gradient(ellipse 55% 45% at 85% 20%, rgba(0, 240, 255, 0.10), transparent 60%),
    radial-gradient(ellipse 70% 40% at 50% 105%, rgba(244, 114, 182, 0.08), transparent 60%);
}

nav, header, main, footer { position: relative; z-index: 2; }

/* ============================================================
   2. 导航
   ============================================================ */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px clamp(20px, 6vw, 70px);
  background: rgba(5, 10, 20, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 240, 255, 0.1);
  transform: translateY(-100%);
  animation: navIn 0.8s 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes navIn { to { transform: translateY(0); } }
.nav-logo {
  font-family: var(--font-en); font-weight: 900; font-size: 20px;
  letter-spacing: 3px; color: var(--cyan);
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.7);
}
.blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 14.5px;
  letter-spacing: 1px; position: relative; transition: color 0.3s;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 2px; background: var(--grad);
  box-shadow: 0 0 8px var(--cyan);
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-links a:hover { color: var(--cyan); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  padding: 6px 16px !important;
  border: 1px solid rgba(0, 240, 255, 0.45);
  border-radius: 6px; color: var(--cyan) !important;
  transition: all 0.3s !important;
}
.nav-cta:hover {
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.35), inset 0 0 10px rgba(0, 240, 255, 0.1);
}
.nav-cta::after { display: none; }

/* ============================================================
   3. Hero
   ============================================================ */
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 110px 20px 60px;
}
.hero-badge {
  font-size: 13px; letter-spacing: 4px; color: var(--cyan);
  border: 1px solid rgba(0, 240, 255, 0.35);
  padding: 6px 20px; border-radius: 30px;
  background: rgba(0, 240, 255, 0.06);
  animation: badgeGlow 3s ease-in-out infinite;
}
@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(0, 240, 255, 0.15); }
  50% { box-shadow: 0 0 26px rgba(0, 240, 255, 0.45); }
}
.hero-name {
  font-size: clamp(52px, 10vw, 108px);
  font-weight: 900;
  margin: 26px 0 8px;
  letter-spacing: 14px;
}
.neon-text {
  background: linear-gradient(92deg, #fff 5%, var(--cyan) 35%, var(--purple) 70%, var(--pink) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 5s linear infinite;
  filter: drop-shadow(0 0 22px rgba(0, 240, 255, 0.35));
}
@keyframes gradientShift { to { background-position: 200% center; } }
.hero-role {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: clamp(17px, 2.6vw, 25px);
  color: var(--text);
  min-height: 1.6em;
  display: flex; align-items: center; gap: 10px;
}
.prompt-symbol { color: var(--green); text-shadow: 0 0 10px rgba(74, 222, 128, 0.8); }
.cursor-bar {
  display: inline-block; width: 11px; height: 1.15em;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: blink 0.85s step-end infinite;
}
.hero-desc { color: var(--muted); margin: 22px auto 0; max-width: 640px; font-size: 15.5px; }
.hero-desc b { color: var(--cyan); font-weight: 600; }

/* --- 数据统计 --- */
.hero-stats {
  display: flex; gap: clamp(18px, 5vw, 60px);
  margin-top: 44px; flex-wrap: wrap; justify-content: center;
}
.stat { text-align: center; }
.stat-num {
  font-family: var(--font-en);
  font-size: clamp(30px, 4.5vw, 46px);
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.4));
}
.stat-label { font-size: 12.5px; color: var(--muted); letter-spacing: 2px; margin-top: 2px; }

/* --- 按钮 --- */
.hero-cta { display: flex; gap: 18px; margin-top: 44px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-block; padding: 13px 34px;
  font-size: 15px; letter-spacing: 2px; text-decoration: none;
  border-radius: 8px; cursor: pointer; position: relative;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: inherit;
}
.btn-primary {
  color: #031018; font-weight: 700;
  background: var(--grad); background-size: 180% auto;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.35);
}
.btn-primary:hover {
  background-position: right center;
  transform: translateY(-3px);
  box-shadow: 0 8px 34px rgba(0, 240, 255, 0.55), 0 0 20px rgba(168, 85, 247, 0.4);
}
.btn-ghost {
  color: var(--cyan);
  border: 1px solid rgba(0, 240, 255, 0.5);
  background: rgba(0, 240, 255, 0.04);
}
.btn-ghost:hover {
  background: rgba(0, 240, 255, 0.12);
  transform: translateY(-3px);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.35);
}

/* ============================================================
   4. 通用区块与显现动画
   ============================================================ */
main { max-width: 1140px; margin: 0 auto; padding: 0 22px; }
section { padding: 76px 0; }
.section-title {
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 800; letter-spacing: 2px;
  margin-bottom: 40px;
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}
.sec-num {
  font-family: var(--font-en);
  color: transparent;
  -webkit-text-stroke: 1px var(--cyan);
  font-size: 0.85em;
}
.sec-en { font-size: 13px; color: var(--muted); letter-spacing: 3px; font-weight: 400; }
.section-title::after {
  content: ''; flex: 1; height: 1px; min-width: 40px;
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.5), transparent);
}

/* --- 滚动显现 --- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   5. 优势卡片
   ============================================================ */
.adv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}
.glass-card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 28px 24px;
  position: relative; overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s, border-color 0.4s;
}
.glass-card::before { /* 顶部流光 */
  content: ''; position: absolute; top: 0; left: -60%;
  width: 55%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: scanline 3.6s linear infinite;
}
@keyframes scanline { to { left: 120%; } }
.glass-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 240, 255, 0.5);
  box-shadow: 0 14px 44px rgba(0, 240, 255, 0.16), 0 0 0 1px rgba(0, 240, 255, 0.2);
}
.card-icon { font-size: 30px; margin-bottom: 12px; filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.5)); }
.glass-card h3 { font-size: 18px; color: var(--cyan); margin-bottom: 10px; letter-spacing: 1px; }
.glass-card p { font-size: 14px; color: var(--muted); line-height: 1.75; }

/* ============================================================
   6. 项目卡片（边框流光 + 3D 倾斜 + 终端展开）
   ============================================================ */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 24px; }
.proj-card {
  position: relative;
  border-radius: 16px;
  padding: 26px 24px;
  background: linear-gradient(160deg, rgba(14, 24, 44, 0.9), rgba(8, 14, 28, 0.9));
  border: 1px solid rgba(120, 140, 180, 0.14);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: box-shadow 0.4s, border-color 0.4s;
  will-change: transform;
}
/* 边框流光层：hover 时 conic-gradient 旋转 */
.proj-card::before {
  content: ''; position: absolute; inset: -2px; z-index: -1;
  border-radius: 17px;
  background: conic-gradient(from var(--angle, 0deg),
    transparent 0%, var(--cyan) 12%, var(--purple) 24%, transparent 38%);
  opacity: 0; transition: opacity 0.45s;
  animation: borderSpin 3.2s linear infinite;
}
@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes borderSpin { to { --angle: 360deg; } }
.proj-card:hover::before { opacity: 1; }
.proj-card:hover {
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 0 34px rgba(0, 240, 255, 0.14);
  border-color: transparent;
}
.proj-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.proj-idx {
  font-family: var(--font-en); font-size: 12px; font-weight: 700;
  color: #031018; background: var(--grad);
  padding: 2px 8px; border-radius: 4px;
}
.proj-head h3 { font-size: 19.5px; letter-spacing: 0.5px; }
.proj-type { font-size: 12.5px; color: var(--purple); letter-spacing: 1px; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ptag {
  font-size: 11.5px; padding: 3px 10px; border-radius: 20px;
  color: var(--cyan); border: 1px solid rgba(0, 240, 255, 0.3);
  background: rgba(0, 240, 255, 0.05);
  transition: all 0.3s;
}
.proj-card:hover .ptag {
  animation: tagPulse 1.8s ease-in-out infinite;
}
@keyframes tagPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(0, 240, 255, 0); }
  50% { box-shadow: 0 0 10px rgba(0, 240, 255, 0.45); }
}
.proj-brief { font-size: 13.5px; color: var(--muted); line-height: 1.75; }

/* --- 终端展开 --- */
.term-toggle {
  margin-top: 16px;
  background: none; border: none; cursor: pointer;
  font-family: 'Consolas', monospace; font-size: 12.5px;
  color: var(--green); letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
  transition: all 0.3s;
}
.term-toggle:hover { letter-spacing: 2.5px; }
.proj-terminal {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s, margin 0.5s;
}
.proj-card.open .proj-terminal { max-height: 400px; opacity: 1; margin-top: 14px; }
.proj-card.open .term-toggle::before { content: ''; }
.term-bar {
  display: flex; align-items: center; gap: 6px;
  background: #101623; border: 1px solid rgba(120, 140, 180, 0.16);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 8px 12px;
}
.tdot { width: 10px; height: 10px; border-radius: 50%; }
.tdot.r { background: #ff5f57; } .tdot.y { background: #febc2e; } .tdot.g { background: #28c840; }
.term-title { margin-left: 8px; font-size: 11px; color: var(--muted); font-family: 'Consolas', monospace; }
.term-body {
  background: #060a12;
  border: 1px solid rgba(120, 140, 180, 0.16);
  border-radius: 0 0 10px 10px;
  padding: 14px 16px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12.5px; line-height: 1.9;
  color: #9fb4cc;
}
.term-body .tp { color: var(--cyan); margin-right: 6px; }
.term-ok { color: var(--green); text-shadow: 0 0 8px rgba(74, 222, 128, 0.5); }

/* ============================================================
   7. 技能矩阵
   ============================================================ */
.skills-wrap { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: start; }
.card-icon { font-size: 40px; margin-bottom: 14px; filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.6)); }
.skill-item { margin-bottom: 22px; }
.skill-name { font-size: 15px; margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.skill-sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.bar {
  height: 8px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden; position: relative;
}
.bar-fill {
  height: 100%; width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
  position: relative;
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.bar-fill::after { /* 流光扫过 */
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-100%);
  animation: barShine 2.4s ease-in-out infinite;
}
@keyframes barShine { 60%, 100% { transform: translateX(100%); } }

.tag-cloud {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 14px; padding: 24px;
  backdrop-filter: blur(12px);
}
.tag-cloud h3 { font-size: 15px; color: var(--cyan); letter-spacing: 2px; margin-bottom: 16px; }
.cloud { display: flex; flex-wrap: wrap; gap: 9px; }
.ctag {
  font-size: 12.5px; padding: 5px 13px; border-radius: 6px;
  color: var(--text);
  border: 1px solid rgba(120, 140, 180, 0.22);
  background: rgba(10, 18, 34, 0.6);
  transition: all 0.3s; cursor: default;
  animation: floatTag 4s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.18s);
}
@keyframes floatTag {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.ctag:hover {
  color: #031018; background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.6);
  animation-play-state: paused;
}

/* ============================================================
   8. 时间线
   ============================================================ */
.tl { position: relative; padding-left: 40px; }
.tl::before { /* 霓虹流动竖线 */
  content: ''; position: absolute; left: 11px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--purple), var(--pink), var(--cyan));
  background-size: 100% 300%;
  animation: tlFlow 6s linear infinite;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
}
@keyframes tlFlow { to { background-position: 0 300%; } }
.tl-item { position: relative; margin-bottom: 30px; }
.tl-dot {
  position: absolute; left: -36px; top: 26px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.15), 0 0 16px var(--cyan);
  animation: dotBreath 2.2s ease-in-out infinite;
}
@keyframes dotBreath {
  0%, 100% { box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.15), 0 0 10px var(--cyan); }
  50% { box-shadow: 0 0 0 7px rgba(0, 240, 255, 0.08), 0 0 24px var(--cyan); }
}
.tl-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px; padding: 22px 26px;
  backdrop-filter: blur(10px);
  transition: transform 0.4s, border-color 0.4s, box-shadow 0.4s;
}
.tl-card:hover {
  transform: translateX(8px);
  border-color: rgba(0, 240, 255, 0.45);
  box-shadow: 0 8px 30px rgba(0, 240, 255, 0.12);
}
.tl-period {
  font-family: var(--font-en); font-size: 12px; letter-spacing: 2px;
  color: var(--purple); margin-bottom: 6px;
}
.tl-card h3 { font-size: 17.5px; color: var(--text); margin-bottom: 8px; }
.tl-card p { font-size: 13.5px; color: var(--muted); }

/* ============================================================
   9. 联系 & 页脚
   ============================================================ */
.contact-box {
  max-width: 560px; margin: 0 auto; text-align: center;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px; padding: 40px 30px;
  backdrop-filter: blur(14px);
  position: relative; overflow: hidden;
}
.contact-box::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% -20%, rgba(0, 240, 255, 0.14), transparent 60%);
  pointer-events: none;
}
.contact-line {
  display: flex; justify-content: center; gap: 16px;
  margin-bottom: 14px; font-size: 15.5px;
}
.cl-k {
  font-family: var(--font-en); font-size: 11px; letter-spacing: 3px;
  color: var(--cyan); padding-top: 5px; min-width: 56px; text-align: right;
}
.cl-v { color: var(--text); }
.contact-dl { margin-top: 22px; }

footer {
  text-align: center; padding: 44px 20px 34px;
  border-top: 1px solid rgba(0, 240, 255, 0.08);
  margin-top: 30px;
}
.footer-line {
  font-family: 'Consolas', monospace; font-size: 13px; color: var(--green);
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
}
.foot-prompt { color: var(--cyan); margin-right: 8px; }
.footer-sub { margin-top: 10px; font-size: 12px; color: var(--muted); letter-spacing: 3px; }

/* ============================================================
   10. 响应式 & 无障碍
   ============================================================ */
@media (max-width: 820px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .hero-name { letter-spacing: 8px; }
  .tl { padding-left: 32px; }
  .livecode-wrap { grid-template-columns: 1fr; }
  .orbit-stage { height: 380px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   11. 视觉增强：滚动进度 / 光标辉光 / 故障艺术 / Hero 胶囊
   ============================================================ */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  z-index: 400; background: var(--grad);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.7);
}
#cursor-glow {
  position: fixed; top: 0; left: 0; width: 280px; height: 280px;
  z-index: 1; pointer-events: none; opacity: 0; transition: opacity 0.6s;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.10), rgba(168, 85, 247, 0.05) 45%, transparent 70%);
  will-change: transform;
}
@media (hover: none) { #cursor-glow { display: none; } }

.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0; letter-spacing: inherit;
  background: inherit; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; opacity: 0; pointer-events: none;
}
.glitch::before { animation: glitchA 5s infinite steps(1); }
.glitch::after { animation: glitchB 5s infinite steps(1); }
@keyframes glitchA {
  0%, 91%, 100% { opacity: 0; }
  92% { opacity: 0.85; transform: translate(-6px, 2px); clip-path: inset(12% 0 52% 0); }
  95% { opacity: 0.85; transform: translate(4px, -3px); clip-path: inset(58% 0 8% 0); }
  97% { opacity: 0; }
}
@keyframes glitchB {
  0%, 91%, 100% { opacity: 0; }
  93% { opacity: 0.85; transform: translate(5px, 3px); clip-path: inset(38% 0 32% 0); }
  96% { opacity: 0.85; transform: translate(-4px, -2px); clip-path: inset(5% 0 72% 0); }
  98% { opacity: 0; }
}

.hero-chips { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; justify-content: center; }
.chip {
  font-family: var(--font-en); font-size: 12px; letter-spacing: 2px;
  padding: 6px 18px; border-radius: 30px;
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: var(--cyan); background: rgba(0, 240, 255, 0.06);
  animation: chipFloat 3.4s ease-in-out infinite;
}
.chip.c2 { border-color: rgba(168, 85, 247, 0.5); color: #c084fc; background: rgba(168, 85, 247, 0.08); animation-delay: 0.5s; }
.chip.c3 { animation-delay: 1s; }
.chip.c4 { border-color: rgba(244, 114, 182, 0.5); color: var(--pink); background: rgba(244, 114, 182, 0.07); animation-delay: 1.5s; }
.chip.c5 { border-color: rgba(74, 222, 128, 0.5); color: var(--green); background: rgba(74, 222, 128, 0.06); animation-delay: 2s; }
@keyframes chipFloat {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 8px rgba(0, 240, 255, 0.12); }
  50% { transform: translateY(-7px); box-shadow: 0 8px 22px rgba(0, 240, 255, 0.28); }
}

/* ============================================================
   12. 项目大图演示画布（视觉优先）
   ============================================================ */
.proj-demo {
  display: block;
  width: calc(100% + 48px);
  margin: -26px -24px 18px;
  height: 220px;
  border-radius: 16px 16px 0 0;
  border-bottom: 1px solid rgba(0, 240, 255, 0.14);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0, 240, 255, 0.06), transparent 65%),
    rgba(4, 8, 16, 0.55);
}

/* ============================================================
   13. 技术星环
   ============================================================ */
.orbit-stage {
  position: relative;
  height: 540px;
  display: flex; align-items: center; justify-content: center;
}
.orbit-core {
  position: absolute;
  width: 124px; height: 124px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, rgba(0, 240, 255, 0.3), rgba(168, 85, 247, 0.16) 55%, rgba(5, 10, 20, 0.95));
  border: 1px solid rgba(0, 240, 255, 0.5);
  box-shadow: 0 0 44px rgba(0, 240, 255, 0.35), inset 0 0 30px rgba(0, 240, 255, 0.2);
  animation: corePulse 3s ease-in-out infinite;
  z-index: 3;
}
@keyframes corePulse {
  0%, 100% { box-shadow: 0 0 34px rgba(0, 240, 255, 0.3), inset 0 0 26px rgba(0, 240, 255, 0.18); }
  50% { box-shadow: 0 0 66px rgba(0, 240, 255, 0.6), inset 0 0 42px rgba(0, 240, 255, 0.32); }
}
.orbit-core-txt {
  font-family: var(--font-en); font-weight: 900; font-size: 21px;
  letter-spacing: 3px; text-align: center; line-height: 1.3;
  color: var(--cyan); text-shadow: 0 0 16px rgba(0, 240, 255, 0.8);
}
.orbit-ring {
  position: absolute; border-radius: 50%;
  border: 1px dashed rgba(0, 240, 255, 0.2);
}
.orbit-ring-1 { width: 280px; height: 280px; }
.orbit-ring-2 { width: 410px; height: 410px; border-color: rgba(168, 85, 247, 0.2); }
.orbit-ring-3 { width: 540px; height: 540px; border-color: rgba(0, 240, 255, 0.12); }
.orbiter {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  padding: 7px 16px; border-radius: 30px;
  font-size: 13px; letter-spacing: 1px; white-space: nowrap;
  color: var(--cyan);
  background: rgba(8, 14, 28, 0.88);
  border: 1px solid rgba(0, 240, 255, 0.45);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.25);
  backdrop-filter: blur(4px);
  animation: orb var(--dur) linear infinite;
}
.orbiter.o2, .orbiter.o5, .orbiter.o8 {
  color: #c084fc; border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.3);
}
.orbiter.o1 { --r: 140px; --a0: 0deg; --dur: 24s; }
.orbiter.o2 { --r: 140px; --a0: 120deg; --dur: 24s; }
.orbiter.o3 { --r: 140px; --a0: 240deg; --dur: 24s; }
.orbiter.o4 { --r: 205px; --a0: 45deg; --dur: 36s; animation-direction: reverse; }
.orbiter.o5 { --r: 205px; --a0: 165deg; --dur: 36s; animation-direction: reverse; }
.orbiter.o6 { --r: 205px; --a0: 285deg; --dur: 36s; animation-direction: reverse; }
.orbiter.o7 { --r: 270px; --a0: 90deg; --dur: 52s; }
.orbiter.o8 { --r: 270px; --a0: 270deg; --dur: 52s; }
@keyframes orb {
  from { transform: rotate(var(--a0)) translateX(var(--r)) rotate(calc(-1 * var(--a0))); }
  to { transform: rotate(calc(var(--a0) + 360deg)) translateX(var(--r)) rotate(calc(-1 * (var(--a0) + 360deg))); }
}

/* ============================================================
   14. AI Live Coding
   ============================================================ */
.livecode-wrap { display: grid; grid-template-columns: 1fr 1.15fr; gap: 22px; }
.code-pane {
  background: #060a12;
  border: 1px solid rgba(0, 240, 255, 0.18);
  border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column;
}
#livecode-pre {
  flex: 1; padding: 16px 18px; margin: 0;
  min-height: 280px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12.5px; line-height: 1.85;
  color: #9fe8c8; white-space: pre-wrap; word-break: break-all;
}
#livecode-caret {
  display: inline-block; width: 8px; height: 14px;
  background: var(--green); vertical-align: -2px;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
  animation: blink 0.8s step-end infinite;
}
.livecode-status {
  padding: 8px 18px 14px;
  font-family: 'Consolas', monospace; font-size: 12px;
  color: var(--muted);
}
.livecode-status.ok { color: var(--green); text-shadow: 0 0 8px rgba(74, 222, 128, 0.5); }
.preview-pane {
  position: relative; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(168, 85, 247, 0.28);
  background: radial-gradient(circle at 50% 50%, rgba(10, 18, 34, 0.9), rgba(5, 10, 20, 0.96));
  box-shadow: inset 0 0 60px rgba(0, 240, 255, 0.05);
}
.preview-label {
  position: absolute; top: 10px; left: 14px; z-index: 2;
  font-family: var(--font-en); font-size: 10px; letter-spacing: 3px;
  color: var(--purple);
}
#livecode-canvas { width: 100%; height: 100%; min-height: 320px; display: block; }

/* ============================================================
   15. 雷达图（全宽主视觉）
   ============================================================ */
.radar-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 14px; padding: 26px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
}
.radar-card h3 { font-size: 15px; color: var(--cyan); letter-spacing: 3px; margin-bottom: 6px; }
#radar-canvas { width: 100%; height: 360px; display: block; }

/* ============================================================
   16. 交互终端（浮动按钮 + 覆盖层）
   ============================================================ */
#term-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 200;
  width: 58px; height: 58px; border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.5);
  background: rgba(6, 12, 24, 0.85);
  color: var(--cyan);
  font-family: 'Consolas', monospace; font-size: 17px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.3);
  animation: fabGlow 2.6s ease-in-out infinite;
  transition: transform 0.3s;
}
#term-fab:hover { transform: scale(1.12); }
@keyframes fabGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(0, 240, 255, 0.25); }
  50% { box-shadow: 0 0 30px rgba(0, 240, 255, 0.6); }
}
#term-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(3, 6, 13, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.35s;
}
#term-overlay.hidden { opacity: 0; pointer-events: none; }
.term-window {
  width: min(680px, 92vw);
  background: #04070f;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 44px rgba(0, 240, 255, 0.14);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
#term-overlay.hidden .term-window { transform: translateY(26px) scale(0.97); }
.term-close {
  margin-left: auto; background: none; border: none;
  color: var(--muted); cursor: pointer; font-size: 14px;
}
.term-close:hover { color: #ff5f57; }
.term-out {
  height: 320px; overflow-y: auto; padding: 16px 18px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 13px; line-height: 1.8; color: #9fb4cc;
}
.term-out .t-cmd { color: var(--cyan); }
.term-out .t-ok { color: var(--green); }
.term-out .t-dim { color: var(--muted); }
.term-input-line {
  display: flex; gap: 10px; padding: 12px 18px;
  border-top: 1px solid rgba(120, 140, 180, 0.15);
  font-family: 'Consolas', 'Courier New', monospace; font-size: 13px;
}
.term-ps { color: var(--green); white-space: nowrap; }
#term-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: inherit;
  caret-color: var(--cyan);
}
#term-input::placeholder { color: rgba(125, 138, 160, 0.55); }

/* ============================================================
   17. 视觉增强响应式补丁
   ============================================================ */
@media (max-width: 820px) {
  .proj-demo { height: 170px; }
  .orbit-stage { height: 420px; transform: scale(0.72); }
  #livecode-canvas { min-height: 240px; }
  #radar-canvas { height: 300px; }
  .term-out { height: 260px; }
  #term-fab { right: 16px; bottom: 16px; }
}
