:root {
  --ink: #0E1524;
  --ink-deep: #0A0F1B;
  --ink-soft: #131C2F;
  --cyan: #2FD3C6;
  --warm: #F2A65A;
  --paper: #E8EFF5;
  --body: #C4D2E1;
  --muted: #8E9DB4;
  --line: rgba(47, 211, 198, 0.16);
  --max: 1180px;
  --font: "IBM Plex Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.005em;
}

img { display: block; height: auto; max-width: 100%; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #ffffff; }

:focus-visible {
  outline: 2px solid var(--warm);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 分层背景 ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg span { position: absolute; display: block; will-change: transform; }

.bg-sky {
  inset: -20% -10% auto -10%;
  height: 150%;
  background:
    radial-gradient(58% 42% at 18% 8%, rgba(47, 211, 198, 0.17), transparent 70%),
    radial-gradient(52% 46% at 86% 26%, rgba(242, 166, 90, 0.15), transparent 72%);
}

.bg-cyan {
  width: 54vw;
  height: 54vw;
  left: -16vw;
  top: 20vh;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 211, 198, 0.2), transparent 68%);
  filter: blur(10px);
}

.bg-warm {
  width: 46vw;
  height: 46vw;
  right: -14vw;
  top: 88vh;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 166, 90, 0.17), transparent 70%);
}

.bg-grid {
  inset: 0;
  background-image:
    linear-gradient(rgba(232, 239, 245, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 239, 245, 0.045) 1px, transparent 1px);
  background-size: 76px 76px;
  -webkit-mask-image: linear-gradient(180deg, #000 0, transparent 86%);
  mask-image: linear-gradient(180deg, #000 0, transparent 86%);
}

/* ---------- 品牌 ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 10px;
  color: var(--paper);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.brand:hover { color: #ffffff; }
.brand .mark { width: 26px; height: 26px; border-radius: 7px; }

.mark-txt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(140deg, var(--cyan), var(--warm));
  color: var(--ink-deep);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

/* ---------- 头部 ---------- */
.site-head {
  position: relative;
  z-index: 5;
  padding: 16px clamp(14px, 3vw, 40px) 8px;
}

.head-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
}

.head-bar p {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin: 0;
  min-width: 0;
}

.head-bar .side-b { justify-content: flex-end; }

.head-bar p a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--paper);
  font-size: 16px;
  white-space: nowrap;
  transition: background 0.22s ease, color 0.22s ease;
}

.head-bar p a::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--cyan);
  opacity: 0.65;
  transition: opacity 0.22s ease, background 0.22s ease;
}

.head-bar p a:hover { background: rgba(47, 211, 198, 0.13); color: var(--cyan); }
.head-bar p a:hover::before { opacity: 1; background: var(--warm); }

/* ---------- 粘性锚点条 ---------- */
.subbar {
  position: sticky;
  top: 0;
  z-index: 8;
  background: rgba(10, 15, 27, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.subbar p {
  display: flex;
  gap: 2px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 40px);
  overflow-x: auto;
  scrollbar-width: none;
}

.subbar p::-webkit-scrollbar { display: none; }

.subbar p a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 12px;
  color: var(--muted);
  font-size: 16px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.subbar p a:hover { color: var(--cyan); border-bottom-color: var(--warm); }

/* ---------- 主区 ---------- */
main { position: relative; z-index: 2; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(20px, 4vw, 60px);
  max-width: var(--max);
  min-height: 70vh;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 44px) clamp(14px, 3vw, 40px) clamp(56px, 9vh, 104px);
}

.hero::after {
  content: "";
  position: absolute;
  left: clamp(14px, 3vw, 40px);
  right: clamp(14px, 3vw, 40px);
  bottom: 0;
  height: clamp(18px, 3.4vh, 40px);
  background: linear-gradient(100deg, var(--cyan), var(--warm));
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  opacity: 0.55;
  pointer-events: none;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 5vw, 54px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.hero-note {
  max-width: 46ch;
  margin: 0;
  color: var(--body);
  font-size: 17px;
  line-height: 1.7;
}

.hero-art {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--ink-soft), var(--ink-deep));
  box-shadow: 0 34px 80px -48px rgba(47, 211, 198, 0.6);
}

.hero-fallback {
  position: absolute;
  inset: 0;
  background:
    conic-gradient(from 210deg at 32% 28%, rgba(47, 211, 198, 0.3), transparent 46%),
    radial-gradient(62% 62% at 72% 72%, rgba(242, 166, 90, 0.32), transparent 72%);
}

.hero-art .hero-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  will-change: transform;
}

/* ---------- 侧栏 + 正文 ---------- */
.deck {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 4vw, 56px);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(26px, 5vw, 52px) clamp(14px, 3vw, 40px) clamp(48px, 8vw, 96px);
}

.rail {
  position: sticky;
  top: 64px;
  padding-left: 16px;
  border-left: 2px solid var(--warm);
}

