/* ==========================================================================
   Bring Them Light — Shared memorial profile layout system
   --------------------------------------------------------------------------
   Reference implementation: profiles/kim-dukarker/
   Load after ../../css/styles.css, before profiles/<slug>/style.css.

   Per-profile style.css should contain only:
     • Quote photo backgrounds (paths under profiles/<slug>/images/)
     • Hero focal-point overrides (--hero-focus)
     • Tribute embed variants (Instagram poster, etc.)
   ========================================================================== */


/* ==========================================================================
   Design Tokens — kept in sync with the main site
   ========================================================================== */
:root {
    /* Aligned with ../../css/styles.css — use variables only for colour. */
    --color-primary-dark: #2C2C2C;
    --color-primary-dark-hover: #202020;
    --color-warm-light: #F4F0E3;

    --color-bg: var(--color-primary-dark);
    --color-bg-alt: var(--color-primary-dark);
    --color-surface: var(--color-primary-dark);
    --color-surface-light: var(--color-warm-light);

    --color-text: var(--color-warm-light);
    --color-text-on-light: var(--color-primary-dark);

    --color-text-muted: rgba(244, 240, 227, 0.78);
    --color-text-dim: rgba(244, 240, 227, 0.55);
    --color-text-muted-on-light: rgba(44, 44, 44, 0.72);
    --color-text-dim-on-light: rgba(44, 44, 44, 0.52);

    --color-border: rgba(244, 240, 227, 0.12);
    --color-border-strong: rgba(244, 240, 227, 0.22);
    --color-accent-glow: rgba(189, 173, 123, 0.22);
    --color-highlight: var(--color-accent-on-light);
    --color-highlight-glow: var(--color-accent-glow);
    --color-primary: var(--color-accent);
    --color-primary-soft: var(--color-accent);

    --font-body: "Figtree", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: var(--font-body);
    --font-serif: var(--font-body);
    --font-sans: var(--font-body);

    --fs-xs: 0.75rem;
    --fs-sm: 0.9375rem;
    --fs-base: 1.0625rem;
    --fs-md: 1.25rem;
    --fs-lg: 1.625rem;
    --fs-xl: 2.25rem;
    --fs-2xl: 3rem;
    --fs-3xl: 4.5rem;

    --lh-tight: 1.05;
    --lh-snug: 1.25;
    --lh-base: 1.7;
    --lh-prose: 1.75;
    --lh-prose-relaxed: 1.85;

    --fs-prose-secondary: 1rem;
    --fs-prose-story: clamp(1.0625rem, 0.45vw + 1rem, 1.125rem);
    --measure-prose-wide: 68ch;

    --tracking-tight: -0.02em;
    --tracking-wide: 0.16em;
    --tracking-wider: 0.28em;
    --tracking-name: 0.18em;
    --tracking-nav: 0.12em;

    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2.5rem;
    --space-2xl: 4rem;

    --section-py: clamp(1.4rem, 2.75vw, 2.5rem);
    --section-py-compact: clamp(1.1rem, 2.5vw, 1.9rem);
    --container-px: clamp(1.25rem, 4vw, 2rem);

    --max-width: 1200px;
    --max-width-narrow: 760px;
    --max-width-prose: 640px;

    --header-height: 5rem;
    --header-z: 100;
    --header-action-size: 2.5rem;

    /* In-page anchors + memorial nav: align with fixed site header */
    --profile-scroll-offset: calc(var(--header-height) + 1.125rem);

    --radius-sm: 0.25rem;
    --radius: 0.5rem;

    --button-radius: 0.45rem;
    --button-padding-y: 0.86rem;
    --button-padding-x: 1.35rem;
    --button-font-size: 0.8125rem;
    --button-font-weight: 500;
    --button-letter-spacing: 0.1em;
    --button-bg: var(--color-primary-dark);
    --button-bg-hover: var(--color-primary-dark-hover);
    --button-text: var(--color-warm-light);
    --button-border: var(--color-primary-dark);
    --button-shadow-hover: 0 12px 26px -22px rgba(44, 44, 44, 0.72);

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --dur: 0.35s;
}


/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: auto;
    min-height: 100%;
    font-family: var(--font-body);
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: var(--profile-scroll-offset);
    overflow-x: hidden;
    overflow-y: auto;
    max-width: 100%;
}

img, picture, video, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}

ul { list-style: none; }

::selection {
    background: var(--color-accent);
    color: var(--color-text-on-light);
}


/* ==========================================================================
   Base Typography
   ========================================================================== */
body {
    height: auto;
    min-height: 100%;
    font-family: inherit;
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    color: var(--color-text);
    background-color: var(--color-bg);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-wrap: break-word;
    overflow-x: hidden;
    overflow-y: auto;
    max-width: 100%;
    overscroll-behavior-x: none;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: var(--lh-tight);
    color: var(--color-text);
    letter-spacing: var(--tracking-tight);
}


/* ==========================================================================
   Layout helpers
   ========================================================================== */
main {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
}

.profile-container {
    width: 100%;
    min-width: 0;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--container-px);
}

.profile-container--prose {
    max-width: var(--max-width-prose);
}

/* Wider variant — used by the gallery so the photo collage gets more
   room to breathe than the standard 1200px content max-width. */
.profile-container--wide {
    max-width: 1480px;
}


/* ==========================================================================
   Header — styled by the shared site stylesheet (../../css/styles.css).
   The local rules that used to live here have been removed so the header
   matches the homepage exactly (logo + full nav + dropdown + actions +
   mobile hamburger). Page-specific overrides, if any, can go here later.
   ========================================================================== */


/* ==========================================================================
   Hero — full-bleed background image, dark overlay,
   centered name (display serif) + dates (warm gold).
   ========================================================================== */
.profile-hero {
    position: relative;
    width: 100%;
    min-height: 100svh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
    /* push content below the fixed header on first paint */
    padding-top: var(--header-height);
}

/* The <picture> element needs to fill the hero so its inner <img> can
   resolve absolute positioning against it the same way as a bare <img>. */
.profile-hero > picture {
    position: absolute;
    inset: 0;
    z-index: -2;
    display: block;
}

.profile-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /*
     * Focal point of the hero crop. Biased toward the top of the image
     * so portraits keep heads visible on every viewport.
     *
     * To fine-tune for a specific profile, override on the .profile-hero
     * element directly (no CSS edit needed):
     *
     *   <section class="profile-hero"
     *            style="--hero-focus: center 12%;
     *                   --hero-focus-mobile: center top;">
     *
     * Y values (smaller = higher in the photo):
     *   center top   → guarantees top of photo always visible
     *   center 10%   → very high (head right at top of frame)
     *   center 20%   → default, works for most portraits
     *   center 35%   → for photos where the face sits mid-frame
     */
    object-position: var(--hero-focus, center 20%);
    /* Subtle warmth + slight desaturation, same mood as main site imagery */
    filter: grayscale(15%) brightness(0.78) contrast(1.02);
}

/* On phones, default to the very top so portraits never crop the head.
   Override per-profile with `--hero-focus-mobile` on .profile-hero. */
@media (max-width: 720px) {
    .profile-hero__bg {
        object-position: var(--hero-focus-mobile, center top);
    }
}

.profile-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    /* Stronger scrim in the nav band so frosted header + photo feel continuous */
    background:
        linear-gradient(
            180deg,
            rgba(44, 44, 44, 0.62) 0%,
            rgba(44, 44, 44, 0.38) 28%,
            rgba(44, 44, 44, 0.32) 45%,
            rgba(44, 44, 44, 0.75) 100%
        ),
        radial-gradient(
            ellipse 70% 60% at 50% 55%,
            rgba(189, 173, 123, 0.08),
            transparent 70%
        );
}

.profile-hero__content {
    position: relative;
    text-align: center;
    padding-inline: var(--container-px);
    max-width: 60rem;
}

.profile-hero__name {
    font-family: var(--font-heading);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--tracking-name);
    line-height: 1.02;
    color: var(--color-text);
    font-size: clamp(2.75rem, 9vw, 6.5rem);
    text-shadow: 0 2px 20px rgba(44, 44, 44, 0.5);
}

