:root {
  --void: #0a0a14;
  --ink: #1a1a2e;
  --red: #ff0000;
  --pink: #ff006e;
  --cyan: #00e5ff;
  --txt: #e8e8f6;
  --dim: #a3a3c0;
  --line: rgba(255, 0, 110, 0.26);
  --soft: rgba(255, 255, 255, 0.08);
  --font: "Varela Round", "Nunito Sans", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.72;
  color: var(--txt);
  background-color: var(--void);
  background-image:
    radial-gradient(680px 420px at 12% -6%, rgba(255, 0, 110, 0.24), transparent 68%),
    radial-gradient(620px 400px at 92% 4%, rgba(0, 229, 255, 0.14), transparent 70%),
    radial-gradient(900px 700px at 50% 110%, rgba(255, 0, 0, 0.14), transparent 72%),
    linear-gradient(180deg, #0a0a14 0%, #10101f 46%, #0b0b16 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0 1px, rgba(0, 0, 0, 0) 1px 3px);
  mix-blend-mode: screen;
  opacity: 0.65;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 79;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 58%, rgba(0, 0, 0, 0.55) 100%);
}

img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.18s ease, text-shadow 0.18s ease, border-color 0.18s ease;
}

a:hover { color: #fff; text-shadow: 0 0 12px var(--pink); }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 22px;
  position: relative;
  z-index: 2;
}

/* 顶部导航 */
.masthead {
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 40;
}

.masthead::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--pink), var(--red), transparent);
  opacity: 0.8;
}

.nav__rail {
  list-style: none;
  margin: 0;
  padding: 12px 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto 1fr 1fr 1fr 1fr;
  align-items: center;
  gap: 4px 10px;
}

.nav__cell--l { justify-self: start; }
.nav__cell--r { justify-self: end; }

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 8px;
  font-size: 16px;
  color: var(--dim);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.nav__link::before {
  content: "";
  width: 7px;
  height: 7px;
  border: 1px solid var(--pink);
  transform: rotate(45deg);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.nav__rail > li:nth-child(2n) .nav__link::before {
  border-radius: 50%;
  border-color: var(--cyan);
  transform: none;
}

.nav__link:hover,
.nav__link.is-active {
  color: #fff;
  border-bottom-color: var(--pink);
}

.nav__link:hover::before,
.nav__link.is-active::before {
  background: var(--pink);
  box-shadow: 0 0 10px var(--pink);
}

.nav__cell--brand { justify-self: center; }

.brand {
  position: relative;
  display: inline-block;
  padding: 8px 16px;
  font-size: 20px;
  letter-spacing: 0.14em;
  color: #fff;
  text-transform: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 0, 110, 0.08);
  text-shadow: 0 0 10px rgba(255, 0, 110, 0.9), 0 0 22px rgba(255, 0, 0, 0.45);
  white-space: nowrap;
}

.brand__glow {
  position: absolute;
  inset: -1px;
  border-radius: 10px;
  box-shadow: 0 0 18px rgba(255, 0, 110, 0.55);
  opacity: 0.5;
  pointer-events: none;
}

.brand:hover .brand__glow { opacity: 1; }

/* 主视觉 */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  align-items: center;
  gap: 36px;
  min-height: 45vh;
  padding: 52px 0 44px;
  border-bottom: 1px solid var(--line);
  background-image: radial-gradient(rgba(255, 0, 110, 0.2) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: 0 0;
  scroll-margin-top: 12px;
}

.hero__copy { position: relative; z-index: 2; }

.hero__title {
  margin: 0 0 16px;
  font-size: clamp(32px, 6.4vw, 60px);
  line-height: 1.14;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.5),
    0 0 24px rgba(255, 0, 110, 0.75),
    0 0 48px rgba(255, 0, 0, 0.45);
}

.glitch { position: relative; display: inline-block; }

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.glitch::before {
  color: var(--cyan);
  clip-path: inset(0 0 62% 0);
  transform: translate(-2px, -2px);
  opacity: 0.75;
  animation: glitch-a 5s steps(1) infinite;
}

.glitch::after {
  color: var(--pink);
  clip-path: inset(56% 0 0 0);
  transform: translate(2px, 2px);
  opacity: 0.75;
  animation: glitch-b 6.5s steps(1) infinite;
}

