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

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

:root {
  --c-green: #00ff80;
  --c-blue: #0000ff;
  --c-black: #000000;
  --c-white: #ffffff;
  --c-dark: #0a0a0a;
  --c-gray: #111111;
  --c-border: #00ff80;
  --nav-w: 240px;
  --font-main: 'Noto Sans Hebrew', system-ui, sans-serif;
  --font-mono: 'Noto Sans Hebrew', monospace;
}

html {
  font-size: 17px;
  line-height: 1.6;
  scroll-behavior: auto;
}

body {
  font-family: var(--font-main);
  background: var(--c-black);
  color: var(--c-white);
  min-height: 100vh;
  overflow-x: hidden;
}

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

.page-body {
  flex: 1;
  margin-left: var(--nav-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ===== 左侧固定竖排导航 ===== */
.sidenav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-w);
  height: 100vh;
  background: var(--c-black);
  border-right: 3px solid var(--c-green);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidenav__brand {
  padding: 24px 16px 20px;
  border-bottom: 2px solid var(--c-blue);
  background: var(--c-blue);
}

.sidenav__brand a {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-green);
  text-decoration: none;
  display: block;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.sidenav ol {
  list-style: none;
  padding: 8px 0;
  counter-reset: nav-counter;
  flex: 1;
}

.sidenav ol li {
  counter-increment: nav-counter;
  border-bottom: 1px solid rgba(0,255,128,0.15);
}

.sidenav ol li a {
  display: block;
  padding: 14px 16px 14px 40px;
  color: var(--c-white);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.4;
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.sidenav ol li a::before {
  content: counter(nav-counter, decimal-leading-zero);
  position: absolute;
  left: 10px;
  font-size: 0.65rem;
  color: var(--c-green);
  font-weight: 700;
}

.sidenav ol li a:hover,
.sidenav ol li a[aria-current="page"] {
  background: var(--c-green);
  color: var(--c-black);
}

.sidenav ol li a[aria-current="page"]::before {
  color: var(--c-black);
}

/* ===== Hero - 首页 ===== */
.hero {
  position: relative;
  min-height: 100vh;
  background: var(--c-black);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 60px 40px;
  border-bottom: 4px solid var(--c-green);
  overflow: hidden;
}

.hero-bg-text {
  position: absolute;
  top: 50%;
  left: -20px;
  transform: translateY(-50%);
  font-size: clamp(120px, 25vw, 320px);
  font-weight: 700;
  color: rgba(0, 255, 128, 0.05);
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
  line-height: 1;
}

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

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-green);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
  border-right: 4px solid var(--c-green);
  padding-right: 12px;
}

.hero-h1 {
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--c-white);
  margin-bottom: 24px;
  border-bottom: 3px solid var(--c-blue);
  padding-bottom: 16px;
}

.hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 32px;
  line-height: 1.6;
}

.hero-cta {
  display: inline-block;
  padding: 14px 32px;
  background: var(--c-green);
  color: var(--c-black);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 3px solid var(--c-green);
  min-height: 44px;
}

.hero-cta:hover {
  background: var(--c-black);
  color: var(--c-green);
}

/* ===== Section Hero ===== */
.section-hero,
.tag-hero {
  position: relative;
  min-height: 40vh;
  background: var(--c-blue);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 40px 40px 40px;
  border-bottom: 4px solid var(--c-green);
  overflow: hidden;
}

.section-hero .hero-bg-text,
.tag-hero .hero-bg-text {
  position: absolute;
  top: 50%;
  left: -10px;
  transform: translateY(-50%);
  font-size: clamp(80px, 18vw, 200px);
  font-weight: 700;
  color: rgba(0,0,0,0.2);
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
  line-height: 1;
}

.section-hero-content,
.tag-hero-content {
  text-align: right;
  position: relative;
  z-index: 2;
}

.section-hero-content h1,
.tag-hero-content h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.1;
}

.section-desc {
  color: rgba(255,255,255,0.8);
  margin-top: 12px;
  font-size: 0.95rem;
}

/* ===== Main 布局 ===== */
main {
  display: flex;
  flex: 1;
  gap: 0;
  align-items: flex-start;
}

main > div {
  flex: 1;
  min-width: 0;
  border-right: 2px solid rgba(0,255,128,0.2);
}

main > div > article {
  padding: 32px 36px;
  border-bottom: 1px solid rgba(0,255,128,0.1);
}

/* ===== Sidebar / Aside ===== */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  padding: 32px 20px;
  background: var(--c-gray);
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
}

.sidebar h2 {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--c-green);
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}

.sidebar hr {
  border: none;
  border-top: 2px solid var(--c-green);
  margin-bottom: 16px;
}

.sidebar ul {
  list-style: none;
  margin-bottom: 24px;
}

