/* Match the Summer School trainer cards without loading its page-wide styles. */
.staff-section {
    padding: 2rem 1.5rem;
}

.staff-grid {
    row-gap: 1.5rem;
}

.staff-card {
    appearance: none;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 1.75rem 1.25rem;
    width: 100%;
    height: 100%;
    font: inherit;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.staff-card-trigger {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    font: inherit;
    text-align: inherit;
    cursor: pointer;
    border-radius: 6px;
}

.staff-card:hover,
.staff-card:focus-within {
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    border-color: #e2e2e2;
}

.staff-card-trigger:focus-visible,
.staff-profile-links a:focus-visible,
.staff-modal .modal-close:focus-visible {
    outline: 3px solid var(--primary-color, #307461);
    outline-offset: 4px;
}

.staff-figure {
    display: block;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    margin: 0 0 1rem;
    background: var(--primary-color-lightest, #f3f7f5);
}

.staff-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.staff-page .staff-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color, #1a1a1a);
    margin: 0 0 2px;
}

.staff-page .staff-position {
    display: block;
    font-size: 13px;
    font-style: italic;
    font-weight: 400;
    color: #777;
    margin: 0 0 8px;
}

.staff-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--primary-color-lightest, #f3f7f5);
    color: var(--primary-color, #307461);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
}

.staff-view-bio {
    display: inline-block;
    margin-top: auto;
    padding-top: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color, #307461);
}

.staff-modal-content {
    width: 64rem;
    max-width: calc(100vw - 40px);
}

.staff-modal-content .staff-badge {
    align-self: flex-start;
    width: fit-content;
    max-width: 100%;
}

.staff-modal-content .staff-figure {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
}

.staff-details {
    min-width: 0;
    overflow-wrap: anywhere;
}

.staff-bio {
    font-size: 13px;
    line-height: 1.65;
    color: #666;
}

.staff-bio img {
    max-width: 100%;
    height: auto;
}

.staff-profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.staff-profile-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 999px;
    background: var(--primary-color-lightest, #f3f7f5);
    color: var(--primary-color, #307461);
    font-size: 13px;
    font-weight: 600;
}

.staff-card .staff-profile-links {
    justify-content: center;
}

.staff-profile-links a:hover {
    color: #fff;
    background: var(--primary-color, #307461);
}

@media (max-width: 1280px) {
    .staff-card .staff-figure {
        width: 110px;
        height: 110px;
    }
}

@media (max-width: 1023px) {
    .staff-modal-content .columns {
        display: block;
    }

    .staff-modal-content .staff-figure {
        max-width: 260px;
        margin-inline: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .staff-card {
        transition: none;
    }
}
