:root {
  --ink: #172617;
  --deep: #0a140e;
  --green: #69ff69;
  --cyan: #00ffff;
  --bubble: #ff8de0;
  --text: #ddffe9;
  --muted: #9cd2b0;
  --line: rgba(105, 255, 105, 0.24);
  --line-soft: rgba(105, 255, 105, 0.13);
  --glass: rgba(214, 255, 228, 0.06);
  --r: 18px;
  --side: 264px;
  --chrome: linear-gradient(135deg, #ffffff 0%, #b6f8ff 15%, #00ffff 30%, #f4fff8 45%, #69ff69 60%, #ff8de0 82%, #ffffff 100%);
  --chrome-soft: linear-gradient(120deg, #dcffe9, #8ffbff 45%, #ffffff 70%, #b6ffc9);
}

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

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

body {
  margin: 0;
  padding-left: var(--side);
  font-family: Lexend, "Source Sans 3", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(56rem 40rem at 86% -10%, rgba(0, 255, 255, 0.19), transparent 62%),
    radial-gradient(44rem 32rem at 4% 18%, rgba(255, 141, 224, 0.15), transparent 60%),
    radial-gradient(52rem 40rem at 46% 112%, rgba(105, 255, 105, 0.16), transparent 62%),
    var(--deep);
  background-attachment: fixed;
}

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

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--green);
  color: var(--ink);
}

/* ---------- 左侧固定竖排导航 ---------- */
.nav {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--side);
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(21, 42, 28, 0.94), rgba(10, 20, 14, 0.9));
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--line);
}

.menu-box {
  display: block;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 8px;
  border-radius: 14px;
  list-style: none;
  cursor: pointer;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
}

.brand::-webkit-details-marker {
  display: none;
}

.brand .mark {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, #ffffff, #9ff6ff, #00ffff, #69ff69, #ff8de0, #ffffff);
  box-shadow: 0 0 16px rgba(0, 255, 255, 0.6), inset 0 0 8px rgba(255, 255, 255, 0.75);
  animation: spin 13s linear infinite;
}

.brand-txt {
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.4));
}

.links {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.links a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 15.5px;
  line-height: 1.5;
  color: #cdeed9;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease,
    box-shadow 0.22s ease, color 0.22s ease;
}

.dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff, var(--cyan) 44%, var(--green) 78%);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.65);
  transition: transform 0.22s ease;
}

.links a:hover,
.links a:focus-visible {
  color: #fff;
  transform: translateX(3px);
  border-color: var(--line);
  background: linear-gradient(115deg, rgba(105, 255, 105, 0.2), rgba(0, 255, 255, 0.14));
  box-shadow: 0 10px 24px -16px rgba(105, 255, 105, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.links a:hover .dot {
  transform: scale(1.45);
}

/* ---------- 主体骨架 ---------- */
.main {
  min-height: 60vh;
}

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 40px);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  min-height: min(70vh, 600px);
  padding: clamp(90px, 14vh, 150px) 20px clamp(86px, 12vh, 132px);
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(30rem 20rem at 50% 26%, rgba(0, 255, 255, 0.16), transparent 66%),
    radial-gradient(24rem 18rem at 72% 82%, rgba(255, 141, 224, 0.16), transparent 70%);
}

.hero::after {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -16px;
  height: 26px;
  transform: skewY(-1.8deg);
  background: linear-gradient(90deg, var(--green), var(--cyan) 46%, var(--bubble));
  opacity: 0.85;
  box-shadow: 0 0 34px rgba(0, 255, 255, 0.5);
}

.hero-glow {
  position: absolute;
  top: -18%;
  left: 50%;
  z-index: -1;
  width: 42rem;
  height: 42rem;
  margin-left: -21rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(105, 255, 105, 0.17), transparent 62%);
  will-change: transform;
}

.hero-orb {
  position: absolute;
  top: 16%;
  right: 11%;
  width: clamp(66px, 11vw, 148px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 210deg, #ffffff, #9ff6ff, #00ffff, #69ff69, #ff8de0, #ffffff);
  filter: drop-shadow(0 0 34px rgba(0, 255, 255, 0.55));
  opacity: 0.9;
  will-change: transform;
}

.hero-orb span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.05) 46%, transparent 62%);
  animation: float 9s ease-in-out infinite;
}

.hero-figure {
  width: 74px;
  height: 74px;
  margin: 0;
  padding: 4px;
  border-radius: 50%;
  background: var(--chrome-soft);
  box-shadow: 0 0 26px rgba(0, 255, 255, 0.45);
}

.hero-art {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.hero-title {
  margin: 0;
  font-size: clamp(30px, 6.4vw, 60px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.015em;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 22px rgba(0, 255, 255, 0.35));
}

/* ---------- 正文 + 右侧栏 ---------- */
.content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: clamp(18px, 2.6vw, 34px);
  align-items: start;
  padding-block: clamp(24px, 4vw, 52px) clamp(30px, 5vw, 64px);
}

