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

/* ===== 变量 ===== */
:root {
  --c-green: #87ff71;
  --c-amber: #ffce5c;
  --c-dark: #192617;
  --c-dark2: #1f2e1d;
  --c-dark3: #253322;
  --c-green-dim: #5dcc4a;
  --c-amber-dim: #e0a800;
  --c-text: #e8f5e5;
  --c-text-muted: #9bbf95;
  --c-border: #87ff71;
  --c-card-bg: #1e2f1b;
  --radius: 10px;
  --nav-h: 68px;
  --font-main: 'Figtree', 'Noto Sans', system-ui, sans-serif;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--c-dark);
  color: var(--c-text);
  line-height: 1.65;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + 16px);
}
a { color: var(--c-green); text-decoration: none; }
a:hover { color: var(--c-amber); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ===== 页面外框 ===== */
.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== Hero ===== */
.hero-block {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: center;
  padding: 48px 16px 40px;
  overflow: hidden;
  background: var(--c-dark2);
  border-bottom: 3px solid var(--c-green);
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 2;
}
.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-amber);
  margin-bottom: 12px;
  border-left: 4px solid var(--c-amber);
  padding-left: 10px;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: var(--c-green);
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--c-text-muted);
  max-width: 600px;
  margin-bottom: 24px;
}
.hero-tags { display: flex; gap: 8px; flex-wrap: wrap; }

/* Memphis 几何装饰 */
.hero-geo {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}
.geo-circle {
  width: 180px; height: 180px;
  border-radius: 50%;
  border: 6px solid var(--c-amber);
  opacity: 0.18;
  right: 5%;
  top: -40px;
  animation: spin-slow 30s linear infinite;
}
.geo-triangle {
  width: 0; height: 0;
  border-left: 70px solid transparent;
  border-right: 70px solid transparent;
  border-bottom: 120px solid var(--c-green);
  opacity: 0.08;
  right: 22%;
  bottom: 10px;
  transform: rotate(15deg);
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== 分类 Hero ===== */
.cat-hero {
  position: relative;
  padding: 40px 16px 32px;
  background: var(--c-dark2);
  border-bottom: 3px solid var(--c-green);
  overflow: hidden;
}
.cat-hero-deco {
  position: absolute;
  right: 30px; top: 10px;
  width: 100px; height: 100px;
  border: 5px dashed var(--c-amber);
  border-radius: 50%;
  opacity: 0.15;
  transform: rotate(20deg);
}
.cat-hero-inner { max-width: 1200px; margin: 0 auto; position: relative; z-index: 2; }
.cat-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--c-green);
  margin: 10px 0 8px;
}
.cat-hero-desc { color: var(--c-text-muted); font-size: 1rem; max-width: 560px; }

/* tag hero */
.tag-hero {
  padding: 36px 16px 28px;
  background: var(--c-dark2);
  border-bottom: 3px solid var(--c-amber);
  max-width: 100%;
}
.tag-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  color: var(--c-amber);
  font-weight: 700;
  margin: 10px 0 8px;
}
.tag-hero p { color: var(--c-text-muted); margin-bottom: 16px; }

/* about hero */
.about-hero {
  position: relative;
  padding: 44px 16px 36px;
  background: var(--c-dark2);
  border-bottom: 3px solid var(--c-green);
  overflow: hidden;
}
.about-hero-deco {
  position: absolute;
  pointer-events: none;
  opacity: 0.12;
}
.about-geo-1 {
  width: 140px; height: 140px;
  background: var(--c-green);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  right: 8%; top: 10px;
  transform: rotate(-10deg);
}
.about-geo-2 {
  width: 90px; height: 90px;
  border: 5px solid var(--c-amber);
  border-radius: 50%;
  right: 20%; bottom: -20px;
}
.about-hero-inner { max-width: 1200px; margin: 0 auto; position: relative; z-index: 2; }
.about-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--c-green);
  margin: 10px 0;
}

/* ===== 主布局 main ===== */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

/* ===== div / section ===== */
div { min-width: 0; }
section { margin-bottom: 36px; }

/* ===== Prose ===== */
.prose { font-size: 1rem; line-height: 1.72; color: var(--c-text); }
.prose h2, .prose h3 { color: var(--c-green); margin: 1.5em 0 0.6em; font-weight: 700; }
.prose h2 { font-size: 1.3rem; border-left: 4px solid var(--c-green); padding-left: 10px; }
.prose h3 { font-size: 1.1rem; }
.prose p { margin-bottom: 1em; }
.prose ul, .prose ol { margin: 0.8em 0 1em 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.4em; }
.prose a { color: var(--c-amber); text-decoration: underline; }
.prose a:hover { color: var(--c-green); }
.prose strong { color: var(--c-amber); }
.prose blockquote {
  border-left: 4px solid var(--c-amber);
  padding: 8px 16px;
  margin: 1em 0;
  background: var(--c-dark3);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--c-text-muted);
}
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 0.95rem; }
.prose th, .prose td { border: 1px solid var(--c-dark3); padding: 8px 12px; text-align: left; }
.prose th { background: var(--c-dark3); color: var(--c-green); }

