@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

:root {
  --ink: #1c1726;
  --violet: #6514ff;
  --magenta: #bf00ff;
  --paper: #120c1c;
  --panel: #1a1426;
  --line: rgba(191, 0, 255, .28);
  --text: #f1ebff;
  --muted: #b6a8dd;
  --font: "Share Tech Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow-x: hidden;
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(101, 20, 255, .13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(191, 0, 255, .09) 1px, transparent 1px);
  background-size: 56px 56px, 56px 56px;
  animation: gridslide 34s linear infinite;
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: .01em;
}

@keyframes gridslide {
  to { background-position: 56px 56px, 56px 56px; }
}

a { color: #dcd0ff; text-decoration: none; }
a:hover { color: #fff; }

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

::selection {
  background: var(--magenta);
  color: #fff;
}

/* ---------- 顶部细条 ---------- */
.ticker {
  overflow: hidden;
  background: var(--magenta);
  color: var(--ink);
  border-bottom: 1px solid rgba(0, 0, 0, .3);
}

.ticker__track {
  display: flex;
  gap: 34px;
  padding: 6px 0;
  width: max-content;
  white-space: nowrap;
  font-size: 13px;
  letter-spacing: .22em;
  animation: tickmove 26s linear infinite;
}

.ticker__item { position: relative; padding-left: 20px; }
.ticker__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
}
.ticker__item--alt { opacity: .72; }

@keyframes tickmove {
  to { transform: translateX(-33.3333%); }
}

/* ---------- 页头 / 导航 ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(18, 12, 28, .95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.top__in {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 2px;
  color: #fff;
  font-size: 18px;
  letter-spacing: .06em;
  flex: 0 0 auto;
}

.brand__mark {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  clip-path: polygon(0 0, 100% 0, 100% 66%, 66% 100%, 0 100%);
}

.brand__img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.brand__name {
  border-bottom: 2px solid var(--magenta);
  padding-bottom: 2px;
}

.nav { min-width: 0; max-width: 100%; }

.nav__list {
  display: flex;
  align-items: stretch;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: navc;
  overflow-x: auto;
  scrollbar-width: thin;
}

.nav__list > li { counter-increment: navc; }

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 13px;
  font-size: 16px;
  color: var(--muted);
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.nav__link::before {
  content: counter(navc, decimal-leading-zero);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--magenta);
}

.nav__link::after {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--violet);
  flex: 0 0 auto;
}

.nav__link:hover,
.nav__link:focus-visible {
  background: rgba(101, 20, 255, .22);
  border-color: var(--line);
  color: #fff;
}

.nav__link:hover::after { background: var(--magenta); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 72px 20px 84px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -12%;
  right: -12%;
  top: 34%;
  height: 48%;
  transform: skewY(-6deg);
  background: linear-gradient(100deg, var(--violet), var(--magenta) 62%, var(--violet));
  background-size: 220% 100%;
  animation: bandslide 16s ease-in-out infinite alternate;
  opacity: .92;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 42px);
  pointer-events: none;
}

@keyframes bandslide {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

.hero__in {
  max-width: 20ch;
  animation: rise .7s ease both;
}

.hero__title {
  margin: 0;
  font-size: clamp(34px, 7.4vw, 78px);
  line-height: 1.06;
  letter-spacing: -.02em;
  text-transform: none;
  text-shadow: 0 6px 34px rgba(28, 23, 38, .55);
  word-break: break-word;
}

.hero__desc {
  margin: 22px auto 0;
  max-width: 32ch;
  font-size: 17px;
  color: #fff;
  background: rgba(28, 23, 38, .62);
  border-left: 3px solid var(--magenta);
  padding: 10px 14px;
  text-align: left;
}

/* ---------- 主体 ---------- */
.main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 20px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: 48px;
  align-items: start;
}

.body { min-width: 0; }

.body > div {
  background: var(--panel);
  border-left: 4px solid var(--violet);
  box-shadow: 0 22px 46px -30px rgba(101, 20, 255, .95);
  padding: 26px clamp(16px, 3vw, 36px) 30px;
  margin-bottom: 48px;
  scroll-margin-top: 122px;
  animation: rise .6s ease both;
  transition: box-shadow .25s ease, border-color .25s ease;
}

.body > div:hover {
  border-left-color: var(--magenta);
  box-shadow: 0 26px 52px -26px rgba(191, 0, 255, .8);
}