.sidebar ul li a {
  display: block;
  padding: 8px 0;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  min-height: 40px;
  display: flex;
  align-items: center;
}

.sidebar ul li a:hover {
  color: var(--c-green);
  padding-left: 6px;
}

/* ===== 内容头部 ===== */
.content-header {
  background: var(--c-dark);
}

.content-header h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--c-white);
}

.content-header hr {
  border: none;
  border-top: 3px solid var(--c-green);
  margin-bottom: 12px;
}

.date-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.pub-date, .mod-date {
  font-size: 0.8rem;
  color: var(--c-green);
  font-weight: 500;
}

/* ===== 正文 ===== */
.content-main {
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.9);
}

.content-main h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 32px 0 8px;
  color: var(--c-white);
  border-left: 5px solid var(--c-green);
  padding-left: 12px;
}

.content-main h2 + hr {
  border: none;
  border-top: 1px solid rgba(0,255,128,0.3);
  margin-bottom: 16px;
}

.content-main h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 24px 0 8px;
  color: var(--c-green);
}

.content-main h3 + hr {
  border: none;
  border-top: 1px solid rgba(0,255,128,0.2);
  margin-bottom: 12px;
}

.content-main p {
  margin-bottom: 16px;
}

.content-main a {
  color: var(--c-green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.content-main a:hover {
  color: var(--c-blue);
  background: var(--c-green);
  text-decoration: none;
  padding: 0 2px;
}

.content-main ul, .content-main ol {
  margin: 0 0 16px 24px;
}

.content-main li {
  margin-bottom: 6px;
}

.content-main blockquote {
  border-left: 4px solid var(--c-blue);
  padding: 12px 20px;
  margin: 20px 0;
  background: rgba(0,0,255,0.1);
  color: rgba(255,255,255,0.85);
}

/* ===== HR 全局 ===== */
hr {
  border: none;
  border-top: 2px solid var(--c-green);
  margin: 16px 0;
}

/* ===== 卡片 / 玻璃拟态 ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.glass-card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0,255,128,0.25);
  border-radius: 10px;
  padding: 24px 20px;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--c-green);
}

.card-num {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--c-green);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}

.card-title a {
  color: var(--c-white);
  text-decoration: none;
}

.card-title a:hover {
  color: var(--c-green);
}

.card-title + hr {
  border-top: 1px solid rgba(0,255,128,0.3);
  margin: 8px 0;
}

.card-desc {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
  margin-bottom: 14px;
}

.card-link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--c-green);
  text-decoration: none;
  border-bottom: 2px solid var(--c-green);
  padding-bottom: 2px;
  min-height: 40px;
  line-height: 40px;
}

.card-link:hover {
  background: var(--c-green);
  color: var(--c-black);
  padding: 0 8px;
}

.card-date {
  font-size: 0.75rem;
  color: rgba(0,255,128,0.7);
  margin-bottom: 8px;
}

/* ===== Section 标题区 ===== */
.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-green);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.section-title + hr {
  margin-bottom: 24px;
}

/* ===== 故事列表 dl ===== */
.story-dl {
  list-style: none;
}

.story-dl dt {
  margin-top: 16px;
}

.story-dl dt a {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-white);
  text-decoration: none;
  padding: 10px 12px;
  border-left: 4px solid var(--c-blue);
  background: rgba(0,0,255,0.08);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.story-dl dt a:hover {
  background: var(--c-blue);
  color: var(--c-white);
  border-left-color: var(--c-green);
}

.story-dl dd {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  padding: 6px 12px 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ===== 子页列表 dl ===== */
.child-dl {
  counter-reset: child-counter;
}

.child-dl dt {
  counter-increment: child-counter;
  margin-top: 14px;
}

.child-dl dt a {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-white);
  text-decoration: none;
  padding: 12px 16px;
  background: rgba(0,255,128,0.06);
  border: 1px solid rgba(0,255,128,0.2);
  border-radius: 4px 0 0 4px;
  border-right: 4px solid var(--c-green);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.child-dl dt a:hover {
  background: var(--c-green);
  color: var(--c-black);
}

.child-dl dd {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  padding: 6px 16px 12px;
  border-bottom: 1px solid rgba(0,255,128,0.08);
}

.child-num {
  display: inline-block;
  background: var(--c-green);
  color: var(--c-black);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  margin-right: 8px;
  vertical-align: middle;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.breadcrumb a {
  color: var(--c-green);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* ===== 相关文章 ===== */
.related-list {
  list-style: none;
  margin-bottom: 20px;
}

.related-list li {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.related-list li a {
  display: block;
  padding: 10px 12px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.9rem;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.related-list li a:hover {
  color: var(--c-green);
  padding-left: 18px;
}

.related-nav a {
  color: var(--c-green);
  font-size: 0.9rem;
}

/* ===== 关于页面 ===== */
.about-header,
.privacy-header {
  background: var(--c-blue);
  border-right: none;
}

.about-header h1,
.privacy-header h1 {
  color: var(--c-white);
}

.about-header .hero-eyebrow,
.privacy-header .hero-eyebrow {
  color: var(--c-green);
}

.about-nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.about-nav-list li a {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: rgba(0,255,128,0.1);
  border: 1px solid var(--c-green);
  color: var(--c-green);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  min-height: 44px;
  border-radius: 4px;
}

.about-nav-list li a:hover {
  background: var(--c-green);
  color: var(--c-black);
}

.site-info-dl dt {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--c-green);
  letter-spacing: 0.05em;
  margin-top: 12px;
}

.site-info-dl dd {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  padding-left: 8px;
}

/* ===== 页脚（极简 p + small）===== */
footer {
  background: var(--c-black);
  border-top: 3px solid var(--c-green);
  padding: 32px 36px;
  text-align: center;
  margin-top: auto;
}

footer p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 10px;
  line-height: 1.6;
}

footer p a {
  color: var(--c-green);
  text-decoration: none;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
}

footer p a:hover {
  text-decoration: underline;
}

footer small {
  display: block;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  margin-top: 8px;
}

.footer-brand {
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: var(--c-green) !important;
  letter-spacing: 0.05em;
  margin-bottom: 16px !important;
}

/* ===== 动效：滚动显现（Stagger）===== */
@media (prefers-reduced-motion: no-preference) {
  .glass-card {
    opacity: 0;
    transform: translateY(20px);
    animation: card-reveal 0.4s forwards;
  }

  .glass-card:nth-child(1) { animation-delay: 0.05s; }
  .glass-card:nth-child(2) { animation-delay: 0.1s; }
  .glass-card:nth-child(3) { animation-delay: 0.15s; }
  .glass-card:nth-child(4) { animation-delay: 0.2s; }
  .glass-card:nth-child(5) { animation-delay: 0.25s; }
  .glass-card:nth-child(6) { animation-delay: 0.3s; }

  @keyframes card-reveal {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .child-dl dt,
  .story-dl dt {
    opacity: 0;
    transform: translateX(-12px);
    animation: list-reveal 0.3s forwards;
  }

  .child-dl dt:nth-child(odd),
  .story-dl dt:nth-child(odd) { animation-delay: 0.05s; }
  .child-dl dt:nth-child(even),
  .story-dl dt:nth-child(even) { animation-delay: 0.1s; }

  @keyframes list-reveal {
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
}

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

  .sidenav {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    max-height: 60vh;
    border-right: none;
    border-top: 3px solid var(--c-green);
    flex-direction: column;
    transform: translateY(calc(100% - 52px));
    z-index: 200;
  }

  .sidenav.open {
    transform: translateY(0);
  }

  .sidenav__brand {
    cursor: pointer;
    position: relative;
    padding: 14px 16px;
    min-height: 52px;
    display: flex;
    align-items: center;
  }

  .sidenav__brand::after {
    content: '菜单 ▲';
    position: absolute;
    right: 16px;
    font-size: 0.75rem;
    color: var(--c-green);
  }

  .sidenav ol {
    overflow-y: auto;
  }

  .sidenav ol li a {
    padding: 14px 16px 14px 44px;
    min-height: 48px;
  }

  .page-body {
    margin-left: 0;
    margin-bottom: 52px;
  }

  .hero {
    padding: 40px 20px 30px;
    min-height: 100vh;
  }

  .hero-h1 {
    font-size: clamp(1.6rem, 8vw, 2.5rem);
  }

  .section-hero,
  .tag-hero {
    min-height: 30vh;
    padding: 30px 20px;
  }

  main {
    flex-direction: column;
  }

  main > div {
    border-right: none;
    border-bottom: 2px solid rgba(0,255,128,0.2);
  }

  main > div > article {
    padding: 24px 20px;
  }

  .sidebar {
    width: 100%;
    position: static;
    max-height: none;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 24px 20px;
  }

  .sidebar h2,
  .sidebar hr,
  .sidebar ul {
    width: 100%;
  }

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

  footer {
    padding: 24px 20px;
  }

  .hero-bg-text {
    font-size: clamp(80px, 30vw, 150px);
    opacity: 0.04;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 16px;
  }

  .content-header h1 {
    font-size: 1.4rem;
  }

  .hero-eyebrow {
    font-size: 0.75rem;
  }

  .about-nav-list {
    flex-direction: column;
  }

  .about-nav-list li a {
    width: 100%;
    justify-content: center;
  }
}
