/* ==========================================================================
   Block: Profile
   File:   css/blocks/profile.css
   Markup: includes/blocks/profile.php

   Portrait leads on the left inside a gold offset frame, with the bio set
   left-ragged beside it and the button sitting under the copy rather than
   floating centred beneath the whole section.
   ========================================================================== */

.profile {
  --pr-heading-size: 38px;
  --pr-text-size: 16px;
  --pr-portrait: 420px;
  --pr-column-gap: 72px;
  --pr-button-min-width: auto;

  width: 100%;
  margin: var(--vir-section-gap) 0 0;
  padding: 0 var(--vir-gutter);
  box-sizing: border-box;
}

.profile__inner {
  width: 100%;
  max-width: var(--vir-measure);
  margin: 0 auto;
}

.profile__columns {
  display: flex;
  align-items: center;
  gap: var(--pr-column-gap);
  width: 100%;
}

/* --- Portrait ------------------------------------------------------------ */

.profile__portrait {
  position: relative;
  flex: 0 0 var(--pr-portrait);
  width: var(--pr-portrait);
  height: auto;
  margin: 0;
  order: -1;
  overflow: visible;
}

.profile__portrait::before {
  content: "";
  position: absolute;
  top: 26px;
  left: -26px;
  width: 100%;
  height: 100%;
  border: 3px solid var(--vir-gold);
  pointer-events: none;
}

.profile__portrait img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 50% 50%;
}

/* --- Copy ---------------------------------------------------------------- */

.profile__copy {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.profile .profile__heading {
  margin: 0;
  color: var(--vir-heading);
  font-family: var(--vir-font-display);
  font-size: var(--pr-heading-size);
  line-height: 1.12em;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile .profile__heading::before {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin: 0 0 26px;
  background-color: var(--vir-gold);
}

.profile__text {
  margin: 26px 0 0;
}

.profile .profile__text p {
  margin: 0 0 1.4em;
  color: var(--vir-body);
  font-family: var(--vir-font-body);
  font-size: var(--pr-text-size);
  line-height: 1.85em;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.profile .profile__text p:last-child {
  margin-bottom: 0;
}

/* --- Button -------------------------------------------------------------- */

.profile .profile__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(var(--pr-button-min-width), 100%);
  max-width: 100%;
  min-height: 46px;
  margin: 34px 0 0;
  padding: 12px 32px;
  text-align: center;
  border: 1px solid var(--vir-gold);
  border-radius: 50px;
  background-color: var(--vir-gold);
  color: var(--vir-navy);
  font-family: var(--vir-font-body);
  font-size: 15px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  box-sizing: border-box;
  transition: background-color 0.4s, color 0.4s, border-color 0.4s;
}

.profile .profile__button:hover {
  border-color: var(--vir-navy);
  background-color: var(--vir-navy);
  color: var(--vir-white);
  text-decoration: none;
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 1249px) {
  .profile {
    --pr-portrait: 360px;
    --pr-column-gap: 52px;
    --pr-heading-size: 34px;
  }
}

@media (max-width: 991px) {
  .profile {
    --pr-heading-size: 30px;
    --pr-portrait: 300px;
    --pr-column-gap: 40px;
  }

  .profile__portrait::before {
    top: 18px;
    left: -18px;
  }
}

@media (max-width: 767px) {
  .profile {
    --pr-heading-size: 27px;
    --pr-portrait: 100%;
  }

  .profile__columns {
    flex-direction: column;
    align-items: stretch;
    gap: 34px;
  }

  .profile__portrait {
    flex: 0 0 auto;
    width: 100%;
  }

  .profile__portrait::before {
    top: 14px;
    left: 14px;
  }
}

@media (max-width: 575px) {
  .profile {
    --pr-heading-size: 23px;
    --pr-text-size: 15px;
  }

  .profile .profile__button {
    width: 100%;
    min-width: 0;
  }
}

/* --- White background -----------------------------------------------------
   The section's colour tokens are swapped rather than each rule restyled:
   headings go navy (gold on white is 2.2:1, too faint for text), body copy a
   dark slate. The gold rule, the portrait frame and the gold button are
   decoration or carry their own contrast, so they stay as they are. */

.profile.profile--white {
  --vir-heading: var(--vir-navy);
  --vir-body: #33415a;

  background-color: var(--vir-white);
}
