* {
  box-sizing: border-box;
}

  body {
    margin: 0;
    background: #111;
    font-family: 'Google Sans Code', sans-serif;
    letter-spacing: 0.2em;
  }

.masonry {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 0;
}

@media (max-width: 1200px) {
  .masonry {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 800px) {
  .masonry {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 500px) {
  .masonry {
    grid-template-columns: repeat(3, 1fr);
  }
}


  header {
    padding: 80px 0;
    text-align: center;
    color: #eee;
    font-family: 'Google Sans Code', sans-serif;
  }

header h1 {
  margin: 0;
  font-size: clamp(1rem, 5vw, 1.5rem);
  overflow-wrap: anywhere;
}

@media (max-width: 500px) {
  header {
    padding: 40px 0;
  }
}


.masonry-item {
  margin: 0;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1/1;
}

.masonry-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1);
  filter: grayscale(100%) sepia(20%);
  transition: transform 0.5s ease, filter 0.5s ease;
}

.masonry-item:hover img {
  transform: scale(1.2);
  filter: none;
}

footer {
  text-align: center;
  padding: 20px 20px;
  color: #eee;
  font-size: 0.9rem;
  margin-top: 40px;
}

  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
    z-index: 900;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

.overlay.open {
  opacity: 1;
  visibility: visible;
}

.image-card {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  height: 80vh;
  background: #000;
  color: #eee;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(.25, .8, .25, 1), opacity 0.5s cubic-bezier(.25, .8, .25, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  pointer-events: none;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  overflow: hidden;
}

.image-card.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

  .card-header {
    position: relative;
    padding: 10px 15px;
    background: #000;
    border-bottom: none;
    text-align: center;
    color: #eee;
  }

  .card-title {
    font-size: 1.2rem;
    font-weight: normal;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Google Sans Code', sans-serif;
  }

.card-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #fff;
  position: absolute;
  top: 50%;
  right: 25px;
  transform: translateY(-50%);
}

  .card-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 10px;
    text-align: center;
  }

.card-body img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
}

.card-text {
  margin-top: 20px;
  font-size: 0.9rem;
  text-align: center;
}

.card-location {
  margin-top: 10px;
  font-size: 0.8rem;
  opacity: 0.8;
}

body.no-scroll {
  overflow: hidden;
}
