/* ==========================================================================
   52AIOPS · Neural Interface  —  design system
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --bg: #04060e;
  --bg-2: #070c18;
  --panel: rgba(13, 19, 34, 0.62);
  --panel-solid: #0b1220;
  --line: rgba(124, 158, 255, 0.14);
  --line-strong: rgba(124, 158, 255, 0.3);

  --txt: #e9eefc;
  --txt-dim: #9aa8c7;
  --txt-mute: #66748f;

  --c1: #22d3ee;
  --c2: #6366f1;
  --c3: #a855f7;
  --c4: #f472b6;
  --ok: #34d399;

  --grad: linear-gradient(118deg, #22d3ee 0%, #6366f1 46%, #a855f7 74%, #f472b6 100%);
  --grad-soft: linear-gradient(140deg, rgba(34, 211, 238, 0.16), rgba(168, 85, 247, 0.1));

  --radius: 22px;
  --radius-sm: 14px;
  --shell: 1240px;

  --shadow-lg: 0 40px 90px -40px rgba(0, 0, 0, 0.95);
  --shadow-glow: 0 0 0 1px rgba(34, 211, 238, 0.28), 0 24px 70px -30px rgba(99, 102, 241, 0.6);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font: "Inter", "Segoe UI Variable", "Segoe UI", "PingFang SC", "HarmonyOS Sans SC",
    "Microsoft YaHei", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SF Mono", Consolas, "Courier New", monospace;

  --header-h: 74px;
}

[data-theme="light"] {
  --bg: #f2f5fc;
  --bg-2: #eaf0fb;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-solid: #ffffff;
  --line: rgba(24, 42, 96, 0.12);
  --line-strong: rgba(24, 42, 96, 0.24);
  --txt: #0d1630;
  --txt-dim: #4a5a7d;
  --txt-mute: #7b89a6;
  --shadow-lg: 0 40px 90px -50px rgba(20, 32, 68, 0.5);
  --shadow-glow: 0 0 0 1px rgba(99, 102, 241, 0.22), 0 24px 60px -34px rgba(99, 102, 241, 0.5);
}

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }

.ico {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; line-height: 1.22; letter-spacing: -0.02em; }
p { margin: 0; }
::selection { background: rgba(99, 102, 241, 0.42); color: #fff; }

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

/* ---------- scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.7), rgba(34, 211, 238, 0.5));
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}

/* ---------- ambient background ---------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1100px 700px at 78% -10%, rgba(99, 102, 241, 0.22), transparent 62%),
    radial-gradient(900px 620px at 8% 4%, rgba(34, 211, 238, 0.16), transparent 60%),
    radial-gradient(800px 700px at 46% 108%, rgba(168, 85, 247, 0.15), transparent 62%),
    var(--bg);
}

.bg-grid {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(to right, rgba(124, 158, 255, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(124, 158, 255, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 65% at 50% 30%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 30%, #000 20%, transparent 78%);
  animation: grid-drift 26s linear infinite;
}

@keyframes grid-drift {
  to { transform: translate3d(64px, 64px, 0); }
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: orb-float 22s var(--ease) infinite alternate;
}
.orb.a { width: 520px; height: 520px; top: -160px; right: -80px; background: rgba(99, 102, 241, 0.5); }
.orb.b { width: 460px; height: 460px; top: 40%; left: -180px; background: rgba(34, 211, 238, 0.34); animation-delay: -6s; }
.orb.c { width: 420px; height: 420px; bottom: -140px; right: 14%; background: rgba(168, 85, 247, 0.38); animation-delay: -12s; }

@keyframes orb-float {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-40px, 40px, 0) scale(1.08); }
  100% { transform: translate3d(30px, -30px, 0) scale(0.96); }
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 460px;
  height: 460px;
  margin: -230px 0 0 -230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.1), transparent 66%);
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: transform;
}
body.has-pointer .cursor-glow { opacity: 1; }

/* ---------- layout ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 28px;
}

.section { padding: 92px 0; position: relative; }
.section.tight { padding: 60px 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 44px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c1);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c1));
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.16);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  50% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
}

.section-title {
  font-size: clamp(28px, 3.4vw, 42px);
  letter-spacing: -0.035em;
}
.section-title em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-desc {
  margin-top: 14px;
  color: var(--txt-dim);
  max-width: 560px;
  font-size: 15.5px;
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: height 0.4s var(--ease), background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  height: 64px;
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--line);
}

.nav-inner {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex: 0 0 auto;
}
.brand-mark {
  width: 38px;
  height: 38px;
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.brand-mark svg { width: 100%; height: 100%; }
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.9), rgba(99, 102, 241, 0.1) 70%);
  filter: blur(7px);
  animation: core-pulse 3s ease-in-out infinite;
}
@keyframes core-pulse {
  50% { opacity: 0.45; transform: scale(0.86); }
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 15.5px; }
.brand-text span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.26em;
  color: var(--txt-mute);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  position: relative;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--txt-dim);
  transition: color 0.3s ease, background 0.3s ease;
  white-space: nowrap;
}
.nav-links a small {
  display: block;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--txt-mute);
  opacity: 0.7;
  line-height: 1.1;
}
.nav-links a:hover { color: var(--txt); background: rgba(124, 158, 255, 0.1); }
.nav-links a.active { color: var(--txt); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.8);
}

.nav-tools { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(124, 158, 255, 0.06);
  color: var(--txt-dim);
  transition: all 0.28s var(--ease);
}
.icon-btn:hover {
  color: var(--txt);
  border-color: var(--line-strong);
  background: rgba(124, 158, 255, 0.14);
  transform: translateY(-1px);
}
.icon-btn svg { width: 17px; height: 17px; }

.kbd-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(124, 158, 255, 0.06);
  color: var(--txt-mute);
  font-size: 12.5px;
  transition: all 0.28s var(--ease);
}
.kbd-hint:hover { border-color: var(--line-strong); color: var(--txt-dim); }
.kbd-hint kbd {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--txt-dim);
}

.nav-toggle { display: none; }

/* scroll progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--grad);
  z-index: 120;
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.9);
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s ease;
  will-change: transform;
}
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  color: #04060e;
  background: var(--grad);
  background-size: 200% 100%;
  box-shadow: 0 16px 40px -18px rgba(99, 102, 241, 0.9);
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.55), transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 52px -18px rgba(99, 102, 241, 1);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--txt);
  background: rgba(124, 158, 255, 0.05);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  border-color: rgba(34, 211, 238, 0.6);
  background: rgba(34, 211, 238, 0.1);
  transform: translateY(-2px);
}

.btn-sm { height: 42px; padding: 0 18px; font-size: 13.5px; }

/* ---------- chips / tags ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(124, 158, 255, 0.08);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--txt-dim);
}
.chip.solid { background: var(--grad); color: #05070f; border: 0; font-weight: 700; }
.chip .bulb {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c1);
  box-shadow: 0 0 8px var(--c1);
}

/* ---------- glass card base ---------- */
.glass {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012) 55%);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(150deg, rgba(34, 211, 238, 0.4), transparent 40%, rgba(168, 85, 247, 0.3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.glass:hover::before { opacity: 1; }

/* pointer spotlight on cards */
.spotlight { position: relative; }
.spotlight::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgba(34, 211, 238, 0.16), transparent 62%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.spotlight:hover::after { opacity: 1; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 52px) 0 80px;
  overflow: hidden;
}
#neural-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
  mask-image: radial-gradient(ellipse 75% 70% at 62% 42%, #000 30%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 62% 42%, #000 30%, transparent 76%);
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: 40px;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(124, 158, 255, 0.08);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--txt-dim);
  backdrop-filter: blur(8px);
}
.hero-badge .live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.14);
  color: var(--ok);
  letter-spacing: 0.1em;
}
.hero-badge .live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulse-dot 2s infinite;
}