.prose {
  position: relative;
  padding: clamp(20px, 3.4vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 40px 70px -60px #000;
  overflow-wrap: break-word;
}

.prose div {
  scroll-margin-top: 96px;
}

.prose div + div {
  margin-top: 34px;
  padding-top: 32px;
  border-top: 1px dashed var(--line-soft);
}

.prose h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 14px;
  font-size: clamp(21px, 3vw, 27px);
  line-height: 1.36;
  color: #f2fff7;
}

.prose h2::before {
  content: "✦";
  font-size: 0.68em;
  color: var(--cyan);
  text-shadow: 0 0 14px currentColor;
}

.prose h3 {
  margin: 26px 0 10px;
  font-size: clamp(18px, 2.3vw, 21px);
  line-height: 1.45;
  color: #e6ffef;
}

.prose h2 span,
.prose h3 span {
  background-image: linear-gradient(transparent 68%, rgba(0, 255, 255, 0.3) 0);
}

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

.prose a {
  color: var(--green);
  border-bottom: 1px solid rgba(105, 255, 105, 0.42);
  transition: color 0.2s ease, border-color 0.2s ease, text-shadow 0.2s ease;
}

.prose a:hover {
  color: #fff;
  border-color: var(--cyan);
  text-shadow: 0 0 14px rgba(0, 255, 255, 0.8);
}

.prose strong {
  color: #fff;
}

.prose ul,
.prose ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.prose li {
  margin-bottom: 8px;
}

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

.prose img {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.prose blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--cyan);
  border-radius: 14px;
  background: rgba(0, 255, 255, 0.07);
  color: #d9ffef;
}

/* ---------- 侧栏卡片 ---------- */
.rail {
  position: sticky;
  top: 26px;
  display: grid;
  gap: 14px;
}

.rail-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(160deg, rgba(105, 255, 105, 0.1), rgba(0, 255, 255, 0.06));
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.rail-card--alt {
  background: linear-gradient(160deg, rgba(255, 141, 224, 0.13), rgba(0, 255, 255, 0.07));
}

.rail-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
}

.rail-link {
  display: block;
  padding: 6px 6px 8px;
  border-radius: 12px;
  transition: transform 0.22s ease;
}

.rail-link:hover {
  transform: translateY(-2px);
}

.rail-title .t {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rail-title .t::before {
  content: "✦";
  font-size: 0.8em;
  color: var(--bubble);
  text-shadow: 0 0 12px currentColor;
}

.rail-title .n {
  font-weight: 600;
  background: var(--chrome-soft);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

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

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 14.5px;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.rail-list a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.to-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 40px;
  font-size: 15px;
  font-weight: 600;
  color: #0c1d12;
  background: var(--chrome-soft);
  box-shadow: 0 10px 26px -14px rgba(0, 255, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.to-top:hover {
  transform: translateY(-3px);
  filter: saturate(1.3) brightness(1.06);
  box-shadow: 0 16px 30px -14px rgba(105, 255, 105, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

/* ---------- 页脚单行 ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 28px;
  margin-top: 12px;
  padding: 22px clamp(16px, 3vw, 40px) 34px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0, 255, 255, 0.05), transparent);
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(24px, 4.6vw, 50px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(0, 255, 255, 0.4));
}

.foot-mark {
  font-size: 0.5em;
  color: var(--bubble);
  -webkit-text-fill-color: var(--bubble);
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  font-size: 13.5px;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 2px;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.foot-nav a:hover {
  color: #fff;
  border-color: var(--green);
}

.foot-copy {
  font-size: 13px;
  color: #86b899;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(-6%) scale(1);
  }
  50% {
    transform: translateY(6%) scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .brand .mark,
  .hero-orb span {
    animation: none;
  }
  .links a,
  .dot,
  .rail-link,
  .to-top {
    transition: none;
  }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 1023px) {
  .content {
    grid-template-columns: minmax(0, 1fr);
  }
  .rail {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: start;
  }
  .to-top {
    grid-column: 1 / -1;
  }
}

@media (max-width: 899px) {
  body {
    padding-left: 0;
  }

  .nav {
    inset: 0 0 auto 0;
    width: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .menu-box {
    width: 100%;
  }

  .brand {
    justify-content: space-between;
    padding: 8px 6px;
    font-size: 17px;
  }

  .brand::after {
    content: "";
    flex: none;
    width: 20px;
    height: 12px;
    border-top: 2px solid var(--cyan);
    border-bottom: 2px solid var(--green);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.7);
  }

  details[open] .brand::after {
    border-top-color: var(--bubble);
  }

  .links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 10px 14px 16px;
    gap: 4px;
    max-height: 68vh;
    overflow-y: auto;
    background: rgba(10, 20, 14, 0.97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
    box-shadow: 0 24px 40px -30px #000;
  }

  details:not([open]) .links {
    display: none;
  }

  details[open] .links {
    display: grid;
  }

  .links a {
    min-height: 44px;
    font-size: 16px;
  }

  .hero {
    min-height: 58vh;
    padding: 78px 18px 76px;
  }

  .hero-orb {
    top: 12%;
    right: 6%;
    opacity: 0.55;
  }

  .prose div {
    scroll-margin-top: 78px;
  }

  .foot {
    padding-bottom: 40px;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 16px;
  }
  .wrap {
    padding-inline: 14px;
  }
  .prose {
    padding: 18px 15px;
  }
}

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