/* ============================================================
   LI PENG — IMAGE IS A SIGNAL
   galaxy backdrop / chrome angel / pixel typography / signal-red
   ============================================================ */
:root {
  --bg: #07070d;
  --bg-2: rgba(12, 12, 20, 0.55);
  --white: #f5f4f0;
  --muted: rgba(245, 244, 240, 0.78);
  --faint: rgba(245, 244, 240, 0.52);
  --line: rgba(245, 244, 240, 0.14);
  --red: #ff3333;
  --red-dim: rgba(255, 51, 51, 0.55);
  --gold: #e8b878;
  --chrome: linear-gradient(105deg, #8f96a3 0%, #e8ecf2 22%, #7d8494 42%, #f4f7fb 60%, #99a1af 78%, #dfe4ec 100%);
  --iris: linear-gradient(100deg, #6fb7ff 0%, #b48cff 34%, #ff8ad8 62%, #ffd9a0 100%);
  --sans: "Inter", "Noto Serif SC", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --pixel: "Silkscreen", "Fusion Pixel", "DM Mono", monospace;
  --mono: "DM Mono", "Fusion Pixel", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--red); color: #fff; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- galaxy backdrop: fixed, animated, scroll-shifting ---------- */
.galaxy-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); }
.galaxy-img {
  position: absolute; inset: -6%;
  width: 112%; height: 112%;
  object-fit: cover;
  opacity: 0.62;
  filter: saturate(1.15) brightness(0.9);
  transform-origin: 50% 40%;
  animation: galaxyDrift 90s ease-in-out infinite alternate;
  will-change: transform, filter;
}
.galaxy-nebula {
  position: absolute; inset: -12%;
  background:
    radial-gradient(52% 42% at 24% 30%, rgba(120, 90, 255, 0.2), transparent 70%),
    radial-gradient(46% 38% at 78% 62%, rgba(255, 90, 140, 0.15), transparent 70%),
    radial-gradient(38% 34% at 55% 18%, rgba(90, 180, 255, 0.17), transparent 70%);
  mix-blend-mode: screen;
  animation: nebulaBreath 9s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes nebulaBreath {
  0%, 100% { opacity: 0.55; transform: scale(0.96) translate(0, 0); }
  33% { opacity: 1; transform: scale(1.1) translate(1.5%, -2%); }
  66% { opacity: 0.75; transform: scale(1.02) translate(-1.5%, 1.5%); }
}
#nebula-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  mix-blend-mode: screen; pointer-events: none;
}
@keyframes galaxyDrift {
  0% { transform: scale(1.02) translate(0, 0) rotate(0deg); }
  50% { transform: scale(1.12) translate(-1.5%, 1.2%) rotate(0.6deg); }
  100% { transform: scale(1.06) translate(1.2%, -1%) rotate(-0.4deg); }
}
.galaxy-tint {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 7, 13, 0.55) 0%, rgba(7, 7, 13, 0.25) 40%, rgba(7, 7, 13, 0.6) 100%);
}
.galaxy-tint::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 30%, transparent 40%, rgba(7, 7, 13, 0.55) 100%);
}
.galaxy-stars { position: absolute; inset: 0; }
.galaxy-stars i {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: #fff; opacity: 0;
  animation: twinkle var(--tw, 4s) ease-in-out var(--td, 0s) infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  50% { opacity: 0.9; transform: scale(1.25); }
}
.galaxy-stars .meteor {
  position: absolute; width: 120px; height: 1.5px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), transparent);
  border-radius: 2px;
  transform: rotate(var(--mrot, -24deg));
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(160, 200, 255, 0.8));
  animation: meteor 11s linear var(--md, 3s) infinite;
}
@keyframes meteor {
  0% { opacity: 0; transform: rotate(var(--mrot, -24deg)) translateX(0); }
  2% { opacity: 1; }
  9% { opacity: 0.9; transform: rotate(var(--mrot, -24deg)) translateX(-46vw); }
  10%, 100% { opacity: 0; transform: rotate(var(--mrot, -24deg)) translateX(-50vw); }
}

/* ---------- atmosphere ---------- */
.noise {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  animation: grain 0.9s steps(2) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  50% { transform: translate(2%, -1%); }
  100% { transform: translate(-1%, 2%); }
}

/* ---------- custom cursor ---------- */
.cursor-dot, .cursor-glow { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor-dot {
    display: block; position: fixed; z-index: 999; width: 6px; height: 6px;
    border-radius: 50%; background: var(--red); pointer-events: none;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px 2px var(--red-dim);
  }
  .cursor-glow {
    display: block; position: fixed; z-index: 998; width: 120px; height: 120px;
    border-radius: 50%; pointer-events: none;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 51, 51, 0.06) 0%, rgba(140, 120, 255, 0.03) 45%, transparent 70%);
    mix-blend-mode: screen;
  }
}

