/* ============================================================
   CYBER PORTFOLIO — 赛博朋克霓虹个人网站 v2.0
   配色: bg #030409 / cyan #00f0ff / magenta #ff00e5 / purple #7b2ff7 / yellow #ffe600
   ============================================================ */

:root {
  --bg: #030409;
  --bg-2: #0d0221;
  --cyan: #00f0ff;
  --magenta: #ff00e5;
  --purple: #7b2ff7;
  --yellow: #ffe600;
  --text: #e6ecff;
  --text-dim: #8a93b8;
  --font-display: 'Orbitron', 'Noto Sans SC', sans-serif;
  --font-mono: 'Share Tech Mono', 'Consolas', monospace;
  --font-body: 'Noto Sans SC', 'PingFang SC', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  cursor: crosshair;
}
a, button, .tag { cursor: pointer; }

::selection { background: var(--magenta); color: #fff; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--cyan), var(--magenta)); border-radius: 4px; }

/* ============ 噪点颗粒 (CRT 质感) ============ */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 999; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='0.55'/></svg>");
  opacity: .05;
}

/* ============ BOOT 加载画面 ============ */
#boot {
  position: fixed; inset: 0; z-index: 1000;
  background: #010103;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s ease, visibility .6s;
}
#boot.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.boot-terminal {
  width: min(480px, 86vw);
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(0,240,255,.6);
}
.boot-line { margin-bottom: 10px; }
.boot-prompt { color: var(--magenta); text-shadow: 0 0 8px rgba(255,0,229,.7); }
.boot-bar {
  margin: 14px 0;
  height: 4px; border: 1px solid var(--cyan);
  box-shadow: 0 0 12px rgba(0,240,255,.5), inset 0 0 6px rgba(0,240,255,.3);
  overflow: hidden;
}
.boot-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  animation: bootfill 1.6s ease forwards;
  box-shadow: 0 0 10px var(--cyan);
}
@keyframes bootfill { to { width: 100%; } }
.boot-ok { color: #4dff88; text-shadow: 0 0 8px rgba(77,255,136,.6); opacity: 0; animation: bootok .3s 1.5s forwards; }
@keyframes bootok { to { opacity: 1; } }

/* ============ 背景层 ============ */
.bg {
  position: fixed; inset: 0; z-index: -5;
  background:
    linear-gradient(0deg, rgba(255,0,229,.09) 0%, transparent 16%),
    linear-gradient(0deg, rgba(0,240,255,.06) 0%, transparent 30%),
    radial-gradient(ellipse at 20% 10%, #0d0a2a 0%, var(--bg) 55%);
  transition: transform .2s ease-out;
}

.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,240,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,240,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.9) 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.9) 0%, transparent 75%);
  animation: gridmove 22s linear infinite;
}
@keyframes gridmove { from { background-position: 0 0; } to { background-position: 0 44px; } }

.bg-glow {
  position: absolute; border-radius: 50%;
  filter: blur(110px); opacity: .3;
  animation: glowfloat 12s ease-in-out infinite alternate;
}
.bg-glow-1 { width: 480px; height: 480px; background: var(--cyan); top: -120px; left: -100px; }
.bg-glow-2 { width: 520px; height: 520px; background: var(--magenta); bottom: -160px; right: -120px; animation-delay: -4s; }
.bg-glow-3 { width: 400px; height: 400px; background: var(--purple); top: 40%; left: 55%; opacity: .18; animation-delay: -8s; }
@keyframes glowfloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, -30px) scale(1.15); }
}

/* 粒子画布 */
#particles { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
.scanlines {
  position: fixed; inset: 0; z-index: 997; pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255,255,255,.025) 0px,
    rgba(255,255,255,.025) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  animation: scanmove 9s linear infinite;
}
@keyframes scanmove { from { background-position: 0 0; } to { background-position: 0 6px; } }

/* 暗角 */
.vignette {
  position: fixed; inset: 0; z-index: 998; pointer-events: none;
  background:
    linear-gradient(0deg, rgba(0,240,255,.05), transparent 28%),
    linear-gradient(180deg, rgba(255,0,229,.04), transparent 24%),
    radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,.72) 100%);
}

/* 光标辉光 */
#cursor-glow {
  position: fixed; width: 320px; height: 320px;
  border-radius: 50%; pointer-events: none; z-index: 996;
  background: radial-gradient(circle, rgba(0,240,255,.08) 0%, transparent 65%);
  transform: translate(-50%, -50%);
  transition: opacity .3s;
}
@media (hover: none) { #cursor-glow { display: none; } }

/* ============ HUD 四角瞄准框 ============ */
.hud-corner {
  position: fixed; width: 36px; height: 36px; z-index: 995;
  pointer-events: none; opacity: .75;
  filter: drop-shadow(0 0 6px rgba(0,240,255,.7));
}
.hud-tl { top: 12px; left: 12px; border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan); }
.hud-tr { top: 12px; right: 12px; border-top: 2px solid var(--cyan); border-right: 2px solid var(--cyan); }
.hud-bl { bottom: 12px; left: 12px; border-bottom: 2px solid var(--cyan); border-left: 2px solid var(--cyan); }
.hud-br { bottom: 12px; right: 12px; border-bottom: 2px solid var(--cyan); border-right: 2px solid var(--cyan); }
.hud-corner::after {
  content: ''; position: absolute;
  width: 6px; height: 6px; background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}
.hud-tl::after { top: -3px; left: -3px; }
.hud-tr::after { top: -3px; right: -3px; }
.hud-bl::after { bottom: -3px; left: -3px; }
.hud-br::after { bottom: -3px; right: -3px; }

/* ============ 导航 ============ */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  padding: 18px 0;
  transition: background .3s, box-shadow .3s, padding .3s;
}
#nav.scrolled {
  padding: 10px 0;
  background: rgba(3,4,9,.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,240,255,.15);
  box-shadow: 0 4px 30px rgba(0,0,0,.4);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-family: var(--font-display); font-weight: 900; font-size: 22px;
  color: var(--text); text-decoration: none; letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(0,240,255,.6);
  transition: text-shadow .3s;
}
.logo:hover { text-shadow: 0 0 20px var(--cyan), 0 0 40px rgba(0,240,255,.5); }
.logo-bracket { color: var(--cyan); }

