.team-list {
  position: relative;
  margin: 100px 0;
  padding-bottom: 100px;

  @include sm {
    margin: 60px 0;
    padding: 1px;
  }

  &__wrapper {
    width: 100%;
    max-width: $max-width;
    padding: 0 $gutter;
    margin: 0 auto;

    @include sm {
      padding: 0 $gutter-mobile;
    }
  }

  &__header {
    h2 {
      color: $primary-color;
      max-width: 800px;
      margin: 2.5rem auto;
      text-align: center;

      @include sm {
        font-size: 2.7rem;
        line-height: 3.3rem;
        margin: 2rem auto;
      }
    }
  }

  &__list {
    display: flex;
    flex-wrap: wrap;
    padding: 0 calc(100% / 12);
    margin: 0 auto;

    @include sm {
      padding: 0;
      margin: 0 -$half-gutter;
    }
  }

  &__member {
    margin: 28px 0;
    padding: 0 $half-gutter;
    width: calc(100% / 12 * 3);
    cursor: pointer;

    @include mdx {
      width: calc(100% / 12 * 4);
    }

    @include sm {
      margin: 20px 0;
      width: calc(100% / 12 * 6);
      padding: 0 4px;
    }

    &:hover {
      .team-list__member-content {
        transform: translateY(-10px);
      }
    }
  }

  &__member-image {
    @include image-aspect-ratio(100%, 123%);
    background-color: $gray-bluish;
  }

  &__member-content {
    color: $primary-color;
    transition: transform 300ms ease-out;
  }

  &__member-name {
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 3rem;
    margin-top: 40px;
    margin-bottom: 8px;
    display: block;

    @include sm {
      margin-top: 16px;
      margin-bottom: 4px;
      font-size: 1.8rem;
      line-height: 2.4rem;
    }
  }

  &__member-position {
    font-size: 2.1rem;
    line-height: 2.9rem;
    opacity: 0.6;

    @include sm {
      font-size: 1.4rem;
      line-height: 2.1rem;
    }
  }

  &__overlay {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100%;
    z-index: 10001;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-out;

    &::before {
      content: '';
      position: fixed;
      width: 100%;
      height: 100%;
      top: 0;
      left: 0;
      background: rgba(13, 24, 41, 0.6);
    }

    &.js-show {
      opacity: 1;
      pointer-events: all;
    }
  }

  &__drawer {
    background-color: $white;
    max-width: 700px;
    width: 100%;
    position: absolute;
    right: 0;
    height: 100%;
    overflow-y: auto;
    transform: translateX(100%);
    transition: 300ms transform ease-out;

    .js-show & {
      transform: translateX(0);
    }
  }

  &__detail {
    display: none;
    padding: 70px 117px 70px 87px;
    color: $primary-color;

    @include sm {
      padding: 16px 22px 30px 16px;
    }

    &.js-active {
      display: block;
    }
  }

  &__detail-header {
    display: flex;
    align-items: flex-start;

    @include sm {
      flex-direction: column;
    }
  }

  &__detail-image {
    @include image-aspect-ratio(40%, 129%);

    @include sm {
      @include image-aspect-ratio(73%, 129%);
    }

    flex-shrink: 0;
    background-color: $gray-bluish;
    margin-right: 30px;
  }

  &__detail-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-self: stretch;
  }

  &__detail-name {
    font-size: 3.8rem;
    line-height: 4rem;
    font-weight: 700;
    margin: 2rem 0 1.6rem;

    @include sm {
      font-size: 2.6rem;
      line-height: 3rem;
    }
  }

  &__detail-position {
    opacity: 0.6;

    @include sm {
      margin-bottom: 32px;
    }
  }

  &__detail-links {
    line-height: 0;

    a {
      margin-right: 10px;

      @include sm {
        margin-bottom: 16px;
      }
    }
  }

  &__detail-content {
    padding: 15px 30px;

    @include sm {
      padding: 0;
    }

    a {
      text-decoration: underline;
    }
  }

  &__close-drawer {
    position: absolute;
    top: 16px;
    right: 16px;
  }
}
