@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@300;400;500;600;700&family=Orbitron:wght@400;500;600;700&display=swap');

:root {
  --ink: #0B0E14;
  --cy: #22D3EE;
  --gr: #A3E635;
  --txt: #DCE6F2;
  --dim: #8FA3BA;
  --line: rgba(34, 211, 238, 0.2);
  --glass: rgba(255, 255, 255, 0.05);
  --maxw: 1080px;
  --head: "Orbitron", "Exo 2", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --body: "Exo 2", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

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

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

body {
  margin: 0;
  background:
    radial-gradient(920px 520px at 84% -10%, rgba(34, 211, 238, 0.16), transparent 62%),
    radial-gradient(780px 500px at 2% 14%, rgba(163, 230, 53, 0.1), transparent 64%),
    var(--ink);
  color: var(--txt);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.72;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

a {
  -webkit-tap-highlight-color: rgba(34, 211, 238, 0.25);
}

:focus-visible {
  outline: 2px solid var(--gr);
  outline-offset: 2px;
}

/* ---------- header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 14, 20, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand-row {
  padding: 10px 18px 4px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  text-decoration: none;
  color: #F4FAFF;
  font-family: var(--head);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.brand-logo {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 4px;
}

.brand-name {
  background: linear-gradient(94deg, var(--cy), var(--gr) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand.small {
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  min-height: 40px;
}

.brand.small .brand-name {
  background: none;
  color: #DCE6F2;
  -webkit-text-fill-color: currentColor;
}

.menu {
  padding: 0 10px 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.menu p {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0 8px;
  white-space: nowrap;
}

.menu a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--dim);
  text-decoration: none;
  font-size: 0.93rem;
  letter-spacing: 0.05em;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.menu a:hover,
.menu a:focus-visible {
  color: #FFFFFF;
  border-color: var(--line);
  background: var(--glass);
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.18);
}

/* ---------- hero ---------- */
.stage {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 45vh;
  padding: 46px 18px 40px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.stage::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(320px, 60%);
  height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--cy), var(--gr), transparent);
  opacity: 0.7;
}

.ghost {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: grid;
  place-items: center;
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(3.2rem, 19vw, 12rem);
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(34, 211, 238, 0.16);
  pointer-events: none;
  animation: drift 16s ease-in-out infinite alternate;
}

.stage-inner {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 30ch;
}

.kinetic {
  margin: 0;
  font-family: var(--head);
  font-size: clamp(1.85rem, 7vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #F2F8FF;
  text-shadow: 0 0 34px rgba(34, 211, 238, 0.35), 0 0 4px rgba(34, 211, 238, 0.5);
}

.kinetic .ch {
  display: inline-block;
  white-space: pre;
  animation: charIn 0.62s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 42ms);
}

.cue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.34em;
  color: var(--dim);
}

.cue::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gr);
  box-shadow: 0 0 10px var(--gr);
  animation: pulse 1.8s ease-in-out infinite;
}

.collage {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 2;
  pointer-events: none;
}

.shot-wrap {
  position: absolute;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--glass);
  backdrop-filter: blur(6px);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.55);
  transform: translate3d(0, var(--py, 0px), 0) rotate(var(--rot, 0deg));
  animation: pop 0.85s ease both;
  opacity: 0.85;
}

.shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.06);
}

.shot-wrap:nth-child(1) {
  --rot: -4deg;
  top: 12%;
  left: max(8px, 3vw);
  width: min(30vw, 196px);
  aspect-ratio: 4 / 5;
}

.shot-wrap:nth-child(2) {
  --rot: 4deg;
  right: max(8px, 4vw);
  bottom: 10%;
  width: min(26vw, 168px);
  aspect-ratio: 1 / 1;
}

/* ---------- reader ---------- */
.reader {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 18px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.rail {
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.rail h2 {
  margin: 0 0 8px;
  font-family: var(--head);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--cy);
}

.rail hr {
  margin: 0 0 10px;
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--cy), transparent);
}

