:root {
  --ink: #0a0508;
  --ink2: #26171f;
  --mag: #ff0080;
  --lil: #ff00ff;
  --fg: #f7eef4;
  --dim: rgba(247, 238, 244, .62);
  --line: rgba(255, 255, 255, .16);
  --line-soft: rgba(255, 255, 255, .08);
  --r: 4px;
  --pad: clamp(18px, 4vw, 44px);
}

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

html {
  background: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: transparent;
  color: var(--fg);
  font: 400 17px/1.7 Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  letter-spacing: .01em;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: -30% -25%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38% 42% at 16% 18%, rgba(255, 0, 128, .58), transparent 70%),
    radial-gradient(44% 38% at 84% 30%, rgba(255, 0, 255, .46), transparent 72%),
    radial-gradient(52% 46% at 52% 88%, rgba(122, 0, 184, .50), transparent 70%),
    conic-gradient(from 205deg at 62% 40%, rgba(255, 0, 128, .34), rgba(0, 208, 255, .16), rgba(255, 0, 255, .34), rgba(255, 0, 128, .34));
  filter: blur(72px) saturate(1.35);
  opacity: .82;
  mix-blend-mode: screen;
  animation: drift 34s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(circle at 50% 26%, #000 12%, transparent 82%);
  mask-image: radial-gradient(circle at 50% 26%, #000 12%, transparent 82%);
}

@keyframes drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1.06); filter: blur(72px) saturate(1.35) hue-rotate(0deg); }
  to { transform: translate3d(3%, 2%, 0) scale(1.2); filter: blur(72px) saturate(1.5) hue-rotate(26deg); }
}

a { color: var(--fg); text-decoration: none; }
p { margin: 0 0 1.05em; }
img { max-width: 100%; height: auto; }

h1, h2, h3 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 600;
}

hr {
  border: 0;
  height: 1px;
  margin: 14px 0 18px;
  background: linear-gradient(90deg, var(--mag), var(--lil) 45%, transparent);
}

:focus-visible {
  outline: 2px solid var(--lil);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 120;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--ink2);
  transition: top .2s ease;
}
.skip:focus { top: 12px; }

/* ---------- 顶栏 ---------- */
.masthead { position: relative; z-index: 50; }

.bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px var(--pad);
  border-bottom: 1px solid var(--line-soft);
}

.burger {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(38, 23, 31, .55);
  color: var(--fg);
  font: inherit;
  font-size: .95rem;
  cursor: pointer;
  position: relative;
  z-index: 90;
  transition: border-color .2s ease, background .2s ease;
}
.burger:hover { border-color: var(--mag); background: rgba(255, 0, 128, .12); }

.burger-lines { display: grid; gap: 4px; }
.burger-lines i {
  display: block;
  width: 17px;
  height: 2px;
  background: currentColor;
  transition: transform .24s ease, opacity .24s ease;
}
body.menu-open .burger-lines i:first-child { transform: translateY(3px) rotate(45deg); }
body.menu-open .burger-lines i:last-child { transform: translateY(-3px) rotate(-45deg); }

.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 10px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: lowercase;
}
.brand-txt {
  background: linear-gradient(96deg, #fff, var(--mag) 46%, var(--lil));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--mag);
  border-radius: var(--r);
  background: linear-gradient(120deg, rgba(255, 0, 128, .9), rgba(255, 0, 255, .82));
  color: #14060d;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .04em;
  transition: transform .2s ease, filter .2s ease;
}
.cta:hover { transform: translateY(-1px); filter: brightness(1.1); }

/* ---------- 锚点条 / 全屏菜单 ---------- */
.dock {
  position: sticky;
  top: 0;
  z-index: 45;
  background: rgba(10, 5, 8, .76);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.dock ol {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin: 0;
  padding: 4px var(--pad);
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.dock ol::-webkit-scrollbar { display: none; }

.dock a {
  display: block;
  white-space: nowrap;
  padding: 12px 10px;
  font-size: .92rem;
  color: var(--dim);
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.dock a:hover { color: var(--fg); }
.dock a[aria-current] { color: var(--fg); border-bottom-color: var(--mag); }

body.menu-open { overflow: hidden; }

body.menu-open .bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 95;
  background: rgba(10, 5, 8, .96);
  border-bottom: 1px solid var(--line);
}

body.menu-open .dock {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  padding: 84px var(--pad) 40px;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(255, 0, 128, .22), transparent 70%),
    rgba(10, 5, 8, .97);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  overflow-y: auto;
}
body.menu-open .dock ol {
  flex-direction: column;
  align-items: center;
  gap: 2px;
  overflow: visible;
  width: 100%;
  max-width: 460px;
}
body.menu-open .dock a {
  padding: 14px 20px;
  font-size: 1.3rem;
  color: var(--fg);
  border-bottom: 0;
  border-top: 1px solid var(--line-soft);
  width: 100%;
  text-align: center;
}

/* ---------- 主体栅格 ---------- */
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 244px;
  align-items: start;
  gap: clamp(24px, 4vw, 56px);
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 54px) var(--pad) 72px;
}

.sheet { min-width: 0; }

div[id] { scroll-margin-top: 92px; }