@keyframes glitch-a {
  0%, 88%, 100% { transform: translate(-2px, -2px); }
  90% { transform: translate(-6px, -1px); }
  93% { transform: translate(3px, -3px); }
  96% { transform: translate(-1px, 2px); }
}

@keyframes glitch-b {
  0%, 84%, 100% { transform: translate(2px, 2px); }
  86% { transform: translate(6px, 1px); }
  90% { transform: translate(-3px, 3px); }
  94% { transform: translate(1px, -2px); }
}

.hero__lede {
  margin: 0;
  max-width: 46ch;
  font-size: 17px;
  color: #dedee9;
  line-height: 1.74;
}

.hero__art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(26, 26, 46, 0.9), rgba(10, 10, 20, 0.9)),
    repeating-linear-gradient(90deg, rgba(0, 229, 255, 0.16) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(0deg, rgba(255, 0, 110, 0.16) 0 1px, transparent 1px 14px);
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(255, 0, 110, 0.16), 0 0 26px rgba(255, 0, 110, 0.14);
}

.hero__sun {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffd000 0%, var(--red) 46%, var(--pink) 100%);
  box-shadow: 0 0 34px rgba(255, 0, 110, 0.7);
  position: relative;
  overflow: hidden;
}

.hero__sun::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52%;
  background: repeating-linear-gradient(180deg, rgba(10, 10, 20, 0) 0 5px, rgba(10, 10, 20, 0.85) 5px 8px);
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  z-index: 1;
}

/* 侧栏 + 正文 */
.board {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 40px;
  padding: 40px 0 72px;
  align-items: start;
}

.side {
  position: sticky;
  top: 96px;
  padding: 20px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.72), rgba(10, 10, 20, 0.58));
  box-shadow: inset 0 0 30px rgba(0, 229, 255, 0.06);
}

.side__head {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: 0.14em;
  color: #fff;
  text-shadow: 0 0 10px var(--pink);
}

.side .subtitle {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--dim);
}

.side__list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: side-c;
}

.side__list li { counter-increment: side-c; }

.side__list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 2px;
  font-size: 16px;
  color: var(--dim);
  border-bottom: 1px dashed var(--soft);
}

.side__list a::before {
  content: counter(side-c, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--pink);
  letter-spacing: 0.06em;
}

.side__list a:hover,
.side__list a.is-active {
  color: #fff;
  text-shadow: 0 0 10px var(--pink);
}

.doc { min-width: 0; }

.doc > div {
  padding: 34px 0 40px;
  border-bottom: 1px solid var(--soft);
  border-left: 3px solid transparent;
  padding-left: 0;
  scroll-margin-top: 24px;
  transition: border-color 0.3s ease, padding-left 0.3s ease;
}

.doc > div:last-child { border-bottom: 0; }

.doc > div:hover { border-left-color: var(--pink); padding-left: 16px; }

.doc h2 {
  margin: 0 0 10px;
  font-size: clamp(23px, 3.4vw, 31px);
  line-height: 1.32;
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 0, 110, 0.6);
}

.doc h3 {
  margin: 26px 0 8px;
  font-size: 20px;
  color: #ffd8e6;
}

.doc p { margin: 0 0 15px; color: #dcdce9; }

.doc p.subtitle,
.doc .subtitle {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--pink);
  margin-bottom: 16px;
}

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

.doc li { margin-bottom: 8px; }

.doc li::marker { color: var(--pink); }

.doc blockquote {
  margin: 20px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--red);
  border-radius: 0 10px 10px 0;
  background: rgba(255, 0, 110, 0.08);
  color: #f3d4e0;
}

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

.doc figure {
  margin: 22px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(26, 26, 46, 0.6);
  border-bottom: 3px solid var(--pink);
}

.doc figcaption {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
}

.doc img { border-radius: 6px; }

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

.doc th,
.doc td {
  border: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
}

.doc th { background: rgba(255, 0, 110, 0.12); color: #fff; }

.doc hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--pink), transparent);
  margin: 26px 0;
}

.doc strong { color: #fff; }

/* 页脚 */
.foot {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr 0.95fr 1.35fr;
  gap: 22px;
  padding: 38px 0 26px;
  border-top: 1px solid var(--line);
  box-shadow: inset 0 22px 40px -32px rgba(255, 0, 110, 0.7);
}

.foot__col { margin: 0; font-size: 16px; color: var(--dim); }

.foot__col--brand { display: flex; flex-direction: column; gap: 10px; }

.foot__brand {
  font-size: 19px;
  letter-spacing: 0.12em;
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 0, 110, 0.8);
}

