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

html{
  scroll-behavior:smooth;
  background:#0d0d0d;
  -webkit-text-size-adjust:100%;
  max-width:100%;
  overflow-x:hidden;
}

body{
  margin:0;
  max-width:100%;
  min-height:100vh;
  overflow-x:hidden;
  overflow-wrap:break-word;
  background:
    radial-gradient(1100px 520px at 88% -8%,rgba(128,0,255,.26),transparent 62%),
    radial-gradient(820px 460px at -12% 26%,rgba(255,0,255,.14),transparent 58%),
    #0d0d0d;
  color:#ece2fb;
  font-family:'VT323',ui-monospace,"Courier New",monospace;
  font-size:19px;
  line-height:1.62;
  letter-spacing:.01em;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:90;
  pointer-events:none;
  background:repeating-linear-gradient(to bottom,rgba(170,90,255,.075) 0 1px,transparent 1px 3px);
}

h1,h2,h3,h4,p,ul,ol,figure,dl,dd{margin:0}
ul,ol{padding-left:1.25em}
img{max-width:100%;height:auto}
a{color:inherit;text-decoration:none}

a:focus-visible,
button:focus-visible{outline:2px solid #ff00ff;outline-offset:3px}

/* ---------- 顶栏 ---------- */
.masthead{
  position:sticky;
  top:0;
  z-index:50;
  max-width:100%;
  background:rgba(13,13,13,.96);
  border-bottom:1px solid rgba(128,0,255,.45);
  box-shadow:0 0 26px rgba(128,0,255,.28);
}

.ticker{
  padding:7px 14px;
  font-size:16px;
  letter-spacing:.14em;
  text-align:center;
  color:#ffb6ff;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  background:linear-gradient(90deg,rgba(128,0,255,.28),rgba(255,0,255,.18));
  border-bottom:1px solid rgba(255,0,255,.3);
  text-shadow:0 0 9px rgba(255,0,255,.85);
  animation:tickGlow 4.5s ease-in-out infinite;
}

@keyframes tickGlow{
  0%,100%{text-shadow:0 0 6px rgba(255,0,255,.55)}
  50%{text-shadow:0 0 16px rgba(255,0,255,1)}
}

.masthead-row{
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 14px;
  min-width:0;
}

.brand{
  flex:0 1 auto;
  min-width:0;
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  padding:0 14px;
  border:1px solid rgba(128,0,255,.6);
  border-radius:999px;
  background:rgba(128,0,255,.12);
  color:#fff;
  font-size:18px;
  letter-spacing:.06em;
  text-shadow:0 0 10px rgba(128,0,255,.95);
  transition:box-shadow .2s ease,border-color .2s ease;
}

.brand:hover{
  border-color:#ff00ff;
  box-shadow:0 0 18px rgba(255,0,255,.55);
}

.brand img{display:block;width:26px;height:26px}
.brand-dot{
  flex:0 0 auto;
  width:9px;height:9px;border-radius:50%;
  background:#ff00ff;
  box-shadow:0 0 10px #ff00ff;
  animation:dot 1.8s steps(2,end) infinite;
}
@keyframes dot{50%{opacity:.25}}

.brand-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.nav-toggle{
  display:none;
  flex:0 0 auto;
  align-items:center;
  min-height:44px;
  padding:0 16px;
  margin-left:auto;
  border:1px solid rgba(255,0,255,.6);
  border-radius:999px;
  background:rgba(255,0,255,.14);
  color:#ffd6ff;
  font:inherit;
  font-size:17px;
  letter-spacing:.12em;
  cursor:pointer;
}

.nav{margin-left:auto;min-width:0;max-width:100%}

.nav-list{
  display:flex;
  gap:8px;
  margin:0;
  padding:2px;
  list-style:none;
  overflow-x:auto;
  overflow-y:hidden;
  max-width:100%;
  scrollbar-width:none;
}
.nav-list::-webkit-scrollbar{display:none}

.nav-list a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 14px;
  white-space:nowrap;
  border:1px solid rgba(128,0,255,.45);
  border-radius:999px;
  font-size:17px;
  color:#d6c1ff;
  background:rgba(128,0,255,.07);
  transition:color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}

.nav-list a:hover{
  color:#fff;
  border-color:#ff00ff;
  box-shadow:0 0 16px rgba(255,0,255,.5);
  transform:translateY(-1px);
}

/* ---------- 主区 ---------- */
.deck{
  max-width:100%;
  padding:clamp(16px,3vw,40px) clamp(13px,4vw,44px) 70px;
}

.stage{
  max-width:1120px;
  min-width:0;
  margin:0 auto;
  display:grid;
  grid-template-columns:224px minmax(0,1fr);
  gap:clamp(18px,3vw,34px);
  align-items:start;
}