/* ---------- target cursor (corner-bracket reticle) ---------- */
.target-cursor-wrapper { display: none; }
@media (hover: hover) and (pointer: fine) {
  .target-cursor-wrapper {
    display: block; position: fixed; top: 0; left: 0; width: 0; height: 0;
    pointer-events: none; z-index: 997;
  }
  .target-cursor-corner {
    position: absolute; left: 50%; top: 50%; width: 11px; height: 11px;
    border: 2px solid rgba(255, 51, 51, 0.85);
    filter: drop-shadow(0 0 4px rgba(255, 51, 51, 0.35));
    will-change: transform;
  }
  .corner-tl { transform: translate(-150%, -150%); border-right: none; border-bottom: none; }
  .corner-tr { transform: translate(50%, -150%); border-left: none; border-bottom: none; }
  .corner-br { transform: translate(50%, 50%); border-left: none; border-top: none; }
  .corner-bl { transform: translate(-150%, 50%); border-right: none; border-top: none; }
  /* locked onto a target: brighten corners, dim the trailing glow */
  .cursor-locked .target-cursor-corner { border-color: #ff3333; }
  .cursor-locked .cursor-glow { opacity: 0.35; }
}

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px;
  transition: opacity 0.7s ease, visibility 0.7s;
}
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-ring { width: 120px; height: 120px; transform: rotate(-90deg); }
.loader-ring circle { fill: none; stroke-width: 2; }
.ring-bg { stroke: var(--line); }
.ring-arc {
  stroke: var(--red);
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  filter: drop-shadow(0 0 6px var(--red-dim));
}
.loader-text { font-family: var(--pixel); font-size: 12px; letter-spacing: 0.3em; }
.loader-text span { color: var(--red); margin-left: 8px; }
.loader-sub { font-family: var(--mono); font-size: 9px; letter-spacing: 0.22em; color: var(--faint); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 72px; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between;
  mix-blend-mode: difference;
  font-family: var(--pixel);
  font-size: 11px; letter-spacing: 0.18em; font-weight: 700;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand i { font-style: normal; opacity: 0.4; }
.brand-mark { color: var(--red); font-size: 15px; animation: spin 9s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.nav nav { display: flex; gap: 34px; }
.nav nav a { position: relative; padding: 4px 0; opacity: 0.75; transition: opacity 0.3s; }
.nav nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--red);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s cubic-bezier(0.76, 0, 0.24, 1);
}
.nav nav a:hover { opacity: 1; }
.nav nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.download {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); padding: 10px 18px; border-radius: 999px;
  transition: background 0.35s, color 0.35s, border-color 0.35s;
}
.download b { font-weight: 400; color: var(--red); transition: transform 0.35s; }
.download:hover { background: var(--red); border-color: var(--red); color: #fff; }
.download:hover b { color: #fff; transform: translate(2px, -2px); }

/* ---------- main above galaxy ---------- */
main { position: relative; z-index: 1; }

/* ---------- hero ---------- */
.hero {
  position: relative; height: 100vh; min-height: 640px;
  overflow: hidden;
}
/* 底部压暗层：保证文案与模型拉开对比，桌面端默认隐藏（opacity 0），
   移动端在 media query 中打开 */
.hero::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 62%;
  background: linear-gradient(to top, rgba(6, 6, 12, 0.88) 0%, rgba(6, 6, 12, 0.55) 42%, transparent 100%);
  pointer-events: none; opacity: 0; transition: opacity 0.4s ease; z-index: 4;
}
.angel-stage { position: absolute; inset: 0; cursor: default; }
.angel-stage canvas { display: block; }
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 25% 25%;
  opacity: 0.14;
  mask-image: radial-gradient(ellipse at 50% 50%, transparent 30%, black 90%);
}
.hero-halo {
  position: absolute; left: 73%; top: 42%; width: 56vmin; height: 56vmin;
  transform: translate(-50%, -50%); pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 51, 51, 0.13) 0%, rgba(180, 140, 255, 0.08) 42%, transparent 68%);
  mix-blend-mode: screen;
  animation: halo 7s ease-in-out infinite;
}
@keyframes halo {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
  50% { transform: translate(-50%, -52%) scale(1.06); opacity: 1; }
}