.nav-links { display: flex; gap: 30px; }
.nav-link {
  position: relative;
  font-family: var(--font-mono); font-size: 14px;
  color: var(--text-dim); text-decoration: none;
  letter-spacing: 1px;
  transition: color .25s;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: -5px;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 8px var(--cyan);
  transition: width .3s;
}
.nav-link:hover, .nav-link.active { color: var(--cyan); text-shadow: 0 0 10px rgba(0,240,255,.7); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-burger span { width: 24px; height: 2px; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); transition: .3s; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ 通用 section ============ */
section {
  max-width: 1100px; margin: 0 auto;
  padding: 120px 24px 40px;
  min-height: 100vh;
}
.section-head { display: flex; align-items: center; gap: 20px; margin-bottom: 56px; }
.section-title {
  font-family: var(--font-display); font-size: clamp(26px, 4vw, 36px);
  font-weight: 700; letter-spacing: 3px;
  text-shadow: 0 0 18px rgba(0,240,255,.35);
  white-space: nowrap;
}
.title-num { color: var(--magenta); font-size: .55em; vertical-align: middle; text-shadow: 0 0 14px rgba(255,0,229,.6); }
.title-ja { font-size: 13px; color: var(--yellow); text-shadow: 0 0 8px rgba(255,230,0,.5); letter-spacing: 2px; }
.section-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(0,240,255,.4), transparent);
  box-shadow: 0 0 8px rgba(0,240,255,.3);
}

.mono { font-family: var(--font-mono); }

/* 滚动进入动画（JS 门控：html.js 存在才隐藏，JS 失效则内容照常显示） */
.reveal {
  transition: opacity .7s ease, transform .7s ease;
}
.js .reveal { opacity: 0; transform: translateY(40px); }
.js .reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ HERO ============ */
#hero {
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center;
  min-height: 100vh;
  padding-top: 130px;
  position: relative;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; padding-bottom: 260px; }

/* hero 左侧竖排文字 */
.hero-side {
  position: absolute; left: 18px; top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-size: 11px; letter-spacing: 6px;
  color: var(--text-dim); z-index: 2;
  text-shadow: 0 0 8px rgba(0,240,255,.3);
}
@media (max-width: 900px) { .hero-side { display: none; } }

.hero-eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-dim);
  margin-bottom: 34px;
  animation: fadeup 1s .2s both;
}
.eyebrow-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4dff88; box-shadow: 0 0 10px #4dff88;
  animation: blink 1.6s infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .2; } }

@keyframes fadeup { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* 故障文字 glitch — 霓虹灯管 + RGB 分离 */
.glitch {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(52px, 12vw, 128px);
  font-weight: 900;
  letter-spacing: 6px;
  color: #f4fbff;
  animation: fadeup 1s .4s both, neonflicker 7s linear .4s infinite, chroma 3.5s ease-in-out infinite;
}
/* RGB 色偏呼吸 */
@keyframes chroma {
  0%, 100% {
    text-shadow:
      3px 0 0 rgba(255,0,229,.4),
      -3px 0 0 rgba(0,240,255,.4),
      0 0 8px rgba(255,255,255,.6),
      0 0 18px var(--cyan),
      0 0 42px var(--cyan),
      0 0 80px var(--cyan),
      0 0 150px rgba(0,240,255,.7);
  }
  50% {
    text-shadow:
      -3px 0 0 rgba(255,0,229,.4),
      3px 0 0 rgba(0,240,255,.4),
      0 0 8px rgba(255,255,255,.6),
      0 0 18px var(--magenta),
      0 0 42px var(--magenta),
      0 0 80px var(--magenta),
      0 0 150px rgba(255,0,229,.5);
  }
}
/* 霓虹灯管闪烁 */
@keyframes neonflicker {
  0%, 100% { opacity: 1; }
  91% { opacity: 1; } 92% { opacity: .65; } 93% { opacity: 1; }
  95% { opacity: .85; } 96% { opacity: 1; }
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
}
.glitch::before {
  color: var(--cyan); z-index: -1;
  text-shadow: 0 0 18px var(--cyan);
  animation: glitch-a 3.2s infinite steps(1);
}
.glitch::after {
  color: var(--magenta); z-index: -2;
  text-shadow: 0 0 18px var(--magenta);
  animation: glitch-b 2.7s infinite steps(1);
}
@keyframes glitch-a {
  0%, 86% { clip-path: inset(0 0 100% 0); transform: none; opacity: 0; }
  87% { clip-path: inset(20% 0 60% 0); transform: translate(-6px, -2px); opacity: .9; }
  89% { clip-path: inset(55% 0 25% 0); transform: translate(5px, 1px); }
  91% { clip-path: inset(8% 0 80% 0); transform: translate(-4px, 2px); }
  93% { clip-path: inset(70% 0 10% 0); transform: translate(6px, -1px); }
  95%, 100% { clip-path: inset(0 0 100% 0); transform: none; opacity: 0; }
}
@keyframes glitch-b {
  0%, 78% { clip-path: inset(100% 0 0 0); transform: none; opacity: 0; }
  80% { clip-path: inset(45% 0 40% 0); transform: translate(6px, 2px); opacity: .9; }
  82% { clip-path: inset(15% 0 70% 0); transform: translate(-5px, -2px); }
  84% { clip-path: inset(65% 0 15% 0); transform: translate(4px, 1px); }
  86% { clip-path: inset(30% 0 55% 0); transform: translate(-6px, 2px); }
  88%, 100% { clip-path: inset(100% 0 0 0); transform: none; opacity: 0; }
}

.hero-sub {
  display: flex; align-items: center; gap: 10px;
  margin: 26px 0 22px;
  font-size: clamp(15px, 2.5vw, 20px);
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0,240,255,.6);
  animation: fadeup 1s .6s both;
  min-height: 30px;
}
.hero-prompt { color: var(--magenta); text-shadow: 0 0 12px rgba(255,0,229,.7); }
.type-cursor {
  display: inline-block; width: 10px; height: 1.1em;
  background: var(--cyan); box-shadow: 0 0 10px var(--cyan);
  animation: blink .8s infinite;
}

.hero-divider {
  width: min(280px, 60vw); height: 2px;
  margin: 0 auto 26px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--magenta), var(--yellow), transparent);
  box-shadow: 0 0 14px rgba(0,240,255,.6), 0 0 20px rgba(255,0,229,.3);
  animation: fadeup 1s .75s both;
}

.hero-desc {
  color: var(--text-dim); font-size: 16px; line-height: 1.9;
  margin-bottom: 42px;
  animation: fadeup 1s .8s both;
}

.hero-cta { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; animation: fadeup 1s 1s both; }

.btn {
  position: relative;
  font-family: var(--font-mono); font-size: 15px; letter-spacing: 2px;
  padding: 14px 34px;
  text-decoration: none;
  transition: all .3s;
  overflow: hidden;
}
.btn-primary {
  color: #03030a;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 24px rgba(0,240,255,.4), 0 0 24px rgba(255,0,229,.3);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.btn-primary:hover {
  box-shadow: 0 0 40px rgba(0,240,255,.7), 0 0 40px rgba(255,0,229,.5);
  transform: translateY(-2px);
}
.btn-arrow { display: inline-block; transition: transform .3s; }
.btn-primary:hover .btn-arrow { transform: translateX(6px); }