.profile-hero__dates {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    letter-spacing: var(--tracking-wide);
    color: var(--color-primary-soft);
    margin-top: clamp(0.75rem, 2vw, 1.25rem);
}


/* ==========================================================================
   Section primitives — shared title/lead and rhythm
   ========================================================================== */
.profile-section {
    padding-block: var(--section-py);
    background-color: var(--color-bg);
    /* Adjacent sections pad themselves; an alt-bg sibling can override rhythm. */
}

/* Alternating surface color, exactly like .lives → .apart on the main site */
.profile-story {
    background-color: var(--color-surface-light);
    color: var(--color-text-on-light);
    padding-block: clamp(1.65rem, 3.6vw, 2.85rem);
}

/* Story section — wider measure, gentler line-height and paragraph rhythm */
.profile-story .profile-container--prose {
    max-width: min(52rem, 100%);
}

.profile-story .profile-section__title {
    margin-bottom: clamp(1.85rem, 4.25vw, 2.85rem);
    text-align: center;
    color: var(--color-text-on-light);
}

.profile-story .profile-prose {
    text-align: center;
}

.profile-story .profile-prose p {
    max-width: 68ch;
    margin-inline: auto;
    line-height: 1.85;
    font-size: clamp(1.0625rem, 0.45vw + 1rem, 1.1875rem);
    color: var(--color-text-muted-on-light);
}

.profile-story .profile-prose p + p {
    margin-top: clamp(1.2rem, 2.8vw, 1.75rem);
}

/* Gallery shares the warm-white surface with About so the photo collage
   sits on the same light tone — feels like one continuous "memories" zone. */
.profile-gallery {
    position: relative;
    z-index: 1;
    background-color: var(--color-surface-light);
    padding-bottom: clamp(2.75rem, 6.25vw, 4.75rem);
    box-shadow: 0 12px 40px rgba(44, 44, 44, 0.06);
}

.profile-gallery .profile-section__title {
    color: var(--color-text-on-light);
    font-style: normal;
    font-family: var(--font-sans);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    margin-bottom: 0;
}

.profile-gallery__header {
    text-align: center;
    max-width: 36rem;
    margin-inline: auto;
    margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.profile-gallery__hint {
    font-family: var(--font-sans);
    font-size: var(--fs-sm);
    font-weight: 400;
    line-height: var(--lh-snug);
    color: var(--color-text-muted-on-light);
    margin-top: 0.65rem;
    letter-spacing: 0.02em;
}

.profile-gallery__scroll-hint {
    display: none;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin: clamp(0.75rem, 2.5vw, 1rem) auto 0;
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(44, 44, 44, 0.48);
    transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}

.profile-gallery__scroll-hint-icon {
    display: inline-block;
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.65;
    animation: profile-gallery-hint-nudge 2.8s ease-in-out infinite;
}

@keyframes profile-gallery-hint-nudge {
    0%, 100% {
        transform: translateX(0);
        opacity: 0.65;
    }
    50% {
        transform: translateX(3px);
        opacity: 0.95;
    }
}

/* ==========================================================================
   About — light tonal break, two-column (text + portrait).
   Matches the reference: uppercase sans heading, dark body on white,
   portrait photo on the right, generous airy spacing.
   ========================================================================== */
.profile-about {
    /* Light cream surface — visual break from surrounding dark sections,
       same pattern as the .meaning block on the home page. */
    position: relative;
    z-index: 1;
    margin-top: clamp(-1.5rem, -3vw, -2.75rem);
    background-color: var(--color-surface-light);
    color: var(--color-text-on-light);
    padding-block: clamp(2.35rem, 4.5vw, 3.75rem);
    box-shadow:
        0 -16px 48px rgba(44, 44, 44, 0.07),
        0 -1px 0 rgba(244, 240, 227, 0.55);
}

.profile-about__grid {
    display: grid;
    /* Asymmetric ratio: more room for prose, image takes ~40% — keeps long
       biographies readable in fewer rows without dwarfing the portrait. */
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: clamp(2.5rem, 6vw, 5.5rem);
    align-items: center;
    max-width: 1320px;
    margin-inline: auto;
}

.profile-about__text {
    max-width: 40rem;
    margin-inline: auto;
}

.profile-about__title {
    font-family: var(--font-sans);
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 600;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-on-light);
    line-height: 1.2;
    margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
}

.profile-about__prose p {
    font-family: var(--font-sans);
    font-size: var(--fs-prose-secondary);
    line-height: var(--lh-prose);
    color: var(--color-text-muted-on-light);
    font-weight: 400;
    max-width: 56ch;
}

.profile-about__prose p + p {
    margin-top: 1.1rem;
}

.profile-about__figure {
    margin: 0;
    overflow: hidden;
    background-color: transparent;
    aspect-ratio: 4 / 5;
}

.profile-about__figure > picture {
    display: contents;
}

.profile-about__figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: none;
    mix-blend-mode: normal;
}


/* ==========================================================================
   Shalev & Guy — dark band, text + responsive video (no autoplay)
   ========================================================================== */
.profile-couple {
    padding-block: clamp(2.35rem, 4.5vw, 3.75rem);
    background-color: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
}

.profile-couple__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    max-width: 1200px;
    margin-inline: auto;
}

.profile-couple__title {
    font-family: var(--font-sans);
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 600;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text);
    line-height: 1.2;
    margin: 0 0 0.5rem;
}

.profile-couple__subtitle {
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-primary);
    margin: 0 0 clamp(1.25rem, 2.8vw, 2rem);
    opacity: 0.92;
}

.profile-couple__prose p {
    font-family: var(--font-sans);
    font-size: var(--fs-prose-secondary);
    line-height: var(--lh-prose);
    color: var(--color-text-muted);
    font-weight: 400;
    max-width: 48ch;
    margin: 0;
}

.profile-couple__prose p + p {
    margin-top: 1.05rem;
}

.profile-couple__quote {
    font-family: var(--font-heading);
    font-size: clamp(1.12rem, 1.25vw + 0.95rem, 1.35rem);
    font-style: italic;
    font-weight: 400;
    line-height: 1.45;
    color: var(--color-text);
    margin: clamp(1.35rem, 2.8vw, 1.85rem) 0;
    padding: 0 0 0 clamp(1rem, 2.5vw, 1.35rem);
    border-left: 3px solid rgba(189, 173, 123, 0.55);
    max-width: 46ch;
}

.profile-couple__quote > p {
    margin: 0;
}

.profile-couple__quote-attrib {
    display: block;
    margin-top: 0.85rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(244, 240, 227, 0.12);
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0.06em;
    line-height: 1.4;
    color: var(--color-primary);
    opacity: 0.9;
}

.profile-couple__quote-attrib cite {
    font-style: italic;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: rgba(244, 240, 227, 0.92);
}

.profile-couple__quote + p {
    margin-top: 1.05rem;
}

.profile-couple__media {
    min-width: 0;
    justify-self: end;
    align-self: end;
}

/* Phone in Shalev & Guy only — align in row + lifts; tribute unchanged. */
.profile-couple .profile-video__media {
    align-self: end;
}

.profile-couple .profile-video__phone {
    transform: translate3d(0, 0.35rem, 0);
}

