#team {
  background: var(--bg);
  text-align: center;
}

#team-heading span {
  display: inline-block;
}

#team p {
  margin: 14px auto clamp(24px, 3vw, 38px);
  text-wrap: pretty;
}

#team .team-portraits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 32px);
  max-width: 1080px;
  margin-inline: auto;
}

#team .team-portraits img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  outline: 1px solid var(--line);
}

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

.team-portrait-smadar {
  position: relative;
  align-self: start;
  container-type: inline-size;
}

.team-publication-role {
  position: absolute;
  top: 74.1%;
  right: 12.4%;
  width: 29.2%;
  height: 4.6%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  padding-inline-start: .26cqw;
  direction: rtl;
  white-space: nowrap;
  color: #f7f7f7;
  font: 400 3.35cqw/1 Heebo, Arial, sans-serif;
  isolation: isolate;
}

.team-publication-role::before {
  content: "";
  position: absolute;
  inset: 0 0 0 27.4%;
  z-index: -1;
  /* Match the background immediately below the old lettering. */
  background: url("photos/team-smadar-corrected.webp") -66.4cqw -78.4cqw / 100cqw 100cqw no-repeat;
  mask-image: linear-gradient(to right, transparent, black 3%, black 99%, transparent),
              linear-gradient(to bottom, transparent, black 14%, black 86%, transparent);
  mask-composite: intersect;
}
