/* Tab bar with a sliding stripe, used under the title on the Photography and Writing pages */

.tabbed-hero {
  padding-bottom: 0;
}

/* The sliding tab stripe replaces the fixed one under the title */
.tabbed-hero::after { display: none; }

.tabbed-hero h1 {
  margin-bottom: 44px;
}

.tab-bar {
  position: relative;
  display: flex;
  gap: 40px;
  max-width: var(--max-width);
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-bar::-webkit-scrollbar { display: none; }

.tab-bar button {
  flex: 0 0 auto;
  background: none;
  border: 0;
  padding: 4px 0 16px;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  white-space: nowrap;
  color: var(--muted);
  transition: color 0.25s ease;
}

.tab-bar button:hover,
.tab-bar button.active { color: var(--accent); }

.tab-bar button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* Sits on top of the hero's bottom line */
.tab-indicator {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 6px;
  width: 0;
  background: var(--accent);
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1), width 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

/* Fades the panel out and back in while switching tabs */
.tab-panel { transition: opacity 0.2s ease; }
.tab-panel.is-switching { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .tab-indicator,
  .tab-panel { transition: none; }
}

@media (max-width: 560px) {
  .tab-bar { gap: 28px; }
  .tabbed-hero h1 { margin-bottom: 32px; }
}
