/* ==========================================================================
   ORANGE.SEA · 数字深海个人站
   手写设计系统 —— 无框架、无依赖
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #05060a;
  --bg-raise: #0b0e17;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.055);
  --text: #edf0f7;
  --text-dim: #97a0b5;
  --text-faint: #5c6579;
  --accent: #ff8c42;
  --accent-bright: #ffb347;
  --accent-deep: #ff6a00;
  --sea: #4dd8ff;
  --ok: #57d99d;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --grad-accent: linear-gradient(100deg, #ffb347 0%, #ff8c42 45%, #ff6a00 100%);
  --shadow-deep: 0 24px 70px rgba(0, 0, 0, 0.55);
  --glow-orange: 0 10px 40px rgba(255, 140, 66, 0.28);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Noto Sans SC', 'SFMono-Regular', Consolas, 'PingFang SC', monospace;
  --container: 1200px;
}

@property --ang {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html.menu-open, html.modal-open { overflow: hidden; }

::selection { background: var(--accent); color: #170b00; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 140, 66, 0.55); }

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

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
em { font-style: normal; }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 500;
  padding: 10px 18px;
  background: var(--accent);
  color: #170b00;
  border-radius: 8px;
  font-weight: 700;
  transition: top 0.25s;
}
.skip-link:focus { top: 12px; }

/* ---------- 动漫 OP「红月乌鸦幻化」 ---------- */
.op-loader { display: none; }
html.intro-armed .op-loader {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 400;
  background: #020205;
  overflow: hidden;
  transition: transform 0.55s cubic-bezier(0.87, 0, 0.13, 1);
  animation: op-auto-hide 0s linear 4.2s forwards; /* JS 失效时的纯 CSS 保底 */
}
html.intro-armed .op-loader.op-finish {
  transform: translateY(-101%);
  border-bottom: 5px solid var(--accent);
}
html.intro-lock { overflow: hidden; }
#op-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
@keyframes op-auto-hide { to { visibility: hidden; } }

@keyframes op-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* 话数卡 & SKIP */
.op-episode {
  position: absolute;
  left: clamp(20px, 6vw, 64px);
  bottom: clamp(20px, 6vw, 56px);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--text-faint);
  opacity: 0;
  animation: op-fade-in 0.5s ease 0.3s both;
}
.op-skip {
  position: absolute;
  right: clamp(20px, 6vw, 64px);
  bottom: clamp(20px, 6vw, 56px);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 9px 18px;
  opacity: 0;
  animation: op-fade-in 0.4s ease 0.8s both;
  transition: color 0.3s, border-color 0.3s;
}
.op-skip:hover { color: var(--accent); border-color: rgba(255, 140, 66, 0.6); }

/* 环境乌鸦覆层 */
#crow-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}


/* ---------- 背景层 ---------- */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 1;
  transition: opacity 0.7s ease;
}
body.hero-passed #bg-canvas { opacity: 0.22; }

.bg-fallback {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(900px 620px at 82% -8%, rgba(255, 140, 66, 0.16), transparent 62%),
    radial-gradient(1000px 720px at 8% 108%, rgba(77, 216, 255, 0.08), transparent 60%),
    radial-gradient(1200px 900px at 50% 46%, rgba(38, 44, 84, 0.35), transparent 70%),
    var(--bg);
}
html.has-webgl .bg-fallback { display: none; }

