@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@300;400;500;600;700&family=Russo+One&display=swap');

:root {
  --mint: #99ffcc;
  --green: #00ff41;
  --ink: #001e3c;
  --ink-deep: #00132a;
  --paper: #eafff5;
  --text: #cdeadb;
  --muted: #9fcdbb;
  --line: rgba(153, 255, 204, 0.24);
  --max: 1180px;
  --ui: 'Chakra Petch', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --disp: 'Russo One', 'Chakra Petch', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 14px;
  scroll-padding-bottom: 120px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.68;
  color: var(--text);
  background-color: var(--ink);
  background-image:
    radial-gradient(rgba(153, 255, 204, 0.17) 1px, transparent 1px),
    radial-gradient(circle at 12% -5%, rgba(0, 255, 65, 0.14), transparent 46%),
    radial-gradient(circle at 92% 6%, rgba(153, 255, 204, 0.12), transparent 42%);
  background-size: 24px 24px, auto, auto;
  background-attachment: fixed, fixed, fixed;
  overflow-x: hidden;
}

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

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

h1,
h2,
h3 {
  font-family: var(--disp);
  font-weight: 400;
  line-height: 1.18;
  color: var(--paper);
  letter-spacing: 0.01em;
}

p {
  margin: 0 0 1em;
}

.blob {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 58% 42% 46% 54%;
  background: linear-gradient(140deg, var(--mint), var(--green));
  box-shadow: 0 0 18px rgba(0, 255, 65, 0.45);
  animation: breathe 7s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.12) rotate(8deg); }
}

/* 底部固定条 */
.site-head {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
  background: rgba(0, 19, 42, 0.94);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 34px rgba(0, 8, 20, 0.65);
  backdrop-filter: blur(10px);
}

.site-head .mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 6px;
  border: 1px solid rgba(0, 255, 65, 0.34);
  background: rgba(0, 255, 65, 0.06);
  text-decoration: none;
}

.site-head .mark img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.site-head .mark .blob {
  width: 24px;
  height: 24px;
}

.site-head nav {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.site-head nav::-webkit-scrollbar {
  display: none;
}

.site-head nav p {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
}

.site-head nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.site-head nav a:hover,
.site-head nav a:focus-visible {
  color: var(--paper);
  background: rgba(153, 255, 204, 0.1);
  border-bottom-color: var(--green);
}

.site-head nav a.is-cur {
  color: var(--ink-deep);
  background: var(--mint);
  border-bottom-color: var(--green);
  font-weight: 600;
}

/* 首屏 */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 45vh;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.4rem, 9vw, 4.5rem) clamp(1.05rem, 4.5vw, 2.6rem) clamp(1.6rem, 4vw, 2.4rem);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  left: -18%;
  right: -18%;
  bottom: -46%;
  height: 78%;
  border-radius: 52% 48% 42% 58% / 60% 55% 45% 40%;
  background:
    radial-gradient(ellipse at 32% 100%, rgba(0, 255, 65, 0.44), transparent 62%),
    radial-gradient(ellipse at 72% 88%, rgba(153, 255, 204, 0.32), transparent 66%);
  filter: blur(34px);
  animation: breathe 11s ease-in-out infinite;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(153, 255, 204, 0.22) 1px, transparent 1px);
  background-size: 15px 15px;
  mask-image: linear-gradient(180deg, transparent, #000 55%, #000);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 55%, #000);
  opacity: 0.7;
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.brand-line {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.6rem;
  font-size: 1rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--mint);
}

.brand-line::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  flex: 0 0 auto;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 8vw, 4.3rem);
  line-height: 1.06;
  text-shadow: 0 0 34px rgba(0, 255, 65, 0.28);
}

/* 骨架 */
.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.05rem, 4.5vw, 2.6rem) 2.6rem;
}

main {
  padding-bottom: 1.2rem;
}

/* 正文区 */
.flow {
  counter-reset: sec;
  min-width: 0;
}