.hero-title {
  margin: 26px 0 0;
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 700;
}
.hero-title .line { display: block; }
.hero-title .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 34px rgba(99, 102, 241, 0.35));
}
.hero-title .outline {
  color: transparent;
  -webkit-text-stroke: 1px rgba(233, 238, 252, 0.36);
}
[data-theme="light"] .hero-title .outline { -webkit-text-stroke-color: rgba(13, 22, 48, 0.32); }

.type-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  font-family: var(--mono);
  font-size: clamp(13px, 1.4vw, 15.5px);
  color: var(--c1);
  letter-spacing: 0.04em;
  min-height: 28px;
}
.type-line .prompt { color: var(--txt-mute); }
.type-line .caret {
  width: 8px;
  height: 17px;
  background: var(--c1);
  box-shadow: 0 0 10px var(--c1);
  animation: caret 1.1s steps(2, start) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.hero-copy {
  margin-top: 24px;
  max-width: 540px;
  color: var(--txt-dim);
  font-size: 16px;
}
.hero-copy strong { color: var(--txt); font-weight: 600; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  max-width: 560px;
}
.stat b {
  display: block;
  font-size: clamp(21px, 2.4vw, 29px);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat b {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat small {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--txt-mute);
  letter-spacing: 0.04em;
}

/* AI core visual */
.core-stage {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 460px;
  margin-inline: auto;
  display: grid;
  place-items: center;
  perspective: 900px;
}
.core-rings { position: absolute; inset: 0; display: grid; place-items: center; transform-style: preserve-3d; }
.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(124, 158, 255, 0.22);
}
.ring:nth-child(1) { inset: 4%; border-color: rgba(34, 211, 238, 0.34); animation: spin 22s linear infinite; }
.ring:nth-child(2) { inset: 14%; border-color: rgba(99, 102, 241, 0.3); animation: spin 16s linear infinite reverse; }
.ring:nth-child(3) { inset: 24%; border-color: rgba(168, 85, 247, 0.3); animation: spin 11s linear infinite; }
.ring::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c1);
  box-shadow: 0 0 14px 3px rgba(34, 211, 238, 0.85);
}
.ring:nth-child(2)::after { background: var(--c2); box-shadow: 0 0 14px 3px rgba(99, 102, 241, 0.85); }
.ring:nth-child(3)::after { background: var(--c3); box-shadow: 0 0 14px 3px rgba(168, 85, 247, 0.85); }
@keyframes spin { to { transform: rotate(360deg); } }

.core-orb {
  position: relative;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.9), transparent 34%),
    radial-gradient(circle at 62% 68%, rgba(244, 114, 182, 0.65), transparent 55%),
    conic-gradient(from 140deg, #22d3ee, #6366f1, #a855f7, #22d3ee);
  box-shadow:
    0 0 70px -10px rgba(99, 102, 241, 0.9),
    inset 0 0 40px rgba(4, 6, 14, 0.55);
  animation: orb-breathe 6s ease-in-out infinite;
  z-index: 2;
}
@keyframes orb-breathe {
  50% { transform: scale(1.05); box-shadow: 0 0 100px -6px rgba(99, 102, 241, 1), inset 0 0 50px rgba(4, 6, 14, 0.5); }
}
.core-orb::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  animation: spin 18s linear infinite;
}

.core-label {
  position: absolute;
  bottom: 4%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(7, 12, 24, 0.72);
  backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--txt-dim);
  z-index: 3;
}
.core-label b { color: var(--c1); font-weight: 600; }