.btn-ghost {
  color: var(--cyan);
  border: 1px solid var(--cyan);
  box-shadow: inset 0 0 12px rgba(0,240,255,.2), 0 0 12px rgba(0,240,255,.25);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.btn-ghost:hover {
  background: rgba(0,240,255,.1);
  box-shadow: inset 0 0 20px rgba(0,240,255,.3), 0 0 24px rgba(0,240,255,.5);
  transform: translateY(-2px);
}

/* 统计数字 */
.hero-stats {
  display: flex; gap: 60px; margin-top: 64px;
  animation: fadeup 1s 1.2s both;
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-family: var(--font-display); font-size: 34px; font-weight: 700;
  color: var(--text);
  text-shadow: 0 0 14px rgba(0,240,255,.7);
}
.stat-label { font-size: 12px; color: var(--text-dim); letter-spacing: 3px; }

/* 滚动提示 */
.scroll-hint {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--text-dim); font-size: 11px; letter-spacing: 4px;
  animation: fadeup 1s 1.6s both;
  z-index: 2;
}
.scroll-line { width: 1px; height: 46px; background: rgba(0,240,255,.25); position: relative; overflow: hidden; }
.scroll-line-dot {
  position: absolute; left: -2px; top: -8px;
  width: 5px; height: 8px; background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: scrolldot 1.6s ease-in-out infinite;
}
@keyframes scrolldot { from { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } to { transform: translateY(54px); opacity: 0; } }

/* 霓虹灯管招牌 */
.neon-sign {
  position: absolute; right: 4%; top: 18%;
  z-index: 2;
  width: 200px;
  transform: rotate(-5deg);
  opacity: .95;
  animation: signflicker 4.5s linear infinite;
  filter: drop-shadow(0 0 14px rgba(255,0,229,.5));
}
.neon-sign svg { width: 100%; height: auto; display: block; }
@keyframes signflicker {
  0%, 100% { opacity: .95; }
  6% { opacity: .45; } 7% { opacity: .95; }
  33% { opacity: .7; } 34% { opacity: .95; }
  71% { opacity: .85; } 72% { opacity: .35; } 73% { opacity: .9; }
}
@media (max-width: 900px) { .neon-sign { display: none; } }

/* HUD 状态信息 */
.hud-info {
  position: absolute; left: 20px; bottom: 26px;
  z-index: 2;
  font-size: 11px; line-height: 1.8;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-align: left;
}
.hud-ok { color: #4dff88; text-shadow: 0 0 8px rgba(77,255,136,.6); }
@media (max-width: 640px) { .hud-info { display: none; } }

/* ============ 城市天际线 ============ */
#cityscape {
  position: absolute; bottom: 0; left: 0;
  width: 100%; height: auto;
  z-index: 1;
  pointer-events: none;
}
.city-horizon {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; z-index: 1;
  background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--purple));
  box-shadow: 0 0 18px var(--cyan), 0 0 40px rgba(255,0,229,.5);
  opacity: .8;
}

/* ============ ABOUT ============ */
.about-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: start; }

/* 终端卡片 */
.terminal-card {
  background: rgba(8,10,26,.85);
  border: 1px solid rgba(0,240,255,.25);
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0,240,255,.12), inset 0 0 40px rgba(123,47,247,.06);
  overflow: hidden;
  transition: box-shadow .4s;
}
.terminal-card:hover { box-shadow: 0 0 40px rgba(0,240,255,.25), inset 0 0 50px rgba(123,47,247,.1); }
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(0,240,255,.15);
}
.t-dot { width: 11px; height: 11px; border-radius: 50%; }
.t-red { background: #ff5f56; box-shadow: 0 0 6px #ff5f56; }
.t-yellow { background: #ffbd2e; box-shadow: 0 0 6px #ffbd2e; }
.t-green { background: #27c93f; box-shadow: 0 0 6px #27c93f; }
.terminal-title { margin-left: 10px; font-size: 12px; color: var(--text-dim); }
.terminal-body {
  padding: 20px 22px;
  font-size: 13.5px; line-height: 2;
  color: var(--text-dim);
}
.t-prompt { color: #4dff88; text-shadow: 0 0 8px rgba(77,255,136,.5); }
.t-out { padding-left: 14px; }
.t-cyan { color: var(--cyan); text-shadow: 0 0 8px rgba(0,240,255,.5); }
.t-green { color: #4dff88; text-shadow: 0 0 8px rgba(77,255,136,.5); }
.t-cursor { animation: blink 1s infinite; color: var(--cyan); }

.about-right h3 {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.5; margin-bottom: 22px;
  font-weight: 700;
}
.neon-text {
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(0,240,255,.8), 0 0 40px rgba(0,240,255,.4);
}
.about-right p { color: var(--text-dim); line-height: 2; margin-bottom: 30px; }

.skill-label { display: block; font-size: 13px; color: var(--magenta); text-shadow: 0 0 8px rgba(255,0,229,.5); margin-bottom: 14px; letter-spacing: 2px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text-dim);
  padding: 7px 14px;
  border: 1px solid rgba(0,240,255,.25);
  background: rgba(0,240,255,.04);
  border-radius: 3px;
  cursor: default;
  transition: all .3s;
  position: relative;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.tag:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(0,240,255,.1);
  box-shadow: 0 0 16px rgba(0,240,255,.45), inset 0 0 8px rgba(0,240,255,.15);
  text-shadow: 0 0 8px rgba(0,240,255,.8);
  transform: translateY(-2px);
}

/* ============ WORK ============ */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.work-card {
  position: relative;
  background: rgba(8,10,26,.7);
  border: 1px solid rgba(0,240,255,.18);
  overflow: hidden;
  cursor: pointer;
  transition: transform .4s, box-shadow .4s, border-color .4s;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.work-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0,240,255,.6);
  box-shadow: 0 12px 44px rgba(0,0,0,.5), 0 0 30px rgba(0,240,255,.22);
}
/* 卡片边框流光 */
.work-card::before {
  content: ''; position: absolute; inset: -2px; z-index: 0;
  background: conic-gradient(from var(--angle, 0deg), transparent 0%, var(--cyan) 12%, transparent 30%, transparent 55%, var(--magenta) 70%, transparent 85%);
  opacity: 0; transition: opacity .4s;
}
.work-card:hover::before { opacity: .8; animation: rotate-angle 3s linear infinite; }
@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes rotate-angle { to { --angle: 360deg; } }

.work-thumb {
  position: relative; z-index: 1;
  height: 190px;
  background-size: cover; background-position: center;
  transition: transform .5s;
}
.work-card:hover .work-thumb { transform: scale(1.05); }
.work-thumb::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(8,10,26,.9));
}
.work-body { position: relative; z-index: 1; padding: 22px 24px 26px; }
.work-tags { display: flex; gap: 8px; margin-bottom: 12px; }
.work-tags span {
  font-size: 11px; color: var(--cyan);
  border: 1px solid rgba(0,240,255,.4);
  padding: 3px 8px;
  text-shadow: 0 0 6px rgba(0,240,255,.6);
}
.work-title { font-size: 18px; margin-bottom: 10px; transition: color .3s, text-shadow .3s; }
.work-card:hover .work-title { color: var(--cyan); text-shadow: 0 0 12px rgba(0,240,255,.6); }
.work-desc { font-size: 13.5px; color: var(--text-dim); line-height: 1.8; margin-bottom: 18px; }
.work-link {
  font-size: 13px; color: var(--magenta); text-decoration: none;
  letter-spacing: 1px; text-shadow: 0 0 8px rgba(255,0,229,.5);
  transition: letter-spacing .3s;
}
.work-link:hover { letter-spacing: 3px; text-shadow: 0 0 14px rgba(255,0,229,.8); }

/* ============ CONTACT ============ */
#contact { display: flex; flex-direction: column; justify-content: center; }
.contact-inner { text-align: center; padding: 40px 0 80px; }
.contact-big {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700; line-height: 1.5;
  margin-bottom: 16px;
  text-shadow: 0 0 24px rgba(0,240,255,.25);
}
.contact-sub { color: var(--text-dim); font-size: 13px; margin-bottom: 44px; letter-spacing: 2px; }
.contact-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.contact-btn {
  font-size: 15px; letter-spacing: 2px;
  color: var(--text);
  padding: 14px 26px;
  text-decoration: none;
  border: 1px solid rgba(0,240,255,.35);
  background: rgba(0,240,255,.04);
  position: relative;
  transition: all .3s;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.contact-btn:hover {
  color: #03030a;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  border-color: transparent;
  box-shadow: 0 0 26px rgba(0,240,255,.5), 0 0 26px rgba(255,0,229,.4);
  transform: translateY(-3px);
}

/* ============ FOOTER ============ */
footer {
  position: relative;
  border-top: 1px solid rgba(0,240,255,.12);
  padding: 26px 24px;
  background: rgba(3,4,9,.85);
}
/* 黄黑警告条纹 */
footer::before {
  content: '';
  position: absolute; top: -10px; left: 0; right: 0;
  height: 10px;
  background: repeating-linear-gradient(45deg, var(--yellow) 0 12px, #111 12px 24px);
  opacity: .65;
  box-shadow: 0 0 12px rgba(255,230,0,.3);
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 12px; color: var(--text-dim);
}
.footer-code { color: rgba(0,240,255,.5); }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .hero-stats { gap: 40px; }
}

@media (max-width: 640px) {
  section { padding-top: 100px; }
  .hero-inner { padding-bottom: 200px; }
  .nav-links {
    position: fixed; top: 56px; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(3,4,9,.95);
    border-left: 1px solid rgba(0,240,255,.2);
    padding: 10px 0;
    transform: translateX(100%);
    transition: transform .35s;
    backdrop-filter: blur(10px);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-link { padding: 14px 34px; }
  .nav-burger { display: flex; }
  .hero-stats { gap: 26px; }
  .stat-num { font-size: 26px; }
  .contact-links { flex-direction: column; align-items: center; }
  .contact-btn { width: min(280px, 80vw); text-align: center; }
}

/* ============================================================
   v2.1 浓度加强 — 赛博雨 / 霓虹灯柱 / 跑马灯 / 乱码 / 进度条
   ============================================================ */

/* 滚动进度条 */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  z-index: 901; pointer-events: none;
  background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--yellow));
  box-shadow: 0 0 12px rgba(0,240,255,.8), 0 0 24px rgba(255,0,229,.5);
}

