@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Righteous&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --lime: #80ff00;
  --green: #00ff00;
  --dark: #1f2617;
  --dark2: #161c0f;
  --dark3: #2a3320;
  --accent: #ff2d55;
  --accent2: #f7c500;
  --white: #f5ffed;
  --font-head: 'Righteous', 'Poppins', system-ui, sans-serif;
  --font-body: 'Poppins', system-ui, sans-serif;
  --radius: 0px;
  --nav-h: 72px;
  --anchor-h: 44px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--dark);
  color: var(--white);
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  background: var(--dark);
  color: var(--white);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ===== CHAOS BG ===== */
.chaos-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-noise {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(128,255,0,0.07) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0,255,0,0.05) 0%, transparent 50%),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(128,255,0,0.02) 2px,
      rgba(128,255,0,0.02) 4px
    );
}

.sticker {
  position: absolute;
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--lime);
  opacity: 0.18;
  user-select: none;
  pointer-events: none;
  filter: saturate(150%);
  transition: opacity 0.3s;
}

/* ===== MARQUEE ===== */
.marquee-bar {
  position: relative;
  z-index: 10;
  background: var(--lime);
  color: var(--dark);
  overflow: hidden;
  height: 36px;
  display: flex;
  align-items: center;
}

.marquee-track {
  display: flex;
  white-space: nowrap;
  animation: marquee-scroll 18s linear infinite;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  gap: 0;
}

.marquee-track span { padding-right: 0; }

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

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(31, 38, 23, 0.97);
  border-bottom: 2px solid var(--lime);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 1.5rem;
  height: var(--nav-h);
  max-width: 1400px;
  margin: 0 auto;
  gap: 1rem;
}

.brand-center {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 1;
}

.brand-logo { height: 44px; width: auto; }

.brand-text {
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--lime);
  letter-spacing: 0.05em;
  text-shadow: 0 0 20px rgba(128,255,0,0.4);
  white-space: nowrap;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-left { justify-content: flex-start; }
.nav-right { justify-content: flex-end; }

.nav-link-side {
  font-family: var(--font-head);
  font-size: 0.78rem;
  color: var(--white);
  text-decoration: none;
  padding: 0.5rem 0.6rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  letter-spacing: 0.04em;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.nav-link-side:hover,
.nav-link-side:focus {
  color: var(--lime);
  border-color: var(--lime);
}

/* hamburger */
.nav-details {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
}

.nav-details summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  min-height: 44px;
  justify-content: center;
  border: 2px solid var(--lime);
  background: transparent;
}

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

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--lime);
  transition: transform 0.2s;
}

.fullscreen-menu {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 6, 0.97);
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  padding: 2rem;
  animation: menu-in 0.2s ease;
}

@keyframes menu-in {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: scale(1); }
}

.fullscreen-menu li { width: 100%; text-align: center; }

.fullscreen-menu .nav-link {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.06em;
  display: block;
  padding: 0.6rem 1rem;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 4px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.fullscreen-menu .nav-link:hover,
.fullscreen-menu .nav-link:focus {
  color: var(--lime);
  border-color: var(--lime);
}

.menu-close-item { margin-bottom: 1rem; }

.menu-close {
  background: none;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.4rem 1rem;
  min-height: 44px;
  font-family: var(--font-head);
  transition: background 0.2s;
}

.menu-close:hover { background: var(--accent); color: var(--white); }

/* search bar */
.search-bar-wrap {
  background: var(--dark2);
  border-top: 1px solid rgba(128,255,0,0.15);
  padding: 0.4rem 1.5rem;
  display: flex;
  justify-content: center;
}

.search-form {
  display: flex;
  width: 100%;
  max-width: 480px;
  border: 1.5px solid rgba(128,255,0,0.3);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
  outline: none;
  min-height: 40px;
}

.search-input::placeholder { color: rgba(245,255,237,0.35); }

.search-btn {
  background: var(--lime);
  border: none;
  color: var(--dark);
  cursor: pointer;
  padding: 0 0.75rem;
  font-size: 1rem;
  min-height: 40px;
  min-width: 44px;
  transition: background 0.2s;
}

.search-btn:hover { background: var(--green); }

/* ===== STICKY ANCHOR BAR ===== */
.sticky-anchor-bar {
  position: sticky;
  top: calc(var(--nav-h) + 36px + 40px);
  z-index: 90;
  background: var(--dark3);
  border-bottom: 1.5px solid rgba(128,255,0,0.25);
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
  padding: 0 1rem;
  height: var(--anchor-h);
}

.sticky-anchor-bar::-webkit-scrollbar { display: none; }

.anchor-link {
  font-family: var(--font-head);
  font-size: 0.75rem;
  color: rgba(245,255,237,0.78);
  text-decoration: none;
  padding: 0 0.75rem;
  height: var(--anchor-h);
  display: flex;
  align-items: center;
  white-space: nowrap;
  letter-spacing: 0.04em;
  border-right: 1px solid rgba(128,255,0,0.12);
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.anchor-link:hover,
.anchor-link:focus {
  color: var(--lime);
  background: rgba(128,255,0,0.07);
}

/* ===== HERO ===== */
.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding: 4rem 2rem 3rem;
  overflow: hidden;
  z-index: 1;
  scroll-margin-top: calc(var(--nav-h) + 36px + 40px + var(--anchor-h));
}

.hero-bg-text {
  position: absolute;
  bottom: -0.1em;
  left: -0.05em;
  font-family: var(--font-head);
  font-size: clamp(12rem, 40vw, 28rem);
  color: rgba(128,255,0,0.06);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  letter-spacing: -0.05em;
  z-index: 0;
  mix-blend-mode: screen;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: right;
  max-width: 680px;
}

.hero-h1 {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 7vw, 5rem);
  line-height: 1.1;
  color: var(--lime);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  text-shadow: 0 0 30px rgba(128,255,0,0.35), 3px 3px 0 rgba(0,0,0,0.4);
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(245,255,237,0.8);
  margin-bottom: 2rem;
  max-width: 520px;
  margin-left: auto;
}

