:root {
    --primary: #A9E7F5;
    --lapis: #1E4ED8;
    --dark: #0F172A;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", sans-serif;
}

body {
    background: var(--white);
}


.team-section {
    padding: 80px 20px;
    text-align: center;
}

.team-section h1 {
    font-size: 3rem;
    margin-bottom: 40px;
    color: var(--dark);
}


.team-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 50px;
}

.tab {
    padding: 12px 24px;
    border: none;
    background: var(--primary);
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

.tab.active,
.tab:hover {
    background: var(--lapis);
    color: white;
}


.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 180px);
    justify-content: center;
    gap: 24px;
}


.team-member {
    width: 180px;
    text-decoration: none;
    color: var(--dark);
    display: flex;
    flex-direction: column;
    align-items: center;

    transition:
        transform 0.45s cubic-bezier(.4,0,.2,1),
        opacity 0.35s ease;
}


.team-member.hidden {
    opacity: 0;
    transform: scale(0.7);
    pointer-events: none;
}

.team-member.removed {
    display: none;
}



.avatar {
    width: 180px;
    height: 180px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}


.name {
    margin-top: 10px;
    font-weight: 600;
    transition: opacity 0.25s ease;
}


.name-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15,23,42,0.65);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    opacity: 0;
    transform: scale(0.9);
    transition: 0.35s ease;
}


.team-member:hover img {
    transform: scale(1.08);
}

.team-member:hover .name {
    opacity: 0;
}

.team-member:hover .name-overlay {
    opacity: 1;
    transform: scale(1);
}


@media (max-width: 600px) {
    .team-grid {
        grid-template-columns: repeat(auto-fit, 140px);
    }

    .avatar {
        width: 140px;
        height: 140px;
    }
}