/* 左右霓虹灯柱 */
.neon-strip {
  position: fixed; top: 0; bottom: 0; width: 10px;
  z-index: 990; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: space-around;
  opacity: .85;
}
.neon-strip.left { left: 10px; }
.neon-strip.right { right: 10px; }
.neon-strip span {
  width: 5px; height: 13px; border-radius: 2px;
  animation: lightblink 3.8s infinite;
}
@keyframes lightblink {
  0%, 100% { opacity: .95; }
  18% { opacity: .3; } 26% { opacity: .95; }
  42% { opacity: .55; } 50% { opacity: .95; }
  68% { opacity: .2; } 74% { opacity: .9; }
  86% { opacity: .6; } 92% { opacity: .95; }
}
@media (max-width: 768px) { .neon-strip { display: none; } }

/* 故障跑马灯横幅 */
.ticker {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 24%;
  width: min(700px, 88vw); height: 32px;
  z-index: 2;
  display: flex; align-items: center; overflow: hidden;
  border: 1px solid rgba(255,230,0,.5);
  background: rgba(20,14,0,.55);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  box-shadow: 0 0 18px rgba(255,230,0,.18), inset 0 0 14px rgba(255,230,0,.08);
}
.ticker-track {
  display: flex; white-space: nowrap;
  font-size: 11px; letter-spacing: 3px;
  color: var(--yellow);
  text-shadow: 0 0 8px rgba(255,230,0,.6);
  animation: marquee 18s linear infinite;
}
.ticker-track span { padding-right: 30px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* 漂浮乱码标签 */
.float-code {
  position: absolute; z-index: 1;
  font-size: 11px; letter-spacing: 3px;
  color: rgba(0,240,255,.45);
  text-shadow: 0 0 10px rgba(0,240,255,.5);
  animation: floatdrift 9s ease-in-out infinite alternate;
  pointer-events: none;
  white-space: nowrap;
}
@keyframes floatdrift { from { transform: translateY(-10px); } to { transform: translateY(12px); } }

/* section 标题 LED 状态灯 */
.section-title::before {
  content: '●';
  font-size: .4em; vertical-align: middle; margin-right: 10px;
  color: #4dff88; text-shadow: 0 0 10px #4dff88;
  animation: blink 1.8s infinite;
}

/* hero 竖排文字提亮 */
.hero-side { color: rgba(0,240,255,.55); text-shadow: 0 0 10px rgba(0,240,255,.4); }

/* ============================================================
   v2.2 赛博武侠 — 侠字 / 灯牌 / 太极 / 剑气
   ============================================================ */

/* 巨型霓虹书法「侠」 */
.wuxia-char {
  position: absolute; left: 4%; top: 12%;
  font-size: clamp(180px, 34vh, 420px);
  font-family: 'KaiTi', 'STKaiti', 'Noto Serif SC', serif;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0,240,255,.3);
  text-shadow:
    0 0 24px rgba(0,240,255,.12),
    0 0 60px rgba(255,0,229,.08);
  opacity: .8;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  animation: wuxiabreathe 5s ease-in-out infinite;
}
@keyframes wuxiabreathe {
  0%, 100% {
    opacity: .5;
    text-shadow: 0 0 24px rgba(0,240,255,.12), 0 0 60px rgba(255,0,229,.08);
  }
  50% {
    opacity: .85;
    text-shadow: 0 0 30px rgba(0,240,255,.22), 0 0 80px rgba(255,0,229,.14), 0 0 120px rgba(0,240,255,.1);
  }
}
@media (max-width: 768px) { .wuxia-char { display: none; } }

