/* === Responsive Breakpoints === */

/* ── Tablet: ≤ 1024px ── */
@media (max-width: 1024px) {
  .gallery-grid {
    columns: 3 240px;
    column-gap: var(--space-md);
  }

  .gallery-card {
    margin-bottom: var(--space-md);
  }

  /* Blog */
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-grid--list .blog-card-image {
    flex: 0 0 220px;
    min-height: 160px;
  }

  .blog-toolbar {
    gap: var(--space-sm);
  }

  .about-grid {
    gap: var(--space-xl);
  }

  .about-image {
    aspect-ratio: 3 / 4;
  }

  .lightbox-prev {
    left: var(--space-sm);
  }

  .lightbox-next {
    right: var(--space-sm);
  }

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

/* ── Small Tablet / Large Phone: ≤ 768px ── */
@media (max-width: 768px) {
  /* Navigation */
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Hero */
  .hero-name {
    font-size: clamp(2rem, 8vw, 3.5rem);
  }

  .hero-bio {
    font-size: 0.9375rem;
    max-width: 100%;
    padding: 0 var(--space-md);
  }

  /* Gallery */
  .gallery-grid {
    columns: 2 220px;
    column-gap: var(--space-md);
  }

  .gallery-card {
    margin-bottom: var(--space-md);
  }

  .filter-bar {
    gap: var(--space-xs);
    padding: 0 var(--space-md);
  }

  .filter-pill {
    padding: 0.35rem 0.9rem;
    font-size: var(--fs-caption);
  }

  .gallery-card-overlay {
    opacity: 1; /* Always show overlay on touch devices */
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.6) 0%,
      transparent 60%
    );
  }

  .gallery-card-title {
    font-size: 0.9375rem;
  }

  .gallery-card-location {
    font-size: var(--fs-caption);
  }

  /* Blog */
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-grid--list .blog-card {
    flex-direction: column;
  }

  .blog-grid--list .blog-card-image {
    flex: none;
    width: 100%;
    min-height: auto;
  }

  .blog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .blog-search {
    max-width: none;
  }

  .blog-date-filter {
    justify-content: center;
  }

  .blog-layout-toggle {
    align-self: center;
  }

  .blog-modal-container {
    max-height: 96vh;
    margin: 2vh auto;
    border-radius: var(--radius-lg);
  }

  .blog-modal-scroll {
    padding: var(--space-lg);
  }

  .blog-post-cover {
    margin: calc(-1 * var(--space-lg));
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .blog-link-preview {
    flex-direction: column;
  }

  .blog-link-preview-image {
    flex: none;
    height: 160px;
  }

  .blog-comment-form-row {
    flex-direction: column;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .about-image {
    order: -1;
    max-width: 400px;
    margin: 0 auto;
  }

  .about-image img {
    aspect-ratio: 3 / 4;
  }

  .about-stats {
    justify-content: center;
  }

  .section-header--left {
    text-align: center;
  }

  .about-text {
    text-align: center;
  }

  .about-text .btn {
    margin: 0 auto;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-brand {
    flex-direction: column;
    gap: var(--space-xs);
  }

  /* Lightbox */
  .lightbox-info {
    bottom: var(--space-md);
  }

  .lightbox-close {
    top: var(--space-sm);
    right: var(--space-sm);
    width: 40px;
    height: 40px;
  }
}

/* ── Phone: ≤ 480px ── */
@media (max-width: 480px) {
  :root {
    --container-padding: 1.25rem;
    --space-section: 3rem;
  }

  .section-hero,
  .section-gallery,
  .section-about {
    padding-top: var(--space-section);
    padding-bottom: var(--space-section);
  }

  .section-hero {
    padding-top: calc(var(--nav-height) + var(--space-xl));
  }

  /* Hero */
  .hero-profile {
    width: 120px;
    height: 120px;
  }

  .hero-tagline {
    font-size: 1.0625rem;
  }

  .hero-bio {
    font-size: 0.875rem;
    padding: 0;
  }

  .hero-social {
    gap: var(--space-sm);
  }

  .social-link {
    width: 40px;
    height: 40px;
  }

  .hero-scroll-indicator {
    margin-top: var(--space-xl);
  }

  /* Gallery */
  .gallery-grid {
    columns: 1 180px;
    column-gap: var(--space-md);
  }

  .gallery-card {
    margin-bottom: var(--space-md);
  }

  .section-title {
    font-size: 1.625rem;
  }

  .section-description {
    font-size: 0.9375rem;
  }

  .section-header {
    margin-bottom: var(--space-lg);
  }

  .filter-bar {
    margin-bottom: var(--space-lg);
  }

  /* Blog */
  .blog-card-title {
    font-size: 1rem;
  }

  .blog-card-excerpt {
    font-size: var(--fs-caption);
  }

  .blog-card-body {
    padding: var(--space-md);
  }

  .blog-post-title {
    font-size: 1.375rem;
  }

  .blog-post-content {
    font-size: 0.9375rem;
  }

  .blog-post-content h3 {
    font-size: 1.0625rem;
  }

  .blog-date-filter {
    flex-wrap: wrap;
  }

  .blog-modal-scroll {
    padding: var(--space-md);
  }

  .blog-post-cover {
    margin: calc(-1 * var(--space-md));
    margin-bottom: var(--space-md);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }

  .blog-link-preview-image {
    height: 120px;
  }

  /* About */
  .about-stats {
    gap: var(--space-lg);
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .btn {
    padding: 0.65rem 1.5rem;
    font-size: 0.9375rem;
  }

  /* Lightbox */
  .lightbox-prev,
  .lightbox-next {
    width: 36px;
    height: 36px;
  }

  .lightbox-image-container {
    max-width: 95vw;
    max-height: 80vh;
  }

  .lightbox-image {
    max-width: 95vw;
    max-height: 80vh;
  }

  /* Back to top */
  .back-to-top {
    bottom: var(--space-md);
    right: var(--space-md);
    width: 40px;
    height: 40px;
  }
}

/* ── Very Small: ≤ 360px ── */
@media (max-width: 360px) {
  .gallery-grid {
    columns: 1 160px;
  }

  .about-stats {
    flex-direction: column;
    gap: var(--space-md);
  }
}

/* ── Large Desktop: ≥ 1600px ── */
@media (min-width: 1600px) {
  .gallery-grid {
    columns: 5 260px;
  }
}
