/* ==========================================================================
   Ideal Candidate Profile Section
   ========================================================================== */

.profile-section {
    --profile-section-gutter: 4rem;
    background-color: transparent;
    padding: 3.75rem 4rem 5rem;
}

.profile-section__inner {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
}

/* ---------- Image block ---------- */

.profile-section__image-block {
    position: relative;
    width: min(1170px, 100%);
    border-radius: 8px;
    overflow: hidden;
}

.profile-section__photo {
    width: 100%;
    height: 528px;
    object-fit: cover;
    display: block;
}

/* Coral overlay */
.profile-section__overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(252, 122, 98, 0.78);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

/* Text content on top of the overlay */
.profile-section__image-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 7rem 6.8125rem;
    z-index: 1;
}

.profile-section__label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #fff;
    margin: 0 0 0.5rem;
}

.profile-section__heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.1em;
    margin: 0 0 2rem;
}

.profile-section__statement {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 2;
    letter-spacing: 0.1em;
    margin: 0;
}

/* ---------- White info box (overlaps image, lower-right) ---------- */

.profile-section__info-box {
    position: absolute;
    bottom: 0;
    right: 0;
    width: min(625px, 100%);
    min-height: 328px;
    background-color: #fff;
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: none;
    z-index: 2;
    box-sizing: border-box;
}

.profile-section__info-text {
    font-size: 0.875rem;
    line-height: 2;
    font-weight: 500;
    color: #5a4e4e;
    margin: 0;
}

.profile-section__info-paragraph {
    display: block;
}

.profile-section__info-paragraph + .profile-section__info-paragraph {
    margin-top: 2rem;
}

/* ---------- PC composition from the supplied SVG (1170 x 528 card) ---------- */

@media (min-width: 1200px) {
    .profile-section__inner {
        /* Reserve the 20px visual overflow below the coral card. */
        padding-bottom: 1.25rem;
    }

    .profile-section__image-block {
        overflow: visible;
    }

    .profile-section__photo,
    .profile-section__overlay {
        /* The parent stays visible so the white box can protrude. */
        border-radius: 8px;
    }

    .profile-section__info-box {
        right: -4rem;
        bottom: -1.25rem;
        width: 625px;
        height: 328px;
        min-height: 0;
    }

    .profile-section__image-content {
        /* Keep the catch copy in the coral lane instead of underneath the white box. */
        padding-right: 585px;
    }
}

@media (min-width: 1298px) {
    .profile-section__image-content {
        /* Match the white box's responsive right protrusion and retain a 24px lane gap. */
        padding-right: clamp(540px, calc(1883px - 100vw), 585px);
    }

    .profile-section__info-box {
        /* Use the full 109px SVG offset once the viewport has room for it. */
        right: max(-109px, calc(1170px + 4rem - 100vw));
    }
}

/* Carry the PC composition's 20px lower projection into narrower layouts. */
@media (min-width: 601px) and (max-width: 1199px) {
    .profile-section__inner {
        padding-bottom: 1.25rem;
    }

    .profile-section__image-block {
        overflow: visible;
    }

    /* The parent must stay visible for the white card, so round the coral layers themselves. */
    .profile-section__photo,
    .profile-section__overlay {
        border-radius: 8px;
    }

    .profile-section__info-box {
        bottom: -1.25rem;
    }
}

/* Keep the catch copy in its own lane while the desktop card is still fluid. */
@media (min-width: 1025px) and (max-width: 1199px) {
    .profile-section__image-content {
        padding-right: calc(58% + 1.5rem - var(--profile-section-gutter));
    }

    .profile-section__info-box {
        right: calc(var(--profile-section-gutter) * -1);
        width: 58%;
        min-height: 0;
    }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
    .profile-section {
        --profile-section-gutter: clamp(2rem, 4.6875vw, 3rem);
        padding-right: 2rem;
        padding-left: 2rem;
    }

    .profile-section__image-block {
        width: min(1170px, 100%);
    }

    .profile-section__info-box {
        width: min(625px, 58%);
    }
}

/* ---------- Shared tablet composition ---------- */

@media (min-width: 601px) and (max-width: 768px) {
    .profile-section {
        --profile-section-gutter: clamp(1.5rem, 4.6875vw, 2rem);
        padding-top: 4rem;
        padding-right: clamp(1.5rem, 4.6875vw, 2rem);
        padding-left: clamp(1.5rem, 4.6875vw, 2rem);
    }

    .profile-section__inner,
    .profile-section__image-block,
    .profile-section__photo {
        height: 460px;
    }

    .profile-section__image-block {
        border-radius: 8px;
    }

    .profile-section__image-content {
        justify-content: center;
        padding: 3rem calc(56% + 1rem - var(--profile-section-gutter)) 3rem 2.5rem;
    }

    .profile-section__statement {
        font-size: clamp(1.25rem, 3vw, 1.5rem);
        line-height: 2;
        letter-spacing: 0.04375em;
    }

    .profile-section__info-box {
        right: calc(var(--profile-section-gutter) * -1);
        left: auto;
        width: 56%;
        padding: 1.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .profile-section {
        padding-right: clamp(2rem, 4.6875vw, 3rem);
        padding-left: clamp(2rem, 4.6875vw, 3rem);
    }

    .profile-section__photo {
        height: clamp(460px, 51.56vw, 528px);
    }

    .profile-section__image-content {
        justify-content: center;
        padding-top: 4.5rem;
        padding-right: calc(58% + 1.5rem - var(--profile-section-gutter));
        padding-bottom: 4.5rem;
        padding-left: clamp(3rem, 6vw, 5rem);
    }

    .profile-section__info-box {
        right: calc(var(--profile-section-gutter) * -1);
        width: min(58%, 560px);
        min-height: 0;
    }
}

@media (max-width: 600px) {
    .profile-section {
        padding: 3.75rem 0 0;
    }

    .profile-section__inner {
        border-radius: 8px;
    }

    .profile-section__image-block {
        width: 100%;
        min-height: 743px;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .profile-section__info-box {
        position: relative;
        right: auto;
        bottom: auto;
        left: auto;
        width: auto;
        min-height: 0;
        margin: auto 0 3.75rem 1.5rem;
        padding: 2rem 1.25rem 1.4375rem;
        border-radius: 8px 0 0 8px;
    }

    .profile-section__photo {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }

    .profile-section__image-content {
        position: relative;
        inset: auto;
        justify-content: flex-start;
        padding: 3.75rem 1.5rem 0;
    }

    .profile-section__heading {
        font-size: clamp(1.125rem, 2.5vw, 1.25rem);
    }

    .profile-section__statement {
        font-size: clamp(1.25rem, 3vw, 1.5rem);
        line-height: 2;
        letter-spacing: 0.04375em;
    }

    .profile-section__info-text {
        font-size: 0.9375rem;
        line-height: 2;
    }

    .profile-section__info-paragraph {
        display: block;
    }

    .profile-section__info-paragraph + .profile-section__info-paragraph {
        margin-top: 30px;
    }
}