.body > div:nth-child(1) { animation-delay: .06s; }
.body > div:nth-child(2) { animation-delay: .12s; }
.body > div:nth-child(3) { animation-delay: .18s; }
.body > div:nth-child(4) { animation-delay: .24s; }
.body > div:nth-child(5) { animation-delay: .3s; }
.body > div:nth-child(6) { animation-delay: .36s; }
.body > div:nth-child(7) { animation-delay: .42s; }
.body > div:nth-child(n+8) { animation-delay: .48s; }

.body > div:last-child { margin-bottom: 0; }

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

.body h2 {
  margin: 0 0 16px;
  font-size: clamp(21px, 3vw, 29px);
  line-height: 1.24;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
  word-break: break-word;
}

.body h2 > span,
.body h3 > span {
  background: linear-gradient(transparent 64%, rgba(191, 0, 255, .45) 64%);
  padding-bottom: 2px;
}

.body h3 {
  margin: 26px 0 12px;
  font-size: 19px;
  color: #f6f0ff;
}

.body p { margin: 0 0 16px; }
.body p:last-child { margin-bottom: 0; }

.body ul,
.body ol { margin: 0 0 16px; padding-left: 22px; }
.body li { margin-bottom: 8px; }

.body ul li::marker { color: var(--magenta); }
.body ol li::marker { color: var(--violet); }

.body blockquote {
  margin: 20px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--magenta);
  background: rgba(101, 20, 255, .12);
  color: #f3ecff;
}

.body strong { color: #fff; }

.body a { border-bottom: 1px solid rgba(191, 0, 255, .6); }

.body code {
  background: rgba(101, 20, 255, .18);
  padding: 1px 5px;
  font-size: .95em;
}

.body img { max-width: 100%; height: auto; display: block; }

/* ---------- 侧栏 ---------- */
.side {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 24px;
}

.side__box {
  background: var(--panel);
  border-top: 3px solid var(--magenta);
  padding: 16px 16px 18px;
  box-shadow: 0 18px 38px -28px rgba(191, 0, 255, .95);
}

.side__box--alt { border-top-color: var(--violet); }

.side__title {
  margin: 0 0 12px;
  font-size: 15px;
  letter-spacing: .2em;
  color: var(--muted);
  font-weight: 400;
}

.side__title > span { color: var(--magenta); }

.side__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.side__list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 4px;
  font-size: 16px;
  color: var(--muted);
  border-bottom: 1px dashed rgba(182, 168, 221, .26);
  transition: color .2s ease, padding-left .2s ease;
}

.side__list a:hover {
  color: #fff;
  padding-left: 8px;
}

.side__brand {
  margin: 0 0 14px;
  font-size: 16px;
  color: #fff;
}

.side__back {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--violet);
  color: #fff;
  transition: background-color .2s ease, border-color .2s ease;
}

.side__back:hover {
  background: var(--violet);
  border-color: var(--magenta);
}

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 56px;
  border-top: 3px solid var(--magenta);
  background: #150f20;
  padding: 40px 20px 22px;
}

.foot__grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 38px;
}

.foot__col { margin: 0; }

.foot__col dt {
  font-size: 14px;
  letter-spacing: .2em;
  color: var(--magenta);
  margin-bottom: 10px;
}

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

.foot__col dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--muted);
  transition: color .2s ease;
}

.foot__col dd a:hover { color: #fff; }

.foot__copy {
  max-width: 1180px;
  margin: 26px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  .main {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    padding-top: 40px;
  }
  .side {
    position: static;
    grid-template-columns: minmax(0, 1fr);
  }
  .body > div { scroll-margin-top: 24px; }
}

@media (max-width: 680px) {
  .top__in {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 14px;
  }
  .brand { font-size: 17px; }
  .nav { width: 100%; }
  .nav__list { padding-bottom: 2px; }
  .nav__link { padding: 10px 11px; font-size: 16px; }
  .hero {
    min-height: 62vh;
    padding: 54px 16px 62px;
  }
  .hero__in { max-width: 100%; }
  .hero__desc { font-size: 16px; }
  .main { padding: 32px 14px 16px; }
  .body > div {
    padding: 22px 16px 24px;
    margin-bottom: 32px;
  }
  .foot { padding: 32px 14px 18px; }
  .foot__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

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