/* ════════════════════════════════════════════
   奇点站 SINGULARITY STATION · 006
   palette: 虚空靛黑 / 离子青 / 耀斑橙 / 星尘白
   ════════════════════════════════════════════ */

:root {
  --void:   #05060e;
  --void-2: #0a0d1c;
  --ion:    #66e8ff;
  --flare:  #ffb454;
  --violet: #7b6cff;
  --star:   #e9edf8;
  --ti:     #8b94ae;
  --line:   rgba(122, 142, 190, .18);
  --panel:  rgba(9, 12, 26, .82);

  --f-disp: "ZCOOL QingKe HuangYou", "Microsoft YaHei", sans-serif;
  --f-lat:  "Unbounded", "Arial Black", sans-serif;
  --f-body: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --f-mono: "IBM Plex Mono", Consolas, "Noto Sans SC", "Microsoft YaHei", monospace;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

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

html { scroll-behavior: auto; }

body {
  background: var(--void);
  color: var(--star);
  font-family: var(--f-body);
  font-weight: 300;
  line-height: 1.9;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ion); color: var(--void); }

a { color: inherit; text-decoration: none; }
a, .btn { touch-action: manipulation; }

:focus-visible {
  outline: 2px solid var(--flare);
  outline-offset: 3px;
  border-radius: 2px;
}
.sec:focus { outline: none; }

.mono { font-family: var(--f-mono); letter-spacing: .08em; }
.ion   { color: var(--ion); }
.flare { color: var(--flare); font-weight: 500; }

/* ── 3D 画布与氛围罩 ─────────────────── */
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.022) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 120% 90% at 50% 45%, transparent 55%, rgba(2, 3, 9, .75) 100%);
}

/* ── 启动序列 ─────────────────────────── */
.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--void);
  display: grid;
  place-items: center;
  transition: opacity .9s ease, visibility .9s;
}
.boot.done { opacity: 0; visibility: hidden; pointer-events: none; }

.boot-core { width: min(420px, 78vw); }

.boot-title {
  font-size: 11px;
  color: var(--ti);
  margin-bottom: 18px;
}

.boot-pct {
  font-family: var(--f-lat);
  font-weight: 700;
  font-size: clamp(56px, 10vw, 96px);
  line-height: 1;
  color: var(--star);
  margin-bottom: 18px;
  font-variant-numeric: tabular-nums;
}

.boot-bar {
  height: 2px;
  background: var(--line);
  margin-bottom: 22px;
  overflow: hidden;
}
.boot-bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--ion), var(--violet));
  box-shadow: 0 0 12px var(--ion);
}

.boot-log {
  font-size: 11px;
  color: var(--ti);
  min-height: 7.2em;
  line-height: 1.8;
  white-space: pre-line;
}
.boot-log .ok { color: var(--ion); }

/* ── HUD 顶栏 ─────────────────────────── */
.hud-top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px clamp(20px, 4vw, 48px);
  background: linear-gradient(to bottom, rgba(5, 6, 14, .8), transparent);
  pointer-events: none;
}
.hud-top a { pointer-events: auto; }

.hud-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hud-logo-image {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: contain;
}
.hud-logo-mark {
  width: 12px; height: 12px;
  border: 1.5px solid var(--ion);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 10px rgba(102, 232, 255, .6);
}
.hud-logo-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--ion);
  animation: pulse 2.4s ease-in-out infinite;
}
.hud-logo-text {
  font-family: var(--f-lat);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .18em;
}
.hud-logo-text em {
  font-style: normal;
  color: var(--ti);
  font-weight: 500;
  font-size: 11px;
}

