/* ========================================
   RESPONSIVE — All Media Queries
   ======================================== */

/* ---- Small (600px+) ---- */
@media (min-width: 600px) {
  .about__stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---- Medium (768px+) ---- */
@media (min-width: 768px) {
  .hero__info {
    flex-wrap: nowrap;
  }
}

/* ---- Large (900px+) ---- */
@media (min-width: 900px) {
  .about__grid {
    grid-template-columns: 0.42fr 0.58fr;
    gap: var(--space-20);
  }

  .connect__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---- Mobile + tablet: drop vignette; hero copy gets its own glass card (see sections.css) ---- */
@media (max-width: 899px) {
  .hero::after { display: none; }
}
@media (max-width: 599px) {
  .hero__graph-label { font-size: 9px; }
}

/* ---- Mobile adjustments (max-width) ---- */
@media (max-width: 599px) {
  .hero__name {
    font-size: 8vw;
    white-space: nowrap;
  }

  /* Glass card + CTA sizing lives in sections.css @media (max-width: 899px) */

  .about__stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

  .about__photo-wrap {
    max-width: 300px;
    margin: 0 auto;
  }

  .section__title {
    font-size: var(--text-2xl);
  }

  .connect__heading {
    font-size: clamp(1.25rem, 5vw + 0.25rem, 1.75rem);
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .connect__email-input {
    flex-direction: column;
  }

  .connect__email-input input {
    border-right: var(--border-subtle);
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-4);
  }

  .section__header {
    flex-wrap: wrap;
  }
}

/* ---- Very small screens ---- */
@media (max-width: 374px) {
  :root {
    --container-pad: 1rem;
  }

  .hero__name {
    font-size: 8vw;
  }

  .connect__heading {
    font-size: 1.1rem;
    line-height: 1.15;
  }
}

/* ---- Tablet breakpoint (720-899px) ---- */
@media (min-width: 720px) and (max-width: 899px) {
  .hero__name {
    font-size: clamp(3rem, 1.5rem + 5vw, 5.5rem);
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-card__img,
  .project-card__img-placeholder {
    min-height: 180px;
  }

  .about__stats {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
  }

  .section__header {
    gap: 1rem;
  }
}

/* ---- Selected Work: make a card fit a pinned phone viewport ----
   The stack in sections.css pins each card below the nav and slides the next
   over it. A pinned card taller than the room beneath the nav has its bottom
   stranded: the page is pinned, so there is no scroll left to reach it. At
   390px the cards measured 664px against 601px of room, which is why the phone
   gate used to demand a 800px-tall viewport no real phone has.

   Height comes out of the image first — it is the least load-bearing part of
   the card — then out of spacing. No text is truncated and no font drops below
   a comfortable reading size.

   Bounded by max-height too: an iPad in portrait has 1024px of viewport and
   needs none of this, and a squashed banner there would be a regression. */
@media (max-width: 900px) and (max-height: 900px) {
  .project-card__img,
  .project-card__img-placeholder { min-height: 132px; }

  .project-card__body {
    padding: 0.95rem 1.15rem 1.1rem;
    gap: 0.4rem;
    justify-content: flex-start;
  }

  .project-card__title { font-size: 1.24rem; line-height: 1.14; }
  .project-card__desc  { font-size: 0.8rem;  line-height: 1.45; }
  .project-card__role  { font-size: 0.66rem; line-height: 1.4; }
  .project-card__tags  { gap: 0.3rem; }
  .project-card__tags li { padding: 0.2rem 0.45rem; font-size: 0.63rem; }
  .project-card__link  { margin-top: 0.3rem; }
}
