.gallery-grid {
  display: grid;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1em;
  align-items: flex-start;
  grid-template-columns: repeat(auto-fit, minmax(150px,0.25fr));
}
@media (max-width: 600px) {
.gallery-grid {
  display: grid;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1em;
  align-items: flex-start;
  grid-template-columns: repeat(auto-fit, minmax(150px,1fr));
}
}
.gallery-grid img {
  cursor: pointer;
  height: auto;
  border: 1px solid rgb(var(--accent-color));
  border-radius: 4px;
  transition: transform 0.2s;
}

.gallery-grid img:hover {
  transform: scale(1.05);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(var(--background-color), 0.85);
  /*display: flex;*/
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal img {
  margin: 3rem auto 1rem;
  max-width: 90%;
  max-height: 75%;
}

.modal-caption {
  color: rgb(var(--text-color));
  text-align: center;
  margin: 1rem auto;
  font-size: 1rem;
  max-width: 90%;
  line-height: 1.4;
}