.team-scene {
  --team-light-gap: clamp(170px, 18vw, 260px);
  --team-sky: url("assets/team-light.webp");
  --team-ground: url("assets/team-ground.webp");
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.team-scene main {
  display: grid;
  grid-area: 1 / 1 / 3 / 2;
  grid-template-rows: subgrid;
  min-width: 0;
}

.team-scene .site-footer { grid-area: 3 / 1 / 4 / 2; }
.team-stage { position: relative; padding-bottom: var(--team-light-gap); }

.team-light, .team-light canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.team-light { z-index: -2; }

/* Both static panels meet at the same horizon as the animated scene, even
   when changing the font size changes the height of the biographies. */
.team-scene::before, .team-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.team-scene::before {
  grid-area: 1 / 1 / 2 / 2;
  bottom: calc(var(--team-light-gap) / 2);
  background-image: var(--team-sky);
}
.team-scene::after {
  grid-area: 2 / 1 / 4 / 2;
  top: calc(var(--team-light-gap) / -2);
  background-image: linear-gradient(to bottom, transparent, rgb(11 11 14 / .18) 24%), var(--team-ground);
}
.team-scene:has(canvas[data-rendered]) {
  --team-sky: none;
  --team-ground: none;
}
.team-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgb(11 11 14 / .14) 34%, rgb(11 11 14 / .23) calc(100% - var(--team-light-gap)), transparent calc(100% - var(--team-light-gap) * .65));
}

.team-stage-copy {
  position: relative;
}

.team-roster {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 48px);
}

.team-person {
  --portrait-hue: 262;
  --portrait-text: #c9b1ff;
  min-width: 0;
}

.team-person:nth-child(2) {
  --portrait-hue: 178;
  --portrait-text: #8ce2d9;
}

.team-portrait {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(170px, 16vw, 235px);
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #2b2b36;
  background-color: #111218;
  background-image:
    radial-gradient(ellipse at 50% 120%, hsl(var(--portrait-hue) 44% 28% / .68), transparent 65%),
    radial-gradient(hsl(var(--portrait-hue) 25% 55% / .35) .75px, transparent 1px);
  background-size: auto, 12px 12px;
}

.team-portrait::before,
.team-portrait::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  opacity: .64;
  border-color: var(--portrait-text);
  border-style: solid;
}

.team-portrait::before {
  top: 16px;
  left: 16px;
  border-width: 1px 0 0 1px;
}

.team-portrait::after {
  right: 16px;
  bottom: 16px;
  border-width: 0 1px 1px 0;
}

.team-orbits {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: -1;
}

.team-orbits i {
  grid-area: 1 / 1;
  width: 80%;
  height: 65%;
  border: 1px solid hsl(var(--portrait-hue) 70% 70% / .30);
  border-radius: 50%;
  transform: rotate(-15deg);
}

.team-orbits i:nth-child(2) {
  width: 74%;
  height: 75%;
  border-style: dashed;
  opacity: .76;
  transform: rotate(14deg);
}

.team-orbits i:nth-child(3) {
  width: 54%;
  height: 88%;
  transform: rotate(31deg);
}

.team-portrait img {
  display: block;
  width: clamp(104px, 12vw, 156px);
  height: auto;
  image-rendering: pixelated;
}

.team-bio {
  padding-block: clamp(23px, 3vw, 38px) 0;
}

.team-specialty,
.team-byline,
.team-outlet {
  font-family: var(--mono, ui-monospace, Consolas, monospace);
}

.team-specialty {
  margin: 0 0 10px;
  color: var(--portrait-text);
  font-size: .76rem;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.team-bio h2 {
  margin: 0 0 20px;
  font-size: clamp(1.65rem, 3vw, 3.3rem);
  letter-spacing: -.05em;
  line-height: 1.08;
}

.team-bio > p:not(.team-specialty) {
  margin: 13px 0 0;
  max-width: 60ch;
  color: #c4c5cd;
  font-size: 1rem;
  line-height: 1.65;
}

.team-bio-source {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-top: 1rem;
  min-height: 44px;
  color: var(--portrait-text);
  font-size: .9rem;
  text-decoration: underline;
  text-underline-offset: .25em;
}

.team-press {
  padding-block: clamp(16px, 2.8vw, 40px) clamp(64px, 8vw, 112px);
}

.team-press h2 {
  max-width: 19ch;
  margin: 0 0 clamp(22px, 4vw, 48px);
  font-size: clamp(2rem, 4.4vw, 4.4rem);
  letter-spacing: -.055em;
  line-height: 1.05;
}

.team-materials {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #383841;
}

.team-materials li {
  border-bottom: 1px solid #383841;
}

.team-materials a {
  position: relative;
  display: grid;
  grid-template-columns: minmax(125px, .72fr) minmax(0, 2fr) minmax(138px, .8fr) 20px;
  gap: clamp(16px, 2.5vw, 40px);
  align-items: start;
  padding: clamp(20px, 2.4vw, 32px) 3px;
  color: inherit;
  text-decoration: none;
}

.team-materials a:hover strong,
.team-materials a:focus-visible strong {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .16em;
}

.team-byline,
.team-outlet {
  font-size: .8rem;
  line-height: 1.6;
  color: #c3c3cd;
}

.team-byline span {
  display: block;
  color: #aaa9b7;
}

.team-materials strong {
  font-size: clamp(1.08rem, 1.55vw, 1.42rem);
  font-weight: 600;
  line-height: 1.32;
}

.team-link-icon {
  color: #c9b1ff;
  font-size: 1.1rem;
}

@media (max-width: 760px) {
  .team-scene {
    --team-light-gap: 165px;
    --team-sky: url("assets/team-light-mobile.webp");
    --team-ground: url("assets/team-ground-mobile.webp");
  }
  .team-roster {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }

  .team-materials a {
    grid-template-columns: minmax(0, 1fr) 20px;
    gap: 7px 16px;
  }

  .team-byline, .team-materials strong, .team-outlet {
    grid-column: 1;
  }

  .team-byline span {
    display: inline;
    margin-left: .65em;
  }

  .team-link-icon {
    grid-row: 2;
    grid-column: 2;
  }
}

@media print, (forced-colors: active) {
  .team-light, .team-scene::before, .team-scene::after, .team-stage::before { display: none; }
  .team-stage { padding-bottom: 0; }
}
