@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@700&display=swap');

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

:root {
  color-scheme: dark;
  --void: #000000;
  --coal: #121212;
  --glass: rgba(18, 18, 18, .62);
  --line: rgba(255, 255, 255, .08);
  --blue-line: rgba(96, 138, 255, .26);
  --text: #e9edf6;
  --soft: #c9d2e2;
  --dim: #97a2b7;
  --neon: #5b8cff;
  --neon-soft: rgba(91, 140, 255, .16);
  --mint: #7cf2c8;
  --r: 4px;
  --sans: "Space Grotesk", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

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

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 90;
  padding: 10px 16px;
  min-height: 44px;
  background: var(--coal);
  border: 1px solid var(--blue-line);
  border-radius: var(--r);
  text-decoration: none;
  font-size: 16px;
  transition: top .2s ease;
}
.skip:focus { top: 12px; }

/* ---------- top bar ---------- */
.top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px clamp(14px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: var(--void);
}

.brand {
  justify-self: center;
  text-decoration: none;
  color: #fff;
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: .34em;
  text-indent: .34em;
  padding: 6px 2px;
  text-shadow: 0 0 14px rgba(91, 140, 255, .5);
}

.touch {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 16px;
  text-decoration: none;
  color: var(--mint);
  border: 1px solid rgba(124, 242, 200, .32);
  border-radius: var(--r);
  background: rgba(124, 242, 200, .06);
  transition: background .2s ease, color .2s ease;
}
.touch:hover,
.touch:focus-visible { background: rgba(124, 242, 200, .16); color: #fff; }
.touch-gap { display: block; width: 70px; }

/* ---------- overlay menu ---------- */
.menu { position: relative; z-index: 80; }

.menu > summary {
  position: relative;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 12px;
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--blue-line);
  border-radius: var(--r);
  background: rgba(91, 140, 255, .08);
  transition: background .2s ease;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { background: rgba(91, 140, 255, .2); }

.bars { display: block; width: 16px; }
.bars i {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--neon);
  border-radius: 2px;
  transition: transform .2s ease;
}
.menu-word { font-size: 16px; color: var(--text); }

.menu-list {
  position: fixed;
  inset: 0;
  z-index: 70;
  margin: 0;
  padding: clamp(68px, 13vh, 130px) clamp(18px, 7vw, 72px) 48px;
  list-style: none;
  background: rgba(0, 0, 0, .97);
  backdrop-filter: blur(8px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  animation: fade .22s ease both;
}
.menu-list a {
  display: block;
  min-height: 44px;
  padding: 14px 0;
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  color: #fff;
  border-bottom: 1px solid var(--line);
  transition: color .2s ease, padding-left .2s ease;
}
.menu-list a:hover,
.menu-list a:focus-visible {
  color: var(--neon);
  padding-left: 10px;
  text-shadow: 0 0 12px rgba(91, 140, 255, .6);
}

/* ---------- sticky anchor rail ---------- */
.rail {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px clamp(8px, 3vw, 26px);
  background: rgba(0, 0, 0, .84);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail-side {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rail a {
  display: inline-block;
  min-height: 40px;
  padding: 9px 11px;
  font-size: 16px;
  line-height: 22px;
  white-space: nowrap;
  text-decoration: none;
  color: var(--dim);
  border-radius: var(--r);
  transition: color .2s ease, background .2s ease;
}
.rail a:hover,
.rail a:focus-visible,
.rail a.on { color: #fff; background: var(--neon-soft); }
.rail-mark {
  flex: 0 0 auto;
  padding: 0 4px;
  color: var(--neon);
  font-size: 16px;
  animation: spin 16s linear infinite;
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(16px, 4vw, 48px);
  min-height: calc(100svh - 70px);
  padding: clamp(30px, 6vw, 70px) clamp(16px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: radial-gradient(80% 90% at 78% 40%, rgba(24, 42, 92, .5), transparent 70%), var(--void);
}
.hero-copy { text-align: center; min-width: 0; }
.hero-title {
  margin: 0;
  font-size: clamp(1.95rem, 6.4vw, 4.9rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: .05em;
  text-indent: .05em;
  color: #fff;
  overflow-wrap: anywhere;
  text-shadow: 0 0 10px rgba(91, 140, 255, .65), 0 0 46px rgba(40, 90, 220, .45);
}
.hero-media {
  min-width: 0;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--blue-line);
  box-shadow: 0 24px 70px rgba(20, 50, 140, .28);
}
.hero-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: saturate(.92) contrast(1.06) brightness(.94);
}

/* ---------- main grid ---------- */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: clamp(14px, 4vw, 40px);
}
.main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  align-items: start;
  gap: clamp(18px, 3vw, 40px);
  padding-block: clamp(24px, 5vw, 56px) clamp(40px, 7vw, 84px);
}
.main > article { min-width: 0; }

/* ---------- prose / glass cards ---------- */
.prose > section {
  position: relative;
  margin: 0 0 clamp(16px, 3vw, 26px);
  padding: clamp(18px, 3.4vw, 34px);
  scroll-margin-top: 76px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r);
  backdrop-filter: blur(9px);
  animation: rise .5s ease both;
}
.prose > section:target { border-color: var(--blue-line); }
.prose > section:nth-child(2) { animation-delay: .05s; }
.prose > section:nth-child(3) { animation-delay: .1s; }
.prose > section:nth-child(4) { animation-delay: .15s; }
.prose > section:nth-child(5) { animation-delay: .2s; }
.prose > section:nth-child(6) { animation-delay: .25s; }
.prose > section:nth-child(7) { animation-delay: .3s; }

.prose h1 {
  margin: 0 0 .5em;
  font-size: clamp(1.85rem, 4.4vw, 2.8rem);
  line-height: 1.2;
  letter-spacing: .01em;
  color: #fff;
}
.prose h2 {
  margin: 1.5em 0 .5em;
  font-size: clamp(1.32rem, 2.8vw, 1.78rem);
  line-height: 1.3;
  color: #fff;
}
.prose > section > h2:first-child { margin-top: 0; }
.prose h2::before {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-bottom: .55em;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--neon), rgba(91, 140, 255, 0));
}
.prose h3 {
  margin: 1.3em 0 .4em;
  font-size: 1.1rem;
  color: var(--mint);
  letter-spacing: .02em;
}
.prose p,
.prose li { color: var(--soft); }
.prose strong { color: #fff; }
.prose a { color: var(--neon); text-underline-offset: 3px; }
.prose a:hover { color: var(--mint); }
.prose ul,
.prose ol { margin: 0 0 1em; padding-left: 1.15em; }
.prose li { margin: .35em 0; }
.prose blockquote {
  margin: 1.2em 0;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--neon);
  color: var(--dim);
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.prose img { border-radius: var(--r); margin: 1em 0; border: 1px solid var(--line); }
.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 16px;
}
.prose th,
.prose td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose code {
  padding: 1px 6px;
  border-radius: var(--r);
  background: rgba(91, 140, 255, .14);
  font-size: .92em;
}