.float-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(9, 14, 27, 0.78);
  backdrop-filter: blur(14px);
  font-size: 11.5px;
  color: var(--txt-dim);
  box-shadow: 0 20px 40px -28px #000;
  animation: float-y 7s ease-in-out infinite;
  z-index: 4;
  white-space: nowrap;
}
.float-chip svg { width: 13px; height: 13px; color: var(--c1); }
.float-chip.f1 { top: 6%; left: -6%; animation-delay: -1s; }
.float-chip.f2 { top: 30%; right: -10%; animation-delay: -3s; }
.float-chip.f3 { bottom: 18%; left: -8%; animation-delay: -5s; }
@keyframes float-y {
  50% { transform: translateY(-14px); }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--txt-mute);
}
.scroll-cue i {
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, var(--c1), transparent);
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---------- marquee ---------- */
.marquee {
  position: relative;
  padding: 18px 0;
  border-block: 1px solid var(--line);
  background: rgba(124, 158, 255, 0.035);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--txt-mute);
  white-space: nowrap;
}
.marquee-track span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--c2);
  box-shadow: 0 0 8px var(--c2);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- bento / capability grid ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.bento .card { padding: 26px; }
.bento .card.span-3 { grid-column: span 3; }
.bento .card.span-2 { grid-column: span 2; }
.bento .card.span-4 { grid-column: span 4; }
.bento .card.span-6 { grid-column: span 6; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-radius: var(--radius);
  transition: transform 0.45s var(--ease), border-color 0.45s ease, box-shadow 0.45s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-glow);
}

.card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--grad-soft);
  border: 1px solid var(--line);
  color: var(--c1);
}
.card-icon svg { width: 21px; height: 21px; }

.card h3 { font-size: 18px; letter-spacing: -0.02em; }
.card p { color: var(--txt-dim); font-size: 14.2px; line-height: 1.7; }
.card .meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--txt-mute);
}
.card .meta span {
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(124, 158, 255, 0.05);
}

.card-wide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 24px;
  align-items: center;
}
.pipeline { display: flex; flex-direction: column; gap: 9px; }
.pipeline div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(7, 12, 24, 0.5);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--txt-dim);
}
.pipeline div i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  flex: 0 0 auto;
}
.pipeline div:nth-child(2) i { background: var(--c1); box-shadow: 0 0 8px var(--c1); }
.pipeline div:nth-child(3) i { background: var(--c3); box-shadow: 0 0 8px var(--c3); }
.pipeline div:nth-child(4) i { background: var(--c4); box-shadow: 0 0 8px var(--c4); }

/* ---------- knowledge cards ---------- */
.k-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.k-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.4s ease, box-shadow 0.5s ease;
  transform-style: preserve-3d;
}
.k-card:hover {
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 30px 70px -40px rgba(34, 211, 238, 0.75);
}

.k-art {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 18% 12%, hsla(var(--hue, 190), 95%, 58%, 0.42), transparent 58%),
    radial-gradient(100% 100% at 84% 84%, hsla(calc(var(--hue, 190) + 62), 92%, 60%, 0.4), transparent 62%),
    linear-gradient(150deg, #0a1020, #060913);
}
.k-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 78%);
}
.k-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(115deg, transparent 46%, rgba(255, 255, 255, 0.55) 47%, transparent 48%),
    linear-gradient(65deg, transparent 62%, rgba(255, 255, 255, 0.35) 63%, transparent 64%);
  opacity: 0.22;
  transition: opacity 0.5s ease, transform 0.9s var(--ease);
}
.k-card:hover .k-art::after { opacity: 0.45; transform: scale(1.12); }

.k-art .glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  opacity: 0.92;
}
.k-art .glyph svg { width: 46px; height: 46px; filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.6)); }
.k-art .idx {
  position: absolute;
  top: 12px;
  left: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.6);
}
.k-art .cat {
  position: absolute;
  top: 11px;
  right: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(4, 6, 14, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  font-size: 10.5px;
  color: #eaf2ff;
}

.k-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.k-body h3 { font-size: 16px; line-height: 1.45; letter-spacing: -0.01em; }
.k-body p {
  font-size: 13.4px;
  color: var(--txt-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.k-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--txt-mute);
}
.k-foot .go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--c1);
  transition: gap 0.3s ease;
}
.k-card:hover .k-foot .go { gap: 10px; }

/* ---------- article list + sidebar ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 26px;
  align-items: start;
}

.article-list { display: flex; flex-direction: column; gap: 16px; }

.a-item {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01));
  overflow: hidden;
  transition: transform 0.45s var(--ease), border-color 0.4s ease, box-shadow 0.45s ease;
}
.a-item:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-glow);
}
.a-thumb {
  position: relative;
  min-height: 150px;
  background:
    radial-gradient(120% 130% at 20% 20%, hsla(var(--hue, 200), 92%, 60%, 0.42), transparent 60%),
    linear-gradient(150deg, #0a1020, #05080f);
  overflow: hidden;
}
.a-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 9px);
  opacity: 0.6;
}
.a-thumb .glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.9);
}
.a-thumb .glyph svg { width: 34px; height: 34px; }

.a-thumb.photo {
  background-size: cover;
  background-position: center;
}
.a-thumb.photo::after { opacity: 0.12; }

.a-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 9px; }
.a-body h3 { font-size: 17.5px; }
.a-body h3 a { transition: color 0.3s ease; }
.a-body h3 a:hover { color: var(--c1); }
.a-body p {
  color: var(--txt-dim);
  font-size: 13.8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.a-meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--txt-mute);
}
.a-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--txt-mute); }
.a-meta .more { margin-left: auto; color: var(--c1); display: inline-flex; align-items: center; gap: 6px; }

/* sidebar */
.side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 92px; }
.side-card { padding: 20px; }
.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.side-head h4 {
  font-size: 13px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.side-head h4::before {
  content: "";
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: var(--grad);
}
.side-head span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--txt-mute);
}

.rank { display: flex; flex-direction: column; }
.rank li { border-top: 1px solid var(--line); }
.rank li:first-child { border-top: 0; }
.rank a {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  font-size: 13.4px;
  color: var(--txt-dim);
  transition: color 0.28s ease, padding-left 0.28s ease;
}
.rank a:hover { color: var(--txt); padding-left: 4px; }
.rank .n {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--c2);
  flex: 0 0 auto;
}
.rank li:nth-child(1) .n { color: var(--c1); }
.rank li:nth-child(2) .n { color: var(--c3); }
.rank .views {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--txt-mute);
  flex: 0 0 auto;
}

