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

/* ===== 全局重置 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --c-green: #80ff00;
  --c-green2: #00ff00;
  --c-dark: #1f2617;
  --c-dark2: #141a0e;
  --c-dark3: #2a3320;
  --c-white: #f4f9e8;
  --c-muted: #8a9e72;
  --c-accent: #ff4de0;
  --font-main: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --nav-h: 100px;
}

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

body.dark-body {
  font-family: var(--font-main);
  background: var(--c-dark);
  color: var(--c-white);
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: var(--c-green);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

menu, ul, ol {
  list-style: none;
}

/* ===== Scroll margin for anchor nav ===== */
div[id] {
  scroll-margin-top: calc(var(--nav-h) + 8px);
}

/* ===== Site Wrapper ===== */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--c-dark2);
  border-bottom: 2px solid var(--c-green);
}

.header-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  gap: 16px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-text {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--c-green);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.logo-img {
  height: 40px;
  width: auto;
}

.header-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: center;
}

/* ===== 汉堡 / 全屏遮罩菜单 ===== */
.nav-details {
  position: relative;
}

.nav-details[open] > .nav-fullscreen {
  display: flex;
}

.hamburger-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  list-style: none;
  padding: 10px;
  border: 2px solid var(--c-green);
  background: transparent;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
}

.hamburger-btn::-webkit-details-marker { display: none; }

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

.nav-fullscreen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--c-dark2);
  border: 3px solid var(--c-green);
  overflow-y: auto;
  flex-direction: column;
  align-items: stretch;
}

.nav-fullscreen-inner {
  display: flex;
  flex-direction: column;
  padding: 40px 48px;
  min-height: 100%;
  gap: 32px;
}

.nav-close-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand-ghost {
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 2px var(--c-green);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  line-height: 1;
  user-select: none;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--c-white);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-dark3);
  transition: color 0.15s;
  min-height: 44px;
}

.nav-link:hover {
  color: var(--c-green);
  text-decoration: none;
}

.nav-num {
  font-family: var(--font-mono);
  font-size: 0.75em;
  color: var(--c-green);
  opacity: 0.7;
  min-width: 2.5ch;
}

.nav-footer-tag {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
}

.nav-tagline {
  font-size: 0.9rem;
  color: var(--c-muted);
}

/* ===== 内联导航行（桌面小导航） ===== */
.header-nav-row {
  border-top: 1px solid var(--c-dark3);
  padding: 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.header-nav-row::-webkit-scrollbar { display: none; }

.nav-menu-inline {
  display: flex;
  gap: 0;
  list-style: none;
  white-space: nowrap;
}

.inline-nav-link {
  display: inline-block;
  color: var(--c-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.inline-nav-link:hover {
  color: var(--c-green);
  background: var(--c-dark3);
  text-decoration: none;
}

/* ===== Stickers ===== */
.sticker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

.sticker-hot {
  background: var(--c-green);
  color: var(--c-dark);
}

.sticker-brand {
  background: var(--c-green);
  color: var(--c-dark);
  transform: rotate(-2deg);
  display: inline-block;
}

.sticker-outline {
  background: transparent;
  border: 2px solid var(--c-green);
  color: var(--c-green);
  transform: rotate(1.5deg);
  display: inline-block;
}

.sticker-new {
  background: var(--c-accent);
  color: #fff;
  transform: rotate(-3deg);
  display: inline-block;
}

.sticker-rotate1 {
  background: var(--c-green);
  color: var(--c-dark);
  transform: rotate(-8deg);
  display: inline-block;
  font-size: 0.8rem;
  padding: 5px 12px;
}

.sticker-rotate2 {
  background: var(--c-dark3);
  border: 2px solid var(--c-green);
  color: var(--c-green);
  transform: rotate(5deg);
  display: inline-block;
  font-size: 1.1rem;
  padding: 5px 14px;
}

/* ===== Hero ===== */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

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

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(140%) brightness(0.55);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(31,38,23,0.82) 0%,
    rgba(31,38,23,0.55) 50%,
    rgba(31,38,23,0.80) 100%
  );
}

.hero-bg-num {
  position: absolute;
  right: -0.05em;
  bottom: -0.15em;
  font-size: clamp(14rem, 35vw, 28rem);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 2px rgba(128,255,0,0.12);
  line-height: 1;
  z-index: 1;
  user-select: none;
  pointer-events: none;
  letter-spacing: -0.06em;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 clamp(24px, 6vw, 96px);
  max-width: 900px;
}

.hero-eyebrow {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.hero-h1 {
  font-size: clamp(2.2rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--c-white);
  margin-bottom: 20px;
}

.hero-h1 em {
  font-style: normal;
  color: var(--c-green);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--c-muted);
  max-width: 540px;
  line-height: 1.65;
  margin-bottom: 32px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--c-green);
  color: var(--c-dark);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
  min-height: 48px;
}
.hero-cta:hover {
  background: var(--c-green2);
  transform: translateY(-2px);
  text-decoration: none;
}

