        /* --- GENERAL PAGE STYLES --- */
        body {
            background-color: #3a3f42;
            color: white;
            font-family: 'Arial', sans-serif;
            margin: 0;
            overflow-x: hidden;
        }

        /* --- HEADER & FILTER SECTION --- */
        .team-header-section {
            text-align: center;
            padding: 4rem 1rem 2rem 1rem;
        }

        .team-header-section h1 {
            font-size: 3.5rem;
            margin-bottom: 2rem;
            text-transform: uppercase;
            letter-spacing: 2px;
        }

        .filter-bar {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 1.5rem;
            margin-bottom: 3rem;
            text-transform: uppercase;
            font-size: 0.9rem;
            font-weight: bold;
        }

        .filter-btn {
            background: transparent;
            border: none;
            color: #aaa;
            cursor: pointer;
            padding: 5px 10px;
            transition: 0.3s;
            letter-spacing: 1px;
        }

        .filter-btn:hover, .filter-btn.active {
            color: #25b99c;
            border-bottom: 2px solid #25b99c;
        }

        /* --- GRID LAYOUT --- */
        .members-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 4rem;
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 2rem 8rem 2rem;
        }

        /* --- MEMBER CARD CONTAINER --- */
        .member-card-container {
            position: relative;
            width: 100%;
            height: 380px;
            perspective: 1000px;
            z-index: 1; /* Default layer */
            transition: z-index 0s linear 0.1s; /* Delay lowering z-index so it doesn't flicker */
        }

        /* THE FIX: When hovering the container, bring the WHOLE container to the front */
        .member-card-container:hover {
            z-index: 500; 
            transition-delay: 0s; /* Instant rise */
        }

        /* --- THE CARD CONTENT --- */
        .member-card {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: transparent;
            border-radius: 20px;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy effect */
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
            box-sizing: border-box;
            overflow: hidden;
        }

        /* --- HOVER STATE EXPANSION --- */
        .member-card-container:hover .member-card {
            width: 800px;
            height: auto;
            min-height: 450px;
            background-color: #666;
            
            /* Positioning logic for pop-out */
            left: 50%;
            top: -50px;
            transform: translateX(-50%);
            
            box-shadow: 0 25px 60px rgba(0,0,0,0.7);
            
            flex-direction: row;
            align-items: flex-start;
            padding: 40px;
            overflow: visible;
        }

        /* --- LEFT SIDE (Photo) --- */
        .card-visual {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
            transition: width 0.3s;
        }

        .member-card-container:hover .card-visual {
            width: 35%;
            margin-right: 40px;
        }

        .card-image-wrapper {
            width: 220px;
            height: 220px;
            border-radius: 50%;
            overflow: hidden;
            border: 4px solid #2a2a2a;
            position: relative;
            margin-bottom: 1.5rem;
            background-color: #87CEEB;
            transition: all 0.3s;
            flex-shrink: 0;
        }
        
        .member-card-container:hover .card-image-wrapper {
            border-color: #25b99c;
            width: 250px;
            height: 250px;
        }

        .card-image-wrapper img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            z-index: 1;
            position: relative;
        }
        
        /* Landscape Decoration */
        .card-image-wrapper::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 30%;
            background: linear-gradient(180deg, #a4d166 0%, #6a8c23 100%);
            z-index: 0;
            border-radius: 0 0 100px 100px;
        }

        .card-name {
            font-size: 1.6rem;
            font-weight: 700;
            text-transform: uppercase;
            margin-bottom: 0.5rem;
            letter-spacing: 1px;
            text-align: center;
            color: white;
            transition: color 0.3s;
        }
        
        .member-card-container:hover .card-name {
            color: #222; /* Dark text when expanded on grey bg */
            font-size: 1.8rem;
        }

        .card-role {
            font-size: 1rem;
            color: #25b99c;
            text-transform: uppercase;
            font-weight: 600;
            text-align: center;
        }

        /* --- RIGHT SIDE (Details) --- */
        .card-details {
            display: none;
            flex-direction: column;
            gap: 15px;
            width: 65%;
            opacity: 0;
            transition: opacity 0.3s ease-in;
        }

        .member-card-container:hover .card-details {
            display: flex;
            opacity: 1;
            transition-delay: 0.2s;
        }

        /* --- BUBBLE STYLES --- */
        .info-bubble {
            background-color: #92cbb6;
            border: 2px solid #5a7c6f;
            border-radius: 20px;
            padding: 10px 15px;
            color: #333;
            position: relative;
            box-shadow: 3px 3px 5px rgba(0,0,0,0.2);
        }

        .info-bubble h3 {
            margin: 0 0 3px 0;
            font-size: 1rem;
            color: #2f4f4f;
            font-weight: 800;
            text-transform: uppercase;
        }

        .info-bubble p {
            margin: 0;
            font-size: 0.9rem;
            line-height: 1.3;
            color: #222;
        }

        /* Specific Bubble Layouts */
        .bubble-occupation { width: 70%; align-self: flex-start; }
        .bubble-tasks { width: 95%; align-self: flex-start; margin-left: 10px; }
        .bubble-interests { width: 95%; align-self: flex-start; margin-left: 10px; }
        .bubble-funfact { width: 100%; align-self: flex-start; background-color: #8fbfaa; }


        /* --- MOBILE RESPONSIVE --- */
        @media (max-width: 900px) {
            /* On mobile, disable the pop-out hover or simplify it */
            .member-card-container:hover .member-card {
                width: 100%;
                height: 100%;
                left: 0;
                top: 0;
                transform: none;
                background-color: transparent;
                padding: 20px;
                flex-direction: column;
                box-shadow: none;
            }
            .member-card-container:hover .card-visual {
                width: 100%;
                margin-right: 0;
            }
            .member-card-container:hover .card-details {
                display: none;
            }
            .member-card-container:hover {
                z-index: 1;
            }
        }