.hero-copy {
  position: absolute; left: 40px; bottom: 96px; z-index: 5;
  max-width: 820px; pointer-events: none;
}
.hero-copy a, .hero-copy button { pointer-events: auto; }
.kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.34em;
  color: var(--muted); margin-bottom: 26px;
}
.kicker span { border-left: 2px solid var(--red); padding-left: 14px; }
.hero-title {
  font-family: var(--pixel);
  font-size: clamp(34px, 5.1vw, 80px);
  line-height: 1.12; letter-spacing: 0.01em; font-weight: 700;
  text-transform: uppercase;
  text-shadow: 0 3px 30px rgba(4, 4, 10, 0.65), 0 0 60px rgba(120, 130, 255, 0.18);
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .char { display: inline-block; transform: translateY(110%); will-change: transform; }
.hero-title .serif { position: relative; z-index: 6; }
.hero-title .serif .char {
  background: var(--chrome);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(4, 4, 10, 0.9)) drop-shadow(0 0 14px rgba(230, 238, 250, 0.35));
}
.hero-intro {
  margin-top: 30px; font-size: 15px; line-height: 2.1;
  color: var(--muted); font-weight: 600; letter-spacing: 0.02em;
}
.hero-actions { margin-top: 34px; }
.action-row { display: flex; gap: 14px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 11px var(--pixel); letter-spacing: 0.18em;
  padding: 15px 26px; border-radius: 999px; cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.35s, color 0.35s, border-color 0.35s, box-shadow 0.35s;
}
.pill i { font-style: normal; transition: transform 0.35s; }
.pill-solid { background: var(--white); color: #0a0a0f; border: 1px solid var(--white); }
.pill-solid:hover { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 8px 40px rgba(255, 51, 51, 0.35); transform: translateY(-2px); }
.pill-solid:hover i { transform: translateY(3px); }
.pill-ghost { background: rgba(10, 10, 16, 0.4); backdrop-filter: blur(6px); color: var(--white); border: 1px solid var(--line); }
.pill-ghost:hover { border-color: var(--red); color: var(--red); transform: translateY(-2px); }
.pill-ghost.is-dark { color: var(--gold); border-color: rgba(232, 184, 120, 0.4); }

.hero-meta {
  position: absolute; right: 40px; bottom: 96px; z-index: 5;
  display: flex; flex-direction: column; gap: 12px; align-items: flex-end;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.26em; color: var(--faint);
}
.hero-orbit {
  position: absolute; right: 40px; top: 50%; z-index: 5;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.3em; color: var(--faint);
  writing-mode: vertical-rl;
}
.hero-orbit b { color: var(--red); writing-mode: horizontal-tb; animation: spin 6s linear infinite; }

.reveal-line { overflow: hidden; }
.reveal-line > span, .reveal-line .action-row {
  display: block; transform: translateY(110%);
  transition: transform 1.1s cubic-bezier(0.76, 0, 0.24, 1);
}
.hero.is-live .reveal-line > span, .hero.is-live .reveal-line .action-row { transform: translateY(0); }
.hero.is-live .kicker > span { transition-delay: 0.7s; }
.hero.is-live .hero-intro > span { transition-delay: 1.35s; }
.hero.is-live .hero-actions .action-row { transition-delay: 1.5s; }

/* ---------- shared section chrome ---------- */
.section {
  position: relative; padding: 150px 40px;
  background: var(--bg-2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.section-index {
  font-family: var(--pixel); font-size: 11px; letter-spacing: 0.26em; color: var(--faint);
  border-top: 1px solid var(--line); padding-top: 16px; margin-bottom: 70px;
}
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  border-top: 1px solid var(--line); padding-top: 16px; margin-bottom: 70px;
}
.section-head .section-index { border: 0; padding: 0; margin: 0; }
.section-head p { font-family: var(--mono); font-size: 9px; letter-spacing: 0.26em; color: var(--faint); }

[data-reveal] {
  opacity: 0; transform: translateY(30px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
}
[data-reveal].in-view { opacity: 1; transform: translateY(0); }
[data-reveal-group] > * {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal-group].in-view > * { opacity: 1; transform: translateY(0); }
[data-reveal-group].in-view > *:nth-child(1) { transition-delay: 0.05s; }
[data-reveal-group].in-view > *:nth-child(2) { transition-delay: 0.15s; }
[data-reveal-group].in-view > *:nth-child(3) { transition-delay: 0.25s; }
[data-reveal-group].in-view > *:nth-child(4) { transition-delay: 0.35s; }
[data-reveal-group].in-view > *:nth-child(5) { transition-delay: 0.45s; }

/* absolute CSS fallback: if the script never ran (body lacks .js-alive after load),
   reveal everything on a pure-CSS timer — the page can never stay blank. */
@keyframes reveal-failsafe { to { opacity: 1; transform: none; } }
body:not(.js-alive) [data-reveal],
body:not(.js-alive) [data-reveal-group] > * {
  animation: reveal-failsafe 0.6s ease 3s forwards;
}

/* ---------- tarot deck stage (works) ---------- */
.tarot-stage {
  position: relative; height: 640px; margin: 0 auto; max-width: 1500px;
}
/* ---------- 作品分类筛选 ---------- */
.tarot-filter {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 10px;
  margin: 6px auto 18px; max-width: 900px;
}
.tf-btn {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
  color: var(--muted); background: transparent;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; cursor: pointer;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.tf-btn i { font-style: normal; color: var(--faint); margin-left: 5px; font-size: 9px; }
.tf-btn:hover { color: var(--white); border-color: var(--muted); }
.tf-btn.is-active { color: #fff; background: var(--red); border-color: var(--red); }
.tf-btn.is-active i { color: rgba(255,255,255,0.7); }
@media (max-width: 720px) {
  .tarot-filter { gap: 7px; margin-bottom: 12px; }
  .tf-btn { font-size: 9px; padding: 6px 10px; }
}
.tarot-hint {
  position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em; color: var(--faint);
  pointer-events: none; white-space: nowrap;
}
.tarot-card {
  position: absolute; left: 0; top: 0; width: 132px; height: 192px; border-radius: 12px;
  overflow: hidden; cursor: grab; user-select: none; -webkit-user-select: none;
  touch-action: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.07), 0 10px 24px rgba(0,0,0,0.5), 0 0 14px rgba(218,165,32,0.1);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}
.tarot-card:active { cursor: grabbing; }
.tarot-card:focus-visible {
  outline: 2px solid rgba(255, 215, 0, 0.85);
  outline-offset: 3px;
  z-index: 99 !important;
  box-shadow: 0 0 0 1px rgba(255,215,0,0.35), 0 16px 32px rgba(0,0,0,0.6), 0 0 22px rgba(218,165,32,0.45);
}
.tarot-card.dragging { transition: none !important; }
.tarot-card:hover:not(.dragging) {
  z-index: 99 !important;
  box-shadow: 0 0 0 1px rgba(255,215,0,0.25), 0 16px 32px rgba(0,0,0,0.6), 0 0 20px rgba(218,165,32,0.35);
}
.tarot-card .tc-cover {
  position: absolute; inset: 0; background-size: cover; background-position: center top;
}
.tarot-card .tc-frame {
  position: absolute; inset: 8px; border: 1.5px solid rgba(218,165,32,0.4);
  border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1); pointer-events: none;
}
.tarot-card .tc-frame::before, .tarot-card .tc-frame::after {
  content: ""; position: absolute; width: 16px; height: 16px; border: 1.5px solid rgba(218,165,32,0.5);
}
.tarot-card .tc-frame::before { top: 5px; left: 5px; border-right: none; border-bottom: none; border-radius: 3px 0 0 0; }
.tarot-card .tc-frame::after { bottom: 5px; right: 5px; border-left: none; border-top: none; border-radius: 0 0 3px 0; }
.tarot-card .tc-num {
  position: absolute; top: 12px; left: 12px; font-family: var(--pixel); font-size: 12px;
  color: #ffd977; text-shadow: 0 0 6px rgba(0,0,0,0.9); pointer-events: none;
}
.tarot-card .tc-label {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  max-width: 88%; color: #fff8dc; font-size: 10px; letter-spacing: 0.5px; text-align: center;
  text-shadow: 0 0 6px rgba(0,0,0,0.9); background: rgba(0,0,0,0.5);
  padding: 4px 9px; border-radius: 999px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; pointer-events: none;
}
@media (max-width: 720px) {
  .tarot-stage { height: 520px; }
  .tarot-card { width: 92px; height: 136px; }
  .tarot-card .tc-label { font-size: 8px; padding: 3px 6px; bottom: 8px; }
  .tarot-card .tc-num { font-size: 9px; top: 9px; left: 9px; }
}

/* ---------- about / manifesto ---------- */
.manifesto {
  display: grid; grid-template-columns: 1fr minmax(0, 760px) 240px;
  gap: 60px; align-items: start;
}
.manifesto .section-index { grid-column: 1 / -1; margin-bottom: 10px; }
.manifesto-copy { grid-column: 2; }
.manifesto-photo { grid-column: 3; }
.manifesto-copy .statement {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 44px); line-height: 1.65;
  font-weight: 700; letter-spacing: 0.01em;
}
.statement strong {
  font-weight: 800;
  background: var(--iris);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.manifesto-copy .muted { margin-top: 34px; font-size: 15px; line-height: 2.2; color: var(--muted); max-width: 620px; font-weight: 500; }
.facts {
  margin-top: 60px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.facts > div { background: rgba(10, 10, 16, 0.5); padding: 22px 20px 26px; transition: background 0.4s; }
.facts > div:hover { background: rgba(20, 20, 30, 0.7); }
.facts span { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: 0.26em; color: var(--red); margin-bottom: 12px; }
.facts b { font-size: 14px; font-weight: 700; }
.edu { margin-top: 46px; border-left: 2px solid var(--red); padding-left: 24px; }
.edu-head { display: flex; gap: 18px; align-items: baseline; margin-bottom: 12px; }
.edu-head span { font-family: var(--mono); font-size: 9px; letter-spacing: 0.3em; color: var(--faint); }
.edu-head b { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--red); font-weight: 500; }
.edu p { font-size: 14px; line-height: 2.1; color: var(--muted); font-weight: 500; }
.edu p b { color: var(--white); font-size: 16px; }
.manifesto-photo { position: sticky; top: 120px; }
.manifesto-photo img {
  aspect-ratio: 1; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: 0 0 0 10px rgba(245, 244, 240, 0.03), 0 0 80px rgba(255, 51, 51, 0.12);
}
/* 3d avatar replaces the photo — spaceship porthole observation window */
.avatar3d-circle {
  position: relative; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 90% 60% at 50% 90%, rgba(255, 138, 66, 0.16), transparent 62%),
    radial-gradient(ellipse 120% 90% at 50% 0%, rgba(120, 140, 255, 0.12), transparent 65%);
  box-shadow: 0 0 0 10px rgba(245, 244, 240, 0.03), 0 0 80px rgba(255, 51, 51, 0.12);
}
/* metal hull ring with bolts + inner shadow depth */
.porthole-ring {
  position: absolute; inset: -4.5%; border-radius: 50%; pointer-events: none; z-index: 3;
  background:
    conic-gradient(from 210deg,
      #3d434e 0deg, #787f8c 38deg, #424855 92deg,
      #9aa1ad 152deg, #3a404b 208deg, #6b727f 262deg,
      #474d59 312deg, #3d434e 360deg);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 10px 34px rgba(0, 0, 0, 0.5),
    0 0 46px rgba(120, 140, 255, 0.10);
  /* cut the window: keep only the outer metal band */
  -webkit-mask: radial-gradient(circle, transparent 60.5%, #000 61.5%);
  mask: radial-gradient(circle, transparent 60.5%, #000 61.5%);
}
/* bolt heads around the ring */
.porthole-ring i {
  position: absolute; top: 50%; left: 50%;
  width: 3.6%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #d7dce4, #565d69 62%, #242932);
  box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.6), 0 1px 1px rgba(255, 255, 255, 0.18);
  transform: translate(-50%, -50%) rotate(var(--a)) translateY(-46.5cqw);
}
.avatar3d-circle { container-type: inline-size; }
.porthole-ring i:nth-child(1) { --a: 0deg; }
.porthole-ring i:nth-child(2) { --a: 45deg; }
.porthole-ring i:nth-child(3) { --a: 90deg; }
.porthole-ring i:nth-child(4) { --a: 135deg; }
.porthole-ring i:nth-child(5) { --a: 180deg; }
.porthole-ring i:nth-child(6) { --a: 225deg; }
.porthole-ring i:nth-child(7) { --a: 270deg; }
.porthole-ring i:nth-child(8) { --a: 315deg; }
/* window lip + curved glass glare */
.porthole-glass {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: 2;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.6),
    inset 0 6px 18px rgba(0, 0, 0, 0.55),
    inset 0 -10px 26px rgba(4, 6, 12, 0.5),
    inset 0 0 42px rgba(0, 0, 0, 0.28);
}
.porthole-glass::before {
  content: ''; position: absolute; left: 9%; top: 5%;
  width: 52%; height: 30%; border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.20), rgba(255, 255, 255, 0.02) 70%);
  transform: rotate(-16deg);
  filter: blur(1px);
}
.porthole-glass::after {
  content: ''; position: absolute; right: 12%; bottom: 8%;
  width: 30%; height: 16%; border-radius: 50%;
  background: linear-gradient(315deg, rgba(140, 165, 255, 0.10), transparent 70%);
  transform: rotate(-12deg);
}
#about3d {
  position: absolute; inset: 0; cursor: pointer; z-index: 1;
  border-radius: 50%; overflow: hidden;
}
#about3d canvas { width: 100% !important; height: 100% !important; display: block; }
.manifesto-photo figcaption {
  margin-top: 18px; display: flex; justify-content: center; gap: 12px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.3em; color: var(--faint);
}
.manifesto-photo figcaption b { color: var(--red); }

