/* Shared category navigation for the two People pages. */
.people-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  grid-template-areas: "content sidebar";
  gap: 32px;
  align-items: start;
}
.people-sidebar {
  grid-area: sidebar;
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.people-sidebar h2 {
  margin: 0;
  padding: 18px 20px;
  background: var(--primary);
  color: #fff;
  font-size: 1.25rem;
}
.people-sidebar ul { list-style: none; margin: 0; padding: 8px; }
.people-sidebar li { margin: 0; }
.people-sidebar a {
  display: block;
  padding: 12px;
  border-radius: 6px;
  line-height: 1.4;
}
.people-sidebar a:hover { background: var(--bg); }
.people-sidebar a.active {
  color: var(--primary);
  background: #f2e9f4;
  font-weight: 650;
}
.people-sidebar a:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.people-content { grid-area: content; min-width: 0; }
@media (max-width: 760px) {
  .people-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "sidebar" "content"; gap: 24px; }
  .people-sidebar ul { display: flex; flex-wrap: wrap; gap: 4px; }
  .people-sidebar li { flex: 1 1 150px; }
}

/* Fit card columns to the actual content width, including ultrawide screens. */
.people-content .people-container:not(#pi-container) {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
}
.people-content .person-card { max-width: none; }
.people-content .pi-info { min-width: 0; }
.people-content .pi-info .person-intro { max-width: 110ch; line-height: 1.6; }
@media (max-width: 1000px) {
  .people-content .pi-card-top { flex-direction: column; }
  .people-content .pi-info { padding-left: 0; }
}

/* PI identity sits below the portrait; biography starts level with the photo. */
.people-content .pi-card-top { align-items: flex-start; }
.people-content .pi-photo-wrap { width: 225px; text-align: center; }
.people-content .pi-photo-wrap .person-photo { display: block; margin: 0; max-width: 100%; height: auto; }
.people-content .pi-photo-wrap .person-header-line {
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 12px;
}
.people-content .pi-photo-wrap .person-links { justify-content: center; margin-top: 0; }
.people-content .pi-info .person-intro { margin-top: 0; max-width: none; }
.people-content .person-intro,
.people-content .person-biography {
  text-align: justify;
  text-align-last: start;
  line-height: 1.6;
  overflow-wrap: break-word;
}
@media (max-width: 1000px) {
  .people-content .pi-photo-wrap { align-self: center; }
}

/* Match the biography's left gap and right inset. */
.people-content #pi-container .person-card.pi-card { padding: 24px; }
.people-content .pi-card-top { gap: 24px; }
.people-content .pi-info { padding: 0; }

/* Keep contact icons at the bottom of equal-height current-member cards. */
.people-content .people-container > .person-card:not(.pi-card):not(.alumni-card) .person-basic {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  width: 100%;
}
.people-content .people-container > .person-card:not(.pi-card):not(.alumni-card) .person-links {
  margin-top: auto;
  padding-top: 10px;
  justify-content: center;
}

/* Current members: readable dark-gray biography and research text. */
.people-content[data-people-group="current"] .person-intro,
.people-content[data-people-group="current"] .person-biography,
.people-content[data-people-group="current"] .person-drawer-text {
  color: #374151;
}

/* Match PI service and award details to the biography text. */
.people-content[data-people-group="current"] .pi-extra-text,
.people-content[data-people-group="current"] .pi-extra-item,
.people-content[data-people-group="current"] .pi-extra-year {
  color: #374151;
}

/* Alumni directory: four category cards with inline expandable profiles. */
.people-content .alumni-section { padding: clamp(20px, 2.5vw, 32px); margin-bottom: 24px; background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius-card); box-shadow: var(--shadow-soft); }
.people-content .alumni-section > h2 { margin: 0 0 22px; color: var(--primary); font-size: clamp(21px, 2vw, 28px); line-height: 1.4; }
.alumni-table-scroll { overflow-x: auto; }
.alumni-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 15px; line-height: 1.6; }
.alumni-table th { background: #f3edf5; color: var(--primary); font-weight: 650; }
.alumni-table th, .alumni-table td { padding: 14px 16px; border-bottom: 1px solid #e8e8ee; vertical-align: top; }
.alumni-table th:first-child { width: 27%; }
.alumni-table th:nth-child(2) { width: 17%; }
.alumni-summary-row:hover { background: #faf8fb; }
.alumni-name-toggle { border: 0; background: transparent; color: var(--primary); font: inherit; font-weight: 600; padding: 0; cursor: pointer; text-align: left; }
.alumni-name-toggle::after { content: '⌄'; display: inline-block; margin-left: 8px; }
.alumni-name-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
.alumni-name-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
.alumni-detail-row[hidden] { display: none; }
.alumni-detail-row > td { background: #faf8fb; padding: 22px 16px; }
.alumni-profile { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; }
.alumni-profile-portrait > img { display: block; width: 100%; height: auto; max-height: 200px; object-fit: contain; border-radius: 8px; }
.alumni-profile-portrait .person-links { justify-content: center; flex-wrap: wrap; }
.alumni-profile-bio { color: #374151; }
.alumni-profile-bio p { margin: 0 0 14px; white-space: pre-line; text-align: justify; line-height: 1.75; }
@media (max-width: 600px) { .alumni-table { min-width: 480px; } .alumni-profile { grid-template-columns: 100px minmax(0,1fr); gap: 16px; } }

/* Preserve full date ranges, with more room for employment details. */
.alumni-table th:first-child { width: 24%; }
.alumni-table th:nth-child(2) { width: auto; }
.alumni-table th:nth-child(2), .alumni-summary-row > td:nth-child(2) { white-space: nowrap; }
.alumni-name-toggle::after { content: none; }
.alumni-name-toggle:hover, .alumni-name-toggle[aria-expanded="true"] { text-decoration: underline; text-underline-offset: 4px; }
.people-content .person-links .icon-link { width: 28px; height: 28px; flex: 0 0 28px; padding: 0; border-radius: 50%; background: #f3f4f6; }
.people-content .person-links .icon-image { width: 16px; height: 16px; max-height: none; border-radius: 0; object-fit: contain; }
.people-content .person-links { gap: 8px; }

/* Consistent column rhythm: compact names, centered dates, flexible employment. */
.alumni-table { table-layout: fixed; min-width: 660px; }
.alumni-table th:first-child { width: 23%; }
.alumni-table th:nth-child(2) { width: 220px; text-align: center; }
.alumni-summary-row > td:nth-child(2) { text-align: center; font-variant-numeric: tabular-nums; }
.alumni-summary-row > td { vertical-align: middle; }
.alumni-summary-row > td:last-child { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .alumni-table th:first-child { width: 155px; }
  .alumni-table th:nth-child(2) { width: 210px; }
}
