main {
  padding-top: 24vh;
}

main h2 {
  margin-top: 20vh;
  font-size: 3rem;
}

.gallery {
	display: flex;
	flex-wrap: wrap;
	margin: -1rem -1rem; /* Compensate for excess margin on outer gallery flex items */
}

.member {
  position: relative;
  margin: 1rem; /* Margin value should be half of grid-gap value as margins on flex items don't collapse */

  overflow: hidden;
	flex: 1 0 24rem; /* Minimum width of 24rem and grow to fit available space */
  background-color: #000;
}

.member img {
	display: block;
  position: absolute;
  top: 0;
  left: 0;
	height: 100%;
  width: 100%;

	object-fit: cover;
}
.member img.side {
  object-position: center center;
  transition: opacity .3s ease-out;
}
.member:hover img.side {
  opacity: 0;
}

.info {
  visibility: hidden;
  position: absolute;
  bottom: 0;

  padding: .5rem;
  background-color: rgba(0, 0, 0, 0);
}
.info .name {
  margin: 0 0 .1rem;
  color: #eee;
}
.info .role {
  margin: 0 0 .4rem;
  color: #cccdc7;
}
.info .location {
  margin: 0;
  color: #cccdc7;
}
.bio {
  display: block;
  margin-top: 1rem;
  color: white;
}


.gallery,
.member {
  margin: 0;
}

.gallery {
  display: grid;
}

/* mobile */
@media screen and (max-width: 600px) {
  .gallery {
    grid-template-columns: 100%;
    grid-auto-rows: 160vw;
  }
}

/* tablet */
@media screen and (min-width: 600px) and (max-width: 1200px) {
  .gallery {
    grid-template-columns: repeat(2, 50%);
    grid-auto-rows: 80vw;
  }
}

/* desktop */
@media screen and (min-width: 1200px) {
  .gallery {
    grid-template-columns: repeat(3, calc(100% / 3));
    grid-auto-rows: 53vw;
  }
}

/* widescreen */
@media screen and (min-width: 1600px) {
  .gallery {
    grid-template-columns: repeat(4, 25%);
    grid-auto-rows: 40vw;
  }
}
