/* =========================
   BLOG HEADER
   ========================= */
.blog-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: transparent;
  transition: all 300ms var(--ease-in-out);
}

.blog-header--scrolled {
  background: color-mix(in oklab, var(--background) 70%, transparent);
  backdrop-filter: blur(var(--blur-xl));
  -webkit-backdrop-filter: blur(var(--blur-xl));
  border-bottom: 1px solid var(--border);
}

.blog-header__container {
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--container-7xl);
  height: 5rem;
  padding: 0 1rem;
}

/* Brand / Logo */
.blog-header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.blog-header__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}

.blog-header__logo-img {
  height: 2.5rem;
  width: auto;
  user-select: none;
  filter: drop-shadow(0 0 18px oklch(0.62 0.22 25 / 0.45));
  mix-blend-mode: screen;
}

.blog-header__badge {
  display: none;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface) 60%, transparent);
  padding: 0.125rem 0.625rem;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  color: var(--primary);
}

@media (min-width: 640px) {
  .blog-header__badge {
    display: inline;
  }
}

/* =========================
   CATEGORY NAVIGATION (single row, compact)
   Sits between brand and actions inside the existing header container.
   All links are plain crawlable <a href> elements; no JavaScript is
   required for navigation.
   ========================= */
.blog-header__nav {
  display: none;
  /* The nav is the flexible middle element: it can never push the brand
     or actions out of the container, and any extreme overflow is contained
     inside the bar (never causes horizontal page overflow). */
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.blog-header__nav::-webkit-scrollbar {
  display: none;
}

@media (min-width: 1024px) {
  .blog-header__nav {
    display: flex;
  }
}

.blog-header__nav-link {
  flex-shrink: 0;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.8125rem;
  font-weight: var(--font-weight-medium);
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 300ms var(--ease-in-out);
}

.blog-header__nav-link:hover {
  color: var(--foreground);
}

/* Active category — weight + underline indicator (never color alone).
   The underline renders outside the text box so it cannot increase
   layout width or cause overflow. */
.blog-header__nav-link.is-active {
  color: var(--foreground);
  font-weight: var(--font-weight-semibold);
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.blog-header__nav-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Slightly tighter rhythm on entry-level desktop widths so all 10
   categories stay comfortably inside the container. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .blog-header__nav {
    gap: 0.625rem;
  }

  .blog-header__nav-link {
    font-size: var(--text-xs);
  }
}

/* Actions */
.blog-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-header__cta {
  display: none;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
  border-radius: 9999px;
  background: var(--primary);
  padding: 0.5rem 1rem;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--primary-foreground);
  text-decoration: none;
  box-shadow: 0 0 30px -8px oklch(0.62 0.22 25 / 0.7);
  transition: background 300ms var(--ease-in-out);
}

.blog-header__cta:hover {
  background: var(--primary-glow);
}

@media (min-width: 640px) {
  .blog-header__cta {
    display: inline-flex;
  }
}

.blog-header__cta-icon {
  height: 1rem;
  width: 1rem;
}

.blog-header__menu-btn {
  display: inline-flex;
  border-radius: calc(var(--radius) - 2px);
  padding: 0.5rem;
  color: var(--foreground);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 300ms var(--ease-in-out);
}

.blog-header__menu-btn:hover {
  background: var(--surface);
}

@media (min-width: 1024px) {
  .blog-header__menu-btn {
    display: none;
  }
}

.blog-header__menu-icon {
  height: 1.25rem;
  width: 1.25rem;
}