/* ===== Marquee ===== */
.marquee-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  background: var(--c-green);
  overflow: hidden;
  height: 36px;
  display: flex;
  align-items: center;
}

.marquee-track {
  display: flex;
  gap: 20px;
  white-space: nowrap;
  animation: marquee-scroll 18s linear infinite;
  will-change: transform;
}

.marquee-track span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--c-dark);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

/* ===== Main / Article / Section 三层结构 ===== */
.site-main {
  flex: 1;
  padding-top: var(--nav-h);
}

.main-article {
  display: flex;
  gap: 0;
  align-items: flex-start;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

/* ===== Aside 左侧 ===== */
.content-aside {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  width: 240px;
  flex-shrink: 0;
  padding: 32px 24px;
  border-right: 2px solid var(--c-dark3);
  min-height: 60vh;
  align-self: flex-start;
}

.aside-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.aside-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--c-green);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--c-dark3);
  padding-bottom: 8px;
}

.aside-toc {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
  counter-reset: none;
}

.aside-toc-link {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--c-muted);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  line-height: 1.4;
}
.aside-toc-link:hover {
  color: var(--c-green);
  background: var(--c-dark3);
  text-decoration: none;
}

.aside-num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--c-green);
  opacity: 0.6;
  min-width: 2ch;
  flex-shrink: 0;
}

.aside-sticker-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ===== Content Section ===== */
.content-section {
  flex: 1;
  min-width: 0;
  padding: 48px clamp(24px, 5vw, 72px);
}

.section-pretitle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--c-green);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 10px;
}

.section-hr {
  border: none;
  border-top: 2px solid var(--c-green);
  margin-bottom: 40px;
  opacity: 0.4;
}

/* ===== page.content 正文样式 ===== */
.page-content-body {
  line-height: 1.75;
  font-size: 1rem;
  color: var(--c-white);
}

.page-content-body h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--c-green);
  margin: 2.5em 0 0.3em;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-content-body h2 + hr,
.page-content-body h3 + hr {
  border: none;
  border-top: 1px solid rgba(128,255,0,0.3);
  margin-bottom: 1.2em;
}

.page-content-body h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  font-weight: 600;
  color: var(--c-white);
  margin: 2em 0 0.5em;
  letter-spacing: -0.01em;
}

.page-content-body p {
  margin-bottom: 1.2em;
  color: var(--c-white);
}

.page-content-body ul,
.page-content-body ol {
  padding-left: 1.4em;
  margin-bottom: 1.2em;
  list-style: disc;
}

.page-content-body ol {
  list-style: decimal;
}

.page-content-body li {
  margin-bottom: 0.5em;
  line-height: 1.65;
}

.page-content-body a {
  color: var(--c-green);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.page-content-body a:hover {
  color: var(--c-green2);
}

.page-content-body strong {
  color: var(--c-green);
  font-weight: 700;
}

.page-content-body blockquote {
  border-left: 4px solid var(--c-green);
  padding: 12px 20px;
  margin: 1.5em 0;
  background: var(--c-dark3);
  border-radius: 0 6px 6px 0;
  color: var(--c-muted);
  font-style: italic;
}

.page-content-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--c-dark3);
  color: var(--c-green);
  padding: 2px 6px;
  border-radius: 3px;
}