/* ---------- visual code mood grid ---------- */
.mood-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.mood-card { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #000; }
.mood-card::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.45s;
}
.mood-card::after {
  content: ""; position: absolute; left: 0; top: 0; z-index: 3;
  width: 100%; height: 2px; background: var(--red);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.55s cubic-bezier(0.76, 0, 0.24, 1);
}
.mood-card img {
  filter: saturate(0.82) brightness(0.9);
  transition: filter 0.6s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.mood-card:hover img { filter: saturate(1.15) brightness(1); transform: scale(1.045); }
.mood-card:hover::before { box-shadow: inset 0 0 0 1px rgba(255, 51, 51, 0.5); }
.mood-card:hover::after { transform: scaleX(1); }
.mood-card figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  padding: 18px;
  display: flex; align-items: baseline; gap: 12px;
  font-family: var(--pixel);
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  transform: translateY(8px); opacity: 0.85;
  transition: transform 0.5s, opacity 0.5s;
}
.mood-card:hover figcaption { transform: translateY(0); opacity: 1; }
.mood-card figcaption span { font-family: var(--mono); font-size: 9px; color: var(--red); }

/* ---------- works ---------- */
.works-grid[hidden] { display: none !important; }

.works-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px;
  max-width: 1500px; margin: 0 auto;
}
.work-card {
  position: relative; aspect-ratio: 9 / 16; overflow: hidden;
  background: #000; cursor: pointer;
}
.work-card--wide { aspect-ratio: 16 / 9; grid-column: span 2; }
.work-card::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.45s;
}
.work-card img {
  filter: saturate(0.85) brightness(0.88);
  transition: filter 0.6s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-card:hover img { filter: saturate(1.1) brightness(1); transform: scale(1.05); }
.work-card:hover::before { box-shadow: inset 0 0 0 1px rgba(255, 51, 51, 0.5); }
.work-card figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  padding: 14px;
  font-family: var(--pixel);
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  transform: translateY(6px); opacity: 0.85;
  transition: transform 0.5s, opacity 0.5s;
}
.work-card:hover figcaption { transform: translateY(0); opacity: 1; }
.work-card figcaption span { font-family: var(--mono); font-size: 9px; color: var(--red); display: block; margin-bottom: 6px; }
.play-hint {
  position: absolute; top: 12px; right: 12px; z-index: 4;
  font-family: var(--mono); font-size: 8px; letter-spacing: 0.22em;
  color: var(--white); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; background: rgba(10, 10, 16, 0.5); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 0.4s, border-color 0.4s, color 0.4s;
}
.work-card:hover .play-hint { opacity: 1; color: var(--red); border-color: rgba(255, 51, 51, 0.45); }