.flow > section {
  counter-increment: sec;
  position: relative;
  margin: 0 0 1.4rem;
  padding: 1.5rem 1.15rem 1.7rem;
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--green);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(153, 255, 204, 0.075), rgba(153, 255, 204, 0.015));
  box-shadow: 0 14px 32px rgba(0, 10, 25, 0.34);
}

.flow > section::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 1.15rem;
  width: 40px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--mint);
}

.flow > section h2 {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin: 0 0 0.6rem;
  font-size: clamp(1.3rem, 3.4vw, 1.72rem);
}

.flow > section h2::before {
  content: counter(sec, decimal-leading-zero);
  flex: 0 0 auto;
  padding: 0.05rem 0.32rem;
  font-family: var(--ui);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--green);
  border: 1px solid rgba(0, 255, 65, 0.5);
  border-radius: 3px;
}

.flow > section h3 {
  margin: 1.5rem 0 0.45rem;
  font-size: 1.12rem;
  color: var(--mint);
}

.flow > section p,
.flow > section li {
  font-size: 1.05rem;
  color: var(--text);
}

.flow > section p:last-child,
.flow > section ul:last-child,
.flow > section ol:last-child {
  margin-bottom: 0;
}

.flow > section ul,
.flow > section ol {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
}

.flow > section li {
  margin: 0.32rem 0;
}

.flow > section li::marker {
  color: var(--green);
}

.flow > section a {
  text-decoration: none;
  border-bottom: 1px solid rgba(153, 255, 204, 0.5);
}

.flow > section a:hover {
  border-bottom-color: var(--green);
}

.flow > section strong {
  color: var(--paper);
}

.flow > section blockquote {
  margin: 1rem 0;
  padding: 0.6rem 0 0.6rem 0.9rem;
  border-left: 2px solid var(--mint);
  background: rgba(0, 255, 65, 0.06);
}

.flow > section blockquote p {
  margin: 0;
}

.subtitle {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* 侧栏 */
.rail {
  min-width: 0;
  padding: 1rem 1rem 1.15rem;
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--green);
  border-radius: 4px;
  background: rgba(0, 15, 34, 0.62);
  box-shadow: 0 14px 32px rgba(0, 10, 25, 0.3);
}

.rail h2 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
  letter-spacing: 0.22em;
  color: var(--mint);
}

.rail .subtitle {
  margin: 0 0 0.9rem;
  font-size: 1rem;
}

.rail-links {
  display: grid;
  gap: 0.1rem;
  counter-reset: rl;
}

.rail-links a {
  counter-increment: rl;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 40px;
  padding: 0.3rem 0.15rem;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed rgba(153, 255, 204, 0.16);
}

.rail-links a::before {
  content: counter(rl, decimal-leading-zero);
  flex: 0 0 auto;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--green);
}

.rail-links a:hover,
.rail-links a:focus-visible {
  color: var(--paper);
  border-bottom-color: var(--green);
}

/* 页脚 */
.site-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem 1.2rem;
  padding: 1.6rem clamp(1.05rem, 4.5vw, 2.6rem) calc(6.4rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: rgba(0, 12, 28, 0.7);
}

.f-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--disp);
  font-size: 1.02rem;
  letter-spacing: 0.1em;
  color: var(--paper);
}

.f-brand .blob {
  width: 22px;
  height: 22px;
}

.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.1rem 0.4rem;
}

.site-foot nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-foot nav a:hover,
.site-foot nav a:focus-visible {
  color: var(--paper);
  border-bottom-color: var(--green);
}

.f-copy {
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* 动效 */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.62s ease, transform 0.62s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

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

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

/* 桌面 */
@media (min-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr) 258px;
    align-items: start;
    gap: 2rem;
  }
  .rail {
    position: sticky;
    top: 1.6rem;
  }
  .flow > section {
    padding: 1.9rem 1.7rem 2rem;
  }
  .flow > section::after {
    left: 1.7rem;
  }
  .site-head nav a {
    padding: 0.4rem 0.85rem;
  }
  .site-foot {
    justify-content: space-between;
  }
  .site-foot nav {
    flex: 1 1 auto;
  }
}

@media (min-width: 1100px) {
  .hero {
    min-height: 48vh;
  }
}

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