.rail-h {
  margin: 0 0 12px;
  color: var(--warm);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.rail ul { list-style: none; margin: 0; padding: 0; }

.rail ul a {
  display: block;
  min-height: 40px;
  padding: 9px 2px;
  color: var(--muted);
  font-size: 16px;
  border-bottom: 1px dashed rgba(232, 239, 245, 0.1);
  transition: color 0.2s ease;
}

.rail ul a:hover { color: var(--cyan); }

.deck-body { min-width: 0; }

.deck-body > div {
  scroll-margin-top: 96px;
  margin: 0 0 26px;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid rgba(47, 211, 198, 0.1);
  border-bottom: 3px solid rgba(47, 211, 198, 0.5);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(19, 28, 47, 0.86), rgba(14, 21, 36, 0.9));
  box-shadow: 0 26px 60px -50px rgba(0, 0, 0, 0.9);
}

.deck-body h2 {
  position: relative;
  margin: 0 0 18px;
  padding-left: 14px;
  font-size: clamp(22px, 3.2vw, 32px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.008em;
}

.deck-body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.38em;
  bottom: 0.3em;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(var(--cyan), var(--warm));
}

.deck-body h2 span {
  background: linear-gradient(transparent 74%, rgba(47, 211, 198, 0.22) 0);
}

.deck-body h3 {
  margin: 26px 0 10px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.4;
}

.deck-body h3 span { color: var(--warm); }

.deck-body p { margin: 0 0 16px; color: var(--body); }
.deck-body p:last-child { margin-bottom: 0; }

.deck-body ul,
.deck-body ol { margin: 0 0 16px; padding-left: 22px; color: var(--body); }
.deck-body li { margin: 7px 0; }

.deck-body strong { color: var(--paper); }
.deck-body code {
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(47, 211, 198, 0.12);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 15px;
}

.deck-body blockquote {
  margin: 20px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--warm);
  border-radius: 0 10px 10px 0;
  background: rgba(242, 166, 90, 0.08);
  color: var(--paper);
}

.deck-body blockquote p { color: var(--paper); margin-bottom: 8px; }
.deck-body blockquote p:last-child { margin-bottom: 0; }

.deck-body figure {
  margin: 20px 0;
  border-radius: 10px;
  overflow: hidden;
  border-bottom: 3px solid var(--cyan);
  background: var(--ink-deep);
}

.deck-body img { border-radius: 10px; }
.deck-body figure img { border-radius: 0; }

.deck-body table {
  display: block;
  width: 100%;
  margin: 0 0 18px;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 16px;
}

.deck-body th,
.deck-body td {
  padding: 9px 12px;
  border: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.deck-body th { background: rgba(47, 211, 198, 0.08); color: var(--paper); }

/* ---------- 页脚 ---------- */
.site-foot {
  position: relative;
  z-index: 3;
  padding: clamp(30px, 5vw, 54px) clamp(14px, 3vw, 40px) 22px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 15, 27, 0.35), rgba(10, 15, 27, 0.96));
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: clamp(16px, 3vw, 36px);
  max-width: var(--max);
  margin: 0 auto;
}

.foot-head .brand { padding-left: 0; }

.site-foot dl { margin: 0; }

.site-foot dt {
  margin-bottom: 10px;
  color: var(--warm);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.site-foot dd { margin: 0; }

.site-foot dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--muted);
  font-size: 16px;
  transition: color 0.2s ease;
}

.site-foot dd a:hover { color: var(--cyan); }

.site-foot .host { color: #6E7D93; font-size: 16px; }

.copy {
  max-width: var(--max);
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(232, 239, 245, 0.08);
  color: #74839A;
  font-size: 16px;
}

/* ---------- 滚动显现 ---------- */
html.js .deck-body > div,
html.js .hero-copy,
html.js .hero-art {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 0.7, 0.3, 1);
}

html.js .deck-body > div.in,
html.js .hero-copy.in,
html.js .hero-art.in {
  opacity: 1;
  transform: none;
}

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-head { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .head-bar {
    grid-template-columns: 1fr;
    gap: 4px;
    justify-items: center;
  }

  .head-bar .brand { order: -1; }

  .head-bar p {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: flex-start;
  }

  .head-bar p::-webkit-scrollbar { display: none; }
  .head-bar .side-b { justify-content: flex-start; }
  .head-bar p a { flex: 0 0 auto; padding: 6px 10px; }

  .subbar { display: none; }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 10px;
  }

  .hero h1 { font-size: clamp(28px, 8vw, 38px); }
  .hero-art { aspect-ratio: 16 / 10; }

  .deck { grid-template-columns: 1fr; gap: 18px; }
  .rail { position: static; }
  .rail ul { display: flex; flex-wrap: wrap; gap: 2px 10px; }
  .rail ul a { border-bottom: 0; padding: 8px 0; }
  .deck-body > div { scroll-margin-top: 20px; }
}

@media (max-width: 420px) {
  .foot-grid { grid-template-columns: 1fr; }
  .hero-note { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  html.js .deck-body > div,
  html.js .hero-copy,
  html.js .hero-art {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-art .hero-img { transform: none; }
  .bg span { transform: none !important; }
}

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