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

:root {
  --g: #87ff71;
  --y: #ffce5c;
  --ink: #192617;
  --tx: #eaf6e0;
  --line: rgba(135, 255, 113, 0.28);
  --glass: rgba(255, 255, 255, 0.055);
  --r: 10px;
}

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

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

body {
  margin: 0;
  padding-bottom: 210px;
  background-color: var(--ink);
  background-image: radial-gradient(rgba(135, 255, 113, 0.16) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--tx);
  font-family: 'Space Mono', ui-monospace, Menlo, Consolas, 'PingFang SC', 'Microsoft YaHei', monospace;
  font-size: 17px;
  line-height: 1.68;
}

a { color: inherit; }

/* ---------- 底部固定条 ---------- */
.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(25, 38, 23, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 3px dashed var(--g);
}

.bar nav { order: 2; width: 100%; }

.bar nav p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  margin: 0;
}

.mid {
  order: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bar a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 8px;
  font-size: 16px;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.bar nav a:hover {
  background: var(--g);
  color: var(--ink);
  transform: translateY(-2px);
}

.brand {
  padding: 6px 14px;
  background: var(--y);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 2px solid var(--ink);
  border-radius: 8px;
  transform: rotate(-2deg);
}

.brand:hover { transform: rotate(1deg) scale(1.03); }

.contact {
  padding: 6px 12px;
  color: var(--g);
  border: 2px dashed var(--g);
}

.contact:hover { background: var(--y); border-color: var(--y); color: var(--ink); }

/* ---------- 骨架 ---------- */
.shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 16px 60px;
}

.body { min-width: 0; }

.body > section {
  margin-bottom: 20px;
  padding: 20px 18px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.body > section:nth-of-type(even) { border-left: 4px solid var(--y); }
.body > section:nth-of-type(odd) { border-right: 4px solid rgba(135, 255, 113, 0.45); }

/* ---------- 首屏 ---------- */
.hero,
.body > section.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 45vh;
  padding: 22px 0 30px;
  text-align: center;
  background: none;
  border: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-radius: 0;
}

.hero h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.9rem, 8vw, 3.2rem);
  line-height: 1.16;
  letter-spacing: 0.01em;
  text-shadow: 4px 4px 0 var(--y), -3px -3px 0 rgba(135, 255, 113, 0.6);
}

.collage {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
  width: 100%;
}

.collage img {
  display: block;
  width: 44%;
  max-width: 210px;
  height: auto;
  border: 3px solid var(--g);
  border-radius: var(--r);
  object-fit: cover;
  box-shadow: 6px 6px 0 var(--y);
}

.collage .s1 { transform: rotate(-4deg) translateY(4px); }
.collage .s2 {
  transform: rotate(3deg) translateY(-8px);
  border-color: var(--y);
  box-shadow: 6px 6px 0 var(--g);
}

/* ---------- 侧栏 ---------- */
.rail {
  order: -1;
  position: relative;
  overflow: hidden;
  padding: 16px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.rail h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0.16em;
  color: var(--y);
}

.railnav p {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}

.railnav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 4px 8px;
  font-size: 16px;
  text-decoration: none;
  border-left: 3px solid transparent;
  border-radius: 4px;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.railnav a:hover {
  border-left-color: var(--g);
  background: rgba(135, 255, 113, 0.12);
  color: var(--g);
}

.blob {
  height: 74px;
  margin-top: 14px;
  border-radius: 12px;
  background-color: var(--g);
  background-image: repeating-linear-gradient(45deg, var(--y) 0 8px, transparent 8px 16px);
  clip-path: polygon(0 0, 100% 9%, 100% 100%, 0 91%);
}

/* ---------- 正文排版 ---------- */
.body h2 {
  margin: 0.2em 0 0.5em;
  color: var(--g);
  font-size: clamp(1.25rem, 4.6vw, 1.6rem);
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.body h2::before {
  content: '';
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  margin-right: 0.45em;
  background: var(--y);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform: rotate(8deg);
}

.subtitle {
  margin: 0.1em 0 0.9em;
  color: var(--y);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.16em;
}

.body h3 {
  margin: 1.2em 0 0.4em;
  color: var(--y);
  font-size: 1.08rem;
  line-height: 1.4;
}

.body p { margin: 0 0 1em; }
.body p:last-child { margin-bottom: 0; }

.body ul,
.body ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}

.body li { margin: 0.35em 0; }

.body a {
  color: var(--g);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.body a:hover {
  background: var(--g);
  color: var(--ink);
  text-decoration: none;
}

.body img {
  max-width: 100%;
  height: auto;
  border: 2px solid var(--line);
  border-radius: var(--r);
}

.body blockquote {
  margin: 1em 0;
  padding: 0.7em 1em;
  background: rgba(255, 206, 92, 0.08);
  border-left: 5px solid var(--y);
  border-radius: 0 var(--r) var(--r) 0;
}

.body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.body th,
.body td {
  padding: 8px;
  border: 1px dashed var(--line);
  text-align: left;
  vertical-align: top;
}

.body code {
  padding: 1px 5px;
  background: rgba(135, 255, 113, 0.14);
  border-radius: 4px;
  font-size: 0.94em;
}

/* ---------- 页脚 ---------- */
.foot {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 16px 44px;
}

.cta {
  overflow: hidden;
  padding: 26px 18px;
  color: var(--ink);
  background-color: var(--y);
  background-image: radial-gradient(rgba(25, 38, 23, 0.22) 1.5px, transparent 1.5px);
  background-size: 16px 16px;
  border: 3px solid var(--ink);
  border-radius: var(--r);
}

.cta h2 {
  margin: 0;
  font-size: clamp(1.4rem, 5.4vw, 2rem);
  letter-spacing: 0.04em;
}

.cta .subtitle {
  margin: 0.2em 0 1em;
  color: var(--ink);
  opacity: 0.75;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 18px;
  background: var(--ink);
  color: var(--g);
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  transform: rotate(-2deg);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn:hover {
  background: var(--g);
  color: var(--ink);
  transform: rotate(0deg) scale(1.04);
}

.cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 22px 0;
  padding-top: 20px;
  border-top: 3px dashed var(--line);
}

.cols dl { margin: 0; }

.cols dt {
  margin-bottom: 6px;
  color: var(--y);
  font-size: 16px;
  letter-spacing: 0.2em;
}

.cols dd { margin: 0; }

.cols a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 2px 0;
  font-size: 16px;
  text-decoration: none;
}

.cols a:hover {
  color: var(--g);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.copy {
  margin: 8px 0 0;
  color: rgba(234, 246, 224, 0.72);
  font-size: 16px;
  letter-spacing: 0.1em;
  text-align: center;
}

/* ---------- 滚动出现 ---------- */
.js [data-rev] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.js [data-rev].in {
  opacity: 1;
  transform: none;
}

/* ---------- 断点 ---------- */
@media (min-width: 700px) {
  .cols { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  body { padding-bottom: 100px; font-size: 18px; }

  .bar {
    flex-wrap: nowrap;
    gap: 18px;
    padding: 10px 24px;
  }

  .bar nav { order: 0; width: auto; }
  .bar nav p { flex-wrap: nowrap; gap: 4px; }
  .mid { order: 0; }
  .navl { margin-right: auto; }
  .navr { margin-left: auto; }
}

@media (min-width: 980px) {
  .shell {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 30px;
    padding: 28px 24px 80px;
  }

  .rail { position: sticky; top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .js [data-rev] { opacity: 1; transform: none; }
}

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