/* Team page */

h4 .header-link {
  display: none;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0 3rem;
}

/* Full-width layout so ten members sit in two rows of five */
.team-grid,
#research-team {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.team-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1rem 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.team-member:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.team-member p {
  margin: 0;
}

.team-member > p:last-child {
  margin-top: auto;
}

.team-member img {
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--teal-tint);
  margin-bottom: 1rem;
}

.team-name {
  display: block;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  color: var(--ink);
}

.team-role {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal-dark);
  margin-top: 0.15rem;
}

.team-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.85rem;
}

.team-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--teal-tint);
  color: var(--teal-dark);
  font-size: 1rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.team-links a:hover,
.team-links a:focus-visible {
  background: var(--teal);
  color: #fff;
}

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

  .team-member {
    padding: 1.25rem 0.5rem 1rem;
  }

  .team-member img {
    width: 92px;
    height: 92px;
  }

  .team-name {
    font-size: 0.92rem;
    white-space: normal;
    min-height: 2.6em;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