/* ---------- video overlay ---------- */
.video-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(5, 5, 10, 0.88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s;
}
.video-overlay.is-open { opacity: 1; visibility: visible; }
.video-frame { position: relative; height: min(88vh, 900px); aspect-ratio: 9 / 16; }
.video-frame.is-wide { height: auto; width: min(88vw, 1200px); aspect-ratio: 16 / 9; }
.video-frame video {
  width: 100%; height: 100%; object-fit: contain;
  background: #000; border-radius: 6px;
  box-shadow: 0 0 0 1px var(--line), 0 30px 120px rgba(0, 0, 0, 0.6);
}
.video-close {
  position: absolute; top: -52px; right: 0;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent;
  color: var(--white); font-size: 20px; line-height: 1; cursor: pointer;
  transition: color 0.3s, border-color 0.3s, transform 0.3s;
}
.video-close:hover { color: var(--red); border-color: var(--red); transform: rotate(90deg); }

/* ---------- experience ---------- */
.timeline { border-bottom: 1px solid var(--line); }
.job {
  position: relative;
  display: grid; grid-template-columns: 220px 1fr 140px;
  gap: 40px; align-items: start;
  border-top: 1px solid var(--line);
  padding: 56px 0 64px;
  transition: background 0.5s;
}
.job:hover { background: linear-gradient(90deg, rgba(255, 51, 51, 0.05), transparent 55%); }
.job-date {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  color: var(--muted); padding-top: 10px;
}
.job h2 { font-size: clamp(20px, 2.4vw, 30px); font-weight: 800; letter-spacing: -0.01em; }
.job h3 { margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--red); letter-spacing: 0.06em; }
.job h3 span { color: var(--faint); font-weight: 400; }
.job ul { margin-top: 26px; display: grid; gap: 12px; max-width: 640px; }
.job li {
  position: relative; padding-left: 26px;
  font-size: 14px; line-height: 2.0; color: var(--muted); font-weight: 500;
}
.job li::before {
  content: ""; position: absolute; left: 0; top: 13px;
  width: 12px; height: 1px; background: var(--red);
  transition: width 0.4s;
}
.job:hover li::before { width: 18px; }
.tags { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px; }
.tags span {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em;
  color: var(--faint); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 999px;
  transition: color 0.35s, border-color 0.35s;
}
.job:hover .tags span { color: var(--muted); border-color: rgba(255, 51, 51, 0.35); }
.job-number {
  font-family: var(--pixel); font-weight: 700;
  font-size: clamp(44px, 5.4vw, 84px); line-height: 1;
  text-align: right;
  background: var(--chrome);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  opacity: 0.35; transition: opacity 0.5s, transform 0.5s;
}
.job:hover .job-number { opacity: 1; transform: translateX(-6px); }

