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

:root{
  --ink:#1f1726;
  --ink-soft:#2a2035;
  --plum:#56228b;
  --plum-lit:#8a5cc4;
  --clay:#8b4513;
  --clay-lit:#c8804a;
  --leaf:#5d8a5f;
  --cream:#f3e8d8;
  --muted:#c6b6cd;
  --line:rgba(200,128,74,.3);
  --r-card:10px;
  --dock:78px;
}

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

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

body{
  margin:0;
  color:var(--cream);
  font-family:'Merriweather',"Songti SC","Noto Serif SC",Georgia,serif;
  font-size:17px;
  line-height:1.78;
  letter-spacing:.01em;
  background:
    radial-gradient(880px 600px at 84% -10%, rgba(86,34,139,.55), transparent 70%),
    radial-gradient(760px 520px at 2% 26%, rgba(139,69,19,.34), transparent 72%),
    var(--ink);
  background-attachment:fixed, fixed, scroll;
  overflow-x:clip;
}

body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:60;
  pointer-events:none;
  opacity:.075;
  mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23g)'/%3E%3C/svg%3E");
}

h1,h2,h3{
  font-family:'Abril Fatface','Merriweather',"Songti SC",Georgia,serif;
  font-weight:400;
  line-height:1.16;
  letter-spacing:.015em;
  margin:0 0 .55em;
}

p{margin:0 0 1.05em}
img{max-width:100%}

a{color:var(--clay-lit)}
a:focus-visible{
  outline:2px dashed var(--clay-lit);
  outline-offset:3px;
  border-radius:6px;
}

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

.hero{
  position:relative;
  min-height:100vh;
  min-height:100svh;
  display:flex;
  align-items:center;
  overflow:hidden;
  padding:96px clamp(18px,5vw,56px) 150px;
}

.hero-blob{
  position:absolute;
  top:-16%;
  right:-12%;
  width:min(720px,90vw);
  aspect-ratio:1;
  filter:blur(6px);
  opacity:.85;
  pointer-events:none;
}

.hero-blob svg{display:block;width:100%;height:100%}

.hero-band{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:clamp(90px,16vh,170px);
  background:linear-gradient(100deg,var(--clay) 0%,var(--plum) 62%,#3a1c4d 100%);
  clip-path:polygon(0 46%,100% 0,100% 100%,0 100%);
  opacity:.9;
}

.hero-inner{
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns:minmax(0,1.06fr) minmax(0,.94fr);
  gap:clamp(22px,4vw,52px);
  align-items:center;
  width:100%;
  max-width:1140px;
  margin-inline:auto;
  min-width:0;
}

.hero-inner > *{min-width:0}

.hero-title{
  font-size:clamp(2.35rem,6.4vw,4.4rem);
  color:#fbf3e6;
  text-align:left;
  margin:0;
  max-width:16ch;
  text-shadow:0 18px 40px rgba(15,10,20,.6);
  overflow-wrap:break-word;
}

.hero-collage{
  position:relative;
  min-width:0;
  min-height:clamp(240px,42vh,420px);
  height:100%;
}

.hero-fig{
  position:absolute;
  margin:0;
  overflow:hidden;
  background:rgba(31,23,38,.62);
  border:2px solid rgba(243,232,216,.34);
  border-radius:26px 20px 30px 18px;
}

.hero-fig--0{
  top:0;
  right:0;
  width:68%;
  height:74%;
  transform:translateY(var(--py,0)) rotate(-3.5deg);
}

.hero-fig--1{
  bottom:0;
  left:0;
  width:56%;
  height:62%;
  border-radius:18px 28px 20px 26px;
  transform:translateY(var(--py,0)) rotate(3deg);
}

.shot{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

/* ---------- 主体骨架 ---------- */

.page{
  display:grid;
  grid-template-columns:264px minmax(0,1fr);
  gap:clamp(22px,3.4vw,44px);
  max-width:1140px;
  margin-inline:auto;
  padding:clamp(28px,5vw,64px) clamp(16px,4vw,40px) calc(var(--dock) + 90px);
  align-items:start;
  min-width:0;
}

.page > *{min-width:0}

/* ---------- 左侧栏 ---------- */

.rail{
  position:sticky;
  top:22px;
  min-width:0;
  background:linear-gradient(158deg,rgba(86,34,139,.32),rgba(31,23,38,.6));
  border:1px solid var(--line);
  border-radius:24px 18px 30px 20px;
  padding:18px 16px 20px;
}

.rail-title{
  font-size:1.02rem;
  color:#f7ecdd;
  margin:0 0 .5em;
  letter-spacing:.09em;
}

.rail-title > span{
  display:inline-block;
  position:relative;
  padding-bottom:6px;
}

.rail-title > span::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:100%;
  height:4px;
  border-radius:0 0 60% 40%/0 0 90% 70%;
  background:linear-gradient(90deg,var(--clay-lit),rgba(138,92,196,0));
}

.rail-list{
  list-style:none;
  margin:0 0 18px;
  padding:0;
  display:grid;
  gap:5px;
  min-width:0;
}

.rail-list a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:8px 11px;
  font-size:.94rem;
  line-height:1.4;
  color:var(--muted);
  text-decoration:none;
  border-radius:12px 12px 15px 10px;
  transition:background .25s ease,color .25s ease;
}

