/* Mobile layout fixes: keep images inside their cards and prevent horizontal page overflow. */
body { overflow-x: clip; }

/* Home: project card images. On phones the 20rem min-height combined with the 4/3 aspect ratio
   forced the image to ~427px wide, wider than the screen. */
.project-image[data-astro-cid-y2vllrex] { min-width: 0; }
@media (width <= 640px) {
  .project-image[data-astro-cid-y2vllrex],
  .project-card--reversed[data-astro-cid-y2vllrex] .project-image[data-astro-cid-y2vllrex] {
    min-height: 0;
    width: 100%;
  }
}

/* Case studies: let single-column sections shrink below their longest word. */
@media (width <= 900px) {
  .case-section[data-astro-cid-wmell25a] { grid-template-columns: minmax(0, 1fr); }
}
@media (width <= 640px) {
  .case-section__content[data-astro-cid-wmell25a] h2[data-astro-cid-wmell25a] {
    font-size: clamp(1.9rem, 9vw, 2.4rem);
    overflow-wrap: break-word;
  }
}

/* Home: long project titles (e.g. "Guest Performances") on the narrowest phones. */
.project-info[data-astro-cid-y2vllrex] { min-width: 0; }
@media (width <= 640px) {
  .project-title[data-astro-cid-y2vllrex] h3[data-astro-cid-y2vllrex] {
    font-size: clamp(1.8rem, 10vw, 2.35rem);
    overflow-wrap: break-word;
  }
}

/* Same line spacing for large headings in every language (matches the Polish version). */
.display, .section-title { line-height: 1 !important; }
