:root {
  --team-width: min(80vw, 1400px);
  --team-margin: auto;

  --team-lead-colour-1: #AD79A1;
  --team-lead-colour-2: #AE8FA7;
  --team-lead-colour-3: var(--logo-purple);

  --student-colour-1: #70A198;
  --student-colour-2: var(--logo-green);
  --student-colour-3: #446660;

  --pi-coulour-1: #ffc272;
  --pi-coulour-2: #e18e30;
  --pi-coulour-3: #DB7B22;

  --instructor-colour-1: rgba(0, 0, 0, 0);
  --instructor-colour-2: rgba(0, 0, 0, 0.2);
  --instructor-colour-3: rgba(0, 0, 0, 0.4);

  --advisor-colour-1: #CD8388;
  --advisor-colour-2: #D26B72;
  --advisor-colour-3: var(--logo-red);

  --wetlab: var(--NRPieceS-beige);
  --sponsoring: #CDBFCA;
  --human-practice: #E1BEE7;
  --social-media: #C8E6C9;
  --drylab: #a2d4a6;
  --wiki: #BBDEFB;

  --button-font: 1vw;
  --name-font: 1.9vw;
  --study-font: 1vw;
  --subgroup-font: 0.9vw;
  --quote-font: 1.3vw;
  --author-font: 1vw;
  --emojis-font: 2vw;
}

#team-members-content {
  width: var(--team-width);
  margin: 0 var(--team-margin);
}

.folder-wrapper {
  position: relative;
  width: 100%;
  height: auto;
  overflow: visible;
  color: white;
  text-align: center;
  max-width: 800px;
  margin: auto;
  filter: drop-shadow(12px 10px 12px #3d3846);


  .folder-svg {
    position: absolute;
    top: 0;
    left: 0;
  }

  .more-svg {
    transition: transform 0.3s ease;
    transform-origin: center;
  }

  .more-svg:hover {
    transform: scale(1.02);
  }

  .folder-button {
    position: absolute;
    top: 2%;
    left: 51%;
    font-weight: 500;

    p {
      pointer-events: none;
      transition: font-weight 0.3s ease;
      font-size: var(--button-font);
    }

    .more {
      position: absolute;
      top: 0;
      left: 0;
    }

    .back {
      position: absolute;
      top: 0;
      left: 0;
      visibility: hidden;
    }

    p.hover-state {
      font-weight: 600;
    }
  }

  .folder-content {
    position: absolute;
    top: 10%;
    left: 0;
    height: 90%;
    width: 100%;
    overflow: hidden;


    .folder-front {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;

      .member-info {
        position: absolute;
        width: 57%;
        left: 0;
        top: 12%;
        height: 84%;

        .name {
          font-size: var(--name-font);
          margin-top: 10%;
          text-align: center;
        }

        .study {
          font-size: var(--study-font);
          font-style: italic;
        }

        .subgroups {
            position: absolute;
            top: 58%;
            width: 77%;
            margin-left: 10%;
            margin-right: 10%;
            border-top: solid white;
            border-width: 1.5px;
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 3%;
            padding-top: 4%;

          .subgroup {
            font-size: var(--subgroup-font);
            padding: 0.5% 5%;
            border-radius: 0.5vw;
            filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
            font-weight: 600;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);

          }
        }

      }

      .member-picture {
          position: absolute;
          bottom: 20%;
          width: 50%;
          height: 60%;
          object-fit: cover;
          transform: rotate(-90deg);
          box-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
          border-radius: 16%;
      }

    }

    .folder-inside {
      visibility: hidden;
      position: absolute;
      top: 0;
      left: 0;

      width: 80%;
      height: 100%;
      margin-left: 10%;
      margin-right: 10%;

      .full-quote {
        position: absolute;
        top: 12%;
        left: 0;
        width: 100%;
        height: 45%;
        align-content: center;

        .quote {
          width: 100%;
          margin-bottom: 0;

          font-size: var(--quote-font);
        }

        .author {
          width: 100%;
          font-size: var(--author-font);
          font-style: italic;
        }
      }
      .emojis {
        width: 80%;
        margin-left: 10%;
        margin-right: 10%;
        margin-bottom: 0;
        position: absolute;
        bottom: 20%;
        left: 0;
        font-size: var(--emojis-font);
      }
    }
  }

  .metadata {
    visibility: hidden;
    height: 0;
    width: 0;
  }
}

#team-members-folders {
  visibility: hidden;
  height: 0;
  width: 0;
}

#team-members-groups {
  width: 100%;
  margin: 0 auto;
}

.tm-group {
  margin-bottom: 40px;
}

.tm-group-title {

  font-weight: 600;
  font-size: 36px;
  text-align: center;

  border-bottom: solid black;

  width: fit-content;

  margin: 0 auto 30px;

  padding: 10px 40px;

}

.tm-group-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;

  justify-content: center;
}

@media (max-width: 1000px) {
  .tm-group-items {
    grid-template-columns: 1fr;
  }

  .folder-button {
    p {
      font-size: calc(var(--button-font) * 2) !important;
    }
  }

  .name {
    font-size: calc(var(--name-font) * 2) !important;
  }

  .study {
    font-size: calc(var(--study-font) * 2) !important;
  }

  .subgroup {
    font-size: calc(var(--subgroup-font) * 2) !important;
  }

  .quote {
    font-size: calc(var(--quote-font) * 2) !important;
  }

  .author {
    font-size: calc(var(--author-font) * 2) !important;
  }

  .emojis {
    font-size: calc(var(--emojis-font) * 2) !important;
  }

}

@media (min-width: 2200px) {
  .tm-group-items {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .folder-button {
    p {
      font-size: calc(var(--button-font) / 1.5) !important;
    }
  }

  .name {
    font-size: calc(var(--name-font) / 1.5) !important;
  }

  .study {
    font-size: calc(var(--study-font) / 1.5) !important;
  }

  .subgroup {
    font-size: calc(var(--subgroup-font) / 1.5) !important;
  }

  .quote {
    font-size: calc(var(--quote-font) / 1.5) !important;
  }

  .author {
    font-size: calc(var(--author-font) / 1.5) !important;
  }

  .emojis {
    font-size: calc(var(--emojis-font) / 1.5) !important;
  }
}

@media (min-width: 3180px) {
  .tm-group-items {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }

  .folder-button {
    p {
      font-size: calc(var(--button-font) / 2) !important;
    }
  }

  .name {
    font-size: calc(var(--name-font) / 2) !important;
  }

  .study {
    font-size: calc(var(--study-font) / 2) !important;
  }

  .subgroup {
    font-size: calc(var(--subgroup-font) / 2) !important;
  }

  .quote {
    font-size: calc(var(--quote-font) / 2) !important;
  }

  .author {
    font-size: calc(var(--author-font) / 2) !important;
  }

  .emojis {
    font-size: calc(var(--emojis-font) / 2) !important;
  }

}

#selector {
  height: fit-content;
  margin-left: 5vw;
  margin-top: 80px;
  margin-bottom: 4rem;

  label{
    font-weight: 600;
    font-size: 28px;
    margin-right: 2rem;
  }

  #groupBy {
    height: 40px;

    box-sizing: border-box;
    background: #FFF5C7;
    border: 1px solid #D1CAB9;
    border-radius: 10px;

    font-size: 20px;
    padding: 0 60px 0 20px;

  }

}