.pf {
    padding-top: 40px;
    margin-bottom: 60px;
    overflow: hidden;
}

.pf .pf__h1 {
    margin: 0;
    padding: 30px 0 60px;
    overflow-wrap: anywhere;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--c-dark);
}

.pf .pf-header {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    align-items: start;
    gap: 40px;
    margin-bottom: 60px;
}

.pf .pf-header__aside {
    width: auto;
}

.pf .pf-header__summary {
    max-width: 68ch;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.65;
    color: var(--c-dark-80, #4b4a58);
}

.pf .pf-header__summary > :first-child,
.pf .pf-description__body > :first-child {
    margin-top: 0;
}

.pf .pf-header__summary > :last-child,
.pf .pf-description__body > :last-child {
    margin-bottom: 0;
}

.pf .pf-header__weblink {
    overflow-wrap: anywhere;
}

/* Case links must remain readable on the white background (WCAG AA).
   Underlines also distinguish links without relying on color alone. */
.pf .pf-header__weblink,
.pf .pf-header__weblink:visited {
    color: #b52d40;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.pf .pf-header__weblink:hover {
    color: #872336;
}

.pf .pf-description__body a:not([class]),
.pf .pf-description__body a:not([class]):visited {
    color: #236b9a;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.pf .pf-description__body a:not([class]):hover {
    color: #174a6b;
}

.pf .pf-header__weblink:focus-visible,
.pf .pf-description__body a:not([class]):focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.pf .portfolio-gallery {
    margin-bottom: 48px;
}

.pf .portfolio-gallery__track {
    display: flex;
    gap: 28px;
    padding: 4px 0 32px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-behavior: smooth;
    scroll-snap-type: inline mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--c-silver) transparent;
}

.pf .portfolio-gallery__track:focus-visible {
    outline: 3px solid var(--c-main);
    outline-offset: 4px;
}

.pf .portfolio-gallery__slide {
    position: relative;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    flex: 0 0 min(100%, 1050px);
    min-width: 0;
    height: clamp(360px, 55vw, 680px);
    margin: 0;
    overflow: hidden;
    scroll-snap-align: start;
    border: 6px solid #e5e7eb;
    border-radius: 28px;
    background: #f3f4f6;
    box-shadow: 0 12px 32px rgba(35, 39, 54, 0.1);
}

.pf .portfolio-gallery__item {
    display: block;
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    overflow: hidden;
}

/* Optimizers may wrap an image in <picture>. Keep the same containing box. */
.pf .portfolio-gallery__item > picture {
    display: block;
    width: 100%;
    height: 100%;
}

.pf .portfolio-gallery__item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
}

.pf .portfolio-gallery__caption {
    position: static;
    flex: 0 0 auto;
    margin: 0;
    padding: 9px 12px;
    overflow-wrap: anywhere;
    border-top: 1px solid #e5e7eb;
    color: #353442;
    background: #f3f4f6;
    font-size: 13px;
    line-height: 1.35;
}

.pf .portfolio-gallery__navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pf .portfolio-gallery__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    color: var(--c-silver);
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.pf .portfolio-gallery__arrow svg {
    width: 32px;
    height: 32px;
    stroke: currentColor;
    stroke-width: 2px;
}

.pf .portfolio-gallery__arrow:hover,
.pf .portfolio-gallery__arrow:focus-visible {
    color: var(--c-main);
    background: var(--c-silver-20, #e9ebf1);
}

.pf .portfolio-gallery__arrow:focus-visible {
    outline: 3px solid var(--c-main);
    outline-offset: 2px;
}

.pf .portfolio-gallery__arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

.pf .pf__description {
    width: 100%;
    max-width: none;
    margin-left: 0;
    padding-left: 0;
    box-sizing: border-box;
    font-size: 17px;
    line-height: 1.55;
}

.pf .pf-description__head {
    margin: 0 0 30px;
    font-size: clamp(1.5rem, 3vw, 1.75rem);
    line-height: 1.25;
}

.pf .pf-description__body img {
    max-width: 100%;
    height: auto;
}

.s-calllink .s-calllink__link {
    border: 0;
    background: transparent;
    font-family: inherit;
}

@media (max-width: 760px) {
    .pf {
        padding-top: 24px;
        margin-bottom: 40px;
    }

    .pf .pf__h1 {
        padding: 24px 0 36px;
        font-size: clamp(1.875rem, 9vw, 2.5rem);
    }

    .pf .pf-header {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        margin-bottom: 36px;
    }

    .pf .pf-header__summary,
    .pf .pf__description {
        font-size: 16px;
    }

    .pf .portfolio-gallery {
        margin-right: -12px;
        margin-bottom: 36px;
    }

    .pf .portfolio-gallery__track {
        gap: 14px;
        padding-bottom: 20px;
    }

    .pf .portfolio-gallery__slide {
        flex-basis: 100%;
        height: clamp(280px, 85vw, 420px);
        border-width: 4px;
        border-radius: 18px;
    }

    .pf .portfolio-gallery__arrow {
        width: 84px;
        height: 44px;
    }

    .pf .pf-description__head {
        margin-bottom: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pf .portfolio-gallery__track {
        scroll-behavior: auto;
    }
}

/* Never rely on color alone to announce the selected frame. */
.pf .portfolio-gallery__status {
    margin-left: auto;
    color: var(--c-dark, #353442);
    font-size: 14px;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
}

.pf .pf-description__body {
    min-width: 0;
    overflow-wrap: anywhere;
}

.pf .pf-header__weblink {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 100%;
}

.pf .pf-header__weblink > svg {
    flex: 0 0 24px;
    stroke: currentColor;
}

/* A missing file is reported honestly, not replaced by another project's image. */
.pf .portfolio-gallery__unavailable {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 120px;
    padding: 24px;
    color: #5d6070;
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
}