/* ===== section titles ===== */
.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-amber);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title span { border-bottom: 3px solid var(--c-green); padding-bottom: 2px; }
.section-title::before {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  background: var(--c-amber);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  flex-shrink: 0;
}

/* ===== 分类卡片网格 (home) ===== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.cat-card {
  border: 2px solid var(--c-green);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--c-card-bg);
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.cat-card::before {
  content: '';
  position: absolute;
  top: -18px; right: -18px;
  width: 50px; height: 50px;
  background: var(--c-amber);
  border-radius: 50%;
  opacity: 0.12;
}
.cat-card:hover { border-color: var(--c-amber); transform: translateY(-2px); }
.cat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}
.cat-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-green);
  margin: 0;
}
.cat-card-title span { display: block; }
.cat-link-btn {
  flex-shrink: 0;
  background: var(--c-green);
  color: var(--c-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  transition: background 0.2s;
}
.cat-link-btn:hover { background: var(--c-amber); text-decoration: none; color: var(--c-dark); }
.cat-desc { font-size: 0.88rem; color: var(--c-text-muted); margin-bottom: 14px; line-height: 1.5; }
.cat-children { display: flex; flex-wrap: wrap; gap: 6px; }
.child-link {
  font-size: 0.78rem;
  padding: 3px 10px;
  border: 1px solid var(--c-dark3);
  border-radius: 6px;
  color: var(--c-text-muted);
  transition: border-color 0.2s, color 0.2s;
}
.child-link:hover { border-color: var(--c-green); color: var(--c-green); text-decoration: none; }

/* ===== 入口列表 (category / tag) ===== */
.entry-list {
  display: grid;
  gap: 0;
  margin-bottom: 24px;
}
.entry-list dt {
  margin-top: 14px;
}
.entry-list dt a {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-green);
  border-bottom: 2px solid var(--c-green);
  padding-bottom: 2px;
  transition: color 0.2s;
}
.entry-list dt a:hover { color: var(--c-amber); border-color: var(--c-amber); text-decoration: none; }
.entry-list dd {
  font-size: 0.88rem;
  color: var(--c-text-muted);
  padding: 4px 0 10px 16px;
  border-bottom: 1px dashed var(--c-dark3);
}

/* ===== entry grid (tag page) ===== */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.entry-card {
  border: 2px solid var(--c-dark3);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--c-card-bg);
  transition: border-color 0.2s;
}
.entry-card:hover { border-color: var(--c-green); }
.entry-card-cat { font-size: 0.72rem; color: var(--c-amber); margin-bottom: 6px; font-weight: 600; }
.entry-card-cat a { color: var(--c-amber); }
.entry-card-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
.entry-card-title a { color: var(--c-text); }
.entry-card-title a:hover { color: var(--c-green); text-decoration: none; }
.entry-card-desc { font-size: 0.82rem; color: var(--c-text-muted); line-height: 1.5; }

