.contact-page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 76px;
    color: #172033;
}

.contact-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
    gap: 28px;
    align-items: stretch;
    margin-bottom: 72px;
}

.contact-hero-copy,
.contact-hero-summary {
    border-radius: 24px;
    border: 1px solid #dfe8ed;
    box-shadow: 0 18px 48px rgba(23, 32, 51, .07);
}

.contact-hero-copy {
    position: relative;
    overflow: hidden;
    padding: clamp(34px, 5vw, 64px);
    background:
        radial-gradient(circle at 100% 0%, rgba(37, 194, 199, .16), transparent 34%),
        linear-gradient(135deg, #f7ffff 0%, #f4f9fb 100%);
}

.contact-hero-copy::after {
    content: '';
    position: absolute;
    right: -85px;
    bottom: -110px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 34px solid rgba(21, 156, 162, .07);
    pointer-events: none;
}

.contact-kicker,
.contact-section-heading > span {
    display: inline-block;
    color: #0f8f94;
    font-size: .77rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.contact-kicker {
    margin-bottom: 14px;
}

.contact-hero h1 {
    max-width: 790px;
    margin: 0;
    color: #111827;
    font-size: clamp(2.65rem, 5.4vw, 5rem);
    line-height: .98;
    letter-spacing: -.04em;
}

.contact-lead {
    max-width: 760px;
    margin: 24px 0 0;
    color: #5f6d7d;
    font-size: 1.05rem;
    line-height: 1.75;
}

.contact-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 18px;
    margin-top: 30px;
}

.contact-primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    background: #159ca2;
    color: #fff;
    text-decoration: none;
    font-weight: 850;
    box-shadow: 0 10px 24px rgba(21, 156, 162, .22);
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.contact-primary-action:hover {
    background: #0f7f84;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(21, 156, 162, .28);
}

.contact-general-email {
    color: #536173;
    text-decoration: none;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.contact-general-email:hover {
    color: #0f8f94;
}

.contact-hero-summary {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 26px;
    padding: 28px;
    background: #0f2630;
    color: #fff;
}

.contact-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.contact-summary-item {
    min-width: 0;
    padding: 18px 10px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    background: rgba(255,255,255,.045);
    text-align: center;
}

.contact-summary-item strong {
    display: block;
    color: #75e3e6;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1;
}

.contact-summary-item span {
    display: block;
    margin-top: 7px;
    color: #c8d8df;
    font-size: .76rem;
    font-weight: 700;
}

.contact-hero-summary p {
    margin: 0;
    color: #d7e3e8;
    line-height: 1.65;
}

.contact-section {
    margin-top: 72px;
}

.contact-section-heading {
    max-width: 720px;
    margin: 0 auto 30px;
    text-align: center;
}

.contact-section-heading > span {
    margin-bottom: 8px;
}

.contact-section-heading h2 {
    margin: 0;
    color: #171d2e;
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    letter-spacing: -.025em;
}

.contact-section-heading p {
    margin: 10px auto 0;
    max-width: 620px;
    color: #687587;
    line-height: 1.65;
}

.contact-director-section {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.member-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 250px;
    padding: 26px;
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(23, 32, 51, .055);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.member-card:hover {
    transform: translateY(-4px);
    border-color: #b7e3e5;
    box-shadow: 0 18px 38px rgba(23, 32, 51, .09);
}

.member-card-featured {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 30px;
    min-height: 0;
    padding: 34px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbfc 100%);
}

.member-avatar {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid #bee7e9;
    border-radius: 22px;
    background: linear-gradient(135deg, #dff9fa, #b9eced);
    color: #0e5960;
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: .04em;
    box-shadow: 0 9px 20px rgba(21, 156, 162, .12);
}

.member-avatar-soft {
    background: linear-gradient(135deg, #eff4ff, #e5ecfb);
    border-color: #d8e1f0;
    color: #354766;
}

.member-card-featured .member-avatar {
    width: 132px;
    height: 132px;
    margin: 0;
    border-radius: 32px;
}

.member-avatar-image {
    background: #fff;
}

.member-avatar-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.member-info {
    min-width: 0;
    width: 100%;
}

.member-role {
    display: block;
    margin-bottom: 8px;
    color: #15949a;
    font-size: .74rem;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.member-info h3 {
    margin: 0;
    color: #171d2e;
    font-size: 1.16rem;
    line-height: 1.35;
}

.member-card-featured .member-info h3 {
    font-size: clamp(1.65rem, 3vw, 2.2rem);
}

.member-description {
    max-width: 590px;
    margin: 12px 0 0;
    color: #64748b;
    line-height: 1.65;
}

.member-email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    margin-top: auto;
    padding-top: 20px;
    color: #138e94;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.member-email span:first-child {
    overflow-wrap: anywhere;
}

.member-email:hover {
    color: #0f6f74;
}

.contact-institutions-section {
    width: 100%;
}

.institutions-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
}

.institution-card {
    min-height: 280px;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}

.institution-logo {
    width: 100%;
    height: 132px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #edf1f4;
}

.institution-logo svg {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 180px;
    max-height: 118px;
    object-fit: contain;
}

.institution-logo-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 96px;
    color: #64748b;
    font-size: .84rem;
    font-weight: 800;
    text-align: center;
}

.institution-card .member-info {
    text-align: center;
}

.institution-card .member-role,
.institution-card .member-info h3 {
    text-align: center;
}

.institution-card .member-info h3 {
    min-height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.contact-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-top: 78px;
    padding: 34px 38px;
    border: 1px solid #bde7e9;
    border-radius: 24px;
    background: linear-gradient(110deg, #eefdfe 0%, #f8ffff 58%, #e9f7f9 100%);
}

.contact-cta h2 {
    margin: 0;
    color: #172033;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.contact-cta p {
    margin: 10px 0 0;
    color: #607080;
}

/* Dark mode */
html[data-theme="dark"] .contact-page {
    color: #e8f0f7;
}

html[data-theme="dark"] .contact-hero-copy {
    background:
        radial-gradient(circle at 100% 0%, rgba(54, 188, 194, .12), transparent 34%),
        linear-gradient(135deg, #111b2b 0%, #0f1927 100%);
    border-color: #2c3c50;
}

html[data-theme="dark"] .contact-hero-copy::after {
    border-color: rgba(70, 210, 215, .07);
}

html[data-theme="dark"] .contact-hero h1,
html[data-theme="dark"] .contact-section-heading h2,
html[data-theme="dark"] .member-info h3,
html[data-theme="dark"] .contact-cta h2 {
    color: #f3f7fb !important;
}

html[data-theme="dark"] .contact-lead,
html[data-theme="dark"] .contact-section-heading p,
html[data-theme="dark"] .member-description,
html[data-theme="dark"] .contact-cta p {
    color: #adbdcc !important;
}

html[data-theme="dark"] .contact-general-email {
    color: #9cc5cf;
}

html[data-theme="dark"] .contact-hero-summary {
    background: #102a35;
    border-color: #2d5260;
}

html[data-theme="dark"] .member-card {
    background: #111b2b !important;
    border-color: #2b3c50 !important;
    box-shadow: 0 12px 32px rgba(0,0,0,.18);
}

html[data-theme="dark"] .member-card-featured {
    background: linear-gradient(135deg, #111b2b 0%, #0f1927 100%) !important;
}

html[data-theme="dark"] .member-card:hover {
    border-color: #3f7a82 !important;
    box-shadow: 0 18px 38px rgba(0,0,0,.24);
}

html[data-theme="dark"] .member-avatar {
    background: linear-gradient(135deg, #153842, #1d4c55);
    border-color: #366671;
    color: #8ce8eb;
}

html[data-theme="dark"] .member-avatar-soft {
    background: linear-gradient(135deg, #1a273a, #24334a);
    border-color: #34485f;
    color: #c7d7e7;
}

html[data-theme="dark"] .member-avatar-image {
    background: #172235;
}

html[data-theme="dark"] .member-email,
html[data-theme="dark"] .member-role,
html[data-theme="dark"] .contact-kicker,
html[data-theme="dark"] .contact-section-heading > span {
    color: #63d9dd !important;
}

html[data-theme="dark"] .institution-logo {
    background: #f6f8fa;
    border-color: #35475b;
}

html[data-theme="dark"] .contact-cta {
    background: linear-gradient(110deg, #102b34 0%, #11202b 60%, #122c35 100%);
    border-color: #32616a;
}

@media (max-width: 1100px) {
    .contact-hero {
        grid-template-columns: 1fr;
    }

    .contact-hero-summary {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(240px, .7fr);
        align-items: center;
    }

    .institutions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .members-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .member-card-featured {
        grid-template-columns: 120px minmax(0, 1fr);
    }

    .member-card-featured .member-avatar {
        width: 112px;
        height: 112px;
    }

    .contact-cta {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 680px) {
    .contact-page {
        width: min(100% - 20px, 1180px);
        padding-top: 28px;
    }

    .contact-hero {
        margin-bottom: 52px;
    }

    .contact-hero-copy,
    .contact-hero-summary {
        border-radius: 20px;
    }

    .contact-hero-copy {
        padding: 30px 24px;
    }

    .contact-hero-summary {
        display: flex;
        padding: 22px;
    }

    .contact-summary-grid {
        width: 100%;
    }

    .members-grid,
    .institutions-grid {
        grid-template-columns: 1fr;
    }

    .member-card-featured {
        display: flex;
        align-items: flex-start;
        padding: 26px;
    }

    .member-card-featured .member-avatar {
        width: 104px;
        height: 104px;
        margin-bottom: 4px;
    }

    .contact-section {
        margin-top: 54px;
    }

    .contact-cta {
        margin-top: 58px;
        padding: 28px 24px;
        border-radius: 20px;
    }
}

@media (max-width: 460px) {
    .contact-summary-grid {
        grid-template-columns: 1fr;
    }

    .contact-hero-actions,
    .contact-primary-action {
        width: 100%;
    }

    .contact-general-email {
        width: 100%;
        text-align: center;
    }
}


.institution-card-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.institution-card-link:focus-visible {
    outline: 3px solid #159ca2;
    outline-offset: 4px;
}
