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

:root{
  --ink:#1a1a2e;
  --ink-deep:#0a0a14;
  --ink-soft:#22223c;
  --paper:#f4f2ff;
  --muted:#a9a7c9;
  --red:#ff0000;
  --mag:#ff006e;
  --line:rgba(255,0,110,.24);
  --d:"Space Grotesk","Inter","PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  --b:"Inter","PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  --m:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
}

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

html{scroll-behavior:smooth}

body{
  margin:0;
  min-height:100vh;
  font-family:var(--b);
  font-size:17px;
  line-height:1.68;
  color:var(--paper);
  background:
    radial-gradient(1100px 620px at 84% -8%, rgba(255,0,110,.20), transparent 62%),
    radial-gradient(900px 560px at 2% 14%, rgba(255,0,0,.15), transparent 60%),
    linear-gradient(180deg,#0c0c18 0%,#12101f 42%,#0a0a14 100%);
  background-attachment:fixed;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}

body::before{
  content:"";
  position:fixed;
  left:0;right:0;bottom:0;
  height:36vh;
  pointer-events:none;
  z-index:0;
  background-image:
    linear-gradient(rgba(255,0,110,.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,0,110,.13) 1px, transparent 1px);
  background-size:100% 44px, 44px 100%;
  transform:perspective(420px) rotateX(62deg);
  transform-origin:bottom center;
  opacity:.55;
  -webkit-mask-image:linear-gradient(to top,#000,transparent 92%);
  mask-image:linear-gradient(to top,#000,transparent 92%);
}

body::after{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:70;
  background:repeating-linear-gradient(to bottom, rgba(255,255,255,.05) 0 1px, rgba(0,0,0,0) 1px 3px);
  mix-blend-mode:overlay;
}

a{color:inherit;text-decoration:none}
a:focus-visible{outline:2px solid var(--mag);outline-offset:3px}

/* 顶栏 */
.masthead{
  position:sticky;
  top:0;
  z-index:50;
  background:linear-gradient(180deg, rgba(10,10,20,.96), rgba(10,10,20,.70));
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(255,255,255,.07);
}

.masthead__nav{
  max-width:1180px;
  margin:0 auto;
  padding:0 24px;
  min-height:74px;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:14px;
}

.masthead__group{
  display:flex;
  gap:2px;
  margin:0;
  padding:0;
  list-style:none;
}
.masthead__group--left{justify-self:start}
.masthead__group--right{justify-self:end}

.masthead__group a{
  position:relative;
  display:block;
  padding:12px 12px;
  font-size:16px;
  letter-spacing:.02em;
  color:var(--muted);
  transition:color .18s ease, text-shadow .18s ease;
}
.masthead__group a::after{
  content:"";
  position:absolute;
  left:12px;right:12px;bottom:6px;
  height:2px;
  background:linear-gradient(90deg,var(--red),var(--mag));
  transform:scaleX(0);
  transform-origin:right center;
  transition:transform .22s ease;
}
.masthead__group a:hover,
.masthead__group a:focus-visible{
  color:#fff;
  text-shadow:0 0 12px rgba(255,0,110,.9);
}
.masthead__group a:hover::after,
.masthead__group a:focus-visible::after{
  transform:scaleX(1);
  transform-origin:left center;
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  font-family:var(--d);
  font-weight:700;
  font-size:18px;
  letter-spacing:.05em;
  color:#fff;
  white-space:nowrap;
  text-shadow:0 0 18px rgba(255,0,110,.85);
}
.brand__mark{
  width:12px;height:12px;
  background:linear-gradient(135deg,var(--red),var(--mag));
  border-radius:3px;
  box-shadow:0 0 14px var(--mag);
  transition:transform .3s ease;
}
.brand:hover .brand__mark{transform:rotate(90deg) scale(1.2)}

/* 骨架 */
.shell{
  position:relative;
  z-index:1;
  max-width:1180px;
  margin:0 auto;
  padding:0 24px;
  display:grid;
  grid-template-columns:212px minmax(0,1fr);
  gap:34px;
  align-items:start;
}

/* 左侧索引 */
.rail{
  position:sticky;
  top:92px;
  padding:28px 0 16px;
}
.rail__list{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin:0;
  padding:0;
  list-style:none;
}
.rail__list a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 10px;
  border-radius:10px;
  font-size:16px;
  color:var(--muted);
  transition:color .18s ease, background .18s ease, box-shadow .18s ease;
}
.rail__n{
  font-family:var(--m);
  font-size:12px;
  letter-spacing:.06em;
  color:var(--mag);
  opacity:.7;
}
.rail__list a:hover,
.rail__list a:focus-visible{
  color:#fff;
  background:rgba(255,0,110,.10);
  box-shadow:inset 0 0 0 1px rgba(255,0,110,.38);
}
.rail__list a:hover .rail__n{opacity:1}

/* 正文主容器 */
.main{min-width:0}
.doc{padding-bottom:8px}

.hero{
  min-height:45vh;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-end;
  text-align:right;
  gap:14px;
  padding:42px 0 32px;
}
.hero__title{
  margin:0;
  font-family:var(--d);
  font-weight:700;
  font-size:clamp(38px,8.5vw,86px);
  line-height:1.04;
  letter-spacing:-.02em;
  color:#fff;
  text-shadow:
    0 0 18px rgba(255,0,110,.85),
    6px 0 0 rgba(255,0,0,.45),
    -6px 0 0 rgba(255,255,255,.14);
  animation:glitch 7s steps(1) infinite;
}
.hero__sub{
  margin:0;
  max-width:36ch;
  font-size:16px;
  color:var(--muted);
}

@keyframes glitch{
  0%,86%,100%{
    transform:none;
    text-shadow:0 0 18px rgba(255,0,110,.85),6px 0 0 rgba(255,0,0,.45),-6px 0 0 rgba(255,255,255,.14);
  }
  88%{
    transform:translate(-2px,1px) skewX(-3deg);
    text-shadow:-8px 0 0 rgba(255,0,110,.95),8px 0 0 rgba(255,0,0,.6);
  }
  91%{
    transform:translate(2px,-1px) skewX(2deg);
    text-shadow:8px 0 0 rgba(255,0,110,.95),-8px 0 0 rgba(255,0,0,.6);
  }
  94%{transform:none}
}

/* 正文分段块 */
section > article{
  position:relative;
  margin:0 0 26px;
  padding:30px 28px 34px;
  border-radius:18px;
  background:linear-gradient(180deg,#20203a,#191932);
  box-shadow:
    0 26px 64px -46px rgba(255,0,110,.95),
    inset 0 1px 0 rgba(255,255,255,.05);
  scroll-margin-top:112px;
}
section > article:nth-of-type(even){
  background:linear-gradient(180deg,#1d1d35,#15152a);
}

section small{
  display:block;
  margin:0 0 8px;
  font-family:var(--m);
  font-size:12px;
  letter-spacing:.24em;
  color:var(--mag);
}
section h2{
  margin:0 0 14px;
  font-family:var(--d);
  font-size:clamp(23px,3.6vw,32px);
  line-height:1.26;
  letter-spacing:-.01em;
  color:#fff;
  text-shadow:0 0 16px rgba(255,0,110,.62);
}
section h3{
  margin:26px 0 10px;
  font-family:var(--d);
  font-size:19px;
  line-height:1.4;
  color:#fff;
}
section p{margin:0 0 16px;color:#d7d5eb}
section ul,section ol{margin:0 0 18px;padding-left:1.25em;color:#d7d5eb}
section li{margin:0 0 8px}
section strong{color:#fff}
section em{color:var(--mag);font-style:normal}
section a{
  color:var(--mag);
  text-decoration:underline;
  text-underline-offset:3px;
}
section a:hover{text-shadow:0 0 12px rgba(255,0,110,.9)}
section blockquote{
  margin:0 0 18px;
  padding:14px 18px;
  border-left:3px solid var(--red);
  background:rgba(255,0,0,.08);
  border-radius:0 14px 14px 0;
  color:#e8e6f6;
}
section img{max-width:100%;height:auto;border-radius:14px;display:block}
section hr{
  height:1px;
  border:0;
  margin:24px 0;
  background:linear-gradient(90deg,var(--red),var(--mag),transparent);
}
section code,section pre{font-family:var(--m);font-size:15px}
section pre{
  overflow-x:auto;
  padding:14px 16px;
  border-radius:14px;
  background:#101020;
}

/* 页脚 */
.foot{
  position:relative;
  z-index:1;
  max-width:1180px;
  margin:26px auto 0;
  padding:0 24px 44px;
}
.foot__cta{
  padding:52px 0 38px;
  border-top:1px solid var(--line);
}
.foot__cta small{
  display:block;
  margin:0 0 10px;
  font-family:var(--m);
  font-size:12px;
  letter-spacing:.3em;
  color:var(--mag);
}
.foot__cta h2{
  margin:0;
  font-family:var(--d);
  font-size:clamp(30px,7.5vw,58px);
  line-height:1.12;
  letter-spacing:-.02em;
}
.foot__cta h2 a{
  display:inline-block;
  padding:6px 0;
  color:#fff;
  text-shadow:0 0 22px rgba(255,0,110,.8),0 0 60px rgba(255,0,0,.42);
  transition:transform .25s ease, text-shadow .25s ease;
}
.foot__cta h2 a:hover{
  transform:translateX(8px);
  text-shadow:0 0 26px rgba(255,0,110,1),0 0 80px rgba(255,0,0,.7);
}
.foot__bar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.08);
  font-size:16px;
  color:var(--muted);
}
.foot__bar p{margin:0}
.foot__bar a{
  display:inline-block;
  padding:12px 0;
  color:var(--mag);
}
.foot__bar a:hover{text-shadow:0 0 12px rgba(255,0,110,.9)}

/* 滚动显现 */
@keyframes rise{
  from{opacity:.12;transform:translate3d(0,26px,0)}
  to{opacity:1;transform:none}
}
@supports (animation-timeline: view()){
  @media (prefers-reduced-motion: no-preference){
    section > article{
      animation:rise linear both;
      animation-timeline:view();
      animation-range:entry 2% cover 26%;
    }
  }
}

/* 移动端 */
@media (max-width:900px){
  .masthead{position:static}
  .masthead__nav{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    align-items:center;
    padding:8px 10px 6px;
    min-height:0;
    gap:2px;
  }
  .brand{
    order:-1;
    flex:0 0 100%;
    justify-content:center;
    padding:8px 0 6px;
    font-size:17px;
  }
  .masthead__group{flex-wrap:wrap;justify-content:center;gap:2px}
  .masthead__group a{padding:8px 9px;font-size:16px}
  .masthead__group a::after{left:9px;right:9px;bottom:4px}

  .shell{display:block;padding:0 16px}

  .rail{
    position:sticky;
    top:0;
    z-index:45;
    margin:0 -16px 6px;
    padding:8px 12px;
    overflow-x:auto;
    background:rgba(10,10,20,.95);
    -webkit-backdrop-filter:blur(8px);
    backdrop-filter:blur(8px);
    border-bottom:1px solid var(--line);
  }
  .rail__list{flex-direction:row;gap:6px}
  .rail__list a{
    min-height:44px;
    padding:8px 12px;
    border-radius:999px;
    white-space:nowrap;
    background:rgba(255,0,110,.09);
  }

  .hero{min-height:0;padding:30px 0 24px}
  .hero__title{font-size:clamp(32px,10vw,54px)}

  section > article{
    padding:22px 16px 26px;
    border-radius:16px;
    scroll-margin-top:72px;
  }

  .foot{padding:0 16px 34px}
  .foot__cta{padding:38px 0 28px}
}

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

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