@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syncopate:wght@400;700&display=swap');

:root {
  --ink: #001e3c;
  --deep: #000d18;
  --mint: #99ffcc;
  --neon: #00ff41;
  --paper: #e6fff6;
  --body: #d3f2e6;
  --dim: #9dc4b8;
  --line: rgba(153, 255, 204, .22);
  --card: rgba(0, 26, 50, .62);
  --radius: 10px;
  --shadow: 0 20px 44px -24px rgba(0, 255, 65, .5), 0 4px 18px -10px rgba(0, 0, 0, .8);
  --wide: "Syncopate", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Space Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

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

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

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

img { max-width: 100%; height: auto; }

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

a:focus-visible,
summary:focus-visible,
button:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 有机背景 ---------- */
.bio-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(58% 42% at 88% -6%, rgba(0, 255, 65, .18), transparent 72%),
    radial-gradient(52% 40% at 2% 22%, rgba(153, 255, 204, .14), transparent 74%),
    linear-gradient(185deg, #002646 0%, #001a33 46%, #000c17 100%);
}

.bio-grid {
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image:
    linear-gradient(to right, rgba(153, 255, 204, .07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(153, 255, 204, .05) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 88%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 88%);
}

.bio-blob {
  position: absolute;
  border-radius: 52% 42% 56% 44% / 46% 56% 40% 54%;
  filter: blur(30px);
  opacity: .5;
  mix-blend-mode: screen;
  animation: breathe 15s ease-in-out infinite;
}

.b1 {
  width: 46vmax; height: 46vmax;
  left: -16vmax; top: -10vmax;
  background: radial-gradient(circle at 36% 36%, #00ff41, transparent 62%);
}

.b2 {
  width: 38vmax; height: 38vmax;
  right: -14vmax; top: 26vh;
  background: radial-gradient(circle at 62% 42%, #99ffcc, transparent 63%);
  animation-delay: -5s;
}

.b3 {
  width: 30vmax; height: 30vmax;
  left: 28%; bottom: -14vmax;
  background: radial-gradient(circle at 50% 50%, #00ff41, transparent 66%);
  animation-delay: -9s;
}

@keyframes breathe {
  0%, 100% {
    transform: scale(1) translate3d(0, 0, 0);
    border-radius: 52% 42% 56% 44% / 46% 56% 40% 54%;
  }
  50% {
    transform: scale(1.15) translate3d(2%, -3%, 0);
    border-radius: 42% 58% 40% 60% / 58% 40% 60% 44%;
  }
}

/* ---------- 顶栏 ---------- */
.top {
  position: relative;
  z-index: 6;
  padding: 10px 0 4px;
}

.top-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 14px;
}

.brand {
  grid-column: 2;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 6px;
  font-family: var(--wide);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--mint);
  text-decoration: none;
  white-space: nowrap;
  text-shadow: 0 0 22px rgba(0, 255, 65, .45);
}

.reach {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 65, .45);
  background: linear-gradient(120deg, rgba(0, 255, 65, .2), rgba(153, 255, 204, .1));
  color: var(--mint);
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
}

.reach:hover { color: var(--ink); background: var(--neon); border-color: var(--neon); }

.dock { position: relative; grid-column: 1; justify-self: start; }

.dock > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(153, 255, 204, .08);
  color: var(--mint);
  font-size: 1rem;
  white-space: nowrap;
  user-select: none;
}

.dock > summary::-webkit-details-marker { display: none; }

.dock-ico {
  width: 14px;
  height: 10px;
  border-top: 2px solid var(--neon);
  border-bottom: 2px solid var(--neon);
  position: relative;
}

.dock-ico::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 2px;
  height: 2px;
  background: var(--neon);
}

.dock[open] > summary { background: var(--neon); color: var(--ink); border-color: var(--neon); }
.dock[open] .dock-ico,
.dock[open] .dock-ico::after { border-color: var(--ink); background-color: transparent; }
.dock[open] .dock-ico::after { background: var(--ink); }

.dock-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  z-index: 40;
  margin: 0;
  padding: 8px;
  list-style: none;
  min-width: 232px;
  max-width: 84vw;
  display: grid;
  gap: 2px;
  background: rgba(0, 18, 34, .97);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: rise .28s ease both;
}

.dock-menu li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--paper);
  font-size: 1rem;
  text-decoration: none;
}

.dock-menu li a:hover,
.dock-menu li a:focus-visible {
  background: rgba(0, 255, 65, .16);
  color: var(--mint);
}

/* ---------- 粘性锚点条 ---------- */
.route-bar {
  position: relative;
  z-index: 5;
  margin-top: 6px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(0, 16, 30, .68);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.route-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 12px;
}

.route-inner a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(153, 255, 204, .06);
  color: var(--mint);
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.route-inner a:hover,
.route-inner a:focus-visible {
  background: rgba(0, 255, 65, .2);
  border-color: var(--neon);
}

.route-inner a.is-on {
  background: linear-gradient(115deg, var(--mint), var(--neon));
  border-color: transparent;
  color: #00210f;
  font-weight: 700;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  min-height: 45vh;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 16px 10px;
}

.hero-txt {
  position: relative;
  overflow: hidden;
  text-align: right;
}

.hero-ghost {
  display: block;
  font-family: var(--wide);
  font-weight: 700;
  font-size: clamp(2.3rem, 11vw, 5.2rem);
  line-height: .92;
  letter-spacing: .05em;
  white-space: nowrap;
  margin-bottom: -.34em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(153, 255, 204, .38);
  opacity: .85;
}

.hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--wide);
  font-weight: 700;
  font-size: clamp(1.7rem, 7.2vw, 3.3rem);
  line-height: 1.16;
  letter-spacing: .02em;
  color: #ffffff;
  text-shadow: 0 0 38px rgba(0, 255, 65, .4);
  text-wrap: balance;
}

.hero-fig {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-height: 38vh;
  animation: rise .7s ease both;
}

.hero-img {
  display: block;
  width: 100%;
  max-height: 38vh;
  object-fit: cover;
}

/* ---------- 主体骨架 ---------- */
main { position: relative; z-index: 2; }

.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px 52px;
}

.rail { order: 2; display: grid; gap: 14px; }

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

.rail-card {
  padding: 14px 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.rail-card h2 {
  margin: 0 0 10px;
  font-family: var(--wide);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--neon);
}

.rail-card h2 > span {
  background: linear-gradient(transparent 66%, rgba(0, 255, 65, .3) 66%);
  padding-bottom: 2px;
}

.rail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rl;
  display: grid;
  gap: 2px;
}

.rail-list li { counter-increment: rl; }

.rail-list li a {
  display: block;
  min-height: 40px;
  padding: 9px 8px;
  border-left: 2px solid transparent;
  border-radius: 8px;
  color: var(--body);
  font-size: 1rem;
  line-height: 1.5;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.rail-list li a::before {
  content: counter(rl, decimal-leading-zero);
  margin-right: 8px;
  color: var(--neon);
  opacity: .75;
}

.rail-list li a:hover,
.rail-list li a:focus-visible {
  background: rgba(0, 255, 65, .12);
  border-left-color: var(--neon);
  color: var(--mint);
}

.rail-host {
  margin: 0;
  color: var(--dim);
  font-size: 1rem;
  word-break: break-all;
}

/* ---------- 正文 ---------- */
.prose {
  font-size: 16px;
  line-height: 1.8;
  color: var(--body);
}

.prose > div {
  position: relative;
  padding: 34px 0;
  border-top: 1px dashed var(--line);
  animation: rise .65s ease both;
}

.prose > div:nth-child(1) { animation-delay: .04s; }
.prose > div:nth-child(2) { animation-delay: .1s; }
.prose > div:nth-child(3) { animation-delay: .16s; }
.prose > div:nth-child(4) { animation-delay: .22s; }
.prose > div:nth-child(5) { animation-delay: .28s; }
.prose > div:nth-child(6) { animation-delay: .34s; }
.prose > div:nth-child(7) { animation-delay: .4s; }

.prose > div:first-child {
  border-top: 0;
  padding-top: 4px;
}

.prose h2 {
  margin: 0 0 14px;
  font-family: var(--wide);
  font-weight: 700;
  font-size: clamp(1.3rem, 4.6vw, 1.85rem);
  line-height: 1.4;
  letter-spacing: .02em;
  color: #ffffff;
}

.prose h2 > span {
  background: linear-gradient(transparent 68%, rgba(0, 255, 65, .3) 68%);
  padding-bottom: 3px;
}

.prose h3 {
  margin: 24px 0 10px;
  font-family: var(--wide);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.5;
  letter-spacing: .02em;
  color: var(--mint);
}

.prose p { margin: 0 0 15px; }

.prose a {
  color: var(--neon);
  text-decoration: underline;
  text-decoration-color: rgba(0, 255, 65, .42);
  text-underline-offset: 3px;
}

.prose a:hover { color: var(--mint); }

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

.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--neon); }

.prose strong { color: #ffffff; }

.prose blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--neon);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(0, 255, 65, .07);
  color: var(--mint);
}

.prose blockquote p:last-child { margin-bottom: 0; }

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

.prose figure img,
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.prose figcaption {
  margin-top: 8px;
  font-size: 1rem;
  color: var(--dim);
}

.prose hr {
  margin: 26px 0;
  border: 0;
  border-top: 1px dashed var(--line);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 1rem;
}

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

.prose th { background: rgba(153, 255, 204, .1); color: var(--mint); }

.prose code {
  font-family: var(--mono);
  background: rgba(0, 255, 65, .12);
  padding: 1px 5px;
  border-radius: 4px;
}

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

/* ---------- 页脚 ---------- */
.site-foot {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 30px 16px 24px;
  padding-inline: max(16px, calc((100% - 1180px) / 2));
  border-top: 1px solid var(--line);
  background: rgba(0, 12, 22, .66);
  text-align: center;
}

.site-foot p {
  margin: 0;
  font-size: 1rem;
  color: var(--dim);
}

.f-brand {
  font-family: var(--wide);
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--mint) !important;
}

.f-host { word-break: break-all; }

.f-links a,
.f-top a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 2px 10px;
  color: var(--body);
  font-size: 1rem;
  text-decoration: none;
}

.f-links a:hover,
.f-top a:hover { color: var(--neon); }

.f-top a { color: var(--mint); }

.f-copy {
  grid-column: 1 / -1;
  display: block;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 1rem;
  text-align: center;
}

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

/* ---------- 断点 ---------- */
@media (min-width: 620px) {
  .site-foot {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    text-align: left;
    column-gap: 18px;
    align-items: start;
  }
  .f-links a:first-child { padding-left: 0; }
}

@media (min-width: 780px) {
  .route-bar { position: sticky; top: 0; }
  div[id] { scroll-margin-top: 92px; }
  .top { padding-top: 16px; }
  .hero { min-height: 45vh; padding-top: 40px; }
}

@media (min-width: 960px) {
  .wrap {
    grid-template-columns: 244px minmax(0, 1fr);
    gap: 36px;
    align-items: start;
    padding-top: 34px;
  }
  .rail {
    order: 0;
    position: sticky;
    top: 92px;
    align-self: start;
  }
  .prose > div { padding: 42px 0; }
}

@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}
