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

/* ===========================
   CSS 变量 & 重置
   =========================== */
:root {
  --green: #87ff71;
  --blue: #01cdfe;
  --dark: #192617;
  --dark-2: #1e2f1b;
  --dark-3: #243320;
  --dark-4: #0d1a0b;
  --purple: #b967ff;
  --pink: #ff71ce;
  --text: #d4f5cd;
  --text-muted: #7aab70;
  --border: rgba(135, 255, 113, 0.25);
  --border-blue: rgba(1, 205, 254, 0.3);
  --glow-green: 0 0 8px #87ff71, 0 0 20px rgba(135, 255, 113, 0.4);
  --glow-blue: 0 0 8px #01cdfe, 0 0 20px rgba(1, 205, 254, 0.4);
  --aside-w: 260px;
  --font: 'Noto Sans Hebrew', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --radius: 0;
  --transition: 0.2s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.75;
  background: var(--dark);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ===========================
   布局骨架
   =========================== */
.site-layout {
  display: flex;
  min-height: 100vh;
}

.site-body {
  flex: 1;
  margin-left: var(--aside-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1;
}

/* ===========================
   侧边栏 aside > nav > ul > li > a
   =========================== */
.site-aside {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--aside-w);
  height: 100vh;
  background: var(--dark-4);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
}

.aside-top {
  background: linear-gradient(90deg, var(--green), var(--blue));
  padding: 6px 12px;
  text-align: center;
}

.aside-announcement {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--dark-4);
  letter-spacing: 0.1em;
}

.aside-brand {
  padding: 20px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--green);
}

.brand-link:hover {
  color: var(--blue);
}

.brand-icon {
  font-size: 1.4rem;
  text-shadow: var(--glow-green);
}

.brand-mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-name {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-shadow: var(--glow-green);
}

.aside-nav {
  flex: 1;
  padding: 12px 0;
}

.aside-nav ul {
  list-style: none;
}

.aside-nav li {
  border-bottom: 1px solid rgba(135, 255, 113, 0.08);
}

.aside-nav li a {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition), background var(--transition), border-left var(--transition);
  border-left: 3px solid transparent;
  min-height: 44px;
}

.aside-nav li a:hover,
.aside-nav li a[aria-current="page"] {
  color: var(--green);
  background: rgba(135, 255, 113, 0.06);
  border-left-color: var(--green);
  text-shadow: var(--glow-green);
}

/* ===========================
   主内容区 wrap
   =========================== */
.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* ===========================
   Glitch 文字效果
   =========================== */
.glitch-text {
  position: relative;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 0 60% 0);
}

.glitch-text::before {
  color: var(--blue);
  transform: translateX(-2px);
  animation: glitch-a 3.5s infinite steps(1);
  opacity: 0.7;
}

.glitch-text::after {
  color: var(--pink);
  transform: translateX(2px);
  animation: glitch-b 4s infinite steps(1);
  opacity: 0.6;
}

@keyframes glitch-a {
  0%, 90%, 100% { clip-path: inset(100% 0 0 0); transform: translateX(0); }
  92% { clip-path: inset(10% 0 70% 0); transform: translateX(-3px); }
  94% { clip-path: inset(55% 0 20% 0); transform: translateX(3px); }
  96% { clip-path: inset(80% 0 5% 0); transform: translateX(-2px); }
}

@keyframes glitch-b {
  0%, 88%, 100% { clip-path: inset(100% 0 0 0); transform: translateX(0); }
  90% { clip-path: inset(30% 0 50% 0); transform: translateX(3px); }
  92% { clip-path: inset(65% 0 15% 0); transform: translateX(-3px); }
  95% { clip-path: inset(5% 0 85% 0); transform: translateX(2px); }
}

/* ===========================
   页面标题区
   =========================== */
.page-h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--green);
  text-shadow: var(--glow-green);
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.pub-date, .mod-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 300;
  letter-spacing: 0.05em;
}

.pub-date::before { content: '◆ '; color: var(--green); }
.mod-date::before { content: '◇ '; color: var(--blue); }

/* ===========================
   正文内容
   =========================== */
.page-content {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
}

.page-content h2 {
  font-size: 1.3rem;
  color: var(--blue);
  text-shadow: var(--glow-blue);
  margin: 2em 0 0.75em;
  border-left: 3px solid var(--blue);
  padding-left: 12px;
}

.page-content h3 {
  font-size: 1.1rem;
  color: var(--green);
  margin: 1.5em 0 0.5em;
}

.page-content p {
  margin-bottom: 1.2em;
}

.page-content a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition), text-shadow var(--transition);
}

.page-content a:hover {
  color: var(--green);
  text-shadow: var(--glow-green);
}

.page-content ul, .page-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.2em;
}

.page-content li {
  margin-bottom: 0.4em;
}

.page-content blockquote {
  border-left: 2px solid var(--purple);
  padding-left: 16px;
  margin: 1.5em 0;
  color: var(--text-muted);
  font-style: italic;
}

