:root{
  --ink:#171f26;
  --ink-hi:#212d39;
  --ink-lo:#0e141a;
  --blue:#c8e0f4;
  --pink:#f5e0e8;
  --tx:#d6e3ee;
  --dim:#9db2c2;
  --card:rgba(200,224,244,.055);
  --line:rgba(200,224,244,.13);
  --soft:6px 6px 18px var(--ink-lo), -6px -6px 18px var(--ink-hi);
  --soft-sm:4px 4px 12px var(--ink-lo), -4px -4px 12px var(--ink-hi);
  --soft-in:inset 4px 4px 9px var(--ink-lo), inset -4px -4px 9px var(--ink-hi);
}

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

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

body{
  margin:0;
  min-height:100vh;
  font-family:'Nunito','PingFang SC','Hiragino Sans GB','Microsoft YaHei',system-ui,sans-serif;
  font-size:17px;
  line-height:1.78;
  color:var(--tx);
  background:
    radial-gradient(880px 560px at 10% -6%,rgba(200,224,244,.16),transparent 62%),
    radial-gradient(760px 520px at 94% 4%,rgba(245,224,232,.14),transparent 60%),
    radial-gradient(680px 520px at 50% 104%,rgba(200,224,244,.09),transparent 66%),
    var(--ink);
  background-repeat:no-repeat;
  background-attachment:scroll;
}

h1,h2,h3,.brand{
  font-family:'Fredoka','Nunito','PingFang SC','Hiragino Sans GB','Microsoft YaHei',system-ui,sans-serif;
  font-weight:600;
  letter-spacing:.01em;
}

img{max-width:100%;display:block;height:auto;}

a{color:var(--blue);}

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

/* ---------- 顶部导航 ---------- */
.masthead{
  position:sticky;
  top:0;
  z-index:30;
  padding:12px 18px;
  background:linear-gradient(180deg,rgba(23,31,38,.97),rgba(23,31,38,.74));
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(200,224,244,.1);
}

.navwrap{
  max-width:1200px;
  margin:0 auto;
}

.nav{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:6px 10px;
}

.navlist{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
  margin:0;
  padding:0;
  list-style:none;
  flex:1 1 0;
  min-width:0;
}

.nav > ul:first-of-type{justify-content:flex-end;}
.nav > ul:last-of-type{justify-content:flex-start;}

.navlist a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:8px 14px;
  border-radius:14px;
  font-size:16px;
  color:#cfe0ee;
  text-decoration:none;
  background:linear-gradient(145deg,#1e2a35,#151d25);
  box-shadow:var(--soft-sm);
  transition:transform .15s ease,box-shadow .15s ease,color .15s ease;
}

.navlist a:hover{
  color:#fff;
  transform:translateY(-2px);
  box-shadow:var(--soft);
}

