@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400&family=Playfair+Display:ital@1&display=swap');

:root{
  --red:#ff0000;
  --violet:#8b00ff;
  --ink:#261717;
  --line:rgba(255,255,255,.18);
  --line-soft:rgba(255,255,255,.09);
  --glass:rgba(255,255,255,.07);
  --txt:#f4eded;
  --dim:rgba(244,237,237,.68);
  --mono:"JetBrains Mono",ui-monospace,monospace;
}

*{box-sizing:border-box}

html{
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
  background:#140d0d;
}

body{
  margin:0;
  min-height:100vh;
  color:var(--txt);
  background-color:#140d0d;
  background-image:
    radial-gradient(46vw 54vh at 8% 4%, rgba(255,0,0,.40), transparent 68%),
    radial-gradient(42vw 48vh at 94% 20%, rgba(139,0,255,.40), transparent 68%),
    radial-gradient(76vw 64vh at 46% 106%, rgba(255,0,0,.20), transparent 72%);
  background-repeat:no-repeat;
  background-attachment:fixed;
  font-family:Inter,-apple-system,"Segoe UI","PingFang SC","Noto Sans SC",sans-serif;
  font-size:17px;
  line-height:1.8;
  overflow-x:hidden;
}

a{color:inherit}

/* ---------- 顶栏 ---------- */
.topbar{
  position:sticky;
  top:0;
  z-index:60;
  background:rgba(20,13,13,.62);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}

.bar{
  max-width:1180px;
  margin:0 auto;
  padding:10px 22px;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:14px;
}

.nav{min-width:0}
.nav p{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:2px;
  margin:0;
}
.nav-right p{justify-content:flex-end}

.nav a{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:6px 11px;
  font-size:16px;
  line-height:1.4;
  color:var(--dim);
  text-decoration:none;
  border-bottom:1px solid transparent;
  transition:color .18s ease,border-color .18s ease;
}
.nav a:hover{color:#fff;border-bottom-color:var(--red)}

.nav a.cta{
  color:#fff;
  font-weight:700;
  background:var(--red);
  border:1px solid var(--red);
  padding:6px 16px;
  margin-left:6px;
}
.nav a.cta:hover{background:var(--violet);border-color:var(--violet)}

.brand{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:0 4px;
  font-size:20px;
  font-weight:800;
  letter-spacing:.04em;
  color:#fff;
  text-decoration:none;
  white-space:nowrap;
}
.brand-mark{
  width:9px;
  height:9px;
  background:var(--red);
  display:inline-block;
  transform:rotate(45deg);
}

/* ---------- 头图 ---------- */
.hero{
  position:relative;
  display:flex;
  align-items:flex-end;
  min-height:68vh;
  overflow:hidden;
  border-bottom:1px solid var(--line);
  isolation:isolate;
}

.hero-media{position:absolute;inset:0;z-index:-2}
.hero-img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  filter:saturate(1.15) contrast(1.06);
}

.hero-veil{
  position:absolute;
  inset:0;
  z-index:-1;
  background:
    linear-gradient(196deg, rgba(20,13,13,.22) 0%, rgba(20,13,13,.80) 62%, rgba(20,13,13,.95) 100%),
    radial-gradient(58% 62% at 82% 16%, rgba(139,0,255,.45), transparent 70%);
}

.hero-word{
  position:absolute;
  top:1vh;
  right:-.03em;
  font-size:19vw;
  line-height:.88;
  font-weight:800;
  letter-spacing:-.05em;
  white-space:nowrap;
  color:rgba(255,255,255,.085);
  pointer-events:none;
  z-index:0;
}

.hero-copy{
  position:relative;
  z-index:1;
  width:100%;
  max-width:1180px;
  margin:0 auto;
  padding:9vh 22px 6vh;
  text-align:right;
}

.hero-copy h1{
  margin:0 0 14px;
  font-family:"Playfair Display",Inter,"Songti SC",serif;
  font-style:italic;
  font-weight:800;
  font-size:clamp(2rem,6.2vw,4.2rem);
  line-height:1.1;
  letter-spacing:-.02em;
  text-shadow:0 0 30px rgba(0,0,0,.35);
}

