@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

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

:root {
  --ink: #192617;
  --ink-deep: #0d160c;
  --lime: #87ff71;
  --sun: #ffce5c;
  --paper: #effbe7;
  --dim: #b3c6a9;
  --line: rgba(135, 255, 113, 0.42);
  --r: 4px;
}

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Lexend', 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image: radial-gradient(rgba(135, 255, 113, 0.18) 1px, transparent 1px);
  background-size: 22px 22px;
}

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

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

:focus-visible {
  outline: 2px dashed var(--lime);
  outline-offset: 3px;
}

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

/* ---------- 外壳 ---------- */

.shell {
  position: relative;
  z-index: 1;
  padding-left: 260px;
  min-height: 100vh;
}

/* ---------- 左侧竖排导航 ---------- */

.side {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 260px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px 18px 22px;
  overflow-y: auto;
  background: var(--ink-deep);
  border-right: 2px dashed var(--line);
}

.side::after {
  content: '';
  position: absolute;
  right: -9px;
  top: 40%;
  width: 16px;
  height: 16px;
  background: var(--sun);
  border-radius: 50%;
  opacity: 0.9;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  color: var(--paper);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.brand img {
  width: 36px;
  height: 36px;
  flex: none;
  object-fit: contain;
  background: var(--lime);
  border-radius: var(--r);
}

.mark {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--lime);
  color: var(--ink-deep);
  font-weight: 700;
  font-size: 18px;
  border-radius: var(--r);
  clip-path: polygon(0 0, 100% 0, 100% 74%, 74% 100%, 0 100%);
}

.brand:hover .brand-name { color: var(--lime); }

.contact {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--dim);
  word-break: break-all;
  letter-spacing: 0.02em;
}

.contact-dot {
  flex: none;
  width: 9px;
  height: 9px;
  background: var(--sun);
  transform: rotate(45deg);
}

.side nav p {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.side nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--r);
  color: var(--paper);
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.side nav a::before {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  background: var(--sun);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.side nav a:nth-child(2n)::before {
  background: var(--lime);
  clip-path: circle(50%);
}

.side nav a:hover {
  background: rgba(135, 255, 113, 0.12);
  border-color: var(--line);
  color: var(--lime);
  transform: translateX(4px);
}

/* ---------- 主区 ---------- */

main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 36px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 32px 26px 52px;
}

div { min-width: 0; }

/* ---------- 头图区 ---------- */

.hero {
  position: relative;
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  text-align: right;
  padding: 30px 22px 34px;
  margin-bottom: 26px;
  border: 2px solid var(--lime);
  border-radius: var(--r);
  background:
    repeating-linear-gradient(135deg, rgba(135, 255, 113, 0.08) 0 10px, transparent 10px 22px),
    var(--ink-deep);
}

.hero-art {
  position: absolute;
  left: 20px;
  bottom: 20px;
  width: 112px;
  height: 112px;
  display: block;
}

.hero-art span { position: absolute; display: block; }

.tri {
  width: 54px;
  height: 54px;
  left: 0;
  top: 0;
  background: var(--lime);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform: rotate(-8deg);
}

.ring {
  width: 44px;
  height: 44px;
  right: 0;
  top: 28px;
  border: 5px solid var(--sun);
  border-radius: 50%;
  mix-blend-mode: screen;
}

.zig {
  width: 58px;
  height: 8px;
  left: 22px;
  bottom: 6px;
  background: var(--sun);
  border-radius: 2px;
  transform: rotate(12deg);
}

.hero h1 {
  margin: 0;
  font-size: clamp(28px, 4.6vw, 44px);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.025em;
}

.hero h1::after {
  content: '';
  display: block;
  width: 78px;
  height: 8px;
  margin: 16px 0 0 auto;
  background: var(--sun);
  border-radius: 2px;
  transform: rotate(-2deg);
}

.hero-lede {
  margin: 16px 0 0 auto;
  max-width: 34em;
  font-size: 16px;
  line-height: 1.65;
  color: var(--dim);
}

/* ---------- 正文片段 ---------- */

div > section {
  position: relative;
  margin: 0 0 22px;
  padding: 24px 22px 26px;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(135, 255, 113, 0.05), rgba(255, 255, 255, 0.012));
  scroll-margin-top: 96px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

div > section:nth-child(3n+2) { border-color: rgba(255, 206, 92, 0.5); }
div > section:nth-child(3n+3) { border-color: rgba(239, 251, 231, 0.28); }

div > section::after {
  content: '';
  position: absolute;
  top: -7px;
  right: 18px;
  width: 13px;
  height: 13px;
  background: var(--lime);
  border-radius: 50%;
  opacity: 0.75;
}

