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

:root {
  --ink: #000000;
  --fg: #f4f4f4;
  --mut: #a6a6a6;
  --g: #00ff80;
  --b: #0000ff;
  --b-lt: #6f6fff;
  --grid: #1c1c1c;
  --pad: clamp(18px, 4vw, 48px);
  --radius: 4px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: 'Noto Sans Hebrew', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--g);
  outline-offset: 3px;
}

/* ---------- 导航 ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px;
  background: var(--ink);
  border-bottom: 3px solid var(--g);
}

.nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 4px;
  color: var(--g);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.brand-img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: #0d0d0d;
  border: 2px solid var(--g);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--g);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border: 3px solid var(--g);
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--ink);
  color: var(--g);
}

.nav-list {
  display: flex;
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: nav;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.nav-list li {
  flex: 0 0 auto;
  counter-increment: nav;
}

.nav-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  color: var(--fg);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid transparent;
  border-right-color: var(--grid);
}

.nav-list a::before {
  content: counter(nav, decimal-leading-zero);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--g);
}

.nav-list a:hover,
.nav-list a:focus-visible {
  background: #0e0e0e;
  color: var(--g);
  border-color: var(--g);
}

.nav-list a[aria-current='true'] {
  background: var(--b);
  color: #ffffff;
  border-color: var(--b);
}

.nav-list a[aria-current='true']::before {
  color: var(--g);
}

/* ---------- 头图 ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: center;
  padding: clamp(22px, 5vw, 54px) var(--pad) clamp(26px, 5vw, 60px);
  text-align: right;
  border-bottom: 3px solid var(--g);
}

.hero-art {
  justify-self: end;
}

.hero-img {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: contain;
  border: 3px solid var(--g);
}

.hero-stamp {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  padding: 6px;
  background: var(--g);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--b);
}

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 8vw, 58px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.hero-desc {
  max-width: 46ch;
  margin: 14px 0 0 auto;
  color: var(--mut);
  font-size: 16px;
}

/* ---------- 主体 ---------- */

.shell {
  display: block;
}

.prose {
  padding: 0 var(--pad);
}

.prose > section {
  padding: clamp(24px, 4vw, 46px) 0;
  border-top: 3px solid var(--grid);
  scroll-margin-top: 132px;
}

.prose > section:first-child {
  padding-top: clamp(18px, 3vw, 32px);
  border-top: 0;
}

.prose > section:nth-child(even) {
  padding-left: clamp(12px, 2vw, 24px);
  border-left: 6px solid var(--b);
}

.prose h2 {
  margin: 0 0 8px;
  font-size: clamp(21px, 3.4vw, 30px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.prose h3 {
  margin: 26px 0 6px;
  font-size: 19px;
  font-weight: 700;
  color: var(--g);
}

.prose p,
.prose li {
  overflow-wrap: anywhere;
}

.prose p {
  max-width: 66ch;
  margin: 0 0 14px;
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.prose li {
  margin: 0 0 6px;
}

.prose a {
  color: var(--g);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover {
  background: var(--g);
  color: var(--ink);
  text-decoration: none;
}

.prose strong {
  color: var(--g);
  font-weight: 700;
}

.prose blockquote {
  margin: 18px 0;
  padding: 10px 16px;
  background: #0d0d0d;
  color: var(--mut);
  border-left: 6px solid var(--g);
}

.prose hr {
  margin: 16px 0;
  border: 0;
  border-top: 3px solid var(--g);
}

.prose img {
  height: auto;
  border: 3px solid var(--grid);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
}

.prose th,
.prose td {
  padding: 8px;
  text-align: right;
  border: 2px solid var(--grid);
}

/* ---------- 侧栏 ---------- */

.rail {
  margin: 24px var(--pad) 34px;
  padding: 18px 16px;
  background: rgba(0, 255, 128, 0.06);
  border: 3px solid var(--g);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 rgba(0, 0, 255, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.rail-h {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.rail hr {
  margin: 10px 0 12px;
  border: 0;
  border-top: 3px solid var(--g);
}

.rail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rail;
}

.rail-list li {
  counter-increment: rail;
}

.rail-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 4px;
  color: var(--fg);
  font-size: 16px;
  text-decoration: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.rail-list a::before {
  content: counter(rail, decimal-leading-zero);
  font-size: 11px;
  font-weight: 700;
  color: var(--g);
}

.rail-list a:hover,
.rail-list a:focus-visible {
  color: var(--g);
}

/* ---------- 页脚 ---------- */

.foot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px 20px;
  padding: clamp(26px, 4vw, 44px) var(--pad) 26px;
  background: #060606;
  border-top: 3px solid var(--g);
}

.foot p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

.foot-brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--g);
}

.foot-kw {
  color: var(--b-lt);
}

.foot-desc {
  color: var(--mut);
}

.foot-copy {
  display: block;
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 14px;
  font-size: 16px;
  color: #8d8d8d;
  border-top: 2px solid #171717;
}

/* ---------- 动效 ---------- */

.reveal {
  animation: rise 0.2s steps(3, end) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    animation: none;
  }
  * {
    transition: none !important;
  }
}

/* ---------- 宽屏：左侧固定竖栏 ---------- */

@media (min-width: 900px) {
  body {
    padding-left: 240px;
  }

  .site-nav {
    position: fixed;
    inset: 0 auto 0 0;
    width: 240px;
    padding: 22px 16px;
    gap: 16px;
    overflow-y: auto;
    border-bottom: 0;
    border-right: 3px solid var(--g);
  }

  .nav-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .brand {
    padding: 0;
    font-size: 22px;
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    overflow: visible;
  }

  .nav-list a {
    width: 100%;
    border-right-color: transparent;
    border-bottom-color: var(--grid);
  }

  .nav-cta {
    width: 100%;
    margin-top: auto;
  }

  .hero {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 28px;
    min-height: 45vh;
  }

  .hero h1 {
    font-size: clamp(38px, 4.6vw, 64px);
  }

  .shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 268px;
    align-items: start;
  }

  .prose {
    padding-right: clamp(18px, 3vw, 40px);
  }

  .prose > section {
    scroll-margin-top: 24px;
  }

  .rail {
    position: sticky;
    top: 24px;
    margin: 32px 24px 40px 0;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