/* ---------- 自定义光标 ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  opacity: 0;
}
html.has-cursor .cursor-dot, html.has-cursor .cursor-ring { opacity: 1; }
html.has-cursor body, html.has-cursor a, html.has-cursor button { cursor: none; }

.cursor-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(255, 140, 66, 0.9);
}
.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1.5px solid rgba(237, 240, 247, 0.55);
  mix-blend-mode: difference;
  transition: width 0.3s var(--ease), height 0.3s var(--ease),
    background-color 0.3s, border-color 0.3s;
}
.cursor-ring.hovering {
  width: 58px;
  height: 58px;
  background: rgba(255, 255, 255, 0.95);
  border-color: transparent;
}

/* ---------- 滚动进度 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 400;
  pointer-events: none;
}
.scroll-progress i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--grad-accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---------- 导航 ---------- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  transition: background-color 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  background: rgba(5, 6, 10, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
}
.logo > span { margin-left: 2px; }
.logo::first-letter { color: inherit; }
.logo b, .logo em { color: var(--accent); }
.nav-inner > .logo { color: var(--text); }
.nav-inner > .logo > em, .footer-left .logo > em { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
}
.nav-links a, .nav-donate {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.3s;
  padding: 4px 0;
}
.nav-links a::after, .nav-donate::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.nav-links a:hover, .nav-donate:hover { color: var(--text); }
.nav-links a:hover::after, .nav-donate:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-donate { color: var(--accent); }
.nav-github { display: flex; align-items: center; opacity: 0.75; transition: opacity 0.3s; }
.nav-github:hover { opacity: 1; }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 44px;
  height: 44px;
  align-items: center;
}
.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.3s;
}
html.menu-open .nav-burger span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
html.menu-open .nav-burger span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* 移动端全屏菜单 */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(4, 5, 9, 0.88);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 clamp(32px, 10vw, 80px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu li {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  transition-delay: calc(var(--i) * 0.07s + 0.1s);
}
.mobile-menu.open li { opacity: 1; transform: none; }
.mobile-menu li a, .mobile-menu li button {
  display: block;
  padding: 14px 0;
  font-size: clamp(32px, 8vw, 44px);
  font-weight: 800;
  color: var(--text);
}
.mobile-menu li a:hover { color: var(--accent); }
.mobile-menu-foot {
  position: absolute;
  bottom: 36px;
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 110px;
  padding-bottom: 90px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
}
.pulse-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(255, 140, 66, 0.7);
  animation: pulse-halo 2s ease-out infinite;
}
@keyframes pulse-halo {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

.hero-title { margin-top: 28px; }
.hero-hello {
  display: block;
  font-size: clamp(17px, 2.2vw, 22px);
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.name-mask { display: inline-block; overflow: hidden; vertical-align: bottom; }
.hero-name {
  display: inline-block;
  font-size: clamp(64px, 11vw, 148px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: 0.01em;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transform: translateY(115%) rotate(4deg);
  transition: transform 1.1s var(--ease) 0.18s;
  will-change: transform;
}
.hero-name.split-in { transform: none; }
.hero-name.split-in:hover { animation: hero-glitch 0.34s steps(1, end) 1; }
@keyframes hero-glitch {
  0% { text-shadow: 3px 0 rgba(255, 20, 60, 0.55), -3px 0 rgba(0, 220, 255, 0.5); }
  25% { text-shadow: -4px 1px rgba(255, 20, 60, 0.5), 4px -1px rgba(0, 220, 255, 0.45); }
  50% { text-shadow: 2px -1px rgba(255, 20, 60, 0.55), -2px 1px rgba(0, 220, 255, 0.5); }
  75% { text-shadow: -3px 0 rgba(255, 20, 60, 0.45), 3px 0 rgba(0, 220, 255, 0.4); }
  100% { text-shadow: none; }
}
.char-split .char-wrap .char.grad,
b.grad.char {
  display: inline-block;
}

.hero-type {
  margin-top: 18px;
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--sea);
  min-height: 1.8em;
}
.type-prompt { color: var(--accent); margin-right: 6px; }
.type-caret {
  display: inline-block;
  margin-left: 2px;
  animation: blink 1.05s step-end infinite;
  color: var(--sea);
}
@keyframes blink { 50% { opacity: 0; } }

.hero-desc {
  margin-top: 20px;
  max-width: 520px;
  font-size: 16.5px;
  color: var(--text-dim);
  line-height: 1.9;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  will-change: transform;
  transition: transform 0.3s var(--ease), box-shadow 0.3s,
    border-color 0.3s, color 0.3s, background-color 0.3s;
}
.btn-primary {
  background: var(--grad-accent);
  color: #1c0e01;
  box-shadow: var(--glow-orange);
}
.btn-primary:hover {
  box-shadow: 0 14px 52px rgba(255, 140, 66, 0.45);
  transform: translateY(-2px);
}
.btn-primary .btn-arrow { transition: transform 0.3s var(--ease); }
.btn-primary:hover .btn-arrow { transform: translateX(5px); }
.btn-ghost {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: rgba(255, 140, 66, 0.6);
  color: var(--accent-bright);
  transform: translateY(-2px);
}

/* 终端窗口 */
.terminal {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(16, 19, 31, 0.82), rgba(9, 11, 18, 0.94));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  overflow: hidden;
  will-change: transform;
}
.terminal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
}
.terminal-head .dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.terminal-title {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}
.terminal-body {
  padding: 20px 22px;
  min-height: 264px;
  font-size: 13.5px;
  line-height: 1.9;
}
.t-line { white-space: pre-wrap; word-break: break-all; }
.t-cmd { color: var(--text); }
.t-cmd::before { content: '$ '; color: var(--accent); font-weight: 700; }
.t-out { color: var(--text-dim); }
.t-ok { color: var(--ok); }
.t-key { color: var(--sea); }
.t-caret {
  display: inline-block;
  width: 8px;
  height: 15px;
  vertical-align: -2px;
  background: var(--accent);
  animation: blink 1s step-end infinite;
}