.page-content-body pre {
  background: var(--c-dark3);
  border: 1px solid var(--c-dark3);
  border-radius: 6px;
  padding: 16px 20px;
  overflow-x: auto;
  margin-bottom: 1.5em;
}

/* div[id] 块分隔（来自 page.content） */
.page-content-body div {
  border-bottom: 1px solid var(--c-dark3);
  padding-bottom: 2em;
  margin-bottom: 2em;
}

.page-content-body div:last-child {
  border-bottom: none;
}

/* ===== 卡片（如有子页卡片） ===== */
.card {
  background: var(--c-dark3);
  border-radius: 10px;
  border-bottom: 4px solid var(--c-green);
  padding: 24px;
  transition: transform 0.15s;
}
.card:hover {
  transform: translateY(-3px);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--c-dark2);
  border-top: 3px solid var(--c-green);
}

.footer-brand-section {
  padding: 48px clamp(24px, 6vw, 80px) 24px;
  border-bottom: 1px solid var(--c-dark3);
}

.footer-brand-giant {
  font-size: clamp(3rem, 12vw, 9rem);
  font-weight: 700;
  color: var(--c-green);
  letter-spacing: -0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--c-muted);
  margin-top: 10px;
}

.footer-meta-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px clamp(24px, 6vw, 80px);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--c-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-link {
  font-size: 0.8rem;
  color: var(--c-muted);
  text-decoration: none;
  transition: color 0.15s;
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 4px;
}
.footer-link:hover {
  color: var(--c-green);
  text-decoration: none;
}

.footer-sep {
  color: var(--c-dark3);
}

/* ===== 动效 / Jitter ===== */
@keyframes jitter {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(-1px, 1px) rotate(-0.5deg); }
  40% { transform: translate(1px, -1px) rotate(0.5deg); }
  60% { transform: translate(-1px, 0) rotate(-0.3deg); }
  80% { transform: translate(1px, 1px) rotate(0.2deg); }
}

.hero-h1 {
  animation: fadeSlideUp 0.7s ease both;
}
.hero-eyebrow {
  animation: fadeSlideUp 0.5s ease both;
}
.hero-sub {
  animation: fadeSlideUp 0.8s 0.1s ease both;
}
.hero-cta {
  animation: fadeSlideUp 0.8s 0.2s ease both;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stagger list items in fullscreen nav */
.nav-details[open] .nav-link {
  animation: fadeSlideUp 0.35s ease both;
}
.nav-details[open] .nav-menu li:nth-child(1) .nav-link { animation-delay: 0.05s; }
.nav-details[open] .nav-menu li:nth-child(2) .nav-link { animation-delay: 0.10s; }
.nav-details[open] .nav-menu li:nth-child(3) .nav-link { animation-delay: 0.15s; }
.nav-details[open] .nav-menu li:nth-child(4) .nav-link { animation-delay: 0.20s; }
.nav-details[open] .nav-menu li:nth-child(5) .nav-link { animation-delay: 0.25s; }
.nav-details[open] .nav-menu li:nth-child(6) .nav-link { animation-delay: 0.30s; }
.nav-details[open] .nav-menu li:nth-child(7) .nav-link { animation-delay: 0.35s; }

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  .marquee-track {
    animation: none;
  }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .content-aside {
    display: none;
  }
  .main-article {
    flex-direction: column;
  }
  .content-section {
    padding: 32px 24px;
  }
}

@media (max-width: 600px) {
  :root {
    --nav-h: 90px;
  }

  .header-brand-row {
    padding: 10px 16px;
  }

  .header-nav-row {
    padding: 0 12px;
  }

  .nav-fullscreen-inner {
    padding: 28px 24px;
  }

  .hero-content {
    padding: 0 20px;
  }

  .hero-bg-num {
    font-size: 55vw;
    right: -0.05em;
    bottom: 2rem;
  }

  .footer-meta-section {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-brand-giant {
    font-size: clamp(3rem, 20vw, 6rem);
  }
}

@media (max-width: 375px) {
  .hero-h1 {
    font-size: 1.9rem;
  }
  .nav-link {
    font-size: 1.4rem;
  }
}
