@import url('https://fonts.googleapis.com/css2?family=Newsreader:wght@400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap');

:root {
  --ink: #0d0d0d;
  --ink-soft: #100e16;
  --purple: #8000ff;
  --magenta: #ff00ff;
  --mint: #6ef9c8;
  --text: #ece7f5;
  --dim: #a79fc0;
  --line: rgba(255, 0, 255, 0.18);
  --glass: rgba(255, 255, 255, 0.045);
  --radius: 28px;
  --bar-h: 42px;
  --rail-w: 214px;
  --font-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-display: 'Newsreader', Georgia, 'Songti SC', 'SimSun', serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

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

body {
  margin: 0;
  padding-top: var(--bar-h);
  background-color: var(--ink);
  background-image:
    radial-gradient(900px 620px at 8% -12%, rgba(128, 0, 255, 0.30), transparent 62%),
    radial-gradient(760px 520px at 102% 4%, rgba(255, 0, 255, 0.16), transparent 58%),
    linear-gradient(180deg, #0d0d0d 0%, #0b0a11 58%, #0d0d0d 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.5;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
}

img { max-width: 100%; }

a { color: var(--magenta); }

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

/* 顶部细条 */
.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--bar-h);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  background: rgba(13, 13, 13, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.bar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
  animation: pulse 2.6s ease-in-out infinite;
}

.bar-txt {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

/* 左侧竖排导航 */
.rail {
  position: fixed;
  top: var(--bar-h);
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 14px 24px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(128, 0, 255, 0.12), rgba(13, 13, 13, 0.88) 42%);
  backdrop-filter: blur(12px);
}

.rail-logo {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  min-height: 46px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: rgba(255, 0, 255, 0.09);
  box-shadow: inset 0 0 18px rgba(128, 0, 255, 0.35);
  text-decoration: none;
  color: #fff;
}

.rail-logo img { width: 28px; height: 28px; border-radius: 8px; display: block; }

.rail-mark {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1;
  text-shadow: 0 0 14px rgba(255, 0, 255, 0.7);
}

.rail-nav { margin-top: 10px; }

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--dim);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.05em;
  transition: color 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.rail-link:hover,
.rail-link:focus-visible,
.rail-link.is-on {
  color: #fff;
  border-color: var(--line);
  background: rgba(255, 0, 255, 0.1);
  box-shadow: 0 0 16px rgba(255, 0, 255, 0.22);
}

/* 首屏 */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 44px;
  min-height: calc(100vh - var(--bar-h));
  min-height: calc(100svh - var(--bar-h));
  padding: 64px clamp(20px, 4.5vw, 60px);
  overflow: hidden;
}

.ghost {
  position: absolute;
  left: clamp(8px, 3vw, 40px);
  bottom: -1.4vw;
  z-index: 0;
  font-family: var(--font-display);
  font-size: clamp(70px, 13vw, 190px);
  line-height: 0.8;
  letter-spacing: -0.04em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 0, 255, 0.3);
  opacity: 0.55;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.hero-title {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 5.8vw, 72px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: #fff;
  text-shadow: 0 0 22px rgba(255, 0, 255, 0.55), 0 0 64px rgba(128, 0, 255, 0.45);
}

.hero-title::before,
.hero-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-title::before {
  color: var(--magenta);
  opacity: 0.7;
  clip-path: inset(0 0 52% 0);
  animation: glitch-a 6s steps(1) infinite;
}

.hero-title::after {
  color: var(--mint);
  opacity: 0.5;
  clip-path: inset(50% 0 0 0);
  animation: glitch-b 5s steps(1) infinite;
}

@keyframes glitch-a {
  0%, 84%, 100% { transform: translate(-2px, -2px); }
  87% { transform: translate(-7px, 2px) skewX(-7deg); }
  91% { transform: translate(4px, -3px) skewX(5deg); }
}

@keyframes glitch-b {
  0%, 78%, 100% { transform: translate(2px, 2px); }
  82% { transform: translate(6px, -4px) skewX(6deg); }
  89% { transform: translate(-5px, 3px); }
}

