:root {
  --bg: #070b12;
  --bg-2: #0c1420;
  --panel: rgba(13, 23, 37, 0.76);
  --panel-strong: rgba(15, 31, 48, 0.9);
  --line: rgba(116, 232, 255, 0.2);
  --line-strong: rgba(116, 232, 255, 0.44);
  --text: #edf7ff;
  --muted: #9fb0c2;
  --dim: #6f8296;
  --cyan: #39d9ff;
  --cyan-2: #7cf7d4;
  --blue: #5c8dff;
  --warning: #ffd166;
  --shadow: rgba(0, 0, 0, 0.38);
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    linear-gradient(rgba(57, 217, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 217, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(57, 217, 255, 0.12), transparent 36rem),
    linear-gradient(180deg, var(--bg), #05070c 72%);
  background-size: 46px 46px, 46px 46px, auto, auto;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--cursor-x, 50%) var(--cursor-y, 30%), rgba(57, 217, 255, 0.16), transparent 17rem),
    linear-gradient(180deg, rgba(255,255,255,0.035), transparent 28%, rgba(57,217,255,0.03));
  mix-blend-mode: screen;
  z-index: -1;
  opacity: .82;
  transition: opacity .2s ease;
}

#signalCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 0.78;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(116, 232, 255, 0.14);
  background: rgba(7, 11, 18, 0.78);
  backdrop-filter: blur(18px);
}

.nav {
  max-width: var(--max);
  min-height: 70px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: rgba(57, 217, 255, 0.08);
  box-shadow: 0 0 26px rgba(57, 217, 255, 0.3), inset 0 0 18px rgba(57, 217, 255, 0.08);
  animation: neonPulse 4.8s ease-in-out infinite;
}

.brand-mark svg {
  width: 18px;
  height: 18px;
  fill: var(--cyan);
}

.nav__links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.nav__links a {
  display: block;
  padding: 8px 13px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  border: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.nav__links a:hover,
.nav__links a.is-active {
  color: var(--text);
  border-color: var(--line);
  background: rgba(57, 217, 255, 0.07);
}

.nav__toggle {
  display: none;
  width: 42px;
  height: 38px;
  border: 1px solid var(--line);
  background: rgba(57, 217, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 92px 22px;
  scroll-margin-top: 82px;
}

.hero-section {
  min-height: calc(100vh - 70px);
  display: grid;
  align-items: center;
  padding-top: 72px;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: 44px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--cyan-2);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-title {
  max-width: 8em;
  text-wrap: balance;
  text-shadow:
    0 0 16px rgba(57, 217, 255, 0.4),
    0 0 44px rgba(92, 141, 255, 0.24);
  animation: heroLift .82s cubic-bezier(.2, .8, .2, 1) both, titleGlow 5.5s ease-in-out infinite;
}

.hero-title span {
  display: block;
  white-space: nowrap;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 20px;
}

.hero-slogan {
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 700;
  text-shadow: 0 0 20px rgba(57, 217, 255, 0.38);
  animation: heroLift .82s cubic-bezier(.2, .8, .2, 1) .12s both;
}

.hero-intro,
.section-head p,
.co-panel p,
.text-block p,
.experiment-card p {
  color: var(--muted);
}

.hero-intro {
  max-width: 680px;
  margin-bottom: 30px;
  font-size: 17px;
  animation: heroLift .82s cubic-bezier(.2, .8, .2, 1) .2s both;
}

.hero-actions,
.foot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.18), transparent);
  transform: translateX(-130%);
  transition: transform .45s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn > * {
  position: relative;
  z-index: 1;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:hover::before {
  transform: translateX(130%);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(57, 217, 255, 0.26), rgba(124, 247, 212, 0.14));
  box-shadow: 0 0 34px rgba(57, 217, 255, 0.24), inset 0 0 24px rgba(57, 217, 255, 0.06);
}

.btn-primary:hover {
  border-color: rgba(124, 247, 212, 0.72);
  box-shadow: 0 0 52px rgba(57, 217, 255, 0.36), 0 0 18px rgba(92, 141, 255, 0.18);
}

.btn-secondary {
  background: rgba(13, 23, 37, 0.62);
}

.hero-visual {
  display: grid;
  gap: 14px;
}

.terminal-panel,
.text-block,
.experiment-card,
.co-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 24px 80px var(--shadow);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
}

.terminal-panel {
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 90px var(--shadow), 0 0 42px rgba(57, 217, 255, 0.12);
}

.terminal-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(120deg, transparent, rgba(57, 217, 255, 0.18), transparent 58%);
  opacity: .48;
  pointer-events: none;
}

.terminal-top {
  min-height: 46px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}

.terminal-top span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: .76;
}

.terminal-top strong {
  margin-left: auto;
  color: var(--dim);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.terminal-body {
  padding: 22px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
}

.terminal-body p {
  position: relative;
  margin-bottom: 11px;
  color: #c9d8e6;
  min-height: 1.7em;
}

.line-ok {
  color: var(--cyan-2);
}

.terminal-body p.is-typing::after,
.terminal-body p.is-typed:last-child::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 1.15em;
  margin-left: 4px;
  vertical-align: -0.2em;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(57, 217, 255, .8);
  animation: caretBlink .9s steps(2, end) infinite;
}

