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

:root {
  --ink: #192617;
  --ink-deep: #101a0e;
  --ink-soft: #1e2f1a;
  --neon: #87ff71;
  --sun: #ffce5c;
  --text: #e6f6e0;
  --text-dim: #c4d9bc;
  --line: rgba(135, 255, 113, 0.28);
  --glass: rgba(135, 255, 113, 0.055);
  --font-wide: 'Syncopate', 'Arial Black', system-ui, sans-serif;
  --font-body: 'Space Mono', ui-monospace, 'Courier New', monospace;
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  background-color: var(--ink-deep);
  background-image:
    repeating-linear-gradient(45deg, rgba(135, 255, 113, 0.035) 0 2px, transparent 2px 14px);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.72;
}

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

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

/* ---------- 顶栏 ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(16, 26, 14, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 2px dashed var(--line);
}

.bar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--neon) 0 14px,
    var(--sun) 14px 28px,
    var(--ink-deep) 28px 42px
  );
}

.mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 4px 6px;
  text-decoration: none;
  color: var(--ink-deep);
  background: var(--neon);
  border-radius: 6px;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 82% 100%, 0 100%);
  transform: rotate(-2deg);
  transition: transform 0.18s ease;
}

.mark:hover {
  transform: rotate(0deg) scale(1.05);
}

.mark img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.mark-text {
  font-family: var(--font-wide);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-deep);
  line-height: 1;
  max-width: 72px;
  text-align: center;
}

.mark-text.sm {
  font-size: 11px;
  max-width: 56px;
}

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

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

.nav ol {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  color: var(--text-dim);
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 6px;
  border-bottom: 2px solid transparent;
  transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink-deep);
  background: var(--sun);
  transform: translateY(-1px);
}

.nav a.on {
  color: var(--neon);
  border-bottom-color: var(--neon);
}

.cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink-deep);
  text-decoration: none;
  background: var(--sun);
  border-radius: 4px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 12% 100%, 0 66%);
  transform: rotate(1.6deg);
  transition: transform 0.18s ease, background 0.18s ease;
}

.cta:hover,
.cta:focus-visible {
  background: var(--neon);
  transform: rotate(-1deg) scale(1.04);
}

/* ---------- 头图 ---------- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-start;
  padding: 58px 18px 46px;
  overflow: hidden;
  border-bottom: 3px solid var(--neon);
  background-color: #152112;
  background-image: radial-gradient(rgba(135, 255, 113, 0.24) 1.7px, transparent 1.7px);
  background-size: 20px 20px;
}

.hero h1 {
  position: relative;
  z-index: 3;
  margin: 0;
  max-width: 12ch;
  font-family: var(--font-wide);
  font-weight: 700;
  font-size: clamp(30px, 7.4vw, 66px);
  line-height: 1.14;
  letter-spacing: 0.01em;
  color: #f2ffe9;
  text-shadow: 5px 5px 0 rgba(255, 206, 92, 0.32);
  transform: rotate(-0.6deg);
  word-break: break-word;
}

.shape {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  transform: translate3d(0, calc(var(--py, 0px) * var(--k, 1)), 0) rotate(var(--r, 0deg));
  will-change: transform;
}

.sh-a {
  --k: 1.4;
  --r: 14deg;
  top: 62%;
  right: -26px;
  width: 150px;
  height: 150px;
  background: var(--neon);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  opacity: 0.85;
  mix-blend-mode: screen;
}

.sh-b {
  --k: 0.75;
  --r: -9deg;
  bottom: 8%;
  right: 26%;
  width: 96px;
  height: 96px;
  background: var(--sun);
  border-radius: 50%;
  opacity: 0.8;
  mix-blend-mode: screen;
}

.sh-c {
  --k: 1.9;
  --r: 26deg;
  top: 20%;
  right: 12%;
  width: 62px;
  height: 62px;
  background: transparent;
  border: 4px dashed var(--neon);
  border-radius: 8px;
}

.sh-d {
  --k: 1.1;
  --r: 0deg;
  bottom: 14%;
  left: -20px;
  width: 120px;
  height: 44px;
  background: repeating-linear-gradient(
    90deg,
    var(--sun) 0 8px,
    transparent 8px 16px
  );
}

.dots {
  position: absolute;
  z-index: 1;
  inset: auto auto 0 0;
  width: 100%;
  height: 46px;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 206, 92, 0.28) 0 3px,
    transparent 3px 11px
  );
  pointer-events: none;
}

/* ---------- 版心 ---------- */
.wrap {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 18px;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding-top: 30px;
  padding-bottom: 46px;
}