.hud-nav { display: flex; gap: clamp(18px, 3vw, 40px); }
.hud-nav a {
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: .22em;
  color: var(--ti);
  padding: 4px 2px;
  position: relative;
  text-align: center;
  transition: color .3s;
}
.hud-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--ion);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.hud-nav a:hover, .hud-nav a.active { color: var(--star); }
.hud-nav a:hover::after, .hud-nav a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ── 左侧航段指示 ─────────────────────── */
.hud-rail {
  position: fixed;
  left: clamp(16px, 3vw, 40px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.rail-dot {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rail-dot i {
  width: 7px; height: 7px;
  border: 1px solid var(--ti);
  transform: rotate(45deg);
  transition: all .4s var(--ease-out);
  flex: none;
}
.rail-dot span {
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--ti);
  background: rgba(5, 6, 14, .85);
  padding: 2px 6px;
  margin: -2px -6px;
  opacity: 0;
  transform: translateX(-6px);
  transition: all .4s var(--ease-out);
  writing-mode: horizontal-tb;
}
.rail-dot:hover span, .rail-dot:focus-visible span { opacity: .8; transform: none; }
.rail-dot.active i {
  background: var(--ion);
  border-color: var(--ion);
  box-shadow: 0 0 10px var(--ion);
}
.rail-dot.active span { opacity: 1; transform: none; color: var(--star); }

/* ── HUD 底栏 ─────────────────────────── */
.hud-bottom {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px clamp(20px, 4vw, 48px);
  font-size: 11px;
  color: var(--ti);
  pointer-events: none;
}
.hud-dive { display: flex; align-items: center; gap: 12px; }
.hud-dive-bar {
  width: 110px; height: 1px;
  background: var(--line);
  position: relative;
}
.hud-dive-bar i {
  position: absolute;
  left: 0; top: -0.5px;
  height: 2px; width: 0%;
  background: var(--flare);
  box-shadow: 0 0 8px var(--flare);
}
#divePct { color: var(--flare); font-variant-numeric: tabular-nums; }
#coords { font-variant-numeric: tabular-nums; }

/* ── 音乐控制 ─────────────────────────── */
.music-toggle {
  position: fixed;
  right: clamp(20px, 4vw, 48px);
  bottom: 62px;
  z-index: 51;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(102, 232, 255, .34);
  border-radius: 14px 5px 14px 5px;
  background: rgba(5, 6, 14, .56);
  color: var(--ion);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(102, 232, 255, .05);
  transition: color .25s, border-color .25s, background .25s, box-shadow .25s, transform .25s var(--ease-out);
}
.music-toggle::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid currentColor;
  border-radius: 9px 3px 9px 3px;
  opacity: .2;
  pointer-events: none;
}
.music-toggle:hover,
.music-toggle:focus-visible {
  color: var(--star);
  border-color: var(--ion);
  background: rgba(16, 31, 46, .72);
  box-shadow: inset 0 0 0 1px rgba(187, 248, 255, .16), 0 0 18px rgba(102, 232, 255, .18);
  outline: none;
  transform: translateY(-2px);
}
.music-toggle:active { transform: translateY(0) scale(.94); }
.music-toggle-icon {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 14px;
  display: block;
}
.music-toggle-icon::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 3px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid currentColor;
  transition: width .18s ease, height .18s ease, top .18s ease, left .18s ease, border .18s ease, box-shadow .18s ease;
}
.music-toggle.is-playing {
  color: var(--star);
  border-color: rgba(187, 248, 255, .76);
  background: rgba(16, 31, 46, .72);
  box-shadow: inset 0 0 0 1px rgba(187, 248, 255, .18), 0 0 18px rgba(102, 232, 255, .18);
}
.music-toggle.is-playing::after { animation: music-pulse 1.5s ease-in-out infinite; }
.music-toggle.is-playing .music-toggle-icon::before {
  top: 1px;
  left: 1px;
  width: 3px;
  height: 12px;
  border: 0;
  background: currentColor;
  box-shadow: 8px 0 0 currentColor;
}
@keyframes music-pulse {
  0%, 100% { opacity: .2; transform: scale(1); }
  50% { opacity: .7; transform: scale(1.08); }
}

/* ── 正文区块 ─────────────────────────── */
main { position: relative; z-index: 10; }

.sec {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16vh clamp(20px, 6vw, 72px);
  position: relative;
}

.wrap { width: min(1140px, 100%); margin: 0 auto; }
.wrap.center { text-align: center; }

.eyebrow {
  font-size: 12px;
  color: var(--flare);
  letter-spacing: .3em;
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "▸ ";
  color: var(--ion);
}

.sec-title {
  font-family: var(--f-disp);
  font-weight: 400;
  font-size: clamp(34px, 5.5vw, 62px);
  line-height: 1.25;
  letter-spacing: .04em;
  margin-bottom: 30px;
  text-shadow: 0 0 40px rgba(102, 232, 255, .25);
}

.body    { color: var(--ti); max-width: 34em; margin-bottom: 1.2em; }
.body-lg {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--star);
  max-width: 32em;
  margin-bottom: 1.2em;
}
.wrap.center .body-lg { margin-left: auto; margin-right: auto; }

