/* Mobile-only adjustments. Existing desktop styles remain unchanged. */
@media (max-width: 768px) {
  header {
    box-sizing: border-box;
    padding: 16px !important;
    flex-wrap: wrap;
  }

  .logo a img,
  .logo img {
    height: 64px !important;
  }

  .nav-links,
  header nav {
    margin-left: auto;
  }

  .page-title {
    flex-basis: 100%;
    order: 3;
    text-align: center;
  }

  .categories {
    gap: 12px 20px;
    flex-wrap: wrap;
  }

  .grid {
    grid-template-columns: 1fr;
    margin: 36px auto;
    padding: 0 16px;
  }

  .gallery-section {
    box-sizing: border-box;
    max-width: 100%;
    margin: 36px auto;
    padding: 0 16px;
  }

  .gallery-section h1 {
    font-size: 1.45em;
  }

  .slider-wrapper {
    max-width: 100%;
  }

  .slider img {
    max-width: 100%;
  }

  .prev,
  .next {
    min-width: 44px;
    min-height: 44px;
  }

  .about-content {
    display: block !important;
    max-width: 100% !important;
    margin: 36px auto !important;
    padding: 0 16px !important;
  }

  .about-content > div {
    max-width: 100% !important;
    margin-right: 0 !important;
  }

  .about-content img {
    width: 100% !important;
    margin-top: 24px;
  }

  footer {
    box-sizing: border-box;
    padding: 32px 16px;
  }

  .socials {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  header {
    gap: 8px;
  }

  .categories {
    width: 100%;
  }

  .project-card h2 {
    font-size: 1em;
  }
}

/* Portfolio quality-of-life styles */
.categories a.is-active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.back-to-portfolio {
  display: inline-block;
  margin: 0 0 24px;
  color: #111;
  font-weight: 600;
  text-decoration: none;
}

.back-to-portfolio:hover,
.back-to-portfolio:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.categories a:focus-visible,
.project-card:focus-visible,
.nav-links a:focus-visible,
.socials a:focus-visible {
  outline: 2px solid #111;
  outline-offset: 4px;
}
