@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Merriweather:wght@300;400;700&display=swap');

:root{
  --ink:#192617;
  --ink-deep:#0f1a0e;
  --neon:#87ff71;
  --mustard:#ffce5c;
  --text:#e6f6dd;
  --dim:#bcd8b0;
  --line:#2f4a2a;
  --dock:74px;
}

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

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

body{
  margin:0;
  min-height:100vh;
  font-family:Merriweather,"Songti SC","Noto Serif SC",Georgia,serif;
  font-size:17px;
  line-height:1.85;
  color:var(--text);
  background-color:var(--ink);
  background-image:
    radial-gradient(rgba(255,206,92,.18) 1.5px,transparent 1.6px),
    radial-gradient(rgba(135,255,113,.14) 1.5px,transparent 1.6px);
  background-size:30px 30px,30px 30px;
  background-position:0 0,15px 15px;
  padding-bottom:calc(var(--dock) + 28px);
  overflow-x:hidden;
}

img{max-width:100%}
main{display:block}
main [id]{scroll-margin-top:96px}

h1,h2,h3,.stamp,.foot__brand{
  font-family:"Abril Fatface","Songti SC","Noto Serif SC",Georgia,serif;
  font-weight:400;
  letter-spacing:.01em;
}

a{color:var(--neon)}

/* 角落徽标 */
.mark{
  position:fixed;
  top:14px;
  left:14px;
  z-index:80;
  width:56px;
  height:56px;
  display:grid;
  place-items:center;
  background:var(--mustard);
  border:3px solid var(--ink-deep);
  border-radius:4px;
  transform:rotate(-8deg);
  box-shadow:5px 5px 0 rgba(135,255,113,.55);
  transition:transform .18s ease;
}
.mark:hover,.mark:focus-visible{transform:rotate(4deg) scale(1.04)}
.mark__img{width:100%;height:100%;object-fit:cover;border-radius:2px;display:block}
.mark__shape{
  width:26px;height:24px;background:var(--ink-deep);
  clip-path:polygon(50% 0,100% 100%,0 100%);
}

/* 首屏 */
.hero{
  position:relative;
  display:grid;
  grid-template-columns:1.05fr .95fr;
  grid-template-areas:"art copy";
  align-items:center;
  gap:clamp(16px,4vw,48px);
  min-height:100vh;
  min-height:100svh;
  padding:100px clamp(18px,5vw,64px) 76px;
  overflow:hidden;
  border-bottom:6px solid var(--neon);
}
.hero::before{
  content:"";
  position:absolute;
  left:-10%;
  right:-10%;
  bottom:-6%;
  height:46%;
  background:var(--mustard);
  opacity:.15;
  clip-path:polygon(0 62%,11% 32%,25% 68%,39% 24%,55% 64%,69% 28%,85% 66%,100% 34%,100% 100%,0 100%);
  pointer-events:none;
}
.hero__copy{
  grid-area:copy;
  position:relative;
  z-index:3;
  justify-self:end;
  max-width:600px;
  text-align:right;
}
.hero h1{
  margin:.35em 0 .3em;
  font-size:clamp(2.5rem,6.6vw,5rem);
  line-height:.98;
  color:var(--neon);
  text-shadow:5px 5px 0 var(--ink-deep),11px 11px 0 rgba(255,206,92,.5);
}
.hero__lead{
  margin:0;
  font-size:17px;
  line-height:1.75;
  color:var(--dim);
  max-width:34ch;
  margin-left:auto;
}
.stamp{
  display:inline-block;
  padding:.3rem .95rem;
  background:var(--mustard);
  color:var(--ink-deep);
  font-size:1rem;
  border:3px solid var(--ink-deep);
  border-radius:4px;
  transform:rotate(3deg);
  box-shadow:4px 4px 0 var(--neon);
}

/* 拼贴 */
.collage{
  grid-area:art;
  position:relative;
  min-height:min(64vh,520px);
}
.collage__fig{
  position:absolute;
  margin:0;
  overflow:hidden;
  background:var(--ink-deep);
  border:5px solid var(--mustard);
  border-radius:4px;
  box-shadow:12px 12px 0 rgba(135,255,113,.3);
}
.collage__fig img{display:block;width:100%;height:100%;object-fit:cover}
.collage__fig--a{
  left:1%;
  top:6%;
  width:62%;
  aspect-ratio:3/4;
  transform:rotate(-7deg);
  clip-path:polygon(0 6%,100% 0,96% 100%,4% 94%);
}
.collage__fig--b{
  right:0;
  bottom:1%;
  width:54%;
  aspect-ratio:1/1;
  transform:rotate(6deg);
  clip-path:polygon(8% 0,100% 8%,92% 96%,0 88%);
  mix-blend-mode:normal;
}
.deco{position:absolute;pointer-events:none;z-index:2}
.deco--tri{
  top:-6px;
  right:-14px;
  width:108px;
  height:98px;
  background:var(--neon);
  clip-path:polygon(50% 0,100% 100%,0 100%);
  transform:rotate(12deg);
}
.deco--ring{
  left:-22px;
  bottom:12%;
  width:84px;
  height:84px;
  border:8px dashed var(--mustard);
  border-radius:50%;
  animation:spin 26s linear infinite;
  mix-blend-mode:screen;
}
.deco--wave{
  left:12%;
  top:-4px;
  width:132px;
  height:22px;
  border-radius:40px;
  background:repeating-linear-gradient(90deg,var(--neon) 0 9px,transparent 9px 18px);
  transform:rotate(-5deg);
}
@keyframes spin{to{transform:rotate(360deg)}}