/* status card */
.status-card { padding: 20px; }
.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--txt-mute);
  padding: 7px 0;
}
.status-row b { color: var(--txt); font-weight: 600; letter-spacing: 0; }
.status-row b.up { color: var(--ok); }
#spark { width: 100%; height: 54px; margin: 8px 0 2px; }
.status-bar {
  height: 4px;
  border-radius: 99px;
  background: rgba(124, 158, 255, 0.14);
  overflow: hidden;
  margin-top: 6px;
}
.status-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--grad);
  width: 68%;
  animation: bar-breathe 5s ease-in-out infinite;
}
@keyframes bar-breathe {
  50% { width: 82%; }
}

.link-list { display: flex; flex-direction: column; gap: 8px; }
.link-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(124, 158, 255, 0.045);
  font-size: 13px;
  color: var(--txt-dim);
  transition: all 0.3s var(--ease);
}
.link-list a:hover {
  color: var(--txt);
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.09);
  transform: translateX(3px);
}
.link-list .arr { margin-left: auto; color: var(--txt-mute); }

/* ---------- AI insight panel ---------- */
.insight {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px dashed rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.06);
  font-size: 12.8px;
  color: var(--txt-dim);
}
.insight .tag {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c1);
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.insight .tag i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c1);
  box-shadow: 0 0 8px var(--c1);
  animation: pulse-dot 1.8s infinite;
}

/* ---------- timeline ---------- */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.7), rgba(168, 85, 247, 0.5), transparent);
}
.tl-item { position: relative; padding: 0 0 26px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--c1);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12), 0 0 16px rgba(34, 211, 238, 0.7);
}
.tl-item:nth-child(2n)::before { border-color: var(--c3); box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.12), 0 0 16px rgba(168, 85, 247, 0.7); }
.tl-date {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--c1);
}
.tl-item:nth-child(2n) .tl-date { color: var(--c3); }
.tl-item h4 { margin: 6px 0 5px; font-size: 15.5px; }
.tl-item p { color: var(--txt-dim); font-size: 13.8px; }

/* ---------- page hero ---------- */
.page-hero {
  position: relative;
  padding: calc(var(--header-h) + 76px) 0 56px;
  overflow: hidden;
}
.page-hero .crumb {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--txt-mute);
  margin-bottom: 22px;
}
.page-hero .crumb a:hover { color: var(--c1); }
.page-hero .crumb span { color: var(--c2); }
.page-title {
  font-size: clamp(34px, 5.4vw, 62px);
  letter-spacing: -0.045em;
  line-height: 1.06;
}
.page-title em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-sub { margin-top: 18px; max-width: 620px; color: var(--txt-dim); font-size: 16px; }

/* ---------- about ---------- */
.profile {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 30px;
}
.avatar-ring {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.avatar-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #22d3ee, #6366f1, #a855f7, #f472b6, #22d3ee);
  animation: spin 9s linear infinite;
  filter: blur(1px);
}
.avatar-ring::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #080d1a;
}
.avatar-face {
  position: relative;
  z-index: 2;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 34% 28%, #1b2a52, #0a1122 68%);
  border: 1px solid rgba(124, 158, 255, 0.25);
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background-clip: padding-box;
  color: var(--txt);
}
.avatar-face span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.profile h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.03em; }
.profile .role {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c1);
}
.profile .bio { margin-top: 16px; color: var(--txt-dim); font-size: 15px; }
.profile .facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 22px;
}
.fact {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(124, 158, 255, 0.045);
}
.fact small {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--txt-mute);
}
.fact b { display: block; margin-top: 4px; font-size: 13.8px; font-weight: 600; }

/* ---------- learn: search + filters ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 76px;
  z-index: 20;
}
.search-box {
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(4, 8, 18, 0.5);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.search-box:focus-within {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}
.search-box svg { width: 16px; height: 16px; color: var(--txt-mute); flex: 0 0 auto; }
.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--txt);
  font: inherit;
  font-size: 14px;
  outline: none;
}
.search-box input::placeholder { color: var(--txt-mute); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(124, 158, 255, 0.05);
  font-size: 12.8px;
  color: var(--txt-dim);
  transition: all 0.3s var(--ease);
}
.filter:hover { color: var(--txt); border-color: var(--line-strong); }
.filter.active {
  color: #05070f;
  background: var(--grad);
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 10px 26px -14px rgba(99, 102, 241, 0.9);
}
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--txt-mute);
  font-size: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- life / gallery ---------- */
.masonry { columns: 3; column-gap: 18px; }
.masonry > * { break-inside: avoid; margin-bottom: 18px; }
.tile {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  transition: transform 0.45s var(--ease), border-color 0.4s ease;
}
.tile:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.tile-art {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    radial-gradient(110% 110% at 22% 18%, hsla(var(--hue, 200), 90%, 60%, 0.5), transparent 60%),
    radial-gradient(100% 100% at 78% 82%, hsla(calc(var(--hue, 200) + 70), 88%, 62%, 0.45), transparent 62%),
    linear-gradient(160deg, #091020, #05080f);
}
.tile-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at 50% 45%, #000 8%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 8%, transparent 78%);
}
.tile-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.24;
  mix-blend-mode: overlay;
}
.tile-art.tall { aspect-ratio: 3 / 4; }
.tile-art.short { aspect-ratio: 16 / 10; }
.tile-art.photo {
  background-size: cover;
  background-position: center;
}
.tile-art.photo::before { opacity: 0.35; }
.tile-art.photo::after { opacity: 0.1; }
.tile-art.photo .glyph,
.a-thumb.photo .glyph { display: none; }