.rail-list a:hover,
.rail-list a.is-active{
  background:rgba(86,34,139,.55);
  color:#fdf6ec;
}

.rail-foot{
  border-top:1px dashed rgba(200,128,74,.32);
  padding-top:14px;
}

.rail-host{
  margin:0;
  font-size:.82rem;
  color:var(--muted);
  word-break:break-all;
}

/* ---------- 正文 ---------- */

.doc{
  min-width:0;
  font-size:1.03rem;
  overflow-wrap:break-word;
}

.doc section{
  background:linear-gradient(162deg,rgba(86,34,139,.17),rgba(31,23,38,.42));
  border:1px solid var(--line);
  border-radius:var(--r-card);
  padding:clamp(18px,3vw,30px);
  scroll-margin-top:20px;
}

.doc section + section{margin-top:22px}

.doc h2{
  font-size:clamp(1.4rem,2.6vw,1.9rem);
  color:#faf0e1;
}

.doc h3{
  font-size:clamp(1.12rem,2vw,1.34rem);
  color:#f6e4d2;
  margin-top:1.3em;
}

.doc h2 > span,
.doc h3 > span{
  display:inline-block;
  position:relative;
  padding-bottom:8px;
}

.doc h2 > span::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:min(100%,190px);
  height:6px;
  border-radius:0 0 70% 30%/0 0 100% 60%;
  background:linear-gradient(90deg,var(--clay),rgba(86,34,139,.15));
}

.doc h3 > span::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:100%;
  height:3px;
  border-radius:50%/100%;
  background:rgba(93,138,95,.7);
}

.doc ul,.doc ol{padding-left:1.25em}
.doc li{margin-bottom:.42em}

