@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');

:root {
  --acid: #80ff00;
  --lime: #00ff00;
  --ink: #1f2617;
  --ink2: #2b3520;
  --ink3: #141a0f;
  --paper: #f3f7e9;
  --paper2: #e3edd1;
  --line: #cfdcb6;
  --shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
  --font: 'Lexend', 'Source Sans 3', system-ui, -apple-system, 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

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

body {
  margin: 0;
  padding-top: 42px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  max-width: 100%;
  overflow-x: hidden;
  background-image: radial-gradient(rgba(128, 255, 0, 0.14) 1px, transparent 1px);
  background-size: 22px 22px;
}

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

a {
  color: inherit;
}

menu {
  margin: 0;
  padding: 0;
}

div[id],
h2[id] {
  scroll-margin-top: 56px;
}

/* 顶部细条 + 品牌角标 */
.strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 42px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  background: var(--acid);
  color: var(--ink);
  border-bottom: 3px solid var(--ink);
}

.brandmark {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--ink);
  color: var(--acid);
  text-decoration: none;
  overflow: hidden;
  transform: rotate(-6deg);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}

.brandimg {
  width: 28px;
  height: 28px;
  object-fit: cover;
}

.brandglyph {
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.marquee {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  animation: slide 26s linear infinite;
}

.marquee-track .dot {
  font-size: 14px;
  opacity: 0.7;
}

@keyframes slide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* 左侧竖排导航 */
.nav {
  position: fixed;
  z-index: 80;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.nav summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  min-width: 96px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid var(--acid);
  background: var(--ink2);
  color: var(--acid);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.16em;
  user-select: none;
  box-shadow: 4px 4px 0 rgba(0, 255, 0, 0.25);
}

.nav summary::-webkit-details-marker {
  display: none;
}

.nav summary:hover {
  background: var(--acid);
  color: var(--ink);
}

.nav menu {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 2px solid #3f4d2c;
  background: rgba(31, 38, 23, 0.94);
  color: #dff5c4;
  text-decoration: none;
  font-size: 16px;
  line-height: 1.3;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.nav menu a:hover,
.nav menu a:focus-visible {
  background: var(--acid);
  border-color: var(--acid);
  color: var(--ink);
  transform: translateX(4px) rotate(-1deg);
}

/* 主区 */
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  padding: clamp(18px, 3vw, 32px) clamp(14px, 3vw, 26px) 64px;
}

@media (min-width: 1000px) {
  main {
    grid-template-columns: minmax(0, 1fr) 288px;
    gap: 36px;
    padding-left: 190px;
    padding-right: 44px;
    max-width: 1440px;
  }
}

article {
  min-width: 0;
}

article > div {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border-radius: 18px;
  padding: clamp(18px, 3vw, 34px);
  margin-bottom: 26px;
  box-shadow: 10px 12px 0 rgba(128, 255, 0, 0.2), var(--shadow);
  transform: rotate(var(--tilt, 0deg));
}

/* 首屏 */
.hero {
  background: none;
  color: var(--paper);
  box-shadow: none;
  padding: 0 0 70px;
  min-height: calc(100svh - 42px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  isolation: isolate;
  overflow: visible;
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 8.4vw, 104px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--acid);
  max-width: 17ch;
  overflow-wrap: break-word;
  text-shadow: 4px 4px 0 var(--ink3), 9px 9px 0 rgba(0, 255, 0, 0.32);
}

.hero .lede {
  margin: 0;
  max-width: 40ch;
  font-size: 17px;
  color: #dcecc4;
}

.blob {
  position: absolute;
  border-radius: 50%;
  z-index: -1;
  mix-blend-mode: screen;
  filter: saturate(160%);
  opacity: 0.5;
  pointer-events: none;
}

.b1 {
  width: 260px;
  height: 260px;
  right: -30px;
  top: 10%;
  background: radial-gradient(circle, #80ff00, transparent 68%);
}

.b2 {
  width: 190px;
  height: 190px;
  left: -40px;
  bottom: 16%;
  background: radial-gradient(circle, #00ff00, transparent 68%);
}

.b3 {
  width: 120px;
  height: 120px;
  right: 18%;
  bottom: 8%;
  background: radial-gradient(circle, #80ff00, transparent 66%);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tags a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 2px solid var(--acid);
  background: var(--ink2);
  color: var(--acid);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transform: rotate(var(--rot, 0deg));
  box-shadow: 5px 5px 0 rgba(0, 255, 0, 0.22);
  animation: jitter 3.6s ease-in-out infinite;
}

.tags a:nth-child(1) {
  --rot: -3deg;
}

.tags a:nth-child(2) {
  --rot: 2.4deg;
  animation-delay: 0.4s;
}

.tags a:nth-child(3) {
  --rot: -1.4deg;
  animation-delay: 0.8s;
}

.tags a:hover {
  background: var(--acid);
  color: var(--ink);
}

@keyframes jitter {
  0%,
  100% {
    transform: rotate(var(--rot, 0deg)) translateY(0);
  }
  50% {
    transform: rotate(calc(var(--rot, 0deg) + 1.6deg)) translateY(-3px);
  }
}

/* 正文排版 */
article h2 {
  margin: 0 0 14px;
  font-size: clamp(21px, 2.6vw, 30px);
  line-height: 1.22;
  letter-spacing: -0.015em;
  font-weight: 700;
}

article h2 span,
article h3 span {
  padding: 0 3px;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 255, 0, 0.55) 60%);
}

article h3 {
  margin: 26px 0 10px;
  font-size: 20px;
  line-height: 1.3;
}

article p {
  margin: 0 0 14px;
}

article ul,
article ol {
  margin: 0 0 16px;
  padding-left: 1.35em;
}

article li {
  margin-bottom: 8px;
}

article a {
  color: #1e4210;
  text-decoration: none;
  border-bottom: 2px solid var(--lime);
}

article a:hover {
  background: var(--acid);
}

article strong {
  background: rgba(128, 255, 0, 0.45);
  padding: 0 3px;
}

article blockquote {
  margin: 20px 0;
  padding: 12px 18px;
  border-left: 7px solid var(--acid);
  background: var(--paper2);
  border-radius: 0 14px 14px 0;
  font-size: 17px;
}

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

article img {
  border-radius: 18px;
  margin: 18px 0;
  box-shadow: var(--shadow);
  border: 3px solid var(--ink2);
}

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

article th,
article td {
  border: 2px solid var(--line);
  padding: 9px 11px;
  text-align: left;
  vertical-align: top;
}

article th {
  background: var(--paper2);
}

article code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 15px;
  background: var(--paper2);
  padding: 1px 5px;
  border-radius: 6px;
}

/* 右侧便签 */
aside {
  align-self: start;
  position: sticky;
  top: 66px;
  background: var(--ink2);
  border: 3px solid var(--acid);
  border-radius: 18px;
  padding: 16px;
  transform: rotate(-1.4deg);
  box-shadow: 8px 8px 0 rgba(0, 255, 0, 0.26);
}

aside h2 {
  margin: 0 0 12px;
  font-size: 17px;
  letter-spacing: 0.2em;
  color: var(--acid);
}

aside h2 span {
  border-bottom: 2px dashed rgba(128, 255, 0, 0.6);
}

aside ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

aside a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 13px;
  border-radius: 999px;
  border: 2px solid #3f4d2c;
  background: #26301c;
  color: #dff5c4;
  text-decoration: none;
  font-size: 16px;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}

