/* Team Section Styles */
#team {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

#team-heading {
    font-size: 3.5rem;
    font-weight: 300;
}

#team-heading strong {
    font-weight: 700;
}

/* Filter Buttons */
.team-filter-btn {
    padding: 0.6rem 1.4rem;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--slate-400, #94a3b8);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.4s var(--portfolio-ease, cubic-bezier(0.19, 1, 0.22, 1));
    cursor: pointer;
    margin: 0.25rem;
}

.team-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.team-filter-btn.active {
    background: white;
    color: #111;
    border-color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Team Card */
.team-card {
    text-align: center;
    position: relative;
    margin-bottom: 2rem;
    /* Cinematic Reveal Setup */
    opacity: 0;
    transform: translateY(60px) scale(0.9) rotateX(-5deg);
    filter: blur(10px);
}

@keyframes teamCinematicReveal {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.9) rotateX(-5deg);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0);
        filter: blur(0);
    }
}

.team-card.show {
    animation: teamCinematicReveal 1.2s cubic-bezier(0.2, 1, 0.3, 1) forwards;
    /* Custom Staggering using dynamic index from JS */
    animation-delay: calc(var(--team-idx, 0) * 0.08s) !important;
}

.team-card.hidden {
    display: none;
}

.team-card.leaving {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    filter: blur(5px);
    transition: all 0.4s var(--ease-expo-out);
}

.team-card-image-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem auto;
    border-radius: 50%;
    /* Gradient border effect */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    padding: 3px;
    transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    overflow: visible;
}

.team-card:hover .team-card-image-wrapper {
    transform: translateY(-8px) scale(1.03);
    background: linear-gradient(135deg, var(--primary-600), var(--info));
    box-shadow: 0 20px 40px -15px rgba(37, 99, 235, 0.4);
}

.team-card-image-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background-color: var(--slate-800);
    /* Glass effect inner border */
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.team-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: transparent;
    transition: transform 1s cubic-bezier(0.2, 1, 0.3, 1);
    filter: saturate(0.9);
}

.team-card:hover .team-card-image {
    transform: scale(1.1);
    filter: saturate(1.1);
}

/* Typography styles */
.team-card-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.35rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: block;
    transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1);
    position: relative;
}

.team-card:hover .team-card-name {
    color: var(--primary-400);
    transform: translateY(-2px);
    letter-spacing: 1px;
}

.team-card-role {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--slate-400);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: opacity 0.4s ease;
}

.team-card:hover .team-card-role {
    color: var(--slate-300);
    opacity: 0.8;
}


/* Animations for filtering */
@keyframes teamFadeInScale {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.92);
        filter: blur(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.team-card.show {
    animation: teamFadeInScale 0.6s var(--ease-expo-out) forwards;
}