/* ---------- aside ---------- */
.side { min-width: 0; }
.side-box {
  position: sticky;
  top: 72px;
  padding: 18px;
  background: var(--glass);
  border: 1px solid var(--blue-line);
  border-radius: var(--r);
  backdrop-filter: blur(9px);
  box-shadow: 0 18px 50px rgba(10, 24, 70, .3);
}
.side h2 {
  margin: 0;
  font-size: 1.14rem;
  color: #fff;
  letter-spacing: .1em;
}
.side .subtitle {
  margin: .2em 0 1em;
  font-size: 16px;
  color: var(--dim);
  letter-spacing: .18em;
}
.side-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.side-list a {
  display: block;
  min-height: 40px;
  padding: 9px 10px;
  font-size: 16px;
  line-height: 22px;
  text-decoration: none;
  color: var(--dim);
  border-left: 2px solid transparent;
  border-radius: 0 var(--r) var(--r) 0;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.side-list li:nth-child(n) { animation: rise .45s ease both; }
.side-list li:nth-child(2) { animation-delay: .04s; }
.side-list li:nth-child(3) { animation-delay: .08s; }
.side-list li:nth-child(4) { animation-delay: .12s; }
.side-list li:nth-child(5) { animation-delay: .16s; }
.side-list li:nth-child(6) { animation-delay: .2s; }
.side-list li:nth-child(7) { animation-delay: .24s; }
.side-list a:hover,
.side-list a:focus-visible {
  color: #fff;
  background: rgba(91, 140, 255, .1);
  border-left-color: var(--neon);
}
.to-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 14px;
  padding: 0 12px;
  font-size: 16px;
  text-decoration: none;
  color: var(--neon);
  border: 1px solid var(--blue-line);
  border-radius: var(--r);
  transition: background .2s ease, color .2s ease;
}
.to-top:hover,
.to-top:focus-visible { background: var(--neon-soft); color: #fff; }

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--blue-line);
  padding: clamp(26px, 6vw, 56px) clamp(16px, 4vw, 40px) 34px;
  text-align: center;
  background: var(--void);
}
.foot-brand p {
  margin: 0;
  font-size: clamp(2.5rem, 13vw, 7rem);
  font-weight: 700;
  line-height: .96;
  letter-spacing: .06em;
  text-indent: .06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(120, 160, 255, .6);
  text-shadow: 0 0 34px rgba(40, 90, 220, .25);
}
.foot-meta p {
  margin: clamp(14px, 3vw, 22px) 0 0;
  font-size: 16px;
  color: var(--dim);
}

/* ---------- keyframes ---------- */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .main { grid-template-columns: minmax(0, 1fr); }
  .side { order: 2; }
  .side-box { position: static; }
  .rail { justify-content: flex-start; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 20px 16px 26px;
    gap: 16px;
  }
  .hero-title { font-size: clamp(1.7rem, 8.2vw, 2.3rem); line-height: 1.16; letter-spacing: .03em; text-indent: .03em; }
  .hero-media { max-height: 148px; }
  .hero-img { aspect-ratio: 16 / 7; }
  .top { padding: 10px 14px; }
  .brand { font-size: 1rem; letter-spacing: .26em; text-indent: .26em; }
  .touch { padding: 0 11px; }
}

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

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