.foot__top {
  align-self: flex-start;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 15px;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.foot__top:hover { color: #fff; border-color: var(--pink); }

.foot__links a {
  display: inline-block;
  padding: 6px 0;
  min-height: 40px;
  line-height: 28px;
  color: var(--dim);
  font-size: 16px;
}

.foot__links a:hover { color: #fff; }

.foot__sub {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.foot__field {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: rgba(10, 10, 20, 0.7);
}

.foot__tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--pink);
}

.foot__input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--txt);
  font-family: var(--font);
  font-size: 16px;
}

.foot__input::placeholder { color: rgba(163, 163, 192, 0.7); }

.foot__btn {
  min-height: 42px;
  padding: 8px 18px;
  font-family: var(--font);
  font-size: 16px;
  color: #fff;
  cursor: pointer;
  border: 1px solid var(--pink);
  border-radius: 10px;
  background: rgba(255, 0, 110, 0.16);
  box-shadow: 0 0 16px rgba(255, 0, 110, 0.3);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.foot__btn:hover {
  background: rgba(255, 0, 110, 0.34);
  box-shadow: 0 0 26px rgba(255, 0, 110, 0.55);
}

.foot__note {
  grid-column: 1 / -1;
  display: block;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px dashed var(--soft);
  text-align: center;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: rgba(163, 163, 192, 0.8);
}

/* 入场微动效 */
.nav__rail > li,
.side__list li {
  animation: rise 0.5s ease both;
}

.nav__rail > li:nth-child(2) { animation-delay: 0.05s; }
.nav__rail > li:nth-child(3) { animation-delay: 0.1s; }
.nav__rail > li:nth-child(4) { animation-delay: 0.15s; }
.nav__rail > li:nth-child(5) { animation-delay: 0.2s; }
.nav__rail > li:nth-child(6) { animation-delay: 0.25s; }
.nav__rail > li:nth-child(7) { animation-delay: 0.3s; }
.nav__rail > li:nth-child(8) { animation-delay: 0.35s; }

.side__list li:nth-child(2) { animation-delay: 0.04s; }
.side__list li:nth-child(3) { animation-delay: 0.08s; }
.side__list li:nth-child(4) { animation-delay: 0.12s; }
.side__list li:nth-child(5) { animation-delay: 0.16s; }
.side__list li:nth-child(6) { animation-delay: 0.2s; }
.side__list li:nth-child(7) { animation-delay: 0.24s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 平板 */
@media (min-width: 900px) {
  .masthead {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 20, 0.9);
    backdrop-filter: blur(9px);
  }
  .doc > div { scroll-margin-top: 104px; }
}

@media (max-width: 980px) {
  .nav__rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-items: center;
  }
  .nav__cell--l,
  .nav__cell--r { justify-self: center; }
  .nav__cell--brand { grid-column: 1 / -1; justify-self: center; order: -1; }
  .board { grid-template-columns: 200px minmax(0, 1fr); gap: 28px; }
}

/* 手机 */
@media (max-width: 760px) {
  body { font-size: 17px; }
  .shell { padding: 0 15px; }

  .nav__rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 8px;
    padding: 10px 0 12px;
  }
  .nav__link { min-height: 44px; justify-content: center; font-size: 16px; padding: 10px 4px; }
  .brand { font-size: 19px; padding: 8px 14px; }

  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
    min-height: 0;
    padding: 34px 0 30px;
  }
  .hero__art { min-height: 132px; }
  .hero__sun { width: 76px; height: 76px; }
  .hero__lede { font-size: 17px; }

  .board {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 26px 0 52px;
  }

  .side { position: static; top: auto; }

  .doc > div { padding: 26px 0 30px; }
  .doc > div:hover { padding-left: 0; border-left-color: transparent; }

  .foot {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 30px 0 22px;
  }
  .foot__col--brand { grid-column: 1 / -1; }
  .foot__sub { grid-column: 1 / -1; }
  .foot__note { margin-top: 4px; font-size: 12px; }
}

@media (max-width: 400px) {
  .nav__rail { grid-template-columns: 1fr; }
  .nav__cell--brand { order: -1; }
}

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

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