/* People page: compact academic directory */

.people-page {
  --people-red: #a51417;
  --people-red-dark: #7f1012;
  --people-ink: #252728;
  --people-muted: #5f6668;
  --people-line: #d9ddde;
  --people-surface: #f7f7f6;
  --people-focus: #007360;
  width: 100%;
  max-width: 70rem;
  margin-inline: auto;
  padding-top: 0.75rem;
  color: var(--people-ink);
}

.people-page,
.people-page * {
  box-sizing: border-box;
}

.people-section-title {
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--people-line);
  color: var(--people-ink);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.25;
}

.people-page > .people-section-title:first-child {
  margin-top: 0;
}

.people-section-title::after {
  display: block;
  width: 2.75rem;
  height: 0.2rem;
  margin-top: 0.55rem;
  background: var(--people-red);
  content: "";
}

.people-directory-row {
  display: grid;
  grid-template-columns:
    4.75rem
    minmax(9.5rem, 0.85fr)
    minmax(15rem, 1.3fr)
    minmax(11rem, 0.9fr);
  gap: 1.25rem;
  align-items: center;
  min-width: 0;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--people-line);
}

.people-directory-row--featured {
  grid-template-columns:
    7.25rem
    minmax(10rem, 0.85fr)
    minmax(15rem, 1.3fr)
    minmax(11rem, 0.9fr);
  margin-bottom: 0.5rem;
  padding: 1.2rem;
  border: 1px solid var(--people-line);
  border-left: 0.25rem solid var(--people-red);
  border-radius: 0.65rem;
  background: var(--people-surface);
}

.people-portrait {
  display: block;
  width: 4.75rem;
  height: 4.75rem;
  max-width: none;
  border-radius: 0.5rem;
  background: var(--people-surface);
  object-fit: cover;
  object-position: center;
}

.people-directory-row--featured .people-portrait {
  width: 7.25rem;
  height: 7.25rem;
  border-radius: 0.6rem;
}

.people-identity,
.people-background,
.people-contact {
  min-width: 0;
}

.people-name {
  margin: 0;
  color: var(--people-ink);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.25;
}

.people-directory-row--featured .people-name {
  font-size: clamp(1.25rem, 2vw, 1.45rem);
}

.people-role {
  margin: 0.25rem 0 0;
  color: var(--people-red-dark);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.people-background,
.people-contact {
  color: var(--people-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.people-background p {
  margin: 0;
}

.people-background > :first-child,
.people-contact > :first-child {
  margin-top: 0;
}

.people-background > :last-child,
.people-contact > :last-child {
  margin-bottom: 0;
}

.people-contact address {
  font-style: normal;
}

.people-page a {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.people-page a:hover {
  color: var(--people-red-dark);
}

.people-page a:focus-visible,
.people-page [tabindex]:focus-visible {
  outline: 0.2rem solid var(--people-focus);
  outline-offset: 0.2rem;
  border-radius: 0.15rem;
}

.people-alumni-header,
.people-alumni-row {
  display: grid;
  grid-template-columns: minmax(8rem, 0.8fr) minmax(13rem, 1.2fr) minmax(15rem, 1.4fr);
  gap: 1.25rem;
  min-width: 0;
}

.people-alumni-header {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--people-line);
  color: var(--people-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}

.people-alumni-row {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--people-line);
  font-size: 0.9rem;
  line-height: 1.45;
}

.people-alumni-header > *,
.people-alumni-row > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.people-alumni-name {
  color: var(--people-ink);
  font-weight: 700;
}

.people-alumni-role,
.people-alumni-position {
  color: var(--people-muted);
}

.people-field-label {
  display: none;
}

.people-photo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.people-photo-strip img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 0.45rem;
  background: var(--people-surface);
  object-fit: cover;
  object-position: center;
}

.people-gallery-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-top: 0.7rem;
  font-weight: 700;
}

@media (max-width: 56rem) {
  .people-directory-row,
  .people-directory-row--featured {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 0.45rem 0.9rem;
    align-items: start;
  }

  .people-directory-row--featured {
    padding: 1rem;
  }

  .people-portrait,
  .people-directory-row--featured .people-portrait {
    grid-row: 1 / span 3;
    width: 4.5rem;
    height: 4.5rem;
  }

  .people-identity,
  .people-background,
  .people-contact {
    grid-column: 2;
  }

  .people-background,
  .people-contact {
    font-size: 0.86rem;
  }

  .people-alumni-header {
    display: none;
  }

  .people-alumni-row {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    padding: 1rem 0;
  }

  .people-field-label {
    display: block;
    margin-bottom: 0.08rem;
    color: var(--people-ink);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.055em;
    line-height: 1.3;
    text-transform: uppercase;
  }
}

@media (max-width: 34rem) {
  .people-section-title {
    margin-top: 2rem;
  }

  .people-directory-row,
  .people-directory-row--featured {
    grid-template-columns: 4rem minmax(0, 1fr);
    column-gap: 0.75rem;
  }

  .people-portrait,
  .people-directory-row--featured .people-portrait {
    width: 4rem;
    height: 4rem;
  }

  .people-photo-strip {
    grid-template-columns: none;
    grid-auto-columns: minmax(78%, 1fr);
    grid-auto-flow: column;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-bottom: 0.65rem;
    scroll-behavior: auto;
    scroll-snap-type: inline mandatory;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }

  .people-photo-strip > * {
    scroll-snap-align: start;
  }
}

@media (forced-colors: active) {
  .people-directory-row--featured {
    border-left-width: 0.4rem;
  }

  .people-section-title::after {
    background: CanvasText;
  }
}