div > section:nth-child(2n)::after {
  background: var(--sun);
  border-radius: 0;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

div > section:hover { border-color: var(--lime); }

div h2 {
  margin: 0 0 12px;
  font-size: clamp(21px, 2.6vw, 27px);
  font-weight: 600;
  line-height: 1.34;
  letter-spacing: -0.02em;
  color: var(--lime);
}

div h3 {
  margin: 22px 0 8px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--sun);
}

div p { margin: 0 0 14px; }
div p:last-child { margin-bottom: 0; }

div ul, div ol { margin: 0 0 14px; padding-left: 1.3em; }
div li { margin-bottom: 6px; }

div strong { color: var(--sun); font-weight: 600; }

div a {
  color: var(--sun);
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 206, 92, 0.5);
}

div a:hover { color: var(--lime); }

div img {
  display: block;
  margin: 16px 0;
  max-width: 100%;
  border: 2px solid var(--line);
  border-radius: var(--r);
}

div blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--sun);
  background: rgba(255, 206, 92, 0.07);
  color: var(--paper);
}

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

div code {
  font-family: 'Source Sans 3', ui-monospace, monospace;
  background: rgba(135, 255, 113, 0.14);
  padding: 1px 5px;
  border-radius: 2px;
}

div table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 16px;
}

div th, div td {
  border: 1px dashed var(--line);
  padding: 8px 10px;
  text-align: left;
}

div th { background: rgba(135, 255, 113, 0.1); color: var(--lime); }

/* ---------- 右侧栏 ---------- */

.rail {
  position: sticky;
  top: 24px;
  align-self: start;
  padding: 16px 14px 18px;
  border: 2px solid var(--sun);
  border-radius: var(--r);
  background: rgba(255, 206, 92, 0.05);
}

.rail small {
  display: inline-block;
  padding: 1px 8px;
  background: var(--sun);
  color: var(--ink-deep);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 2px;
  transform: rotate(-2deg);
}

.rail h2 {
  margin: 12px 0 10px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.rail ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}

.rail a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 4px;
  color: var(--dim);
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 206, 92, 0.3);
  transition: color 0.15s ease, transform 0.15s ease;
}

.rail li:last-child a { border-bottom: 0; }
.rail a:hover { color: var(--lime); transform: translateX(3px); }

/* ---------- 页脚 ---------- */

footer {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 28px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 30px 26px 44px;
  border-top: 2px dashed var(--line);
}

footer p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--dim);
}

footer .f-about strong {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
  color: var(--paper);
  letter-spacing: -0.01em;
}

footer .f-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  justify-content: flex-end;
  align-content: start;
}

footer .f-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--paper);
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

footer .f-links a:hover { color: var(--lime); }

footer small {
  font-size: 14px;
  color: #93a58c;
  padding-top: 12px;
  border-top: 1px solid rgba(135, 255, 113, 0.18);
}

footer .f-copy { grid-column: 1; }
footer .f-top { grid-column: 2; text-align: right; }

footer .f-top a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--sun);
  text-decoration: none;
}

footer .f-top a:hover { color: var(--lime); }

/* ---------- 滚动出现 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* ---------- 窄屏 ---------- */

@media (max-width: 900px) {
  .shell { padding-left: 0; }

  .side {
    position: sticky;
    top: 0;
    bottom: auto;
    left: auto;
    width: auto;
    height: auto;
    z-index: 9;
    display: block;
    padding: 12px 16px 10px;
    overflow: visible;
    border-right: 0;
    border-bottom: 2px dashed var(--line);
    background: var(--ink-deep);
  }

  .side::after { display: none; }

  .brand { font-size: 17px; margin-bottom: 6px; }

  .contact { margin: 0 0 8px; font-size: 13px; }

  .side nav p {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .side nav a {
    min-height: 40px;
    padding: 4px 10px;
    font-size: 14px;
    border: 1px solid rgba(135, 255, 113, 0.3);
  }

  .side nav a::before { width: 7px; height: 7px; }

  main {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 20px 16px 40px;
  }

  .rail { position: static; order: 2; }

  .hero {
    min-height: 0;
    padding: 62px 16px 22px;
  }

  .hero-art {
    left: 16px;
    top: 14px;
    bottom: auto;
    width: 62px;
    height: 62px;
  }

  .tri { width: 30px; height: 30px; }
  .ring { width: 26px; height: 26px; border-width: 4px; top: 16px; }
  .zig { width: 32px; height: 6px; left: 14px; bottom: 2px; }

  div > section { padding: 18px 16px 20px; }

  footer {
    grid-template-columns: 1fr;
    padding: 24px 16px 36px;
  }

  footer .f-links { justify-content: flex-start; }
  footer .f-top { grid-column: 1; text-align: left; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 26px; }
  .side nav a { font-size: 13px; padding: 4px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

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