.team-section {
  --portrait-backdrop: #cbd5de;
  --profile-secondary: #526779;
}

[data-theme="dark"] .team-section {
  --portrait-backdrop: #a7b7c7;
  --profile-secondary: var(--muted);
}

.team-group {
  padding-block: 24px 36px;
  border-top: 1px solid var(--line);
}

.team-group-heading {
  margin-bottom: 26px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 650;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.profile-card {
  min-width: 0;
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
  row-gap: 12px;
}

.team-advisors .profile-card {
  grid-row: span 2;
}

.profile-photo {
  position: relative;
  width: min(100%, 176px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--portrait-backdrop);
}

.team-advisors .profile-photo {
  width: min(100%, 128px);
}

.profile-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.profile-photo img[src$="/lisa-chen.webp"] {
  position: absolute;
  inset-block-start: -5%;
  inset-inline-start: -12%;
  width: 124%;
  height: auto;
}

.profile-identity h4 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 650;
  line-height: 1.25;
}

.profile-identity p,
.profile-bio {
  color: var(--profile-secondary);
  font-size: 16px;
  line-height: 1.6;
}

.profile-identity p {
  max-width: 24ch;
}

.profile-bio {
  max-width: 31ch;
}

@media (max-width: 900px) {
  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
  }
}

@media (max-width: 580px) {
  .team-group {
    padding-block: 20px 30px;
  }

  .team-group-heading {
    margin-bottom: 20px;
  }

  .profile-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .profile-card,
  .team-advisors .profile-card {
    grid-row: auto;
    grid-template-rows: auto;
    grid-template-columns: 80px minmax(0, 1fr);
    align-items: center;
    gap: 10px 16px;
  }

  .profile-bio {
    grid-column: 1 / -1;
    max-width: 38ch;
  }
}