/* 向下滚动提示 */
.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
  transition: color 0.3s;
}
.scroll-hint:hover { color: var(--accent); }
.scroll-hint span { font-size: 10px; letter-spacing: 0.34em; }
.scroll-hint i {
  position: relative;
  width: 1px;
  height: 42px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.scroll-hint i::after {
  content: '';
  position: absolute;
  top: -40%;
  left: -1px;
  width: 3px;
  height: 40%;
  border-radius: 3px;
  background: var(--accent);
  animation: scroll-drop 2.2s var(--ease) infinite;
}
@keyframes scroll-drop {
  0% { top: -40%; }
  70%, 100% { top: 110%; }
}

/* ---------- 跑马灯 ---------- */
.marquee {
  position: relative;
  z-index: 2;
  width: 104vw;
  margin-left: -2vw;
  transform: rotate(-1.6deg);
  background: var(--grad-accent);
  box-shadow: 0 18px 60px rgba(255, 122, 40, 0.22);
  overflow: hidden;
  padding: 15px 0;
  margin-bottom: 30px;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 26s linear infinite;
}
.marquee-group {
  display: flex;
  align-items: center;
  gap: 30px;
  padding-right: 30px;
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #1c0e01;
  white-space: nowrap;
}
.marquee-group b { font-size: 0.62em; opacity: 0.8; }
.marquee-group .outline {
  color: transparent;
  -webkit-text-stroke: 1.2px #1c0e01;
}
@keyframes marquee {
  to { transform: translateX(calc(-100% / 2)); }
}

/* ---------- Section 公共 ---------- */
.section { position: relative; padding-block: clamp(90px, 11vw, 140px); }
.section-head { margin-bottom: clamp(44px, 6vw, 64px); }
.section-label {
  font-size: 12.5px;
  letter-spacing: 0.22em;
  color: var(--accent);
}
.section-title {
  margin-top: 14px;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
}
.section-desc {
  margin-top: 14px;
  max-width: 560px;
  color: var(--text-dim);
  font-size: 15.5px;
}

/* 渐显动画 */
html:not(.no-js) .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
html:not(.no-js) .reveal.in { opacity: 1; transform: none; }

.char-split .char-wrap { display: inline-block; overflow: hidden; vertical-align: bottom; }
.char-split .char {
  display: inline-block;
  transform: translateY(115%) rotate(4deg);
  transition: transform 1s var(--ease);
  transition-delay: var(--cd, 0s);
  will-change: transform;
}
.char-split.split-in .char { transform: none; }
.manifesto-text b { font-weight: 900; }
.manifesto-text .grad {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- 技能歌单 ---------- */
.playlist { display: grid; gap: 14px; counter-reset: track; }
.track {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(16px, 3vw, 28px);
  padding: 22px 28px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}
.track::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 3px;
  border-radius: 3px;
  background: var(--grad-accent);
  transform: scaleY(0);
  transition: transform 0.35s var(--ease);
}
/* hover 必须盖过 .reveal / .reveal.in 的 transform（specificity 更高），否则左移动画失效 */
.track.reveal:hover,
.track.reveal.in:hover,
.track:hover {
  transform: translateX(6px);
  border-color: rgba(255, 140, 66, 0.45);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.04));
}
.track:hover::before, .track.playing::before { transform: scaleY(1); }
.track:hover { box-shadow: 0 10px 34px rgba(0, 0, 0, 0.3); }
.track:hover .track-num { color: var(--accent); }
.track:hover .track-main p { color: var(--text-dim); }