/* 原站封面图：先 multiply 压成深蓝底，再叠一层渐变，保证与深色界面统一 */
.k-art.cover,
.tile-art.cover,
.a-thumb.cover {
  background-color: #151f3a;
  background-blend-mode: normal, multiply;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.k-art.cover .glyph,
.tile-art.cover .glyph,
.a-thumb.cover .glyph { display: none; }
.tile-art.cover::before { opacity: 0.12; }
.tile-art.cover::after { opacity: 0.05; }
.k-art.cover::before { opacity: 0.12; }
.k-art.cover::after { opacity: 0.08; }
.a-thumb.cover::after { opacity: 0.08; }

.tile-body { padding: 16px 18px 18px; }
.tile-body h3 { font-size: 15.5px; }
.tile-body p {
  margin-top: 7px;
  font-size: 13.4px;
  color: var(--txt-dim);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile-body .t-meta {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--txt-mute);
}

/* ---------- talk: note stream ---------- */
.note-stream { display: flex; flex-direction: column; gap: 14px; max-width: 820px; }
.note {
  position: relative;
  padding: 20px 22px 20px 26px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01));
  transition: border-color 0.35s ease, transform 0.35s var(--ease);
}
.note:hover { border-color: rgba(34, 211, 238, 0.35); transform: translateX(4px); }
.note::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 2px;
  border-radius: 2px;
  background: var(--grad);
  opacity: 0.7;
}
.note time {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--txt-mute);
}
.note p { margin-top: 8px; font-size: 14.6px; color: var(--txt); }
.note p.mono { font-family: var(--mono); font-size: 13px; color: var(--c1); }

/* ---------- AI assistant widget ---------- */
.ai-fab {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 130;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 20px 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.4);
  background: rgba(8, 13, 26, 0.86);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 46px -20px rgba(34, 211, 238, 0.8), 0 0 0 0 rgba(34, 211, 238, 0.4);
  color: var(--txt);
  font-size: 13.5px;
  font-weight: 600;
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease, opacity 0.3s ease;
}
.ai-fab:hover { transform: translateY(-3px) scale(1.02); }
.ai-fab.hidden { opacity: 0; pointer-events: none; transform: translateY(10px) scale(0.9); }
.ai-fab .bot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--grad);
  color: #05070f;
  animation: fab-glow 3.4s ease-in-out infinite;
}
.ai-fab .bot svg { width: 19px; height: 19px; }
@keyframes fab-glow {
  50% { box-shadow: 0 0 0 8px rgba(34, 211, 238, 0.1); }
}
.ai-fab .ping {
  position: absolute;
  top: 6px;
  right: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c4);
  box-shadow: 0 0 10px var(--c4);
}

.ai-panel {
  position: fixed;
  right: 26px;
  bottom: 92px;
  z-index: 131;
  width: min(410px, calc(100vw - 32px));
  height: min(620px, calc(100svh - 140px));
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  border: 1px solid rgba(124, 158, 255, 0.28);
  background: linear-gradient(170deg, rgba(12, 18, 34, 0.96), rgba(6, 10, 20, 0.98));
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 50px 100px -40px #000, 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
  transform: translateY(18px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.42s var(--ease-out), opacity 0.32s ease;
}
.ai-panel.open { transform: none; opacity: 1; pointer-events: auto; }
.ai-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--grad);
}

.ai-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.ai-top .bot {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--grad);
  color: #05070f;
  flex: 0 0 auto;
}
.ai-top .bot svg { width: 18px; height: 18px; }
.ai-top .who { display: flex; flex-direction: column; line-height: 1.3; }
.ai-top .who b { font-size: 14px; }
.ai-top .who span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ok);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ai-top .who span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}
.ai-top .close { margin-left: auto; }

.ai-log {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
}
.msg { display: flex; gap: 10px; max-width: 92%; }
.msg .av {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}
.msg.bot .av { background: var(--grad); color: #05070f; }
.msg.me { flex-direction: row-reverse; margin-left: auto; }
.msg.me .av { background: rgba(124, 158, 255, 0.16); color: var(--txt-dim); border: 1px solid var(--line); }
.bubble {
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 13.6px;
  line-height: 1.65;
  color: var(--txt);
  background: rgba(124, 158, 255, 0.09);
  border: 1px solid var(--line);
  border-top-left-radius: 4px;
}
.msg.me .bubble {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(99, 102, 241, 0.22));
  border-color: rgba(34, 211, 238, 0.3);
  border-top-left-radius: 14px;
  border-top-right-radius: 4px;
}
.bubble b { color: var(--c1); font-weight: 600; }
.bubble .src {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}
.bubble .src a {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--c1);
  background: rgba(34, 211, 238, 0.08);
}
.bubble .src a:hover { background: rgba(34, 211, 238, 0.16); }
.bubble ul { margin: 8px 0 0; padding-left: 0; display: flex; flex-direction: column; gap: 6px; }
.bubble li { position: relative; padding-left: 16px; }
.bubble li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c2);
}

.typing { display: inline-flex; gap: 4px; align-items: center; height: 20px; }
.typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c1);
  animation: typing 1.2s ease-in-out infinite;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.ai-suggest {
  display: flex;
  gap: 7px;
  padding: 0 18px 12px;
  overflow-x: auto;
  flex: 0 0 auto;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 0, #000 86%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 86%, transparent);
}
.ai-suggest::-webkit-scrollbar { display: none; }
.ai-suggest button {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(124, 158, 255, 0.06);
  font-size: 12px;
  color: var(--txt-dim);
  transition: all 0.28s var(--ease);
}
.ai-suggest button:hover {
  color: var(--txt);
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.1);
}

.ai-input {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
  flex: 0 0 auto;
}
.ai-input textarea {
  flex: 1;
  min-height: 42px;
  max-height: 110px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(4, 8, 18, 0.6);
  color: var(--txt);
  font: inherit;
  font-size: 13.6px;
  line-height: 1.5;
  resize: none;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.ai-input textarea:focus {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}
.ai-send {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--grad);
  color: #05060e;
  transition: transform 0.25s var(--ease), filter 0.25s ease;
}
.ai-send:hover { transform: translateY(-2px); filter: brightness(1.1); }
.ai-send svg { width: 17px; height: 17px; }

