/*
 * .speaker-hero — content of the speaker page hero
 * (template-parts/global/hero-speaker.php, inside .hero.hero--inner.hero--speaker).
 * Figma: D 1795:32039; no phone frame.
 *
 * Phones and tablets: photo (up to 335 px) above the text.
 * From 1025 px: photo 335 px | text, the gap 60 → 139 px over 1025 → 1430;
 * the photo top 30 px above the name's cap line.
 * Text boxes are trimmed to cap line / baseline, so the margins are the Figma gaps.
 */

/* .hero--speaker — Figma "hero v3" fill #3a6498 under the photo */
.hero--speaker {
  background-color: #3a6498;
}

/* .hero--speaker .hero__bg-image — the photo at 40 % (Figma "image 918") */
.hero--speaker .hero__bg-image {
  opacity: 0.4;
}

/* .hero--inner.hero--speaker::after — the speaker frame's own layers, top first, at every width
   (no phone frame): glow "Ellipse 122" (60 %) and "Ellipse 121" (10 %), "image 24" at 90 %, the
   navy gradient of "image 23" and "image 918" at 60 %; angles and stops converted from their
   gradientTransform over the 1520 × 802 hero (the layers are 1920 × 1000 from x −200) */
.hero--inner.hero--speaker::after {
  background:
    radial-gradient(ellipse 35% 40% at 100% 8%, rgba(33, 118, 190, 0.6), transparent 70%),
    radial-gradient(circle at 76% 129%, rgba(33, 118, 190, 0.1) 25rem, transparent 35rem),
    linear-gradient(348deg, rgba(19, 33, 50, 0) -49.8%, rgba(19, 33, 50, 0.72) 27.5%, rgba(26, 121, 191, 0.9) 71.4%),
    linear-gradient(205deg, rgba(19, 33, 50, 0) 11.9%, rgba(19, 33, 50, 0.36) 55.5%, rgba(19, 33, 50, 0.6) 80.2%),
    linear-gradient(205deg, rgba(19, 33, 50, 0) 11.9%, rgba(19, 33, 50, 0.36) 55.5%, rgba(19, 33, 50, 0.6) 80.2%);
}

/* .hero--speaker .hero__container — photo top 244 px from the hero top at 1430+ (Figma); from
   768 px the 60 px of the back link (20 px + 40 px gap) come out of the padding, so the photo
   stays where it was; phones keep the header clearance and grow by the link. No container gap
   (index.css: 50 px): the link sets its own 40 px */
.hero--speaker .hero__container {
  gap: 0;
  padding-top: clamp(7.25rem, 4.4063rem + 12.1327vw, 15.25rem);

  /* @media (width >= 48em) .hero--speaker .hero__container */
  @media (width >= 48em) {
    padding-top: calc(clamp(7.25rem, 4.4063rem + 12.1327vw, 15.25rem) - 3.75rem);
  }
}

/* .speaker-hero__back — "Back to Webinars": 20 px chevron, 18 px text, white at 50 %, 40 px above
   the photo (Figma 404:30167, Vlad 2026-10-23) */
.speaker-hero__back {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  color: var(--nv-white);
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1;
  letter-spacing: -0.02em;
  opacity: 0.5;
  transition: opacity 0.3s ease;

  /* .speaker-hero__back:focus-visible */
  &:focus-visible {
    outline: 0.125rem solid var(--nv-green);
    outline-offset: 0.25rem;
    opacity: 1;
  }
}

/* .speaker-hero__back-icon */
.speaker-hero__back-icon {
  flex-shrink: 0;
}

/* @media (hover: hover) .speaker-hero__back:hover */
@media (hover: hover) and (pointer: fine) {
  .speaker-hero__back:hover {
    opacity: 1;
  }
}

/* .speaker-hero — photo above the text, 40 px apart */
.speaker-hero {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  color: var(--nv-white);

  /* @media (width >= 64.0625em) .speaker-hero — photo | text */
  @media (width >= 64.0625em) {
    display: grid;
    grid-template-columns: 20.9375rem minmax(0, 1fr);
    align-items: start;
    gap: clamp(3.75rem, -8.7438rem + 19.5062vw, 8.6875rem);
  }
}

/* .speaker-hero--no-photo — text only */
.speaker-hero--no-photo {
  /* @media (width >= 64.0625em) .speaker-hero--no-photo */
  @media (width >= 64.0625em) {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* .speaker-hero__photo — square, 10 px corners */
.speaker-hero__photo {
  overflow: hidden;
  width: 100%;
  max-width: 20.9375rem;
  border-radius: var(--nv-radius-s);
  aspect-ratio: 1;
}

/* .speaker-hero__image */
.speaker-hero__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* .speaker-hero__content — name, role, skills, about one under another */
.speaker-hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;

  /* @media (width >= 64.0625em) .speaker-hero__content — the name's cap line 30 px under the photo top */
  @media (width >= 64.0625em) {
    padding-top: 1.875rem;
  }
}

/* .speaker-hero__role — 20 → 23 px green, line-height 1.4; name baseline → cap 34 px */
.speaker-hero__role {
  margin-top: calc(2.125rem - 0.33em);
  margin-bottom: -0.35em;
  color: var(--nv-green);
  font-weight: 600;
  font-size: var(--nv-fs-lead);
  line-height: 1.4;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

/* .speaker-hero__skills — 20 px points, two 333 px columns 21 px apart from 501 px
   (top to bottom, then the next column); 40 px under the role */
.speaker-hero__skills {
  width: 100%;
  max-width: 42.9375rem;
  margin-top: calc(2.5rem - 0.24em);
  margin-bottom: -0.26em;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  columns: 2 15rem;
  column-gap: 1.3125rem;
}

/* .speaker-hero__skill — 8 px rhomb level with the cap line, text 18 px from the left; rows 5 px apart */
.speaker-hero__skill {
  position: relative;
  padding-left: 1.125rem;
  break-inside: avoid;

  & + & {
    margin-top: 0.3125rem;
  }

  /* .speaker-hero__skill::before — rhomb */
  &::before {
    content: "";
    position: absolute;
    top: 0.24em;
    left: 0;
    width: 0.5rem;
    height: 0.5rem;
    background: url("../../img/icons/rhomb.svg") center / contain no-repeat;
  }
}

/* .speaker-hero__about — label row, 32 px, biography; 50 px under the skills */
.speaker-hero__about {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  margin-top: 3.125rem;
}

/* .speaker-hero__label — 24 px star + green caps, 20 px */
.speaker-hero__label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--nv-green);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;

  /* .speaker-hero__label::before — icon */
  &::before {
    content: "";
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    background: url("../../img/icons/speaker-about.svg") center / contain no-repeat;
  }
}

/* .speaker-hero__bio — 18 px, a blank line between paragraphs */
.speaker-hero__bio {
  font-size: 1.125rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;

  & > :first-child {
    margin-top: -0.24em;
  }

  & > :last-child {
    margin-bottom: -0.26em;
  }

  & p + p {
    margin-top: 1.2em;
  }

  & a {
    color: var(--nv-green);
    text-decoration: underline;
    text-underline-offset: 0.15em;
  }
}