/* 播放指示：hover 任意"未播放"的 track 时 ▶ 平滑浮现（常驻占位不跳版） */
.track-side { position: relative; }
.track:not(.playing) .track-side::before {
  content: '▶';
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  font-size: 11px;
  color: var(--accent);
  transition: transform 0.25s var(--ease);
}
.track:not(.playing):hover .track-side::before { transform: translateY(-50%) scale(1); }

.track-num { font-size: 13px; color: var(--text-faint); font-weight: 600; }
.track.playing .track-num { color: var(--accent); }

.track-main h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
}
.tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(77, 216, 255, 0.35);
  color: var(--sea);
}
.np-tag {
  display: none;
  font-size: 9px !important;
  letter-spacing: 0.18em;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 140, 66, 0.16);
  border: 1px solid rgba(255, 140, 66, 0.5);
  color: var(--accent-bright);
  animation: np-glow 2.4s ease-in-out infinite;
}
.track.playing .np-tag { display: inline-block; }
@keyframes np-glow {
  50% { background: rgba(255, 140, 66, 0.3); }
}
.track-main p { margin-top: 6px; font-size: 14px; color: var(--text-dim); }

.track-meter {
  margin-top: 14px;
  height: 4px;
  max-width: 320px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.track-meter i {
  display: block;
  height: 100%;
  width: var(--w, 50%);
  border-radius: 4px;
  background: var(--grad-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.3s var(--ease) 0.35s;
}
.track.in .track-meter i { transform: scaleX(1); }

.track-side { display: flex; align-items: center; gap: 16px; }
.track-time { font-size: 12.5px; color: var(--text-faint); }

.equalizer { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
.equalizer i {
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  animation: eq 0.9s ease-in-out infinite alternate;
  animation-play-state: paused;
}
.track.playing .equalizer i { animation-play-state: running; }
.track.playing.paused .equalizer i { animation-play-state: paused; }
.equalizer i:nth-child(1) { height: 55%; animation-delay: 0s; }
.equalizer i:nth-child(2) { height: 95%; animation-delay: 0.22s; }
.equalizer i:nth-child(3) { height: 70%; animation-delay: 0.1s; }
.equalizer i:nth-child(4) { height: 85%; animation-delay: 0.32s; }
@keyframes eq { to { transform: scaleY(0.35); } }
.track:not(.playing):hover .track-side::before {
  content: '▶';
  font-size: 11px;
  color: var(--accent);
}

/* ---------- 创意项目 ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
  transform-style: preserve-3d;
  will-change: transform;
}
.project-card.featured { grid-column: span 2; }

/* 鼠标聚光灯 */
.project-card.spotlight::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 140, 66, 0.13),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.project-card:hover::after { opacity: 1; }

/* 流光边框（Chromium/Firefox 现代版） */
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.2px;
  background: conic-gradient(
    from var(--ang, 0deg),
    transparent 0deg 292deg,
    rgba(255, 179, 71, 0.85) 330deg,
    rgba(255, 140, 66, 0.35) 350deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.project-card:hover::before { opacity: 1; }
.project-card:hover {
  border-color: rgba(255, 140, 66, 0.25);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

.project-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  font-size: 27px;
  border-radius: 15px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.045);
  transition: transform 0.4s var(--ease), border-color 0.4s;
}
.project-card:hover .project-icon {
  transform: translateY(-4px) scale(1.06) rotate(-4deg);
  border-color: rgba(255, 140, 66, 0.45);
}
.project-body { display: flex; flex-direction: column; flex-grow: 1; }
.project-body h3 { font-size: 19px; font-weight: 700; }
.project-body p {
  margin-top: 9px;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.85;
  flex-grow: 1;
}
.project-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
}
.chip {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
}
.live { color: var(--ok); letter-spacing: 0.1em; }
.visit {
  margin-left: auto;
  color: var(--accent);
  font-weight: 600;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.project-card:hover .visit { opacity: 1; transform: none; }

.ghost-card {
  border-style: dashed;
  background: transparent;
}
.ghost-card:hover { border-style: solid; }

/* ---------- 宣言 ---------- */
.manifesto { padding-block: clamp(70px, 9vw, 120px); }
.manifesto-text {
  font-size: clamp(42px, 7.2vw, 92px);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: 0.01em;
}
.manifesto-text .indent { display: inline-block; padding-left: clamp(56px, 12vw, 190px); }
.manifesto-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(36px, 6vw, 80px);
  margin-top: clamp(48px, 7vw, 76px);
}
.stat b {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(34px, 4.4vw, 48px);
  font-weight: 700;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}

/* ---------- 联系 ---------- */
.contact { text-align: center; }
.contact .section-label { display: block; }
.contact-title {
  margin-top: 14px;
  font-size: clamp(40px, 6.4vw, 76px);
  font-weight: 900;
  line-height: 1.15;
}
.contact-sub { margin-top: 14px; color: var(--text-dim); font-size: 16px; }
.email-link {
  position: relative;
  display: inline-block;
  margin-top: 34px;
  font-family: var(--font-mono);
  font-size: clamp(18px, 3vw, 27px);
  font-weight: 600;
  color: var(--text);
  background-image: linear-gradient(90deg, var(--accent-bright), var(--accent-deep));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2.5px;
  padding-bottom: 8px;
  transition: background-size 0.5s var(--ease), color 0.3s;
}
.email-link:hover {
  color: var(--accent-bright);
  background-size: 100% 2.5px;
}
.contact-actions { justify-content: center; margin-top: 44px; }

/* ---------- 页脚 ---------- */
footer { border-top: 1px solid var(--border); padding: 42px 0 50px; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 22px;
}
.footer-left p { margin-top: 8px; font-size: 13px; color: var(--text-faint); }
.footer-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(16px, 2.6vw, 28px);
  font-size: 12px;
  color: var(--text-faint);
}
.footer-right a, #donate-btn {
  color: var(--text-dim);
  transition: color 0.3s;
  font-family: var(--font-mono);
  font-size: 12px;
}
.footer-right a:hover, #donate-btn:hover { color: var(--accent); }
.status-online { display: inline-flex; align-items: center; gap: 8px; letter-spacing: 0.12em; }
.status-online .pulse-dot { width: 7px; height: 7px; }
.clock { font-variant-numeric: tabular-nums; letter-spacing: 0.1em; }