/* 武侠霓虹灯牌（侠字） */
.sign-wuxia {
  left: 5%; right: auto; top: 24%;
  transform: rotate(4deg);
  animation-delay: -1.4s;
  filter: drop-shadow(0 0 12px rgba(255,230,0,.4));
}

/* 全息太极（about 区） */
.about-right { position: relative; }
.taiji {
  position: absolute; right: -40px; bottom: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: linear-gradient(180deg, rgba(0,240,255,.4) 50%, rgba(255,0,229,.4) 50%);
  border: 1px solid rgba(0,240,255,.45);
  box-shadow: 0 0 26px rgba(0,240,255,.25), inset 0 0 26px rgba(255,0,229,.12);
  animation: taijispin 18s linear infinite;
  opacity: .4; z-index: 0; pointer-events: none;
}
.taiji::before {
  content: ''; position: absolute; width: 100px; height: 100px;
  left: 50%; top: 0; transform: translateX(-50%);
  border-radius: 0 0 100px 100px;
  background: radial-gradient(circle at 75% 50%, rgba(255,0,229,.55) 0 14px, transparent 15px), rgba(0,240,255,.45);
}
.taiji::after {
  content: ''; position: absolute; width: 100px; height: 100px;
  left: 50%; bottom: 0; transform: translateX(-50%);
  border-radius: 100px 100px 0 0;
  background: radial-gradient(circle at 25% 50%, rgba(0,240,255,.55) 0 14px, transparent 15px), rgba(255,0,229,.45);
}
@keyframes taijispin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* ============================================================
   v2.3 浓度拉满 — 齿轮墙 / 摆针吊臂 / PCB网格 / 巨型汉字层 / 飞剑 / 剑光标 / 角码
   ============================================================ */

/* ---- 齿轮组(补全中断样式)+ 齿轮墙 ---- */
.gear { position: absolute; z-index: 2; pointer-events: none; text-align: center; }
.gear svg { width: 100%; height: auto; filter: drop-shadow(0 0 8px rgba(0,240,255,.4)); }
.gear-big { left: 6vw; top: 34vh; width: 128px; animation: gearspin 16s linear infinite; }
.gear-small { left: 13vw; top: 52vh; width: 76px; animation: gearspin 10s linear infinite reverse; }
.gear-sun { right: 6vw; top: 62vh; width: 100px; animation: gearspin 12s linear infinite; }
.gear-tag { display: block; margin-top: 6px; font-size: 10px; letter-spacing: .14em; color: var(--text-dim); }
@keyframes gearspin { to { transform: rotate(360deg); } }

/* ---- 仪表盘(补全)+ 摆针 ---- */
.gauge { position: absolute; right: 5vw; top: 22vh; z-index: 2; pointer-events: none; text-align: center; }
.gauge svg { width: 150px; }
.gauge-needle { transform-origin: 70px 84px; animation: needlesway 3.4s ease-in-out infinite; }
@keyframes needlesway { 0%, 100% { transform: rotate(-26deg); } 50% { transform: rotate(22deg); } }

/* ---- 机械吊臂(补全)+ 缓摆 ---- */
.mech-arm { position: absolute; right: 14vw; top: 40vh; z-index: 2; pointer-events: none; text-align: center; }
.mech-arm svg { width: 250px; transform-origin: 210px 190px; animation: armsway 7s ease-in-out infinite; }
@keyframes armsway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(2.6deg); } }

/* ---- PCB 电路网格(背景网格升级) ---- */
.bg-grid {
  background-image:
    linear-gradient(rgba(0,240,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,240,255,.06) 1px, transparent 1px),
    radial-gradient(circle, rgba(0,240,255,.2) 0 1.2px, transparent 2.1px),
    radial-gradient(circle, rgba(255,0,229,.14) 0 1px, transparent 1.9px);
  background-size: 44px 44px, 44px 44px, 88px 88px, 132px 132px;
}

/* ---- 巨型霓虹汉字背景层(剑/武/刃) ---- */
.bg-kata { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-kata span {
  position: absolute; font-family: KaiTi, STKaiti, serif; font-weight: 900;
  color: transparent; -webkit-text-stroke: 1.5px rgba(0,240,255,.15);
  text-shadow: 0 0 80px rgba(0,240,255,.13), 0 0 160px rgba(255,0,229,.1);
}
.bg-kata .kata-1 { font-size: 46vh; right: -3vw; top: 3vh; transform: rotate(6deg); }
.bg-kata .kata-2 { font-size: 30vh; left: -1vw; bottom: -4vh; -webkit-text-stroke: 1.5px rgba(255,0,229,.14); transform: rotate(-8deg); }
.bg-kata .kata-3 { font-size: 18vh; left: 30vw; top: 42vh; -webkit-text-stroke: 1px rgba(255,230,0,.12); opacity: .7; }

/* ---- 飞剑拖尾画布 ---- */
#blade-trail { position: fixed; inset: 0; z-index: 996; pointer-events: none; }

/* ---- 剑形光标 ---- */
body, a, button, .tag {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 26 26"><path d="M13 1 L24 25 L13 20 L2 25 Z" fill="none" stroke="%2300f0ff" stroke-width="1.6"/><path d="M13 1 L13 20" stroke="%23ff00e5" stroke-width="0.8" opacity="0.8"/></svg>') 13 13, crosshair;
}

/* ---- 作品卡机械角码 + 内扫描线 ---- */
.work-card::after {
  content: ''; position: absolute; inset: 10px; z-index: 2; pointer-events: none;
  background:
    linear-gradient(var(--cyan), var(--cyan)) left top / 14px 2px,
    linear-gradient(var(--cyan), var(--cyan)) left top / 2px 14px,
    linear-gradient(var(--cyan), var(--cyan)) right top / 14px 2px,
    linear-gradient(var(--cyan), var(--cyan)) right top / 2px 14px,
    linear-gradient(var(--cyan), var(--cyan)) left bottom / 14px 2px,
    linear-gradient(var(--cyan), var(--cyan)) left bottom / 2px 14px,
    linear-gradient(var(--cyan), var(--cyan)) right bottom / 14px 2px,
    linear-gradient(var(--cyan), var(--cyan)) right bottom / 2px 14px;
  background-repeat: no-repeat;
  opacity: .4; transition: opacity .3s;
}
.work-card:hover::after { opacity: 1; }
.work-body::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,240,255,.05) 0 1px, transparent 1px 4px);
  animation: bodyscan 6s linear infinite;
}
@keyframes bodyscan { from { background-position: 0 0; } to { background-position: 0 20px; } }

/* ---- 双击剑气爆发：屏幕震动 ---- */
.screen-shake { animation: screenshake .4s linear; }
@keyframes screenshake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-4px, 3px); }
  40% { transform: translate(4px, -3px); }
  60% { transform: translate(-3px, -2px); }
  80% { transform: translate(3px, 2px); }
}

