:root{
  --ink:#171f26;
  --ice:#c8e0f4;
  --pink:#f5e0e8;
  --bg:#0e151b;
  --text:#dce9f3;
  --muted:#93a8b6;
  --glass:rgba(24,33,41,.72);
  --line:rgba(200,224,244,.10);
  --hi:rgba(200,224,244,.10);
  --lo:rgba(0,0,0,.6);
  --mono:"Space Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,"PingFang SC","Microsoft YaHei",monospace;
}

*{box-sizing:border-box}

html{
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
  scrollbar-color:rgba(200,224,244,.35) var(--bg);
}

body{
  margin:0;
  padding-bottom:158px;
  font-family:var(--mono);
  font-size:17px;
  line-height:1.75;
  color:var(--text);
  background:
    radial-gradient(900px 540px at 10% -10%,rgba(200,224,244,.11),transparent 62%),
    radial-gradient(760px 480px at 92% 6%,rgba(245,224,232,.09),transparent 64%),
    var(--bg);
  background-attachment:fixed;
  overflow-x:hidden;
}

img{max-width:100%;height:auto;display:block}
a{color:var(--pink)}
p{margin:0 0 16px}
h1,h2,h3{letter-spacing:-.2px}

/* ---------- 首屏 ---------- */

.page{display:block}

.hero{
  position:relative;
  isolation:isolate;
  min-height:100vh;
  min-height:100svh;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(190px,258px);
  gap:clamp(18px,4vw,52px);
  align-content:end;
  padding:120px clamp(18px,5vw,60px) clamp(120px,15vh,170px);
}