.page-content code {
  font-family: monospace;
  background: rgba(135, 255, 113, 0.1);
  color: var(--green);
  padding: 1px 5px;
  font-size: 0.9em;
}

/* ===========================
   Section 标题
   =========================== */
.section-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-heading span {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid var(--green);
  letter-spacing: 0.1em;
  text-transform: none;
  text-shadow: var(--glow-green);
}

.section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--green), transparent);
  opacity: 0.4;
}

/* ===========================
   Hero 区（首页）
   =========================== */
.hero-section {
  position: relative;
}

.hero-article {
  position: relative;
}

.hero-inner {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 60%, var(--dark) 100%),
    linear-gradient(180deg, rgba(25, 38, 23, 0.6) 0%, transparent 40%),
    repeating-linear-gradient(
      90deg,
      rgba(135, 255, 113, 0.07) 0px,
      rgba(135, 255, 113, 0.07) 1px,
      transparent 1px,
      transparent 60px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(1, 205, 254, 0.05) 0px,
      rgba(1, 205, 254, 0.05) 1px,
      transparent 1px,
      transparent 60px
    );
  z-index: 1;
}

.hero-img {
  position: absolute;
  width: 42%;
  height: 75%;
  object-fit: cover;
  filter: saturate(1.3) hue-rotate(10deg);
}

.hero-img-1 {
  top: 8%;
  left: 5%;
  border: 1px solid var(--border);
  transform: rotate(-2deg);
  z-index: 0;
}

.hero-img-2 {
  bottom: 8%;
  right: 5%;
  border: 1px solid var(--border-blue);
  transform: rotate(1.5deg);
  z-index: 0;
}

.hero-badge {
  position: absolute;
  z-index: 3;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 5px 12px;
  pointer-events: none;
}

.hero-badge-1 {
  top: 20%;
  right: 12%;
  background: var(--green);
  color: var(--dark-4);
}

.hero-badge-2 {
  bottom: 22%;
  left: 12%;
  background: var(--blue);
  color: var(--dark-4);
}

.hero-copy {
  position: relative;
  z-index: 4;
  text-align: center;
  padding: 24px 20px;
  max-width: 580px;
  background: rgba(13, 26, 11, 0.72);
  border: 1px solid var(--border);
  backdrop-filter: blur(4px);
}

.hero-h1 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--green);
  text-shadow: var(--glow-green);
  line-height: 1.25;
  margin-bottom: 14px;
  letter-spacing: 0.03em;
}

.hero-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 22px;
  line-height: 1.7;
}

.hero-cta {
  display: inline-block;
  padding: 12px 32px;
  background: transparent;
  border: 1px solid var(--green);
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-decoration: none;
  text-shadow: var(--glow-green);
  transition: background var(--transition), color var(--transition);
  min-height: 44px;
  align-items: center;
}

.hero-cta:hover {
  background: var(--green);
  color: var(--dark-4);
  text-shadow: none;
}

.home-content {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ===========================
   分类卡片网格
   =========================== */
.cats-section {
  margin-top: 40px;
}

.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px;
  background: var(--dark-3);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition);
  min-height: 100px;
}

.cat-card:hover {
  border-color: var(--green);
  background: rgba(135, 255, 113, 0.06);
}

.cat-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1.4;
}

.cat-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.cat-card-count {
  font-size: 0.72rem;
  color: var(--blue);
  letter-spacing: 0.05em;
  align-self: flex-end;
}

/* ===========================
   最新文章列表
   =========================== */
.latest-section {
  margin-top: 48px;
}

.latest-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.latest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(135, 255, 113, 0.1);
  gap: 12px;
}

.latest-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex: 1;
  min-width: 0;
}

.latest-title {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.4;
  transition: color var(--transition);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-link:hover .latest-title {
  color: var(--green);
}

.latest-cat {
  font-size: 0.7rem;
  color: var(--blue);
  white-space: nowrap;
  padding: 2px 8px;
  border: 1px solid var(--border-blue);
  flex-shrink: 0;
}

.latest-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===========================
   子页卡片（栏目/标签页）
   =========================== */
.children-section {
  margin-top: 48px;
}

.children-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.child-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px;
  background: var(--dark-3);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}

.child-card:hover {
  border-color: var(--blue);
  background: rgba(1, 205, 254, 0.05);
}

.child-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 10px;
}

.child-num {
  font-size: 0.65rem;
  color: var(--green);
  font-weight: 300;
  letter-spacing: 0.08em;
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
}

.child-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.child-card-cat {
  font-size: 0.7rem;
  color: var(--purple);
  letter-spacing: 0.04em;
}

.child-card-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  align-self: flex-end;
}

/* ===========================
   面包屑
   =========================== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

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

.bc-sep {
  color: var(--border);
  font-size: 0.65rem;
}

/* ===========================
   文章 Hero 图
   =========================== */