/* ============================================================
   v2.4 被斩系统 — 刀光 / 裂缝 / 斬字 / 碎片 / 受击红光 / 震动
   ============================================================ */

#slash-fx { position: fixed; inset: 0; z-index: 9990; pointer-events: none; overflow: hidden; }

/* 全屏白闪（刀光反光） */
.slash-flash {
  position: absolute; inset: -20%;
  background: radial-gradient(ellipse at var(--sx, 50%) var(--sy, 50%), rgba(255,255,255,.95) 0%, rgba(255,255,255,.35) 45%, transparent 78%);
  animation: slashflash .16s ease-out forwards;
}
@keyframes slashflash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }

/* 刀光：以点击点为原点向两端劈开（v2.5 加粗三倍） */
.slash-blade {
  position: absolute; left: var(--sx, 50%); top: var(--sy, 50%);
  width: 10px; height: 2600px; margin-left: -5px; margin-top: -1300px;
  transform: rotate(var(--sangle, 50deg));
  background: linear-gradient(180deg, transparent 0%, #fff 6%, #dffcff 28%, #fff 50%, #dffcff 72%, #fff 94%, transparent 100%);
  box-shadow:
    0 0 6px rgba(255,255,255,1),
    0 0 24px rgba(255,255,255,.95),
    0 0 60px rgba(0,240,255,.95),
    0 0 140px rgba(255,0,229,.8),
    0 0 260px rgba(255,0,229,.45);
  animation: slashblade .24s cubic-bezier(.16,.84,.44,1) forwards;
}
@keyframes slashblade {
  0%   { transform: rotate(var(--sangle, 50deg)) scaleY(.02); opacity: 0; }
  8%   { opacity: 1; }
  70%  { transform: rotate(var(--sangle, 50deg)) scaleY(1); opacity: 1; }
  100% { transform: rotate(var(--sangle, 50deg)) scaleY(1.06); opacity: 0; }
}

/* 刀气宽光带（v2.5 加宽一倍） */
.slash-aura {
  position: absolute; left: var(--sx, 50%); top: var(--sy, 50%);
  width: 180px; height: 2600px; margin-left: -90px; margin-top: -1300px;
  transform: rotate(var(--sangle, 50deg));
  background: linear-gradient(180deg, transparent, rgba(0,240,255,.3) 28%, rgba(255,255,255,.4) 50%, rgba(255,0,229,.28) 72%, transparent);
  filter: blur(12px);
  animation: slashaura .36s ease-out forwards;
}
@keyframes slashaura {
  0% { opacity: 0; transform: rotate(var(--sangle, 50deg)) scaleY(.1); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--sangle, 50deg)) scaleY(1.15); }
}

/* X 双斩：反向刀（rev 系列） */
.slash-blade.rev, .slash-aura.rev { transform: rotate(calc(var(--sangle, 50deg) * -1)); }
.slash-blade.rev { animation-name: slashblade-rev; }
.slash-aura.rev { animation-name: slashaura-rev; }
@keyframes slashblade-rev {
  0%   { transform: rotate(calc(var(--sangle, 50deg) * -1)) scaleY(.02); opacity: 0; }
  8%   { opacity: 1; }
  70%  { transform: rotate(calc(var(--sangle, 50deg) * -1)) scaleY(1); opacity: 1; }
  100% { transform: rotate(calc(var(--sangle, 50deg) * -1)) scaleY(1.06); opacity: 0; }
}
@keyframes slashaura-rev {
  0% { opacity: 0; transform: rotate(calc(var(--sangle, 50deg) * -1)) scaleY(.1); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: rotate(calc(var(--sangle, 50deg) * -1)) scaleY(1.15); }
}

/* 斩字（v2.5 更大、四层光晕） */
.slash-kata {
  position: absolute; left: var(--sx, 50%); top: var(--sy, 50%);
  font-family: KaiTi, STKaiti, serif; font-weight: 900;
  font-size: var(--kata-size, 200px); line-height: 1;
  color: #fff; -webkit-text-stroke: 2.5px rgba(255,0,229,1);
  text-shadow:
    0 0 30px rgba(255,0,229,1),
    0 0 80px rgba(255,0,229,.85),
    0 0 160px rgba(255,40,60,.65),
    0 0 260px rgba(0,240,255,.4);
  transform: translate(-50%, -50%);
  animation: slashkata .5s cubic-bezier(.2,1.4,.3,1) forwards;
}
@keyframes slashkata {
  0%   { transform: translate(-50%, -50%) scale(.2) rotate(-14deg); opacity: 0; }
  22%  { opacity: 1; transform: translate(-50%, -50%) scale(1.28) rotate(-2deg); }
  45%  { transform: translate(-50%, -50%) scale(1) rotate(0); }
  100% { transform: translate(-50%, -50%) scale(1.5) rotate(6deg); opacity: 0; }
}

/* 红色受击边缘 */
.slash-hurt {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at var(--sx, 50%) var(--sy, 50%), transparent 35%, rgba(255,0,40,.34) 82%, rgba(255,0,40,.55) 100%);
  animation: slashhurt .55s ease-out forwards;
}
@keyframes slashhurt { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }

/* ============================================================
   v2.5 最夸张斩击 — 撕裂带 / 冲击波 / 速度线 / 斬字残影 / 喷溅
   ============================================================ */

/* 撕裂带：沿刀痕的黑色裂口，带电光 */
.slash-tearband {
  position: absolute; left: var(--sx, 50%); top: var(--sy, 50%);
  width: 18px; height: 2600px; margin-left: -9px; margin-top: -1300px;
  transform: rotate(var(--sangle, 50deg));
  background: #000;
  box-shadow:
    0 0 0 2px rgba(255,0,229,.9),
    0 0 0 5px rgba(0,0,0,.95),
    0 0 30px rgba(255,0,229,.8),
    0 0 80px rgba(255,0,229,.45);
  animation: tearband .95s cubic-bezier(.6,.05,.3,1) forwards;
  opacity: 0;
}
.slash-tearband::after {
  content: ''; position: absolute; left: 50%; top: 0;
  width: 3px; height: 100%; margin-left: -1.5px;
  background: linear-gradient(180deg, transparent, #fff 10%, #00f0ff 50%, #fff 90%, transparent);
  box-shadow: 0 0 16px #00f0ff, 0 0 44px rgba(0,240,255,.6);
  animation: tearelectric .95s ease-in-out infinite;
}
@keyframes tearband {
  0% { opacity: 0; transform: rotate(var(--sangle, 50deg)) scaleY(.05); }
  12% { opacity: 1; transform: rotate(var(--sangle, 50deg)) scaleY(1.02); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--sangle, 50deg)) scaleY(1); }
}
@keyframes tearelectric { 0%, 100% { opacity: .9; } 50% { opacity: .35; } }