/* ---------- skills ---------- */
.skills-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 100px; align-items: start; }
.skill-stack { display: grid; gap: 34px; }
.skill { display: grid; grid-template-columns: 1fr 46px; gap: 12px 18px; align-items: center; }
.skill span { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; }
.skill b { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--red); text-align: right; }
.skill i {
  grid-column: 1 / -1; height: 2px; background: var(--line);
  position: relative; display: block;
}
.skill i::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 0;
  background: linear-gradient(90deg, #c9cfd9, var(--white) 55%, var(--red));
  box-shadow: 0 0 12px rgba(255, 51, 51, 0.35);
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.skill-stack.in-view .skill i::after { width: var(--w); }
.soft-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.3em; color: var(--faint); margin-bottom: 22px; }
.soft-list { font-family: var(--pixel); font-size: clamp(18px, 2vw, 26px); font-weight: 700; letter-spacing: 0.04em; }
.soft-list b { color: var(--red); font-weight: 400; margin: 0 6px; }
.soft-list.dim { margin-top: 10px; color: var(--muted); font-size: clamp(14px, 1.6vw, 19px); }
.soft-note { margin-top: 40px; font-size: 13.5px; line-height: 2.1; color: var(--muted); font-weight: 500; border-top: 1px solid var(--line); padding-top: 26px; }
.temperament { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px; }
.temperament span {
  font-size: 11px; font-weight: 700; letter-spacing: 0.2em;
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 20px;
  color: var(--muted);
  transition: color 0.35s, border-color 0.35s, transform 0.35s;
}
.temperament span:hover { color: var(--gold); border-color: rgba(232, 184, 120, 0.45); transform: translateY(-2px); }

