/* Team Page Specific Styles */
:root {
    --neon-cyan: #00f3ff;
    --neon-magenta: #ff00ff;
    --dark-bg: #0a0a0a;
    --card-bg: #151515;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

/* Hero Section */
.team-hero {
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    text-align: center;
    padding-top: 80px;
    /* Account for fixed header */
}

.hero-content {
    z-index: 2;
}

.glitch-text {
    font-size: 4rem;
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    color: var(--text-primary);
    text-shadow: 2px 2px var(--neon-magenta), -2px -2px var(--neon-cyan);
    animation: glitch 1s infinite alternate;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    max-width: 600px;
}

.hero-bg-elements .neon-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.c1 {
    width: 300px;
    height: 300px;
    background: var(--neon-cyan);
    top: -50px;
    left: -50px;
    animation: float 6s ease-in-out infinite;
}

.c2 {
    width: 400px;
    height: 400px;
    background: var(--neon-magenta);
    bottom: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite reverse;
}

/* Team Grid */
.team-grid-section {
    padding: 5rem 0;
    perspective: 1000px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    padding: 2rem;
}

/* 3D Card */
.team-card {
    background: var(--card-bg);
    border-radius: 20px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    /* Smooth tilt handled by JS */
    cursor: pointer;
    opacity: 0;
    /* For scroll animation */
    transform: translateY(50px);
}

.team-card.visible {
    animation: fadeInUp 0.8s forwards;
}

.card-content {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.team-card:hover .card-content {
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3),
        0 0 40px rgba(255, 0, 255, 0.2);
    border-color: var(--neon-cyan);
}

.card-image {
    height: 400px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-card:hover .card-image img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    opacity: 0.8;
}

.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    transform: translateZ(20px);
    /* 3D pop */
}

.card-info h3 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-primary);
}

.card-info .role {
    color: var(--neon-cyan);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-top: 0.5rem;
}

.social-mini {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.team-card:hover .social-mini {
    opacity: 1;
    transform: translateY(0);
}

.social-mini i {
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-mini i:hover {
    color: var(--neon-magenta);
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--card-bg);
    width: 90%;
    max-width: 900px;
    border-radius: 20px;
    border: 1px solid var(--neon-cyan);
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.2);
    position: relative;
    transform: scale(0.8) translateY(50px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.modal-backdrop.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--neon-magenta);
}

.modal-body {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .modal-body {
        flex-direction: row;
    }
}

.modal-image {
    flex: 1;
    height: 300px;
    min-height: 300px;
}

@media (min-width: 768px) {
    .modal-image {
        height: auto;
    }
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-details {
    flex: 1.5;
    padding: 2rem;
}

.modal-details h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--text-primary), var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-details h4 {
    color: var(--neon-magenta);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.modal-details p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.modal-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
}

.stat {
    text-align: center;
}

.stat .val {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neon-cyan);
}

.stat .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.modal-social a {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-right: 1.5rem;
    transition: all 0.3s;
}

.modal-social a:hover {
    color: var(--neon-cyan);
    transform: translateY(-3px);
    display: inline-block;
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes glitch {
    0% {
        text-shadow: 2px 2px var(--neon-magenta), -2px -2px var(--neon-cyan);
    }

    25% {
        text-shadow: -2px 2px var(--neon-cyan), 2px -2px var(--neon-magenta);
    }

    50% {
        text-shadow: 2px -2px var(--neon-magenta), -2px 2px var(--neon-cyan);
    }

    75% {
        text-shadow: -2px -2px var(--neon-cyan), 2px 2px var(--neon-magenta);
    }

    100% {
        text-shadow: 2px 2px var(--neon-magenta), -2px -2px var(--neon-cyan);
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .glitch-text {
        font-size: 2.5rem;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
}