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

:root{
  --ink:#192617;
  --ink-2:#101c0c;
  --neon:#87ff71;
  --mu:#ffce5c;
  --paper:#eaf7e2;
  --line:rgba(135,255,113,.26);
  --line-2:rgba(255,206,92,.32);
  --rail:210px;
}

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

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

body{
  margin:0;
  font-family:"Exo","PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  font-size:17px;
  line-height:1.72;
  color:var(--paper);
  background-color:var(--ink);
  background-image:
    radial-gradient(rgba(135,255,113,.15) 1px,transparent 1px),
    radial-gradient(rgba(255,206,92,.10) 1px,transparent 1px);
  background-size:24px 24px,24px 24px;
  background-position:0 0,12px 12px;
  overflow-x:hidden;
}

a{color:var(--mu)}

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

/* ---------- 左侧竖排导航 ---------- */
.rail{
  position:fixed;
  top:0;left:0;bottom:0;
  width:var(--rail);
  z-index:30;
  display:flex;
  flex-direction:column;
  gap:16px;
  padding:24px 16px 28px;
  overflow-y:auto;
  background:
    linear-gradient(180deg,#16240f 0%,#0d1709 100%);
  border-right:2px dashed var(--line);
  background-image:
    linear-gradient(180deg,rgba(22,36,15,.94),rgba(13,23,9,.97)),
    radial-gradient(rgba(135,255,113,.18) 1px,transparent 1px);
  background-size:auto,18px 18px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:46px;
  padding:6px 4px;
  color:var(--neon);
  text-decoration:none;
  font-weight:700;
  letter-spacing:.06em;
}

.mark{
  flex:0 0 24px;
  width:24px;height:24px;
  background:var(--mu);
  clip-path:polygon(50% 0,100% 100%,0 100%);
  transform:rotate(-9deg);
  transition:transform .25s ease;
}
.brand:hover .mark,.brand:focus-visible .mark{transform:rotate(9deg) scale(1.08)}
.mark-img{background:none;clip-path:none;transform:none;display:block}
.mark-img img{display:block;width:24px;height:24px;object-fit:contain}

.brand-t{font-size:19px;line-height:1.1}

.rail-h{
  margin:2px 0 0;
  font-family:"Roboto Mono",ui-monospace,monospace;
  font-size:12px;
  font-weight:500;
  letter-spacing:.32em;
  color:var(--mu);
}
.rail-h span{display:inline-block;border-bottom:2px dotted var(--line-2);padding-bottom:2px}

.rail nav{min-height:0}
.rail nav ul{
  list-style:none;
  margin:0;padding:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.rail nav a{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:9px 8px;
  color:var(--paper);
  text-decoration:none;
  font-size:16px;
  line-height:1.3;
  border-left:3px solid transparent;
  transition:background .18s ease,color .18s ease,transform .18s ease,border-color .18s ease;
}
.rail nav a:hover,.rail nav a:focus-visible{
  background:rgba(135,255,113,.11);
  color:var(--neon);
  border-left-color:var(--neon);
  transform:translateX(3px);
}

.ic{
  flex:0 0 11px;
  width:11px;height:11px;
  background:var(--mu);
  clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%);
  transition:background .18s ease,transform .18s ease;
}
.rail nav a:hover .ic{background:var(--neon);transform:rotate(45deg)}

/* ---------- 主体网格 ---------- */
main{
  margin-left:var(--rail);
  max-width:calc(1260px + var(--rail));
  padding:0 clamp(18px,4vw,56px) 72px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 258px;
  column-gap:clamp(24px,3vw,48px);
  align-items:start;
}

main > section{min-width:0}

/* ---------- 首屏 ---------- */
.hero{
  position:relative;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-end;
  text-align:right;
  padding:110px 0 84px;
  overflow:hidden;
}

.hero h1{
  position:relative;
  z-index:3;
  margin:0;
  max-width:12em;
  font-size:clamp(2.05rem,6.6vw,4.4rem);
  font-weight:700;
  line-height:1.08;
  letter-spacing:-.01em;
  color:var(--paper);
  mix-blend-mode:screen;
  text-shadow:0 0 32px rgba(135,255,113,.22);
}

.hero h1::after{
  content:"";
  display:block;
  height:10px;
  margin:22px 0 0 auto;
  width:min(58%,240px);
  background:var(--neon);
  clip-path:polygon(0 0,100% 0,100% 100%,18% 100%);
}

.hero-shapes{position:absolute;inset:0;z-index:1;pointer-events:none}

.sh{
  position:absolute;
  display:block;
  transform:translate3d(0,calc(var(--py,0) * 1px),0) rotate(var(--r,0deg));
  will-change:transform;
}

.sh-1{
  width:190px;height:190px;
  left:2%;top:12%;
  background:var(--neon);
  opacity:.8;
  --r:-11deg;
  clip-path:polygon(50% 0,100% 100%,0 100%);
  mix-blend-mode:screen;
}

.sh-2{
  width:132px;height:132px;
  right:9%;bottom:17%;
  border-radius:50%;
  background:var(--mu);
  opacity:.72;
  rotate:0deg;
  animation:spin 20s linear infinite;
  mix-blend-mode:screen;
}

.sh-3{
  width:240px;height:24px;
  left:20%;bottom:31%;
  --r:-4deg;
  background:repeating-linear-gradient(90deg,var(--neon) 0 9px,transparent 9px 18px);
  animation:march 1.8s linear infinite;
}

.sh-4{
  width:88px;height:88px;
  right:34%;top:9%;
  border:3px dotted var(--line-2);
  --r:14deg;
}

@keyframes spin{to{rotate:360deg}}
@keyframes march{to{background-position:36px 0}}

/* ---------- 正文容器 ---------- */
.body-in{padding-top:6px}

.body-in > div{
  position:relative;
  padding:34px 0 46px;
  border-top:2px dotted var(--line);
  scroll-margin-top:104px;
}
.body-in > div:first-child{border-top:0;padding-top:10px}

.body-in h2{
  margin:0 0 20px;
  font-size:clamp(1.42rem,3.1vw,2.05rem);
  line-height:1.22;
  letter-spacing:.005em;
  color:var(--neon);
}
.body-in h2 span{position:relative;display:inline-block}
.body-in h2 span::after{
  content:"";
  position:absolute;
  left:-2px;right:-8px;
  bottom:-6px;height:9px;
  background:var(--mu);
  opacity:.6;
  clip-path:polygon(0 70%,100% 0,100% 100%,0 100%);
}

.body-in h3{
  margin:26px 0 12px;
  font-size:1.16rem;
  line-height:1.35;
  color:var(--mu);
}
.body-in h3 span{display:inline-block;padding-bottom:2px;border-bottom:2px dotted var(--line-2)}

.body-in p{max-width:66ch;margin:0 0 17px}
.body-in strong{color:var(--neon);font-weight:600}

.body-in ul,.body-in ol{max-width:62ch;margin:0 0 18px;padding-left:22px}
.body-in li{margin:0 0 9px}
.body-in li::marker{color:var(--mu)}

.body-in a{color:var(--mu);text-decoration:underline dotted;text-underline-offset:3px}
.body-in a:hover{color:var(--neon)}

.body-in blockquote{
  margin:22px 0;
  padding:16px 18px;
  border-left:5px solid var(--neon);
  background:rgba(135,255,113,.07);
  max-width:62ch;
}
.body-in blockquote p:last-child{margin-bottom:0}

.body-in img{
  display:block;
  max-width:100%;
  height:auto;
  margin:20px 0;
  border:2px solid var(--line);
  box-shadow:8px 8px 0 rgba(255,206,92,.22);
}

.body-in table{
  display:block;
  width:100%;
  max-width:100%;
  overflow-x:auto;
  border-collapse:collapse;
  margin:20px 0;
  font-size:16px;
}
.body-in th,.body-in td{
  border:1px dotted var(--line);
  padding:9px 12px;
  text-align:left;
  white-space:nowrap;
}
.body-in th{color:var(--mu);background:rgba(255,206,92,.08)}

/* ---------- 右侧栏 ---------- */
.side{
  position:sticky;
  top:34px;
  margin-top:112px;
  padding:20px 16px 22px;
  border:2px dashed var(--line);
  background:
    radial-gradient(rgba(255,206,92,.14) 1px,transparent 1px) 0 0/16px 16px,
    rgba(16,28,12,.82);
}
.side::before{
  content:"";
  display:block;
  width:44px;height:44px;
  margin:-42px 0 14px;
  background:var(--mu);
  clip-path:polygon(0 0,100% 0,0 100%);
  transform:rotate(-6deg);
}

.side-h{
  margin:0 0 12px;
  font-family:"Roboto Mono",ui-monospace,monospace;
  font-size:12px;
  font-weight:500;
  letter-spacing:.28em;
  color:var(--mu);
}
.side-h span{display:inline-block;border-bottom:2px dotted var(--line-2);padding-bottom:3px}

.side-list{list-style:none;margin:0 0 14px;padding:0}
.side-list li + li{border-top:1px dotted rgba(135,255,113,.18)}
.side-list a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:8px 2px;
  color:var(--paper);
  text-decoration:none;
  font-size:16px;
  line-height:1.3;
}
.side-list a:hover,.side-list a:focus-visible{color:var(--neon)}

