.profile-page {
    --profile-accent: #ff9255;
    color: var(--ink);
    background: var(--paper);
}

.profile-page .site-header {
    color: var(--ink);
}

.profile-page .site-header.is-scrolled {
    background: rgba(244, 240, 232, 0.92);
}

.profile-hero {
    position: relative;
    min-height: 100svh;
    display: grid;
    align-items: center;
    padding: clamp(5rem, 14vw, 11rem) var(--pad) clamp(4rem, 7vw, 7rem);
    overflow: hidden;
    background:
        radial-gradient(circle at 13% 22%, rgba(230, 255, 0, 0.95) 0 8%, transparent 8.2%),
        radial-gradient(circle at 88% 80%, rgba(94, 123, 255, 0.78) 0 13%, transparent 13.2%),
        var(--profile-accent);
}

.profile-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.18;
    pointer-events: none;
    background-image: repeating-radial-gradient(circle at 30% 40%, var(--ink) 0 0.7px, transparent 0.8px 25px);
}

.profile-hero::after {
    content: attr(data-profile-word);
    position: absolute;
    right: -0.04em;
    bottom: -0.18em;
    color: transparent;
    font-family: var(--font-display);
    font-size: clamp(8rem, 24vw, 24rem);
    line-height: 0.8;
    -webkit-text-stroke: 2px rgba(7, 7, 7, 0.16);
    transform: rotate(-4deg);
    pointer-events: none;
}

.profile-hero-grid {
    position: relative;
    z-index: 1;
    width: min(100%, 92rem);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.95fr);
    align-items: center;
    gap: clamp(2.5rem, 7vw, 8rem);
}

.profile-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: clamp(2rem, 4vw, 3.5rem);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.profile-breadcrumb::before {
    content: '';
    width: 2.5rem;
    height: 3px;
    background: var(--ink);
}

.profile-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(4.6rem, 10vw, 10.5rem);
    font-weight: 400;
    line-height: 0.72;
    letter-spacing: -0.08em;
    text-transform: uppercase;
}

.profile-title span,
.profile-title em {
    display: block;
}

.profile-title em {
    width: max-content;
    color: var(--acid);
    font-size: 0.72em;
    -webkit-text-stroke: 3px var(--ink);
    paint-order: stroke fill;
    transform: translateX(clamp(1rem, 5vw, 4rem)) rotate(-3deg);
}

