/* Gallery grid */
#gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
  }
  
  .gallery-img {
    width: 100%;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease;
  }
  
  .gallery-img:hover {
    transform: scale(1.03);
  }

  .visually-hidden {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }  
  
  /* Lightbox overlay */
  #lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
  }
  
  #lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
  }

  .back-button {
    background-color: rgba(251, 117, 117, 0.4); /* translucent grey */
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }
  
  .back-button:hover {
    background-color: rgba(220, 46, 46, 0.6);
  }

  /* ------------------------------ */
/* 📱 MOBILE FIXES FOR PORTFOLIO */
/* ------------------------------ */
@media (max-width: 768px) {

  /* Back button spacing + size */
  .back-button {
    padding: 8px 14px;
    font-size: 0.9rem;
    margin: 10px;
  }

  /* Gallery grid becomes tighter + more columns */
  #gallery {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    padding: 10px;
  }

  /* Images scale nicely */
  .gallery-img {
    border-radius: 6px;
  }

  /* Lightbox stays the same — it's already responsive */
}

  