.quote {
  font-family: var(--f-disp);
  font-size: clamp(18px, 2vw, 24px);
  color: var(--ion);
  margin-top: 28px;
  letter-spacing: .06em;
}

/* 正文压在亮盘上时的柔和衬影，保证可读 */
.hero-sub, .hero-desc, .body, .body-lg, .quote {
  text-shadow: 0 1px 16px rgba(2, 3, 9, .85);
}

/* ── Hero ─────────────────────────────── */
.sec-hero .wrap { width: min(1140px, 100%); }

.hero-name {
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(100px, 1vw, 50px);
  line-height: .95;
  letter-spacing: .04em;
  margin: 8px 0 18px -0.04em;
  text-shadow:
    0 0 60px rgba(102, 232, 255, .35),
    0 0 140px rgba(123, 108, 255, .25);
}
.hero-name .ch {
  display: inline-block;
  transform: translateY(110%) rotate(4deg);
  opacity: 0;
  transition: transform 1s var(--ease-out), opacity .7s;
  transition-delay: var(--d, 0s);
}
.hero-name.in .ch { transform: none; opacity: 1; }

.hero-sub {
  font-family: var(--f-disp);
  font-size: clamp(22px, 3.4vw, 40px);
  letter-spacing: .1em;
  margin-bottom: 20px;
}
.hero-sub b {
  color: var(--ion);
  font-weight: 400;
  text-shadow: 0 0 24px rgba(102, 232, 255, .6);
}

.hero-desc { color: var(--ti); margin-bottom: 40px; }

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-cta.center { justify-content: center; margin-bottom: 0; margin-top: 42px; }
.sec-hero .hero-cta .btn,
.sec-contact .hero-cta .btn {
  border-width: 1px;
  border-radius: 16px;
  background: rgba(7, 10, 22, .16);
  padding-inline: 38px;
  font-family: "Microsoft YaHei UI", "Segoe UI Variable Display", sans-serif;
  font-weight: 500;
}

.btn {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: .18em;
  padding: 15px 30px;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  transition: color .35s, border-color .35s, box-shadow .35s, transform .2s;
  will-change: transform;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ion);
  transform: translateX(-101%);
  transition: transform .45s var(--ease-out);
  z-index: -1;
}
.btn-solid {
  border-color: var(--ion);
  color: var(--ion);
  box-shadow: inset 0 0 24px rgba(102, 232, 255, .1), 0 0 24px rgba(102, 232, 255, .12);
}
.btn-solid:hover { color: var(--void); box-shadow: 0 0 40px rgba(102, 232, 255, .4); }
.btn-solid:hover::before { transform: none; }
.btn-ghost { color: var(--ti); }
.btn-ghost::before { background: var(--flare); }
.btn-ghost:hover { color: var(--void); border-color: var(--flare); }
.btn-ghost:hover::before { transform: none; }
.sec-hero .hero-cta .btn-ghost,
.sec-contact .hero-cta .btn-ghost {
  color: var(--flare);
  border-color: var(--flare);
  box-shadow: inset 0 0 24px rgba(255, 180, 84, .08), 0 0 24px rgba(255, 180, 84, .12);
}
.sec-hero .hero-cta .btn-ghost::before,
.sec-contact .hero-cta .btn-ghost::before { background: var(--flare); }
.sec-hero .hero-cta .btn-ghost:hover,
.sec-contact .hero-cta .btn-ghost:hover {
  color: var(--void);
  border-color: var(--flare);
  box-shadow: 0 0 38px rgba(255, 180, 84, .42);
}

.hero-stats {
  display: flex;
  gap: clamp(28px, 5vw, 72px);
  border-top: 1px solid var(--line);
  padding-top: 24px;
  max-width: 560px;
}
.hero-stats dt { font-size: 11px; color: var(--ti); letter-spacing: .2em; margin-bottom: 6px; }
.hero-stats dd { font-size: 20px; color: var(--star); font-variant-numeric: tabular-nums; }

.status-on { color: var(--ion) !important; }
.status-on::before {
  content: "●";
  font-size: 9px;
  margin-right: 7px;
  color: var(--flare);
  animation: pulse 1.8s ease-in-out infinite;
}