.hero-sub{
  margin:0 0 0 auto;
  max-width:46ch;
  color:var(--dim);
  font-size:16px;
  line-height:1.7;
}

/* ---------- 主体栅格 ---------- */
.grid-main{
  max-width:1180px;
  margin:0 auto;
  padding:42px 22px 72px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 262px;
  gap:30px;
  align-items:start;
}

.body{min-width:0}

.body > section{
  position:relative;
  padding:30px 26px;
  background:var(--glass);
  border:1px solid var(--line);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  scroll-margin-top:112px;
  animation:rise .55s cubic-bezier(.22,.7,.3,1) both;
}
.body > section + section{margin-top:22px}
.body > section:nth-child(1){animation-delay:.02s}
.body > section:nth-child(2){animation-delay:.07s}
.body > section:nth-child(3){animation-delay:.12s}
.body > section:nth-child(4){animation-delay:.17s}
.body > section:nth-child(5){animation-delay:.22s}
.body > section:nth-child(6){animation-delay:.27s}
.body > section:nth-child(7){animation-delay:.32s}

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

/* ---------- 正文排版 ---------- */
.body h2,
.side-block h2{
  display:flex;
  align-items:baseline;
  gap:10px;
  margin:0 0 16px;
  font-size:1.42rem;
  line-height:1.35;
  font-weight:800;
  letter-spacing:-.01em;
  color:#fff;
}

.body h2 > span,
.side-block h2 > span{
  position:relative;
  padding-left:15px;
}
.body h2 > span::before,
.side-block h2 > span::before{
  content:"";
  position:absolute;
  left:0;
  top:.18em;
  bottom:.16em;
  width:4px;
  background:linear-gradient(var(--red),var(--violet));
}

.body h2{margin-top:1.7em}
.body > section > h2:first-child{margin-top:0}

.body h3{
  margin:1.5em 0 .6em;
  font-size:1.13rem;
  line-height:1.45;
  color:#ffd8d8;
}

.body p{margin:0 0 1.05em}
.body p:last-child{margin-bottom:0}

.body ul,
.body ol{margin:0 0 1.1em;padding-left:1.35em}
.body li{margin:.4em 0}
.body li::marker{color:var(--red)}

