.team-profiles {
  padding: clamp(64px, 8vw, 112px) 0;
  background: var(--cream);
  color: var(--text);
}

.team-profiles-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: clamp(16px, 2vw, 28px);
  margin-top: clamp(30px, 4vw, 52px);
}

.team-profiles-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--cream);
  transition: border-color 160ms ease;
}

.team-profiles-card:hover {
  border-color: var(--bronze);
}

.team-profiles-card:focus-within {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
}

.team-profiles-portrait {
  aspect-ratio: 1 / 1;
  background: var(--paper);
  overflow: hidden;
}

.team-profiles-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter 180ms ease;
}

.team-profiles-card:is(:hover, :focus-within) img {
  filter: none;
}

.team-profiles-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(16px, 2vw, 28px);
}

.team-profiles-card h3 {
  font-size: clamp(28px, 2.5vw, 36px);
  overflow-wrap: anywhere;
}

.team-profiles-card p {
  flex: 1;
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.team-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  padding: 0;
  background: none;
  color: var(--ink);
  font: 700 14px var(--sans);
  cursor: pointer;
}

.team-profile-link::after {
  position: absolute;
  inset: 0;
  content: "";
}

.team-profile-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-page { padding: clamp(36px, 6vw, 86px) 0; }
.profile-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: clamp(22px, 4vw, 48px);
  color: var(--bronze);
  font-weight: 700;
}
.profile-back:hover { text-decoration: underline; }
.profile-back:focus-visible { outline: 2px solid var(--bronze); outline-offset: 4px; }
.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  align-items: start;
  gap: clamp(28px, 6vw, 88px);
}
.profile-photo {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-top: 3px solid var(--gold);
  background: var(--paper);
}
.profile-heading h1 { font-size: clamp(42px, 6vw, 78px); }
.profile-heading p { margin-top: 10px; color: var(--muted); font-weight: 600; }

.team-profiles-credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 26px;
  padding: 0;
  list-style: none;
}

.team-profiles-credentials li {
  border: 1px solid var(--line);
  padding: 4px 9px;
  background: var(--paper);
  font-size: 13px;
}

.team-profiles-bio p + p {
  margin-top: 14px;
}

.team-profiles-expertise {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
  margin-top: 28px;
}

.team-profiles-expertise > div,
.team-profiles-role {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.team-profiles-expertise h3,
.team-profiles-role h3 {
  margin-bottom: 6px;
  font-size: 26px;
}

.team-profiles-role {
  margin-top: 26px;
}

@media (max-width: 960px) {
  .team-profiles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .profile-layout { grid-template-columns: minmax(0, 1fr); }
  .profile-photo { max-width: 320px; }
}

@media (max-width: 520px) {
  .team-profiles-grid,
  .team-profiles-expertise {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-profiles-card,
  .team-profiles-portrait img {
    transition: none;
  }
}
