/* Hide login buttons instantly if user is known to be authed */
.is-authed .header__actions { display: none !important; }

.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  background: rgba(2, 12, 24, 0.85);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  max-width: var(--container); margin: 0 auto; padding: 0 28px;
  height: 100%; display: flex; align-items: center;
  position: relative;
}
.header__logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.header__logo img { height: 34px; width: auto; object-fit: contain; }
.logo-long { height: 22px; }
.header__nav {
  display: flex; gap: 36px;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-link {
  color: var(--text-muted); text-decoration: none;
  font-size: 14px; font-weight: 500; transition: color var(--t); position: relative;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px; background: var(--blue-light);
  transform: scaleX(0); transition: transform var(--t);
}
.nav-link:hover, .nav-link.active { color: white; }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.header__actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; margin-left: auto; }
.header__user { display: flex; align-items: center; gap: 12px; margin-left: auto; flex-shrink: 0; }
.header__user .btn { height: 38px; padding: 0 18px; box-sizing: border-box; line-height: 1; }
.header__avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px; cursor: pointer;
  border: 2px solid var(--border-blue); transition: all var(--t);
}
.header__avatar:hover { border-color: var(--blue-light); box-shadow: var(--glow); }

/* Burger */
.header__burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px; margin-left: auto;
}
.header__burger span {
  display: block; width: 22px; height: 2px;
  background: white; border-radius: 2px; transition: all 0.3s ease;
}
.header__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__burger.open span:nth-child(2) { opacity: 0; }
.header__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav — hidden on desktop entirely */
.mobile-nav {
  display: none;
  position: fixed; top: var(--header-h); left: 0; right: 0;
  background: rgba(2,12,24,0.97); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border); z-index: 999;
  padding: 24px 28px; flex-direction: column; gap: 20px;
}
.mobile-nav .nav-link { font-size: 16px; }
.mobile-nav__actions { display: flex; gap: 10px; margin-top: 8px; }

@media (max-width: 768px) {
  .header__nav, .header__actions { display: none; }
  .header__burger { display: flex; }

  .mobile-nav {
    display: flex;
    transform: translateY(-110%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .mobile-nav.open { transform: translateY(0); }
}