.cta-btn {
  display: inline-block;
  background: var(--lime);
  color: var(--dark);
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  padding: 0.85rem 2.5rem;
  min-height: 52px;
  border: 3px solid var(--lime);
  transition: background 0.2s, color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.cta-btn:hover,
.cta-btn:focus {
  background: transparent;
  color: var(--lime);
  transform: translate(-3px, -3px);
}

.cta-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 4px,
    rgba(0,0,0,0.06) 4px,
    rgba(0,0,0,0.06) 8px
  );
  pointer-events: none;
}

.jitter-btn {
  animation: jitter 4s infinite;
}

@keyframes jitter {
  0%, 94%, 100% { transform: translate(0,0) rotate(0deg); }
  95% { transform: translate(-2px, 1px) rotate(-0.5deg); }
  96% { transform: translate(2px, -1px) rotate(0.5deg); }
  97% { transform: translate(-1px, 2px) rotate(-0.3deg); }
  98% { transform: translate(1px, -2px) rotate(0.3deg); }
}

.jitter-btn:hover {
  animation: none;
  background: transparent;
  color: var(--lime);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-media .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  filter: saturate(150%) contrast(1.1);
  mix-blend-mode: luminosity;
}

.hero-decor {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2;
}

.decor-tag {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  padding: 0.2rem 0.5rem;
  transform: rotate(-2deg);
}

.decor-tag-2 {
  background: var(--accent2);
  color: var(--dark);
  transform: rotate(1.5deg);
  align-self: flex-start;
}

.decor-num {
  font-family: var(--font-head);
  font-size: 2.5rem;
  color: rgba(128,255,0,0.2);
  letter-spacing: 0.1em;
  line-height: 1;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 1300px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.content-section {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* scroll margin for all sections */
section[id] {
  scroll-margin-top: calc(var(--nav-h) + 36px + 40px + var(--anchor-h) + 16px);
}

/* ===== CONTENT BODY ===== */
.content-body {
  min-width: 0;
}

/* page.content 内部样式 */
.content-body h2 {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: var(--lime);
  margin: 3rem 0 0.75rem;
  letter-spacing: 0.03em;
  line-height: 1.2;
  position: relative;
}

.content-body small {
  font-size: 0.82rem;
  color: rgba(245,255,237,0.55);
}

.content-body h3 {
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--green);
  margin: 2rem 0 0.5rem;
  letter-spacing: 0.02em;
}

.content-body h4 {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--lime);
  margin: 1.5rem 0 0.4rem;
}

.content-body p {
  margin-bottom: 1rem;
  line-height: 1.7;
  color: rgba(245,255,237,0.88);
}

.content-body ul,
.content-body ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}

.content-body li {
  margin-bottom: 0.45rem;
  line-height: 1.6;
  color: rgba(245,255,237,0.85);
}

.content-body li::marker { color: var(--lime); }

.content-body strong { color: var(--lime); }

.content-body em { color: var(--accent2); font-style: normal; }

.content-body a {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.content-body a:hover { color: var(--green); }

.content-body blockquote {
  border-left: 4px solid var(--lime);
  padding-left: 1.2rem;
  margin: 1.5rem 0;
  color: rgba(245,255,237,0.7);
  font-style: italic;
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.content-body th {
  background: var(--lime);
  color: var(--dark);
  padding: 0.6rem 0.8rem;
  text-align: left;
  font-family: var(--font-head);
  letter-spacing: 0.05em;
}

.content-body td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid rgba(128,255,0,0.15);
  color: rgba(245,255,237,0.8);
}

.content-body tr:nth-child(even) td { background: rgba(128,255,0,0.04); }

.content-body figure {
  margin: 2rem 0;
  border-bottom: 3px solid var(--lime);
}

.content-body figure img {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(120%);
}

.content-body figcaption {
  font-size: 0.8rem;
  color: rgba(245,255,237,0.55);
  padding: 0.4rem 0;
}

/* section dividers from page.content */
.content-body section {
  border-top: 1px solid rgba(128,255,0,0.18);
  padding-top: 2.5rem;
  margin-top: 0.5rem;
}

.content-body section:first-child { border-top: none; }

/* ===== ASIDE ===== */
.sidebar-aside {
  position: sticky;
  top: calc(var(--nav-h) + 36px + 40px + var(--anchor-h) + 1rem);
  background: var(--dark3);
  border: 1.5px solid rgba(128,255,0,0.25);
  border-bottom: 4px solid var(--lime);
  padding: 1.5rem 1.2rem;
}

.aside-title {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--lime);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.eyebrow-small {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--accent2);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  font-family: var(--font-head);
}

