:root:has(.team-profile[open]) { overflow: hidden; }

.team-profile {
  position: fixed;
  inset: 0;
  width: min(920px, calc(100% - 40px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #dbdbdb;
  border-radius: 22px;
  background: white;
  color: var(--ink);
  box-shadow: 0 24px 68px rgb(15 15 15 / 15%), 0 2px 6px rgb(15 15 15 / 5%);
}
.team-profile::backdrop {
  background: rgb(243 243 243 / 73%);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.team-profile-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
  align-items: start;
  padding: 10px;
}
.team-profile-toolbar { position: sticky; top: 0; height: 0; z-index: 3; }
.team-profile-image {
  position: sticky;
  top: 10px;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: calc(100dvh - 52px);
  min-height: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #f0f0f0;
}
.team-profile-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.team-profile-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 0;
  padding: 45px clamp(20px, 3vw, 40px) 30px;
}
.team-profile-info h2 {
  margin: 0;
  font-size: clamp(1.85rem, 3vw, 2.7rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: 1.06;
  text-wrap: balance;
}
.team-profile-tags {
  display: grid;
  gap: 18px;
  width: 100%;
  margin: 25px 0;
}
.team-profile-tags dt {
  margin: 0 0 4px;
  color: #666;
  font-size: .8125rem;
  line-height: 1.4;
}
.team-profile-tags [hidden] { display: none; }
.team-profile-tags dd {
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
  color: #363636;
  font-size: .9375rem;
  font-weight: 450;
  line-height: 1.5;
}
.team-profile-meeting {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}
.team-profile-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #d4d4d4;
  border-radius: 50%;
  background: rgb(255 255 255 / 94%);
}
.team-profile-close::before, .team-profile-close::after {
  grid-area: 1 / 1;
  width: 13px;
  height: 1.5px;
  background: currentColor;
  transform: rotate(45deg);
  content: '';
}
.team-profile-close::after { transform: rotate(-45deg); }
.team-profile-close:hover { border-color: #777; }

@media (max-width: 550px) {
  .team-profile { width: min(390px, calc(100% - 24px)); border-radius: 18px; }
  .team-profile-layout { grid-template-columns: minmax(0, 1fr); padding: 8px; }
  .team-profile-image { position: relative; top: auto; aspect-ratio: auto; max-height: none; height: clamp(160px, 32svh, 245px); border-radius: 11px; }
  .team-profile-image img { object-fit: cover; object-position: center 10%; }
  .team-profile[data-person="18"] .team-profile-image img { object-position: center 26%; }
  .team-profile-info { padding: 20px 14px 14px; }
  .team-profile-tags { gap: 16px; margin: 20px 0 22px; }
}

@media (prefers-reduced-motion: no-preference) {
  .team-profile[open] { animation: team-profile-appear .26s cubic-bezier(.2,.72,.28,1) both; }
  .team-profile[open] .team-profile-image img { animation: team-profile-portrait .42s cubic-bezier(.22,.7,.28,1) both; }
  @keyframes team-profile-appear {
    from { opacity: 0; transform: translateY(6px) scale(.965); }
    to { opacity: 1; transform: none; }
  }
  @keyframes team-profile-portrait {
    from { opacity: .7; }
    to { opacity: 1; }
  }
}

.team-profile-info .person-name-split .person-first-name,
.team-profile-info .person-name-split .person-family-name { display: block; white-space: nowrap; }
.team-profile-info .person-name-split .person-family-name { font-size: .58em; letter-spacing: -.04em; margin-top: .18em; }