@media (hover: hover) and (pointer: fine) {
    .profile-couple .profile-video__media:hover .profile-video__phone,
    .profile-couple .profile-video__media:focus-within .profile-video__phone {
        transform: translate3d(0, -0.28rem, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-couple .profile-video__phone {
        transform: translate3d(0, 0.15rem, 0);
    }

    .profile-couple .profile-video__media:hover .profile-video__phone,
    .profile-couple .profile-video__media:focus-within .profile-video__phone {
        transform: translate3d(0, 0.15rem, 0);
    }
}

/* Shalev & Guy uses the same frame/iframe as the tribute; on touch devices
   `.profile-video__phone` drops translate3d for margin (see coarse-pointer block). */

/* Tablet — stack for readability */
@media (max-width: 900px) {
    .profile-couple__grid {
        grid-template-columns: 1fr;
        gap: clamp(2.25rem, 5vw, 3rem);
        align-items: start;
    }

    .profile-couple__prose p,
    .profile-couple__quote {
        max-width: none;
    }

    .profile-couple__media {
        width: 100%;
        justify-self: center;
        display: flex;
        justify-content: center;
    }
}

/* Tablet — narrow the gap, allow text to take more room */
@media (max-width: 960px) {
    .profile-about__grid {
        gap: clamp(2rem, 4vw, 3rem);
    }
}

/* Mobile — stack: image first, then text (keeps a strong visual entry) */
@media (max-width: 720px) {
    .profile-about__grid {
        grid-template-columns: 1fr;
        gap: 2.25rem;
    }

    .profile-about__text {
        max-width: none;
    }

    .profile-about__figure {
        max-width: 28rem;
        margin-inline: auto;
        width: 100%;
    }

    .profile-about__prose p {
        max-width: none;
    }

    .profile-about {
        margin-top: clamp(-0.75rem, -2vw, -1.25rem);
        box-shadow:
            0 -10px 36px rgba(44, 44, 44, 0.06),
            0 -1px 0 rgba(244, 240, 227, 0.45);
    }
}

.profile-section__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, var(--fs-2xl));
    font-style: italic;
    font-weight: 400;
    line-height: var(--lh-snug);
    color: var(--color-text);
    margin-bottom: var(--space-xl);
}

.profile-section__title--center {
    text-align: center;
    margin-inline: auto;
    max-width: var(--max-width-narrow);
}

.profile-section__lead {
    font-size: var(--fs-md);
    color: var(--color-text-muted);
    text-align: center;
    margin-inline: auto;
    margin-bottom: var(--space-2xl);
    max-width: 50ch;
}


/* ==========================================================================
   Prose body — used by About & Story
   ========================================================================== */
.profile-prose p {
    font-size: var(--fs-md);
    color: var(--color-text-muted);
    line-height: var(--lh-base);
    max-width: 60ch;
}

.profile-prose p + p {
    margin-top: var(--space-md);
}


/* ==========================================================================
   Pull quotes — tall, generous breathing room, italic serif
   (matches the emotional tone of the live page's pull-quotes).
   ========================================================================== */
.profile-quote {
    padding-block: clamp(2.1rem, 4.25vw, 3.35rem);
    background-color: var(--color-bg);
    text-align: center;
}

.profile-quote--closing {
    background-color: var(--color-bg-alt);
}

/* Opening pull-quote — centred text band (default; no photo required).
   Add .profile-quote--opening-photo in the profile’s style.css for a photo backdrop. */
.profile-quote.profile-quote--opening {
    position: relative;
    z-index: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    text-align: center;
    padding-block: clamp(2.1rem, 4.25vw, 3.35rem);
    background-color: var(--color-bg);
}

.profile-quote--opening .profile-container {
    position: relative;
    z-index: 1;
    width: 100%;
}

.profile-quote--opening .profile-quote__text {
    color: var(--color-text);
    max-width: 42ch;
    margin-inline: auto;
    text-align: center;
}

.profile-quote--opening .profile-quote__text::before,
.profile-quote--opening .profile-quote__text::after {
    background-color: rgba(244, 240, 227, 0.45);
    margin-inline: auto;
}

/* Photo opening quote — layout shell; image URLs live in profile style.css */
.profile-quote.profile-quote--opening.profile-quote--opening-photo {
    justify-content: flex-end;
    text-align: left;
    min-height: clamp(21rem, 72vh, 38rem);
    padding-block: clamp(2.25rem, 6vw, 4.25rem);
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll, scroll;
}

@media (min-width: 721px) {
    .profile-quote.profile-quote--opening.profile-quote--opening-photo {
        background-attachment: fixed, fixed;
    }

    .profile-quote.profile-quote--closing-photo {
        background-attachment: fixed, fixed;
    }
}

.profile-quote--opening-photo .profile-quote__text {
    margin-inline: 0;
    text-align: left;
    text-shadow:
        0 2px 20px rgba(44, 44, 44, 0.65),
        0 1px 4px rgba(44, 44, 44, 0.85);
}

.profile-quote--opening-photo .profile-quote__text::before,
.profile-quote--opening-photo .profile-quote__text::after {
    margin-inline: 0;
}

/* --------------------------------------------------------------------------
   In-page section navigation — editorial jump links after the opening quote
   -------------------------------------------------------------------------- */
.profile-section-nav {
    position: relative;
    z-index: 30;
    isolation: isolate;
    padding-block: clamp(1.1rem, 2.5vw, 1.5rem);
    background-color: var(--color-bg);
    border-bottom: 1px solid rgba(244, 240, 227, 0.09);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.profile-section-nav__list {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.15rem 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
}

.profile-section-nav__list li {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.profile-section-nav__list li:not(:last-child)::after {
    content: "";
    display: block;
    width: 1px;
    height: 0.65em;
    margin-left: clamp(0.35rem, 1.5vw, 0.65rem);
    margin-right: clamp(0.35rem, 1.5vw, 0.65rem);
    background: linear-gradient(
        180deg,
        transparent,
        rgba(244, 240, 227, 0.2) 20%,
        rgba(244, 240, 227, 0.2) 80%,
        transparent
    );
    pointer-events: none;
    opacity: 0.9;
}

.profile-section-nav__link {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.35rem 0.45rem;
    font-size: var(--fs-sm);
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(244, 240, 227, 0.52);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.28s var(--ease), border-color 0.28s var(--ease), opacity 0.28s var(--ease);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    cursor: pointer;
    white-space: nowrap;
}

.profile-section-nav__link:hover {
    color: rgba(244, 240, 227, 0.9);
}

.profile-section-nav__link:focus-visible {
    outline: 1px solid var(--color-accent);
    outline-offset: 3px;
    color: var(--color-warm-light);
}

.profile-section-nav__link.is-active {
    color: rgba(189, 173, 123, 0.95);
    border-bottom-color: rgba(189, 173, 123, 0.35);
    font-weight: 500;
}

@media (max-width: 720px) {
    .profile-section-nav .profile-container {
        max-width: none;
        width: 100%;
        padding-inline: 0;
    }

    .profile-section-nav__list {
        justify-content: flex-start;
        gap: 0.2rem;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        /*
         * Let vertical pans scroll the document: pan-x pan-y keeps this element
         * a competing wheel/touch target on iOS and can freeze page scroll below the nav.
         */
        touch-action: pan-x;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-inline: var(--container-px);
        scroll-padding-inline: var(--container-px);
        margin: 0;
    }

    .profile-section-nav__list::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    .profile-section-nav__list li {
        flex-shrink: 0;
    }

    .profile-section-nav__list li:not(:last-child)::after {
        margin-left: clamp(0.3rem, 1.2vw, 0.5rem);
        margin-right: clamp(0.3rem, 1.2vw, 0.5rem);
    }

    .profile-section-nav__link {
        letter-spacing: 0.1em;
        min-height: 2.85rem;
        padding: 0.45rem 0.55rem;
        /*
         * Must match horizontal strip: manipulation = pan-x + pan-y and can
         * trap vertical scroll gestures on touch devices below this nav.
         */
        touch-action: pan-x;
    }
}

/* Hash / in-page nav: section tops land below fixed header */
.profile-about,
.profile-couple,
.profile-story,
.profile-service-cinematic,
.profile-quote,
.profile-video,
.profile-closing,
.profile-gallery,
.profile-life {
    scroll-margin-top: var(--profile-scroll-offset);
}

/* Closing quote with photo — layout shell; image URLs live in profile style.css */
.profile-quote.profile-quote--closing-photo {
    position: relative;
    z-index: 0;
    display: grid;
    place-items: center;
    min-height: clamp(21rem, 72vh, 38rem);
    padding-block: clamp(2.25rem, 6vw, 4.25rem);
    background-color: var(--color-bg);
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll, scroll;
}

.profile-quote--closing-photo .profile-container {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
    max-width: min(1400px, 100%);
    display: grid;
    grid-template-columns: 1fr minmax(16rem, min(34vw, 26.5rem));
    align-items: center;
    column-gap: clamp(0.75rem, 4vw, 2.5rem);
}

.profile-quote--closing-photo .profile-quote__text {
    grid-column: 2;
    grid-row: 1;
    color: var(--color-text);
    max-width: none;
    width: 100%;
    margin-inline: 0;
    text-align: right;
    /* Softer shadow — type sits on the photo's own blacks */
    text-shadow:
        0 1px 18px rgba(0, 0, 0, 0.55),
        0 2px 32px rgba(0, 0, 0, 0.35);
}

.profile-quote--closing-photo .profile-quote__text::before,
.profile-quote--closing-photo .profile-quote__text::after {
    background-color: rgba(244, 240, 227, 0.45);
    margin-inline: 0;
    margin-left: auto;
}

.profile-quote--closing-photo .profile-quote__cite {
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
}

.profile-quote__text {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.5rem, 3.4vw, 2.25rem);
    line-height: 1.4;
    color: var(--color-text);
    max-width: 52rem;
    margin-inline: auto;
    position: relative;
}

.profile-quote__text::before,
.profile-quote__text::after {
    content: "";
    display: block;
    width: 2.5rem;
    height: 1px;
    background-color: var(--color-accent);
    margin-inline: auto;
    opacity: 0.7;
}

.profile-quote__text::before { margin-bottom: clamp(1.25rem, 2.5vw, 2rem); }
.profile-quote__text::after  { margin-top:    clamp(1.25rem, 2.5vw, 2rem); }

.profile-quote__cite {
    display: block;
    font-style: normal;
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-primary);
    margin-top: var(--space-md);
}


