.profile-map-section {
  --profile-ground: #b9987d;
  position: relative;
  isolation: isolate;
  padding: clamp(58px, 7.5svh, 82px) clamp(24px, 6.4vw, 92px) clamp(48px, 6svh, 70px);
  background: var(--profile-ground);
  color: var(--wine);
}

.profile-map-shell {
  max-width: 1440px;
  margin: 0 auto;
}

.profile-map-heading {
  display: grid;
  min-height: 82px;
  justify-items: start;
  align-content: end;
  gap: 7px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(42, 9, 14, 0.2);
}

.profile-map-kicker {
  margin: 0;
  color: rgba(42, 9, 14, 0.66);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.19em;
  line-height: 1.4;
  text-transform: uppercase;
}

.profile-map-heading h2 {
  margin: 0;
  color: var(--wine);
  font-family: var(--display);
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.profile-map-stage {
  --profile-photo-half: 23vw;
  --profile-photo-width: 46vw;
  --profile-label-gap: clamp(26px, 2.2vw, 34px);
  --profile-label-width: clamp(112px, 12vw, 150px);
  position: relative;
  height: 69vw;
  margin: 0 auto;
  isolation: isolate;
}

.profile-map-backdrop {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  box-sizing: content-box;
  width: var(--profile-photo-width);
  height: 100%;
  border: 0 solid transparent;
  border-width: 0 calc((100vw - var(--profile-photo-width)) / 2);
  border-image-source: url("Assets/digitals/IMG_9750.jpeg");
  border-image-slice: 0 1 0 1;
  border-image-width: 0 calc((100vw - var(--profile-photo-width)) / 2);
  border-image-repeat: stretch;
  opacity: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.profile-map-figure {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: var(--profile-photo-width);
  height: 100%;
  aspect-ratio: 2 / 3;
  margin: 0;
  overflow: visible;
  transform: translate(-50%, -50%);
}

.profile-map-photo {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: #d6c7bb;
  object-fit: cover;
  object-position: 50% 50%;
  transform-origin: center;
}

.profile-measurement-lines {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.profile-measurement-lines__stroke {
  fill: none;
  stroke: rgba(244, 236, 231, 0.74);
  stroke-width: 1px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  transition: stroke 220ms ease, stroke-width 220ms ease, opacity 220ms ease;
}

.profile-measurement-controls {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.profile-measurement,
.profile-secondary-detail {
  appearance: none;
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: var(--profile-label-width);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ivory);
  font: inherit;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
  -webkit-appearance: none;
}

.profile-measurement {
  top: 50%;
  transform: translateY(-50%);
}

.profile-measurement::after {
  position: absolute;
  top: 50%;
  right: calc(-1 * var(--profile-label-gap));
  width: var(--profile-label-gap);
  height: 1px;
  transform: translateY(-50%) scaleX(var(--profile-line-progress, 1));
  background: rgba(244, 236, 231, 0.62);
  content: "";
  transition: background 220ms ease;
  pointer-events: none;
}

.profile-measurement--height::after,
.profile-measurement--waist::after {
  transform-origin: right center;
}

.profile-measurement--height,
.profile-measurement--waist,
.profile-secondary-detail--clothing {
  right: calc(50% + var(--profile-photo-half) + var(--profile-label-gap));
  align-items: flex-end;
  text-align: right;
}

.profile-measurement--bust,
.profile-measurement--hips,
.profile-secondary-detail--hair,
.profile-secondary-detail--eyes,
.profile-secondary-detail--shoe {
  left: calc(50% + var(--profile-photo-half) + var(--profile-label-gap));
  align-items: flex-start;
  text-align: left;
}

.profile-measurement--height { top: 4%; }
.profile-measurement--bust { top: 28%; }
.profile-measurement--waist { top: 37.3%; }
.profile-measurement--hips { top: 46%; }

.profile-measurement--bust::after,
.profile-measurement--hips::after {
  right: auto;
  left: calc(-1 * var(--profile-label-gap));
  transform-origin: left center;
}

.profile-measurement__value {
  display: block;
  color: inherit;
  font-family: var(--display);
  font-size: clamp(38px, 4.2vw, 54px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.82;
  white-space: nowrap;
  font-variant-numeric: lining-nums;
  transition: color 220ms ease;
}

.profile-measurement__unit {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-measurement__label,
.profile-secondary-detail__label {
  display: block;
  color: rgba(244, 236, 231, 0.68);
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
  transition: color 220ms ease;
}

.profile-secondary-details {
  position: absolute;
  z-index: 3;
  inset: 0;
  margin: 0;
  pointer-events: none;
}

.profile-secondary-detail {
  gap: 5px;
  width: var(--profile-label-width);
  transform: translateY(-50%);
}

.profile-secondary-detail--hair { top: 9%; }
.profile-secondary-detail--eyes { top: 16%; }
.profile-secondary-detail--clothing { top: 54%; }
.profile-secondary-detail--shoe { top: 95%; }

.profile-secondary-detail__value {
  display: block;
  max-width: 100%;
  color: inherit;
  font-family: var(--display);
  font-size: clamp(15px, 1.25vw, 18px);
  font-variant-numeric: lining-nums;
  line-height: 1.12;
  transition: color 220ms ease;
}

.profile-map-stage [data-profile-annotation]:hover,
.profile-map-stage [data-profile-annotation]:focus-visible,
.profile-map-stage [data-profile-annotation].is-active {
  color: var(--rose);
}

.profile-map-stage [data-profile-annotation]:hover::after,
.profile-map-stage [data-profile-annotation]:focus-visible::after,
.profile-map-stage [data-profile-annotation].is-active::after {
  background: var(--rose);
}

.profile-map-stage [data-profile-annotation]:focus-visible {
  outline: none;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.profile-map-stage[data-active-annotation="height"] [data-profile-line-group="height"] .profile-measurement-lines__stroke,
.profile-map-stage[data-active-annotation="bust"] [data-profile-line-group="bust"] .profile-measurement-lines__stroke,
.profile-map-stage[data-active-annotation="waist"] [data-profile-line-group="waist"] .profile-measurement-lines__stroke,
.profile-map-stage[data-active-annotation="hips"] [data-profile-line-group="hips"] .profile-measurement-lines__stroke {
  stroke: var(--rose);
  stroke-width: 1.5px;
}

@media (max-width: 1000px) {
  .profile-map-section {
    padding: 58px clamp(18px, 5vw, 30px) 54px;
  }

  .profile-map-heading {
    min-height: 0;
    padding-bottom: 14px;
  }

  .profile-map-kicker {
    font-size: 8px;
  }

  .profile-map-heading h2 {
    font-size: clamp(30px, 7vw, 38px);
  }

  .profile-map-stage {
    display: flex;
    height: auto;
    flex-direction: column;
    align-items: center;
    gap: 26px;
    margin-top: 18px;
  }

  .profile-map-backdrop {
    display: none;
  }

  .profile-map-figure {
    position: relative;
    top: auto;
    left: auto;
    width: min(100%, 560px);
    height: auto;
    aspect-ratio: 2 / 3;
    transform: none;
    overflow: hidden;
  }

  .profile-measurement-lines__stroke {
    stroke: rgba(42, 9, 14, 0.68);
    stroke-width: 0.85px;
  }

  .profile-measurement-controls {
    top: 0;
    right: auto;
    bottom: auto;
    left: 50%;
    width: min(100%, 560px);
    height: auto;
    aspect-ratio: 2 / 3;
    transform: translateX(-50%);
  }

  .profile-measurement {
    width: 27%;
    gap: 4px;
    transform: translateY(-50%);
    color: var(--wine);
  }

  .profile-measurement::after {
    display: none;
  }

  .profile-measurement--height,
  .profile-measurement--waist {
    top: auto;
    right: auto;
    left: 2%;
    align-items: flex-start;
    text-align: left;
  }

  .profile-measurement--bust,
  .profile-measurement--hips {
    left: auto;
    right: 2%;
    align-items: flex-end;
    text-align: right;
  }

  .profile-measurement--height { top: 4%; }
  .profile-measurement--bust { top: 28%; }
  .profile-measurement--waist { top: 37.3%; }
  .profile-measurement--hips { top: 46%; }

  .profile-measurement__value {
    font-size: clamp(24px, 6.4vw, 31px);
  }

  .profile-measurement__unit {
    font-size: 8px;
  }

  .profile-measurement__label {
    color: rgba(42, 9, 14, 0.78);
    font-size: 7px;
    letter-spacing: 0.15em;
  }

  .profile-secondary-details {
    position: relative;
    inset: auto;
    display: grid;
    width: min(100%, 560px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 21px 24px;
    margin: 0;
    pointer-events: none;
  }

  .profile-secondary-detail,
  .profile-secondary-detail--hair,
  .profile-secondary-detail--eyes,
  .profile-secondary-detail--clothing,
  .profile-secondary-detail--shoe {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: auto;
    align-items: flex-start;
    gap: 5px;
    transform: none;
    text-align: left;
  }

  .profile-secondary-detail__label {
    color: rgba(42, 9, 14, 0.66);
    font-size: 8px;
  }

  .profile-secondary-detail__value {
    color: var(--wine);
    font-size: 17px;
  }
}

@media (max-width: 380px) {
  .profile-map-heading h2 {
    font-size: 30px;
  }

  .profile-measurement {
    width: 28%;
  }

  .profile-measurement__value {
    font-size: 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-map-backdrop,
  .profile-map-photo,
  .profile-measurement-lines__stroke,
  .profile-measurement,
  .profile-secondary-detail {
    transition: none;
  }
}