.doc a{color:var(--clay-lit);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.doc a:hover{color:#f0b783}

.doc blockquote{
  margin:1.2em 0;
  padding:14px 18px;
  border-left:4px solid var(--leaf);
  border-radius:0 var(--r-card) var(--r-card) 0;
  background:rgba(93,138,95,.13);
  color:#e9ded0;
}

.doc figure{margin:1.2em 0}

.doc img{
  border-radius:14px;
  border:1px solid var(--line);
  height:auto;
}

.doc table{
  display:block;
  width:100%;
  max-width:100%;
  overflow-x:auto;
  border-collapse:collapse;
  font-size:.95rem;
}

.doc th,.doc td{
  border:1px solid rgba(200,128,74,.28);
  padding:9px 11px;
  text-align:left;
}

.doc th{background:rgba(86,34,139,.3)}

.doc pre{
  margin:1.2em 0;
  padding:14px;
  overflow-x:auto;
  border-radius:var(--r-card);
  background:rgba(15,10,20,.5);
  border:1px solid var(--line);
}

.doc code{font-size:.92em}

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

.dock{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:50;
  display:flex;
  align-items:center;
  gap:clamp(8px,2vw,20px);
  padding:9px clamp(12px,3vw,26px);
  background:rgba(24,17,30,.94);
  border-top:1px solid rgba(200,128,74,.42);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

.dock-brand{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
  min-width:0;
}

.mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  border-radius:16px 12px 18px 12px;
  color:var(--clay-lit);
  border:1px solid rgba(200,128,74,.45);
  background:rgba(86,34,139,.32);
}

.mark:hover{color:#f5c79c}

.mark-name{
  font-family:'Abril Fatface','Merriweather',serif;
  font-size:1.02rem;
  letter-spacing:.06em;
  color:#f7ecdd;
  white-space:nowrap;
}

.dock-host{
  font-size:.76rem;
  color:var(--muted);
  white-space:nowrap;
}

.dock-nav{
  flex:1 1 0;
  min-width:0;
  overflow-x:auto;
  scrollbar-width:none;
}

.dock-nav::-webkit-scrollbar{display:none}

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

.dock-nav dd{display:none;margin:0}

.dock-nav a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:7px 11px;
  font-size:.93rem;
  line-height:1.35;
  color:var(--muted);
  text-decoration:none;
  white-space:nowrap;
  border-radius:13px 13px 16px 11px;
  transition:background .22s ease,color .22s ease;
}

.dock-nav a:hover,
.dock-nav a:focus-visible{
  background:rgba(139,69,19,.5);
  color:#fdf5ea;
}

.dock-credit{
  flex:0 0 auto;
  font-size:.8rem;
  color:var(--muted);
  white-space:nowrap;
}

/* ---------- 动效 ---------- */

@media (prefers-reduced-motion:no-preference){
  .doc article{
    animation:rise .68s cubic-bezier(.2,.72,.28,1) both;
  }
  .hero-title{
    animation:bloom .9s cubic-bezier(.2,.72,.28,1) both;
  }
}

@keyframes rise{
  from{opacity:0;transform:translateY(22px)}
  to{opacity:1;transform:none}
}

@keyframes bloom{
  from{opacity:0;transform:translateY(16px) scale(.985)}
  to{opacity:1;transform:none}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .doc article,.hero-title{animation:none}
}

/* ---------- 断点 ---------- */

@media (max-width:980px){
  .page{grid-template-columns:minmax(0,1fr)}
  .rail{
    position:static;
    padding:14px 14px 16px;
  }
  .rail-list{
    display:flex;
    gap:8px;
    overflow-x:auto;
    padding-bottom:6px;
    scrollbar-width:none;
  }
  .rail-list::-webkit-scrollbar{display:none}
  .rail-list li{flex:0 0 auto}
  .rail-list a{
    white-space:nowrap;
    padding:8px 14px;
    border:1px solid rgba(200,128,74,.3);
  }
  .rail-foot{
    display:flex;
    align-items:baseline;
    gap:10px;
    padding-top:10px;
  }
  .rail-host{font-size:.8rem}
}

@media (max-width:900px){
  .hero{
    align-items:flex-start;
    padding:88px 18px 140px;
  }
  .hero-inner{grid-template-columns:minmax(0,1fr);gap:26px}
  .hero-title{max-width:22ch;font-size:clamp(2.1rem,8.4vw,3rem)}
  .hero-collage{min-height:250px;height:250px}
  .hero-fig--0{width:60%;height:78%}
  .hero-fig--1{width:52%;height:64%}
}

@media (max-width:720px){
  .mark-name{display:none}
  .dock{padding:8px 12px;gap:8px}
  .dock-credit{font-size:.72rem}
  .hero-blob{right:-30%;top:-10%;opacity:.6}
}

@media (max-width:560px){
  .dock-host{display:none}
  .dock-credit{display:none}
  .doc article{padding:16px 14px}
  body{font-size:16px}
  .hero-title{font-size:clamp(1.9rem,7.6vw,2.5rem)}
}

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