/* ==========================================================================
   Gallery — horizontal scroll strip. Portrait tiles in one calm row;
   desktop shows several at once; mobile swipes naturally.
   ========================================================================== */
.profile-gallery__carousel {
    --gallery-gap: 8px;
    --gallery-edge-pad: 8px;
    --gallery-item-width: clamp(148px, 42vw, 220px);

    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(0.35rem, 1.2vw, 0.75rem);
}

.profile-gallery__viewport {
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gallery-edge-pad);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.profile-gallery__viewport::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.profile-gallery__grid {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: var(--gallery-gap);
    margin: 0;
    padding: 0;
    padding-inline-start: var(--gallery-edge-pad);
    /* Lets the last card scroll fully into view without clipping the trailing edge. */
    padding-inline-end: max(
        var(--gallery-edge-pad),
        calc(100% - var(--gallery-item-width) - var(--gallery-edge-pad))
    );
    list-style: none;
    width: max-content;
}

.profile-gallery__item {
    position: relative;
    flex: 0 0 auto;
    width: var(--gallery-item-width);
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

.profile-gallery__nav {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid rgba(44, 44, 44, 0.14);
    border-radius: 999px;
    background: rgba(244, 240, 227, 0.92);
    color: rgba(44, 44, 44, 0.58);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition:
        background-color 0.28s var(--ease),
        color 0.28s var(--ease),
        border-color 0.28s var(--ease),
        opacity 0.28s var(--ease);
}

.profile-gallery__nav:disabled {
    opacity: 0.28;
    cursor: default;
    pointer-events: none;
}

.profile-gallery__nav:not(:disabled):hover,
.profile-gallery__nav:not(:disabled):focus-visible {
    background: rgba(189, 173, 123, 0.28);
    border-color: rgba(44, 44, 44, 0.22);
    color: rgba(44, 44, 44, 0.82);
}

.profile-gallery__nav:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.profile-gallery__nav-icon {
    width: 1.1rem;
    height: 1.1rem;
    display: block;
    opacity: 0.82;
}

@media (max-width: 720px) {
    .profile-gallery__carousel {
        --gallery-item-width: clamp(128px, 38vw, 188px);
        --gallery-edge-pad: var(--container-px);

        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        margin-inline: calc(-1 * var(--container-px));
    }

    .profile-gallery__viewport {
        scroll-padding-inline: var(--container-px);
        position: relative;
    }

    .profile-gallery__viewport::before,
    .profile-gallery__viewport::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        width: clamp(1.75rem, 7vw, 2.75rem);
        pointer-events: none;
        z-index: 2;
        opacity: 1;
        transition: opacity 0.35s var(--ease);
    }

    .profile-gallery__viewport::before {
        left: 0;
        background: linear-gradient(
            90deg,
            var(--color-surface-light) 12%,
            rgba(244, 240, 227, 0) 100%
        );
    }

    .profile-gallery__viewport::after {
        right: 0;
        background: linear-gradient(
            270deg,
            var(--color-surface-light) 12%,
            rgba(244, 240, 227, 0) 100%
        );
    }

    .profile-gallery__carousel.is-at-start .profile-gallery__viewport::before {
        opacity: 0;
    }

    .profile-gallery__carousel.is-at-end .profile-gallery__viewport::after {
        opacity: 0;
    }

    .profile-gallery__grid {
        padding-inline-start: var(--container-px);
        padding-inline-end: max(
            var(--container-px),
            calc(100% - var(--gallery-item-width) - var(--container-px))
        );
    }

    .profile-gallery__nav {
        display: none;
    }

    .profile-gallery__scroll-hint {
        display: inline-flex;
    }

    .profile-gallery__carousel.is-at-end .profile-gallery__scroll-hint,
    .profile-gallery__carousel.is-not-scrollable .profile-gallery__scroll-hint,
    .profile-gallery__carousel.has-scrolled .profile-gallery__scroll-hint {
        opacity: 0;
        visibility: hidden;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-gallery__scroll-hint-icon {
        animation: none;
    }
}

@media (min-width: 721px) and (max-width: 899px) {
    .profile-gallery__carousel {
        --gallery-item-width: clamp(148px, 42vw, 220px);
    }
}

@media (min-width: 900px) {
    .profile-gallery__carousel {
        --gallery-item-width: clamp(168px, 16vw, 220px);
    }
}

@media (min-width: 1200px) {
    .profile-gallery__carousel {
        --gallery-item-width: clamp(180px, 14vw, 228px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-gallery__viewport {
        scroll-snap-type: none;
    }

    .profile-gallery__figure,
    .profile-gallery__figure img {
        transition-duration: 0.01ms !important;
    }
}

.profile-gallery__figure picture {
    display: contents;
}

.profile-gallery__figure {
    position: relative;
    margin: 0;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background-color: rgba(44, 44, 44, 0.08);
    cursor: zoom-in;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: inset 0 0 0 1px rgba(44, 44, 44, 0.06);
    transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

.profile-gallery__figure::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.45s var(--ease);
    background: linear-gradient(
        165deg,
        rgba(189, 173, 123, 0.06) 0%,
        transparent 42%,
        rgba(44, 44, 44, 0.12) 100%
    );
}

.profile-gallery__figure:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

.profile-gallery__figure:hover,
.profile-gallery__figure:focus-visible {
    box-shadow:
        inset 0 0 0 1px rgba(189, 173, 123, 0.35),
        0 0 0 1px rgba(189, 173, 123, 0.12);
}

.profile-gallery__figure:hover::after,
.profile-gallery__figure:focus-visible::after {
    opacity: 1;
}

.profile-gallery__figure img {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.7s var(--ease), filter 0.5s var(--ease);
    filter: grayscale(8%) brightness(0.96);
}

.profile-gallery__figure:hover img,
.profile-gallery__figure:focus-visible img {
    transform: scale(1.04);
    filter: grayscale(0%) brightness(1);
}

@media (hover: none) and (pointer: coarse) {
    .profile-gallery__figure:active img {
        transform: scale(1.02);
        filter: grayscale(0%) brightness(1);
    }
}

/* --------------------------------------------------------------------------
   Responsive grid variant — full image visible (object-fit: contain).
   Add .profile-gallery--grid on the section for profiles that prefer a
   multi-column layout over the horizontal scroll strip.
   -------------------------------------------------------------------------- */
.profile-gallery.profile-gallery--grid .profile-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    max-width: none;
    flex-wrap: wrap;
    gap: clamp(0.85rem, 2vw, 1.35rem);
    padding: 0;
    margin: 0;
    list-style: none;
}

.profile-gallery.profile-gallery--grid .profile-gallery__item {
    width: auto;
    scroll-snap-align: unset;
}

.profile-gallery.profile-gallery--grid .profile-gallery__figure {
    aspect-ratio: unset;
    min-height: clamp(11rem, 24vw, 16rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.35rem, 1vw, 0.55rem);
    border-radius: clamp(0.35rem, 0.75vw, 0.55rem);
    background-color: rgba(232, 228, 220, 0.55);
    box-shadow:
        0 2px 8px rgba(44, 44, 44, 0.06),
        0 12px 32px rgba(44, 44, 44, 0.08);
    transition:
        transform 0.38s var(--ease),
        box-shadow 0.38s var(--ease);
}

.profile-gallery.profile-gallery--grid .profile-gallery__figure::after {
    border-radius: inherit;
}

.profile-gallery.profile-gallery--grid .profile-gallery__figure:hover,
.profile-gallery.profile-gallery--grid .profile-gallery__figure:focus-visible {
    transform: translateY(-4px);
    box-shadow:
        0 6px 16px rgba(44, 44, 44, 0.08),
        0 20px 44px rgba(44, 44, 44, 0.12);
    outline: none;
}

.profile-gallery.profile-gallery--grid .profile-gallery__figure img {
    position: static;
    width: 100%;
    height: auto;
    max-height: clamp(14rem, 32vw, 22rem);
    object-fit: contain;
    object-position: center;
}

.profile-gallery.profile-gallery--grid .profile-gallery__figure:hover img,
.profile-gallery.profile-gallery--grid .profile-gallery__figure:focus-visible img {
    transform: scale(1.02);
}

@media (max-width: 899px) {
    .profile-gallery.profile-gallery--grid .profile-gallery__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .profile-gallery.profile-gallery--grid .profile-gallery__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: clamp(0.65rem, 3vw, 0.85rem);
    }

    .profile-gallery.profile-gallery--grid .profile-gallery__figure img {
        max-height: clamp(12rem, 42vw, 18rem);
    }
}

@media (max-width: 360px) {
    .profile-gallery.profile-gallery--grid .profile-gallery__grid {
        grid-template-columns: 1fr;
    }
}

/* Lightbox — soft full-screen veil; calm open motion; touch-friendly controls */
html.profile-gallery-lightbox--open {
    overflow: hidden;
    overscroll-behavior: none;
}

/* Lightbox root stays in DOM during close animation — disable hit-testing whenever
   it is not open so it cannot swallow scroll/taps on mobile. */
.profile-gallery-lightbox:not(.is-open) {
    pointer-events: none;
}

.profile-gallery-lightbox.is-open {
    pointer-events: auto;
}

.profile-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.profile-gallery-lightbox__backdrop {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    border: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    opacity: 0;
    transition: opacity 0.42s var(--ease);
    background:
        radial-gradient(
            ellipse 85% 70% at 50% 45%,
            rgba(36, 32, 28, 0.82) 0%,
            rgba(18, 16, 14, 0.94) 100%
        );
}

.profile-gallery-lightbox.is-open .profile-gallery-lightbox__backdrop {
    opacity: 1;
}

.profile-gallery-lightbox__inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding:
        max(0.75rem, env(safe-area-inset-top, 0px))
        max(0.75rem, env(safe-area-inset-right, 0px))
        max(0.75rem, env(safe-area-inset-bottom, 0px))
        max(0.75rem, env(safe-area-inset-left, 0px));
    padding-top: max(0.75rem, calc(var(--header-height, 5rem) + 0.35rem), env(safe-area-inset-top, 0px));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.38s var(--ease);
}

