@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

/* ── 变量 ── */
:root {
  --c-green: #69ff69;
  --c-cyan: #00ffff;
  --c-dark: #172617;
  --c-dark2: #0f1a0f;
  --c-dark3: #1e321e;
  --c-mid: #2a4a2a;
  --c-chrome: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 30%, #a0a0a0 60%, #d4d4d4 100%);
  --c-neon-glow: 0 0 8px var(--c-green), 0 0 20px var(--c-green), 0 0 40px rgba(105,255,105,0.4);
  --c-cyan-glow: 0 0 8px var(--c-cyan), 0 0 20px var(--c-cyan), 0 0 40px rgba(0,255,255,0.4);
  --font-mono: 'Share Tech Mono', 'Fira Code', 'Courier New', monospace;
  --font-code: 'Fira Code', 'Share Tech Mono', monospace;
  --nav-h: 64px;
  --search-h: 44px;
  --bar-total: calc(var(--nav-h) + var(--search-h));
  --radius: 0px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── 基础重置 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-bottom: calc(var(--bar-total) + 20px);
  font-size: 16px;
  background: var(--c-dark2);
  color: #d4f5d4;
}

body.y2k-body {
  font-family: var(--font-mono);
  background: var(--c-dark);
  color: #c8e8c8;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: calc(var(--bar-total) + 16px);
}

/* ── 扫描线叠层 ── */
.scanline-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
}

/* ── 屏幕阅读器 ── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ── 全屏遮罩菜单 ── */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 20, 10, 0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(-100%);
  transition: transform 0.45s cubic-bezier(0.77, 0, 0.18, 1);
  border-bottom: 2px solid var(--c-green);
}
.nav-overlay.is-open {
  transform: translateY(0);
}
.overlay-close {
  position: absolute;
  top: 24px; right: 28px;
  background: none;
  border: 1px solid var(--c-green);
  color: var(--c-green);
  font-size: 1.5rem;
  width: 44px; height: 44px;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: box-shadow var(--transition), background var(--transition);
}
.overlay-close:hover {
  background: var(--c-green);
  color: var(--c-dark);
  box-shadow: var(--c-neon-glow);
}
.overlay-nav-list {
  list-style: none;
  text-align: center;
}
.overlay-nav-list li {
  margin: 12px 0;
}
.overlay-link {
  font-family: var(--font-mono);
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: #c8e8c8;
  text-decoration: none;
  letter-spacing: 0.12em;
  display: inline-block;
  padding: 8px 20px;
  transition: color var(--transition), text-shadow var(--transition);
}
.overlay-link:hover {
  color: var(--c-green);
  text-shadow: var(--c-neon-glow);
}
.overlay-brand {
  position: absolute;
  bottom: 32px;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--c-mid);
  text-transform: uppercase;
}

/* ── Hero ── */
.hero-section {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 20% 60%, rgba(105,255,105,0.07) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 30%, rgba(0,255,255,0.07) 0%, transparent 60%),
              var(--c-dark);
  border-bottom: 1px solid var(--c-mid);
}