.scroll-hint {
  position: absolute;
  bottom: 64px;
  right: clamp(20px, 6vw, 72px);
  font-size: 11px;
  color: var(--ti);
  letter-spacing: .3em;
  display: flex;
  align-items: center;
  gap: 14px;
}
.scroll-hint i {
  width: 1px; height: 52px;
  background: linear-gradient(var(--ion), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-hint i::after {
  content: "";
  position: absolute;
  left: 0; top: -50%;
  width: 100%; height: 50%;
  background: var(--flare);
  animation: drip 2s var(--ease-out) infinite;
}
@keyframes drip { to { top: 110%; } }

/* ── 档案 ─────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(36px, 6vw, 90px);
  align-items: center;
}

.file-card {
  border: 1px solid rgba(102, 232, 255, .14);
  border-radius: 30px;
  background: rgba(7, 10, 22, .16);
  padding: 30px 32px;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
  transition: border-color .4s, box-shadow .4s;
}
.file-card::before, .file-card::after,
.proj-card::before, .proj-card::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--ion);
  transition: all .4s;
  pointer-events: none;
}
.file-card::before, .proj-card::before {
  top: -1px; left: -1px;
  border-right: none; border-bottom: none;
}
.file-card::after, .proj-card::after {
  bottom: -1px; right: -1px;
  border-left: none; border-top: none;
}
.file-card::before,
.file-card::after { display: none; }
.file-card:hover {
  border-color: rgba(102, 232, 255, .28);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .24);
}

.file-card-head {
  font-size: 11px;
  color: var(--flare);
  letter-spacing: .24em;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.rec-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--flare);
  box-shadow: 0 0 8px var(--flare);
  animation: pulse 1.8s ease-in-out infinite;
}

.file-rows div {
  display: flex;
  justify-content: space-between;
  padding: 13px 2px;
  border-bottom: 1px solid rgba(122, 142, 190, .09);
}
.file-rows dt { color: #e8c987; font-size: 14px; }
.file-rows dd { color: #fff2d6; font-size: 14px; letter-spacing: .04em; }

.file-wave {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 30px;
  margin-top: 22px;
}
.file-wave i {
  flex: 1;
  background: linear-gradient(to top, rgba(102, 232, 255, .9), rgba(123, 108, 255, .4));
  animation: wave 1.6s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * .1s);
  height: 30%;
}
.file-wave i:nth-child(2n)  { --i: 1; }
.file-wave i:nth-child(3n)  { --i: 2; }
.file-wave i:nth-child(5n)  { --i: 3; }
.file-wave i:nth-child(7n)  { --i: 4; }
@keyframes wave {
  0%, 100% { height: 18%; opacity: .5; }
  50%      { height: 95%; opacity: 1; }
}

/* ── 理想宣言 ─────────────────────────── */
.ideal-manifesto {
  margin-top: clamp(28px, 4vh, 48px);
  border-top: 1px solid rgba(143, 166, 210, .22);
}

.ideal-line {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: clamp(72px, 9vw, 118px) minmax(0, 1fr) minmax(150px, .34fr);
  gap: clamp(18px, 3vw, 44px);
  align-items: center;
  min-height: clamp(116px, 14vh, 150px);
  padding: 22px 18px 22px 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(143, 166, 210, .22);
}
.ideal-line::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(102, 232, 255, .10), rgba(102, 232, 255, .025) 62%, transparent);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .65s var(--ease-out);
}
.ideal-line::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ion));
  box-shadow: 0 0 12px rgba(102, 232, 255, .7);
  transition: width .65s var(--ease-out);
}
.ideal-line:hover::before {
  transform: scaleX(1);
  transform-origin: left center;
}
.ideal-line:hover::after { width: 100%; }

