:root {
  --purple: #7c3aed;
  --purple-dark: #5b21b6;
  --blue: #2563eb;
  --blue-light: #38bdf8;
  --bg: #0f0a24;
  --bg-2: #160f33;
  --text: #ece9ff;
  --muted: #b3aede;
  --card: rgba(255, 255, 255, 0.05);
  --border: rgba(168, 150, 255, 0.18);
  --grad: linear-gradient(135deg, var(--purple) 0%, var(--blue) 100%);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Heebo", system-ui, sans-serif;
  background: radial-gradient(circle at 20% 0%, var(--bg-2), var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ===== רקע מונפש ===== */
.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  animation: float 18s ease-in-out infinite;
}
.blob-1 { width: 420px; height: 420px; background: var(--purple); top: -80px; right: -60px; }
.blob-2 { width: 380px; height: 380px; background: var(--blue); bottom: -100px; left: -80px; animation-delay: -6s; }
.blob-3 { width: 300px; height: 300px; background: var(--blue-light); top: 40%; left: 50%; animation-delay: -12s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.1); }
  66% { transform: translate(-30px, 40px) scale(0.95); }
}

/* ===== ניווט ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  backdrop-filter: blur(14px);
  background: rgba(15, 10, 36, 0.6);
  border-bottom: 1px solid var(--border);
}
.logo {
  font-weight: 900;
  font-size: 1.3rem;
  text-decoration: none;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-links { display: flex; gap: 8px; }
.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 999px;
  transition: all 0.25s ease;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-link.active {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}
.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.6rem;
  cursor: pointer;
}

/* ===== עמודים ===== */
main { max-width: 1100px; margin: 0 auto; padding: 60px 24px 80px; }
.page { display: none; animation: fadeUp 0.5s ease; }
.page.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== בית ===== */
.hero { text-align: center; padding: 40px 0; }
.eyebrow {
  display: inline-block;
  color: var(--blue-light);
  letter-spacing: 2px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.hero h1 { font-size: clamp(2rem, 6vw, 3.6rem); font-weight: 900; line-height: 1.15; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  max-width: 620px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }

.btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 30px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 10px 28px rgba(124,58,237,0.45); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: rgba(255,255,255,0.06); }

.stats { display: flex; gap: 50px; justify-content: center; margin-top: 60px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat .num {
  font-size: 2.4rem;
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat .label { color: var(--muted); font-size: 0.95rem; }

/* ===== כותרות עמוד ===== */
.page-head { text-align: center; margin-bottom: 44px; }
.page-head h2 { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 900; }
.page-head p { color: var(--muted); margin-top: 10px; font-size: 1.1rem; }

/* ===== כרטיסים ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(168,150,255,0.5);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.25);
}
.card-icon {
  font-size: 2.4rem;
  width: 64px; height: 64px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: var(--grad);
  margin-bottom: 18px;
}
.card h3 { font-size: 1.35rem; margin-bottom: 10px; }
.card p { color: var(--muted); line-height: 1.6; }

/* ===== סרגל קטגוריות ===== */
.filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}
.filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}
.filter-label {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  margin-inline-end: 6px;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.card-meta .tag { margin-bottom: 0; }
.date {
  font-size: 0.8rem;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.filter-btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 9px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.filter-btn:hover {
  color: var(--text);
  border-color: rgba(168,150,255,0.45);
  transform: translateY(-2px);
}
.filter-btn.active {
  color: #fff;
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(124,58,237,0.4);
}
.filter-btn .count {
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  color: inherit;
}
.empty {
  color: var(--muted);
  text-align: center;
  padding: 40px 0;
  font-size: 1.05rem;
}

/* ===== עמוד דברים — רשת כרטיסים ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(168,150,255,0.5);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.25);
}
.card-thumb {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(124,58,237,0.35), rgba(37,99,235,0.35));
}
.thumb-play {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 1.3rem;
  padding-right: 4px;
  box-shadow: 0 10px 26px rgba(124,58,237,0.5);
  transition: transform 0.25s ease;
}
.project-card:hover .thumb-play { transform: scale(1.12); }
.card-body { padding: 20px; text-align: right; }
.card-body h3 { font-size: 1.3rem; margin: 6px 0 10px; }
.open-hint { color: var(--blue-light); font-weight: 500; font-size: 0.9rem; }

.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue-light);
  background: rgba(56,189,248,0.12);
  border: 1px solid var(--border);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.btn.small { padding: 10px 22px; font-size: 0.9rem; display: inline-block; text-decoration: none; }

/* ===== עמוד פריט בודד ===== */
.back-btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  margin-bottom: 30px;
  transition: background 0.2s ease;
}
.back-btn:hover { background: rgba(255,255,255,0.06); }
.item-detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
}
.item-video {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0c0820;
  border: 1px solid var(--border);
}
.item-video iframe,
.item-video video {
  width: 100%; height: 100%;
  border: none; display: block;
  object-fit: cover;
}
.video-placeholder {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(37,99,235,0.25));
}
.video-placeholder .play {
  width: 60px; height: 60px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 1.4rem;
  padding-right: 4px;
  box-shadow: 0 10px 26px rgba(124,58,237,0.5);
}
.item-info { text-align: right; }
.item-info h2 { font-size: 1.8rem; margin-bottom: 12px; }
.item-info p { color: var(--muted); line-height: 1.8; margin-bottom: 20px; font-size: 1.05rem; }

