/* Page-specific theme for the As an Urban Bird case file.
   Palette pulled straight from the project's own title card: the deep
   night-blue sky the birds fly across, and the grayish-white of the
   birds themselves. Plus a small set of bird-only extras (the stat
   chips, the handwritten aside, and the soundtrack toggle) that don't
   belong in the shared stylesheet since no other project uses them. */

.project-page[data-theme="bird"] {
  --proj-accent: #2C3B5E;      /* night-sky navy, sampled from main.jpeg */
  --proj-accent-2: #AEB3BD;    /* dove gray, sampled from the bird silhouettes */
  --proj-accent-soft: #EEF0F4; /* pale gray-blue tint */
  --proj-ink: #1E2230;         /* near-black navy ink */
}

.project-page[data-theme="bird"] .project-main a {
  color: var(--proj-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---- Hero figure is now a link to the video. The shared
   .project-hero-figure img rule in style.css expects the img to be a
   direct flex-item child of the figure (it stretches via flex: 1 1
   auto) — wrapping it in <a> demotes the img to a plain block child,
   so the anchor needs the same flex treatment in its place. */
.project-page[data-theme="bird"] .project-hero-figure a {
  display: flex;
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

.project-page[data-theme="bird"] .project-hero-figure img {
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  min-height: 0;
  transition: transform 0.35s ease;
}

.project-page[data-theme="bird"] .project-hero-figure a:hover img {
  transform: scale(1.035);
}

.project-page[data-theme="bird"] .project-main a:hover {
  color: var(--proj-ink);
}

/* ---- Stat chips: the collision numbers from the Overview section,
   pulled out of the paragraph so the scale of the problem registers
   at a glance rather than getting lost in running text. ---- */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 22px 0 28px;
}

.stat-chip {
  flex: 1 1 160px;
  padding: 18px 20px;
  background: var(--proj-accent-soft);
  border: 1.5px solid var(--proj-ink);
  border-radius: 4px 14px 3px 12px / 12px 3px 14px 4px;
  box-shadow: 5px 5px 0px var(--proj-accent-2);
}

.stat-chip .stat-number {
  display: block;
  font-family: "Just Me Again Down Here", cursive;
  font-weight: 400;
  font-size: 2.4em;
  line-height: 1;
  color: var(--proj-accent);
}

.stat-chip .stat-label {
  display: block;
  margin-top: 6px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  color: var(--proj-ink);
  opacity: 0.75;
  line-height: 1.35;
}

/* ---- Handwritten aside: a small personal note, styled like a piece
   of tape holding a scrap of paper to the page rather than another
   formal figure caption. ---- */
.hand-note {
  position: relative;
  max-width: 480px;
  margin: 8px 0 30px;
  padding: 16px 22px;
  background: #ffffff;
  border: 1.5px solid var(--proj-ink);
  border-radius: 2px;
  transform: rotate(-1.6deg);
  box-shadow: 4px 5px 0px var(--proj-accent-2);
  font-family: "Just Me Again Down Here", cursive;
  font-weight: 400;
  font-size: 1.4em;
  line-height: 1.3;
  color: var(--proj-ink);
}

.hand-note::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 36px;
  width: 54px;
  height: 18px;
  background: rgba(174, 179, 189, 0.55);
  transform: rotate(-3deg);
}

/* ---- Floating soundtrack toggle (same behavior as Orbit Errands —
   script.js wires up any #music-toggle / #mission-audio pair it
   finds, so this is just the visual half, retinted to the bird
   palette). ---- */
.music-toggle {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px 11px 15px;
  background: var(--proj-accent, #2C3B5E);
  color: #ffffff;
  border: 1.5px solid var(--proj-ink, #1E2230);
  border-radius: 999px;
  font-family: "Aubrey", serif;
  font-size: 1rem;
  line-height: 1;
  cursor: none;
  box-shadow: 5px 5px 0px var(--proj-accent-2, #AEB3BD);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.music-toggle:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0px var(--proj-accent-2, #AEB3BD);
}

.music-toggle .music-icon {
  display: inline-block;
  font-size: 1.15rem;
  transition: transform 0.6s linear;
}

.music-toggle.playing {
  background: var(--proj-accent-2, #AEB3BD);
}

.music-toggle.playing .music-icon {
  animation: bird-music-spin 2.2s linear infinite;
}

@keyframes bird-music-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.music-toggle .music-label::after {
  content: "Play soundtrack";
}

.music-toggle.playing .music-label::after {
  content: "Pause soundtrack";
}

@media (max-width: 720px) {
  .music-toggle {
    right: 16px;
    bottom: 16px;
    padding: 9px 14px 9px 12px;
    font-size: 0.85rem;
  }

  .stat-chip {
    flex: 1 1 120px;
  }

  .hand-note {
    font-size: 1.2em;
  }
}
