:root {
  --body-bg: #1d1e22;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

html {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  padding: 10% 5%;
  background: var(--body-bg);
}

@media (min-width: 768px) {
  body {
    display: grid;
    align-items: center;
  }
}

img {
  vertical-align: top;
}

.list {
  display: grid;
  grid-template-columns: minmax(auto, 300px);
  justify-content: center;
  align-items: center;
  gap: 60px;
}

@media (min-width: 768px) {
  .list {
    grid-template-columns: repeat(3, minmax(auto, 350px));
    gap: 40px;
  }
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 5px;
  position: relative;
  background: #212121;
  transition: 0.5s;
}

.card::before,
.card::after {
  content: "";
  position: absolute;
  inset: -2px;
}

.card::before {
  z-index: -2;
  filter: blur(20px);
}

.card::after {
  z-index: -1;
}

.item:nth-child(1) .card::before,
.item:nth-child(1) .card::after {
  background: linear-gradient(
    45deg,
    #28fccd 0%,
    var(--body-bg) 50%,
    #db0f35 100%
  );
}

.item:nth-child(2) .card::before,
.item:nth-child(2) .card::after {
  background: linear-gradient(
    45deg,
    #60def6 0%,
    var(--body-bg) 50%,
    #9b1e06 100%
  );
}

.item:nth-child(3) .card::before,
.item:nth-child(3) .card::after {
  background: linear-gradient(
    45deg,
    #0ff394 0%,
    var(--body-bg) 50%,
    #eb0068 100%
  );
}

.card-info {
  order: 1;
  max-height: 0;
  color: #fff8e1;
  line-height: 1.2;
  text-align: center;
  letter-spacing: 1px;
  overflow: hidden;
  transition: max-height 0.3s;
}

.card:hover .card-info {
  max-height: 500px;
}

.card-title {
  padding-block: 10px;
  font-size: 14px;
  font-weight: bold;
}

.card-detail {
  padding-bottom: 10px;
  font-size: 12px;
}

.card-pic {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  opacity: 0.1;
  overflow: hidden;
  transition: 0.5s;
}

.card:hover .card-pic {
  opacity: 1;
}

.card-pic > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