.article-hero-wrap {
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-hero-img {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(1.2) hue-rotate(5deg);
}

/* ===========================
   相关阅读
   =========================== */
.related-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.related-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: var(--dark-3);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color var(--transition);
}

.related-link:hover {
  border-color: var(--purple);
}

.related-link strong {
  font-size: 0.85rem;
  color: var(--green);
  line-height: 1.4;
}

.related-link span {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===========================
   Eyebrow 标签
   =========================== */
.eyebrow-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--dark-4);
  background: linear-gradient(90deg, var(--green), var(--blue));
  padding: 3px 10px;
  margin-bottom: 14px;
}

.cat-eyebrow,
.about-eyebrow,
.privacy-eyebrow,
.tag-eyebrow {
  display: block;
}

/* ===========================
   关于页
   =========================== */
.about-nav-section {
  margin-top: 48px;
}

.about-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.about-nav-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  background: var(--dark-3);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition);
}

.about-nav-item:hover {
  border-color: var(--blue);
  background: rgba(1, 205, 254, 0.05);
}

.about-nav-item strong {
  font-size: 0.9rem;
  color: var(--blue);
}

.about-nav-item span {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===========================
   隐私页
   =========================== */
.privacy-content {
  max-width: 680px;
}

.privacy-links {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.priv-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  background: var(--dark-3);
  border: 1px solid var(--border);
  text-decoration: none;
  margin-top: 12px;
  transition: border-color var(--transition);
}

.priv-link:hover {
  border-color: var(--green);
}

.priv-link strong {
  font-size: 0.9rem;
  color: var(--green);
}

.priv-link span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ===========================
   标签页
   =========================== */
.other-tags-section {
  margin-top: 40px;
}

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

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: transparent;
  border: 1px solid var(--purple);
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
  min-height: 40px;
}

.tag-pill:hover {
  background: rgba(185, 103, 255, 0.1);
  border-color: var(--green);
}

.tag-pill strong {
  font-size: 0.85rem;
  color: var(--purple);
  font-weight: 500;
}

.tag-pill:hover strong {
  color: var(--green);
}

/* ===========================
   页脚 — footer > p + small 结构
   =========================== */
.site-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  background: var(--dark-4);
  text-align: center;
}

.footer-copy {
  margin-bottom: 4px;
}

.footer-copy small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-copy small a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 4px;
  transition: color var(--transition);
}

.footer-copy small a:hover {
  color: var(--green);
}

.footer-disclaimer {
  font-size: 0.68rem;
  color: rgba(122, 171, 112, 0.5);
  display: block;
}

/* ===========================
   Scroll Reveal 动效
   =========================== */
.reveal-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

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

/* ===========================
   Stagger
   =========================== */
.reveal-item:nth-child(1) { transition-delay: 0.05s; }
.reveal-item:nth-child(2) { transition-delay: 0.10s; }
.reveal-item:nth-child(3) { transition-delay: 0.15s; }
.reveal-item:nth-child(4) { transition-delay: 0.20s; }
.reveal-item:nth-child(5) { transition-delay: 0.25s; }
.reveal-item:nth-child(6) { transition-delay: 0.30s; }
.reveal-item:nth-child(7) { transition-delay: 0.35s; }
.reveal-item:nth-child(8) { transition-delay: 0.40s; }

/* ===========================
   移动端响应式
   =========================== */
@media (max-width: 768px) {
  :root {
    --aside-w: 0px;
  }

  .site-layout {
    flex-direction: column;
  }

  .site-aside {
    position: relative;
    width: 100%;
    height: auto;
    flex-direction: column;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .aside-nav ul {
    display: flex;
    flex-wrap: wrap;
  }

  .aside-nav li {
    border-bottom: none;
    border-right: 1px solid rgba(135, 255, 113, 0.08);
  }

  .aside-nav li a {
    padding: 10px 14px;
    font-size: 0.78rem;
    min-height: 44px;
  }

  .site-body {
    margin-left: 0;
  }

  .wrap {
    padding: 28px 16px 48px;
  }

  .hero-inner {
    min-height: 100vh;
    flex-direction: column;
    padding: 0;
  }

  .hero-img-1, .hero-img-2 {
    width: 55%;
    height: 45%;
  }

  .hero-copy {
    max-width: 90%;
    padding: 20px 16px;
  }

  .hero-h1 {
    font-size: 1.5rem;
  }

  .cats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .about-nav-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .cats-grid {
    grid-template-columns: 1fr;
  }

  .latest-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .latest-link {
    flex-direction: column;
    align-items: flex-start;
  }

  .latest-title {
    white-space: normal;
  }
}

/* ===========================
   减少动效（无障碍）
   =========================== */
@media (prefers-reduced-motion: reduce) {
  .glitch-text::before,
  .glitch-text::after {
    animation: none;
    opacity: 0;
  }

  .reveal-item {
    opacity: 1;
    transform: none;
    transition: none;
  }

  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
