/* ===== TEAM ===== */
.team {
    padding: 100px 0;
    background: var(--stone-lighter);
}

.team-header {
    text-align: center;
    margin-bottom: 64px;
}

.team-featured {
    display: grid;
    grid-template-columns: auto 1.2fr;
    gap: 48px;
    align-items: center;
    margin-bottom: 64px;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 48px;
    border: 1px solid rgba(0, 0, 0, .04);
}

.team-featured-photo {
    width: 280px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.team-featured-photo img {
    width: 100%;
    display: block;
}

.team-featured-info .section-label {
    margin-bottom: 8px;
}

.team-featured-info h3 {
    font-size: 2.2rem;
    margin-bottom: 4px;
}

.team-featured-info .role {
    color: var(--maroon);
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: block;
}

.team-featured-info p {
    color: var(--mid-gray);
    font-size: 1.05rem;
    line-height: 1.8;
}

.team-bio-note {
    margin-top: 12px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}

.team-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .04);
    transition: all .3s;
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.team-card-photo {
    width: 100%;
    aspect-ratio: 1;
    background: var(--stone);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mid-gray);
    font-size: .8rem;
}

.team-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card-info {
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 110px;
}

.team-card-info h4 {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.team-card-info .credentials {
    font-size: .8rem;
    color: var(--mid-gray);
    font-weight: 400;
    margin-bottom: 6px;
    height: 1.2em;
    display: block;
}

.team-card-info .role {
    font-size: .9rem;
    color: var(--maroon);
    font-weight: 500;
    margin-top: auto;
}

.read-bio-btn {
    background: none;
    border: 1px solid var(--maroon);
    color: var(--maroon);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 12px;
    transition: background .2s, color .2s;
}

.read-bio-btn:hover {
    background: var(--maroon);
    color: var(--white);
}

.bio-modal {
    max-width: 660px;
    width: calc(100% - 48px);
    max-height: 90vh;
    overflow-y: auto;
    border: none;
    border-radius: var(--radius-lg);
    padding: 48px;
    /* position: fixed + transform centers the dialog since the
       global * { margin: 0 } reset removes the UA-default margin: auto */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 480px) {
    .bio-modal {
        width: calc(100% - 24px);
        padding: 28px 20px;
        border-radius: var(--radius);
    }

    .bio-modal-name {
        font-size: 1.4rem;
    }
}

.bio-modal::backdrop {
    background: rgba(0, 0, 0, .55);
}

.bio-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
    color: var(--mid-gray);
    transition: color .2s;
}

.bio-modal-close:hover {
    color: var(--black);
}

.bio-modal-name {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.bio-modal-credentials {
    font-size: .9rem;
    color: var(--mid-gray);
    display: block;
    margin-bottom: 4px;
}

.bio-modal-role {
    color: var(--maroon);
    font-weight: 500;
    font-size: 1rem;
    display: block;
    margin-bottom: 24px;
}

.bio-modal-body p {
    color: var(--mid-gray);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.bio-modal-body p:last-child {
    margin-bottom: 0;
}

.bio-modal-social {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.bio-modal-social a {
    color: var(--maroon);
    font-weight: 500;
    text-decoration: none;
    font-size: .95rem;
}

.bio-modal-social a:hover {
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .team-featured {
        grid-template-columns: 1fr;
    }

    .team-featured-photo {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}