/* ---------- command palette ---------- */
.palette {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: start center;
  padding-top: 12vh;
  background: rgba(3, 5, 12, 0.7);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.palette.open { opacity: 1; pointer-events: auto; }
.palette-box {
  width: min(640px, calc(100vw - 32px));
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(175deg, rgba(14, 20, 38, 0.98), rgba(6, 10, 20, 0.99));
  box-shadow: 0 50px 100px -30px #000;
  overflow: hidden;
  transform: translateY(-14px) scale(0.98);
  transition: transform 0.32s var(--ease-out);
}
.palette.open .palette-box { transform: none; }
.palette-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.palette-input svg { width: 18px; height: 18px; color: var(--c1); flex: 0 0 auto; }
.palette-input input {
  flex: 1;
  border: 0;
  background: none;
  color: var(--txt);
  font: inherit;
  font-size: 16px;
  outline: none;
}
.palette-input input::placeholder { color: var(--txt-mute); }
.palette-input kbd {
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--txt-mute);
}
.palette-list { max-height: 52vh; overflow-y: auto; padding: 8px; }
.p-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--txt-dim);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.p-item:hover, .p-item.sel { background: rgba(124, 158, 255, 0.12); color: var(--txt); }
.p-item .kind {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--line);
  color: var(--txt-mute);
  flex: 0 0 auto;
}
.p-item .hit { margin-left: auto; color: var(--txt-mute); font-family: var(--mono); font-size: 10px; }
.p-empty { padding: 26px; text-align: center; color: var(--txt-mute); font-size: 13.5px; }
.palette-foot {
  display: flex;
  gap: 18px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--txt-mute);
}

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(124, 158, 255, 0.04));
}
.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.8fr));
  gap: 34px;
  padding: 56px 0 40px;
}
.footer-brand p { margin-top: 14px; color: var(--txt-dim); font-size: 13.8px; max-width: 340px; }
.footer-col h5 {
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--txt-mute);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  padding: 5px 0;
  font-size: 13.6px;
  color: var(--txt-dim);
  transition: color 0.28s ease, transform 0.28s ease;
}
.footer-col a:hover { color: var(--c1); transform: translateX(3px); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 20px 0 30px;
  border-top: 1px solid var(--line);
  font-size: 12.4px;
  color: var(--txt-mute);
}
.footer-bottom a { color: var(--txt-dim); }
.footer-bottom a:hover { color: var(--c1); }
.footer-bottom .dotsep { width: 3px; height: 3px; border-radius: 50%; background: var(--txt-mute); }
.footer-bottom .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.build-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--txt-dim);
}

/* to top */
.to-top {
  position: fixed;
  right: 26px;
  bottom: 92px;
  z-index: 125;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(8, 13, 26, 0.84);
  backdrop-filter: blur(12px);
  color: var(--txt-dim);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.35s var(--ease);
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { color: var(--txt); border-color: var(--line-strong); }
.to-top svg { width: 16px; height: 16px; }

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.reveal.is-revealed { opacity: 1; transform: none; }

/* ---------- preloader ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  background: #04060e;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
.boot.done { opacity: 0; visibility: hidden; }
.boot-inner { width: min(380px, 84vw); }
.boot-log {
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 2;
  color: var(--txt-mute);
  height: 78px;
  overflow: hidden;
}
.boot-log b { color: var(--c1); font-weight: 500; }
.boot-bar {
  margin-top: 18px;
  height: 2px;
  border-radius: 99px;
  background: rgba(124, 158, 255, 0.16);
  overflow: hidden;
}
.boot-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad);
  transition: width 0.4s var(--ease);
}
.boot-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--txt-mute);
}

/* ---------- footer CTA ---------- */
.cta {
  position: relative;
  padding: 54px 44px;
  border-radius: 28px;
  overflow: hidden;
  text-align: center;
  border: 1px solid var(--line);
  background:
    radial-gradient(700px 320px at 50% -30%, rgba(99, 102, 241, 0.35), transparent 70%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
}
.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(124, 158, 255, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(124, 158, 255, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000, transparent 72%);
  pointer-events: none;
}
.cta h2 { font-size: clamp(24px, 3.4vw, 38px); letter-spacing: -0.035em; }
.cta p { margin: 14px auto 0; max-width: 520px; color: var(--txt-dim); font-size: 15px; }
.cta .hero-actions { justify-content: center; margin-top: 28px; }

/* ---------- light theme chrome fixes ---------- */
[data-theme="light"] .eyebrow,
[data-theme="light"] .k-foot .go,
[data-theme="light"] .a-meta .more,
[data-theme="light"] .type-line,
[data-theme="light"] .insight .tag,
[data-theme="light"] .profile .role,
[data-theme="light"] .tl-date,
[data-theme="light"] .note p.mono { color: #0e7490; }
[data-theme="light"] .eyebrow::before { background: linear-gradient(90deg, transparent, #0e7490); }
[data-theme="light"] .insight .tag i { background: #0e7490; box-shadow: 0 0 8px #0e7490; }

[data-theme="light"] .kbd-hint kbd { background: rgba(13, 22, 48, 0.06); }
[data-theme="light"] .search-box,
[data-theme="light"] .ai-input textarea { background: rgba(255, 255, 255, 0.78); }
[data-theme="light"] .pipeline div { background: rgba(255, 255, 255, 0.62); }
[data-theme="light"] .float-chip,
[data-theme="light"] .core-label {
  background: rgba(255, 255, 255, 0.86);
  color: var(--txt-dim);
  border-color: var(--line);
}
[data-theme="light"] .avatar-face {
  background: radial-gradient(circle at 34% 28%, #e8efff, #f8faff 68%);
  border-color: rgba(24, 42, 96, 0.16);
}
[data-theme="light"] .avatar-ring::after { background: #ffffff; }
[data-theme="light"] .ai-fab {
  background: rgba(255, 255, 255, 0.94);
  color: var(--txt);
  border-color: rgba(99, 102, 241, 0.34);
  box-shadow: 0 18px 44px -22px rgba(30, 41, 90, 0.5);
}
[data-theme="light"] .ai-panel {
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.97), rgba(244, 247, 255, 0.98));
  border-color: rgba(24, 42, 96, 0.16);
  box-shadow: 0 40px 90px -40px rgba(20, 32, 68, 0.45);
}
[data-theme="light"] .bubble { background: rgba(99, 102, 241, 0.08); }
[data-theme="light"] .to-top { background: rgba(255, 255, 255, 0.9); }
[data-theme="light"] .palette { background: rgba(238, 242, 251, 0.72); }
[data-theme="light"] .palette-box {
  background: linear-gradient(175deg, #ffffff, #f7f9ff);
  box-shadow: 0 40px 90px -40px rgba(20, 32, 68, 0.5);
}
[data-theme="light"] .nav-links.open { background: rgba(255, 255, 255, 0.98); }
[data-theme="light"] .boot { background: #04060e; }

/* ---------- wiki 实时索引 ---------- */
.wiki-featured {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(124, 158, 255, 0.04);
}
.wf-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--txt-mute);
  margin-right: 4px;
}
.wiki-featured a {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--txt-dim);
  background: rgba(124, 158, 255, 0.05);
  transition: all 0.25s var(--ease);
}
.wiki-featured a:hover {
  color: var(--txt);
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.1);
}

.wiki-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.wiki-layout > * { min-width: 0; max-width: 100%; }
.wiki-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.wiki-search {
  width: 100%;
  flex: 0 0 auto;
  height: 44px;
}
.wiki-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 4px;
}
.wiki-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--txt-dim);
  text-align: left;
  border-left: 2px solid transparent;
  transition: all 0.2s var(--ease);
}
.wiki-nav-item:hover { color: var(--txt); background: rgba(124, 158, 255, 0.08); }
.wiki-nav-item.active {
  color: var(--txt);
  background: rgba(34, 211, 238, 0.09);
  border-left-color: var(--c1);
}
.wiki-nav-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiki-nav-item b {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--txt-mute);
  flex: 0 0 auto;
}