article > div:not(.hero) {
  padding: 38px 0;
  border-bottom: 1px solid var(--line-soft);
}
article > div:not(.hero):last-of-type { border-bottom: 0; }

.sheet h2 {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  margin-top: 6px;
}

.sheet h3 {
  font-size: 1.12rem;
  margin: 22px 0 8px;
  color: #ffd9ec;
}

.sheet p, .sheet li { color: rgba(247, 238, 244, .84); }

.sheet ul, .sheet ol { padding-left: 1.3em; }
.sheet li { margin-bottom: .45em; }

.sheet blockquote {
  margin: 22px 0;
  padding: 14px 20px;
  border-left: 2px solid var(--mag);
  border-radius: 0 var(--r) var(--r) 0;
  background: rgba(255, 0, 128, .07);
}
.sheet blockquote p:last-child { margin-bottom: 0; }

.sheet a {
  color: #ffc4e2;
  border-bottom: 1px solid rgba(255, 0, 128, .5);
}
.sheet a:hover { color: #fff; border-bottom-color: var(--lil); }

.sheet img {
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: block;
  margin: 18px 0;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 70svh;
  padding: clamp(34px, 8vw, 74px) 0 clamp(26px, 5vw, 50px);
  overflow: hidden;
  text-align: center;
  border-bottom: 1px solid var(--line-soft);
}
.hero-slim { min-height: 30svh; }

.hero-wm {
  position: absolute;
  inset: 50% 0 auto;
  transform: translateY(-50%);
  font-size: clamp(3.4rem, 15vw, 9rem);
  font-weight: 700;
  letter-spacing: -.05em;
  line-height: .9;
  white-space: nowrap;
  opacity: .16;
  pointer-events: none;
  user-select: none;
  background: linear-gradient(120deg, #ff6bb2, #ff00ff 40%, #5ae0ff 75%, #ff0080);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-core { position: relative; z-index: 1; max-width: 40rem; }

.hero-head {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-art {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin: 0;
}

.hero h1 {
  font-size: clamp(1.95rem, 6.4vw, 3.4rem);
  letter-spacing: -.035em;
  background: linear-gradient(104deg, #fff 18%, #ffb3d6 58%, var(--lil));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 18px auto 0;
  max-width: 42ch;
  font-size: .98rem;
  color: var(--dim);
}

/* ---------- 侧栏 ---------- */
.rail {
  position: sticky;
  top: 78px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 16px;
  background: rgba(38, 23, 31, .42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.rail h2 {
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .28em;
  color: var(--dim);
}
.rail hr { margin: 10px 0 12px; }

.rail ol { margin: 0; padding: 0; list-style: none; }
.rail li + li { border-top: 1px dashed var(--line-soft); }
.rail a {
  display: block;
  padding: 9px 2px;
  font-size: .9rem;
  color: var(--dim);
  transition: color .2s ease, padding-left .2s ease;
}
.rail a:hover { color: var(--fg); padding-left: 6px; }
.rail a[aria-current] { color: var(--mag); }

/* ---------- 页脚 ---------- */
.base {
  border-top: 1px solid var(--line);
  padding: clamp(30px, 5vw, 48px) var(--pad) 26px;
  background: linear-gradient(180deg, transparent, rgba(255, 0, 128, .08));
  overflow: hidden;
}

.base div + div { margin-top: 22px; }

.base-brand p {
  margin: 0;
  font-size: clamp(2.4rem, 12vw, 7.2rem);
  font-weight: 700;
  line-height: .92;
  letter-spacing: -.05em;
  background: linear-gradient(100deg, #fff 8%, var(--mag) 52%, var(--lil));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.foot-nav ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.foot-nav a {
  display: block;
  padding: 10px 0;
  font-size: .9rem;
  color: var(--dim);
}
.foot-nav a:hover { color: var(--fg); }

.base-copy p {
  margin: 0;
  font-size: .82rem;
  letter-spacing: .06em;
  color: rgba(247, 238, 244, .45);
}

/* ---------- 回到顶部 ---------- */
.totop {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(38, 23, 31, .88);
  color: var(--fg);
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .24s ease, transform .24s ease, visibility .24s;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.totop.show { opacity: 1; visibility: visible; transform: none; }
.totop:hover { border-color: var(--mag); }

/* ---------- 滚动显现 ---------- */
.js article > div:not(.hero) {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s cubic-bezier(.2, .7, .3, 1), transform .6s cubic-bezier(.2, .7, .3, 1);
}
.js article > div:not(.hero).in { opacity: 1; transform: none; }

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  main { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
  .rail ol { display: flex; flex-wrap: wrap; gap: 2px 14px; }
  .rail li + li { border-top: 0; }
  .rail a { padding: 10px 2px; }
}

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .bar { padding: 10px var(--pad); }
  .brand { letter-spacing: .1em; font-size: .95rem; }
  .burger-txt { display: none; }
  .burger { padding: 10px 12px; }
  .cta { padding: 10px 14px; font-size: .88rem; }
  .hero { min-height: 62svh; }
  .hero-art { width: 42px; height: 42px; }
  .dock a { font-size: .88rem; padding: 12px 9px; }
  article > div:not(.hero) { padding: 28px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { animation: none; }
  .js article > div:not(.hero) { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

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