.profile-gallery-lightbox.is-open .profile-gallery-lightbox__inner {
    opacity: 1;
}

.profile-gallery-lightbox__stage {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    max-width: min(94vw, 1100px);
    max-height: min(86vh, 1300px);
    pointer-events: auto;
    touch-action: none;
}

.profile-gallery-lightbox__img {
    display: block;
    max-width: 100%;
    max-height: min(86vh, 1300px);
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.12),
        0 28px 56px rgba(0, 0, 0, 0.42);
    border-radius: 2px;
    pointer-events: auto;
    transform: scale(0.96);
    opacity: 0;
    transition:
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.38s var(--ease);
}

.profile-gallery-lightbox__img.is-swapping {
    opacity: 0.4;
}

.profile-gallery-lightbox.is-open .profile-gallery-lightbox__img {
    transform: scale(1);
    opacity: 1;
}

.profile-gallery-lightbox__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 3.5rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(244, 240, 227, 0.22);
    border-radius: 999px;
    background: rgba(28, 26, 22, 0.55);
    color: rgba(244, 240, 227, 0.92);
    cursor: pointer;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
        border-color 0.25s var(--ease), opacity 0.25s var(--ease);
}

.profile-gallery-lightbox__nav:disabled {
    opacity: 0.22;
    cursor: default;
    pointer-events: none;
}

.profile-gallery-lightbox__nav:not(:disabled):hover,
.profile-gallery-lightbox__nav:not(:disabled):focus-visible {
    background: rgba(189, 173, 123, 0.22);
    border-color: rgba(189, 173, 123, 0.45);
    color: var(--color-warm-light);
}

.profile-gallery-lightbox__nav:focus-visible {
    outline: 2px solid rgba(244, 240, 227, 0.85);
    outline-offset: 2px;
}

.profile-gallery-lightbox__nav--prev {
    left: max(0.35rem, env(safe-area-inset-left, 0px));
}

.profile-gallery-lightbox__nav--next {
    right: max(0.35rem, env(safe-area-inset-right, 0px));
}

.profile-gallery-lightbox__nav-icon {
    width: 1.35rem;
    height: 1.35rem;
    display: block;
    opacity: 0.88;
}

.profile-gallery-lightbox__counter {
    position: absolute;
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(244, 240, 227, 0.55);
    pointer-events: none;
}

.profile-gallery-lightbox__close {
    position: absolute;
    top: max(0.65rem, calc(var(--header-height, 5rem) + 0.35rem), env(safe-area-inset-top, 0px));
    right: max(0.65rem, env(safe-area-inset-right, 0px));
    z-index: 2;
    min-height: 2.75rem;
    padding: 0.35rem 0.85rem;
    border: 1px solid rgba(244, 240, 227, 0.3);
    border-radius: 999px;
    background: rgba(28, 26, 22, 0.88);
    color: var(--color-warm-light);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-family: var(--font-sans, system-ui, sans-serif);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.22s var(--ease), color 0.22s var(--ease),
        border-color 0.22s var(--ease), transform 0.22s var(--ease);
}

.profile-gallery-lightbox__close-glyph {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1;
    opacity: 0.75;
}

.profile-gallery-lightbox__close:hover,
.profile-gallery-lightbox__close:focus-visible {
    background: var(--color-accent, var(--color-accent-on-light));
    color: var(--color-primary-dark);
    border-color: transparent;
}

.profile-gallery-lightbox__close:focus-visible {
    outline: 2px solid var(--color-warm-light);
    outline-offset: 3px;
}

.profile-gallery-lightbox__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (min-width: 720px) {
    .profile-gallery-lightbox__close-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .profile-gallery-lightbox__close {
        width: 2.75rem;
        height: 2.75rem;
        min-height: 0;
        padding: 0;
        border-radius: 50%;
    }

    .profile-gallery-lightbox__close-glyph {
        font-size: 1.65rem;
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-gallery-lightbox__inner,
    .profile-gallery-lightbox__backdrop,
    .profile-gallery-lightbox__img {
        transition-duration: 0.01ms !important;
    }

    .profile-gallery-lightbox__img {
        transform: scale(1);
        opacity: 1;
    }

    .profile-gallery-lightbox__img.is-swapping {
        opacity: 1;
    }
}


/* ==========================================================================
   Video — intimate tribute moment.
   --------------------------------------------------------------------------
   The tribute is in Instagram-vertical (9:16) format. To make the section
   feel personal rather than "embedded", three layered ideas work together:

     1. Phone-style framing   — the player sits in a rounded bezel with a
                                soft ambient halo (screen-like spill, not a
                                flat accent wash) so the portrait reads as
                                a live object in the space.
     2. Voiced left column    — gold eyebrow + italic serif quote + a
                                small gold CTA arrow → reads like a person
                                speaking, not a UI label.
     3. Display-serif initial — the first letter of the name sits behind
                                the eyebrow at very low opacity as a
                                quiet signature, the same trick used by
                                editorial memorial sites to add intimacy.
   ========================================================================== */
.profile-video {
    background-color: var(--color-surface-light);
    color: var(--color-text-on-light);
    padding-block: clamp(2.75rem, 6.25vw, 4.75rem);
    overflow: hidden; /* contains the warm radial glow on small screens */
}

.profile-video__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto);
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: center;
    max-width: 1100px;
    margin-inline: auto;
}

