:root {
  --neon: #87ff71;
  --cyan: #01cdfe;
  --ink: #192617;
  --ink-deep: #0e170d;
  --paper: #e2f8db;
  --line: rgba(135, 255, 113, 0.24);
  --glow: 0 0 18px rgba(135, 255, 113, 0.55);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--ink);
  background-image: radial-gradient(90% 40% at 50% 0, rgba(1, 205, 254, 0.1), transparent 70%);
  color: var(--paper);
  font-family: "EB Garamond", "Crimson Text", Georgia, "Songti SC", "Source Han Serif SC", serif;
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

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

img {
  max-width: 100%;
}

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

.scan {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(1, 205, 254, 0.05) 0 1px,
    rgba(25, 38, 23, 0) 1px 4px
  );
  mix-blend-mode: screen;
  opacity: 0.85;
}

/* 顶部两行 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 70;
  background: rgba(14, 23, 13, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.ticker {
  margin: 0;
  padding: 0.4rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.36em;
  color: var(--cyan);
  border-bottom: 1px dashed rgba(1, 205, 254, 0.35);
  text-shadow: 0 0 10px rgba(1, 205, 254, 0.75);
  white-space: nowrap;
  overflow: hidden;
}

.brandrow {
  padding: 0.55rem 1.1rem 0.1rem;
}

.brand {
  display: inline-block;
  padding: 0.2rem 0;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--neon);
  text-decoration: none;
  text-shadow: var(--glow), 0 0 28px rgba(1, 205, 254, 0.45);
}

.menurow {
  display: flex;
  justify-content: flex-end;
  padding: 0 1.1rem 0.65rem;
}

.burger {
  min-height: 44px;
  padding: 0.45rem 1.2rem;
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: 0.32em;
  color: var(--cyan);
  background: transparent;
  border: 1px solid var(--cyan);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.burger:hover,
.burger:focus-visible {
  background: rgba(1, 205, 254, 0.14);
  box-shadow: 0 0 20px rgba(1, 205, 254, 0.5);
}

/* 满屏英雄 */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: radial-gradient(120% 78% at 50% 82%, #87ff71 0%, #01cdfe 44%, #192617 80%);
}

.hero-copy {
  position: relative;
  z-index: 3;
  padding: 3.2rem 1.2rem 1.6rem;
  text-align: center;
}

h1 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.9rem, 7.2vw, 3.5rem);
  line-height: 1.24;
  letter-spacing: 0.02em;
  color: #0b1408;
  text-shadow: 0 0 22px rgba(135, 255, 113, 0.9), 0 1px 0 rgba(255, 255, 255, 0.35);
}

h1 > span {
  position: relative;
  display: inline-block;
}

h1 > span::before,
h1 > span::after {
  content: attr(data-glitch);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

h1 > span::before {
  color: #05303a;
  clip-path: inset(0 0 56% 0);
  opacity: 0.65;
  animation: glitch-a 3.8s steps(2, end) infinite;
}

h1 > span::after {
  color: #215c22;
  clip-path: inset(58% 0 0 0);
  opacity: 0.7;
  animation: glitch-b 3.1s steps(2, end) infinite;
}

@keyframes glitch-a {
  0%, 90%, 100% { transform: translate(0, 0); }
  91% { transform: translate(-4px, -1px); }
  94% { transform: translate(3px, 1px); }
  97% { transform: translate(-2px, 1px); }
}

@keyframes glitch-b {
  0%, 88%, 100% { transform: translate(0, 0); }
  90% { transform: translate(4px, 1px); }
  93% { transform: translate(-3px, -1px); }
  96% { transform: translate(2px, -1px); }
}

.lede {
  max-width: 36rem;
  margin: 0 auto;
  font-size: 1.06rem;
  color: rgba(11, 20, 8, 0.88);
}

.hero-art {
  position: relative;
  flex: 1 1 auto;
  min-height: 42vh;
  overflow: hidden;
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.2) contrast(1.06);
  opacity: 0.92;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.6;
  background-image:
    linear-gradient(rgba(1, 205, 254, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(135, 255, 113, 0.3) 1px, transparent 1px);
  background-size: 100% 26px, 46px 100%;
  transform: perspective(360px) rotateX(66deg);
  transform-origin: bottom center;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 62%);
  mask-image: linear-gradient(180deg, transparent, #000 62%);
}

/* 正文 */
main {
  padding: 3rem 0 2rem;
}

.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.4rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.1rem;
}

.prose {
  max-width: 46rem;
}

.prose > article {
  scroll-margin-top: 8.6rem;
  margin: 0 0 1.6rem;
  padding: 1.8rem 1.15rem;
  border: 1px solid rgba(135, 255, 113, 0.16);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(1, 205, 254, 0.07), rgba(25, 38, 23, 0));
  box-shadow: 0 18px 46px rgba(1, 205, 254, 0.1);
}

.prose h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.42rem, 3.6vw, 2rem);
  line-height: 1.35;
  letter-spacing: 0.03em;
  color: var(--neon);
  text-shadow: 0 0 16px rgba(135, 255, 113, 0.45);
}