.wiki-group + .wiki-group { margin-top: 26px; }
.wiki-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--txt-dim);
}
.wiki-group-title span {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 400;
  color: var(--txt-mute);
}
.wiki-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.wiki-list { min-height: 80px; }
.wiki-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 15px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.008));
  transition: transform 0.28s var(--ease), border-color 0.28s ease, background 0.28s ease;
}
.wiki-item:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(34, 211, 238, 0.07);
}
.wi-name {
  font-size: 13.8px;
  font-weight: 600;
  color: var(--txt);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wi-meta {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--txt-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wiki-loading {
  padding: 40px 20px;
  text-align: center;
  color: var(--txt-mute);
  font-size: 13.5px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

@media (max-width: 900px) {
  .wiki-layout { grid-template-columns: 1fr; gap: 18px; }
  .wiki-side { position: static; }
  .wiki-nav {
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, #000 0, #000 94%, transparent);
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 94%, transparent);
  }
  .wiki-nav::-webkit-scrollbar { display: none; }
  .wiki-nav-item { border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; }
  .wiki-nav-item.active { border-bottom-color: var(--c1); background: transparent; }
}

@media (max-width: 620px) {
  .wiki-items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .wiki-item { padding: 10px 12px; }
  .wi-name { font-size: 13px; }
  .wiki-featured { padding: 10px 12px; }
  .wiki-featured a { font-size: 12px; padding: 4px 9px; }
}

@media (max-width: 420px) {
  .wiki-items { grid-template-columns: 1fr; }
}

/* ---------- 原站图文 / 视频 ---------- */
.doc-video {
  position: relative;
  margin: 22px 0;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #05080f;
}
.doc-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.doc-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}
.doc-video-note {
  margin: -10px 0 24px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--txt-mute);
}
.doc-video-note a { color: var(--c1); }
.doc-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 18px 0 6px;
}
.doc-gallery a {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(124, 158, 255, 0.06);
  transition: transform 0.35s var(--ease), border-color 0.3s ease;
}
.doc-gallery a:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.45);
}
.doc-gallery img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}
.doc-gallery a:hover img { transform: scale(1.04); }
.doc-gallery-block { margin-top: 34px; }
.doc-gallery-block h2 { margin-top: 0; }

@media (max-width: 620px) {
  .doc-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}

/* ---------- article / doc page ---------- */
.doc-hero { padding-bottom: 4px; }
.doc-title {
  font-size: clamp(28px, 4.2vw, 46px);
  letter-spacing: -0.035em;
  line-height: 1.16;
  max-width: 900px;
}
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--txt-mute);
}
.doc-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--txt-mute); }
.doc-meta .up { color: var(--ok); }
.doc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.ai-summary {
  position: relative;
  margin-top: 28px;
  padding: 18px 20px 18px 22px;
  border-radius: 16px;
  border: 1px dashed rgba(34, 211, 238, 0.32);
  background: linear-gradient(120deg, rgba(34, 211, 238, 0.07), rgba(168, 85, 247, 0.05));
  max-width: 820px;
}
.ai-summary .tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c1);
  margin-bottom: 8px;
}
.ai-summary .tag i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c1);
  box-shadow: 0 0 8px var(--c1);
  animation: pulse-dot 1.8s infinite;
}
.ai-summary p { font-size: 14px; color: var(--txt-dim); line-height: 1.75; }