.hero-collage {
  position: relative;
  height: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-img-wrap {
  position: absolute;
  overflow: hidden;
}
.hero-img-wrap-0 {
  width: 55%;
  top: 12%;
  left: 8%;
  border: 1px solid rgba(105,255,105,0.3);
  box-shadow: 0 0 30px rgba(105,255,105,0.15), 0 8px 40px rgba(0,0,0,0.6);
  transform: rotate(-2.5deg);
  z-index: 2;
}
.hero-img-wrap-1 {
  width: 50%;
  bottom: 8%;
  right: 4%;
  border: 1px solid rgba(0,255,255,0.3);
  box-shadow: 0 0 30px rgba(0,255,255,0.15), 0 8px 40px rgba(0,0,0,0.6);
  transform: rotate(2deg);
  z-index: 3;
}
.hero-img {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(1.1) contrast(1.05);
}
.hero-badge {
  position: absolute;
  bottom: -1px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  padding: 4px 12px;
  text-transform: uppercase;
}
.badge-neon {
  right: 0;
  background: var(--c-green);
  color: var(--c-dark);
}
.badge-chrome {
  left: 0;
  background: linear-gradient(90deg, #c0c0c0, #e8e8e8, #a0a0a0);
  color: #111;
}
.hero-sparkle {
  position: absolute;
  font-size: 1.5rem;
  pointer-events: none;
  animation: sparkle-pulse 2.4s ease-in-out infinite alternate;
}
.sp1 { top: 18%; right: 15%; color: var(--c-green); animation-delay: 0s; }
.sp2 { bottom: 22%; left: 12%; color: var(--c-cyan); animation-delay: 0.8s; }
.sp3 { top: 50%; left: 42%; color: #fff; font-size: 1rem; animation-delay: 1.6s; }

@keyframes sparkle-pulse {
  from { opacity: 0.3; transform: scale(0.8) rotate(-10deg); }
  to   { opacity: 1;   transform: scale(1.2) rotate(10deg); }
}

.hero-text {
  padding: clamp(2rem, 5vw, 5rem) clamp(1.5rem, 4vw, 4rem);
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  z-index: 4;
}
.hero-eyebrow { margin-bottom: 1.2rem; }
.tag-pill {
  display: inline-block;
  border: 1px solid var(--c-cyan);
  color: var(--c-cyan);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  padding: 4px 14px;
  background: rgba(0,255,255,0.06);
  text-shadow: 0 0 6px var(--c-cyan);
}
.hero-h1 {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--c-green);
  text-shadow: var(--c-neon-glow);
  letter-spacing: 0.04em;
  margin-bottom: 1.2rem;
  max-width: 14ch;
}
.hero-sub {
  font-size: clamp(0.85rem, 1.5vw, 1.05rem);
  color: #9dbf9d;
  max-width: 38ch;
  margin-bottom: 2rem;
  line-height: 1.7;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--c-green), #33cc33);
  color: var(--c-dark);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-decoration: none;
  font-weight: 700;
  border-radius: var(--radius);
  transition: box-shadow var(--transition), transform var(--transition), filter var(--transition);
  min-height: 44px;
}
.hero-cta:hover {
  box-shadow: var(--c-neon-glow);
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* ── 主体布局 ── */
.site-main {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}
.main-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}

/* ── 侧边栏 ── */
.site-aside {
  position: sticky;
  top: 2rem;
}
.aside-nav-list {
  list-style: none;
}
.aside-nav-list li {
  border-left: 2px solid var(--c-mid);
  margin-bottom: 2px;
  transition: border-color var(--transition);
}
.aside-nav-list li:hover {
  border-color: var(--c-green);
}
.aside-nav-list a {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: #8ab88a;
  text-decoration: none;
  min-height: 40px;
  line-height: 1.4;
  transition: color var(--transition), background var(--transition);
}
.aside-nav-list a:hover {
  color: var(--c-green);
  background: rgba(105,255,105,0.05);
  text-shadow: 0 0 6px var(--c-green);
}
.aside-deco {
  margin-top: 2rem;
  display: flex;
  gap: 8px;
  padding-left: 14px;
}
.deco-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-mid);
  animation: dot-pulse 2s ease-in-out infinite alternate;
}
.deco-dot:nth-child(2) { animation-delay: 0.6s; background: rgba(105,255,105,0.3); }
.deco-dot:nth-child(3) { animation-delay: 1.2s; background: rgba(0,255,255,0.3); }
@keyframes dot-pulse {
  from { opacity: 0.4; transform: scale(0.8); }
  to   { opacity: 1;   transform: scale(1.2); }
}

/* ── 正文容器 main > article.wrap > div > section ── */
.wrap {
  min-width: 0;
}
.content-section {
  margin-bottom: 3rem;
}
.content-article {
  /* section 直接子元素 */
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--c-cyan);
  text-shadow: 0 0 6px var(--c-cyan);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.content-heading {
  font-family: var(--font-mono);
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  color: var(--c-green);
  text-shadow: 0 0 10px rgba(105,255,105,0.3);
  letter-spacing: 0.06em;
  margin-bottom: 2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--c-mid);
}