.ideal-no {
  color: rgba(102, 232, 255, .16);
  font-family: var(--f-lat);
  font-size: clamp(44px, 5.8vw, 78px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.06em;
  transition: color .45s, text-shadow .45s, transform .45s var(--ease-out);
}
.ideal-line:hover .ideal-no {
  color: rgba(102, 232, 255, .44);
  text-shadow: 0 0 28px rgba(102, 232, 255, .2);
  transform: translateX(8px);
}

.ideal-copy {
  transition: transform .45s var(--ease-out);
}
.ideal-line:hover .ideal-copy { transform: translateX(6px); }
.ideal-copy h3 {
  margin-bottom: 9px;
  color: var(--star);
  font-family: var(--f-disp);
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .07em;
}
.ideal-copy p {
  max-width: 46em;
  color: rgba(233, 237, 248, .67);
  font-size: 14px;
  line-height: 1.75;
}

.ideal-key {
  justify-self: end;
  color: rgba(232, 201, 135, .82);
  font-size: 10px;
  letter-spacing: .2em;
  white-space: nowrap;
  transition: color .45s, transform .45s var(--ease-out);
}
.ideal-key::after {
  content: "↗";
  display: inline-block;
  margin-left: 12px;
  color: var(--ion);
  font-size: 14px;
  transition: transform .45s var(--ease-out);
}
.ideal-line:hover .ideal-key {
  color: #f3dca7;
  transform: translateX(-4px);
}
.ideal-line:hover .ideal-key::after { transform: translate(4px, -4px); }

.sys-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.sys-head h3 {
  font-family: var(--f-disp);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: .06em;
}
.sys-pct {
  font-family: var(--f-lat);
  font-weight: 700;
  font-size: 26px;
  color: var(--ion);
  font-variant-numeric: tabular-nums;
}
.sys-pct::after { content: "%"; font-size: 13px; color: #e8c987; margin-left: 2px; }

.sys-sub { font-size: 11px; color: #e8c987; letter-spacing: .2em; margin: 6px 0 18px; }

.sys-bar {
  height: 3px;
  background: rgba(122, 142, 190, .14);
  overflow: hidden;
  margin-bottom: 16px;
}
.sys-bar i {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  background: linear-gradient(90deg, var(--violet), var(--ion));
  box-shadow: 0 0 12px var(--ion);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s var(--ease-out) .2s;
}
.sys-mod.in .sys-bar i { transform: none; }

.sys-status {
  font-size: 11px;
  color: #e8c987;
  letter-spacing: .18em;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── 项目 ─────────────────────────────── */
.projects-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin: -6px 0 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.projects-intro > p:first-child {
  max-width: 50em;
  color: rgba(233, 237, 248, .72);
  font-size: 15px;
  line-height: 1.85;
}
.projects-count {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--flare);
  white-space: nowrap;
}
.projects-count strong {
  color: var(--ion);
  font-family: var(--f-lat);
  font-size: clamp(32px, 3vw, 44px);
  font-weight: 600;
  line-height: 1;
}
.projects-count span {
  color: var(--ti);
  font-size: 10px;
  letter-spacing: .2em;
}

.proj-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.proj-card {
  display: flex;
  flex-direction: column;
  min-height: 314px;
  border: 1px solid rgba(102, 232, 255, .14);
  border-radius: 30px;
  background: rgba(7, 10, 22, .16);
  padding: 26px 26px 24px;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
  transition: border-color .4s, box-shadow .4s;
}
.proj-card::before,
.proj-card::after { display: none; }
/* 全息扫光 */
.proj-card > * { position: relative; z-index: 1; }
.proj-card .proj-sheen {
  display: none;
}
.proj-card:hover {
  border-color: rgba(102, 232, 255, .28);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .24);
}

.proj-top {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--flare);
  letter-spacing: .22em;
  margin-bottom: 16px;
}
.proj-status { color: var(--ti); display: flex; align-items: center; gap: 7px; }

.proj-card h3 {
  font-family: var(--f-disp);
  font-weight: 400;
  font-size: 23px;
  letter-spacing: .05em;
  margin-bottom: 10px;
  transition: color .3s, text-shadow .3s;
}
.proj-card:hover h3 {
  color: var(--ion);
  text-shadow: 0 0 20px rgba(102, 232, 255, .5);
}
.proj-card p { color: var(--ti); font-size: 14px; margin-bottom: 20px; min-height: 3.8em; }

.proj-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.proj-tags span {
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--ion);
  border: 1px solid rgba(102, 232, 255, .3);
  padding: 4px 9px;
}