/* ---------- 返回顶部 ---------- */
.back-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 150;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(10, 12, 20, 0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text-dim);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.35s, transform 0.35s var(--ease), visibility 0.35s,
    border-color 0.3s, color 0.3s;
}
.back-top.show { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 赞赏弹窗 ---------- */
.donate-overlay {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 4, 8, 0.8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.donate-overlay.active { opacity: 1; }
.donate-overlay[hidden] { display: none; }
.donate-card {
  position: relative;
  width: min(340px, 100%);
  padding: 36px 30px 28px;
  text-align: center;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, #12151f, #0a0c14);
  box-shadow: var(--shadow-deep);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.35s var(--ease);
}
.donate-overlay.active .donate-card { transform: none; }
.donate-card h3 { font-size: 20px; font-weight: 700; }
.donate-card > p { margin-top: 8px; font-size: 13.5px; color: var(--text-dim); }
.donate-qr {
  width: 240px;
  height: auto;
  margin: 20px auto 0;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: #fff;
  padding: 8px;
}
.donate-tip { margin-top: 14px; font-size: 11px; color: var(--text-faint); letter-spacing: 0.08em; }
.donate-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 26px;
  line-height: 1;
  color: var(--text-faint);
  transition: color 0.3s, transform 0.3s;
}
.donate-close:hover { color: var(--text); transform: rotate(90deg); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card.featured { grid-column: span 2; }
}

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }

  .hero { padding-top: 132px; }
  .hero-inner { grid-template-columns: 1fr; }
  .terminal { max-width: 620px; }
  .scroll-hint { display: none; }

  .track { padding: 18px 20px; }
  .manifesto-text .indent { padding-left: clamp(32px, 8vw, 80px); }
}

