/* ============================================
   OMAR PORTFOLIO - HEADER STYLES
   ============================================ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: all var(--transition-base);
}

/* Transparent state (top of page) */
.header--transparent {
  background: transparent;
  border-bottom: 1px solid transparent;
}

/* Scrolled / Solid state */
.header--solid {
  background: var(--bg-overlay);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  width: 100%;
}

/* ---- LOGO ---- */
.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}

.header__logo-mark {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-accent);
  transition: transform var(--transition-spring);
}

.header__logo:hover .header__logo-mark {
  transform: scale(1.08) rotate(-3deg);
}

.header__logo-text {
  display: flex;
  flex-direction: column;
}

.header__logo-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.header__logo-role {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
}

[lang="ar"] .header__logo-name,
[lang="ar"] .header__logo-role {
  font-family: var(--font-arabic);
}

/* ---- NAV ---- */
.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.header__nav-link {
  position: relative;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  white-space: nowrap;
}

[lang="ar"] .header__nav-link {
  font-family: var(--font-arabic);
}

.header__nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
  transition: width var(--transition-base);
}

.header__nav-link:hover,
.header__nav-link.active {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.header__nav-link.active::after,
.header__nav-link:hover::after {
  width: calc(100% - 24px);
}

/* ---- ACTIONS ---- */
.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.lang-toggle__btn {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  background: none;
}

.lang-toggle__btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

/* Theme Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
}

.theme-toggle:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: var(--bg-surface);
}

/* Hire Me Button */
.header__cta {
  padding: 0.5rem 1.25rem;
  font-size: var(--text-sm);
  font-weight: 600;
}

[lang="ar"] .header__cta {
  font-family: var(--font-arabic);
}

/* ---- MOBILE MENU BUTTON ---- */
.header__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition-base);
}

.header__burger:hover {
  border-color: var(--accent-blue);
}

.header__burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
  transform-origin: center;
}

.header__burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.header__burger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.header__burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- MOBILE MENU ---- */
.header__mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  padding: var(--space-4) var(--container-pad);
  box-shadow: var(--shadow-lg);
  z-index: calc(var(--z-header) - 1);
  transform: translateY(-10px);
  opacity: 0;
  transition: all var(--transition-base);
  pointer-events: none;
}

.header__mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.header__mobile-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}

.header__mobile-nav-link {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

[lang="ar"] .header__mobile-nav-link {
  font-family: var(--font-arabic);
}

.header__mobile-nav-link:hover,
.header__mobile-nav-link.active {
  background: var(--bg-elevated);
  color: var(--accent-blue);
}

.header__mobile-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-light);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .header__nav { display: none; }
  .header__cta.hide-tablet { display: none; }
}

@media (max-width: 768px) {
  .header__burger { display: flex; }
  .header__mobile-menu { display: block; }
  .header__logo-role { display: none; }
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-primary);
  z-index: calc(var(--z-header) + 1);
  transition: width 100ms linear;
  border-radius: 0 2px 2px 0;
}
