/* ── Site Header ── */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}

/* ── Logo ── */
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo:hover { text-decoration: none; }

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 800;
  font-size: 14px;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.logo-mark-sm {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.logo-text {
  font-weight: 700;
  font-size: 16px;
  color: var(--color-text);
  display: none;
}
@media (min-width: 400px) {
  .logo-text { display: inline; }
}

/* ── Nav ── */
.main-nav {
  display: none;
  flex-direction: column;
  gap: 0;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: 8px 0;
  box-shadow: var(--shadow);
}
.main-nav.open { display: flex; }

@media (min-width: 768px) {
  .main-nav {
    display: flex;
    flex-direction: row;
    position: static;
    border: none;
    padding: 0;
    box-shadow: none;
    flex: 1;
    gap: 4px;
  }
}

.nav-link {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius);
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
  text-decoration: none;
}

/* ── Header actions ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.header-user:hover {
  background: var(--color-primary-light);
  text-decoration: none;
}

.avatar-circle {
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.header-username {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  display: none;
}
@media (min-width: 480px) {
  .header-username { display: inline; }
}

/* ── Hamburger ── */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius);
  flex-shrink: 0;
  order: -1;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 768px) {
  .nav-toggle { display: none; }
}