.line-warn {
  color: var(--warning);
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.metrics-strip > div,
.metrics-strip > a {
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(13, 23, 37, 0.52);
  box-shadow: inset 0 0 20px rgba(57, 217, 255, 0.04);
}

.metrics-strip > a {
  color: inherit;
  text-decoration: none;
}

.metrics-strip b {
  display: block;
  color: var(--cyan);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 24px;
}

.metrics-strip span {
  color: var(--muted);
  font-size: 13px;
}

.metric-idea-card {
  position: relative;
  display: grid;
  align-content: start;
  border-color: rgba(124, 247, 212, 0.42);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.metric-idea-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(57, 217, 255, 0.16), transparent 58%);
  opacity: .72;
}

.metric-idea-card b {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(124, 247, 212, 0.38);
  background: rgba(57, 217, 255, 0.08);
  box-shadow: 0 0 18px rgba(57, 217, 255, 0.18);
}

.metric-idea-card svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.metric-idea-card span {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  color: var(--text);
  font-weight: 700;
}

.metric-idea-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 247, 212, 0.78);
  background: rgba(15, 31, 48, 0.78);
  box-shadow: 0 0 34px rgba(57, 217, 255, 0.22), inset 0 0 24px rgba(57, 217, 255, 0.08);
}

.metric-progress-card {
  display: grid;
  align-content: start;
}

.metric-progress {
  display: block;
  width: 100%;
  height: 5px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgba(116, 232, 255, 0.2);
  background: rgba(7, 11, 18, 0.62);
}

.metric-progress em {
  display: block;
  width: var(--progress, 1%);
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-2));
  box-shadow: 0 0 16px rgba(57, 217, 255, 0.55);
  transition: width .45s ease;
}

.section-head {
  max-width: 720px;
  margin-bottom: 34px;
}

.about-title {
  max-width: none;
  white-space: nowrap;
}

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

.text-block,
.experiment-card {
  padding: 24px;
}

.text-block:hover,
.experiment-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 247, 212, 0.58);
  background: rgba(15, 31, 48, 0.86);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.44), 0 0 36px rgba(57, 217, 255, 0.18);
}

.text-block {
  min-height: 245px;
}

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

.experiment-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
}

.experiment-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(57,217,255,.1), transparent 42%);
  pointer-events: none;
  transition: opacity .22s ease;
}

.experiment-card:hover::before {
  opacity: 1.8;
}

.card-index {
  display: inline-block;
  margin-bottom: 52px;
  color: var(--cyan);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  letter-spacing: .18em;
}

.experiment-card strong {
  display: inline-block;
  margin-top: 12px;
  color: var(--cyan-2);
  font-size: 14px;
}

.co-panel {
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  background: var(--panel-strong);
}

.co-panel:hover {
  border-color: rgba(124, 247, 212, 0.5);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42), 0 0 38px rgba(57, 217, 255, 0.15);
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 38px 22px 48px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.site-footer p {
  margin: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  background: rgba(7, 11, 18, 0.92);
  color: var(--text);
  box-shadow: 0 0 34px rgba(57, 217, 255, 0.2);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 100;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .72s ease, transform .72s cubic-bezier(.2, .8, .2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes heroLift {
  from {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes titleGlow {
  0%, 100% {
    text-shadow:
      0 0 16px rgba(57, 217, 255, 0.38),
      0 0 44px rgba(92, 141, 255, 0.22);
  }

  50% {
    text-shadow:
      0 0 22px rgba(57, 217, 255, 0.62),
      0 0 64px rgba(92, 141, 255, 0.36);
  }
}

@keyframes neonPulse {
  0%, 100% {
    box-shadow: 0 0 24px rgba(57, 217, 255, 0.24), inset 0 0 18px rgba(57, 217, 255, 0.08);
  }

  50% {
    box-shadow: 0 0 36px rgba(57, 217, 255, 0.42), inset 0 0 24px rgba(57, 217, 255, 0.14);
  }
}

@keyframes caretBlink {
  0%, 45% {
    opacity: 1;
  }

  46%, 100% {
    opacity: 0;
  }
}

@media (max-width: 860px) {
  .nav {
    min-height: 64px;
  }

  .nav__toggle {
    display: block;
  }

  .nav__links {
    position: absolute;
    top: 64px;
    left: 14px;
    right: 14px;
    display: none;
    padding: 12px;
    border: 1px solid var(--line);
    background: rgba(7, 11, 18, 0.96);
  }

  .nav__links.is-open {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .nav__links a {
    text-align: center;
  }

  .hero-shell,
  .about-grid,
  .experiment-grid,
  .co-panel {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
  }

  .hero-title {
    font-size: clamp(52px, 15vw, 76px);
  }

  .about-title {
    white-space: normal;
  }

  .section {
    padding: 72px 18px;
  }

  .co-panel {
    padding: 26px;
  }
}

@media (max-width: 540px) {
  .nav {
    padding: 0 16px;
  }

  .nav__brand {
    font-size: 15px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .hero-actions {
    display: grid;
  }

  .metrics-strip {
    grid-template-columns: 1fr;
  }

  .terminal-body,
  .text-block,
  .experiment-card {
    padding: 20px;
  }

  .site-footer {
    display: grid;
  }
}

@media (hover: none), (max-width: 860px) {
  body::before {
    background:
      radial-gradient(circle at 50% 20%, rgba(57, 217, 255, 0.11), transparent 15rem),
      linear-gradient(180deg, rgba(255,255,255,0.03), transparent 28%, rgba(57,217,255,0.025));
  }

  .text-block:hover,
  .experiment-card:hover,
  .co-panel:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