.profile-role {
    margin: clamp(2.2rem, 5vw, 4rem) 0 0.7rem;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.profile-lede {
    max-width: 34rem;
    margin: 0;
    font-family: var(--font-intro);
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    font-weight: 700;
    line-height: 1.45;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.profile-actions .button:last-child {
    background: var(--paper);
}

.profile-portrait {
    position: relative;
    width: min(100%, 40rem);
    justify-self: end;
    padding: clamp(0.7rem, 1.5vw, 1rem) clamp(0.7rem, 1.5vw, 1rem) clamp(2.5rem, 5vw, 4.5rem);
    border: 3px solid var(--ink);
    background: var(--paper);
    box-shadow: 14px 14px 0 var(--ink);
    transform: rotate(2.5deg);
}

.profile-portrait img {
    width: 100%;
    aspect-ratio: 16 / 11;
    border: 3px solid var(--ink);
    object-fit: cover;
}

.profile-portrait figcaption {
    position: absolute;
    left: 1.2rem;
    right: 1.2rem;
    bottom: clamp(0.6em, 1vw, 1.5em);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-stamp {
    position: absolute;
    z-index: 2;
    top: -2.4rem;
    right: -2.2rem;
    width: clamp(6rem, 11vw, 10rem);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding: 1rem;
    border: 3px solid var(--ink);
    border-radius: 50%;
    color: white;
    background: var(--med-blue);
    box-shadow: 5px 5px 0 var(--ink);
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    line-height: 0.88;
    text-align: center;
    text-transform: uppercase;
    transform: rotate(9deg);
}

.profile-story {
    position: relative;
    padding: clamp(5rem, 10vw, 9rem) var(--pad);
    overflow: hidden;
    background: var(--gradient);
}

.profile-story-grid {
    width: min(100%, 88rem);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(26rem, 1.1fr);
    gap: clamp(3rem, 8vw, 9rem);
    align-items: start;
}

.profile-story h2,
.profile-gallery h2,
.profile-next h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(3.1rem, 7vw, 7rem);
    font-weight: 400;
    line-height: 0.82;
    letter-spacing: -0.055em;
    text-transform: uppercase;
}

.profile-story h2 em {
    color: var(--profile-accent);
    text-shadow: 5px 5px 0 var(--ink);
}

.profile-story-copy > p:not(.kicker) {
    margin: 0 0 1.4rem;
    font-size: clamp(0.9rem, 1.5vw, 1.25rem);
    font-weight: 600;
    line-height: 1.7;
}

.profile-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2.5rem;
}

.profile-fact {
    min-height: 10rem;
    padding: 1.2rem;
    border: 3px solid var(--ink);
    background: white;
    box-shadow: 5px 5px 0 var(--ink);
}

.profile-fact:nth-child(2) {
    background: var(--acid);
    transform: rotate(-1deg);
}

.profile-fact:nth-child(3) {
    background: #c9a7ff;
    transform: rotate(1deg);
}

.profile-fact span {
    display: block;
    margin-bottom: 1.4rem;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.profile-fact strong {
    font-family: var(--font-intro);
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    line-height: 1.05;
}

.profile-gallery {
    position: relative;
    padding: clamp(5rem, 10vw, 9rem) var(--pad);
    overflow: clip;
    color: white;
    background: linear-gradient(145deg, #061762 0%, var(--med-blue) 58%, var(--ink) 100%);
}

.profile-gallery::before {
    content: attr(data-gallery-word);
    position: absolute;
    right: -0.03em;
    top: 0.12em;
    color: transparent;
    font-family: var(--font-display);
    font-size: clamp(7rem, 17vw, 18rem);
    line-height: 0.8;
    white-space: nowrap;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.07);
    pointer-events: none;
}

.profile-gallery-heading,
.profile-gallery-years,
.profile-carousel-shell,
.profile-carousel-count,
.profile-carousel-hint {
    position: relative;
    z-index: 1;
    width: min(100%, 92rem);
    margin-inline: auto;
}

.profile-gallery-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.55fr);
    gap: 3rem;
    align-items: end;
    margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.profile-gallery-heading .kicker {
    color: var(--acid);
}

.profile-gallery-heading h2 em {
    color: var(--profile-accent);
}

.profile-gallery-intro {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.65;
}

.profile-gallery-meta {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-gallery-years {
    display: flex;
    align-items: center;
    max-width: 100%;
    gap: 0.55rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding: 0.2rem 0 0.45rem;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}

.profile-gallery-years:empty {
    display: none;
}

.profile-gallery-years::-webkit-scrollbar {
    display: none;
}

.profile-gallery-years-label {
    flex: 0 0 auto;
    margin-right: 0.35rem;
    color: var(--acid);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.profile-gallery-year {
    flex: 0 0 auto;
    min-width: 4.6rem;
    padding: 0.65rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 999px;
    color: white;
    background: rgba(7, 7, 7, 0.4);
    font: 900 0.72rem/1 var(--font-body);
    letter-spacing: 0.1em;
    scroll-snap-align: start;
    cursor: pointer;
    transition: color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.profile-gallery-year:hover,
.profile-gallery-year:focus-visible,
.profile-gallery-year[aria-selected="true"] {
    border-color: var(--acid);
    color: var(--ink);
    background: var(--acid);
    box-shadow: 0 0 0 3px rgba(230, 255, 0, 0.18);
    outline: none;
    transform: none;
}

.profile-carousel-count {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 0.2rem;
    min-width: 5.2rem;
    margin: 1rem auto 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.profile-carousel-count strong {
    color: var(--acid);
    font-size: 1.15rem;
}

.profile-carousel-shell {
    position: relative;
}

.profile-carousel-nav {
    position: absolute;
    z-index: 6;
    top: 50%;
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 50%;
    color: white;
    background: rgba(7, 7, 7, 0.62);
    backdrop-filter: blur(10px);
    cursor: pointer;
    translate: 0 -50%;
    transition:
        color 180ms ease,
        background 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.profile-carousel-prev {
    left: clamp(0.55rem, 1.2vw, 1rem);
}

.profile-carousel-next {
    right: clamp(0.55rem, 1.2vw, 1rem);
}

.profile-carousel-nav:hover,
.profile-carousel-nav:focus-visible {
    color: var(--ink);
    border-color: var(--acid);
    background: var(--acid);
    translate: 0 -50%;
    box-shadow: 0 0 0 3px rgba(230, 255, 0, 0.28);
    transform: none;
    outline: none;
}

.profile-carousel-nav:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.profile-carousel {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    cursor: grab;
    touch-action: auto;
    user-select: none;
}

.profile-carousel::-webkit-scrollbar {
    display: none;
}

.profile-carousel:focus-visible {
    outline: 3px solid var(--acid);
    outline-offset: 5px;
}

.profile-carousel.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.profile-carousel-track {
    display: flex;
    width: max-content;
    gap: clamp(0.5rem, 0.8vw, 0.8rem);
}

.profile-gallery-loading,
.profile-gallery-error {
    width: clamp(18rem, 30vw, 29rem);
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: rgba(255, 255, 255, 0.78);
    background: rgba(7, 7, 7, 0.42);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    line-height: 1.5;
    text-align: center;
    text-transform: uppercase;
}

.profile-carousel-shell.has-gallery-error .profile-carousel-nav {
    display: none;
}

.profile-photo {
    position: relative;
    flex: 0 0 clamp(18rem, 30vw, 29rem);
    aspect-ratio: 4 / 3;
    margin: 0;
    overflow: hidden;
    background: #0b0b0b;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.profile-photo::after {
    content: '';
    position: absolute;
    inset: 35% 0 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent, rgba(7, 7, 7, 0.82));
    opacity: 0.86;
    transition: opacity 260ms ease;
}

.profile-photo button {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
    filter: saturate(0.94) contrast(1.03);
    transition:
        transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 300ms ease;
}

.profile-photo:hover img,
.profile-photo button:focus-visible img {
    transform: scale(1.035);
    filter: saturate(1.07) contrast(1.03);
}

.profile-photo button:focus-visible {
    outline: 3px solid var(--acid);
    outline-offset: -3px;
}

.profile-photo figcaption {
    position: absolute;
    z-index: 2;
    left: clamp(1rem, 2vw, 1.6rem);
    right: clamp(1rem, 2vw, 1.6rem);
    bottom: clamp(1rem, 2vw, 1.5rem);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    pointer-events: none;
    transform: translateY(0.25rem);
    transition: transform 260ms ease;
}

.profile-photo:hover figcaption,
.profile-photo:focus-within figcaption {
    transform: translateY(0);
}

.profile-photo figcaption span {
    color: var(--acid);
    font-size: 0.61rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.profile-photo figcaption strong {
    color: white;
    font-family: var(--font-intro);
    font-size: clamp(1rem, 1.6vw, 1.35rem);
    line-height: 1.05;
}

.profile-photo .moment-zoom {
    z-index: 2;
    top: 1rem;
    right: 1rem;
    bottom: auto;
    opacity: 1;
    transform: none;
    background: rgba(7, 7, 7, 0.48);
}

.profile-carousel-hint {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.45rem;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.profile-carousel-hint span {
    color: var(--acid);
    font-size: 1.1rem;
}

.profile-next {
    position: relative;
    padding: clamp(5rem, 10vw, 9rem) var(--pad);
    overflow: hidden;
    /* background: var(--acid); */
        background:
        linear-gradient(180deg, rgba(121, 125, 0, 0.86), rgba(7, 7, 7, 0.40) 50%, rgba(7, 7, 7, 0.55)),
        url('assets/img/cats/cats-bg.webp') center 80% / cover no-repeat;
}

.profile-next-inner {
    position: relative;
    z-index: 1;
    width: min(100%, 80rem);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 3rem;
}

.profile-next h2 {
    max-width: 10ch;
}

.profile-next .button {
    flex: 0 0 auto;
    background: var(--profile-accent);
}

@media (max-width: 900px) {
    .profile-hero-grid,
    .profile-story-grid,
    .profile-gallery-heading {
        grid-template-columns: 1fr;
    }

    .profile-portrait {
        width: min(88%, 38rem);
        justify-self: center;
    }

    .profile-story-grid {
        gap: 3rem;
    }

    .profile-photo {
        flex-basis: clamp(18rem, 58vw, 27rem);
    }
}

@media (max-width: 600px) {
    .profile-hero {
        min-height: auto;
    }

    .profile-title {
        font-size: clamp(4.2rem, 22vw, 7rem);
    }

    .profile-title em {
        transform: translateX(0.4rem) rotate(-3deg);
    }

    .profile-actions,
    .profile-actions .button {
        width: 100%;
    }

    .profile-portrait {
        width: 94%;
    }

    .profile-stamp {
        top: -1.8rem;
        right: -1rem;
    }

    .profile-portrait figcaption {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }

    .profile-facts {
        grid-template-columns: 1fr;
    }

    .profile-photo {
        flex-basis: min(82vw, 24rem);
        aspect-ratio: 4 / 3;
    }

    .profile-carousel-nav {
        width: 2.75rem;
        height: 2.75rem;
    }

    .profile-photo .moment-zoom {
        top: 0.75rem;
        right: 0.75rem;
    }

    .profile-next-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}
