.team-page {
  width: min(76rem, calc(100% - 2 * clamp(.85rem, 4.5vw, 4.25rem)));
  min-height: calc(100svh - 4.75rem - 1px);
  display: grid;
  align-content: center;
  gap: clamp(.95rem, 2.7svh, 2rem);
  padding-block: clamp(1.15rem, 3.25svh, 2.4rem);
}

.team-intro {
  position: relative;
  min-height: clamp(8.75rem, 20svh, 12.5rem);
  display: grid;
  align-items: center;
  isolation: isolate;
  background: radial-gradient(ellipse 47% 55% at 76% 50%, #f9dce9, #fbe5ef85 50%, transparent);
}

.team-intro-copy {
  z-index: 1;
  max-width: 60%;
  padding: 1.2rem clamp(1.4rem, 4.1vw, 3.7rem);
}

.team-intro h1 {
  margin: 0;
  font-size: clamp(2.8rem, 6.2vw, 5.35rem);
  font-weight: 660;
  line-height: .98;
  letter-spacing: -.06em;
}

.team-intro h1 em {
  margin-inline-start: .035em;
  color: var(--accent);
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: -.055em;
}

.team-intro-copy p {
  max-width: 28rem;
  margin: .95rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.55vw, 1.1875rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.team-orbits {
  position: absolute;
  inset: 0 1.25rem 0 auto;
  width: min(38%, 25rem);
  display: grid;
  place-items: center;
  overflow: hidden;
  overflow: clip;
  overflow-clip-margin: .5rem;
  isolation: isolate;
  pointer-events: none;
  background: radial-gradient(ellipse at center, #eb8eb626 0%, #f7c7da25 41%, transparent 70%);
}

.team-orbits::before {
  content: "";
  position: absolute;
  inset: 3% 3%;
  background-image: radial-gradient(circle, #c3648c 0 1px, transparent 2px);
  background-size: 2.2rem 2.2rem;
  opacity: .24;
  mask-image: radial-gradient(ellipse, #000 14%, transparent 70%);
}

.orbit-track {
  position: absolute;
  width: 90%;
  height: 51%;
  border: 1px solid #d6a3b8;
  border-radius: 50%;
  transform: rotate(var(--tilt));
}

.orbit-first {
  --tilt: -22deg;
  --rest: translate3d(35.36%, 35.36%, 0);
  --orbit-time: 12s;
  --orbit-delay: -1.5s;
  --point: #a90845;
}

.orbit-second {
  --tilt: 22deg;
  --rest: translate3d(-48.3%, 12.94%, 0);
  --orbit-time: 15s;
  --orbit-delay: -8s;
  --orbit-direction: reverse;
  --point: #d63470;
}

.orbit-third {
  --tilt: -3deg;
  --rest: translate3d(12.94%, -48.3%, 0);
  --orbit-time: 10.5s;
  --orbit-delay: -8.3s;
  --point: #9c5829;
  width: 78%;
  height: 64%;
  border-color: #e5bdae;
}

.orbit-track > span {
  position: absolute;
  inset: 0;
  transform: var(--rest);
  animation: orbit-sweep var(--orbit-time) linear var(--orbit-delay) infinite var(--orbit-direction, normal) paused;
}

.team-orbits[data-playing="true"] .orbit-track > span { animation-play-state: running; }

.orbit-track > span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: .45rem;
  height: .45rem;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--point);
  box-shadow: 0 0 .8rem var(--point);
}

/* Percentages follow the responsive ellipse. Only the three points transform. */
@keyframes orbit-sweep {
  0%, 100% { transform: translate3d(50%, 0%, 0); }
  4.1667% { transform: translate3d(48.3%, 12.94%, 0); }
  8.3333% { transform: translate3d(43.3%, 25%, 0); }
  12.5% { transform: translate3d(35.36%, 35.36%, 0); }
  16.6667% { transform: translate3d(25%, 43.3%, 0); }
  20.8333% { transform: translate3d(12.94%, 48.3%, 0); }
  25% { transform: translate3d(0%, 50%, 0); }
  29.1667% { transform: translate3d(-12.94%, 48.3%, 0); }
  33.3333% { transform: translate3d(-25%, 43.3%, 0); }
  37.5% { transform: translate3d(-35.36%, 35.36%, 0); }
  41.6667% { transform: translate3d(-43.3%, 25%, 0); }
  45.8333% { transform: translate3d(-48.3%, 12.94%, 0); }
  50% { transform: translate3d(-50%, 0%, 0); }
  54.1667% { transform: translate3d(-48.3%, -12.94%, 0); }
  58.3333% { transform: translate3d(-43.3%, -25%, 0); }
  62.5% { transform: translate3d(-35.36%, -35.36%, 0); }
  66.6667% { transform: translate3d(-25%, -43.3%, 0); }
  70.8333% { transform: translate3d(-12.94%, -48.3%, 0); }
  75% { transform: translate3d(0%, -50%, 0); }
  79.1667% { transform: translate3d(12.94%, -48.3%, 0); }
  83.3333% { transform: translate3d(25%, -43.3%, 0); }
  87.5% { transform: translate3d(35.36%, -35.36%, 0); }
  91.6667% { transform: translate3d(43.3%, -25%, 0); }
  95.8333% { transform: translate3d(48.3%, -12.94%, 0); }
}

.orbit-core {
  z-index: 1;
  display: grid;
  width: clamp(4.3rem, 7.75vw, 6.9rem);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #ecb6c9;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 27%, #fff7fa 3%, #ffe7ef 44%, #f4bbd1 100%);
  box-shadow: inset 0 0 1rem #ffffff9e, 0 0 2.5rem #eca0bf63;
}

.orbit-core img {
  width: 54%;
  height: auto;
  transform: rotate(-11deg);
}

.team-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.65rem, 1.65vw, 1.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.team-member {
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: #fff;
}

.team-portrait {
  --portrait-height: clamp(11.5rem, 29svh, 17rem);
  position: relative;
  display: grid;
  height: var(--portrait-height);
  overflow: hidden;
  place-items: center;
  isolation: isolate;
  background: radial-gradient(ellipse at 50% 38%, #dbdbdb 8%, #b7b7b7 100%);
}

.team-portrait span {
  color: var(--ink);
  font: 3rem/1 Georgia, serif;
}

.team-portrait:has(img:not([hidden])) span { visibility: hidden; }

.team-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 111%;
  object-fit: contain;
  object-position: center top;
  filter: grayscale(1);
}

.team-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(.85rem, 2.25vw, 1.55rem);
  padding-bottom: clamp(.65rem, 1.65vw, 1rem);
}

.team-info h2 {
  margin: 0;
  font-size: clamp(1.18rem, 2.02vw, 1.75rem);
  font-weight: 670;
  line-height: 1.13;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}

.team-role {
  margin: .4rem 0 0;
  color: var(--accent);
  font-size: .875rem;
  font-weight: 640;
  line-height: 1.3;
}

.team-bio {
  margin: .62rem 0 .3rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.4;
  text-wrap: pretty;
}

.team-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: .45rem;
  margin-top: auto;
  color: var(--ink);
  font-size: .875rem;
  font-weight: 620;
}

.team-link-icon {
  display: block;
  width: 1.3125rem;
  height: 1.125rem;
  flex: none;
  object-fit: contain;
}

.team-link:is(:hover, :focus-visible) .team-link-label {
  text-decoration: underline;
  text-underline-offset: .22em;
}
#team-status { margin: 0; color: var(--muted); }
#team-status:empty { display: none; }

@media (min-width: 49rem) and (max-height: 46rem) {
  .team-page { padding-block: .9rem; gap: .85rem; }
  .team-intro { min-height: 8rem; }
  .team-intro-copy { padding-block: .85rem; }
  .team-intro h1 { font-size: clamp(2.6rem, 5.4vw, 4.5rem); }
  .team-intro-copy p { margin-top: .65rem; font-size: 1rem; }
  .team-portrait { --portrait-height: 27svh; }
  .team-info { padding: .8rem 1rem; }
}

@media (max-width: 49rem) {
  .team-page {
    min-height: 0;
    gap: .75rem;
    padding-block: .85rem 1rem;
  }

  .team-intro { min-height: 7.5rem; }
  .team-intro-copy { max-width: 73%; padding: .8rem 1rem; }
  .team-intro h1 { font-size: clamp(2.15rem, 7vw, 3.4rem); }
  .team-intro-copy p { margin-top: .55rem; max-width: 25rem; font-size: .9375rem; line-height: 1.4; }
  .team-orbits { inset-inline-end: .4rem; width: 29%; }
  .orbit-core { width: clamp(2.6rem, 8.5vw, 3.9rem); }
  .orbit-track { height: 42%; }
  .orbit-third { height: 55%; }

  .team-list { grid-template-columns: minmax(0, 1fr); gap: .6rem; }

  .team-member {
    grid-template-columns: clamp(5rem, 29vw, 8.25rem) minmax(0, 1fr);
    grid-template-rows: none;
    align-items: stretch;
    border-radius: .9rem;
  }

  .team-portrait { height: auto; }
  .team-portrait img { height: 100%; object-fit: cover; object-position: center; }
  .team-info { padding: .6rem .65rem .45rem; }
  .team-info h2 { font-size: clamp(1.05rem, 4.3vw, 1.5rem); }
  .team-role { margin-top: .21rem; font-size: .8125rem; }
  .team-bio { margin: .36rem 0 .1rem; font-size: .9375rem; line-height: 1.32; }
  .team-link { min-height: 2.25rem; margin-top: .1rem; }
}

@media (max-width: 24rem) {
  .team-intro-copy { max-width: 78%; }
  .team-intro h1 { font-size: 2rem; }
  .team-orbits { width: 25%; }
}

@media (orientation: landscape) and (min-width: 49rem) and (max-height: 34rem) {
  .team-page { gap: .45rem; padding-block: .4rem; }
  .team-intro { min-height: 5.35rem; }
  .team-intro-copy { max-width: 67%; padding: .45rem 1.25rem; }
  .team-intro h1 { font-size: 2.55rem; }
  .team-intro-copy p { max-width: 29rem; margin-top: .35rem; font-size: .875rem; }
  .team-orbits { width: 35%; }
  .orbit-core { width: 3.3rem; }
  .team-portrait { --portrait-height: 17svh; }
  .team-info { padding: .45rem .75rem; }
  .team-info h2 { font-size: 1.1rem; }
  .team-role, .team-bio, .team-link { font-size: .8125rem; }
  .team-bio { margin-top: .35rem; }
  .team-link { min-height: 1.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .orbit-track > span { animation: none; }
}
