.cards {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 50px;
}

.card {
  width: 20%;
  height: 20rem;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  color: var(--color-secondary);
  box-shadow: 0 10px 30px 5px rgba(0, 0, 0, 0.2);

  img {
    position: absolute;
    object-fit: cover;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0.9;
    transition: opacity .2s ease-out;
  }

  h2 {
    position: absolute;
    inset: auto 30px 30px 30px;
    margin: 0;
    transition: inset .3s .3s ease-out;
    font-weight: normal;
    text-transform: uppercase;
  }

  p, a {
    position: absolute;
    opacity: 0;
    max-width: 80%;
    transition: opacity .3s ease-out;
  }

  p {
    inset: auto auto 80px 30px;
  }

  a {
    inset: auto auto 40px 30px;
    color: inherit;
    text-decoration: none;
  }

  .card-details {
    opacity: 0;
  }

  &:hover h2 {
    inset: auto 30px 220px 30px;
    transition: inset .3s ease-out;
  }

  &:hover p, &:hover a {
    opacity: 1;
    transition: opacity .5s .1s ease-in;
  }

  &:hover img {
    transition: opacity .3s ease-in;
    opacity: 1;
  }

}

.material-symbols-outlined {
  vertical-align: middle;
}

/* Transition to project content */
card.expanded {
  flex: 1 1 80%;
  height: 30rem;
  
}

.card.expanded .card-details {
  opacity: 1;
  max-height: 1000px; /* big enough to reveal full content */
  transition: all 0.5s ease;
}