:root {
  --color-black: hsl(0, 0%, 10%);
  --border-radius: 0.75rem;
  --gap: 0.5rem;
  --card-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px,
    rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Poppins";
}
.cards {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.card {
  min-height: 375px;
  width: 300px;
  border: 1px solid var(--color-black);
  border-radius: calc(var(--border-radius) + var(--gap));
  display: grid;
  grid-template-rows: 200px 1fr;
  overflow: hidden;
  box-shadow: var(--card-shadow);

  & .card-img {
    width: 100%;
    overflow: hidden;
    border: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);

    & img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
      transition: scale 0.25s ease-in;
    }
  }

  & .card-details {
    display: flex;
    flex-direction: column;
    padding: calc(var(--gap) * 2);

    & > *:last-child {
      margin-block-start: auto;
      padding-block-start: calc(var(--gap) * 2);
    }

    & .card-btns {
      display: flex;
      column-gap: var(--gap);
    }

    & button {
      height: 36px;
      aspect-ratio: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: transparent;
      border: 1px solid hsl(0, 0%, 40%);
      border-radius: 50%;
      outline: none;
      cursor: pointer;
    }
  }

  &:hover {
    & .card-img > img {
      scale: 1.1;
    }
  }
}

.retro-grid {
  display: grid;
  grid-template-columns: repeat(var(--col-count), 1fr);
  overflow: hidden;
  position: fixed;
  user-select: none;
  z-index: -1;

  &::after {
    content: " ";
    width: calc(110vw);
    height: calc(100%);
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(158deg, transparent 8%, rgb(255, 255, 255) 50%);
  }
  .grid-item {
    width: var(--size);
    height: var(--size);
    outline: 1px solid hsl(0, 0%, 50%);
    opacity: 0.4;
  }
}