/* ── 正文内容样式 ── */
.page-content {
  font-size: 1rem;
  line-height: 1.8;
  color: #b8d4b8;
}
.page-content h2 {
  font-family: var(--font-mono);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: var(--c-green);
  margin: 2.5rem 0 1rem;
  padding-left: 12px;
  border-left: 3px solid var(--c-green);
  text-shadow: 0 0 8px rgba(105,255,105,0.4);
  letter-spacing: 0.05em;
}
.page-content h3 {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: var(--c-cyan);
  margin: 2rem 0 0.8rem;
  letter-spacing: 0.04em;
  text-shadow: 0 0 6px rgba(0,255,255,0.3);
}
.page-content p {
  margin-bottom: 1.2rem;
}
.page-content a {
  color: var(--c-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition), text-shadow var(--transition);
}
.page-content a:hover {
  color: var(--c-green);
  text-shadow: 0 0 6px var(--c-green);
}
.page-content ul,
.page-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}
.page-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}
.page-content blockquote {
  border-left: 3px solid var(--c-cyan);
  padding: 0.8rem 1.2rem;
  margin: 1.5rem 0;
  background: rgba(0,255,255,0.04);
  color: #9dbfbf;
  font-style: italic;
}
.page-content strong {
  color: var(--c-green);
  font-weight: 600;
}
.page-content em {
  color: var(--c-cyan);
}
.page-content div {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--c-mid);
  scroll-margin-bottom: calc(var(--bar-total) + 24px);
}
.page-content div:last-child {
  border-bottom: none;
}
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.page-content th {
  background: var(--c-dark3);
  color: var(--c-green);
  padding: 10px 12px;
  text-align: left;
  border: 1px solid var(--c-mid);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}
.page-content td {
  padding: 9px 12px;
  border: 1px solid var(--c-mid);
  color: #b0ccb0;
}
.page-content tr:hover td {
  background: rgba(105,255,105,0.03);
}

.page-content .card,
.card {
  background: var(--c-dark3);
  border: 1px solid var(--c-mid);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: 0 6px 30px rgba(105,255,105,0.12);
  border-color: rgba(105,255,105,0.3);
  transform: translateY(-2px);
}

/* ── 页脚 ── */
.site-footer {
  background: var(--c-dark2);
  border-top: 1px solid var(--c-mid);
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}
.footer-cta {
  margin-bottom: 1.2rem;
}
.footer-cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  background: linear-gradient(135deg, rgba(105,255,105,0.1), rgba(0,255,255,0.1));
  border: 1px solid var(--c-green);
  color: var(--c-green);
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-decoration: none;
  transition: background var(--transition), box-shadow var(--transition);
  min-height: 44px;
}
.footer-cta-link:hover {
  background: linear-gradient(135deg, rgba(105,255,105,0.2), rgba(0,255,255,0.15));
  box-shadow: var(--c-neon-glow);
}
.footer-copy {
  display: block;
  font-size: 0.75rem;
  color: var(--c-mid);
  letter-spacing: 0.12em;
}

/* ── 底部固定导航条 ── */
.bottom-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 800;
  background: rgba(15, 26, 15, 0.97);
  border-top: 1px solid var(--c-green);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -4px 30px rgba(105,255,105,0.1);
}

/* 导航行 */
.bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 1rem;
  gap: 0.5rem;
}
.bottom-nav-left,
.bottom-nav-right {
  list-style: none;
  display: flex;
  gap: 2px;
  flex: 1;
}
.bottom-nav-right {
  justify-content: flex-end;
}
.bottom-nav-left li a,
.bottom-nav-right li a {
  display: flex;
  align-items: center;
  padding: 10px 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: #7aa87a;
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
  transition: color var(--transition), text-shadow var(--transition);
}
.bottom-nav-left li a:hover,
.bottom-nav-right li a:hover {
  color: var(--c-green);
  text-shadow: 0 0 6px var(--c-green);
}
.bottom-brand {
  flex-shrink: 0;
  padding: 0 12px;
}
.brand-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--c-green);
  text-decoration: none;
  font-weight: 700;
  text-shadow: var(--c-neon-glow);
  display: flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
}

