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

:root {
  --pink: #ff0080;
  --magenta: #ff00ff;
  --ink: #26171f;
  --deep: #120a0f;
  --mid: #1d1118;
  --txt: #f8edf4;
  --dim: #cfb3c3;
  --line: rgba(255, 255, 255, .14);
  --soft: rgba(255, 255, 255, .06);
  --nav-w: 220px;
  --pad: clamp(18px, 4vw, 56px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background-color: var(--deep);
  background-image:
    radial-gradient(58% 48% at 10% 4%, rgba(255, 0, 128, .42), transparent 68%),
    radial-gradient(48% 42% at 92% 10%, rgba(255, 0, 255, .28), transparent 70%),
    radial-gradient(72% 60% at 74% 92%, rgba(122, 0, 92, .55), transparent 76%),
    linear-gradient(158deg, #2b1620 0%, #170d14 58%, #0c070a 100%);
  background-attachment: fixed;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Lexend', 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.68;
  color: var(--txt);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -1;
  background-image:
    radial-gradient(38% 38% at 24% 30%, rgba(255, 0, 128, .55), transparent 66%),
    radial-gradient(34% 34% at 76% 26%, rgba(255, 0, 255, .42), transparent 66%),
    radial-gradient(44% 44% at 54% 82%, rgba(138, 0, 108, .52), transparent 72%);
  filter: blur(42px) saturate(135%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: aurora-flow 28s ease-in-out infinite alternate;
}

@keyframes aurora-flow {
  0% { transform: translate3d(0, 0, 0) scale(1); filter: blur(42px) hue-rotate(0deg); }
  50% { transform: translate3d(-3%, 2%, 0) scale(1.14); filter: blur(48px) hue-rotate(-16deg); }
  100% { transform: translate3d(3%, -2%, 0) scale(1.05); filter: blur(44px) hue-rotate(18deg); }
}

img { max-width: 100%; }

a { color: #ff8ecb; }

:where(h1, h2, h3, p, dl, dd, ol, ul, figure) { margin: 0; }

/* ==== 左侧固定头部 ==== */
.site-head {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--nav-w);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px 16px 24px;
  border-right: 1px solid var(--line);
  background: rgba(20, 11, 16, .68);
  backdrop-filter: blur(14px) saturate(130%);
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
  text-decoration: none;
  color: var(--txt);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.2;
}

.mark img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.mark span { max-width: 6em; }

.site-head nav { flex: 1 1 auto; min-height: 0; }

.site-head nav p {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  overflow-y: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.site-head nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 16px;
  line-height: 1.3;
  color: var(--dim);
  text-decoration: none;
  background: var(--soft);
  transition: color .22s ease, border-color .22s ease, background .22s ease, transform .22s ease;
}

.site-head nav a:hover,
.site-head nav a:focus-visible {
  color: #fff;
  border-color: var(--pink);
  background: rgba(255, 0, 128, .18);
  transform: translateX(2px);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 999px;
  background: linear-gradient(96deg, var(--pink), var(--magenta));
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 26px -14px rgba(255, 0, 128, .95);
}

.cta:hover { filter: brightness(1.08); }

/* ==== 主区 ==== */
main { padding-left: var(--nav-w); }

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-height: 45vh;
  overflow: hidden;
  padding: 44px var(--pad) 34px;
  background-image: linear-gradient(132deg, #3d1133, #26171f 58%, #12070d);
}

.hero-media { position: absolute; inset: 0; z-index: 0; }

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.06);
  will-change: transform;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(258deg, rgba(38, 23, 31, .95) 4%, rgba(38, 23, 31, .6) 46%, rgba(255, 0, 128, .28) 100%),
    radial-gradient(62% 100% at 100% 100%, rgba(255, 0, 255, .34), transparent 72%);
}

.hero-copy { position: relative; z-index: 2; text-align: right; max-width: min(780px, 100%); }

.hero-lead {
  font-size: 16px;
  letter-spacing: .16em;
  color: #ffb3dc;
  margin-bottom: 8px;
}

.hero h1 {
  font-size: clamp(28px, 4.6vw, 54px);
  line-height: 1.14;
  letter-spacing: -.025em;
  font-weight: 600;
  text-wrap: balance;
}

/* ==== 内容栅格：aside 在左 ==== */
.content {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  gap: 42px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 52px var(--pad) 8px;
}

.side {
  position: sticky;
  top: 24px;
  padding: 20px 18px 22px;
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--pink);
  border-radius: 0;
  background: rgba(30, 17, 24, .72);
  backdrop-filter: blur(8px);
}

.side h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .01em;
  margin-bottom: 6px;
}

.side .subtitle {
  font-size: 16px;
  line-height: 1.55;
  color: var(--dim);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--soft);
}

.toc {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: flex;
  flex-direction: column;
}

