/* A personal image constellation. A clear, complete composition is the fallback. */
.portrait-scene-module { color: var(--purple); padding-block: 64px 0; }
.portrait-scene-module > .module-caption { padding-inline: var(--gutter); padding-bottom: 24px; }
.portrait-scene { position: relative; }
.portrait-stage { position: relative; isolation: isolate; min-height: 760px; height: 100svh; display: grid; place-items: center; overflow: clip; }
.portrait-gallery { position: absolute; inset: 0; pointer-events: none; perspective: 250svh; perspective-origin: 50% 50%; }
.portrait-facet { position: absolute; margin: 0; }
.portrait-facet img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--photo-focus, 50% 50%); border-radius: var(--radius-photo); }
.portrait-facet--1 { left: -3%; top: -3%; width: 17%; aspect-ratio: 3/4; }
.portrait-facet--2 { right: -9%; top: 26%; width: 23%; aspect-ratio: 3/4; }
.portrait-facet--3 { left: -9%; top: 18%; width: 25%; aspect-ratio: 1/1; }
.portrait-facet--4 { left: -5%; bottom: -12%; width: 18%; aspect-ratio: 3/4; }
.portrait-facet--5 { right: -7%; top: 1%; width: 24%; aspect-ratio: 4/3; }
.portrait-facet--6 { right: -4%; top: 19%; width: 16%; aspect-ratio: 3/4; }
.portrait-facet--7 { right: -8%; bottom: -11%; width: 22%; aspect-ratio: 3/4; }
.portrait-facet--8 { left: -8%; top: 25%; width: 24%; aspect-ratio: 4/3; }
.portrait-facet--9 { left: -2%; bottom: -8%; width: 18%; aspect-ratio: 3/4; }
.portrait-facet--10 { right: -4%; top: 1%; width: 21%; aspect-ratio: 1/1; }
.portrait-facet--10 img { object-position: var(--photo-focus, 50% 28%); }
.portrait-facet--11 { left: -8%; top: 5%; width: 24%; aspect-ratio: 4/5; }
.portrait-facet--12 { right: -8%; bottom: -8%; width: 23%; aspect-ratio: 1/1; }
.portrait-scene-copy { position: relative; z-index: 1; width: 44%; max-width: 640px; padding-block: 24px; text-align: center; }
.portrait-scene-copy h2 { margin: 0 0 var(--space-heading-copy); font: 700 var(--type-section)/var(--leading-heading) Poppins,sans-serif; letter-spacing: -.035em; }
.portrait-identity { margin: 0 0 var(--space-heading-copy); font: 700 clamp(30px,3.2vw,48px)/var(--leading-heading) Poppins,sans-serif; letter-spacing: -.03em; }
.portrait-identity > span { display: block; }
.portrait-identity-accent { color: var(--orange); }
.portrait-personality { max-width: 34ch; margin: 0 auto; font: 400 var(--type-body)/var(--leading-short) Inter,sans-serif; text-wrap: pretty; }
.portrait-personality + .portrait-personality { margin-top: var(--space-group); }
.portrait-gallery-note { max-width: 48ch; margin: var(--space-group) auto 0; font: 400 var(--type-note)/var(--leading-short) Inter,sans-serif; color: var(--text-muted); text-wrap: pretty; }
.portrait-scene-copy > .ui-text-link { margin-top: var(--space-group); gap: 16px; }
.portrait-scroll-note { display: none; position: absolute; bottom: 24px; left: 30%; right: 30%; margin: 0; text-align: center; font: 400 var(--type-note)/var(--leading-short) Inter,sans-serif; color: var(--text-muted); }
.portrait-scroll-note span { display: block; margin-top: 6px; font-size: 22px; }
.portrait-scene.is-scroll-scene { height: 400svh; }
.is-scroll-scene .portrait-stage { position: sticky; top: 0; min-height: 0; }
.is-scroll-scene .portrait-scroll-note { display: block; }
/* Focus never waits for decorative scrolling. */
.portrait-stage:focus-within [data-portrait-phrase] { clip-path: none !important; transform: none !important; }
/* Without motion, every distinct photograph remains available in normal flow. */
.portrait-scene:not(.is-scroll-scene) .portrait-stage { height: auto; min-height: 0; padding: 40px var(--gutter) 64px; display: flex; flex-direction: column; gap: 40px; }
.portrait-scene:not(.is-scroll-scene) .portrait-scene-copy { order: -1; width: 100%; max-width: 560px; padding: 0; }
.portrait-scene:not(.is-scroll-scene) .portrait-gallery { position: relative; inset: auto; width: 100%; max-width: 960px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: center; gap: 32px; perspective: none; }
.portrait-scene:not(.is-scroll-scene) .portrait-facet { position: relative; inset: auto; width: 100%; aspect-ratio: 4/5; }
.portrait-scene:not(.is-scroll-scene) .portrait-facet:nth-child(3n + 1) { width: 86%; justify-self: center; transform: rotate(-3deg); }
.portrait-scene:not(.is-scroll-scene) .portrait-facet:nth-child(3n + 2) { transform: rotate(3deg); }
.portrait-scene:not(.is-scroll-scene) .portrait-facet[aria-hidden] { display: none; }
.portrait-gallery-controls { order: 1; align-self: center; width: max-content; max-width: 100%; display: flex; align-items: center; gap: 8px; }
.portrait-gallery-controls[hidden] { display: none; }
.portrait-gallery-button.ui-button { flex: 0 0 48px; width: 48px; height: 48px; min-height: 48px; padding: 0; border-radius: 50%; }
.portrait-gallery-position { margin-left: 8px; white-space: nowrap; font: 600 var(--type-meta)/var(--leading-short) Inter, sans-serif; font-variant-numeric: tabular-nums; }
.portrait-gallery:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: -4px; }
@media (max-width: 900px), (max-height: 679px) {
  .portrait-scene-module { padding-top: 32px; }
  .portrait-stage { height: auto; min-height: 0; padding: 40px var(--gutter) 56px; display: flex; flex-direction: column; gap: 40px; overflow: clip; }
  .portrait-scene-copy { order: -1; width: 100%; max-width: 560px; padding: 0; }
  .portrait-gallery,
  .portrait-scene:not(.is-scroll-scene) .portrait-gallery {
    position: relative; inset: auto; display: flex; align-items: stretch; gap: 12px;
    width: calc(100% + 2 * var(--gutter)); max-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 12px;
    overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scroll-behavior: smooth;
    perspective: none; pointer-events: auto; scrollbar-width: thin; scrollbar-color: var(--line) var(--paper);
  }
  /* The last photo can reach the same start edge, even when several fit onscreen. */
  .portrait-gallery::after {
    content: "";
    flex: 0 0 max(0px, calc(100vw - min(78vw, 340px) - 2 * var(--gutter) - 12px));
  }
  .portrait-facet,
  .portrait-scene:not(.is-scroll-scene) .portrait-facet:nth-child(n) {
    position: relative; inset: auto; flex: 0 0 min(78vw, 340px);
    width: min(78vw, 340px); max-width: none; aspect-ratio: 4/5;
    transform: none; scroll-snap-align: start; border-radius: var(--radius-photo); overflow: hidden;
  }
  .portrait-facet img { border-radius: var(--radius-photo); }
  .portrait-facet[aria-hidden] { display: none; }
  .portrait-gallery-controls { margin-top: -16px; }
  .portrait-identity { font-size: 30px; }
}
body.motion-off .portrait-scene .portrait-gallery { scroll-behavior: auto; }
@media (prefers-reduced-motion: reduce) {
  .portrait-scene.is-scroll-scene { height: auto; }
  .portrait-scene .portrait-stage { position: relative; }
  .portrait-scene [data-portrait-phrase] { clip-path: none !important; transform: none !important; }
  .portrait-scene .portrait-facet { filter: none !important; }
  .portrait-scene .portrait-gallery { scroll-behavior: auto; }
  .portrait-scroll-note { display: none !important; }
}

