.contact-profile {
    --profile-space: clamp(1.5rem, 4vw, 4rem);
    --profile-muted: #595959;
    margin-inline: auto;
    max-width: 78rem;
    padding: clamp(8rem, 12vw, 12rem) clamp(1.5rem, 6vw, 5rem) 5rem;
    color: var(--dark-green);
}

.contact-profile-back {
    display: inline-flex;
    gap: 0.75rem;
    margin-bottom: var(--profile-space);
    font-size: var(--fs-small);
}

.contact-profile-back::before { content: "←"; }

.contact-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    align-items: start;
    gap: var(--profile-space);
}

.contact-profile-portrait {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--light-beige);
}

.contact-profile-contact {
    display: grid;
    gap: 0.75rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
    font-size: var(--fs-small);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.contact-profile-contact a,
.contact-profile-back { color: var(--dark-green); }

.contact-profile-contact a:hover,
.contact-profile-back:hover { color: var(--button-green); }

.contact-profile-heading {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--light-brown);
    padding-bottom: 2rem;
}

.contact-profile-country {
    margin-bottom: 0.75rem;
    font-size: var(--fs-small);
}

.contact-profile-heading h1 {
    font-family: var(--ff-alt);
    font-size: clamp(2.25rem, 4.5vw, 4rem);
    line-height: 1.1;
    padding-bottom: 1rem;
    overflow-wrap: anywhere;
}

.contact-profile-role { font-weight: 500; }

.contact-profile-biography { margin-block: 2rem 3rem; }

.contact-profile-biography h2 {
    font-family: var(--ff-alt);
    font-size: clamp(1.75rem, 2.5vw, 2.5rem);
    line-height: 1.2;
    padding-bottom: 1rem;
}

.contact-profile-prose {
    max-width: 65ch;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.contact-profile-prose p { line-height: 1.6; }
.contact-profile-prose span[style*="color: #999"] { color: var(--profile-muted) !important; }
.contact-profile-prose h3 {
    font-family: var(--ff-base);
    font-size: var(--fs-base);
    font-weight: 500;
    line-height: 1.5;
    padding-bottom: 0.75rem;
}
.contact-profile-prose a { color: var(--button-green); text-decoration: underline; }
.contact-profile-prose a:hover { color: var(--dark-green); }
.contact-profile-prose hr { margin-block: 1.5rem; }
.contact-profile-prose :is(ul, ol) { margin-block: 1rem; }

.contact-profile a:focus-visible {
    outline: 2px solid var(--dark-green);
    outline-offset: 4px;
}

.contact-profile-actions {
    --contact-action-color: #ff4401;
    --contact-action-hover-color: #dc3b02;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.contact-profile-actions a.contact-action,
.gtc-popup .gtc-popup-content .module-text:has(.contact-details-social) .contact-details-social .contact-profile-actions a.contact-action {
    align-items: center;
    justify-content: center;
    display: inline-flex;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: var(--contact-action-color);
    color: var(--white);
    font-size: 1rem;
    line-height: 1;
    text-decoration: none;
}

.contact-profile-actions a.contact-action:hover,
.gtc-popup .gtc-popup-content .module-text:has(.contact-details-social) .contact-details-social .contact-profile-actions a.contact-action:hover {
    background: var(--contact-action-hover-color);
    color: var(--white);
}

.contact-profile-actions a.contact-action:focus-visible {
    outline: 2px solid var(--dark-green);
    outline-offset: 4px;
}

.gtc-popup .gtc-popup-content .module-text:has(.contact-details-social) .contact-details-social .contact-profile-actions a.contact-action::before,
.gtc-popup .gtc-popup-content .module-text:has(.contact-details-social) .contact-details-social .contact-profile-actions a.contact-action::after {
    display: none;
    content: none;
}

.gtc-popup .contact-profile-actions { margin-top: 0; }
.contact-action-icon { display: block; width: 24px; height: 24px; background: currentColor; }
.contact-action-icon-linkedin {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.4 3.7a1.9 1.9 0 1 1-3.8 0 1.9 1.9 0 0 1 3.8 0ZM1.9 7h3.2v13H1.9V7Zm5.4 0h3.1v1.8h.1c.5-1 1.7-2.1 3.6-2.1 3.8 0 4.5 2.4 4.5 5.5V20h-3.3v-7c0-1.7 0-3.8-2.3-3.8s-2.5 1.8-2.5 3.6V20H7.3V7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.contact-action-icon-pdf {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2h8l4 4v8M14 2v5h5M6 22h12v-4M6 2v12M3 18v-4h2a1 1 0 0 1 0 2H3m5 2v-4h1a2 2 0 0 1 0 4H8m5 0v-4h3m-3 2h2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.contact-action-icon-vcard {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Ccircle cx='8' cy='10' r='2'/%3E%3Cpath d='M4.5 16a3.5 3.5 0 0 1 7 0M14 9h5M14 12h5M14 15h3'/%3E%3C/svg%3E") center / contain no-repeat;
}

:is(.contact-profile, .gtc-popup) :is(.contact-profile-prose, .gtc-popup-content) ul.check > li,
:is(.contact-profile, .gtc-popup) :is(.contact-profile-prose, .gtc-popup-content) ul.list-arrow > li {
    position: relative;
    padding-inline-start: 1.75em;
}

:is(.contact-profile, .gtc-popup) :is(.contact-profile-prose, .gtc-popup-content) ul.check > li::before,
:is(.contact-profile, .gtc-popup) :is(.contact-profile-prose, .gtc-popup-content) ul.list-arrow > li::before {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 1.1em;
    margin: 0;
}

@media (max-width: 767.98px) {
    .contact-profile-layout { display: flex; flex-direction: column; gap: 0; }
    /* Flatten only the non-semantic body wrapper so the name precedes the photo. */
    .contact-profile-body { display: contents; }
    .contact-profile-heading { order: -1; width: 100%; }
    .contact-profile-identity { width: 100%; margin-bottom: 1rem; }
    .contact-profile-biography { width: 100%; }
    .contact-profile-portrait { max-width: 22rem; }
    .contact-profile { padding-top: 7rem; }
}