.doc-body { padding: 38px 40px 44px; }
.prose { font-size: 15.5px; line-height: 1.9; color: var(--txt-dim); }
.prose > *:first-child { margin-top: 0; }
.prose h2 {
  position: relative;
  margin: 44px 0 14px;
  padding-left: 16px;
  font-size: 21px;
  color: var(--txt);
  letter-spacing: -0.02em;
  scroll-margin-top: 96px;
}
.prose h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  bottom: 0.32em;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--c1), var(--c2));
}
.prose h3 { margin: 30px 0 10px; font-size: 16.5px; color: var(--txt); }
.prose p { margin: 14px 0; }
.prose a { color: var(--c1); border-bottom: 1px solid rgba(34, 211, 238, 0.35); }
.prose a:hover { border-bottom-color: var(--c1); }
.prose b, .prose strong { color: var(--txt); font-weight: 600; }
.prose ul, .prose ol {
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  counter-reset: step;
}
.prose li { position: relative; padding-left: 22px; }
.prose ul > li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.78em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c2);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.8);
}
.prose ol { counter-reset: step; }
.prose ol > li { counter-increment: step; }
.prose ol > li::before {
  content: counter(step) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--c1);
}
.prose code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(124, 158, 255, 0.14);
  color: #8fe6f7;
  word-break: break-word;
}
.prose pre {
  position: relative;
  margin: 18px 0;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(4, 8, 18, 0.72);
  overflow-x: auto;
}
.prose pre code {
  display: block;
  padding: 0;
  background: none;
  color: #cfe0ff;
  font-size: 12.6px;
  line-height: 1.8;
  white-space: pre;
}
.prose blockquote {
  margin: 22px 0;
  padding: 14px 18px;
  border-left: 2px solid var(--c1);
  border-radius: 0 12px 12px 0;
  background: rgba(34, 211, 238, 0.06);
  color: var(--txt);
  font-size: 14.8px;
}
.prose hr { margin: 32px 0; border: 0; border-top: 1px dashed var(--line); }

.toc ol { counter-reset: toc; display: flex; flex-direction: column; gap: 2px; }
.toc a {
  display: block;
  padding: 7px 10px 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--txt-dim);
  border-left: 2px solid transparent;
  transition: all 0.25s var(--ease);
}
.toc a:hover { color: var(--txt); background: rgba(124, 158, 255, 0.08); }
.toc a.active {
  color: var(--txt);
  border-left-color: var(--c1);
  background: rgba(34, 211, 238, 0.08);
}

.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}
.pager a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(124, 158, 255, 0.045);
  transition: all 0.3s var(--ease);
}
.pager a:hover { border-color: var(--line-strong); background: rgba(34, 211, 238, 0.07); transform: translateY(-2px); }
.pager span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--txt-mute);
}
.pager b { font-size: 14.5px; font-weight: 600; line-height: 1.5; }
.pager a.next { text-align: right; align-items: flex-end; }
.pager .empty { border-style: dashed; opacity: 0.45; pointer-events: none; }

.doc-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }.doc-index a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(124, 158, 255, 0.04);
  transition: all 0.3s var(--ease);
}
.doc-index a:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.doc-index b { font-size: 14px; }
.doc-index span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--txt-mute);
}

@media (max-width: 860px) {
  .doc-body { padding: 26px 22px 30px; }
  .pager { grid-template-columns: 1fr; }
}

[data-theme="light"] .prose code {
  background: rgba(14, 116, 144, 0.1);
  color: #0e7490;
}
[data-theme="light"] .prose a { color: #0e7490; border-bottom-color: rgba(14, 116, 144, 0.35); }
[data-theme="light"] .ai-summary .tag { color: #0e7490; }
[data-theme="light"] .ai-summary .tag i { background: #0e7490; box-shadow: 0 0 8px #0e7490; }
[data-theme="light"] .toc a.active { border-left-color: #0e7490; }
[data-theme="light"] .doc-index span { color: var(--txt-mute); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 46px; }
  .core-stage { max-width: 380px; }
  .split { grid-template-columns: 1fr; }
  .side { position: static; }
  .masonry { columns: 2; }
  .bento .card.span-3, .bento .card.span-2, .bento .card.span-4 { grid-column: span 6; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 0;
    height: 100svh;
    overflow-y: auto;
    padding: 100px 22px 40px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    background: rgba(5, 8, 16, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-102%);
    transition: transform 0.5s var(--ease-out);
    margin: 0;
    z-index: 90;
  }
  .nav-links.open { transform: none; z-index: 90; }
  .brand, .nav-tools { position: relative; z-index: 95; }
  .nav-links a {
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .nav-links a small { display: inline; }
  .nav-links a.active::after { display: none; }
  .nav-links a.active { background: rgba(124, 158, 255, 0.12); }
  .nav-toggle { display: grid; }
  .nav-toggle .close-ico { display: none; }
  .nav-toggle[aria-expanded="true"] .menu-ico { display: none; }
  .nav-toggle[aria-expanded="true"] .close-ico { display: block; }
  body.nav-open { overflow: hidden; }
  body.nav-open .to-top { opacity: 0; pointer-events: none; }
  .kbd-hint { display: none; }
  .section { padding: 68px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .a-item { grid-template-columns: 1fr; }
  .a-thumb { min-height: 132px; }
  .profile { grid-template-columns: 1fr; text-align: left; }
  .avatar-ring { max-width: 180px; }
  .scroll-cue { display: none; }
  .float-chip { display: none; }
}

@media (max-width: 620px) {
  .shell, .nav-inner { padding: 0 18px; }
  .hero { padding-top: calc(var(--header-h) + 24px); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 18px 8px; }
  .masonry { columns: 1; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
  .ai-panel { right: 8px; left: 8px; width: auto; bottom: 84px; height: min(76svh, 560px); }
  .ai-fab { right: 16px; bottom: 16px; }
  .to-top { right: 16px; bottom: 82px; }
  .cta { padding: 38px 22px; }
  .card-wide { grid-template-columns: 1fr; }
  .bento .card { padding: 22px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