aside a:hover,
aside a:focus-visible {
  background: var(--acid);
  border-color: var(--acid);
  color: var(--ink);
  transform: translateX(4px);
}

@media (max-width: 999px) {
  aside {
    position: static;
    transform: rotate(-0.8deg);
  }
}

/* 页脚 */
footer {
  background: var(--ink3);
  color: var(--paper);
  border-top: 4px solid var(--acid);
  padding: clamp(26px, 5vw, 56px) clamp(16px, 4vw, 40px) 18px;
  display: grid;
  gap: 26px;
}

@media (min-width: 760px) {
  footer {
    grid-template-columns: 1.5fr 1fr;
    align-items: start;
  }
}

@media (min-width: 1000px) {
  footer {
    padding-left: 190px;
  }
}

footer div {
  min-width: 0;
}

footer div h2 {
  margin: 0 0 12px;
  font-size: 16px;
  letter-spacing: 0.2em;
  color: var(--acid);
  font-weight: 600;
}

footer .big {
  font-size: clamp(38px, 9.4vw, 118px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--acid);
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
  mix-blend-mode: screen;
  transform: rotate(-1deg);
}

.footlinks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.footlinks a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 2px solid #3a4729;
}

.footlinks a:hover {
  color: var(--acid);
  border-color: var(--acid);
}

.foot-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-top: 2px dashed #3a4729;
  padding-top: 14px;
  font-size: 16px;
  color: #b9cf9f;
}

.foot-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border: 2px solid #3a4729;
  text-decoration: none;
  color: var(--paper);
}

.foot-bottom a:hover {
  border-color: var(--acid);
  color: var(--acid);
}

/* 滚动入场 */
.rv {
  opacity: 0;
  transform: translateY(22px) rotate(var(--tilt, 0deg));
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.rv.in {
  opacity: 1;
  transform: translateY(0) rotate(var(--tilt, 0deg));
}

/* 手机端：导航落到底部，光斑收紧避免横向溢出 */
@media (max-width: 999px) {
  .nav {
    left: 12px;
    bottom: 14px;
    top: auto;
    transform: none;
  }

  .nav summary {
    min-width: 84px;
    min-height: 48px;
    letter-spacing: 0.1em;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
  }

  .nav menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    width: min(230px, 68vw);
    max-height: 58svh;
    overflow: auto;
    padding: 10px;
    margin: 0;
    background: rgba(20, 26, 15, 0.97);
    border: 2px solid var(--acid);
    border-radius: 18px;
  }

  .hero {
    padding-bottom: 90px;
  }

  .b1 {
    width: 170px;
    height: 170px;
    right: -10px;
  }

  .b2 {
    width: 130px;
    height: 130px;
    left: -10px;
  }

  .b3 {
    width: 96px;
    height: 96px;
    right: 6%;
  }
}

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

  .marquee-track,
  .tags a {
    animation: none;
  }

  .rv {
    opacity: 1;
    transform: rotate(var(--tilt, 0deg));
    transition: none;
  }
}

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