.prose h2 > span,
.prose h3 > span {
  display: inline-block;
  border-bottom: 2px solid rgba(1, 205, 254, 0.4);
  padding-bottom: 0.15rem;
}

.prose h3 {
  margin: 1.5rem 0 0.6rem;
  font-size: 1.16rem;
  color: var(--cyan);
  letter-spacing: 0.04em;
}

.prose p {
  margin: 0.85em 0;
}

.prose ul,
.prose ol {
  margin: 0.85em 0;
  padding-left: 1.3em;
}

.prose li {
  margin: 0.35em 0;
}

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

.prose strong {
  color: var(--neon);
}

.prose a {
  color: var(--cyan);
  text-decoration: underline dashed rgba(1, 205, 254, 0.6);
  text-underline-offset: 3px;
}

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

.prose blockquote {
  margin: 1.2em 0;
  padding: 0.7em 1em;
  border-left: 3px solid var(--neon);
  background: rgba(135, 255, 113, 0.06);
  color: #d3f0c9;
}

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

.prose img {
  display: block;
  height: auto;
  margin: 1.2em 0;
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(1, 205, 254, 0.16);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
}

.prose th,
.prose td {
  padding: 0.55em 0.7em;
  border: 1px solid rgba(135, 255, 113, 0.22);
  text-align: left;
}

.prose th {
  color: var(--cyan);
  background: rgba(1, 205, 254, 0.08);
}

.prose pre {
  margin: 1.2em 0;
  padding: 1em;
  overflow-x: auto;
  background: var(--ink-deep);
  border: 1px solid var(--line);
  font-size: 0.9rem;
  line-height: 1.6;
}

.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: var(--neon);
}

/* 侧栏目录 */
.rail {
  font-size: 0.98rem;
}

.rail h2 {
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(1, 205, 254, 0.5);
}

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

.rail a {
  display: block;
  padding: 0.62rem 0.4rem 0.62rem 0.8rem;
  color: #cfecc6;
  text-decoration: none;
  border-left: 2px solid rgba(135, 255, 113, 0.22);
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.rail a:hover,
.rail a.is-live {
  color: var(--neon);
  border-left-color: var(--neon);
  background: rgba(135, 255, 113, 0.07);
}

/* 全屏遮罩菜单 */
.dock {
  position: fixed;
  inset: 0;
  z-index: 60;
  margin: 0;
  padding: 9.5rem 1.4rem 2rem;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(25, 38, 23, 0.985), rgba(14, 23, 13, 0.995));
  border-bottom: 1px solid var(--line);
  transform: translateY(-102%);
  transition: transform 0.4s cubic-bezier(0.22, 0.8, 0.3, 1);
}

body.dock-open .dock {
  transform: none;
}

body.dock-open {
  overflow: hidden;
}

.dock h2 {
  margin: 0 0 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  color: var(--cyan);
}

.dock ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dock a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0.8rem 0.2rem;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid rgba(135, 255, 113, 0.16);
}

.dock a:hover,
.dock a:focus-visible {
  color: var(--neon);
  text-shadow: 0 0 16px rgba(135, 255, 113, 0.8);
}

/* 页脚 */
.foot {
  display: grid;
  gap: 1.1rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 3rem 1.1rem 4.5rem;
  text-align: center;
  border-top: 1px solid var(--line);
}

.foot-brand {
  margin: 0;
  font-size: clamp(2rem, 9vw, 3.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.1em;
  color: rgba(135, 255, 113, 0.7);
  text-shadow: 0 0 26px rgba(1, 205, 254, 0.35);
}

.foot-copy {
  margin: 0;
  font-size: 0.95rem;
  color: var(--cyan);
  letter-spacing: 0.12em;
}

.foot-host {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: rgba(226, 248, 219, 0.62);
}

.totop {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 65;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  color: var(--neon);
  text-decoration: none;
  background: rgba(14, 23, 13, 0.9);
  border: 1px solid var(--line);
  border-radius: 0;
}

.totop:hover {
  border-color: var(--neon);
  box-shadow: 0 0 18px rgba(135, 255, 113, 0.4);
}

/* 动效 */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

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

/* 断点 */
@media (max-width: 700px) {
  .prose table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (min-width: 760px) {
  .foot {
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    text-align: left;
  }
  .foot-copy {
    text-align: center;
  }
  .foot-host {
    text-align: right;
  }
  .brandrow {
    padding-top: 0.7rem;
  }
  .brand {
    font-size: 1.85rem;
  }
}

@media (min-width: 900px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr) 252px;
    gap: 3rem;
  }
  .rail {
    position: sticky;
    top: 9.6rem;
    align-self: start;
  }
  .prose > article {
    padding: 2.2rem 1.7rem;
  }
  .hero-copy {
    padding-top: 5rem;
  }
  .dock {
    padding: 10.5rem 2.2rem 2rem;
  }
  .dock ul {
    columns: 2;
    column-gap: 2.5rem;
  }
  .dock a {
    font-size: 1.32rem;
  }
}

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