@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 {
  --red: #ff0000;
  --purple: #8b00ff;
  --dark: #261717;
  --dark2: #1a0f0f;
  --dark3: #0e0808;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-blur: blur(16px);
  --text-primary: #f0e8e8;
  --text-secondary: rgba(240, 232, 232, 0.65);
  --text-muted: rgba(240, 232, 232, 0.4);
  --nav-width: 220px;
  --font: 'Noto Sans Hebrew', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius-card: 28px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 64px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  line-height: 1.6;
  background: var(--dark3);
  color: var(--text-primary);
  font-family: var(--font);
}

body {
  min-height: 100vh;
  background: radial-gradient(ellipse at 20% 20%, rgba(139,0,255,0.18) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 80%, rgba(255,0,0,0.15) 0%, transparent 55%),
              linear-gradient(160deg, #1a0808 0%, #261717 40%, #0e0808 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark3); }
::-webkit-scrollbar-thumb { background: rgba(139,0,255,0.5); border-radius: 3px; }

/* ── HEADER / NAV ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-width);
  height: 100vh;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.25rem;
  background: rgba(38, 23, 23, 0.55);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-border);
  gap: 2.5rem;
  overflow-y: auto;
}

.header-brand {
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
  padding: 0.5rem 0;
  min-height: 44px;
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}

.brand-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--red);
  line-height: 1.3;
  white-space: nowrap;
}

.site-nav {
  flex: 1;
}

.site-nav p {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-nav p a {
  display: flex;
  align-items: center;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  min-height: 44px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  letter-spacing: 0.02em;
}

.site-nav p a:hover,
.site-nav p a:focus-visible {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  color: var(--text-primary);
  outline: none;
}

.site-nav p a:first-child {
  color: var(--red);
  font-weight: 700;
}

/* ── MAIN OFFSET ── */
.site-main {
  margin-left: var(--nav-width);
  min-height: 100vh;
}

/* ── HERO ── */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(38,23,23,0.85) 0%,
    rgba(139,0,255,0.25) 50%,
    rgba(255,0,0,0.3) 100%
  );
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.hero-glow-red {
  width: 500px;
  height: 500px;
  background: rgba(255,0,0,0.2);
  bottom: -100px;
  right: -80px;
}

.hero-glow-purple {
  width: 400px;
  height: 400px;
  background: rgba(139,0,255,0.25);
  top: -60px;
  right: 200px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 2.5rem 3rem 2.5rem 1.5rem;
  text-align: right;
}

.hero-badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--red);
  border: 1px solid rgba(255,0,0,0.5);
  border-radius: 999px;
  background: rgba(255,0,0,0.08);
  margin-bottom: 1.2rem;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.hero-h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-shadow: 0 2px 24px rgba(255,0,0,0.3);
}

.hero-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2.2rem;
  background: linear-gradient(135deg, var(--red), var(--purple));
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  min-height: 44px;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 24px rgba(255,0,0,0.35);
}

.hero-cta:hover,
.hero-cta:focus-visible {
  opacity: 0.88;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(139,0,255,0.4);
  outline: none;
}

/* ── CONTENT WRAP ── */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem 2rem;
}

/* ── SECTION + ASIDE + ARTICLE ── */
.content-section {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.sidebar {
  flex: 0 0 200px;
  position: sticky;
  top: 2rem;
}

.sidebar-inner {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.sidebar-inner hr {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 0.25rem 0 0.75rem;
}

.aside-link {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.83rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  min-height: 40px;
  transition: background var(--transition), color var(--transition);
}

.aside-link:hover,
.aside-link:focus-visible {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
  outline: none;
}

/* ── ARTICLE / PAGE CONTENT ── */
.main-article {
  flex: 1;
  min-width: 0;
}

.main-article article {
  margin-bottom: 3.5rem;
  scroll-margin-top: 5rem;
}

.main-article h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--red);
  line-height: 1.3;
}

.main-article h2 + hr {
  border: none;
  border-top: 1px solid rgba(255,0,0,0.2);
  margin: 0.75rem 0 1.25rem;
}

.main-article h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: rgba(240,232,232,0.9);
  margin: 1.5rem 0 0.6rem;
  padding-left: 0.6rem;
  border-left: 2px solid var(--purple);
}

.main-article h3 + hr {
  border: none;
  border-top: 1px solid rgba(139,0,255,0.2);
  margin: 0.5rem 0 1rem;
}

.main-article p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.main-article ul,
.main-article ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.main-article li {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.main-article a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.main-article a:hover {
  color: var(--purple);
}

.main-article strong,
.main-article b {
  color: var(--text-primary);
  font-weight: 700;
}

.main-article blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--purple);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.main-article table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.93rem;
}

.main-article th {
  background: rgba(255,0,0,0.12);
  color: var(--text-primary);
  font-weight: 700;
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}

.main-article td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: var(--text-secondary);
}

.main-article tr:last-child td {
  border-bottom: none;
}

.glass-card {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

article[id] {
  scroll-margin-top: 5rem;
}

/* ── FOOTER ── */
.site-footer {
  margin-left: var(--nav-width);
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--glass-border);
  background: rgba(14,8,8,0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
}

.site-footer p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.site-footer small {
  font-size: 0.78rem;
  color: rgba(240,232,232,0.3);
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.stagger .reveal:nth-child(1) { transition-delay: 0s; }
.stagger .reveal:nth-child(2) { transition-delay: 0.08s; }
.stagger .reveal:nth-child(3) { transition-delay: 0.16s; }
.stagger .reveal:nth-child(4) { transition-delay: 0.24s; }
.stagger .reveal:nth-child(5) { transition-delay: 0.32s; }
.stagger .reveal:nth-child(6) { transition-delay: 0.4s; }
.stagger .reveal:nth-child(7) { transition-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
  .hero-cta { transition: none; }
  .site-nav p a { transition: none; }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  :root {
    --nav-width: 0px;
  }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 0 1rem;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(38,23,23,0.9);
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    z-index: 200;
  }

  .header-brand {
    flex-shrink: 0;
  }

  .brand-link {
    min-height: 48px;
    padding: 0.25rem 0;
  }

  .site-nav {
    flex: 1;
    overflow-x: auto;
  }

  .site-nav p {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.15rem;
    white-space: nowrap;
  }

  .site-nav p a {
    font-size: 0.82rem;
    padding: 0.5rem 0.75rem;
    min-height: 48px;
    white-space: nowrap;
  }

  .site-main {
    margin-left: 0;
    padding-top: 64px;
  }

  .hero-section {
    height: 100svh;
    align-items: flex-end;
    justify-content: center;
  }

  .hero-content {
    text-align: center;
    padding: 2rem 1.25rem;
    max-width: 100%;
  }

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

  .content-section {
    flex-direction: column;
  }

  .sidebar {
    flex: none;
    width: 100%;
    position: static;
  }

  .sidebar-inner {
    border-radius: var(--radius-sm);
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.25rem;
  }

  .sidebar-title,
  .sidebar-inner hr {
    grid-column: 1 / -1;
  }
}

@media (max-width: 540px) {
  .wrap {
    padding: 2rem 1rem 1rem;
  }

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

  .hero-badge {
    font-size: 0.72rem;
  }

  .main-article h2 {
    font-size: 1.2rem;
  }

  .glass-card {
    padding: 1.25rem;
    border-radius: 18px;
  }
}
