:is(.page-members, .page-students) {
  --roster-inset: clamp(24px, 2.77778vw, 54px);
  --profile-rule: #dadada;
}

.members-hero {
  display: flex;
  align-items: flex-end;
  min-height: clamp(320px, 26.80556vw, 470px);
  padding: 130px var(--gutter) clamp(86px, 8.05556vw, 138px) calc(25% + var(--roster-inset));
  color: #fff;
  background: linear-gradient(rgb(0 0 0 / 17%), rgb(0 0 0 / 17%)),
    #111 url("assets/members/optical-fibers.jpg") center / cover no-repeat;
}

.members-hero h1 {
  margin: 0;
  font-size: clamp(48px, 4.30556vw, 78px);
  line-height: 1.09677;
  letter-spacing: -.03548em;
}

.members-layout {
  display: grid;
  grid-template-columns: 25% minmax(0, 1fr);
  align-items: start;
  padding-block: 54px 74px;
  background: #fff;
  color: #000;
}

.members-layout :is(h2, h3, h4, p, dl, dd, ul) { margin: 0; }

.members-directory {
  display: grid;
  justify-items: start;
  padding-inline: var(--gutter);
}

.members-directory a {
  display: flex;
  align-items: center;
  width: min(100%, 155px);
  min-height: 44px;
  color: inherit;
  font-size: 1.40625rem;
  line-height: 1.4;
  letter-spacing: -.02em;
  text-decoration: none;
}

.members-directory a[aria-current="page"] { font-weight: 700; }
.members-directory a:hover { color: #555; }

.professor-profile {
  display: grid;
  min-width: 0;
  row-gap: 29px;
  margin-inline: var(--roster-inset) var(--gutter);
}

.professor-intro {
  display: flex;
  align-items: flex-end;
  gap: clamp(32px, 3.33333vw, 64px);
}

.professor-portrait {
  display: block;
  width: min(18.75vw, 31.5%);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 50% 21.43%;
}

.professor-identity h2 {
  margin-bottom: 14px;
  font-size: clamp(38px, 3.75vw, 68px);
  line-height: 1.11111;
  letter-spacing: -.03056em;
}

.professor-title {
  font-size: clamp(22px, 1.80556vw, 31px);
  font-weight: 700;
  line-height: 1.23077;
  letter-spacing: -.01731em;
}

.professor-identity .professor-department {
  margin-top: 4px;
  color: #555;
  font-size: 1.125rem;
  line-height: 1.44444;
}

.professor-profile h3, .student-groups h2 {
  font-size: 1.8125rem;
  line-height: 1.24138;
  letter-spacing: -.02931em;
}

.professor-research, .professor-section {
  display: grid;
  row-gap: 19px;
}

.professor-research > p {
  max-width: 824px;
  font-size: 1.3125rem;
  line-height: 1.52381;
  letter-spacing: -.00762em;
}

.professor-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 14px;
  container-type: inline-size;
  padding: 0;
  list-style: none;
}