/* ---------- contact ---------- */
.contact {
  position: relative; overflow: hidden;
  padding: 180px 40px 0;
  background: var(--bg-2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.contact-orb { display: none; }   /* 已被右上角唱片机取代 */
.contact-line { position: absolute; left: -8%; bottom: 34%; width: 52%; transform: rotate(-9deg); }
.contact-line span { display: block; height: 1px; background: linear-gradient(90deg, transparent, var(--red), transparent); width: 0; }
@keyframes wipe { to { width: 100%; } }
.contact.in-view .contact-line span { animation: wipe 2.4s cubic-bezier(0.76, 0, 0.24, 1) 0.4s forwards; }
.contact-content { position: relative; z-index: 2; }
.contact-title {
  font-size: clamp(40px, 6.2vw, 96px); line-height: 1.3;
  font-weight: 800; letter-spacing: -0.02em; margin-bottom: 90px;
}
.contact-title em {
  font-style: normal; font-weight: 500;
  background: var(--iris);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
/* pixel/arcade variant for the closing line */
.contact-title em.pixel-line {
  font-family: var(--pixel); font-weight: 700; font-style: normal;
  font-size: 0.62em; letter-spacing: 0.04em; line-height: 1.5;
  background: var(--iris);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  text-shadow: none;
  image-rendering: pixelated;
}
.pixel-cursor {
  display: inline-block; margin-left: 0.12em; font-size: 0.9em;
  -webkit-text-fill-color: currentColor; color: #c9b8ff;
  animation: pixel-blink 0.9s steps(1) infinite;
  vertical-align: baseline;
}
@keyframes pixel-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); max-width: 900px; }
.contact-grid a {
  position: relative; background: rgba(10, 10, 16, 0.55); padding: 34px 30px 40px;
  display: grid; gap: 14px; overflow: hidden;
  transition: background 0.45s;
}
.contact-grid a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
}
.contact-grid a:hover { background: rgba(18, 18, 28, 0.8); }
.contact-grid a:hover::after { transform: scaleX(1); }
.contact-grid span { font-family: var(--mono); font-size: 9px; letter-spacing: 0.3em; color: var(--red); }
.contact-grid b { font-size: clamp(16px, 2vw, 24px); font-weight: 700; letter-spacing: 0.02em; }
.contact-grid i {
  position: absolute; right: 26px; top: 30px; font-style: normal; color: var(--faint);
  transition: transform 0.4s, color 0.4s;
}
.contact-grid a:hover i { transform: translate(4px, -4px); color: var(--red); }
.interests { margin-top: 70px; display: flex; align-items: center; gap: 34px; flex-wrap: wrap; }
.int-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.3em; color: var(--faint); }
.int-list { display: flex; gap: 30px; flex-wrap: wrap; }
.int-list span {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; color: var(--muted);
  transition: color 0.35s;
}
.int-list span:hover { color: var(--white); }
.int-list svg { width: 20px; height: 20px; color: var(--red); }

