.block-speakers {
  display: grid;
  grid-template-columns: subgrid;

  > * {
    grid-column: start / end;
  }
}
.block-speakers-header {
  text-align: center;
  max-width: 30rem;
  justify-self: center;
  margin-bottom: 4rem;
}

.block-speakers-list {
  --width: 250px;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, var(--width));
  justify-content: center;
  grid-column-gap: 2rem;
  grid-row-gap: 4rem;
  text-align: center;
  margin: 0;
  padding: 0;
}

.speaker {
  display: grid;
  width: 100%;
  cursor: pointer;
  padding: 1rem;
  margin: 0;
  border: none;
  background: white;
  row-gap: 0.5rem;
  border-radius: 0.5rem;

  > * {
    margin: 0;
  }
  &:hover {
    background-color: color-mix(in srgb, var(--color-light), white 50%);
  }
}

.speaker-image {
  display: block;
  max-width: 100%;
}

.speaker-modal-header {
  display: grid;
  grid-template-areas: "image" "title" "links";

  @media (min-width: 500px) {
    grid-template-areas:
      "image title"
      "image links";
    grid-template-columns: min(20em, 50%) 1fr;
  }
}
.speaker-modal-photo {
  grid-area: image;

  & img {
    width: 100%;
    height: 100%;
    max-height: 50vh;
    object-fit: cover;
    aspect-ratio: 1/1;
    object-position: 25% center;
  }
}
.speaker-modal-title {
  grid-area: title;
  align-self: end;
  padding: 2rem;

  p {
    margin: 0.5em 0 0;
  }
}
.speaker-modal-links {
  grid-area: links;
  align-self: start;
  padding: 0 2rem;
  display: flex;
  column-gap: 0.5em;

  a {
    display: block;
    text-decoration: none;
    padding: 0.5em;
    border-radius: 0.5em;

    &:hover {
      background-color: white;
    }
  }

  svg {
    width: 2em;
    height: 2em;
    display: block;
  }
}
.speaker-modal-bio {
  padding: 2rem;
  font: var(--font-small);

  & > :first-child {
    margin-top: 0;
  }
  & > :last-child {
    margin-bottom: 0;
  }
}