@media (max-width: 620px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project-card.featured { grid-column: auto; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .track { grid-template-columns: 1fr; gap: 10px; }
  .track-side { justify-content: space-between; width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .marquee-group { font-size: 17px; gap: 20px; padding-right: 20px; }
}

/* ---------- 炫技增强：滚动驱动 / 翻牌 / 聚焦 / 导航 / 光晕 ---------- */

/* 环境光晕画布（磷光拖尾 + 点击声呐） */
#aura-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* 宣言滚动聚焦：进入视口时由模糊放大逐渐清晰 */
@supports (animation-timeline: view()) {
  .manifesto-text {
    animation: manifest-focus linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 72%;
  }
}
@keyframes manifest-focus {
  from { filter: blur(11px); opacity: 0.2; transform: scale(0.93); }
  to { filter: blur(0); opacity: 1; transform: scale(1); }
}

/* 章节标题滚动染色：文字从左到右被品牌橙填充 */
@supports (animation-timeline: view()) {
  .section-title {
    background: linear-gradient(90deg,
      var(--accent-bright) 0%, var(--accent) 40%,
      var(--text) 50%, var(--text) 100%);
    background-size: 220% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: title-fill linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 62%;
  }
}
@keyframes title-fill {
  from { background-position: 100% 0; }
  to { background-position: 0% 0; }
}

/* 项目卡 3D 翻牌入场（in 后 JS 移除 reveal，恢复默认 hover/tilt 手感） */
html:not(.no-js) .project-card.reveal {
  opacity: 0;
  transform: perspective(900px) rotateY(11deg) translateY(30px) scale(0.96);
  transform-origin: left center;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
html:not(.no-js) .project-card.reveal.in {
  opacity: 1;
  transform: none;
}

/* 歌单聚焦：hover 任意 track 时其余变暗 */
.playlist:hover .track:not(:hover) {
  opacity: 0.42;
  filter: saturate(0.35);
}
.track { transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s, opacity 0.35s, filter 0.35s; }

/* 歌单进度条 hover 流光 */
.track:hover .track-meter i {
  background: linear-gradient(100deg,
    var(--accent-deep) 30%, var(--accent-bright) 50%, var(--accent-deep) 70%);
  background-size: 220% 100%;
  animation: meter-sheen 1.1s linear infinite;
}
@keyframes meter-sheen {
  to { background-position: -220% 0; }
}

/* 章节导航圆点 */
.section-dots {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.section-dots a {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--text-faint);
  background: transparent;
  transition: transform 0.3s var(--ease), background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.section-dots a:hover { border-color: var(--accent); transform: scale(1.35); }
.section-dots a.active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.35);
  box-shadow: 0 0 12px rgba(255, 140, 66, 0.7);
}

/* 宣言统计数字：等宽防抖动 */
.manifesto-stats .stat b { font-variant-numeric: tabular-nums; }

@media (max-width: 880px), (pointer: coarse) {
  .section-dots { display: none; }
}

/* ---------- 粒子深海 / 歌单播放器 ---------- */

/* 磷光粒子层 */
#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
body.hero-passed #particle-canvas { opacity: 0.55; transition: opacity 0.7s ease; }

/* 播放中的 track：整体点亮 */
.track.playing {
  border-color: rgba(255, 140, 66, 0.5);
  background: linear-gradient(180deg, rgba(255, 140, 66, 0.09), rgba(255, 140, 66, 0.03));
  box-shadow: 0 14px 44px rgba(255, 140, 66, 0.16);
}
.track.playing .track-main h3 { color: var(--accent-bright); }
.track.playing .track-time { color: var(--accent); }
.track.playing .track-meter { background: rgba(255, 140, 66, 0.16); }
.track.playing .track-meter i { transition: none; }
.track.playing .track-side::before { content: '⏸'; }
.track.playing.paused .track-side::before { content: '▶'; }

/* ---------- 降低动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
  html:not(.no-js) .reveal,
  .char-split .char,
  .hero-name,
  .track-meter i { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}