/* ---------- Left column (the voice) ---------- */
.profile-video__text {
    position: relative;
    max-width: 28rem;
    justify-self: end;
    min-width: 0;
    overflow-x: hidden;
}

.profile-video__eyebrow,
.profile-video__title,
.profile-video__cta {
    position: relative;
    z-index: 1;
}

.profile-video__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: var(--color-accent-on-light);
    margin-bottom: 1rem;
}

/* Thin accent hairline before the eyebrow — decorative divider on light surface. */
.profile-video__eyebrow::before {
    content: "";
    display: inline-block;
    width: 2.25rem;
    height: 1px;
    background-color: var(--color-accent-on-light);
    opacity: 0.85;
}

.profile-video__title {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    line-height: 1.3;
    color: var(--color-text-on-light);
    margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
    /* Soft fall-off on long lines for a natural editorial measure */
    max-width: 22ch;
}

/* Small CTA — primary dark text link that points toward the phone */
.profile-video__cta {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-text-on-light);
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    cursor: pointer;
    transition: gap var(--dur) var(--ease),
                color var(--dur) var(--ease),
                border-color var(--dur) var(--ease);
}

.profile-video__cta-arrow {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    transition: transform var(--dur) var(--ease);
}

.profile-video__cta:hover,
.profile-video__cta:focus-visible {
    color: var(--color-primary-dark-hover);
    gap: 0.95rem;
    border-bottom-color: currentColor;
}

.profile-video__cta:focus-visible {
    outline: 1px solid var(--color-accent-on-light);
    outline-offset: 3px;
}

.profile-video__cta:hover .profile-video__cta-arrow,
.profile-video__cta:focus-visible .profile-video__cta-arrow {
    transform: translateX(3px);
}

/* ---------- Right column (the phone) ---------- */
.profile-video__media {
    position: relative;
    width: clamp(260px, 32vw, 380px);
    max-width: 100%;
}

/* Ambient halo behind the phone — layered cool + neutral spill, like soft
   reflected screen light, with a gentle pulse so it feels alive (not a static
   yellow field). Respects reduced-motion preferences. */
.profile-video__glow {
    position: absolute;
    inset: -12% -18%;
    z-index: 0;
    background:
        radial-gradient(
            ellipse 78% 68% at 42% 28%,
            rgba(244, 240, 227, 0.52),
            transparent 64%
        ),
        radial-gradient(
            circle at 64% 58%,
            rgba(100, 130, 195, 0.16),
            transparent 58%
        ),
        radial-gradient(
            circle at 22% 78%,
            rgba(44, 44, 44, 0.06),
            transparent 48%
        );
    filter: blur(14px);
    pointer-events: none;
    opacity: 0.88;
    animation: profile-video-glow-live 7s ease-in-out infinite alternate;
}

@keyframes profile-video-glow-live {
    from {
        opacity: 0.72;
    }
    to {
        opacity: 0.96;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-video__glow {
        animation: none;
        opacity: 0.85;
    }
}

/* Phone bezel — lifted with depth shadows (no tilt). Hover / focus nudges
   it slightly higher; prefers-reduced-motion keeps a small static lift. */
.profile-video__phone {
    position: relative;
    z-index: 1;
    padding: 8px;
    background: var(--color-bg);
    border-radius: 28px;
    transform: translate3d(0, -0.45rem, 0);
    box-shadow:
        0 0 0 1px rgba(44, 44, 44, 0.12),
        inset 0 1px 0 rgba(244, 240, 227, 0.07),
        0 6px 8px -4px rgba(44, 44, 44, 0.35),
        0 22px 44px -16px rgba(44, 44, 44, 0.38),
        0 48px 80px -32px rgba(44, 44, 44, 0.2);
    transition:
        transform 0.55s var(--ease),
        box-shadow 0.55s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
    .profile-video__media:hover .profile-video__phone,
    .profile-video__media:focus-within .profile-video__phone {
        transform: translate3d(0, -0.9rem, 0);
        box-shadow:
            0 0 0 1px rgba(44, 44, 44, 0.1),
            inset 0 1px 0 rgba(244, 240, 227, 0.08),
            0 10px 14px -6px rgba(44, 44, 44, 0.4),
            0 32px 56px -18px rgba(44, 44, 44, 0.45),
            0 62px 100px -36px rgba(44, 44, 44, 0.22);
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-video__phone {
        transform: translate3d(0, -0.35rem, 0);
        transition: none;
    }

    .profile-video__media:hover .profile-video__phone,
    .profile-video__media:focus-within .profile-video__phone {
        transform: translate3d(0, -0.35rem, 0);
    }
}

/*
 * Touch-first devices: a transformed ancestor breaks iframe hit-testing on
 * iOS Safari (and some Android WebViews). Swap the bezel offset from
 * translate3d to margin so taps reach the Vimeo controls reliably.
 */
@media (pointer: coarse) {
    .profile-video__phone {
        transform: none;
        margin-top: -0.45rem;
        transition: margin 0.55s var(--ease), box-shadow 0.55s var(--ease);
    }

    .profile-couple .profile-video__phone {
        transform: none;
        margin-top: 0.35rem;
    }
}

@media (pointer: coarse) and (prefers-reduced-motion: reduce) {
    .profile-video__phone {
        transform: none;
        margin-top: -0.35rem;
        transition: none;
    }

    .profile-video__media:hover .profile-video__phone,
    .profile-video__media:focus-within .profile-video__phone {
        transform: none;
        margin-top: -0.35rem;
    }

    .profile-couple .profile-video__phone {
        margin-top: 0.15rem;
    }

    .profile-couple .profile-video__media:hover .profile-video__phone,
    .profile-couple .profile-video__media:focus-within .profile-video__phone {
        margin-top: 0.15rem;
    }
}

.profile-video__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: 20px;
    background-color: var(--color-bg);
}

.profile-video__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    border: 0;
    z-index: 1;
    background-color: #000;
    pointer-events: auto;
    /* Helps WebKit compositing so the Vimeo surface stays tappable above decorations */
    transform: translateZ(0);
}

/* Tablet — tighten gap, slightly smaller initial */
@media (max-width: 960px) {
    .profile-video__grid {
        gap: clamp(2rem, 4vw, 3.5rem);
    }

    .profile-video__text {
        max-width: 24rem;
    }
}

/* Mobile — stack: voice column on top, phone centered below */
@media (max-width: 720px) {
    .profile-video__grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        justify-items: center;
        text-align: center;
    }

    .profile-video__text {
        max-width: none;
        justify-self: stretch;
    }

    .profile-video__title {
        margin-inline: auto;
    }

    .profile-video__media {
        width: min(78vw, 320px);
    }
}


/* ==========================================================================
   A Life of Service — dark cinematic editorial (immersive image, no mockup)
   ========================================================================== */
.profile-service-cinematic {
    position: relative;
    z-index: 0;
    background-color: var(--color-bg);
    background-image:
        radial-gradient(
            ellipse 125% 90% at 0% 45%,
            rgba(189, 173, 123, 0.055) 0%,
            transparent 58%
        ),
        radial-gradient(
            circle at 92% 12%,
            rgba(0, 0, 0, 0.38) 0%,
            transparent 42%
        );
    color: var(--color-text);
    overflow: hidden;
}

.profile-service-cinematic__shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.14fr);
    min-height: clamp(28rem, 72vh, 44rem);
    align-items: stretch;
}