.totop{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:10px 12px;
  border:2px solid var(--neon);
  color:var(--neon);
  text-decoration:none;
  font-size:16px;
  letter-spacing:.08em;
  transition:background .18s ease,color .18s ease;
}
.totop:hover,.totop:focus-visible{background:var(--neon);color:var(--ink)}

/* ---------- 页脚 ---------- */
footer{
  margin-left:var(--rail);
  padding:26px clamp(18px,4vw,56px) 40px;
  border-top:2px dotted var(--line);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  text-align:center;
}
footer > div{margin:0}
footer p{margin:0;font-size:16px}
.f-brand p{font-family:"Roboto Mono",ui-monospace,monospace;letter-spacing:.18em;color:var(--neon)}
.f-top a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:6px 14px;
  color:var(--mu);
  text-decoration:none;
  border-bottom:2px dotted var(--line-2);
}
.f-top a:hover{color:var(--neon)}

/* ---------- 移动端 ---------- */
@media (max-width:900px){
  .rail{
    position:sticky;
    top:0;left:auto;bottom:auto;
    width:auto;
    flex-direction:row;
    align-items:center;
    gap:10px;
    padding:8px 12px;
    border-right:0;
    border-bottom:2px dashed var(--line);
    overflow:visible;
  }
  .rail-h{display:none}
  .brand{flex:0 0 auto;font-size:16px}
  .brand-t{font-size:17px}
  .rail nav{flex:1 1 auto;min-width:0;overflow-x:auto;overscroll-behavior-x:contain}
  .rail nav ul{flex-direction:row;gap:2px}
  .rail nav a{
    min-height:44px;
    padding:10px 12px;
    white-space:nowrap;
    border-left:0;
    border-bottom:3px solid transparent;
  }
  .rail nav a:hover,.rail nav a:focus-visible{transform:none;border-bottom-color:var(--neon)}
  .rail nav::-webkit-scrollbar{height:3px}
  .rail nav::-webkit-scrollbar-thumb{background:var(--line)}

  main{
    margin-left:0;
    grid-template-columns:minmax(0,1fr);
    padding:0 18px 52px;
    column-gap:0;
    row-gap:30px;
  }

  .hero{
    min-height:calc(100vh - 78px);
    padding:52px 0 56px;
  }
  .hero h1{font-size:clamp(1.95rem,8.4vw,3rem)}
  .sh-1{width:120px;height:120px;top:7%;left:0}
  .sh-2{width:86px;height:86px;right:4%;bottom:11%}
  .sh-3{width:150px;height:18px;left:10%;bottom:30%}
  .sh-4{width:60px;height:60px;right:26%;top:6%}

  .side{position:static;order:2;margin-top:0;padding-top:16px}
  .side::before{width:32px;height:32px;margin:-32px 0 12px}

  footer{margin-left:0;padding:22px 18px 36px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .sh,.mark,.ic,.rail nav a{animation:none!important;transition:none!important}
}

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