.proj-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
}
.proj-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 118px;
  margin-left: auto;
  padding: 8px 14px;
  border: 1px solid rgba(102, 232, 255, .55);
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 13px 100%, 0 calc(100% - 13px));
  background: rgba(7, 10, 22, .16);
  color: var(--ion);
  font-size: 10px;
  letter-spacing: .16em;
  line-height: 1.4;
  transform: translateZ(0);
  text-shadow: none;
  transition: color .25s, letter-spacing .25s, transform .25s var(--ease-out), filter .25s;
}
.proj-link::before,
.proj-link::after {
  content: "";
  position: absolute;
  pointer-events: none;
  mix-blend-mode: screen;
}
.proj-link::before {
  inset: 1px;
  background: linear-gradient(100deg, transparent 30%, rgba(102, 232, 255, .08) 42%, rgba(233, 237, 248, .72) 50%, rgba(123, 108, 255, .22) 58%, transparent 70%);
  transform: translateX(-135%) skewX(-16deg);
  opacity: 0;
}
.proj-link::after {
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(102, 232, 255, .34) 3px 4px);
  opacity: 0;
}
.proj-link:hover,
.proj-link:focus-visible {
  color: var(--star);
  letter-spacing: .2em;
  transform: translateY(-3px) scale(1.025);
  filter: none;
  animation:
    proj-link-glitch .48s steps(1, end),
    proj-link-border-flow 1.15s .48s linear infinite;
}
.proj-link:hover::before,
.proj-link:focus-visible::before { animation: proj-link-charge .72s cubic-bezier(.16, 1, .3, 1); }
.proj-link:hover::after,
.proj-link:focus-visible::after { animation: proj-link-scanlines .48s steps(1, end); }

@keyframes proj-link-glitch {
  0%, 100% { transform: translateY(-3px) scale(1.025); text-shadow: 0 0 10px rgba(102, 232, 255, .5); }
  14% { transform: translate(2px, -4px) skewX(-5deg); text-shadow: -3px 0 var(--violet), 3px 0 var(--ion); }
  28% { transform: translate(-2px, -2px) skewX(4deg); text-shadow: 3px 0 var(--violet), -3px 0 var(--ion); }
  42% { transform: translate(1px, -4px) skewX(-2deg) scale(1.04); }
  60% { transform: translate(-1px, -3px) skewX(2deg); text-shadow: -2px 0 var(--ion), 2px 0 var(--violet); }
  76% { transform: translateY(-3px) scale(1.01); text-shadow: 0 0 12px rgba(102, 232, 255, .8); }
}
@keyframes proj-link-border-flow {
  0%, 100% { border-color: rgba(102, 232, 255, .45); }
  50%      { border-color: rgba(102, 232, 255, .95); }
}
@keyframes proj-link-charge {
  0% { transform: translateX(-135%) skewX(-16deg); opacity: 0; }
  18% { opacity: 1; }
  100% { transform: translateX(135%) skewX(-16deg); opacity: 0; }
}
@keyframes proj-link-scanlines {
  0%, 100% { opacity: 0; clip-path: inset(0); transform: translateX(0); }
  14% { opacity: .8; clip-path: inset(12% 0 62%); transform: translateX(-2px); }
  28% { opacity: .45; clip-path: inset(58% 0 16%); transform: translateX(2px); }
  42% { opacity: .7; clip-path: inset(34% 0 42%); transform: translateX(-1px); }
  60% { opacity: .35; clip-path: inset(72% 0 6%); transform: translateX(1px); }
}

/* ── 通讯 ─────────────────────────────── */
.sec.sec-contact { padding-bottom: 0; justify-content: flex-end; gap: 10vh; }
.sec-contact .wrap {
  margin-top: auto;
  padding-top: 10vh;
  transform: translateY(-5vh);
  background: radial-gradient(ellipse 80% 90% at 50% 60%, rgba(4, 5, 12, .58) 30%, transparent 72%);
}

.contact-title {
  font-family: var(--f-disp);
  font-weight: 400;
  font-size: clamp(44px, 8vw, 100px);
  line-height: 1.2;
  letter-spacing: .05em;
  margin-bottom: 26px;
  text-shadow: 0 0 60px rgba(102, 232, 255, .3);
}

.sec-contact .body-lg {
  position: relative;
  top: -10px;
}

.contact-copyright {
  margin-top: 36px;
  color: rgba(233, 237, 248, .78);
  font-size: 12px;
  letter-spacing: .2em;
}