/* ---------- 头图 ---------- */
.hero{
  grid-column:1/-1;
  min-width:0;
  position:relative;
  display:flex;
  align-items:flex-end;
  min-height:clamp(258px,45vh,420px);
  overflow:hidden;
  border:1px solid rgba(128,0,255,.55);
  border-radius:28px;
  clip-path:polygon(0 0,100% 0,100% calc(100% - 30px),0 100%);
  box-shadow:0 0 44px rgba(128,0,255,.36);
}

.hero-media{position:absolute;inset:0;overflow:hidden}

.hero-media img,
.hero-shot{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  filter:saturate(1.25) contrast(1.1);
}

.hero-media::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(to top,rgba(13,13,13,.96) 10%,rgba(13,13,13,.4) 56%,rgba(128,0,255,.3) 100%);
}

.hero-fallback{
  position:absolute;
  inset:0;
  background:
    repeating-linear-gradient(118deg,rgba(128,0,255,.4) 0 12px,rgba(13,13,13,.92) 12px 34px),
    linear-gradient(160deg,#1b0033,#0d0d0d);
}

.hero-text{
  position:relative;
  z-index:2;
  min-width:0;
  padding:clamp(16px,3vw,34px);
  max-width:min(760px,100%);
  text-align:left;
}

.hero-badge{
  display:inline-flex;
  align-items:center;
  max-width:100%;
  min-height:32px;
  padding:0 14px;
  border:1px solid #ff00ff;
  border-radius:999px;
  background:rgba(255,0,255,.16);
  color:#ffd6ff;
  font-size:16px;
  letter-spacing:.2em;
  box-shadow:0 0 18px rgba(255,0,255,.55);
}

.hero-text h1{
  margin-top:12px;
  font-size:clamp(26px,4.6vw,45px);
  line-height:1.18;
  color:#fff;
  text-shadow:0 0 14px rgba(255,0,255,.85),0 0 36px rgba(128,0,255,.65);
}

.hero-sub{
  margin-top:12px;
  max-width:58ch;
  font-size:18px;
  color:#e4d5ff;
}

/* ---------- 侧栏 ---------- */
.rail{
  grid-column:1;
  min-width:0;
  max-width:100%;
  position:sticky;
  top:122px;
  padding:16px 14px 18px;
  border:1px solid rgba(128,0,255,.45);
  border-bottom:3px solid #ff00ff;
  border-radius:28px;
  background:rgba(22,11,38,.76);
  box-shadow:inset 0 0 26px rgba(128,0,255,.16);
}

.rail-kicker{
  display:block;
  font-size:16px;
  letter-spacing:.3em;
  color:#ff00ff;
  text-shadow:0 0 9px rgba(255,0,255,.9);
}

.rail-h{
  margin:5px 0 12px;
  font-size:20px;
  line-height:1.28;
  color:#fff;
  text-shadow:0 0 12px rgba(128,0,255,.85);
}

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

.rail-list a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:0 10px;
  font-size:17px;
  color:#ccb6f4;
  border-left:2px solid rgba(128,0,255,.45);
  transition:color .16s ease,border-color .16s ease,background .16s ease;
}

.rail-list a:hover{
  color:#fff;
  border-color:#ff00ff;
  background:rgba(255,0,255,.1);
  text-shadow:0 0 10px rgba(255,0,255,.9);
}

/* ---------- 正文 ---------- */
.prose{grid-column:2;min-width:0;max-width:100%}

.prose>article{
  scroll-margin-top:132px;
  padding-bottom:32px;
  margin-bottom:32px;
  border-bottom:1px dashed rgba(128,0,255,.32);
}

.prose>article:last-child{border-bottom:0;margin-bottom:0;padding-bottom:0}

.anim .prose>article,
.anim .rail{opacity:0;transform:translateY(14px)}

.anim .prose>article.reveal,
.anim .rail.reveal{
  animation:rise .52s cubic-bezier(.2,.7,.3,1) forwards;
  animation-delay:var(--d,0ms);
}

@keyframes rise{to{opacity:1;transform:none}}

.prose small{
  display:block;
  margin-bottom:6px;
  font-size:16px;
  letter-spacing:.24em;
  color:#ff00ff;
  text-shadow:0 0 9px rgba(255,0,255,.85);
}

.prose h2{
  margin:0 0 14px;
  font-size:clamp(22px,2.7vw,31px);
  line-height:1.24;
  color:#fff;
  text-shadow:0 0 12px rgba(128,0,255,.8);
}

.prose h3{
  margin:26px 0 10px;
  font-size:21px;
  line-height:1.3;
  color:#f4eaff;
  text-shadow:0 0 9px rgba(128,0,255,.6);
}

.prose small+h2,
.prose small+h3{margin-top:0}