.aside-nav-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.aside-link {
  display: block;
  font-size: 0.82rem;
  color: rgba(245,255,237,0.72);
  text-decoration: none;
  padding: 0.4rem 0.5rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  border-left: 2px solid transparent;
  letter-spacing: 0.02em;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.aside-link:hover,
.aside-link:focus {
  color: var(--lime);
  border-color: var(--lime);
  background: rgba(128,255,0,0.06);
}

.aside-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--lime);
  font-family: var(--font-head);
  letter-spacing: 0.04em;
  margin-top: 0.5rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  animation: pulse-dot 1.8s ease infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* ===== FOOTER ===== */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--dark2);
  border-top: 2px solid rgba(128,255,0,0.25);
  padding: 2.5rem 1.5rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 2rem;
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.site-footer::after {
  content: '';
  display: none;
}

.footer-home {
  grid-column: 1;
  grid-row: 1;
  font-size: 0.82rem;
  color: rgba(245,255,237,0.72);
  line-height: 1.65;
}

.footer-home a {
  color: var(--lime);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex !important;
  align-items: center;
}

.footer-home a:hover { text-decoration: underline; }

.footer-brand {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--font-head);
  font-size: 0.9rem;
  color: rgba(245,255,237,0.75);
  letter-spacing: 0.03em;
  line-height: 1.6;
}

.footer-brand strong {
  display: block;
  color: var(--lime);
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  letter-spacing: 0.06em;
}

.footer-links {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0;
  flex-direction: column;
  align-items: flex-start;
}

.footer-links-sep {
  display: none;
}

.footer-nav-link {
  font-size: 0.82rem;
  color: rgba(245,255,237,0.68);
  text-decoration: none;
  padding: 0.3rem 0.5rem;
  min-height: 36px;
  display: flex;
  align-items: center;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-left-color 0.2s;
}

.footer-nav-link:hover,
.footer-nav-link:focus {
  color: var(--lime);
  border-left-color: var(--lime);
}

.footer-copy {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: 0.78rem;
  color: rgba(245,255,237,0.55);
  letter-spacing: 0.05em;
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(128,255,0,0.12);
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== UTILITY ===== */
.single-page { }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: 1fr auto 1fr;
    padding: 0 1rem;
  }

  .nav-left .nav-link-side:nth-child(n+3),
  .nav-right .nav-link-side:nth-child(n+3) {
    display: none;
  }

  .content-section {
    grid-template-columns: 1fr;
  }

  .sidebar-aside {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
  }

  .aside-title { grid-column: 1 / -1; }
  .eyebrow-small { grid-column: 1 / -1; }
  .aside-nav-list {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .nav-left,
  .nav-right {
    display: none;
  }

  .header-inner {
    grid-template-columns: 44px 1fr 44px;
  }

  .nav-details {
    position: static;
    transform: none;
    grid-column: 1;
  }

  .header-inner .brand-center {
    grid-column: 2;
  }

  .brand-text { font-size: 1.2rem; }

  .hero-section {
    align-items: flex-start;
    padding: 3rem 1.25rem 2.5rem;
    min-height: 70vh;
  }

  .hero-content { text-align: left; }
  .hero-desc { margin-left: 0; }

  .sticky-anchor-bar {
    top: calc(var(--nav-h) + 36px + 40px);
  }

  section[id] {
    scroll-margin-top: calc(var(--nav-h) + 36px + 40px + var(--anchor-h) + 8px);
  }

  .sidebar-aside {
    display: block;
  }

  .aside-nav-list { display: flex; }

  .content-body h2 { font-size: 1.4rem; }
  .content-body h3 { font-size: 1.1rem; }
}

/* ===== ANCHOR ACTIVE STATE ===== */
.anchor-active {
  color: var(--lime) !important;
  background: rgba(128,255,0,0.1) !important;
}

/* ===== BROWSER SURFACES ===== */
::selection {
  background: var(--lime);
  color: var(--dark);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--dark2);
}

::-webkit-scrollbar-thumb {
  background: rgba(128,255,0,0.35);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(128,255,0,0.6);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(128,255,0,0.35) var(--dark2);
}

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

/* ===== FOOTER RESPONSIVE ===== */
@media (max-width: 700px) {
  .site-footer {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .footer-home { grid-column: 1; grid-row: auto; }
  .footer-brand { grid-column: 1; grid-row: auto; }
  .footer-links { grid-column: 1; grid-row: auto; flex-direction: row; flex-wrap: wrap; gap: 0.25rem; }
  .footer-nav-link { min-height: 44px; }
  .footer-copy { grid-column: 1; grid-row: auto; }
}

/* ===== PREFERS REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .jitter-btn { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .badge-dot { animation: none; }
}

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