/* ---------- 像素风唱片机（尾页右上角，替换原圆锥） ---------- */
.turntable {
  position: absolute;
  right: 5%; top: 8%;
  z-index: 3;
  width: 116px; height: 116px;
  background: rgba(16, 16, 20, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.35s, box-shadow 0.35s, transform 0.2s;
}
.turntable:hover { border-color: var(--red); box-shadow: 0 0 24px rgba(232, 64, 42, 0.18); transform: translateY(-2px); }
.turntable:active { transform: translateY(0) scale(0.97); }
.tt-platter {
  position: absolute; left: 50%; top: 50%;
  width: 80px; height: 80px;
  transform: translate(-50%, -50%);
}
.tt-vinyl {
  width: 100%; height: 100%; display: block;
  /* 转动：默认暂停，.is-on 时旋转 */
  animation: tt-spin 2.6s linear infinite;
  animation-play-state: paused;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}
.turntable.is-on .tt-vinyl { animation-play-state: running; }
@keyframes tt-spin { to { transform: rotate(360deg); } }
/* 唱臂 */
.tt-arm {
  position: absolute; right: 8px; top: 8px;
  width: 34px; height: 34px;
  transform-origin: 26px 8px;                    /* 绕支点旋转 */
  transform: rotate(-30deg);                     /* 抬起（离开唱片） */
  transition: transform 0.7s cubic-bezier(0.34, 1.3, 0.5, 1);
  z-index: 2;
}
.turntable.is-on .tt-arm { transform: rotate(6deg); }   /* 落下压到唱片边缘 */
.tt-arm-pivot {
  position: absolute; right: 0; top: 0;
  width: 14px; height: 14px; border-radius: 50%;
  background: #2a2a32; border: 1px solid #3a3a44;
}
.tt-arm-rod {
  position: absolute; right: 5px; top: 6px;
  width: 3px; height: 66px;
  background: linear-gradient(#4a4a55, #34343c);
  border-radius: 2px;
  transform-origin: top center;
  transform: rotate(16deg);
}
.tt-arm-head {
  position: absolute; right: -8px; top: 62px;
  width: 11px; height: 8px;
  background: var(--red);
  border-radius: 2px;
  transform: rotate(16deg);
}
/* 均衡器（播放时跳动） */
.tt-eq {
  position: absolute; left: 10px; bottom: 9px;
  display: flex; align-items: flex-end; gap: 3px;
  height: 14px;
}
.tt-eq i {
  width: 3px; height: 4px;
  background: var(--red);
  opacity: 0.25;
  transition: opacity 0.3s;
}
.turntable.is-on .tt-eq i { opacity: 0.9; animation: tt-eq 0.9s ease-in-out infinite; }
.turntable.is-on .tt-eq i:nth-child(1) { animation-delay: 0s; }
.turntable.is-on .tt-eq i:nth-child(2) { animation-delay: 0.22s; }
.turntable.is-on .tt-eq i:nth-child(3) { animation-delay: 0.45s; }
.turntable.is-on .tt-eq i:nth-child(4) { animation-delay: 0.1s; }
@keyframes tt-eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.tt-label {
  position: absolute; left: 0; right: 0; bottom: -26px;
  text-align: center;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em;
  color: var(--faint);
  transition: color 0.3s;
  white-space: nowrap;
}
.turntable:hover .tt-label { color: var(--muted); }
.turntable.is-on .tt-label { color: var(--red); }
.contact footer {
  margin-top: 110px; border-top: 1px solid var(--line);
  padding: 30px 0 34px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.26em; color: var(--faint);
}
.contact footer a { transition: color 0.3s; }
.contact footer a:hover { color: var(--red); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .section { padding: 110px 28px; }
  .nav { padding: 0 28px; }
  .hero-copy { left: 28px; right: 28px; }
  .hero-meta { display: none; }
  .manifesto { grid-template-columns: 1fr; gap: 50px; }
  .manifesto-photo { position: static; max-width: 220px; }
  .mood-grid { grid-template-columns: repeat(2, 1fr); }
  .works-grid { grid-template-columns: repeat(4, 1fr); }
  .job { grid-template-columns: 150px 1fr; }
  .job-number { display: none; }
  .skills-layout { grid-template-columns: 1fr; gap: 70px; }
}
@media (max-width: 720px) {
  .section { padding: 90px 20px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .nav { padding: 0 20px; height: 60px; }
  .nav nav { display: none; }
  .hero { min-height: 560px; }
  .hero::after { opacity: 1; }
  .hero-halo { left: 50%; top: 34%; width: 78vmin; height: 78vmin; }
  .hero-copy { left: 20px; right: 20px; bottom: 70px; z-index: 5; }
  .hero-title { font-size: clamp(34px, 9.6vw, 56px); }
  .hero-orbit { display: none; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .job { grid-template-columns: 1fr; gap: 20px; padding: 44px 0 50px; }
  .job-date { padding-top: 0; }
  .contact { padding: 120px 20px 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .works-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .galaxy-img { opacity: 0.42; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .noise, .brand-mark, .hero-orbit b, .contact-orb, .hero-halo, .galaxy-img, .galaxy-stars i { animation: none; }
  [data-reveal], [data-reveal-group] > *, .reveal-line > span, .reveal-line .action-row { transition-duration: 0.01s; }
  .hero-title .char { transform: none; }
}