/* 正文骨架 */
.wrap{
  max-width:1160px;
  margin:0 auto;
  padding:clamp(36px,6vw,76px) clamp(16px,5vw,40px) 44px;
}
.stage{
  display:grid;
  grid-template-columns:minmax(0,1fr) 168px;
  gap:clamp(24px,4vw,56px);
  align-items:start;
}
.prose{min-width:0}

.prose h2{
  margin:2.1em 0 .25em;
  font-size:clamp(1.65rem,3.5vw,2.5rem);
  line-height:1.16;
  color:var(--mustard);
}
.prose h2:first-child,.prose > *:first-child{margin-top:0}
.prose h2::before{
  content:"";
  display:block;
  width:76px;
  height:13px;
  margin-bottom:.55rem;
  background:var(--neon);
  clip-path:polygon(0 100%,13% 0,27% 100%,41% 0,55% 100%,69% 0,83% 100%,100% 0,100% 100%);
}
.prose h3{
  margin:1.7em 0 .2em;
  font-size:clamp(1.3rem,2.6vw,1.65rem);
  line-height:1.3;
  color:var(--neon);
}
.prose p{margin:0 0 1.05em}
.prose ul,.prose ol{margin:0 0 1.2em;padding-left:1.35em}
.prose li{margin:.35em 0}
.prose li::marker{color:var(--mustard)}
.prose a{color:var(--neon);text-decoration-thickness:2px;text-underline-offset:4px;word-break:break-word}
.prose a:hover{background:rgba(135,255,113,.16)}
.prose img{
  display:block;
  width:auto;
  max-width:100%;
  height:auto;
  margin:1.4em 0;
  border:4px solid var(--mustard);
  border-radius:4px;
}
.prose hr{
  height:0;
  margin:1.15rem 0 1.5rem;
  border:0;
  border-top:3px dashed var(--neon);
  opacity:.75;
}
.prose blockquote{
  margin:1.5em 0;
  padding:.9em 1.1em;
  border-left:6px solid var(--mustard);
  background:rgba(135,255,113,.07);
  color:var(--dim);
  border-radius:0 4px 4px 0;
}
.prose blockquote p:last-child{margin:0}
.prose strong{color:var(--mustard)}
.prose code{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:.92em;
  background:rgba(135,255,113,.14);
  padding:.1em .35em;
  border-radius:3px;
}
.prose section[id]{padding-top:.6rem}

/* 右侧导轨 */
.rail{position:relative}
.rail__nav{position:sticky;top:26px}
.rail__nav ul{
  counter-reset:r;
  list-style:none;
  margin:0;
  padding:0;
  border-left:3px dashed var(--line);
}
.rail__nav li{counter-increment:r}
.rail__nav li a{
  display:flex;
  align-items:baseline;
  gap:.5rem;
  min-height:44px;
  padding:.4rem .2rem .4rem .8rem;
  margin-left:-3px;
  font-size:16px;
  line-height:1.45;
  color:var(--dim);
  text-decoration:none;
  border-left:3px solid transparent;
  transition:color .15s ease,border-color .15s ease,background .15s ease;
}
.rail__nav li a::before{
  content:counter(r,decimal-leading-zero);
  font-family:"Abril Fatface",Georgia,serif;
  font-size:.9rem;
  color:var(--mustard);
  opacity:.85;
}
.rail__nav li a:hover,.rail__nav li a:focus-visible{
  color:var(--neon);
  border-left-color:var(--neon);
  background:rgba(135,255,113,.08);
}
.totop{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  margin-top:1.4rem;
  padding:.5rem 1rem;
  font-family:inherit;
  font-size:16px;
  color:var(--ink-deep);
  background:var(--neon);
  border:3px solid var(--ink-deep);
  border-radius:4px;
  text-decoration:none;
  box-shadow:4px 4px 0 var(--mustard);
  transition:transform .16s ease,box-shadow .16s ease;
}
.totop:hover,.totop:focus-visible{transform:translate(-2px,-2px);box-shadow:7px 7px 0 var(--mustard)}

