/* Team Section Component */
.team-section {
    width: 100%;
    max-width: 1200px;
    margin: 80px auto 0;
}

.team-section-title {
    font-size: 28px;
    margin-bottom: 40px;
    color: var(--color-text-primary);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

/* Tab Navigation */
.team-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
    justify-content: center;
    flex-wrap: wrap;
}

.team-tab {
    padding: 14px 32px;
    font-size: 12px;
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: 0;
    cursor: pointer;
    transition: var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
    font-family: var(--font-mono);
    position: relative;
    overflow: visible;
}

.team-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-text-primary);
    z-index: -1;
    transition: var(--transition-smooth);
    opacity: 0;
}

.team-tab::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-text-primary);
    filter: blur(15px);
    opacity: 0;
    z-index: -2;
    transition: var(--transition-smooth);
}

.team-tab:hover {
    color: var(--color-text-primary);
    border-color: var(--color-text-primary);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
}

.team-tab:hover::after {
    opacity: 0.4;
}

.team-tab.active {
    background: var(--color-text-primary);
    color: var(--color-bg);
    border-color: var(--color-text-primary);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
}

.team-tab.active::before {
    opacity: 1;
}

.team-tab.active::after {
    opacity: 0.6;
}

/* Team Member Content */
.team-content {
    display: none;
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

.team-content.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Team Member Photo - Aceternity Style */
.team-photo-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 9 / 16;
    overflow: visible;
    margin-left: 125px;
    margin-top: 70px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9) 0%, rgba(10, 10, 10, 0.95) 100%);
    padding: 8px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    /* Aceternity glow effect */
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Animated gradient border */
.team-photo-container::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.1) 100%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

/* Glow effect on hover */
.team-photo-container::after {
    content: '';
    position: absolute;
    inset: -100px;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -2;
    pointer-events: none;
}

.team-photo-container:hover {
    transform: translateY(-8px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 80px rgba(255, 255, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.team-photo-container:hover::before {
    opacity: 1;
}

.team-photo-container:hover::after {
    opacity: 1;
}

/* Inner image wrapper for better control */
.team-photo-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

/* 3D Flip Animation */
.photo-flip-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-flip-container.flipped {
    transform: rotateY(180deg);
}

.photo-flip-front,
.photo-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.photo-flip-back {
    transform: rotateY(180deg);
}

.team-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: grayscale(0.2) brightness(0.95);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1.05);
}

.team-photo-container:hover .team-photo {
    filter: grayscale(0) brightness(1.05);
    transform: scale(1.08);
}

.team-photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.7) 50%,
        transparent 100%
    );
    border-radius: 0 0 12px 12px;
    transform: translateY(100%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
}

.team-photo-container:hover .team-photo-overlay {
    transform: translateY(0);
}

.team-role {
    font-size: 14px;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.team-name {
    font-size: 24px;
    color: var(--color-text-primary);
    font-weight: 600;
    margin: 0;
}

/* Team Member Info */
.team-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.team-description {
    font-size: 15px;
    line-height: 1.8;
    color: var(--color-text-secondary);
}

.team-description h3 {
    font-size: 18px;
    color: var(--color-text-primary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.team-description p {
    margin-bottom: 16px;
}

.team-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.team-skill-tag {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition-fast);
    font-weight: 500;
}

.team-skill-tag:hover {
    border-color: var(--color-text-primary);
    color: var(--color-text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Showreel Section */
.team-showreel {
    width: 100%;
    margin-top: 30px;
}

.team-showreel h3 {
    font-size: 18px;
    color: var(--color-text-primary);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.showreel-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    border: none;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.showreel-container:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.showreel-container video,
.showreel-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .team-content.active {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .team-photo-container {
        max-width: 450px;
        margin: 0 auto;
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .team-section {
        margin: 60px auto 0;
    }

    .team-section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .team-tabs {
        gap: 12px;
        margin-bottom: 40px;
    }

    .team-tab {
        padding: 12px 24px;
        font-size: 11px;
    }

    .team-photo-overlay {
        transform: translateY(0);
        background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.9) 0%,
            transparent 60%
        );
    }

    .team-name {
        font-size: 20px;
    }

    .team-role {
        font-size: 12px;
    }

    .team-description {
        font-size: 14px;
    }

    .team-description h3 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .team-tabs {
        flex-direction: column;
        width: 100%;
    }

    .team-tab {
        width: 100%;
        padding: 14px 24px;
    }

    .team-photo-container {
        aspect-ratio: 9 / 16;
        margin-left: 0;
        margin-top: 0;
    }

    .team-showreel h3 {
        font-size: 16px;
    }
}