.professor-links li, .professor-links a {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.professor-links a {
  gap: .35em;
  min-height: 44px;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.professor-links img { flex: none; width: 1em; height: 1em; object-fit: contain; }
.professor-links a:hover { text-decoration: underline; text-underline-offset: .16em; }

@container (min-width: 46rem) {
  .professor-links li + li::before {
    content: "";
    width: 1px;
    height: .85em;
    margin-inline-end: 14px;
    background: #777;
  }
}

.professor-section {
  padding-top: 29px;
  border-top: 1px solid var(--profile-rule);
}

.profile-history {
  display: grid;
  gap: 18px;
}

.profile-appointments { gap: 21px; }
.profile-awards { gap: 14px; }

.profile-history > div {
  display: grid;
  grid-template-columns: clamp(135px, 12.5vw, 210px) minmax(0, 1fr);
  gap: 24px;
}

.profile-history dt {
  color: #555;
  font-size: 1rem;
  line-height: 1.4375;
}

.profile-history dd, .academic-services ul li {
  font-size: 1.0625rem;
  line-height: 1.47059;
}

.profile-history dd { max-width: 772px; }

.profile-history strong, .academic-services h4 {
  font-size: 1.3125rem;
  line-height: 1.28571;
  letter-spacing: -.01524em;
}

.profile-history strong { display: block; margin-bottom: 3px; }
.profile-history dd p { color: #555; }

.academic-services, .academic-services ul {
  display: grid;
  padding: 0;
  list-style: none;
}

.academic-services { row-gap: 24px; }
.academic-services ul { row-gap: 6px; padding-left: 24px; }

.academic-services h4 {
  position: relative;
  margin-bottom: 8px;
  padding-left: 19px;
}

.academic-services ul li {
  position: relative;
  padding-left: 17px;
}

.academic-services h4::before, .academic-services ul li::before {
  position: absolute;
  top: .5lh;
  transform: translateY(-50%);
  left: 0;
  width: 7px;
  height: 7px;
  background: currentColor;
  content: "";
}

.academic-services ul li::before { width: 5px; height: 5px; }

.student-groups {
  --group-heading-gap: min(28px, calc(var(--roster-inset) - 12px));
}

.student-section {
  display: grid;
  gap: 9px;
}

.student-groups h2 {
  /* Match the visible gap above the capitals, including the line box's leading. */
  padding-inline-start: calc(var(--group-heading-gap) + .5rem);
}

.student-section p {
  padding-inline: var(--roster-inset);
  color: #555;
  font-size: 1.125rem;
  line-height: 1.44444;
}

.student-graduates {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--profile-rule);
}

.student-graduates a {
  text-decoration: underline;
  text-underline-offset: .16em;
}

.student-interns > h2 { padding-block: var(--group-heading-gap) 28px; }

.student-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
  list-style: none;
}

.student-grid li {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  border: 1px solid #f0f0f0;
  border-top: 0;
}

.student-grid img {
  position: absolute;
  inset: 0 0 auto auto;
  display: block;
  width: 50%;
  height: 50%;
}

.student-caption {
  position: absolute;
  top: calc(50% + clamp(20px, 2.11806vw, 40px));
  inset-inline: var(--roster-inset);
  color: #201f20;
  font-size: clamp(18px, 1.52778vw, 27px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.03182em;
}

.student-caption h3 { font-size: inherit; }

.student-caption p {
  color: #757575;
  font-size: max(14px, .72727em);
  font-weight: 400;
}

.student-alumni {
  padding-top: 28px;
  border-top: 1px solid var(--profile-rule);
}

@media (max-width: 700px) {
  .members-hero {
    min-height: clamp(216px, 30svh, 280px);
    padding: 112px var(--gutter) 28px;
  }

  .members-layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 32px var(--gutter) 56px;
  }
  .members-directory { display: none; }

  .professor-profile { margin: 0; row-gap: 32px; }
  .professor-intro { flex-direction: column; align-items: flex-start; gap: 20px; }
  .professor-portrait { width: min(100%, 24rem); }
  .professor-identity h2 { margin-bottom: 8px; }
  .professor-department { text-wrap: balance; }
  .professor-research, .professor-section { row-gap: 12px; }
  .professor-research > p { font-size: 1.125rem; }
  .professor-links { flex-direction: column; align-items: flex-start; }
  .professor-section { padding-block-start: 24px; }
  .profile-history > div { grid-template-columns: 1fr; gap: 4px; }
  .academic-services h4, .academic-services ul { padding-inline-start: 0; }
  .academic-services h4::before { content: none; }

  .student-groups h2, .student-section p { padding-inline: 0; }
  .student-interns > h2 { padding-block: 28px 20px; }
  .student-interns .student-grid {
    grid-template-columns: minmax(0, 1fr);
    margin-inline: calc(-1 * var(--gutter));
  }
  /* The desktop card spans a quarter of the viewport. Keep its proportions at the same card width. */
  .student-caption {
    top: calc(50% + clamp(20px, 8.47224vw, 40px));
    inset-inline: clamp(24px, 11.11112vw, 54px);
    font-size: clamp(18px, 6.11112vw, 27px);
  }
}
