/* Team section redesign (src/team-roster.jsx): a two-column roster of
   portrait-led profiles. The section chrome and heading keep the shared
   .section styles in styles.css, like the Open Research panel. */
.home-page .team-section {
  --sophont-electric: #2233bb;
  --sophont-ink: #20222c;
  --sophont-copy: #343640;
  --sophont-muted: #626674;
  --sophont-paper: #f8f5fa;
  --sophont-rule: rgba(8, 8, 42, 0.1);
  --sophont-rule-strong: rgba(8, 8, 42, 0.17);
  --font-sans: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --radius-md: 0.5rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

.home-page .team-roster {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: clamp(2rem, 4vw, 4rem);
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-sans);
}
@media (min-width: 56rem) {
  .home-page .team-roster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.home-page .team-person {
  container-type: inline-size;
  padding: 1.75rem 0 2.5rem;
  border-top: 1px solid var(--sophont-rule-strong);
}

/* Narrow profiles: portrait beside the name, bio full width below. */
.home-page .team-profile {
  display: grid;
  grid-template-columns: clamp(5.5rem, 24cqi, 7rem) minmax(0, 1fr);
  grid-template-areas:
    "portrait intro"
    "bio bio";
  align-items: center;
  gap: 1.25rem 1.125rem;
}
/* Wide profiles: portrait column on the left, text column on the right. */
@container (min-width: 32rem) {
  .home-page .team-profile {
    grid-template-columns: clamp(8rem, 28cqi, 11rem) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "portrait intro"
      "portrait bio";
    align-items: start;
    gap: 1rem clamp(1.25rem, 4.5cqi, 2rem);
  }
}

.home-page .team-portrait {
  grid-area: portrait;
  align-self: start;
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--sophont-paper);
}
.home-page .team-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Hairline frame, so pale backdrops don't dissolve into the page. */
.home-page .team-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--sophont-rule);
  pointer-events: none;
}
.home-page .team-portrait > span {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--sophont-muted);
  font: 500 1.25rem/1 var(--font-sans);
}

/* The name gets the full width; social links sit at the right end of the
   role line. */
.home-page .team-intro {
  grid-area: intro;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name name"
    "role social";
  column-gap: 0.5rem;
  min-width: 0;
}
.home-page .team-name {
  grid-area: name;
  margin: 0;
  color: var(--sophont-ink);
  font: 500 1.1875rem/1.3 var(--font-sans);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
@container (min-width: 32rem) {
  .home-page .team-name { font-size: 1.3125rem; }
}
.home-page .team-role {
  grid-area: role;
  margin: 0.25rem 0 0;
  color: var(--sophont-electric);
  font: 500 0.9375rem/1.45 var(--font-sans);
}
.home-page .team-affil {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--sophont-muted);
  font: 400 0.875rem/1.5 var(--font-sans);
}
.home-page .team-affil li {
  padding: 0.125rem 0.375rem;
  border: 1px solid var(--sophont-rule);
  border-radius: 0.25rem;
}

/* 44px targets around 17px icons. The negative margins centre the icons on
   the role line without making that line taller, and align them with the
   column edge. */
.home-page .team-social {
  grid-area: social;
  align-self: start;
  display: flex;
  margin: -0.4375rem -0.75rem -0.6875rem 0;
}
.home-page .team-social a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  color: var(--sophont-muted);
  transition: color 120ms var(--ease-out), background-color 120ms var(--ease-out);
}
.home-page .team-social svg { width: 1.0625rem; height: 1.0625rem; }
@media (hover: hover) {
  .home-page .team-social a:hover { color: var(--sophont-electric); background: rgba(34, 51, 187, 0.08); }
}
.home-page .team-social a:focus-visible {
  outline: 3px solid var(--sophont-electric);
  outline-offset: -3px;
  color: var(--sophont-electric);
}

.home-page .team-description {
  grid-area: bio;
  min-width: 0;
}
.home-page .team-bio {
  max-width: 62ch;
  margin: 0;
  color: var(--sophont-copy);
  font: 400 1rem/1.6 var(--font-sans);
  text-wrap: pretty;
}

/* Closes the roster as one more ruled row. */
.home-page .team-section .team-note {
  max-width: none;
  margin: 0;
  padding: 1.5rem 0 0;
  border: 0;
  border-top: 1px solid var(--sophont-rule-strong);
  color: var(--sophont-muted);
  font: 400 1rem/1.6 var(--font-sans);
}
.home-page .team-note a {
  color: var(--sophont-electric);
  font-weight: 600;
  white-space: nowrap;
}
.home-page .team-note a:hover { text-decoration: underline; text-underline-offset: 0.18em; }

@media (prefers-contrast: more) {
  .home-page .team-section { --sophont-muted: #444853; --sophont-rule-strong: #9fa1ab; }
}
