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

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

:root {
  --bg: #0d0d0d;
  --panel: #141018;
  --panel-2: #1a1424;
  --ink: #efe9ff;
  --body: #d6cfe4;
  --dim: #a99bc0;
  --p: #8000ff;
  --m: #ff00ff;
  --line: rgba(128, 0, 255, 0.28);
  --r: 28px;
  --max: 1180px;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.78;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.5;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 4px);
}

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

a { color: #ff86ff; }

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

/* top bar */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: 68px;
  z-index: 40;
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  padding: 0 10px;
  background: linear-gradient(180deg, rgba(13, 13, 13, 0.97), rgba(13, 13, 13, 0.76));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  justify-self: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-shadow: 0 0 16px rgba(255, 0, 255, 0.6);
}

.burger {
  width: 44px;
  height: 44px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}

.burger span {
  display: block;
  height: 2px;
  background: #e7d7ff;
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.75);
}

body.nav-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .burger span:nth-child(2) { opacity: 0; }
body.nav-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hud {
  justify-self: end;
  width: 14px;
  height: 14px;
  margin-right: 10px;
  border-radius: 4px;
  background: var(--p);
  box-shadow: 0 0 16px var(--m);
}

/* full screen menu */
.nav {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 92px 22px 40px;
  background: rgba(9, 8, 12, 0.97);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

body.nav-open .nav { opacity: 1; visibility: visible; }
body.nav-open { overflow: hidden; }

.nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 780px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 28px;
}

.nav li:nth-child(even) { text-align: right; }

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 6px 2px;
  color: #e3d6ff;
  text-decoration: none;
  font-size: clamp(19px, 3.4vw, 28px);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.16s ease;
}

.nav a:hover {
  color: #fff;
  text-shadow: 0 0 20px var(--m);
}

/* shell */
.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 92px 20px 24px;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.side {
  position: sticky;
  top: 92px;
  align-self: start;
  background: var(--panel);
  border-radius: var(--r);
  padding: 22px 16px;
}

.ttl {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #fff;
}

.tick {
  display: block;
  flex: none;
  width: 20px;
  height: 2px;
  background: var(--m);
  box-shadow: 0 0 12px var(--m);
}

.sidelist {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.sidelist a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 8px;
  font-size: 16px;
  color: var(--dim);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 0 10px 10px 0;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.sidelist a:hover,
.sidelist a:focus-visible {
  color: #fff;
  border-left-color: var(--m);
  background: rgba(128, 0, 255, 0.16);
}

/* main */
main { min-width: 0; }

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  min-height: 45vh;
  padding-bottom: 12px;
}

.hero-sub { min-height: 0; padding: 6px 0 18px; }

.badge {
  align-self: flex-start;
  padding: 6px 16px;
  font-size: 16px;
  letter-spacing: 0.1em;
  color: #ffd9ff;
  background: rgba(255, 0, 255, 0.12);
  border: 1px solid rgba(255, 0, 255, 0.5);
  border-radius: 999px;
}

h1 {
  position: relative;
  margin: 0;
  font-size: clamp(29px, 5.2vw, 52px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #fff;
  text-shadow: 0 0 26px rgba(128, 0, 255, 0.6);
}

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

h1::before {
  color: var(--m);
  clip-path: inset(0 0 58% 0);
  animation: glitch-a 5s steps(1) infinite;
}

h1::after {
  color: #9a48ff;
  clip-path: inset(58% 0 0 0);
  animation: glitch-b 6.4s steps(1) infinite;
}

@keyframes glitch-a {
  0%, 88%, 100% { transform: translate(0, 0); }
  90% { transform: translate(-3px, -1px) skewX(-3deg); }
  94% { transform: translate(2px, 1px); }
}

@keyframes glitch-b {
  0%, 84%, 100% { transform: translate(0, 0); }
  86% { transform: translate(3px, 1px) skewX(3deg); }
  92% { transform: translate(-2px, -1px); }
}

.lead {
  margin: 0;
  max-width: 56ch;
  color: var(--body);
  font-size: 17px;
}

.hero-media {
  overflow: hidden;
  border-radius: var(--r);
  background: var(--panel-2);
}

.hero-media img {
  width: 100%;
  max-height: 40vh;
  object-fit: cover;
  will-change: transform;
}

/* content */
article > section[id] {
  padding: 34px 0;
  border-top: 1px solid rgba(128, 0, 255, 0.18);
  scroll-margin-top: 92px;
}

article h2 {
  margin: 0 0 14px;
  font-size: clamp(21px, 3vw, 28px);
  line-height: 1.3;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  text-shadow: 0 0 18px rgba(255, 0, 255, 0.32);
}

article h3 {
  margin: 24px 0 10px;
  font-size: 19px;
  line-height: 1.4;
  color: #fff;
}

article p { margin: 0 0 16px; }
article ul,
article ol { margin: 0 0 16px; padding-left: 1.25em; }
article li { margin: 0 0 8px; }
article strong { color: #fff; }

article blockquote {
  margin: 18px 0;
  padding: 14px 20px;
  border-left: 2px solid var(--m);
  border-radius: 0 var(--r) var(--r) 0;
  background: var(--panel);
  color: #eadfff;
}

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

article a { text-decoration-color: rgba(255, 134, 255, 0.5); }

/* footer */
footer {
  max-width: var(--max);
  margin: 32px auto 0;
  padding: 34px 20px 44px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px 28px;
  align-items: start;
}

footer p { margin: 0; }

.f-brand {
  font-size: clamp(26px, 6.4vw, 54px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
  text-shadow: 0 0 30px rgba(255, 0, 255, 0.45);
  word-break: break-word;
}

.f-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  font-size: 16px;
}

.f-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--dim);
  text-decoration: none;
}

.f-links a:hover { color: #fff; text-shadow: 0 0 14px var(--m); }

footer small {
  grid-column: 1 / -1;
  font-size: 16px;
  color: #857a99;
  padding-top: 14px;
  border-top: 1px solid rgba(128, 0, 255, 0.16);
}

/* mobile */
@media (max-width: 860px) {
  .shell {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding-top: 86px;
  }

  main { order: 1; }
  .side { order: 2; position: static; width: 100%; }

  .sidelist {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 10px;
  }

  .sidelist a { border-radius: 10px; border-left-width: 2px; }

  footer { grid-template-columns: 1fr; }
  footer small { border-top: 0; padding-top: 0; }
}

@media (max-width: 640px) {
  .nav ol { grid-template-columns: 1fr; }
  .nav li:nth-child(even) { text-align: left; }
  .hero { min-height: 0; padding-top: 4px; }
  .hero-media img { max-height: 34vh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  h1::before, h1::after { animation: none; }
  .hero-media img { transform: none !important; }
}

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