/* 冲击波双环 */
.slash-wave {
  position: absolute; left: var(--sx, 50%); top: var(--sy, 50%);
  width: 24px; height: 24px; margin-left: -12px; margin-top: -12px;
  border: 4px solid rgba(255,255,255,.95);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(0,240,255,.9), inset 0 0 16px rgba(0,240,255,.5);
  animation: slashwave .5s ease-out forwards;
}
.slash-wave.w2 { border-color: rgba(0,240,255,.85); animation-delay: .06s; box-shadow: 0 0 24px rgba(255,0,229,.9), inset 0 0 16px rgba(255,0,229,.5); }
@keyframes slashwave {
  0% { transform: scale(.05); opacity: 1; }
  100% { transform: scale(9.5); opacity: 0; }
}

/* 径向速度线（从斩点射出） */
.slash-burst {
  position: absolute; left: var(--sx, 50%); top: var(--sy, 50%);
  width: 7px; height: 100px; margin-left: -3.5px;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,0,229,.65) 55%, transparent);
  border-radius: 3px;
  transform-origin: 50% 100%;
  transform: rotate(var(--ba, 0deg));
  animation: slashburst .45s ease-out forwards;
}
@keyframes slashburst {
  0% { opacity: 1; transform: rotate(var(--ba, 0deg)) translateY(0) scaleY(.3); }
  100% { opacity: 0; transform: rotate(var(--ba, 0deg)) translateY(-46px) scaleY(1.15); }
}

/* 斬字残影（三重错位） */
.slash-ghost {
  position: absolute; left: var(--sx, 50%); top: var(--sy, 50%);
  font-family: KaiTi, STKaiti, serif; font-weight: 900;
  font-size: var(--kata-size, 200px); line-height: 1;
  color: transparent;
  -webkit-text-stroke: var(--gs, 2px) var(--gc, rgba(255,0,229,.5));
  transform: translate(calc(-50% + var(--gx, 0px)), calc(-50% + var(--gy, 0px)));
  animation: slashghost .55s ease-out forwards;
}
@keyframes slashghost {
  0% { opacity: .9; transform: translate(calc(-50% + var(--gx, 0px)), calc(-50% + var(--gy, 0px))) scale(.9) rotate(var(--gr, 0deg)); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--gx, 0px)), calc(-50% + var(--gy, 0px))) scale(1.4) rotate(var(--gr, 0deg)); }
}

/* 能量喷溅（向上扇形） */
.slash-blood {
  position: absolute; left: var(--sx, 50%); top: var(--sy, 50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #ff00e5 45%, rgba(255,0,229,.2) 100%);
  box-shadow: 0 0 12px rgba(255,0,229,.95);
  animation: slashblood var(--bt, .8s) cubic-bezier(.2,.6,.4,1) forwards;
}
@keyframes slashblood {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--bx, 0px)), calc(-50% + var(--by, 0px))) scale(.1); opacity: 0; }
}

/* 白闪 v2.5（更强） */
.slash-flash {
  position: absolute; inset: -20%;
  background: radial-gradient(ellipse at var(--sx, 50%) var(--sy, 50%), rgba(255,255,255,1) 0%, rgba(255,255,255,.5) 42%, transparent 72%);
  animation: slashflash .18s ease-out forwards;
}

/* ============================================================
   v2.6 狮子歌歌 — 10% 稀有触发（索隆式绿色绝杀）
   ============================================================ */

/* 绿闪 */
.slash-flash.lion {
  background: radial-gradient(ellipse at var(--sx, 50%) var(--sy, 50%), rgba(220,255,230,1) 0%, rgba(77,255,136,.5) 40%, transparent 70%);
}

