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

:root {
  --ink: #172617;
  --ink-deep: #0d180e;
  --goo: #69ff69;
  --cyan: #00ffff;
  --paper: #eaffea;
  --dim: rgba(234, 255, 234, 0.66);
  --line: rgba(105, 255, 105, 0.22);
  --line-cyan: rgba(0, 255, 255, 0.28);
  --chrome: linear-gradient(135deg, #f4fff4 0%, #69ff69 38%, #00ffff 74%, #f4fff4 100%);
  --rail: 236px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 36px 0 0 var(--rail);
  min-height: 100vh;
  color: var(--paper);
  background:
    radial-gradient(900px 520px at 8% -12%, rgba(0, 255, 255, 0.14), transparent 70%),
    radial-gradient(760px 520px at 102% 6%, rgba(105, 255, 105, 0.16), transparent 66%),
    radial-gradient(600px 400px at 50% 108%, rgba(0, 255, 255, 0.08), transparent 70%),
    var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
}

p { margin: 0; }

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

img { max-width: 100%; }

/* ---------- 顶部细条 ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  z-index: 70;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, var(--goo), var(--cyan) 55%, var(--goo));
  box-shadow: 0 2px 20px rgba(0, 255, 255, 0.24);
}

.topbar-in {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
  padding-left: 18px;
  color: #0b1a0b;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  animation: ticker 26s linear infinite;
}

.star { color: #0b1a0b; opacity: 0.55; }

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- 左侧竖排导航 ---------- */
.site-head {
  position: fixed;
  top: 36px;
  left: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 26px 20px 20px;
  background: linear-gradient(180deg, rgba(23, 38, 23, 0.98), rgba(13, 24, 14, 0.94));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--chrome);
  color: #0b1a0b;
  text-decoration: none;
  font-size: 22px;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(0, 255, 255, 0.5), 0 8px 26px rgba(0, 255, 255, 0.26);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mark:hover { transform: rotate(-6deg) scale(1.05); box-shadow: 0 0 0 1px var(--goo), 0 10px 30px rgba(105, 255, 105, 0.5); }

.mark-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.site-nav { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; }

.nav-line {
  display: flex;
  flex-direction: column;
  gap: 5px;
  counter-reset: navc;
}

.nav-line a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--paper);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.35;
  border-radius: 0;
  border-left: 2px solid transparent;
  background: linear-gradient(90deg, rgba(105, 255, 105, 0.14), rgba(0, 255, 255, 0.05));
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.nav-line a::before {
  counter-increment: navc;
  content: counter(navc, decimal-leading-zero);
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #0b1a0b;
  background: var(--goo);
  padding: 2px 5px;
  border-radius: 2px;
}

.nav-line a:hover,
.nav-line a:focus-visible {
  transform: translateX(5px);
  border-left-color: var(--cyan);
  background: linear-gradient(90deg, rgba(0, 255, 255, 0.22), rgba(105, 255, 105, 0.06));
  color: #fff;
  outline: none;
}

.nav-btn { display: none; }

/* ---------- hero ---------- */
.stage { display: block; }

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
  align-items: center;
  gap: 30px;
  min-height: 70vh;
  padding: 40px 40px 40px 0;
  background: linear-gradient(120deg, rgba(0, 255, 255, 0.05), transparent 56%, rgba(105, 255, 105, 0.09));
}

.hero::before {
  content: attr(data-ghost);
  position: absolute;
  right: -0.03em;
  bottom: -0.17em;
  z-index: 0;
  font-size: clamp(110px, 19vw, 250px);
  font-weight: 600;
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-cyan);
  pointer-events: none;
}

.hero-fig {
  position: relative;
  margin: 0;
  height: 100%;
  min-height: 300px;
  overflow: hidden;
  border-radius: 0;
  background: linear-gradient(150deg, #123a2b, #0b1a1a 60%, #1b3d1b);
  box-shadow: inset 0 0 0 1px rgba(0, 255, 255, 0.18);
}

.hero-fig::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 255, 255, 0.26), transparent 52%, rgba(105, 255, 105, 0.3));
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.25) contrast(1.05);
}

.frame-glow {
  position: absolute;
  inset: 12% 14%;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.7), rgba(0, 255, 255, 0.35) 42%, rgba(105, 255, 105, 0.15) 70%, transparent 76%);
  filter: blur(2px);
}

.hero-copy {
  position: relative;
  z-index: 1;
  text-align: right;
  padding-right: 40px;
}

.hero-copy::before {
  content: "✦";
  display: block;
  color: var(--cyan);
  font-size: 20px;
  margin-bottom: 8px;
  text-shadow: 0 0 18px rgba(0, 255, 255, 0.9);
}

.hero-h1 {
  margin: 0 0 22px;
  font-size: clamp(28px, 3.8vw, 50px);
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: -0.012em;
  text-shadow: 0 0 36px rgba(0, 255, 255, 0.34);
}

.hero-jump {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--chrome);
  color: #0b1a0b;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 10px 28px rgba(105, 255, 105, 0.35);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.hero-jump:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 14px 34px rgba(0, 255, 255, 0.5); }

/* ---------- 正文 + 右栏 ---------- */
.body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
  gap: 32px;
  align-items: start;
  padding: 0 40px 64px 0;
}

.prose { min-width: 0; }