.prose p{margin:0 0 1.05em;color:#ddd2ef}
.prose ul,.prose ol{margin:0 0 1.1em}
.prose li{margin:.32em 0}

.prose strong{color:#fff;text-shadow:0 0 9px rgba(255,0,255,.55)}

.prose a{
  color:#ff9dff;
  border-bottom:1px solid rgba(255,0,255,.5);
}

.prose a:hover{color:#fff;border-color:#fff}

.prose blockquote{
  margin:1.2em 0;
  padding:12px 18px;
  border-left:3px solid #8000ff;
  border-radius:0 28px 28px 0;
  background:rgba(128,0,255,.12);
  color:#e7daff;
}

.prose figure{margin:1.2em 0;max-width:100%}
.prose img{
  display:block;
  max-width:100%;
  border:1px solid rgba(128,0,255,.45);
  border-radius:28px;
}

.prose figcaption{
  margin-top:8px;
  font-size:16px;
  color:#b6a1d8;
}

.prose hr{
  height:1px;
  border:0;
  margin:1.6em 0;
  background:linear-gradient(90deg,#8000ff,#ff00ff,transparent);
}

.prose table{
  display:block;
  width:100%;
  max-width:100%;
  overflow-x:auto;
  border-collapse:collapse;
  margin:0 0 1.2em;
  font-size:18px;
}

.prose th,.prose td{
  padding:8px 10px;
  border:1px solid rgba(128,0,255,.35);
  text-align:left;
}
.prose th{background:rgba(128,0,255,.16);color:#fff}

.prose pre{
  max-width:100%;
  overflow-x:auto;
  padding:12px 14px;
  border:1px solid rgba(128,0,255,.35);
  border-radius:16px;
  background:rgba(128,0,255,.1);
}

/* ---------- 页脚 ---------- */
.footer{
  max-width:100%;
  margin-top:36px;
  padding:20px clamp(13px,4vw,44px) 28px;
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px 26px;
  border-top:1px solid rgba(128,0,255,.45);
  background:rgba(10,10,12,.92);
  box-shadow:0 -1px 22px rgba(255,0,255,.16);
}

.footer-cols{display:flex;flex-wrap:wrap;gap:16px 32px;min-width:0}

.footer dl{margin:0;min-width:0}
.footer dt{
  font-size:16px;
  letter-spacing:.24em;
  color:#ff00ff;
  text-shadow:0 0 8px rgba(255,0,255,.7);
}

.footer dd{
  display:flex;
  flex-wrap:wrap;
  gap:2px 16px;
  margin:4px 0 0;
  font-size:17px;
  color:#c9bae4;
}

.footer dd a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  color:#e3d6f8;
  border-bottom:1px solid rgba(128,0,255,.45);
}

.footer dd a:hover{color:#fff;border-color:#ff00ff}

.footer-copy{
  margin:0;
  padding-top:6px;
  font-size:17px;
  color:#9585b6;
}

/* ---------- 断点 ---------- */
@media (max-width:860px){
  .stage{grid-template-columns:minmax(0,1fr)}
  .hero,.rail,.prose{grid-column:1}
  .rail{position:static}
  .rail-list{
    grid-auto-flow:column;
    grid-auto-columns:max-content;
    grid-template-columns:none;
    grid-auto-rows:auto;
    gap:8px;
    overflow-x:auto;
    padding-bottom:2px;
    max-width:100%;
    scrollbar-width:none;
  }
  .rail-list::-webkit-scrollbar{display:none}
  .rail-list a{
    border-left:0;
    border:1px solid rgba(128,0,255,.42);
    border-radius:999px;
    padding:0 13px;
    white-space:nowrap;
  }
}

@media (max-width:760px){
  .nav-toggle{display:inline-flex}
  .brand{max-width:52%}
  .nav{
    display:none;
    position:absolute;
    left:0;
    right:0;
    top:100%;
    margin:0;
    padding:10px 13px 14px;
    background:#0d0d0d;
    border-bottom:1px solid #8000ff;
    box-shadow:0 14px 26px rgba(0,0,0,.7);
  }
  .nav.is-open{display:block}
  .nav-list{flex-direction:column;overflow:visible;padding:0}
  .nav-list a{width:100%;min-height:44px;justify-content:flex-start;white-space:normal}
  .footer{flex-direction:column;align-items:stretch}
  .footer-copy{padding-top:0}
}

@media (max-width:420px){
  body{font-size:18px}
  .hero-text h1{font-size:26px}
  .ticker{letter-spacing:.06em}
  .deck{padding-left:12px;padding-right:12px}
  .prose>article{scroll-margin-top:118px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    transition-duration:.001ms!important;
  }
  .anim .prose>article,
  .anim .rail{opacity:1;transform:none}
}

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