/* 加粗绿刀光 */
.slash-blade.lion {
  width: 14px; margin-left: -7px;
  background: linear-gradient(180deg, transparent 0%, #eafff0 6%, #9dffc0 28%, #fff 50%, #9dffc0 72%, #eafff0 94%, transparent 100%);
  box-shadow:
    0 0 6px rgba(255,255,255,1),
    0 0 26px rgba(190,255,215,.95),
    0 0 70px rgba(77,255,136,.95),
    0 0 160px rgba(77,255,136,.7),
    0 0 300px rgba(0,255,128,.4);
  animation-duration: .3s;
}

/* 宽绿刀气 */
.slash-aura.lion {
  width: 240px; margin-left: -120px;
  background: linear-gradient(180deg, transparent, rgba(77,255,136,.4) 28%, rgba(255,255,255,.45) 50%, rgba(0,255,128,.35) 72%, transparent);
}

/* 绿色撕裂带 */
.slash-tearband.lion {
  width: 22px; margin-left: -11px;
  box-shadow:
    0 0 0 2px rgba(77,255,136,.95),
    0 0 0 5px rgba(0,0,0,.95),
    0 0 40px rgba(77,255,136,.85),
    0 0 100px rgba(0,255,128,.5);
  animation-duration: 1.3s;
}
.slash-tearband.lion::after {
  background: linear-gradient(180deg, transparent, #eafff0 10%, #00ff80 50%, #eafff0 90%, transparent);
  box-shadow: 0 0 20px #00ff80, 0 0 60px rgba(77,255,136,.7);
}

/* 绿色冲击波 */
.slash-wave.lion { border-color: rgba(77,255,136,.95); box-shadow: 0 0 20px rgba(0,255,128,.9), inset 0 0 16px rgba(0,255,128,.5); }
.slash-wave.w2.lion { border-color: rgba(0,255,128,.85); box-shadow: 0 0 24px rgba(77,255,136,.9), inset 0 0 16px rgba(77,255,136,.5); }

/* 绿色速度线 */
.slash-burst.lion {
  background: linear-gradient(180deg, rgba(235,255,242,.95), rgba(0,255,128,.65) 55%, transparent);
}

/* 獅子歌歌 书法大字（四字等宽，白色描绿边） */
.slash-kata.lion {
  color: #eafff0;
  -webkit-text-stroke: 2.5px rgba(77,255,136,1);
  text-shadow:
    0 0 30px rgba(77,255,136,1),
    0 0 90px rgba(0,255,128,.9),
    0 0 180px rgba(77,255,136,.65),
    0 0 300px rgba(0,240,255,.4);
  letter-spacing: .04em;
  white-space: nowrap;
  animation: lionkata 1.15s cubic-bezier(.2,1.4,.3,1) forwards;
}
/* 狮子歌歌斩字：出现→滞留→消散（比普通斬字慢一倍多） */
@keyframes lionkata {
  0%   { transform: translate(-50%, -50%) scale(.18) rotate(-16deg); opacity: 0; }
  12%  { opacity: 1; transform: translate(-50%, -50%) scale(1.3) rotate(-3deg); }
  30%  { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  72%  { transform: translate(-50%, -50%) scale(1.06) rotate(0deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.42) rotate(5deg); opacity: 0; }
}

/* 狮子歌歌残影同步放慢 */
.slash-ghost.lion { animation-duration: 1s; }

/* 绿色受击边缘 */
.slash-hurt.lion {
  background: radial-gradient(ellipse at var(--sx, 50%) var(--sy, 50%), transparent 30%, rgba(0,255,128,.3) 78%, rgba(0,255,128,.5) 100%);
}

/* 绿色能量喷溅 */
.slash-blood.lion {
  background: radial-gradient(circle, #eafff0 0%, #00ff80 45%, rgba(0,255,128,.2) 100%);
  box-shadow: 0 0 14px rgba(0,255,128,.95);
}

/* 狮鬃能量环：旋转放射状绿色光线 */
.lion-mane {
  position: absolute; left: var(--sx, 50%); top: var(--sy, 50%);
  width: 320px; height: 320px; margin: -160px 0 0 -160px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(77,255,136,.85) 0 3deg, transparent 3deg 18deg);
  -webkit-mask-image: radial-gradient(circle, #000 32%, transparent 72%);
  mask-image: radial-gradient(circle, #000 32%, transparent 72%);
  filter: blur(1px) drop-shadow(0 0 18px rgba(77,255,136,.6));
  animation: lionmane 1.05s ease-out forwards;
}
@keyframes lionmane {
  0% { transform: scale(.15) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  62% { transform: scale(2.3) rotate(24deg); opacity: .95; }
  100% { transform: scale(2.6) rotate(34deg); opacity: 0; }
}

/* 索隆式绿雷：从斩点放射的电流 */
.lion-bolt {
  position: absolute; left: var(--sx, 50%); top: var(--sy, 50%);
  height: 3px; transform-origin: 0 50%;
  background: linear-gradient(90deg, #eafff0, #00ff80 55%, transparent);
  box-shadow: 0 0 12px #00ff80;
  animation: lionbolt .85s ease-out forwards;
}
@keyframes lionbolt { 0% { opacity: 0; } 10% { opacity: 1; } 100% { opacity: 0; } }

/* ============================================================
   v2.7 浓度拉满 — 霓虹光带
   ============================================================ */

/* 霓虹光带：斜向渐变条，缓慢漂移 + 微旋转 + 呼吸 */
.glow-band {
  position: absolute; width: 42vw; height: 90px; pointer-events: none;
  filter: blur(46px); opacity: .3;
  mix-blend-mode: screen;
  animation: glowband 11s ease-in-out infinite alternate;
}
@keyframes glowband {
  from { transform: translate(-60px, 0) rotate(calc(var(--tilt, 0deg) - 2deg)) scaleX(1); opacity: .24; }
  to   { transform: translate(70px, -34px) rotate(calc(var(--tilt, 0deg) + 2deg)) scaleX(1.18); opacity: .4; }
}

/* 按钮 hover 强化：抖动 + 光带扫过 */
.btn::after {
  content: ''; position: absolute; top: 0; left: 0; height: 100%; width: 46px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  transform: translateX(-140%) skewX(-18deg);
  transition: transform .5s ease;
  pointer-events: none;
}
.btn:hover::after { transform: translateX(900%) skewX(-18deg); }
.btn-primary:hover, .btn-ghost:hover { animation: btnshudder .22s linear 2; }
@keyframes btnshudder {
  0%, 100% { transform: translate(0, -2px); }
  25% { transform: translate(-1.5px, -2px); }
  50% { transform: translate(1.5px, -2px); }
  75% { transform: translate(-1px, -2px); }
}

/* skill-group 布局补充 */
.skill-group { margin-bottom: 26px; }

/* ============================================================
   v2.8 质变 — 供电呼吸 / 字效统一 / 终端逐行
   ============================================================ */

/* 供电呼吸：核心发光文字统一缓慢亮度呼吸（错峰，不闪烁） */
@keyframes neonbreath {
  from { opacity: .8; }
  to { opacity: 1; }
}
.logo { animation: neonbreath 5.5s ease-in-out infinite alternate; }
.section-title { animation: neonbreath 6.5s ease-in-out infinite alternate; animation-delay: -2.2s; }
.neon-text { animation: neonbreath 5s ease-in-out infinite alternate; animation-delay: -4s; }
.contact-big { animation: neonbreath 6s ease-in-out infinite alternate; animation-delay: -1.4s; }

/* 霓虹字效统一：白芯 → 主色 → 远晕（v2.8） */
.logo { text-shadow: 0 0 6px rgba(255,255,255,.45), 0 0 16px rgba(0,240,255,.7), 0 0 36px rgba(0,240,255,.35); }
.section-title { text-shadow: 0 0 6px rgba(255,255,255,.5), 0 0 18px rgba(0,240,255,.55), 0 0 42px rgba(0,240,255,.3); }
.neon-text { text-shadow: 0 0 5px rgba(255,255,255,.4), 0 0 14px rgba(0,240,255,.8), 0 0 40px rgba(0,240,255,.4); }
.contact-big { text-shadow: 0 0 6px rgba(255,255,255,.45), 0 0 22px rgba(0,240,255,.4), 0 0 50px rgba(0,240,255,.22); }

/* 终端卡片逐行执行（JS 门控：html.js 存在才隐藏，JS 挂掉文字照常显示） */
.js .terminal-body > div {
  opacity: 0; transform: translateY(6px);
  transition: opacity .28s ease, transform .28s ease;
}
.js .terminal-body > div.term-on { opacity: 1; transform: none; }

/* ============================================================
   v2.9 n段式 — 一屏一段 / 滚轮翻页
   ============================================================ */
html, body { height: 100%; }
body { overflow: hidden; }
.stage {
  overflow: hidden;
  transition: transform .65s cubic-bezier(.77, 0, .18, 1);
  will-change: transform;
}
section { min-height: 100vh; min-height: 100dvh; }
#contact { display: flex; flex-direction: column; }
#contact .contact-inner {
  flex: 1 0 auto;
  display: flex; flex-direction: column; justify-content: center;
}

/* 毛体书法（本地字体：柳建毛草——毛体草书，无网络依赖） */
@font-face {
  font-family: 'MaoJianMaoCao';
  src: url('../fonts/LiuJianMaoCao-Regular.ttf') format('truetype');
  font-display: swap;
}

/* 大标题「倒也可斬」：毛体（凌厉） */
.glitch {
  font-family: 'MaoJianMaoCao', 'Liu Jian Mao Cao', 'Ma Shan Zheng', KaiTi, STKaiti, serif;
  letter-spacing: 2px;
}

/* 段号徽标（切段反馈） */
.seg-badge {
  position: fixed; top: 64px; right: 28px; z-index: 990;
  font-size: 13px; letter-spacing: 3px;
  color: rgba(0,240,255,.95);
  text-shadow: 0 0 12px rgba(0,240,255,.9), 0 0 28px rgba(0,240,255,.4);
  opacity: 0; transform: translateY(-6px);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.seg-badge.show { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