.prose div {
  position: relative;
  margin: 0 0 22px;
  padding: 30px 30px 34px;
  border-radius: 0;
  background: rgba(105, 255, 105, 0.055);
  scroll-margin-top: 56px;
}

.prose div:nth-of-type(even) { background: rgba(0, 255, 255, 0.05); }

.prose div[id]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--goo), var(--cyan));
}

.prose h2 {
  margin: 0 0 0.65em;
  font-size: 25px;
  line-height: 1.35;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 0 22px rgba(105, 255, 105, 0.32);
}

.prose h3 {
  margin: 0 0 0.6em;
  font-size: 19px;
  line-height: 1.4;
  font-weight: 600;
  color: #dfffdf;
}

.prose p { margin: 0 0 1em; color: rgba(234, 255, 234, 0.9); }

.prose ul,
.prose ol { margin: 0 0 1em; padding-left: 1.3em; color: rgba(234, 255, 234, 0.9); }

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

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

.prose img { display: block; height: auto; }

.prose blockquote {
  margin: 0 0 1em;
  padding: 12px 18px;
  background: rgba(0, 255, 255, 0.09);
  border-left: 3px solid var(--cyan);
  color: #dffdff;
}

.prose strong { color: #fff; }

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

.prose div > :last-child { margin-bottom: 0; }

/* ---------- 右栏 ---------- */
.side {
  position: sticky;
  top: 52px;
  padding: 20px 18px;
  border-radius: 0;
  background: linear-gradient(170deg, rgba(0, 255, 255, 0.1), rgba(105, 255, 105, 0.05));
  box-shadow: inset 0 0 0 1px var(--line-cyan);
}

.side-h {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--cyan);
  text-shadow: 0 0 16px rgba(0, 255, 255, 0.5);
}

.side-h span { border-bottom: 1px solid var(--line-cyan); padding-bottom: 3px; }

.side-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.side-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 5px 8px;
  color: var(--paper);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.3;
  transition: background 0.2s ease, color 0.2s ease;
}

.side-list a:hover,
.side-list a[aria-current] {
  background: rgba(105, 255, 105, 0.16);
  color: #fff;
}

.side-list .idx {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: var(--cyan);
  padding: 1px 5px;
  border-radius: 2px;
}

.side-list a:hover .idx,
.side-list a[aria-current] .idx { background: var(--goo); }

.back {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(105, 255, 105, 0.16);
  color: var(--goo);
  text-decoration: none;
  font-size: 16px;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background 0.2s ease, color 0.2s ease;
}

.back:hover { background: var(--goo); color: var(--ink); }

/* ---------- 页脚 ---------- */
.site-foot {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  padding: 36px 40px 0 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(0, 255, 255, 0.06));
}

.foot-h {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--goo);
  text-shadow: 0 0 16px rgba(105, 255, 105, 0.4);
}

.foot-h span { border-bottom: 1px solid var(--line); padding-bottom: 3px; }

.foot-name {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.foot-desc { color: var(--dim); max-width: 42ch; }

.foot-nav { display: flex; flex-wrap: wrap; gap: 2px 16px; }

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: var(--paper);
  text-decoration: none;
  font-size: 16px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.foot-nav a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

.foot-base {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding: 14px 0 26px;
  border-top: 1px solid var(--line);
}

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

.to-top {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--goo);
  text-decoration: none;
  font-size: 16px;
  box-shadow: 0 6px 22px rgba(105, 255, 105, 0.3);
  transition: background 0.2s ease, transform 0.2s ease;
}

.to-top:hover { background: var(--cyan); transform: translateY(-2px); }

/* ---------- 移动端 ---------- */
@media (max-width: 880px) {
  body { padding: 100px 0 0; }

  .topbar { height: 34px; }

  .topbar-in { font-size: 15px; }

  .site-head {
    top: 34px;
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .mark { width: 40px; height: 40px; font-size: 19px; }

  .nav-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: var(--chrome);
    color: #0b1a0b;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
  }

  .nav-btn-bar {
    width: 16px;
    height: 2px;
    background: #0b1a0b;
    box-shadow: 0 5px 0 #0b1a0b, 0 -5px 0 #0b1a0b;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    background: rgba(13, 24, 14, 0.99);
    border-bottom: 1px solid var(--line);
    transition: max-height 0.28s ease;
  }

  .site-nav.open { max-height: 460px; overflow-y: auto; }

  .nav-line { padding: 10px; gap: 4px; }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 18px;
    padding: 0 16px 30px;
  }

  .hero-fig { height: 150px; min-height: 150px; margin: 0 -16px; }

  .hero-copy { text-align: left; padding-right: 0; }

  .hero-copy::before { font-size: 16px; margin-bottom: 4px; }

  .hero-h1 { margin-bottom: 16px; }

  .hero::before { font-size: 104px; }

  .body { grid-template-columns: 1fr; gap: 22px; padding: 0 16px 44px; }

  .side { position: static; }

  .prose div { padding: 22px 18px 26px; scroll-margin-top: 116px; }

  .prose h2 { font-size: 22px; }

  .site-foot { grid-template-columns: 1fr; gap: 18px; padding: 26px 16px 0; }

  .foot-base { padding: 14px 0 30px; }
}

@media (max-width: 380px) {
  .hero::before { font-size: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .topbar-in { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

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