.prose {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}

.prose div {
  padding: 20px 17px 22px;
  background: var(--glass);
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  backdrop-filter: blur(7px);
  scroll-margin-top: 92px;
}

.prose h2 {
  margin: 0 0 6px;
  font-family: var(--font-wide);
  font-weight: 700;
  font-size: clamp(21px, 4.4vw, 30px);
  line-height: 1.24;
  letter-spacing: 0.005em;
  color: var(--sun);
}

.prose h3 {
  margin: 22px 0 6px;
  font-family: var(--font-wide);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.35;
  color: var(--neon);
}

.prose hr {
  height: 0;
  margin: 6px 0 16px;
  border: 0;
  border-top: 3px dotted rgba(135, 255, 113, 0.45);
}

.prose p {
  margin: 0 0 15px;
  max-width: 66ch;
}

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

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

.prose li {
  margin: 0.32em 0;
}

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

.prose a {
  color: var(--neon);
  text-underline-offset: 3px;
}

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

.prose time {
  display: inline-block;
  font-size: 16px;
  color: var(--text-dim);
}

.prose blockquote {
  margin: 0 0 15px;
  padding: 10px 14px;
  border-left: 5px solid var(--neon);
  background: rgba(255, 206, 92, 0.08);
}

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

/* ---------- 侧栏 ---------- */
.side {
  padding: 16px 14px 18px;
  background: rgba(255, 206, 92, 0.06);
  border: 1.5px solid rgba(255, 206, 92, 0.32);
  border-radius: 10px;
  backdrop-filter: blur(7px);
  align-self: start;
}

.side-title {
  margin: 0 0 6px;
  font-family: var(--font-wide);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.06em;
  color: var(--sun);
}

.side hr {
  height: 0;
  margin: 0 0 12px;
  border: 0;
  border-top: 3px dotted rgba(255, 206, 92, 0.5);
}

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

.side-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 8px 4px 18px;
  position: relative;
  font-size: 16px;
  color: var(--text-dim);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.16s ease, color 0.16s ease;
}

.side-list a::before {
  content: "";
  position: absolute;
  left: 4px;
  width: 8px;
  height: 8px;
  background: var(--neon);
  transform: rotate(45deg);
}

.side-list a:hover,
.side-list a:focus-visible {
  color: var(--ink-deep);
  background: var(--neon);
}

/* ---------- 页脚 ---------- */
footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 20px;
  padding: 20px 16px 32px;
  border-top: 3px dashed rgba(135, 255, 113, 0.34);
  background: #0d160b;
}

.f-mark a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 40px;
  padding: 4px;
  color: var(--ink-deep);
  background: var(--neon);
  border-radius: 6px;
  transform: rotate(-3deg);
  text-decoration: none;
}

.f-mark img {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.f-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.f-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 8px;
  font-size: 16px;
  color: var(--text-dim);
  text-decoration: none;
  border-radius: 6px;
}

.f-nav a:hover,
.f-nav a:focus-visible {
  color: var(--ink-deep);
  background: var(--sun);
}

.f-copy {
  flex: 1 1 100%;
  margin: 0;
  text-align: center;
  font-size: 16px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* ---------- 断点 ---------- */
@media (min-width: 760px) {
  .hero {
    padding: 76px 40px 60px;
  }

  .wrap {
    padding: 0 28px;
  }

  .prose div {
    padding: 26px 26px 28px;
  }

  .main-grid {
    gap: 30px;
    padding-top: 40px;
    padding-bottom: 60px;
  }

  .f-copy {
    flex: 0 1 auto;
  }

  footer {
    justify-content: space-between;
    padding: 20px 32px 26px;
  }

  .f-copy {
    flex: 0 0 auto;
  }
}

@media (min-width: 980px) {
  .main-grid {
    grid-template-columns: minmax(0, 1fr) 258px;
    gap: 38px;
  }

  .side {
    position: sticky;
    top: 86px;
  }

  .hero {
    padding: 92px 48px 64px;
  }

  .hero h1 {
    max-width: 11ch;
  }
}

@media (min-width: 980px) {
  footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .f-mark {
    justify-self: start;
  }

  .f-copy {
    justify-self: end;
    text-align: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .shape {
    transform: rotate(var(--r, 0deg));
  }
}

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