.rail-list {
  counter-reset: railnum;
  display: flex;
  flex-direction: row;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.rail-list a {
  counter-increment: railnum;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 2px 8px;
  white-space: nowrap;
  color: var(--dim);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease;
}

.rail-list a::before {
  content: counter(railnum, decimal-leading-zero);
  font-family: var(--head);
  font-size: 0.7rem;
  color: var(--gr);
  opacity: 0.85;
}

.rail-list a:hover,
.rail-list a.on {
  color: #FFFFFF;
  background: rgba(34, 211, 238, 0.1);
}

/* ---------- prose ---------- */
.prose {
  min-width: 0;
}

.prose > section {
  padding: 30px 0 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  scroll-margin-top: 132px;
}

.prose > section:first-child {
  padding-top: 0;
  border-top: 0;
}

.prose h2 {
  margin: 0 0 8px;
  font-family: var(--head);
  font-size: clamp(1.3rem, 3.4vw, 1.95rem);
  line-height: 1.36;
  font-weight: 700;
  background: linear-gradient(100deg, #FFFFFF, var(--cy) 62%, var(--gr));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.prose h2 + hr {
  margin: 0 0 20px;
  border: 0;
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, var(--cy), var(--gr));
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.55);
}

.prose h3 {
  margin: 26px 0 8px;
  font-size: 1.14rem;
  line-height: 1.5;
  color: #EDF5FF;
}

.prose p {
  margin: 0 0 16px;
}

.prose a {
  color: var(--cy);
  text-decoration: none;
  border-bottom: 1px solid rgba(34, 211, 238, 0.42);
}

.prose a:hover {
  color: var(--gr);
  border-color: var(--gr);
}

.prose ul,
.prose ol {
  margin: 0 0 18px;
  padding-left: 1.35em;
}

.prose li {
  margin: 0 0 8px;
}

.prose blockquote {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-left: 2px solid var(--gr);
  border-radius: 4px;
  background: var(--glass);
  color: #E9F3FF;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose figure {
  margin: 0 0 18px;
}

.prose img {
  display: block;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}

.prose th {
  color: var(--cy);
  font-weight: 600;
}

.prose code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(34, 211, 238, 0.13);
  font-size: 0.9em;
}

.prose hr {
  margin: 22px 0;
  border: 0;
  height: 1px;
  background: rgba(34, 211, 238, 0.22);
}

/* ---------- footer ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 16px;
  padding: 16px 18px 20px;
  border-top: 1px solid var(--line);
  background: rgba(11, 14, 20, 0.72);
}

.foot-nav p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  margin: 0;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  color: var(--dim);
  text-decoration: none;
  font-size: 0.89rem;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.foot-nav a:hover {
  color: var(--cy);
}

.foot-copy {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--dim);
}

/* ---------- reveal ---------- */
.js .rv {
  opacity: 0;
  transform: translateY(16px);
}

.js .rv.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* ---------- keyframes ---------- */
@keyframes drift {
  from { transform: translate3d(-2%, 0, 0); }
  to { transform: translate3d(2%, -2%, 0); }
}

@keyframes charIn {
  from { opacity: 0; transform: translateY(0.42em) scale(0.94); }
  to { opacity: 1; transform: none; }
}

@keyframes pop {
  from { opacity: 0; scale: 0.92; }
  to { opacity: 0.85; scale: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

/* ---------- responsive ---------- */
@media (min-width: 900px) {
  .reader {
    grid-template-columns: 218px minmax(0, 1fr);
    gap: 44px;
    align-items: start;
    padding-top: 40px;
  }

  .rail {
    position: sticky;
    top: 124px;
  }

  .rail-list {
    flex-direction: column;
    overflow: visible;
  }

  .rail-list a {
    border-bottom: 1px dashed rgba(34, 211, 238, 0.12);
    width: 100%;
    white-space: normal;
  }

  .rail-list a:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16.5px;
  }

  .stage {
    min-height: 48vh;
    padding: 38px 16px 34px;
  }

  .shot-wrap {
    opacity: 0.6;
  }

  .shot-wrap:nth-child(1) {
    top: 8%;
    left: 4px;
  }

  .shot-wrap:nth-child(2) {
    bottom: 6%;
    right: 4px;
  }
}

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

  .ghost,
  .kinetic .ch,
  .shot-wrap,
  .cue::before {
    animation: none !important;
  }

  .js .rv {
    opacity: 1;
    transform: none;
  }

  .shot-wrap {
    transform: rotate(var(--rot, 0deg));
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
