/* =========================================================
   Team member profile page (template: team-member)
   ========================================================= */

/* --- Hero ---------------------------------------------------------------- */
.member-hero { padding: 0; overflow: hidden; }
.member-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 27.5rem) minmax(0, 1fr);
  column-gap: 2rem;
  min-height: 40rem;
}
.member-hero__info { padding: 5.5rem 0 5.5rem; align-self: center; }
.member-hero__name { width: max-content; max-width: min(90vw, 44rem); margin: 0 0 0.6rem; font-weight: 600; color: #fff; }
.member-hero__role { margin: 0; font-size: var(--fs-h3); font-weight: 400; line-height: 1.3; color: #fff; }
.member-hero__tagline { margin: 0.3rem 0 0; font-size: var(--fs-small); font-weight: 300; color: rgba(255, 255, 255, 0.8); }
.member-hero__bio { margin-top: 2.4rem; font-size: var(--fs-h3); font-weight: 400; line-height: 1.3; color: #fff; }
.member-hero__bio p { margin: 0 0 1rem; }
.member-hero__bio p:last-child { margin-bottom: 0; }
/* long biographies use the running text size (3+ paragraphs, or more than ~500 characters: class set in the template) */
.member-hero__bio:has(p:nth-child(3)),
.member-hero__bio--long { font-size: var(--fs-body); line-height: 1.55; font-weight: 300; }
/* with a regular photo (not a cut-out) the name must stay in its column, otherwise the photo covers it */
.member-hero__inner:has(.member-hero__portrait:not(.member-hero__portrait--cutout)) .member-hero__name { width: auto; max-width: none; }

.social-icons { display: flex; flex-wrap: wrap; gap: 1.6rem; list-style: none; margin: 2.4rem 0 0; padding: 0; }
.social-icons li { margin: 0; padding: 0; }
.social-icons__link { display: block; width: 3.1rem; height: 3.1rem; line-height: 0; transition: transform 0.2s ease; }
.social-icons__link svg { display: block; width: 100%; height: 100%; }
.social-icons__link:hover { transform: translateY(-3px); }

/* large cut-out portrait standing on the bottom edge of the hero */
.member-hero__portrait { position: relative; align-self: stretch; min-height: 24rem; container-type: inline-size; }
.member-hero__portrait img { display: block; width: 100%; max-width: 24rem; margin: 5.5rem 0 5.5rem auto; border-radius: 12px; }
.member-hero__portrait--cutout img {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: auto;
  max-width: none;
  height: calc(100% - 3.5rem);
  max-height: 40rem;
  /* long biographies make the hero taller and the figure grows with it - but never into the text
     column: its left edge stays 1rem inside the gap (0.32 = 42 % offset x 0.76 aspect of the cut-outs) */
  max-height: min(47rem, calc((50cqw + 1rem) / 0.32));
  margin: 0;
  border-radius: 0;
  transform: translateX(-42%);
}
/* wide cut-outs (the team's since 29.09.: 1499 x 1350, shoulders widened with AI, face in the middle; class set in the
   template when the picture is wider than high): the face stays where it is with the narrow ones (1029 x 1350,
   translateX(-42%)): 50 % - 0.08 x 0.762 / 1.110 = 44.51 %. The wide see-through box must not catch clicks meant for
   the text beside it */
.member-hero__portrait--wide img { transform: translateX(-44.51%); pointer-events: none; }
/* long biographies on narrower screens make the hero tall and the figure big: its widened shoulder would reach under
   the last lines of the text (measured: 960-1240 px) - there it fades out towards the text column's edge. In the
   picture's coordinates the portrait column starts at 44.51 % - 50cqw, the text column ends 2rem further left */
@media (min-width: 901px) and (max-width: 1300px) {
  .member-hero__inner:has(.member-hero__bio--long, .member-hero__bio p:nth-child(3)) .member-hero__portrait--wide img {
    -webkit-mask-image: linear-gradient(to right, transparent calc(44.51% - 50cqw - 2rem), #000 calc(44.51% - 50cqw + 1rem));
    mask-image: linear-gradient(to right, transparent calc(44.51% - 50cqw - 2rem), #000 calc(44.51% - 50cqw + 1rem));
  }
}
.member-hero__portrait--cutout img.member-hero__silhouette { transform: translateX(-30%); opacity: 0.85; height: calc(100% - 5rem); max-height: 38rem; }

/* --- Alternating bands ---------------------------------------------------- */
.member-band { padding: 3.4rem 0 4.6rem; text-align: left; }
.member-band--grey { background: #f0f0f0; }
.member-band--white { background: #fff; }
/* icon and heading of a band: calm and plain - one flat, softer violet, heading in the size of card titles
   (feedback 27.09.: no gradients, headings were far too big) */
.member-band__header { display: flex; align-items: center; gap: 1.4rem; margin-bottom: 1.8rem; }
.member-band__icon { flex: none; display: flex; align-items: center; justify-content: center; width: 3.4rem; height: 3.4rem; color: #7a55c9; }
/* uploaded icon rendered as flat single-colour shape: the image is used four times as mask, so parts of an icon that
   are only semi-transparent (gradients) add up to nearly full cover - no gradient shows */
.member-band__icon-shape {
  --mask: var(--icon) center / contain no-repeat;
  display: block;
  width: 100%;
  height: 100%;
  background: #7a55c9;
  -webkit-mask: var(--mask), var(--mask), var(--mask), var(--mask);
  mask: var(--mask), var(--mask), var(--mask), var(--mask);
}
.member-band__title { margin: 0; font-size: var(--fs-h3); font-weight: 600; line-height: 1.25; color: #333; }
.member-band__list { list-style: none; margin: 0; padding: 0; }
.member-band__list li {
  position: relative;
  margin: 0 0 0.85rem;
  padding-left: 0.9rem;
  font-size: var(--fs-small);
  font-weight: 300;
  line-height: 1.55;
  color: #333;
}
.member-band__list li:last-child { margin-bottom: 0; }
.member-band__list li::before { content: "-"; position: absolute; left: 0; top: 0; }
.member-band__publications { display: grid; gap: 1.8rem; }
.member-pub p { margin: 0; font-size: var(--fs-small); font-weight: 300; line-height: 1.7; color: #333; }
.member-pub__title { font-size: var(--fs-body); font-weight: 400; }
.member-pub .member-pub__doi strong { font-weight: 600; }
.member-pub__doi a { font-weight: 600; color: #5b14b8; text-decoration: none; word-break: break-all; }
.member-pub__doi a:hover { text-decoration: none; color: #4a0f98; }
.member-band__link { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 2.6rem; font-size: var(--fs-ui); font-weight: 500; color: #5b14b8; text-decoration: none; }
.member-band__link .icon { transition: transform 0.2s ease; }
.member-band__link:hover { text-decoration: none; color: #5b14b8; }
.member-band__link:hover .icon { transform: translateX(-3px); }

/* --- Other SPECTRE's ------------------------------------------------------- */
.member-others {
  padding: 5rem 0 5rem;
  background-color: #030c1a;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  text-align: center;
}
.member-others .section__title { margin-bottom: 2.5rem; color: #fff; }
.member-grid--dark { margin-top: 1.5rem; }
.member-card--dark .member-card__frame { background: transparent; border-color: rgba(255, 255, 255, 0.75); }
.member-card--dark .member-card__frame--photo { border-color: transparent; }
.member-card--dark .member-card__name { margin-bottom: 0.3rem; color: #fff; }
.member-card--dark .member-card__role { margin-bottom: 1.4rem; font-size: var(--fs-small); color: #fff; }
.member-card__btn { align-self: flex-start; margin-top: auto; }
.member-card--dark:hover .member-card__btn { background: #4a0f98; border-color: #4a0f98; }
.member-card--dark .member-card__btn { font-size: var(--fs-ui); font-weight: 500; }
/* the section runs straight into the footer */
.member-others + .site-footer,
.member-others + footer { margin-top: 0; }

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 900px) {
  .member-hero__name { width: auto; max-width: none; }
  .member-hero__inner { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .member-hero__info { padding: 3.5rem 0 2rem; }
  .member-hero__portrait { min-height: 0; text-align: center; }
  .member-hero__portrait img { margin: 0 auto 3rem; }
  .member-hero__portrait--cutout img,
  .member-hero__portrait--cutout img.member-hero__silhouette {
    position: static;
    height: auto;
    width: auto;
    max-width: min(100%, 26rem);
    max-height: 30rem;
    margin: 0 auto;
    transform: none;
  }
  /* the wide cut-outs (1499 x 1350): as high as the narrow ones are here (min(100 %, 26rem) wide at 0.762 : 1,
     at most 30rem), the face in the middle; the shoulders may run to the screen edges (the hero clips them) */
  .member-hero__portrait--wide img {
    height: min(30rem, calc(100cqw / 0.762));
    max-width: none;
    max-height: none;
    margin: 0 0 0 50%;
    transform: translateX(-50%);
  }
  .member-band { padding: 2.8rem 0 3.4rem; }
  .member-band__header { gap: 1.2rem; margin-bottom: 1.6rem; }
  .member-band__icon { width: 3rem; height: 3rem; }
}
@media (max-width: 600px) {
  .member-hero__info { padding-top: 2.75rem; }
  .member-hero__bio { margin-top: 1.6rem; }
  .social-icons { gap: 1.1rem; margin-top: 1.8rem; }
  .social-icons__link { width: 2.75rem; height: 2.75rem; }
  .member-band__header { gap: 1rem; }
  .member-band__icon { width: 2.6rem; height: 2.6rem; }
  .member-others { padding: 3.5rem 0; background-position: 22% top; }
}
