*::selection {
  background-color: var(--tertiary-container);
}

body {
  background-color: var(--surface);
  color: var(--on-surface);
  margin: 0;
}

.header {
  margin-top: 9vh;
  padding: 3%;
}

.header h1 {
  font-family: "Nova Cut", serif;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 1%;
}

.header svg {
  width: 30%;
  display: block;
  margin: auto;
}

.gallery {
  display: flex;
  column-gap: 3%;
  margin: 0 6%;
}

.gallery .row {
  display: flex;
  flex-direction: column;
  width: 100%;
  object-fit: cover;
}

.gallery .row img {
  margin-bottom: 10%;
  border-radius: 10px;
  width: 100%;
  object-fit: cover;
  max-height: calc((100vh)*0.8);
  transition: scale .2s ease-in-out, rotate .2s ease-in-out;
  cursor: pointer;
  opacity: 1;
}

.gallery .row img.hidden {
  opacity: 0
}

.gallery img:hover {
  scale: 1.03;
}

.gallery :is(
  .row:first-child img:nth-child(3n-2),
  .row:nth-child(2) img:nth-child(3n-1),
  .row:last-child img:nth-child(3n)
):hover { rotate: 2deg; }

.gallery :is(
  .row:first-child img:nth-child(3n-1),
  .row:nth-child(2) img:nth-child(3n),
  .row:last-child img:nth-child(3n-2)
):hover { rotate: -1.2deg; }

.gallery :is(
  .row:first-child img:nth-child(3n),
  .row:nth-child(2) img:nth-child(3n-2),
  .row:last-child img:nth-child(3n-1)
):hover { rotate: 0.8deg; }

.overlay {
  display: none;
}

.overlay.show {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  position: fixed;
  top: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  padding: 3%;
  box-sizing: border-box;
  background-color: hsla(0, 0%, 0%, 0.614)
}

.overlay img {
  max-width: 60%;
  max-height: 70%;
  border-radius: 10px;
}

.overlay button {
  border: none;
  background-color: var(--primary);
  border-radius: 50%;
  padding: 20px;
  margin: 3%;
  cursor: pointer;
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
}

.overlay svg {
  width: 100%;
  height: 100%;
  stroke: var(--on-primary);
}

.overlay p {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5em;
  color: var(--on-primary);
}

.overlay a {
  background-color: var(--primary);
  border-radius: 1000px;
  padding: 10px 30px;
  text-align: center;
  color: var(--on-primary);
  text-decoration: none;
  font-family: "Nunito", sans-serif;
  font-weight: 600;
  letter-spacing: .05em;
}

.overlay a:visited {
  color: var(--on-primary)
}