/* ===== קצת עליי ===== */
.about-wrap {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
}
.avatar {
  font-size: 4rem;
  width: 130px; height: 130px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 14px 40px rgba(124,58,237,0.45);
}
.about-text { flex: 1; min-width: 260px; }
.about-text p { color: var(--muted); line-height: 1.8; margin-bottom: 16px; font-size: 1.05rem; }
.info-list { list-style: none; margin: 22px 0; }
.info-list li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.info-list strong { color: var(--blue-light); }
.socials { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.chip {
  text-decoration: none;
  color: var(--text);
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 500;
  transition: all 0.2s ease;
}
.chip:hover { background: var(--grad); color: #fff; transform: translateY(-2px); }

/* ===== עמוד שאלות (טופס) ===== */
.form-wrap {
  max-width: 620px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 34px;
}
.ask-form { display: flex; flex-direction: column; gap: 18px; }
.ask-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}
.ask-form label small { color: var(--muted); font-weight: 400; margin-inline-start: 4px; }
.ask-form input,
.ask-form textarea,
.ask-form select {
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  resize: vertical;
}
.ask-form input:focus,
.ask-form textarea:focus,
.ask-form select:focus {
  outline: none;
  border-color: var(--purple);
  background: rgba(124,58,237,0.08);
}
.ask-form select option { background: var(--bg-2); color: var(--text); }
.ask-form button { margin-top: 6px; align-self: flex-start; }
.ask-form button:disabled { opacity: 0.6; cursor: wait; }

.ask-status {
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  text-align: center;
}
.ask-status.success { background: rgba(56,189,248,0.12); color: var(--blue-light); border: 1px solid var(--border); }
.ask-status.error { background: rgba(255,80,80,0.12); color: #ff8b8b; border: 1px solid rgba(255,80,80,0.3); }

/* ===== פוטר ===== */
.footer {
  text-align: center;
  padding: 30px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.btn.ghost.small { border: 1px solid var(--border); color: var(--text); background: transparent; }

/* ===== רספונסיבי ===== */
@media (max-width: 720px) {
  .navbar { padding: 16px 20px; }
  .nav-links {
    position: absolute;
    top: 100%; right: 0; left: 0;
    flex-direction: column;
    background: rgba(15,10,36,0.97);
    padding: 14px;
    gap: 6px;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .menu-btn { display: block; }
  .stats { gap: 32px; }
  .item-detail { grid-template-columns: 1fr; }
}
