/* Header Component */

.site-header {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
  color: white;
  padding: var(--space-3) 0;
}

.site-header .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

@media (min-width: 768px) {
  .site-header .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.site-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: white;
  margin: 0;
}

@media (min-width: 640px) {
  .site-title {
    font-size: var(--text-2xl);
  }
}

/* Header Stats */
.header-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

@media (min-width: 640px) {
  .header-stats {
    gap: var(--space-3);
  }
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  transition: transform var(--duration-normal) var(--ease-out),
              background var(--duration-normal) var(--ease-out);
}

@media (hover: hover) {
  .stat-pill:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
  }
}

.stat-value {
  font-weight: var(--font-bold);
  font-family: var(--font-mono);
}

.stat-label {
  opacity: 0.9;
}

.stat-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.3);
  margin: 0 var(--space-1);
}

@media (max-width: 639px) {
  .stat-divider {
    display: none;
  }

  /* Header more compact on mobile */
  .site-header {
    padding: var(--space-2) 0;
  }

  .site-title {
    font-size: var(--text-lg);
  }

  /* Stats pills readable on mobile */
  .stat-pill {
    font-size: 11px; /* Minimum readable, not 10px */
    padding: var(--space-1) var(--space-2);
  }

  .stat-value {
    font-size: 12px;
  }
}

/* Very small screens - stack stats as grid */
@media (max-width: 374px) {
  .header-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-1);
    width: 100%;
  }

  .stat-pill {
    justify-content: center;
    text-align: center;
  }
}

/* Clickable Tags Pill */
button.stat-pill--tags {
  cursor: pointer;
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.4);
}

button.stat-pill--tags:hover {
  background: rgba(16, 185, 129, 0.35);
  border-color: rgba(16, 185, 129, 0.6);
  transform: translateY(-2px);
}

button.stat-pill--tags:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}