.email-trigger {
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.email-dialog {
  position: fixed;
  inset: 0;
  height: fit-content;
  width: min(540px, calc(100vw - 40px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(102, 232, 255, .38);
  border-radius: 32px;
  background: transparent;
  color: var(--star);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .62), 0 0 58px rgba(102, 232, 255, .1);
}
.email-dialog[open] { animation: email-dialog-in .5s var(--ease-out); }
.email-dialog::backdrop { background: rgba(1, 3, 10, .5); }
.email-dialog-inner {
  position: relative;
  padding: clamp(26px, 6vw, 44px);
}
.email-dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(34px, 7vw, 54px);
}
.email-dialog-close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(102, 232, 255, .25);
  border-radius: 50%;
  background: transparent;
  color: var(--ti);
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
  transition: color .25s, border-color .25s, background .25s, transform .25s var(--ease-out);
}
.email-dialog-close:hover,
.email-dialog-close:focus-visible {
  border-color: var(--ion);
  background: rgba(102, 232, 255, .1);
  color: var(--ion);
  transform: rotate(90deg);
}
.email-dialog-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--flare);
  font-size: 10px;
  letter-spacing: .22em;
}
.email-dialog-signal {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ion);
  box-shadow: 0 0 10px rgba(102, 232, 255, .72);
}
.email-dialog h2 {
  margin-bottom: 32px;
  color: var(--star);
  font-family: var(--f-disp);
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: .06em;
}
.email-address-block {
  margin-bottom: 32px;
  padding: 18px 0 22px;
  border-top: 1px solid rgba(143, 166, 210, .22);
  border-bottom: 1px solid rgba(143, 166, 210, .22);
}
.email-dialog-label {
  margin-bottom: 8px;
  color: var(--ti);
  font-size: 10px;
  letter-spacing: .2em;
}
.email-address {
  display: block;
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--ion);
  font-size: clamp(17px, 3.8vw, 24px);
  letter-spacing: .08em;
  text-shadow: 0 0 18px rgba(102, 232, 255, .24);
  transition: color .25s, text-shadow .25s;
}
.email-address:hover,
.email-address:focus-visible {
  color: var(--star);
  text-shadow: 0 0 22px rgba(102, 232, 255, .5);
}
.email-send {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 14px;
  border-radius: 18px;
  padding-block: 16px;
}
@keyframes email-dialog-in {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to { opacity: 1; transform: none; }
}

/* ── 液态玻璃 ─────────────────────────── */
/* Visual treatment inspired by rdev/liquid-glass-react (MIT). */
[data-liquid-glass] {
  --lg-x: 50%;
  --lg-y: 50%;
  --lg-angle: 135deg;
  isolation: isolate;
  background: transparent !important;
  border-color: rgba(164, 239, 255, .3) !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .26), inset 0 1px 0 rgba(233, 250, 255, .16), inset 0 -1px 0 rgba(53, 94, 124, .26) !important;
  transition: border-color .3s, box-shadow .3s, color .3s;
}
[data-liquid-glass] > .lg-warp,
[data-liquid-glass] > .lg-edge-a,
[data-liquid-glass] > .lg-edge-b,
[data-liquid-glass] > .lg-glint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}
[data-liquid-glass] > .lg-warp {
  z-index: -4;
  background: rgba(5, 12, 25, .28);
  -webkit-backdrop-filter: blur(10px) saturate(135%);
  backdrop-filter: blur(10px) saturate(135%);
}
[data-liquid-glass] > .lg-edge-a,
[data-liquid-glass] > .lg-edge-b {
  padding: 1px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
[data-liquid-glass] > .lg-edge-a {
  z-index: -3;
  opacity: .58;
  background: linear-gradient(var(--lg-angle), transparent 12%, rgba(219, 249, 255, .32) 43%, rgba(102, 232, 255, .15) 58%, transparent 86%);
  mix-blend-mode: screen;
}
[data-liquid-glass] > .lg-edge-b {
  z-index: -2;
  opacity: .42;
  background: linear-gradient(calc(var(--lg-angle) + 180deg), transparent 18%, rgba(106, 179, 227, .24) 50%, transparent 82%);
  mix-blend-mode: overlay;
}
[data-liquid-glass] > .lg-glint {
  z-index: -1;
  opacity: .13;
  background: linear-gradient(var(--lg-angle), transparent 30%, rgba(229, 252, 255, .2) 50%, transparent 70%);
  mix-blend-mode: screen;
  transition: opacity .28s ease;
}
[data-liquid-glass].is-liquid-hover {
  border-color: rgba(186, 246, 255, .62) !important;
  box-shadow: 0 24px 58px rgba(0, 0, 0, .34), 0 0 26px rgba(102, 232, 255, .12), inset 0 1px 0 rgba(238, 253, 255, .3), inset 0 -1px 0 rgba(53, 94, 124, .34) !important;
}
[data-liquid-glass].is-liquid-hover > .lg-glint { opacity: .48; }
[data-liquid-glass].is-liquid-pressed > .lg-warp { background: rgba(6, 18, 34, .44); }
[data-liquid-glass].is-liquid-pressed > .lg-glint { opacity: .72; }
[data-liquid-glass].btn::before {
  background: linear-gradient(var(--lg-angle), rgba(102, 232, 255, .16), rgba(233, 250, 255, .12), rgba(102, 232, 255, .08));
}
[data-liquid-glass].btn:hover,
[data-liquid-glass].btn:focus-visible {
  color: var(--star);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .3), 0 0 22px rgba(102, 232, 255, .16), inset 0 1px 0 rgba(238, 253, 255, .36) !important;
}
.sec-hero .hero-cta .btn[data-liquid-glass],
.sec-contact .hero-cta .btn[data-liquid-glass],
.proj-link[data-liquid-glass] { border-radius: 999px; }
.email-dialog[data-legacy-liquid-glass] {
  background: rgba(5, 7, 16, .09);
  border-color: rgba(174, 244, 255, .42) !important;
  box-shadow: 0 22px 68px rgba(0, 0, 0, .34), 0 0 42px rgba(102, 232, 255, .08), inset 0 1px 0 rgba(233, 250, 255, .12) !important;
}
.email-send[data-legacy-liquid-glass] {
  background: rgba(7, 10, 22, .055);
  border-color: rgba(102, 232, 255, .46);
  box-shadow: inset 0 0 18px rgba(102, 232, 255, .055), 0 0 18px rgba(102, 232, 255, .08);
}
.email-dialog-close[data-legacy-liquid-glass] {
  position: relative;
  background: rgba(7, 10, 22, .055);
  border-color: rgba(164, 239, 255, .28) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(233, 250, 255, .08) !important;
}