.hero-desc {
  margin: 0;
  max-width: 46ch;
  color: var(--dim);
  font-weight: 300;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 0, 255, 0.5);
  background: rgba(128, 0, 255, 0.18);
  box-shadow: 0 0 22px rgba(255, 0, 255, 0.24);
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:first-child {
  border-color: transparent;
  background: linear-gradient(120deg, var(--purple), var(--magenta));
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(255, 0, 255, 0.45); }

.hero-media {
  position: relative;
  z-index: 2;
  min-width: 0;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: linear-gradient(150deg, rgba(128, 0, 255, 0.4), rgba(255, 0, 255, 0.18) 55%, rgba(13, 13, 13, 0.92));
  box-shadow: 0 0 60px rgba(128, 0, 255, 0.32);
}

.hero-media.is-empty::after {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
}

.hero-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 正文容器 */
main {
  position: relative;
  z-index: 2;
  padding: 0 clamp(16px, 4vw, 48px) 76px;
}

.wrap {
  max-width: 1060px;
  margin: 0 auto;
}

.panel {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(14px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.5);
  padding: clamp(20px, 3.2vw, 44px);
}

.prose { max-width: 74ch; margin: 0 auto; }

.toc { margin: 0 0 30px; }

.toc small {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.34em;
  color: var(--mint);
  text-shadow: 0 0 10px rgba(110, 249, 200, 0.45);
}

.toc h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.toc-list a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--dim);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

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

.prose > article {
  padding: clamp(20px, 2.6vw, 30px) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  scroll-margin-top: calc(var(--bar-h) + 28px);
}

.prose > article:first-of-type { border-top: 0; }

.prose h2 {
  margin: 0.1em 0 0.55em;
  font-family: var(--font-display);
  font-size: clamp(23px, 3vw, 33px);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 0 20px rgba(128, 0, 255, 0.4);
}

.prose h3 {
  margin: 1.3em 0 0.5em;
  font-size: clamp(18px, 2.1vw, 21px);
  line-height: 1.4;
  color: #fff;
}

.prose small {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.34em;
  color: var(--mint);
}

.prose p { margin: 0 0 1em; overflow-wrap: break-word; }

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

.prose li { margin-bottom: 0.4em; }

.prose li::marker { color: var(--magenta); }

.prose a { color: var(--magenta); text-underline-offset: 3px; }

.prose strong { color: #fff; }

.prose blockquote {
  margin: 1.2em 0;
  padding: 12px 20px;
  border-left: 2px solid var(--magenta);
  background: rgba(255, 0, 255, 0.06);
  border-radius: 0 14px 14px 0;
  color: var(--dim);
}

/* 页脚 */
.foot {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 16px clamp(16px, 4vw, 48px) 26px;
  border-top: 1px solid var(--line);
  background: rgba(13, 13, 13, 0.72);
}

.foot-in {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 22px;
}

.foot-addr {
  font-style: normal;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.06em;
  color: #fff;
}

.foot-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
  padding: 0;
}

.foot-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 10px;
  color: var(--dim);
  font-size: 15px;
  text-decoration: none;
}

.foot-list a:hover { color: #fff; background: rgba(255, 0, 255, 0.1); }

.foot-copy {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: rgba(167, 159, 192, 0.75);
}

/* 移动端 */
@media (max-width: 959px) {
  .rail {
    position: static;
    width: auto;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding: 12px 14px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail-nav { flex: 1 1 100%; margin: 0; }

  .rail-list { flex-direction: row; flex-wrap: wrap; gap: 6px; }

  .rail-link {
    min-height: 44px;
    padding: 6px 13px;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 26px;
    padding: 44px 18px 46px;
  }

  .ghost {
    top: 6px;
    bottom: auto;
    font-size: clamp(52px, 19vw, 110px);
    opacity: 0.35;
  }

  .hero-title { font-size: clamp(32px, 9.6vw, 48px); }

  .hero-media {
    aspect-ratio: 16 / 11;
    max-width: 460px;
    margin: 0 auto;
  }

  main { padding: 0 14px 56px; }

  .panel { padding: 20px 16px; }

  .foot { padding: 12px 16px 22px; }

  .foot-in { justify-content: flex-start; }
}

@media (min-width: 960px) {
  body { padding-left: var(--rail-w); }
}

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

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