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

:root{
  --grape:#56228b;
  --clay:#8b4513;
  --ink:#1f1726;
  --deep:#150e1d;
  --paper:#f5eff8;
  --muted:#c9b9d8;
  --line:rgba(245,239,248,.18);
  --glass:rgba(245,239,248,.06);
  --lift:0 28px 64px -34px rgba(0,0,0,.95);
  --wrap:1140px;
  --font-body:"Nunito Sans",ui-sans-serif,system-ui,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  --font-head:"Varela Round","Nunito Sans",ui-rounded,system-ui,sans-serif;
}

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

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

body{
  margin:0;
  overflow-x:hidden;
  font-family:var(--font-body);
  font-size:17px;
  line-height:1.75;
  color:var(--paper);
  background-color:var(--deep);
  background-image:
    radial-gradient(900px 620px at 84% -10%, rgba(86,34,139,.62), transparent 66%),
    radial-gradient(720px 520px at -12% 26%, rgba(139,69,19,.34), transparent 62%),
    radial-gradient(640px 520px at 48% 112%, rgba(86,34,139,.4), transparent 70%);
  background-attachment:fixed;
  min-height:100vh;
}

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

a{color:#e4cff8;text-decoration:none}
a:hover{color:#fff}

p{margin:0 0 1.05em}
ul,ol{margin:0;padding:0;list-style:none}

h1,h2,h3,h4{
  font-family:var(--font-head);
  font-weight:400;
  line-height:1.24;
  letter-spacing:.01em;
  margin:0 0 .5em;
}

:focus-visible{outline:2px solid #e0b3ff;outline-offset:3px}

main{display:block}

/* 顶部细条 */
.announce{
  margin:0;
  padding:.72rem 1.2rem;
  text-align:center;
  font-size:1rem;
  letter-spacing:.34em;
  color:var(--muted);
  border-bottom:1px solid rgba(245,239,248,.08);
}

/* 页头 */
.site-head{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(21,14,29,.84);
  backdrop-filter:blur(14px) saturate(120%);
  border-bottom:1px solid var(--line);
}

.masthead{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:1rem;
  width:min(100% - 2rem, var(--wrap));
  margin-inline:auto;
  padding:.5rem 0 .85rem;
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:.55rem;
  justify-self:center;
  min-height:44px;
  padding:.45rem .6rem;
  font-family:var(--font-head);
  font-size:1.3rem;
  color:var(--paper);
}

.brand-mark{
  width:15px;
  height:15px;
  border-radius:62% 38% 55% 45%/46% 56% 44% 54%;
  background:linear-gradient(140deg,var(--grape),var(--clay));
  box-shadow:0 0 0 4px rgba(139,69,19,.22);
}

.head-nav ol{display:flex;gap:.1rem}
.head-nav--left ol{justify-content:flex-start}
.head-nav--right ol{justify-content:flex-end}

.head-nav a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.35rem .72rem;
  border-radius:999px;
  font-size:1rem;
  color:var(--muted);
}
.head-nav a:hover{background:var(--glass);color:#fff}

.head-right{display:flex;align-items:center;gap:.5rem;justify-self:end}

.burger{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  min-height:44px;
  padding:.35rem .9rem;
  border:1px solid var(--line);
  border-radius:999px;
  background:transparent;
  color:var(--paper);
  font:inherit;
  font-size:1rem;
  cursor:pointer;
}
.burger:hover{background:var(--glass)}
.burger-bar{
  width:16px;
  height:2px;
  border-radius:2px;
  background:currentColor;
  box-shadow:0 -5px 0 currentColor,0 5px 0 currentColor;
}

/* 首屏 */
.hero{
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns:1.02fr 1fr;
  align-items:center;
  gap:clamp(1.5rem,4vw,3.5rem);
  width:min(100% - 2rem, var(--wrap));
  margin:0 auto;
  min-height:calc(100vh - 132px);
  padding:clamp(1.4rem,4vw,3rem) 0 clamp(2rem,5vw,3.4rem);
}

.hero-figure{position:relative;margin:0;z-index:1}

.hero-img{
  width:100%;
  aspect-ratio:4/5;
  object-fit:cover;
  border-radius:58% 42% 46% 54%/44% 52% 48% 56%;
  box-shadow:var(--lift);
}

.hero-figure::after{
  content:"";
  position:absolute;
  right:-7%;
  bottom:-9%;
  width:46%;
  aspect-ratio:1;
  z-index:-1;
  border-radius:62% 38% 55% 45%/48% 56% 44% 52%;
  background:linear-gradient(160deg,rgba(86,34,139,.55),rgba(139,69,19,.45));
}

.hero-copy{position:relative;z-index:2;text-align:right}

.hero-copy h1{
  font-size:clamp(2rem,5.2vw,3.55rem);
  margin-bottom:.45em;
  text-shadow:0 18px 40px rgba(0,0,0,.55);
}

.hero-sub{
  margin:0 0 0 auto;
  max-width:34ch;
  font-size:1.06rem;
  color:var(--muted);
}

.hero-num{
  position:absolute;
  left:-.04em;
  bottom:-.3em;
  z-index:0;
  font-family:var(--font-head);
  font-size:clamp(7rem,22vw,17rem);
  line-height:.8;
  color:transparent;
  -webkit-text-stroke:1px rgba(245,239,248,.22);
  pointer-events:none;
}

/* 主体 */
.sheet{
  display:grid;
  grid-template-columns:250px minmax(0,1fr);
  gap:clamp(1.5rem,4vw,3.2rem);
  width:min(100% - 2rem, var(--wrap));
  margin:clamp(2.4rem,6vw,4.6rem) auto clamp(2rem,5vw,3.4rem);
}

.rail{
  align-self:start;
  position:sticky;
  top:124px;
  padding:1.4rem 1.3rem;
  background:var(--glass);
  backdrop-filter:blur(14px) saturate(120%);
  border:1px solid var(--line);
  border-radius:0;
  box-shadow:var(--lift);
}

.rail-title{font-size:1.18rem;margin-bottom:.15em}

.subtitle{
  margin:0 0 1.1rem;
  font-size:1rem;
  letter-spacing:.2em;
  color:var(--muted);
}

.rail-nav a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:.35rem .1rem;
  font-size:1rem;
  color:var(--muted);
  border-bottom:1px dotted var(--line);
  transition:color .2s ease,padding .2s ease;
}
.rail-nav a:hover{color:#fff;padding-left:.45rem}

/* 正文 */
.prose{min-width:0}

.prose section{
  padding-block:1.7rem;
  scroll-margin-top:140px;
}
.prose section:first-of-type{padding-top:0}
.prose section + section{border-top:1px dashed rgba(245,239,248,.15)}

.prose h2{
  position:relative;
  padding-left:1.45rem;
  margin-bottom:.45em;
  font-size:clamp(1.45rem,3.1vw,2.05rem);
}
.prose h2::before{
  content:"";
  position:absolute;
  left:0;
  top:.44em;
  width:.72rem;
  height:.72rem;
  border-radius:62% 38% 55% 45%/48% 56% 44% 52%;
  background:linear-gradient(140deg,var(--grape),var(--clay));
}

.prose h3{
  font-size:1.22rem;
  margin-top:1.4em;
  color:#f0e2fb;
}

.prose h2 + p,
.prose h2 + .subtitle{color:var(--muted)}

.prose p{max-width:66ch}

.prose ul,
.prose ol{margin:0 0 1.1rem}

.prose li{
  position:relative;
  padding-left:1.4rem;
  margin-bottom:.5rem;
  max-width:64ch;
}
.prose li::before{
  content:"";
  position:absolute;
  left:0;
  top:.66em;
  width:.5rem;
  height:.5rem;
  border-radius:60% 40% 55% 45%;
  background:var(--clay);
}

.prose a{
  color:#ecd8ff;
  text-decoration:underline;
  text-decoration-color:rgba(236,216,255,.4);
  text-underline-offset:3px;
}
.prose a:hover{text-decoration-color:#fff}

.prose strong{color:#fff}
.prose blockquote{
  margin:1.2rem 0;
  padding:.8rem 1.2rem;
  border-left:3px solid var(--clay);
  background:var(--glass);
  color:var(--muted);
}
.prose code,.prose pre{font-family:ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;font-size:.95em}
.prose img{border-radius:22px;margin:1rem 0}

/* 页脚 */
.site-footer{
  display:grid;
  grid-template-columns:1.1fr 1fr auto;
  gap:2rem;
  align-items:center;
  width:min(100% - 2rem, var(--wrap));
  margin:0 auto;
  padding:3rem 0 2.6rem;
  border-top:1px solid var(--line);
}

.foot-logo{
  display:inline-block;
  padding:.2rem 0;
  font-family:var(--font-head);
  font-size:clamp(1.8rem,5vw,3rem);
  line-height:1.05;
  color:var(--paper);
}

.foot-desc{
  margin:.7rem 0 0;
  max-width:36ch;
  font-size:1rem;
  color:var(--muted);
}

.foot-nav ol{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:.1rem 1rem;
}
.foot-nav a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  font-size:1rem;
  color:var(--muted);
}
.foot-nav a:hover{color:#fff}

.foot-meta{
  justify-self:center;
  text-align:center;
  color:var(--muted);
  font-size:1rem;
}
.foot-meta p{margin:0}

/* 回到顶部 */
.to-top{
  position:fixed;
  right:1rem;
  bottom:1rem;
  z-index:40;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.5rem 1.05rem;
  border-radius:999px;
  border:1px solid rgba(245,239,248,.22);
  background:rgba(86,34,139,.9);
  color:#fff;
  box-shadow:var(--lift);
  opacity:0;
  transform:translateY(10px);
  pointer-events:none;
  transition:opacity .3s ease,transform .3s ease;
}
.to-top.show{opacity:1;transform:none;pointer-events:auto}

/* 全屏菜单 */
.drawer{
  position:fixed;
  inset:0;
  z-index:80;
  display:grid;
  place-items:center;
  padding:4rem 1.4rem;
  overflow-y:auto;
  background:radial-gradient(circle at 72% 18%,rgba(86,34,139,.96),rgba(21,14,29,.985));
  backdrop-filter:blur(10px);
  opacity:0;
  visibility:hidden;
  transition:opacity .32s ease,visibility .32s ease;
}
.drawer.is-open{opacity:1;visibility:visible}

.drawer-close{
  position:absolute;
  top:1.1rem;
  right:1.1rem;
  min-height:44px;
  padding:.4rem 1.05rem;
  border-radius:999px;
  border:1px solid var(--line);
  background:transparent;
  color:var(--paper);
  font:inherit;
  font-size:1rem;
  cursor:pointer;
}
.drawer-close:hover{background:var(--glass)}

.drawer-nav ol{display:grid;gap:.35rem;text-align:center}
.drawer-nav a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:52px;
  padding:.4rem 1.2rem;
  border-radius:999px;
  font-family:var(--font-head);
  font-size:1.16rem;
  color:var(--paper);
}
.drawer-nav a:hover{background:var(--glass)}

/* 动效 */
html.js .reveal{
  opacity:0;
  transform:translateY(18px);
  transition:opacity .7s ease,transform .7s cubic-bezier(.2,.7,.3,1);
}
html.js .reveal.in{opacity:1;transform:none}

html.js .prose section{
  opacity:0;
  transform:translateY(20px);
  transition:opacity .6s ease,transform .6s ease;
}
html.js .prose section.in{opacity:1;transform:none}

html.js .stagger > li{
  opacity:0;
  transform:translateY(10px);
  transition:opacity .5s ease,transform .5s ease;
}
html.js .stagger > li.in{opacity:1;transform:none}

/* 断点 */
@media (max-width:1080px){
  .head-nav{display:none}
  .masthead{grid-template-columns:1fr auto;padding-bottom:.7rem}
  .brand{justify-self:start}
  .sheet{grid-template-columns:1fr}
  .rail{position:static;top:auto}
  .rail-nav ol{display:flex;flex-wrap:wrap;gap:.4rem}
  .rail-nav a{
    border:1px solid var(--line);
    border-radius:999px;
    padding:.35rem .85rem;
  }
  .rail-nav a:hover{padding-left:.85rem;background:var(--glass)}
}

@media (max-width:820px){
  .hero{
    grid-template-columns:1fr;
    min-height:0;
    padding-block:1.6rem 2rem;
  }
  .hero-copy{order:1;text-align:left;padding-top:.6rem}
  .hero-sub{margin-left:0}
  .hero-figure{order:2}
  .hero-img{aspect-ratio:16/11;border-radius:44% 56% 40% 60%/40% 46% 54% 60%}
  .hero-num{
    font-size:clamp(4.6rem,24vw,8rem);
    top:.1em;
    right:.02em;
    bottom:auto;
    left:auto;
    opacity:.7;
  }
  .site-footer{
    grid-template-columns:1fr;
    gap:1.2rem;
    text-align:left;
  }
  .foot-meta{justify-self:start;text-align:left}
}

@media (max-width:480px){
  body{font-size:16.5px}
  .announce{letter-spacing:.2em;padding-inline:.8rem}
  .prose section{scroll-margin-top:124px}
  .drawer-nav a{font-size:1.05rem}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  html.js .reveal,
  html.js .prose section,
  html.js .stagger > li{
    opacity:1;
    transform:none;
    transition:none;
  }
  .to-top{transition:none}
}

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