.body a{
  color:#ff8a8a;
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-thickness:1px;
}
.body a:hover{color:#fff}

.body strong{color:#fff}
.body em{color:#e8d6ff;font-style:italic}

.body blockquote{
  margin:1.4em 0;
  padding:14px 18px;
  border-left:3px solid var(--violet);
  background:rgba(139,0,255,.14);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}
.body blockquote p:last-child{margin-bottom:0}

.body img{
  max-width:100%;
  height:auto;
  display:block;
  border:1px solid var(--line);
  margin:1.2em 0;
}

.body figure{margin:1.3em 0}
.body figcaption{font-size:16px;color:var(--dim);padding-top:8px}

.body table{
  width:100%;
  border-collapse:collapse;
  font-size:16px;
  margin:1.2em 0;
}
.body th,
.body td{
  border:1px solid var(--line);
  padding:9px 11px;
  text-align:left;
  vertical-align:top;
}
.body th{background:rgba(255,255,255,.07);color:#fff}

.body code{
  font-family:var(--mono);
  font-size:.9em;
  background:rgba(255,255,255,.1);
  padding:1px 5px;
}
.body pre{
  overflow-x:auto;
  padding:14px;
  background:rgba(0,0,0,.4);
  border:1px solid var(--line);
  font-family:var(--mono);
  font-size:15px;
  line-height:1.6;
}
.body pre code{background:none;padding:0}

.body hr{border:0;border-top:1px solid var(--line);margin:1.8em 0}

/* ---------- 侧栏 ---------- */
.side{
  display:flex;
  flex-direction:column;
  gap:18px;
  position:sticky;
  top:96px;
}

.side-block{
  padding:18px;
  background:var(--glass);
  border:1px solid var(--line);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}

.side-block h2{
  font-size:16px;
  letter-spacing:.05em;
  margin-bottom:12px;
}

.toc{
  list-style:none;
  margin:0;
  padding:0;
  counter-reset:toc;
}
.toc li{counter-increment:toc}
.toc a{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:42px;
  padding:2px 0;
  font-size:16px;
  line-height:1.4;
  color:var(--dim);
  text-decoration:none;
  border-bottom:1px solid var(--line-soft);
  transition:color .16s ease,padding-left .16s ease;
}
.toc a::before{
  content:counter(toc,decimal-leading-zero);
  font-family:var(--mono);
  font-size:12px;
  color:var(--red);
}
.toc li:last-child a{border-bottom:0}
.toc a:hover{color:#fff;padding-left:4px}

.to-top{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  font-size:16px;
  color:#fff;
  text-decoration:none;
  border-bottom:1px solid var(--red);
}
.to-top span{color:var(--red)}

/* ---------- 页脚 ---------- */
.foot{
  margin-top:10px;
  border-top:1px solid var(--line);
  background:rgba(255,255,255,.05);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  scroll-margin-top:112px;
}

.foot-inner{
  max-width:1180px;
  margin:0 auto;
  padding:38px 22px 26px;
}

.foot-form{
  padding-bottom:26px;
  border-bottom:1px solid var(--line-soft);
}

.subscribe{display:flex;gap:0;max-width:460px}
.subscribe input{
  flex:1 1 auto;
  min-width:0;
  min-height:46px;
  padding:10px 14px;
  font:inherit;
  font-size:16px;
  color:#fff;
  background:rgba(255,255,255,.06);
  border:1px solid var(--line);
  border-right:0;
  outline:none;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}
.subscribe input::placeholder{color:rgba(244,237,237,.5)}
.subscribe input:focus{border-color:var(--violet)}

.subscribe button{
  min-height:46px;
  padding:10px 20px;
  font:inherit;
  font-size:16px;
  font-weight:700;
  color:#fff;
  background:var(--red);
  border:1px solid var(--red);
  cursor:pointer;
  transition:background .18s ease;
}
.subscribe button:hover{background:var(--violet);border-color:var(--violet)}
.subscribe button:disabled{background:var(--ink);border-color:var(--line);cursor:default}

.foot-cols{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:24px;
  padding:26px 0 6px;
  align-items:start;
}

.foot-brand .brand{font-size:19px;margin-bottom:6px}
.foot-brand address{
  font-style:normal;
  font-family:var(--mono);
  font-size:16px;
  color:var(--dim);
  word-break:break-all;
}

.foot-links{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  grid-template-columns:repeat(2,minmax(130px,auto));
  gap:0 22px;
}
.foot-links a{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  font-size:16px;
  color:var(--dim);
  text-decoration:none;
  border-bottom:1px solid transparent;
}
.foot-links a:hover{color:#fff;border-bottom-color:var(--violet)}

.copy{
  margin:22px 0 0;
  padding-top:16px;
  border-top:1px solid var(--line-soft);
  text-align:center;
  font-size:16px;
  color:var(--dim);
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
  border:0;
}

/* ---------- 窄屏 ---------- */
@media (max-width:900px){
  .bar{
    grid-template-columns:1fr;
    gap:4px;
    padding:8px 16px 10px;
  }
  .brand{justify-self:center}
  .nav{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .nav p{flex-wrap:nowrap;justify-content:center}
  .nav-right p{justify-content:center}
  .nav a{padding:6px 10px;white-space:nowrap}
  .nav a.cta{margin-left:4px}

  .hero{min-height:56vh}
  .hero-word{font-size:26vw}
  .hero-copy{padding:12vh 16px 5vh}

  .grid-main{
    grid-template-columns:1fr;
    padding:26px 16px 52px;
    gap:22px;
  }
  .body > section{padding:22px 18px}
  .side{position:static}
  .side-block{padding:16px}

  .foot-inner{padding:30px 16px 22px}
  .foot-cols{grid-template-columns:1fr;gap:16px}
  .foot-links{grid-template-columns:repeat(2,minmax(0,1fr))}
  .copy{font-size:16px}
}

@media (max-width:420px){
  .hero-copy h1{font-size:1.95rem}
  .body h2{font-size:1.28rem}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *{animation-duration:.001s !important;transition-duration:.001s !important}
}

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