.navlist a:active{
  transform:translateY(0) scale(.97);
  box-shadow:var(--soft-in);
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:9px;
  flex:0 0 auto;
  min-height:48px;
  padding:0 20px;
  border-radius:999px;
  font-size:20px;
  font-weight:700;
  letter-spacing:.05em;
  color:#ecf4fb;
  text-decoration:none;
  background:linear-gradient(145deg,#243240,#161f27);
  box-shadow:var(--soft);
}

.brand .dot{
  width:11px;
  height:11px;
  border-radius:50%;
  background:linear-gradient(140deg,var(--blue),var(--pink));
  box-shadow:0 0 12px rgba(245,224,232,.85);
}

/* ---------- 主布局 ---------- */
main{
  max-width:1200px;
  margin:0 auto;
  padding:26px 20px 0;
  display:grid;
  grid-template-columns:minmax(0,1fr) 248px;
  gap:30px;
  align-items:start;
}

div{min-width:0;}

/* ---------- 头图 ---------- */
.hero{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height:70vh;
  padding:46px 0 0;
  text-align:center;
  overflow:hidden;
  border:1px solid rgba(200,224,244,.1);
  border-radius:4px;
  background:linear-gradient(160deg,rgba(200,224,244,.12),rgba(245,224,232,.06) 58%,rgba(200,224,244,.02));
  box-shadow:10px 10px 26px var(--ink-lo), -10px -10px 26px var(--ink-hi);
}

.hero-text{
  max-width:44ch;
  margin:0 auto;
  padding:0 22px;
}

.hero h1{
  margin:0 0 14px;
  font-size:clamp(28px,4.6vw,46px);
  line-height:1.26;
  font-weight:700;
}

.hero h1 span{
  background-image:linear-gradient(100deg,var(--blue),var(--pink));
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  color:var(--blue);
}

.hero-sub{
  margin:0;
  font-size:17px;
  line-height:1.75;
  color:var(--dim);
}

.band{
  width:100%;
  height:38px;
  margin-top:30px;
  background:linear-gradient(90deg,var(--blue),var(--pink));
  clip-path:polygon(0 0,100% 62%,100% 100%,0 38%);
}

.hero-media{
  width:100%;
  overflow:hidden;
}

.hero-media img,
.hero-media .hero-img{
  width:100%;
  height:clamp(170px,32vh,300px);
  object-fit:cover;
}

/* ---------- 正文区块 ---------- */
div > article:not(.hero){
  margin:22px 0;
  padding:26px 24px;
  border:1px solid var(--line);
  border-radius:4px;
  background:var(--card);
  backdrop-filter:blur(9px);
  -webkit-backdrop-filter:blur(9px);
  box-shadow:6px 6px 20px rgba(9,13,18,.55);
  scroll-margin-top:100px;
}

div h2{
  margin:0 0 12px;
  font-size:clamp(22px,2.9vw,28px);
  line-height:1.36;
  color:#e9f2fa;
}

div h2 span{color:var(--blue);}

div h3{
  margin:22px 0 8px;
  font-size:20px;
  line-height:1.4;
  color:var(--pink);
}

div h3 span{color:var(--pink);}

div p{margin:0 0 14px;color:#cfdde9;}

div p:last-child,
div ul:last-child,
div ol:last-child{margin-bottom:0;}

div ul,
div ol{margin:0 0 14px;padding-left:1.35em;}

div li{margin:0 0 6px;}

div strong{color:#eef6fc;font-weight:700;}

div a{color:var(--blue);text-underline-offset:3px;}

div blockquote{
  margin:16px 0;
  padding:12px 18px;
  border-left:3px solid var(--pink);
  border-radius:4px;
  background:rgba(245,224,232,.07);
  color:#e3edf5;
}

div blockquote p:last-child{margin-bottom:0;}

div code{
  padding:2px 6px;
  border-radius:6px;
  background:rgba(200,224,244,.12);
  font-size:15px;
}

div hr{
  border:0;
  border-top:1px solid var(--line);
  margin:20px 0;
}

/* ---------- 右侧栏 ---------- */
.rail{
  position:sticky;
  top:96px;
}

.rail-nav{
  padding:18px 16px;
  border-radius:4px;
  background:linear-gradient(150deg,rgba(200,224,244,.1),rgba(245,224,232,.05));
  box-shadow:var(--soft);
}

.rail-t{
  margin:0 0 10px;
  font-size:17px;
  color:#e6f0f8;
}

.rail-t span{color:var(--pink);}

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

.rail-list a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:6px 11px;
  border-radius:12px;
  font-size:16px;
  color:#cdddec;
  text-decoration:none;
  transition:background .15s ease,color .15s ease;
}

.rail-list a:hover{
  color:#fff;
  background:rgba(200,224,244,.12);
}

.rail-list a:active{
  background:rgba(200,224,244,.18);
}

/* ---------- 页脚 ---------- */
.foot{
  margin-top:46px;
  padding:26px 20px 34px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:14px 30px;
  border-top:1px solid rgba(200,224,244,.1);
  background:linear-gradient(180deg,rgba(200,224,244,0),rgba(200,224,244,.05));
}

.foot article{margin:0;}

.foot-brand{text-align:center;}

.foot-brand h2{
  margin:0 0 2px;
  font-size:17px;
  color:var(--pink);
  letter-spacing:.06em;
}

.foot-brand p{
  margin:0;
  font-size:16px;
  color:var(--dim);
}

.foot-nav ul{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:2px 8px;
  margin:0;
  padding:0;
  list-style:none;
}

.foot-nav a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:4px 9px;
  border-radius:10px;
  font-size:16px;
  color:#c6d7e6;
  text-decoration:none;
}

.foot-nav a:hover{color:#fff;background:rgba(200,224,244,.1);}

.foot-top a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:6px 16px;
  border-radius:12px;
  font-size:16px;
  color:#dceaf6;
  text-decoration:none;
  background:linear-gradient(145deg,#1e2a35,#151d25);
  box-shadow:var(--soft-sm);
}

.foot-top a:active{box-shadow:var(--soft-in);transform:scale(.97);}

/* ---------- 滚动淡入 ---------- */
html.js div > article:not(.hero){
  opacity:0;
  transform:translateY(16px);
  transition:opacity .55s ease,transform .55s ease;
}

html.js div > article.in{
  opacity:1;
  transform:none;
}

/* ---------- 断点 ---------- */
@media (max-width:960px){
  main{
    grid-template-columns:minmax(0,1fr);
    gap:22px;
  }
  .rail{position:static;}
  .rail-list{
    flex-direction:row;
    flex-wrap:wrap;
    gap:6px;
  }
  .rail-list a{
    min-height:40px;
    padding:6px 12px;
    background:rgba(200,224,244,.06);
  }
}

@media (max-width:760px){
  .masthead{position:static;}
  .nav{flex-direction:column;gap:10px;}
  .brand{order:-1;}
  .navlist{
    flex:0 0 auto;
    width:100%;
    justify-content:center;
    gap:6px;
  }
  .hero{
    min-height:auto;
    padding-top:30px;
  }
  main{padding:18px 16px 0;}
  div > article:not(.hero){padding:20px 16px;}
  .foot{
    padding:22px 16px 30px;
    gap:12px 18px;
  }
}

@media (max-width:400px){
  body{font-size:16px;}
  .navlist a{padding:8px 11px;font-size:16px;}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  html.js div > article:not(.hero){
    opacity:1;
    transform:none;
    transition:none;
  }
  .navlist a,.foot-top a{transition:none;}
}

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