/* Larger complete portraits for the selected personal photo series. */
@media (min-width: 901px) and (min-height: 680px) {
  /* Personal portraits need complete frames while passing through focus.
     Keep their resting positions inside the viewport and the copy column free. */
  .is-scroll-scene .portrait-gallery[data-portrait-layout="personal"] .portrait-facet {
    width: min(24vw, 430px, 40svh);
    aspect-ratio: 4/5;
  }
  .is-scroll-scene .portrait-gallery[data-portrait-layout="personal"] .portrait-facet[data-photo-format="tall"] {
    aspect-ratio: 2/3;
  }
  .is-scroll-scene .portrait-gallery[data-portrait-layout="personal"] .portrait-facet--1 { left: 2%; top: 24%; }
  .is-scroll-scene .portrait-gallery[data-portrait-layout="personal"] .portrait-facet--2 { right: 2%; top: 42%; }
  .is-scroll-scene .portrait-gallery[data-portrait-layout="personal"] .portrait-facet--3 { left: 2%; top: 42%; }
  .is-scroll-scene .portrait-gallery[data-portrait-layout="personal"] .portrait-facet--4 { left: 2%; bottom: 8%; }
  .is-scroll-scene .portrait-gallery[data-portrait-layout="personal"] .portrait-facet--5 { right: 2%; top: 8%; }
  .is-scroll-scene .portrait-gallery[data-portrait-layout="personal"] .portrait-facet--6 { right: 2%; top: 34%; }
  .is-scroll-scene .portrait-gallery[data-portrait-layout="personal"] .portrait-facet--7 { right: 2%; bottom: 8%; }
  .is-scroll-scene .portrait-gallery[data-portrait-layout="personal"] .portrait-facet--8 { left: 2%; top: 30%; }
  .is-scroll-scene .portrait-gallery[data-portrait-layout="personal"] .portrait-facet--9 { left: 2%; bottom: 10%; }
  .is-scroll-scene .portrait-gallery[data-portrait-layout="personal"] .portrait-facet--10 { right: 2%; top: 8%; }
  .is-scroll-scene .portrait-gallery[data-portrait-layout="personal"] .portrait-facet--11 { left: 2%; top: 8%; }
  .is-scroll-scene .portrait-gallery[data-portrait-layout="personal"] .portrait-facet--12 { right: 2%; bottom: 8%; }
}
