.page-head h1,
#advisors h2 {
  max-width: 18ch;
}

#advisors {
  padding-top: var(--section);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

.team-grid[data-cols="4"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: var(--inset);
  padding-bottom: 24px;
}

.team-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--graphite);
}

.team-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.team-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgb(18 84 79 / 0.35));
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}

.team-card:hover .team-photo::after {
  opacity: 1;
}

.team-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding-inline: 12px;
}

.team-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.team-info > p {
  flex: 1;
}

.team-org {
  height: 30px;
  width: auto;
  border-radius: 6px;
}

.team-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
}

.team-link::before {
  content: "";
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23111'%3E%3Cpath d='M4.98 3.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5zM3 9.75h4v11H3zM9.5 9.75h3.8v1.5h.05c.53-1 1.83-1.85 3.77-1.85 4.03 0 4.78 2.5 4.78 5.75v6.1h-4v-5.4c0-1.3-.03-2.95-1.8-2.95-1.8 0-2.08 1.4-2.08 2.86v5.49h-4z'/%3E%3C/svg%3E")
    center / 16px no-repeat;
}

.team-link::after {
  content: "↗";
  transition: transform 0.5s var(--ease-out);
}

.team-link:hover {
  background: var(--accent);
}

.team-link:hover::after {
  transform: translate(3px, -3px);
}

@media (max-width: 1100px) {
  .team-grid[data-cols="4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

@media (max-width: 560px) {
  .team-grid,
  .team-grid[data-cols="4"] {
    grid-template-columns: minmax(0, 1fr);
  }
  .team-photo {
    aspect-ratio: 1;
  }
}