/* ===== entry page ===== */
.entry-article { min-width: 0; }
.entry-header-section { margin-bottom: 24px; }
.entry-breadcrumb {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.entry-breadcrumb a { color: var(--c-text-muted); }
.entry-breadcrumb a:hover { color: var(--c-green); }
.bc-sep { opacity: 0.5; }
.entry-title {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 700;
  color: var(--c-green);
  margin-bottom: 10px;
  line-height: 1.2;
}
.entry-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.related-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.related-list li a {
  display: block;
  padding: 10px 14px;
  border: 1px solid var(--c-dark3);
  border-radius: 8px;
  color: var(--c-text);
  font-size: 0.92rem;
  transition: border-color 0.2s, color 0.2s;
}
.related-list li a:hover { border-color: var(--c-green); color: var(--c-green); text-decoration: none; }

/* ===== about page ===== */
.about-cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.about-cat-list li a {
  display: block;
  padding: 10px 14px;
  border: 2px solid var(--c-dark3);
  border-radius: var(--radius);
  color: var(--c-text);
  font-size: 0.92rem;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}
.about-cat-list li a:hover { border-color: var(--c-green); background: var(--c-dark3); text-decoration: none; }
.about-cta-text { color: var(--c-text-muted); font-size: 0.95rem; margin-bottom: 16px; }

/* ===== privacy page ===== */
.privacy-badge {
  display: inline-block;
  background: var(--c-amber);
  color: var(--c-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.privacy-footer-section { margin-top: 32px; }
.privacy-nav-links { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

/* ===== buttons ===== */
.btn-primary {
  display: inline-block;
  background: var(--c-green);
  color: var(--c-dark);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 22px;
  border-radius: 24px;
  transition: background 0.2s, transform 0.15s;
  cursor: pointer;
}
.btn-primary:hover { background: var(--c-amber); text-decoration: none; color: var(--c-dark); transform: translateY(-1px); }
.btn-outline {
  display: inline-block;
  border: 2px solid var(--c-green);
  color: var(--c-green);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 9px 20px;
  border-radius: 24px;
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover { background: var(--c-green); color: var(--c-dark); text-decoration: none; }

/* ===== tag pill ===== */
.tag-pill {
  display: inline-block;
  border: 2px solid var(--c-amber);
  color: var(--c-amber);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  transition: background 0.2s, color 0.2s;
  letter-spacing: 0.04em;
}
.tag-pill:hover { background: var(--c-amber); color: var(--c-dark); text-decoration: none; }
.tags-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ===== meta date ===== */
.meta-date {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  margin-bottom: 16px;
}

/* ===== 侧边栏 aside (content sidebar) ===== */
.sidebar {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sidebar nav ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar nav ul li a {
  display: block;
  padding: 9px 14px;
  border: 1px solid var(--c-dark3);
  border-radius: 8px;
  color: var(--c-text);
  font-size: 0.88rem;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.sidebar nav ul li a:hover { border-color: var(--c-green); color: var(--c-green); text-decoration: none; background: var(--c-dark3); }
.aside-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-amber);
  margin-bottom: 10px;
}
.aside-title span { border-bottom: 2px solid var(--c-amber); padding-bottom: 2px; }
.aside-notice {
  border: 2px dashed var(--c-dark3);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--c-dark2);
}
.aside-notice h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-green);
  margin-bottom: 8px;
}
.aside-notice h3 span { display: inline; }
.aside-notice p { font-size: 0.82rem; color: var(--c-text-muted); margin-bottom: 12px; line-height: 1.55; }
.aside-deco.deco-dot-grid {
  height: 60px;
  background-image: radial-gradient(circle, var(--c-green) 1px, transparent 1px);
  background-size: 12px 12px;
  opacity: 0.15;
  border-radius: var(--radius);
}

/* ===== 底部固定导航 aside ===== */
.bottom-nav-aside {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--c-dark);
  border-top: 2px solid var(--c-green);
  padding: 10px 12px;
  backdrop-filter: blur(8px);
}
.bottom-nav-aside nav { max-width: 1200px; margin: 0 auto; }
.bottom-pill-group {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.bottom-pill-group::-webkit-scrollbar { display: none; }
.bottom-pill-group li { flex-shrink: 0; }
.pill-btn {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border: 2px solid var(--c-dark3);
  border-radius: 24px;
  color: var(--c-text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  background: var(--c-dark2);
}
.pill-btn:hover, .pill-btn.active {
  border-color: var(--c-green);
  color: var(--c-dark);
  background: var(--c-green);
  text-decoration: none;
}

/* ===== footer ===== */
footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 16px;
  border-top: 1px solid var(--c-dark3);
  text-align: center;
}
footer p { margin-bottom: 6px; }
footer small { font-size: 0.78rem; color: var(--c-text-muted); line-height: 1.5; }
footer small a { color: var(--c-text-muted); text-decoration: underline; }
footer small a:hover { color: var(--c-green); }

/* ===== Scroll reveal ===== */
@media (prefers-reduced-motion: no-preference) {
  .cat-card, .entry-card, .entry-list dt, .related-list li {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.45s ease, transform 0.45s ease, border-color 0.2s;
  }
  .cat-card.revealed, .entry-card.revealed, .entry-list dt.revealed, .related-list li.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Memphis pattern overlays ===== */
.cat-grid-section { position: relative; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  main {
    grid-template-columns: 1fr;
    padding: 20px 12px;
    gap: 20px;
  }
  .sidebar {
    position: static;
    order: 2;
  }
  .hero-block { min-height: auto; padding: 36px 16px 28px; }
  .hero-title { font-size: 1.8rem; }
  .cat-grid { grid-template-columns: 1fr; }
  .entry-grid { grid-template-columns: 1fr; }
  .about-cat-list { grid-template-columns: 1fr 1fr; }
  .bottom-pill-group { gap: 5px; }
  .pill-btn { padding: 0 12px; font-size: 0.78rem; }
  .page-wrapper { padding: 0 12px; }
  main { max-width: 100%; }
}

@media (max-width: 480px) {
  html { font-size: 16px; }
  .hero-title { font-size: 1.5rem; }
  .about-cat-list { grid-template-columns: 1fr; }
  .privacy-nav-links { flex-direction: column; }
  .cat-card-header { flex-direction: column; align-items: flex-start; }
}

/* ===== 无障碍 / 焦点 ===== */
a:focus-visible {
  outline: 3px solid var(--c-amber);
  outline-offset: 3px;
  border-radius: 4px;
}