.profile-service-cinematic__content {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-block: clamp(2.85rem, 6.5vw, 5.25rem);
    padding-inline: clamp(var(--container-px), 4.5vw, 3rem)
        clamp(1.25rem, 3.5vw, 2.75rem);
    padding-left: max(
        var(--container-px),
        calc((100vw - min(var(--max-width), 100vw - 2 * var(--container-px))) / 2 + var(--container-px))
    );
}

.profile-service-cinematic__content-inner {
    width: 100%;
    max-width: min(32rem, 100%);
}

.profile-service-cinematic__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: rgba(189, 173, 123, 0.95);
    margin: 0 0 1.05rem;
}

.profile-service-cinematic__eyebrow::before {
    content: "";
    display: inline-block;
    width: 2.25rem;
    height: 1px;
    background-color: var(--color-accent);
    opacity: 0.72;
}

.profile-service-cinematic__headline {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.65rem, 3.15vw, 2.38rem);
    line-height: 1.32;
    color: var(--color-text);
    margin: 0 0 clamp(1.55rem, 3vw, 2.2rem);
    max-width: 26ch;
    text-shadow:
        0 2px 28px rgba(0, 0, 0, 0.48),
        0 1px 3px rgba(0, 0, 0, 0.38);
}

.profile-service-cinematic__cta {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: rgba(189, 173, 123, 0.95);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition:
        gap var(--dur) var(--ease),
        color var(--dur) var(--ease),
        border-color var(--dur) var(--ease);
}

.profile-service-cinematic__cta-arrow {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    transition: transform var(--dur) var(--ease);
}

.profile-service-cinematic__cta:hover,
.profile-service-cinematic__cta:focus-visible {
    color: var(--color-warm-light);
    gap: 0.95rem;
    border-bottom-color: rgba(189, 173, 123, 0.55);
}

.profile-service-cinematic__cta:focus-visible {
    outline: 1px solid var(--color-accent);
    outline-offset: 3px;
}

.profile-service-cinematic__cta:hover .profile-service-cinematic__cta-arrow,
.profile-service-cinematic__cta:focus-visible .profile-service-cinematic__cta-arrow {
    transform: translateX(3px);
}

.profile-service-cinematic__prose {
    margin-top: clamp(1.85rem, 4vw, 2.65rem);
    max-width: 38rem;
}

.profile-service-cinematic__prose p {
    font-family: var(--font-sans);
    font-size: var(--fs-prose-secondary);
    line-height: var(--lh-prose);
    color: var(--color-text-muted);
    margin: 0 0 1.05rem;
}

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

.profile-service-cinematic__figure {
    position: relative;
    margin: 0;
    padding: 0;
    min-height: inherit;
}

.profile-service-cinematic__figure::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        var(--color-bg) 0%,
        rgba(44, 44, 44, 0.72) 12%,
        rgba(44, 44, 44, 0.18) 34%,
        transparent 58%
    );
}

.profile-service-cinematic__image {
    width: 100%;
    height: 100%;
    min-height: clamp(28rem, 72vh, 44rem);
    object-fit: cover;
    object-position: center 22%;
    display: block;
}

@media (max-width: 960px) {
    .profile-service-cinematic__shell {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
        min-height: clamp(26rem, 68vh, 40rem);
    }

    .profile-service-cinematic__headline {
        font-size: clamp(1.55rem, 3.5vw, 2.05rem);
    }

    .profile-service-cinematic__image {
        min-height: clamp(26rem, 68vh, 40rem);
    }
}

@media (max-width: 720px) {
    .profile-service-cinematic__shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .profile-service-cinematic__figure {
        order: -1;
        min-height: min(50vh, 30rem);
    }

    .profile-service-cinematic__figure::after {
        background: linear-gradient(
            180deg,
            rgba(44, 44, 44, 0.35) 0%,
            transparent 40%,
            transparent 62%,
            var(--color-bg) 100%
        );
    }

    .profile-service-cinematic__image {
        min-height: min(50vh, 30rem);
        object-position: center 18%;
    }

    .profile-service-cinematic__content {
        justify-content: center;
        text-align: center;
        padding-block: clamp(2.35rem, 5.5vw, 3.6rem);
        padding-inline: var(--container-px);
    }

    .profile-service-cinematic__content-inner {
        margin-inline: auto;
    }

    .profile-service-cinematic__eyebrow {
        justify-content: center;
    }

    .profile-service-cinematic__headline {
        margin-inline: auto;
        max-width: 30ch;
    }

    .profile-service-cinematic__prose {
        margin-inline: auto;
        text-align: center;
    }

    .profile-service-cinematic__prose p {
        max-width: 42ch;
        margin-inline: auto;
    }
}

/* Compact variant — content-height section (no 72vh min-height). */
.profile-service-cinematic.profile-service-cinematic--compact .profile-service-cinematic__shell {
    min-height: 0;
    align-items: center;
}

.profile-service-cinematic.profile-service-cinematic--compact .profile-service-cinematic__content {
    padding-block: clamp(1.85rem, 4vw, 3.35rem);
}

.profile-service-cinematic.profile-service-cinematic--compact .profile-service-cinematic__headline {
    margin-bottom: clamp(1rem, 2vw, 1.45rem);
}

.profile-service-cinematic.profile-service-cinematic--compact .profile-service-cinematic__prose {
    margin-top: clamp(1.1rem, 2.5vw, 1.65rem);
}

.profile-service-cinematic.profile-service-cinematic--compact .profile-service-cinematic__figure {
    min-height: 0;
    align-self: center;
    height: clamp(18rem, 46vh, 30rem);
    overflow: hidden;
}

.profile-service-cinematic.profile-service-cinematic--compact .profile-service-cinematic__figure picture {
    display: block;
    height: 100%;
}

.profile-service-cinematic.profile-service-cinematic--compact .profile-service-cinematic__image {
    min-height: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: var(--service-image-focus, center 18%);
}

@media (max-width: 960px) {
    .profile-service-cinematic.profile-service-cinematic--compact .profile-service-cinematic__shell {
        min-height: 0;
    }

    .profile-service-cinematic.profile-service-cinematic--compact .profile-service-cinematic__figure {
        height: clamp(16rem, 42vh, 26rem);
    }
}

@media (max-width: 720px) {
    .profile-service-cinematic.profile-service-cinematic--compact .profile-service-cinematic__figure {
        order: -1;
        min-height: 0;
        height: min(38vh, 20rem);
    }

    .profile-service-cinematic.profile-service-cinematic--compact .profile-service-cinematic__image {
        object-position: var(--service-image-focus-mobile, center 15%);
    }

    .profile-service-cinematic.profile-service-cinematic--compact .profile-service-cinematic__content {
        padding-block: clamp(1.65rem, 4vw, 2.35rem);
    }
}


/* ==========================================================================
   Closing remembrance
   ========================================================================== */
.profile-closing {
    text-align: center;
    background-color: var(--color-bg);
}

.profile-closing__title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-style: italic;
    font-weight: 400;
    line-height: var(--lh-snug);
    color: var(--color-text);
    margin-bottom: var(--space-lg);
    max-width: 32ch;
    margin-inline: auto;
}

.profile-closing__text {
    font-size: var(--fs-md);
    color: var(--color-text-muted);
    line-height: var(--lh-base);
    max-width: 60ch;
    margin-inline: auto;
}

.profile-closing__text + .profile-closing__text {
    margin-top: var(--space-md);
}


/* ==========================================================================
   Her Life & Dreams — warm atmospheric close, soft panel, editorial touches.
   ========================================================================== */
.profile-life {
    position: relative;
    text-align: center;
    background-color: var(--color-bg);
    background-image:
        radial-gradient(
            ellipse 90% 55% at 50% -15%,
            rgba(189, 173, 123, 0.1) 0%,
            transparent 58%
        ),
        radial-gradient(
            circle at 50% 110%,
            rgba(244, 240, 227, 0.05) 0%,
            transparent 42%
        );
    overflow: hidden;
}

.profile-life__title {
    position: relative;
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.85rem, 4.2vw, 2.65rem);
    line-height: var(--lh-snug);
    color: var(--color-text);
    margin-bottom: clamp(2rem, 4.5vw, 2.85rem);
    text-shadow: 0 2px 28px rgba(0, 0, 0, 0.25);
}

