.team-page {
  min-height: 70vh;
  color: var(--paper);
  background:
    radial-gradient(circle at 78% 10%, rgb(140 197 232 / .13), transparent 29rem),
    var(--dark);
}

.team-page h1 {
  margin: 0;
  max-width: none;
  font-family: var(--display);
  font-size: clamp(1.5rem, 7.6vw, 6.5rem);
  font-weight: 700;
  line-height: .82;
  letter-spacing: -.045em;
  text-transform: uppercase;
  white-space: nowrap;
}

.team-hero {
  padding-top: 40px;
  padding-bottom: 40px;
}


.team-intro {
  display: flex;
  flex-direction: column;
  gap: 38px;
}

.team-intro-copy {
  align-self: flex-end;
  width: min(100%, 390px);
  margin: 0 0 8px;
  color: #c9cdd1;
  font-size: 1.08rem;
  line-height: 1.75;
}

/* Bring the portraits closer to the heading without changing their stagger. */
#team-showcase-root > div {
  padding-top: 36px;
}

@media (min-width: 640px) {
  #team-showcase-root button[aria-label^="Highlight Liam"] {
    width: clamp(160px, 15.3vw, 196px);
    height: clamp(209px, 20vw, 256px);
  }

  #team-showcase-root button[aria-label^="Highlight Auset"] {
    width: clamp(174px, 16.7vw, 214px);
    height: clamp(227px, 21.8vw, 279px);
  }

  #team-showcase-root button[aria-label^="Highlight Aryan"] {
    width: clamp(166px, 15.8vw, 202px);
    height: clamp(218px, 20.6vw, 264px);
  }
}

@media (min-width: 375px) and (max-width: 639px) {
  #team-showcase-root button[aria-label^="Highlight Liam"] { width: 106px; height: 147px; }
  #team-showcase-root button[aria-label^="Highlight Auset"] { width: 117px; height: 161px; }
  #team-showcase-root button[aria-label^="Highlight Aryan"] { width: 109px; height: 151px; }
}

/* Keep the larger portraits from squeezing the biographies on tablets. */
@media (min-width: 640px) and (max-width: 1023px) {
  #team-showcase-root > div { flex-direction: column; }
  #team-showcase-root > div > div { width: 100%; }
  #team-showcase-root > div > div:last-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  #team-showcase-root > div { column-gap: 48px; }
}

.team-story-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 118px;
  color: var(--paper);
  border-top: 1px solid #4c5054;
  text-decoration: none;
}

.team-story-link span:first-child {
  color: #aeb4b8;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.team-story-link strong {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 600;
  text-transform: uppercase;
}

.team-story-link svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: transform 180ms ease;
}

.team-story-link:hover strong { color: var(--blue); }
.team-story-link:hover svg { transform: translateX(5px); }

@media (max-width: 880px) {
  .team-intro { gap: 28px; }
  .team-intro-copy { align-self: flex-start; width: min(100%, 56ch); }
}

@media (max-width: 600px) {
  .team-hero { padding-top: 28px; padding-bottom: 28px; }
  .team-page h1 { font-size: clamp(1.5rem, 7.6vw, 6.5rem); line-height: 1; }
  .team-intro { gap: 22px; }
  .team-intro-copy { font-size: 1rem; }
  .team-story-link { min-height: 106px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 9px; }
}

/* Compact social dock in the page's charcoal, cream, and Carolina blue palette. */
.team-photo-with-socials {
  position: relative;
  padding-bottom: 128px;
}

.team-socials {
  position: absolute;
  bottom: 0;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
}

.team-social-heading {
  color: #b5c5cf;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.team-social-dock {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  height: 64px;
  padding: 8px;
  border: 1px solid rgb(247 244 237 / .16);
  border-radius: 16px;
  background: #292d32;
  box-shadow: 0 8px 24px rgb(0 0 0 / .18), inset 0 1px 0 rgb(255 255 255 / .04);
}

.team-social-dock a {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--paper);
  text-decoration: none;
  transition: width 180ms ease, height 180ms ease, background 180ms ease, color 180ms ease;
}

.team-social-dock a svg {
  width: 45%;
  height: 45%;
  fill: currentColor;
  stroke: none;
}

.team-social-dock a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  background: var(--blue);
  color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .team-social-dock a:hover {
    width: 56px;
    height: 56px;
    background: var(--blue);
    color: var(--ink);
  }
}

/* Individual profiles reveal LinkedIn on hover or keyboard focus. */
.team-member-socials {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
  margin-left: 2px;
  opacity: 0;
  transform: translateX(-6px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.team-member-socials[data-active="true"],
.team-member-socials:focus-within {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.team-member-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  transition: background 180ms ease, color 180ms ease;
}

.team-member-social-link svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  stroke: none;
}

.team-member-social-link:hover,
.team-member-social-link:focus-visible {
  background: transparent;
  color: var(--paper);
}

.team-member-social-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

@media (hover: none) {
  .team-member-socials {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .team-member-social-link { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .team-page *,
  .team-page *::before,
  .team-page *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
