.portfolio {
  height: 100%;

  & > h2 {
    height: auto;
    padding: 0 calc(20vw / 2);
    font-size: 6rem;
    text-align: left;
    line-height: 6rem;
  }
}

.sections {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 4rem calc(20vw / 2);
}

.portfolio-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 0.2rem;

  &:hover {
    .cover {
      transform: scale(1.05);
      filter: brightness(0.6);
    }
    .infos {
      .category-name {
        &::after {
          transform: translateX(-50%) scaleX(1.2);
        }
      }
    }
  }

  .infos {
    position: absolute;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
    top: 0;
    left: 0;
    z-index: 2;
    width: 100%;
    height: 100%;

    .card-name {
      position: relative;
      pointer-events: none;
      text-wrap: nowrap;
      font-size: 1rem;
      text-align: center;
      text-transform: uppercase;
      text-shadow: 0 0 1rem var(--obsidian);

      &::after {
        content: "";
        position: absolute;
        bottom: -1rem;
        left: 50%;
        display: block;
        width: 16rem;
        height: 1px;
        border-radius: 1rem;
        background-color: var(--ghost);
        box-shadow: 0 0 1rem var(--obsidian);
        transform: translateX(-50%);
        transition: transform 0.25s ease-out;
      }
    }

    .card-year {
      pointer-events: none;
      font-size: 0.8rem;
      font-style: italic;
      text-transform: uppercase;
      text-shadow: 0 0 1rem var(--obsidian);
    }
  }

  a {
    width: 100%;
    height: 100%;
  }

  .cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease-out;
    filter: brightness(0.4);

    transition: all 0.25s ease-out;
  }
}

& .portfolio-heading {
  position: relative;
  padding: 0 10vw;

  & .title {
    font-size: 3.2rem;
    font-weight: 600;
    text-align: left;
    margin: 0;
    margin-bottom: 1rem;
  }
  & .subtitle {
    margin-bottom: 3rem;
    font-size: 1.5rem;
    font-weight: 300;
    text-align: left;
    color: var(--color3);
  }

  & .splitterline {
    position: relative;
    left: 50%;
    width: 100%;
    height: 1px;
    transform: translateX(-50%);
    background-color: var(--color3);

    & .decoration {
      position: absolute;
      top: -50%;
      left: 50%;
      width: 1rem;
      height: 1.5rem;
      transform: translate(-50%, -50%);
      background-color: var(--obsidian);
      border-left: 1px solid var(--color3);
      border-right: 1px solid var(--color3);
    }
  }
}

@media (min-width: 768px) {
  .portfolio-card {
    .infos {
      .card-name {
        font-size: 1.5rem;
      }

      .card-year {
        font-size: 1rem;
      }
    }
  }
}

@media (min-width: 1200px) {
  .sections {
    margin-top: 2rem;
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-card {
    .infos {
      .card-name {
        font-size: 2rem;
      }

      .card-year {
        font-size: 1rem;
      }
    }
  }

  & .portfolio-heading {
    & .title {
      font-size: 8rem;
    }
    & .subtitle {
      font-size: 2.6rem;
      margin-bottom: 6rem;
    }
  }
}
