@import url("https://fonts.googleapis.com/css?family=Cardo:400i|Rubik:400,700&display=swap");
:root {
  --d: 700ms;
  --e: cubic-bezier(0.19, 1, 0.22, 1);
  --font-sans: "Rubik", sans-serif;
  --font-serif: "Cardo", serif;
}

* {
  box-sizing: border-box;
}

.people-grid-desc-page-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 2rem;
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  font-family: var(--font-sans);
  justify-content: center;
}

.people-grid-desc-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: 1rem;
  flex: 1 1 calc(100% - 1rem);
  min-width: 150px;
  max-width: 255px;
  min-height: 350px;
  max-height: 450px;
  color: whitesmoke;
  border-radius: 8px;
  background-color: whitesmoke;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1), 0 2px 2px rgba(0, 0, 0, 0.1), 0 4px 4px rgba(0, 0, 0, 0.1), 0 8px 8px rgba(0, 0, 0, 0.1), 0 16px 16px rgba(0, 0, 0, 0.1);
}

.people-grid-desc-card:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 110%;
  background-size: cover;
  background-position: center;
  background-image: var(--bg-image);
  transition: transform calc(var(--d) * 1.5) var(--e);
  pointer-events: none;
}

.people-grid-desc-card:after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200%;
  pointer-events: none;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.009) 11.7%, rgba(0, 0, 0, 0.034) 22.1%, rgba(0, 0, 0, 0.072) 31.2%, rgba(0, 0, 0, 0.123) 39.4%, rgba(0, 0, 0, 0.182) 46.6%, rgba(0, 0, 0, 0.249) 53.1%, rgba(0, 0, 0, 0.32) 58.9%, rgba(0, 0, 0, 0.394) 64.3%, rgba(0, 0, 0, 0.468) 69.3%, rgba(0, 0, 0, 0.54) 74.1%, rgba(0, 0, 0, 0.607) 78.8%, rgba(0, 0, 0, 0.668) 83.6%, rgba(0, 0, 0, 0.721) 88.7%, rgba(0, 0, 0, 0.762) 94.1%, rgba(0, 0, 0, 0.79) 100%);
  transform: translateY(-50%);
  transition: transform calc(var(--d) * 2) var(--e);
}

.people-grid-desc-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  transition: transform var(--d) var(--e);
  z-index: 1;
}
.people-grid-desc-content > * + * {
  margin-top: 0;
}

.people-grid-desc-title {
  font-size: 28px;
  font-weight: bold;
  color: white;
  line-height: 1.1;
  margin-bottom: 0.1rem;
}

.people-grid-desc-subtitle {
  font-size: 20px;
  font-weight: bold;
  color: white;
  line-height: 1.1;
  margin-top: 0;
  padding-bottom: 10px;
}

.people-grid-desc-title,
.people-grid-desc-subtitle {
  text-shadow:
    2px 2px 8px rgba(0, 0, 0, 0.8),
    0 0 5px rgba(0, 0, 0, 0.5),
    1px 1px 2px rgba(0, 0, 0, 0.6);
}

.people-grid-desc-description {
  font-family: var(--font-serif);
  font-size: 20px;
  font-style: italic;
  line-height: 1.2;
}

@media (hover: hover) and (min-width: 600px) {
  .people-grid-desc-card:after {
    transform: translateY(0);
  }

  .people-grid-desc-content {
    transform: translateY(calc(100% - 7.5rem));
  }
  .people-grid-desc-content > *:not(.people-grid-desc-title):not(.people-grid-desc-subtitle) {
    opacity: 0;
    transform: translateY(1rem);
    transition: transform var(--d) var(--e), opacity var(--d) var(--e);
  }
  .people-grid-desc-card:hover:before,
.people-grid-desc-card:focus-within:before {
    transform: translateY(-4%);
  }
  .people-grid-desc-card:hover:after,
.people-grid-desc-card:focus-within:after {
    transform: translateY(-50%);
  }
  .people-grid-desc-card:hover .people-grid-desc-content,
.people-grid-desc-card:focus-within .people-grid-desc-content {
    transform: translateY(0);
  }
  .people-grid-desc-card:hover .people-grid-desc-content > *:not(.people-grid-desc-title):not(.people-grid-desc-subtitle),
.people-grid-desc-card:focus-within .people-grid-desc-content > *:not(.people-grid-desc-title):not(.people-grid-desc-subtitle) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: calc(var(--d) / 8);
  }

  .people-grid-desc-card:focus-within:before, .people-grid-desc-card:focus-within:after,
.people-grid-desc-card:focus-within .people-grid-desc-content,
.people-grid-desc-card:focus-within .people-grid-desc-content > * {
    transition-duration: 0.3s;
  }
}

@media (min-width: 600px) {
  .people-grid-desc-card {
    height: auto;
  }
}

@media (max-width: 599px) {
  .people-grid-desc-description {
    display: none;
  }

  .people-grid-desc-card {
    min-height: 150px;
    max-height: 150px;
    height: 150px;
	width: 200px;
  }

  .people-grid-desc-content {
    transform: translateY(calc(100% - 5rem));
  }

  .people-grid-desc-card {
    flex: 0 1 auto; /* prevents stretching to full width */
  }
	
  .people-grid-desc-card:before {
  background-position: 25% 25%;
}
}