/* 页脚 */
.foot{
  max-width:1160px;
  margin:0 auto;
  padding:34px clamp(16px,5vw,40px) 26px;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px 18px;
  border-top:6px solid var(--neon);
}
.foot p{margin:0;font-size:16px;line-height:1.6}
.foot p a{
  display:block;
  min-height:40px;
  padding:.35rem 0;
  color:var(--dim);
  text-decoration:none;
  border-bottom:2px dotted transparent;
}
.foot p a:hover,.foot p a:focus-visible{color:var(--neon);border-bottom-color:var(--neon)}
.foot__brand{font-size:1.35rem;line-height:1.3}
.foot__brand a{color:var(--mustard);min-height:44px}
.foot__note{
  grid-column:1/-1;
  display:block;
  margin-top:8px;
  padding-top:14px;
  text-align:center;
  font-size:16px;
  letter-spacing:.08em;
  color:var(--mustard);
  border-top:2px dotted var(--line);
}

/* 底部固定条 */
.dock{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:90;
  background:rgba(15,26,14,.97);
  border-top:3px dashed var(--neon);
}
.dock__nav ul{
  display:flex;
  justify-content:center;
  gap:4px;
  list-style:none;
  margin:0;
  padding:6px 8px;
  overflow-x:auto;
  scrollbar-width:none;
}
.dock__nav ul::-webkit-scrollbar{display:none}
.dock__link{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  min-height:54px;
  min-width:54px;
  padding:.2rem .45rem;
  font-size:16px;
  line-height:1.2;
  white-space:nowrap;
  color:var(--dim);
  text-decoration:none;
  border-radius:4px;
  border-bottom:3px solid transparent;
  transition:color .15s ease,background .15s ease,border-color .15s ease;
}
.dock__link:hover,.dock__link:focus-visible,.dock__link:active{
  color:var(--neon);
  background:rgba(135,255,113,.1);
  border-bottom-color:var(--mustard);
}
.dock__ico{
  display:block;
  width:18px;
  height:16px;
  background:var(--mustard);
  transition:transform .18s ease;
}
.dock__link:hover .dock__ico{transform:rotate(-14deg) scale(1.15)}
.dock__item:nth-child(even) .dock__ico{background:var(--neon)}
.dock__item:nth-child(1) .dock__ico{clip-path:polygon(50% 0,100% 100%,0 100%)}
.dock__item:nth-child(2) .dock__ico{border-radius:50%}
.dock__item:nth-child(3) .dock__ico{clip-path:polygon(0 0,100% 0,100% 100%,0 100%);transform:rotate(12deg)}
.dock__item:nth-child(4) .dock__ico{clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%)}
.dock__item:nth-child(5) .dock__ico{clip-path:polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)}
.dock__item:nth-child(6) .dock__ico{clip-path:polygon(0 40%,100% 0,100% 60%,0 100%)}
.dock__item:nth-child(7) .dock__ico{clip-path:polygon(0 0,100% 0,50% 100%)}

/* 滚动显现 */
.rv{opacity:0;transform:translateY(20px)}
.rv.in{opacity:1;transform:none;transition:opacity .62s ease,transform .62s cubic-bezier(.2,.8,.2,1)}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .rv,.rv.in{opacity:1;transform:none;transition:none}
  .deco--ring{animation:none}
  .mark,.totop,.dock__ico{transition:none}
}

/* 窄屏 */
@media (max-width:860px){
  .hero{
    grid-template-columns:1fr;
    grid-template-areas:"copy" "art";
    gap:26px;
    padding:88px 20px 54px;
  }
  .hero__copy{justify-self:stretch;max-width:none}
  .hero h1{font-size:clamp(2.35rem,10.5vw,3.4rem)}
  .hero__lead{margin-left:auto;max-width:30ch}
  .collage{min-height:300px}
  .deco--tri{width:76px;height:70px}
  .deco--ring{width:60px;height:60px;border-width:6px}
  .deco--wave{width:100px}
  .wrap{padding:34px 18px 30px}
  .stage{grid-template-columns:1fr;gap:30px}
  .rail__nav{position:static}
  .rail__nav ul{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:2px 12px;
    padding-top:12px;
    border-left:0;
    border-top:3px dashed var(--line);
  }
  .rail__nav li a{margin-left:0;border-left:0;border-bottom:2px dotted var(--line);padding-left:.2rem}
  .rail__nav li a:hover,.rail__nav li a:focus-visible{border-bottom-color:var(--neon)}
  .foot{grid-template-columns:1fr 1fr;padding-bottom:22px}
  .dock__nav ul{justify-content:flex-start}
}

@media (max-width:420px){
  .dock__link{min-width:50px;padding:.2rem .3rem}
  .dock__txt{font-size:16px}
}

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