.profile-life__title::before {
    content: "";
    display: block;
    width: 3rem;
    height: 2px;
    margin: 0 auto clamp(1rem, 2.2vw, 1.35rem);
    border-radius: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(189, 173, 123, 0.55),
        var(--color-accent),
        rgba(189, 173, 123, 0.55),
        transparent
    );
    opacity: 0.85;
}

.profile-life__title::after {
    content: "";
    display: block;
    width: clamp(3.5rem, 14vw, 6.5rem);
    height: 1px;
    margin: clamp(1.05rem, 2.2vw, 1.4rem) auto 0;
    background: linear-gradient(90deg, transparent, rgba(244, 240, 227, 0.22), transparent);
}

.profile-life__list {
    list-style: none;
    padding: clamp(1.85rem, 4.5vw, 3rem) clamp(1.35rem, 4vw, 2.25rem);
    margin: 0 auto;
    max-width: min(42rem, 100%);
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 16px;
    border: 1px solid rgba(244, 240, 227, 0.1);
    background: linear-gradient(
        168deg,
        rgba(244, 240, 227, 0.085) 0%,
        rgba(244, 240, 227, 0.03) 38%,
        transparent 72%
    );
    box-shadow:
        0 28px 56px -32px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(244, 240, 227, 0.07);
}

.profile-life__list > p {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.06rem, 1.75vw, 1.28rem);
    line-height: 1.62;
    color: var(--color-text-muted);
    padding-block: clamp(1.05rem, 2.2vw, 1.45rem);
    margin: 0;
    border: 0;
    text-wrap: balance;
    transition:
        color 0.4s var(--ease),
        background-color 0.4s var(--ease);
}

.profile-life__list > p + p {
    border-top: 1px solid rgba(244, 240, 227, 0.09);
}

@media (hover: hover) and (pointer: fine) {
    .profile-life__list > p:hover {
        color: rgba(244, 240, 227, 0.9);
        background-color: rgba(244, 240, 227, 0.035);
    }
}

.profile-life__list > p:first-child {
    padding-top: 0;
}

.profile-life__list > p:last-child {
    padding-bottom: 0;
}

.profile-life__epitaph {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(0.85rem, 2.5vw, 1.35rem);
    margin-top: clamp(2.75rem, 5.5vw, 3.75rem);
    margin-inline: auto;
    max-width: 36rem;
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: var(--color-primary);
    font-weight: 500;
}

.profile-life__epitaph::before,
.profile-life__epitaph::after {
    content: "";
    flex: 1 1 2rem;
    max-width: 4.5rem;
    height: 1px;
    border-radius: 1px;
}

.profile-life__epitaph::before {
    background: linear-gradient(90deg, transparent, rgba(189, 173, 123, 0.55));
}

.profile-life__epitaph::after {
    background: linear-gradient(90deg, rgba(189, 173, 123, 0.55), transparent);
}

@media (prefers-reduced-motion: reduce) {
    .profile-life__list > p {
        transition: none;
    }
}

/* ==========================================================================
   Footer (mirrors main site footer structure)
   ========================================================================== */
.site-footer {
    padding-block: var(--section-py-compact);
    background-color: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
}

.site-footer__inner {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--container-px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    text-align: center;
}

.site-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-size: var(--fs-md);
    font-weight: 500;
}

.site-logo__mark {
    color: var(--color-primary);
    font-size: 1.15em;
    line-height: 1;
}

.site-footer__nav ul {
    display: flex;
    gap: var(--space-xl);
    flex-wrap: wrap;
    justify-content: center;
}

.site-footer__nav a {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

.site-footer__nav a:hover {
    color: var(--color-highlight);
}

.site-footer__copy {
    font-size: var(--fs-xs);
    color: var(--color-text-dim);
    letter-spacing: 0.04em;
    padding-top: var(--space-lg);
    margin-top: var(--space-xs);
    border-top: 1px solid var(--color-border);
    width: 100%;
    max-width: var(--max-width);
    line-height: var(--lh-snug);
}


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 720px) {
    /* Hero uses full viewport height (base .profile-hero min-height). Do not
       shorten with 85svh — that left the following section visible on phones. */
    .profile-hero__name {
        letter-spacing: 0.12em;
    }

    .profile-quote__text {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }

    /* Opening quote — mobile: text-only sections use gradient slab (photo openings stay in profile CSS) */
    .profile-quote.profile-quote--opening:not(.profile-quote--opening-photo) {
        justify-content: center;
        text-align: center;
        align-items: center;
        min-height: clamp(17.5rem, 48vmin, 24rem);
        padding-block: clamp(3rem, 11vw, 5rem);
        background-color: var(--color-primary-dark);
        background-image:
            radial-gradient(
                ellipse 130% 90% at 50% -10%,
                rgba(189, 173, 123, 0.07) 0%,
                transparent 52%
            ),
            linear-gradient(165deg, #343434 0%, #2C2C2C 52%, #2a2826 100%);
        background-size: auto, auto;
        background-position: center, center;
        background-repeat: no-repeat;
        background-attachment: scroll, scroll;
    }

    .profile-quote--opening:not(.profile-quote--opening-photo) .profile-container {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .profile-quote--opening:not(.profile-quote--opening-photo) .profile-quote__text {
        max-width: min(38ch, 100%);
        margin-inline: auto;
        text-align: center;
        font-size: clamp(1.3rem, 4.85vw, 1.82rem);
        line-height: 1.43;
        letter-spacing: -0.01em;
        text-wrap: balance;
        text-shadow:
            0 1px 3px rgba(0, 0, 0, 0.45),
            0 2px 24px rgba(0, 0, 0, 0.25);
    }

    .profile-quote--opening:not(.profile-quote--opening-photo) .profile-quote__text::before,
    .profile-quote--opening:not(.profile-quote--opening-photo) .profile-quote__text::after {
        margin-inline: auto;
        background-color: rgba(244, 240, 227, 0.38);
    }

    /* Closing quote with photo — mobile layout (images in profile style.css) */
    .profile-quote.profile-quote--closing-photo {
        min-height: clamp(28rem, 98vw, 42rem);
        place-items: start center;
        padding-block-start: clamp(5.75rem, 34vw, 11rem);
        padding-block-end: clamp(2rem, 5vw, 4rem);
    }

    .profile-quote--closing-photo .profile-container {
        grid-template-columns: 1fr;
        max-width: var(--max-width);
    }

    .profile-quote--closing-photo .profile-quote__text {
        grid-column: 1;
        max-width: 42ch;
        margin-inline: auto;
        text-align: center;
        text-shadow:
            0 2px 24px rgba(44, 44, 44, 0.78),
            0 1px 6px rgba(44, 44, 44, 0.9);
    }

    .profile-quote--closing-photo .profile-quote__text::before,
    .profile-quote--closing-photo .profile-quote__text::after {
        margin-left: auto;
        margin-right: auto;
    }

    .profile-section__title {
        text-align: center;
    }

    .profile-prose p {
        margin-inline: auto;
        text-align: left; /* keep prose readable; only headings center */
    }

    .profile-story .profile-prose p {
        text-align: center;
    }
}

/* Small mobile — gallery is horizontal scroll; no column breakpoints needed. */
@media (max-width: 480px) {
    /* Narrow phones: closing quote spacing — focal crop lives in Kim block below */
    .profile-quote.profile-quote--closing-photo {
        padding-block-start: clamp(6.5rem, 40vw, 12rem);
    }
}


/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .profile-quote.profile-quote--opening-photo,
    .profile-quote.profile-quote--closing-photo {
        background-attachment: scroll !important;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html { scroll-behavior: auto; }
}


/* Instagram / poster tribute (when no Vimeo iframe) */
.profile-video__instagram-link {
    position: absolute;
    inset: 0;
    display: block;
    z-index: 1;
}

.profile-video__instagram-link .profile-video__poster {
    pointer-events: none;
}

.profile-video__frame img.profile-video__poster,
.profile-video__frame > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    border: 0;
    z-index: 1;
    display: block;
    pointer-events: none;
}