/* 搜索行 */
.bottom-search {
  display: flex;
  align-items: center;
  height: var(--search-h);
  padding: 0 0.75rem;
  border-top: 1px solid var(--c-dark3);
  gap: 0.5rem;
}
.search-form {
  display: flex;
  align-items: center;
  flex: 1;
}
.search-input {
  flex: 1;
  background: var(--c-dark3);
  border: 1px solid var(--c-mid);
  border-right: none;
  color: #c8e8c8;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0 12px;
  outline: none;
  height: 40px;
  transition: border-color var(--transition);
}
.search-input::placeholder { color: #4a6a4a; }
.search-input:focus {
  border-color: var(--c-green);
  box-shadow: inset 0 0 6px rgba(105,255,105,0.1);
}
.search-btn {
  background: var(--c-mid);
  border: 1px solid var(--c-mid);
  color: var(--c-green);
  height: 40px;
  width: 44px;
  min-width: 44px;
  font-size: 1.1rem;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: background var(--transition), color var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.search-btn:hover {
  background: var(--c-green);
  color: var(--c-dark);
}

/* 汉堡按钮 */
.hamburger-btn {
  background: none;
  border: 1px solid var(--c-mid);
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  align-items: center;
  transition: border-color var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
}
.hamburger-btn:hover {
  border-color: var(--c-green);
  box-shadow: 0 0 8px rgba(105,255,105,0.3);
}
.ham-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--c-green);
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger-btn.is-open .ham-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.is-open .ham-line:nth-child(2) { opacity: 0; }
.hamburger-btn.is-open .ham-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── 图片全局 ── */
img { max-width: 100%; height: auto; display: block; }

/* ── 选区样式 ── */
::selection {
  background: var(--c-green);
  color: var(--c-dark);
}

/* ── 滚动条 ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--c-dark2); }
::-webkit-scrollbar-thumb { background: var(--c-mid); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(105,255,105,0.4); }

/* ── 响应式 ── */
@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .site-aside {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
  .aside-nav-list {
    display: flex;
    flex-direction: row;
    gap: 4px;
    flex-wrap: wrap;
  }
  .aside-nav-list li {
    border-left: none;
    border-bottom: 2px solid var(--c-mid);
  }
  .aside-nav-list a {
    font-size: 0.72rem;
    padding: 8px 10px;
    white-space: nowrap;
  }
  .aside-deco { display: none; }
  .hero-section {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .hero-collage {
    min-height: 45vh;
    order: -1;
  }
  .hero-text {
    text-align: right;
    align-items: flex-end;
    padding: 2rem 1.5rem;
  }
}

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

  .hero-section {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }
  .hero-collage {
    min-height: 40vh;
  }
  .hero-img-wrap-0 {
    width: 65%;
    top: 8%;
    left: 4%;
  }
  .hero-img-wrap-1 {
    width: 58%;
    bottom: 5%;
    right: 2%;
  }
  .hero-h1 { font-size: 1.8rem; }
  .hero-sub { font-size: 0.85rem; }
  .hero-cta {
    padding: 12px 24px;
    font-size: 0.82rem;
  }

  .bottom-nav-left,
  .bottom-nav-right {
    display: none;
  }
  .bottom-nav {
    justify-content: space-between;
    padding: 0 1rem;
  }
  .bottom-brand {
    flex: 1;
    text-align: center;
    justify-content: center;
  }

  .site-main {
    padding: 2rem 1rem 1.5rem;
  }
  .page-content h2 { font-size: 1.1rem; }
  .page-content h3 { font-size: 1rem; }
  .page-content { font-size: 1rem; }

  .footer-cta-link {
    padding: 14px 24px;
    font-size: 0.88rem;
  }
}

/* ── 无障碍：减少动效 ── */
@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; }
}

/* ── 焦点可见性 ── */
:focus-visible {
  outline: 2px solid var(--c-green);
  outline-offset: 2px;
}
