:root {
  --timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  --animation-duration: 250ms;
}

.gallery {
  display: grid;
  max-width: 1140px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-auto-rows: 240px;
  grid-gap: 12px;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.gallery__item {
  position: relative;
  box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.2),
    0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 2px 1px -1px rgba(0, 0, 0, 0.12);
}

.gallery__image:hover {
  transform: scale(1.03);
}

.gallery__image {
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: transform var(--animation-duration) var(--timing-function);
}

.gallery__link {
  display: block;
  text-decoration: none;
  height: 100%;
}

.gallery__link:hover {
  cursor: zoom-in;
}
