/* ============================================================
   هيدر موحّد لكل صفحات الموقع العام
   مصدر واحد للشكل: الرئيسية · معرض الأعمال · صفحة المشروع.
   ألوانه ثابتة داكنة في الوضعين لأنه يعلو صورًا وفيديو دائمًا.
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 72px;
  padding-inline: clamp(15px, 5vw, 78px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(9, 9, 9, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 250, 248, 0.09);
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
}

/* شريط الهيدر لا يظهر إلا بعد النزول، والشعار يبقى في مكانه من البداية.
   الصنف is-reveal يضيفه السكربت، فبلا جافاسكربت يبقى الشريط ظاهرًا كاملًا. */
.site-header.is-reveal:not(.is-scrolled) {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: transparent;
}
.site-header.is-reveal .site-nav {
  transition: opacity 0.3s ease, transform 0.35s ease, visibility 0.35s;
}
.site-header.is-reveal:not(.is-scrolled) .site-nav {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  color: #fffaf8;
  text-decoration: none;
}
.site-header .brand img {
  width: clamp(86px, 9vw, 116px);
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.site-nav .nav-pill {
  padding: 8px 15px;
  border: 1px solid rgba(255, 250, 248, 0.18);
  border-radius: 999px;
  color: #fffaf8;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s;
}
.site-nav .nav-pill:hover {
  background: rgba(255, 250, 248, 0.08);
  border-color: rgba(255, 250, 248, 0.4);
}

/* أيقونة المظهر بلا إطار — رمز مجرّد فقط */
.theme-toggle {
  flex: none;
  width: 34px; height: 34px;
  margin-inline-start: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 250, 248, 0.72);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.25s;
}
.theme-toggle:hover { color: #fffaf8; }
.theme-toggle:focus-visible { outline: 2px solid rgba(255, 250, 248, 0.5); outline-offset: 3px; border-radius: 6px; }
.theme-toggle svg {
  width: 17px; height: 17px;
  grid-area: 1 / 1;
  transition: opacity 0.25s, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.theme-toggle__moon { opacity: 0; transform: rotate(-40deg) scale(0.6); }
:root[data-theme="light"] .theme-toggle__sun { opacity: 0; transform: rotate(40deg) scale(0.6); }
:root[data-theme="light"] .theme-toggle__moon { opacity: 1; transform: none; }

@media (max-width: 560px) {
  .site-header { height: 64px; gap: 8px; padding-inline: 13px; }
  .site-header .brand { gap: 5px; }
  .site-nav { gap: 5px; }
  .site-nav .nav-pill { padding: 7px 9px; font-size: 0.68rem; }
  .theme-toggle { width: 32px; height: 32px; margin-inline-start: 2px; }
  .theme-toggle svg { width: 15px; height: 15px; }}