.hero-fig{
  position:absolute;
  inset:0;
  z-index:-1;
  margin:0;
  overflow:hidden;
  border-radius:0 0 30px 30px;
  background:
    radial-gradient(420px 300px at 78% 22%,rgba(245,224,232,.14),transparent 70%),
    linear-gradient(150deg,#1c2833,#101821 62%,#1a222c);
}

.hero-img{
  width:100%;
  height:100%;
  object-fit:cover;
  filter:saturate(.85) contrast(1.04);
}

.hero-veil{
  position:absolute;
  inset:0;
  background:linear-gradient(to top,
    rgba(14,21,27,.97) 5%,
    rgba(14,21,27,.78) 40%,
    rgba(14,21,27,.44) 76%,
    rgba(14,21,27,.52));
}

.hero-copy{
  grid-column:1;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:16px;
  text-align:right;
}

.hero-h1{
  margin:0;
  font-size:clamp(30px,5.6vw,58px);
  line-height:1.12;
  font-weight:700;
  color:#fff;
  text-shadow:0 8px 30px rgba(0,0,0,.65);
}

.hero-desc{
  margin:0;
  max-width:44ch;
  font-size:clamp(15px,1.9vw,18px);
  line-height:1.85;
  color:var(--ice);
}

/* ---------- 右侧目录 ---------- */

.side{
  grid-column:2;
  align-self:end;
  padding:16px 14px 18px;
  border-radius:18px;
  background:var(--glass);
  border:1px solid var(--line);
  backdrop-filter:blur(14px) saturate(1.15);
  box-shadow:-7px -7px 20px var(--hi),12px 12px 28px rgba(0,0,0,.65);
}

.side-h{
  margin:0 0 10px;
  font-size:14px;
  font-weight:400;
  letter-spacing:.26em;
  color:var(--muted);
}

.side-list{
  list-style:none;
  margin:14px 0 0;
  padding:0;
  display:grid;
  gap:3px;
}

.side-list a{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:40px;
  padding:6px 10px;
  border-radius:12px;
  font-size:15px;
  color:var(--text);
  text-decoration:none;
  transition:background .15s ease,box-shadow .15s ease;
}

.side-list a:hover{
  background:rgba(200,224,244,.07);
  box-shadow:inset 2px 2px 6px var(--lo),inset -2px -2px 6px var(--hi);
}

.idx{
  font-size:12px;
  color:var(--pink);
  opacity:.7;
  letter-spacing:.05em;
}

/* ---------- 正文分区 ---------- */

.page > article:not(.hero){
  max-width:840px;
  margin:24px auto;
  padding:clamp(20px,4vw,38px);
  border-radius:18px;
  background:linear-gradient(155deg,rgba(200,224,244,.055),rgba(245,224,232,.028));
  border:1px solid var(--line);
  box-shadow:-6px -6px 18px var(--hi),12px 12px 30px var(--lo);
  scroll-margin-top:80px;
}

.page > article:not(.hero) > :first-child{margin-top:0}
.page > article:not(.hero) > :last-child{margin-bottom:0}

.page h2{
  margin:0 0 4px;
  font-size:clamp(21px,3.1vw,28px);
  line-height:1.35;
  color:#eef5fb;
}

.page h2 + hr{margin:0 0 20px}

.page h3{
  margin:26px 0 10px;
  font-size:19px;
  line-height:1.5;
  color:var(--pink);
}

.page hr{
  height:5px;
  border:0;
  border-radius:999px;
  background:rgba(10,15,20,.55);
  box-shadow:inset 2px 2px 5px rgba(0,0,0,.75),inset -2px -2px 5px rgba(200,224,244,.16);
}

.side hr{
  height:4px;
  border:0;
  margin:0;
  border-radius:999px;
  background:rgba(10,15,20,.5);
  box-shadow:inset 2px 2px 4px rgba(0,0,0,.7),inset -2px -2px 4px rgba(200,224,244,.14);
}

.page p{line-height:1.9}
.page strong,.page b{color:#fff}
.page ul,.page ol{margin:0 0 18px;padding-left:1.35em}
.page li{margin:6px 0}
.page li::marker{color:var(--pink)}

.page blockquote{
  margin:20px 0;
  padding:14px 18px;
  border-radius:14px;
  background:rgba(245,224,232,.06);
  box-shadow:inset 3px 3px 8px var(--lo),inset -3px -3px 8px var(--hi);
}

.page blockquote > :last-child{margin-bottom:0}

.page a{
  text-underline-offset:3px;
  text-decoration-thickness:1px;
}

.page figure{margin:20px 0;border-radius:14px;overflow:hidden}
.page figcaption{font-size:14px;color:var(--muted);padding:10px 2px}
.page img{border-radius:14px}

/* ---------- 底部固定玻璃条 ---------- */

.dock{
  position:fixed;
  z-index:60;
  left:12px;
  right:12px;
  bottom:12px;
  padding:8px 12px calc(8px + env(safe-area-inset-bottom));
  border-radius:18px;
  background:rgba(20,28,35,.8);
  border:1px solid var(--line);
  backdrop-filter:blur(16px) saturate(1.25);
  box-shadow:-8px -8px 22px var(--hi),14px 14px 34px rgba(0,0,0,.72);
}

.dock-top{position:relative}

.brand{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  padding:6px 4px;
  font-size:clamp(14px,3.6vw,20px);
  font-weight:700;
  letter-spacing:.02em;
  color:#fff;
  text-decoration:none;
  white-space:nowrap;
}

.dock-nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.dock-dl,
.dock-fold-dl{
  margin:0;
  padding:0;
  display:flex;
  align-items:center;
  gap:2px;
}

.dock-dl dt,.dock-fold-dl dt{
  font-size:10px;
  letter-spacing:.1em;
  color:var(--muted);
  opacity:.65;
  padding-right:2px;
}

.dock-dd{margin:0}
.dock dd{margin:0}

.dock-dl a,
.dock-fold-dl a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:6px 5px;
  border-radius:12px;
  font-size:clamp(13px,3.5vw,16px);
  color:var(--text);
  text-decoration:none;
  white-space:nowrap;
  transition:box-shadow .15s ease,color .15s ease;
}

.dock-dl a:hover,
.dock-fold-dl a:hover{
  color:#fff;
  box-shadow:-3px -3px 8px var(--hi),4px 4px 10px var(--lo);
}

.dock-dl a[aria-current]{
  color:#fff;
  box-shadow:inset 3px 3px 7px var(--lo),inset -3px -3px 7px var(--hi);
}

.dock-fold{position:relative;flex:0 0 auto}

.dock-fold summary{
  list-style:none;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:40px;
  padding:6px 10px;
  border-radius:12px;
  font-size:clamp(13px,3.5vw,16px);
  color:var(--ice);
  box-shadow:-3px -3px 9px var(--hi),4px 4px 11px var(--lo);
}

.dock-fold summary::-webkit-details-marker{display:none}

.dock-fold summary::after{
  content:"＋";
  font-size:12px;
  line-height:1;
  color:var(--muted);
}

.dock-fold[open] summary{
  box-shadow:inset 3px 3px 7px var(--lo),inset -3px -3px 7px var(--hi);
}

.dock-fold[open] summary::after{content:"－"}

.dock-fold-dl{
  position:absolute;
  right:0;
  bottom:calc(100% + 12px);
  display:grid;
  gap:2px;
  min-width:172px;
  padding:12px;
  border-radius:16px;
  background:rgba(20,28,35,.95);
  border:1px solid var(--line);
  backdrop-filter:blur(14px);
  box-shadow:-8px -8px 20px var(--hi),12px 12px 28px rgba(0,0,0,.75);
}

.dock-fold-dl a{justify-content:flex-start;width:100%}
.dock-fold-dl dt{padding-bottom:4px}

.dock-bottom{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  padding-top:4px;
  margin-top:2px;
  border-top:1px solid rgba(200,224,244,.07);
}

.dock-bottom p{
  margin:0;
  font-size:13px;
  letter-spacing:.04em;
  color:var(--muted);
}

.totop{
  display:inline-flex;
  align-items:center;
  min-height:36px;
  padding:4px 10px;
  border-radius:11px;
  font-size:13px;
  color:var(--muted);
  text-decoration:none;
  box-shadow:-3px -3px 8px var(--hi),3px 3px 8px var(--lo);
}

.totop:hover{color:#fff}

/* ---------- 入场动画 ---------- */

@media (prefers-reduced-motion: no-preference){
  .js [data-reveal]{
    opacity:0;
    transform:translateY(16px);
    transition:opacity .6s ease,transform .6s cubic-bezier(.22,.7,.3,1);
    transition-delay:calc(var(--i,0) * 70ms);
    will-change:opacity,transform;
  }
  .js [data-reveal].in{opacity:1;transform:none}
}

/* ---------- 窄屏 ---------- */

@media (max-width:860px){
  body{
    font-size:16px;
    padding-bottom:172px;
  }

  .hero{
    grid-template-columns:1fr;
    align-content:start;
    gap:20px;
    padding:96px 18px 150px;
  }

  .hero-copy{
    align-items:flex-start;
    text-align:left;
    gap:12px;
  }

  .hero-h1{font-size:clamp(28px,8.4vw,40px)}
  .hero-desc{max-width:none;font-size:15px}

  .side{
    grid-column:1;
    align-self:start;
    padding:14px 12px 16px;
  }

  .side-h{letter-spacing:.2em;font-size:13px}

  .side-list{
    grid-template-columns:1fr 1fr;
    gap:2px;
  }

  .side-list a{font-size:14px;padding:6px 8px;min-height:40px}

  .page > article:not(.hero){
    margin:18px 12px;
    padding:20px 16px;
    scroll-margin-top:60px;
  }

  .dock{left:8px;right:8px;bottom:8px;padding-left:10px;padding-right:10px}
}

@media (max-width:380px){
  .dock-dl dt,.dock-fold-dl dt{display:none}
  .dock-dl a,.dock-fold-dl a{padding:6px 4px;font-size:13px}
  .brand{font-size:14px}
}

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
}

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