.toc li { margin: 0; }

.toc a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 0;
  font-size: 16px;
  color: var(--dim);
  text-decoration: none;
  border-bottom: 1px solid var(--soft);
  transition: color .2s ease, padding-left .2s ease;
}

.toc li:last-child a { border-bottom: 0; }

.toc a:hover,
.toc a:focus-visible { color: #fff; padding-left: 5px; }

/* ==== 正文 ==== */
.body { min-width: 0; }

.body article {
  scroll-margin-top: 24px;
  padding-bottom: 30px;
  margin-bottom: 34px;
  border-bottom: 2px solid rgba(255, 0, 128, .45);
}

.body article:last-child { border-bottom: 0; margin-bottom: 10px; }

.body h2 {
  font-size: clamp(22px, 2.9vw, 31px);
  line-height: 1.27;
  letter-spacing: -.018em;
  font-weight: 600;
  margin-bottom: 12px;
}

.body h3 {
  font-size: 19px;
  line-height: 1.4;
  font-weight: 600;
  margin: 22px 0 8px;
  color: #ffd3e8;
}

.body p { margin-bottom: 14px; color: #eddae5; }

.body ul,
.body ol { padding-left: 22px; margin-bottom: 16px; }

.body li { margin: .32em 0; }

.body a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

.body blockquote {
  margin: 0 0 16px;
  padding: 10px 0 10px 18px;
  border-left: 2px solid var(--magenta);
  color: var(--dim);
}

.body figure { margin: 0 0 18px; }

.body figure img,
.body img { display: block; width: 100%; height: auto; border-radius: 0; }

.body figcaption { font-size: 15px; color: var(--dim); padding-top: 7px; }

.body table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 16px; }

.body th,
.body td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; }

.body code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 15px;
  background: rgba(255, 0, 128, .14);
  padding: 1px 5px;
}

/* ==== 页脚 ==== */
.foot {
  margin-left: var(--nav-w);
  padding: 8px var(--pad) 30px;
}

.foot-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0;
  border-top: 2px solid rgba(255, 0, 128, .55);
  border-bottom: 1px solid var(--line);
}

.foot-cta .k {
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: -.02em;
}

.foot-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 24px;
  border-radius: 999px;
  background: linear-gradient(96deg, var(--pink), var(--magenta));
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.foot-cols dl {
  border-bottom: 2px solid rgba(255, 0, 128, .32);
  padding-bottom: 10px;
}

.foot-cols dt {
  font-size: 16px;
  letter-spacing: .1em;
  color: #ff9ed2;
  margin-bottom: 8px;
}

.foot-cols dd { font-size: 16px; line-height: 1.5; color: var(--dim); }

.foot-cols dd a {
  display: flex;
  align-items: center;
  min-height: 40px;
  color: var(--dim);
  text-decoration: none;
  border-bottom: 1px solid var(--soft);
}

.foot-cols dd a:hover,
.foot-cols dd a:focus-visible { color: #fff; }

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 18px;
  font-size: 16px;
  color: var(--dim);
}

.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--dim);
  text-decoration: none;
}

.foot-links a:hover { color: #fff; }

/* ==== 动效 ==== */
.js .body > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
  transition-delay: calc(var(--i, 0) * 42ms);
}

.js .body > .in { opacity: 1; transform: none; }

.js .toc li {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .4s ease, transform .4s ease;
  transition-delay: calc(var(--i, 0) * 34ms);
}

.js .toc li.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { animation: none; }
  .js .body > *,
  .js .toc li { opacity: 1; transform: none; transition: none; }
  .hero-img { transform: none !important; }
}

/* ==== 移动端 ==== */
@media (max-width: 900px) {
  .site-head {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(18, 10, 15, .88);
  }

  .mark { flex: 0 0 auto; min-height: 40px; font-size: 15px; }
  .mark span { max-width: 3em; line-height: 1.1; }

  .site-head nav { flex: 1 1 auto; min-width: 0; overflow: hidden; }

  .site-head nav p {
    flex-direction: row;
    gap: 7px;
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .site-head nav p::-webkit-scrollbar { display: none; }

  .site-head nav a {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 8px 13px;
    font-size: 15px;
    white-space: nowrap;
  }

  .cta { flex: 0 0 auto; min-height: 40px; padding: 8px 14px; font-size: 15px; }

  main { padding-left: 0; padding-top: 62px; }

  .hero { min-height: 45vh; padding: 30px 18px 24px; }

  .content {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 30px 18px 8px;
  }

  .side { position: static; }

  .body article { scroll-margin-top: 82px; }

  .foot { margin-left: 0; padding: 6px 18px 26px; }

  .foot-cols { gap: 14px; }

  .foot-cols dd,
  .foot-cols dt { font-size: 16px; }

  .foot-cols dd a { min-height: 40px; }
}

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