.marquee {
  border-top: 10px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 13px 0;
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--ti);
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  animation: marquee 26s linear infinite;
}
.marquee-track span { flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 26px 0 90px;
  font-size: 11px;
  color: var(--ti);
  letter-spacing: .18em;
}

/* ── 入场动画 ─────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .9s ease, transform 1s var(--ease-out);
  transition-delay: var(--d, 0s);
}
[data-reveal].in { opacity: 1; transform: none; }

/* 3D 初始化失败的降级态（由 index.html 的故障保险添加） */
html.no3d #scene { display: none; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .25; }
}

/* ── 响应式 ───────────────────────────── */
@media (max-width: 1020px) {
  .proj-grid { grid-template-columns: repeat(2, 1fr); }
  .proj-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .hud-rail, .hud-coords, .scroll-hint { display: none; }
  .music-toggle { bottom: 18px; }
  .grid-2 { grid-template-columns: 1fr; gap: 40px; }
  .projects-intro { align-items: flex-start; flex-direction: column; gap: 16px; }
  .ideal-line {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 20px;
  }
  .ideal-key {
    grid-column: 2;
    justify-self: start;
    margin-top: -10px;
  }
  .hero-stats { flex-wrap: wrap; gap: 24px; }
}
@media (max-width: 640px) {
  .proj-grid { grid-template-columns: 1fr; }
  .proj-card { min-height: 0; }
  .proj-card:last-child { grid-column: auto; }
  .hud-nav { gap: 6px; }
  .hud-nav a { font-size: 11px; letter-spacing: .12em; padding: 12px 8px; }
  .sec { padding-top: 13vh; padding-bottom: 13vh; }
  .hero-desc br { display: none; }
  .ideal-manifesto { margin-top: 22px; }
  .ideal-line {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    min-height: 0;
    padding: 22px 0;
  }
  .ideal-no { font-size: 32px; }
  .ideal-copy h3 { font-size: 22px; }
  .ideal-copy p { font-size: 13px; }
  .ideal-key { font-size: 9px; }
}

/* ── 降低动态偏好 ─────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal], .hero-name .ch { opacity: 1; transform: none; }
  .sys-bar i { transform: none; }
  .marquee-track { animation: none; }
}
