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

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

:root {
  --ink: #26171f;
  --pink: #ff0080;
  --magenta: #ff00ff;
  --violet: #7b2cff;
  --aqua: #00d4ff;
  --mist: #f8eff6;
  --dim: rgba(248, 239, 246, 0.7);
  --line: rgba(255, 255, 255, 0.16);
  --r: 28px;
  --display: "Bebas Neue", "Source Sans 3", system-ui, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --body: "Source Sans 3", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.78;
  color: var(--mist);
  background: var(--ink);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 42% at 12% 16%, rgba(255, 0, 128, 0.58), transparent 70%),
    radial-gradient(34% 38% at 82% 10%, rgba(255, 0, 255, 0.44), transparent 72%),
    radial-gradient(48% 46% at 72% 78%, rgba(123, 44, 255, 0.4), transparent 70%),
    radial-gradient(40% 40% at 22% 88%, rgba(0, 212, 255, 0.24), transparent 72%);
  filter: blur(52px) saturate(135%);
  opacity: 0.62;
  mix-blend-mode: screen;
  animation: drift 26s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.14); }
}

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

/* ---------- 顶栏 ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: rgba(38, 23, 31, 0.74);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  order: 1;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--pink), var(--magenta) 58%, var(--violet));
  box-shadow: 0 8px 20px rgba(255, 0, 128, 0.36);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.brand:hover { transform: translateY(-2px) rotate(-3deg); box-shadow: 0 12px 26px rgba(255, 0, 128, 0.5); }

.brand-img { width: 26px; height: 26px; object-fit: contain; display: block; }

.brand-glyph {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 4px rgba(38, 23, 31, 0.45);
}

.nav-drawer {
  order: 2;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 2px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.nav-list li { flex: 0 0 auto; }

.nav-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--dim);
  font-size: 16px;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--line);
}

.search { order: 3; flex: 0 0 auto; }

.search input {
  width: 128px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--mist);
  font: inherit;
  font-size: 16px;
}

.search input::placeholder { color: rgba(248, 239, 246, 0.62); }

.search input:focus {
  outline: 2px solid var(--magenta);
  outline-offset: 1px;
}

/* ---------- 首屏 ---------- */
main { position: relative; z-index: 1; }

.hero {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: center;
  gap: clamp(20px, 4vw, 46px);
  min-height: 70vh;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(26px, 6vw, 66px) 18px clamp(26px, 5vw, 50px);
}

.hero-text { text-align: left; }

.hero-text h1 {
  margin: 0 0 0.28em;
  font-family: var(--display);
  font-size: clamp(2.5rem, 7.6vw, 4.9rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  background: linear-gradient(96deg, #ffffff 6%, #ff8fc4 44%, var(--magenta) 74%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #fff;
}

.lede {
  margin: 0 0 1.2em;
  max-width: 46ch;
  font-size: 18px;
  color: var(--dim);
}

.hero-cta { margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--pink), var(--magenta));
  color: #fff;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(255, 0, 128, 0.34);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(255, 0, 128, 0.48); }

.hero-figure {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--r);
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  background: conic-gradient(from 208deg at 42% 42%, var(--pink), var(--magenta), var(--violet), var(--aqua), var(--pink));
}

.mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(52% 52% at 28% 28%, rgba(255, 255, 255, 0.55), transparent 70%),
    radial-gradient(62% 62% at 78% 72%, rgba(0, 0, 0, 0.42), transparent 72%);
  mix-blend-mode: screen;
  filter: blur(16px);
}

.hero-img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(38, 23, 31, 0.62);
  backdrop-filter: blur(10px);
  font-size: 16px;
  letter-spacing: 0.04em;
  color: #fff;
}

/* ---------- 正文 + 侧栏 ---------- */
.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  align-items: start;
  gap: clamp(20px, 4vw, 40px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px clamp(50px, 8vw, 80px);
}

.prose {
  padding: clamp(22px, 4vw, 46px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.078), rgba(255, 255, 255, 0.034));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  overflow-wrap: break-word;
}

.prose div[id] { scroll-margin-top: 104px; }

.prose > div + div {
  margin-top: clamp(32px, 5vw, 56px);
  padding-top: clamp(8px, 2vw, 16px);
}

.prose h2 {
  margin: 0.1em 0 0.1em;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.4vw, 2.25rem);
  line-height: 1.22;
  letter-spacing: 0.01em;
  color: #fff;
}

.prose h2 + hr {
  width: 66px;
  height: 3px;
  margin: 10px 0 18px;
  border: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--pink), var(--magenta), transparent);
}

.prose h3 {
  margin: 1.4em 0 0.5em;
  font-size: 1.24rem;
  line-height: 1.4;
  color: #fff;
}

.prose p { margin: 0 0 1em; }

.prose ul,
.prose ol { margin: 0 0 1em; padding-left: 1.25em; }

.prose li { margin: 0.35em 0; }

.prose a {
  color: #ff9ecb;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}

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

.prose strong { color: #fff; }

.prose blockquote {
  margin: 1.4em 0;
  padding: 14px 20px;
  border-left: 3px solid var(--pink);
  border-radius: 0 18px 18px 0;
  background: rgba(255, 0, 128, 0.1);
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
}

.prose table {
  width: 100%;
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 16px;
}

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

.prose th { color: #fff; }

.prose code {
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.94em;
}

.rail {
  position: sticky;
  top: 82px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.062);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.rail h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  color: #fff;
}

.rail hr {
  height: 2px;
  margin: 10px 0 14px;
  border: 0;
  background: linear-gradient(90deg, var(--magenta), transparent);
}

.rail ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; }

.rail a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 11px;
  border-radius: 14px;
  color: var(--dim);
  font-size: 16px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.rail a:hover {
  padding-left: 16px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ---------- 页脚 ---------- */
.fin {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: rgba(38, 23, 31, 0.6);
  backdrop-filter: blur(10px);
}

.fin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 18px;
}

.fin-logo {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.07em;
  color: #fff;
  text-decoration: none;
}

.fin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
  font-size: 16px;
}

.fin-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--dim);
  text-decoration: none;
}

.fin-nav a:hover { color: #fff; }

.fin-copy {
  margin: 0;
  font-size: 16px;
  color: var(--dim);
}

/* ---------- 动效 ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-text > * { animation: rise 0.7s both; }
  .hero-text > *:nth-child(2) { animation-delay: 0.08s; }
  .hero-text > *:nth-child(3) { animation-delay: 0.16s; }
  .hero-figure { animation: rise 0.8s 0.1s both, shimmer 24s linear infinite; }
  .prose > div { animation: rise 0.6s both; }
  .prose > div:nth-child(2) { animation-delay: 0.06s; }
  .prose > div:nth-child(3) { animation-delay: 0.12s; }
  .prose > div:nth-child(4) { animation-delay: 0.18s; }
  .prose > div:nth-child(5) { animation-delay: 0.24s; }
  .prose > div:nth-child(6) { animation-delay: 0.3s; }
  .prose > div:nth-child(7) { animation-delay: 0.36s; }
  .rail { animation: rise 0.7s 0.2s both; }
}

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

@keyframes shimmer {
  to { filter: hue-rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
  .rail ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-top: 26px;
  }
  .hero-figure { aspect-ratio: 16 / 10; }
  .lede { font-size: 17px; }
}

@media (max-width: 560px) {
  .search input { width: 92px; padding: 0 11px; }
  .nav-list a { padding: 0 11px; }
  .rail ul { grid-template-columns: minmax(0, 1fr); }
  .fin-row { justify-content: flex-start; }
}

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