        :root {
            /* Updated Colors based on reference image */
            --teal: #3b9c9c;       /* Darker teal for text */
            --teal-bg: #6fb9b0;    /* Soft teal for the circle background */
            --teal-light: #e0f2f1;
            --white: #ffffff;
            --gray-bg: #f4f4f4;
            --text-dark: #222222;
            --text-gray: #555555;
            --close-btn: #00bcd4;  /* Cyan for close button */
            --modal-overlay-color: rgba(0, 0, 0, 0.5);
        }

        body {
            font-family: 'Poppins', sans-serif;
            margin: 0;
            padding: 0;
            background-color: var(--gray-bg);
            color: var(--text-dark);
            box-sizing: border-box;
        }

        *, *:before, *:after { box-sizing: inherit; }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 40px 0px;
        }

        /* --- GRID SYSTEM --- */
        .team-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 30px;
        }

        @media (min-width: 600px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
        @media (min-width: 900px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }
        @media (min-width: 1100px) { .team-grid { grid-template-columns: repeat(4, 1fr); } }

        .team-card {
            background-color: var(--white);
            border-radius: 8px;
            padding: 30px;
            text-align: center;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            cursor: pointer;
        }

        .team-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        }

        .team-photo {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            object-fit: cover;
            margin-bottom: 20px;
            border: 3px solid var(--teal-light);
        }

        .team-name { font-size: 1.1rem; font-weight: 600; margin-bottom: 5px; color: var(--text-dark); }
        .team-title { font-size: 0.85rem; color: var(--teal); font-weight: 500; }

        /* --- MODAL OVERLAY --- */
        .modal-overlay {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background-color: var(--modal-overlay-color);
            backdrop-filter: blur(2px);
            z-index: 9999;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            display: flex;
        }

        .modal-overlay.active { opacity: 1; visibility: visible; }

        /* --- MODAL CONTAINER (Shared) --- */
        .modal-container {
            background-color: var(--white);
            display: flex;
            position: relative;
            background: white;
            transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
            top: auto !important;
            margin: auto !important;
        }
        
        .drag-handle { display: none; }
        .location-tag { display: none; } /* Hiding location tag to match reference design exactly */

        /* =================================================================
           DESKTOP/TAB MODAL VIEW (REDESIGNED TO MATCH IMAGE)
           ================================================================= */
        @media (min-width: 768px) {
            .modal-overlay {
                justify-content: center;
                align-items: center;
                padding: 20px;
            }

            .modal-container {
                flex-direction: row;
                width: 100%;
                max-width: 900px;
                /* Removes the strict height to allow content to flow naturally, 
                   but keeps a max-height for very small laptop screens */
                max-height: 90vh; 
                border-radius: 12px;
                transform: scale(0.95);
                overflow: hidden; /* Ensures rounded corners clip content */
            }

            .modal-overlay.active .modal-container { transform: scale(1); }

            /* LEFT COLUMN - The Image Area */
            .modal-image-col {
                flex: 0 0 40%; /* 40% width */
                background-color: transparent; /* No square background */
                position: relative;
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 40px;
            }

            /* The decorative circle behind the image */
            .modal-image-col::before {
                content: '';
                position: absolute;
                width: 280px;
                height: 280px;
                background-color: var(--teal-bg);
                border-radius: 50%;
                z-index: 0;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
            }

            /* The Image itself */
            .modal-image {
                width: 260px;
                height: 260px;
                border-radius: 50%;
                object-fit: cover;
                z-index: 1;
                position: relative;
                border: 6px solid var(--white); /* White rim around image */
                box-shadow: 0 10px 20px rgba(0,0,0,0.05);
            }

            /* RIGHT COLUMN - The Content */
            .modal-content-col {
                flex: 1;
                padding: 60px 50px 60px 20px; /* Top Right Bottom Left */
                overflow-y: auto;
                display: flex;
                flex-direction: column;
                justify-content: center;
            }

            /* Close Button */
            .close-modal {
                position: absolute;
                top: 25px;
                right: 25px;
                background: none;
                border: none;
                font-size: 2.5rem;
                color: var(--close-btn); /* Cyan color from image */
                cursor: pointer;
                transition: transform 0.2s;
                line-height: 0.5;
                z-index: 10;
                font-weight: 300;
            }
            .close-modal:hover { transform: scale(1.1); }

            /* Typography matches */
            .modal-name {
                font-size: 1.8rem;
                font-weight: 700;
                color: #000;
                margin: 0 0 5px 0;
            }

            .modal-title {
                font-size: 1.1rem;
                color: var(--teal); /* Teal text */
                margin-bottom: 25px;
                font-weight: 400;
            }

            .modal-bio {
                font-size: 0.95rem;
                color: var(--text-gray);
                line-height: 1.6;
                font-weight: 300;
            }
            
            /* Hide tags on desktop to match the clean reference image */
            .modal-tags { display: none; }
        }


        /* =================================================================
           MOBILE MODAL VIEW (Existing Bottom Sheet Logic)
           ================================================================= */
        @media (max-width: 767px) {
            .modal-overlay { align-items: flex-end; padding: 0; }

           .modal-container {
        /* 1. RESET DESKTOP POSITIONING */
        position: relative !important; /* Force it back to normal flow so flex-end works */
        top: 135px !important;          /* Remove the 290px top offset */
        left: auto !important;
        margin: 0 !important;          /* Remove auto margins */

        /* 2. MOBILE DIMENSIONS */
        flex-direction: column;
        width: 100%;
        max-height: 85vh;             /* Take up 85% of screen height */
        border-radius: 24px 24px 0 0; /* Round top corners only */
        
        /* 3. ANIMATION STATE (Start hidden) */
        transform: translateY(100%);  
        transition: transform 0.3s cubic-bezier(0.1, 0.7, 0.1, 1);
    }


            .modal-overlay.active .modal-container { transform: translateY(0); }

            .modal-image-col {
                height: 220px;
                width: 100%;
                flex-shrink: 0;
                position: relative;
            }
            
            /* Revert image to full square for mobile header */
            .modal-image {
                width: 100%;
                height: 100%;
                border-radius: 0;
                border: none;
                object-fit: cover;
            }
            
            /* Remove decorative circle on mobile */
            .modal-image-col::before { display: none; }

            /* Mobile Gradient Overlay */
            .modal-image-col::after {
                content: '';
                position: absolute;
                top: 0; left: 0; right: 0;
                height: 80px;
                background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
                pointer-events: none;
            }

            .modal-content-col {
                padding: 25px;
                padding-bottom: 50px;
                overflow-y: auto;
            }

            .close-modal {
                position: absolute;
                top: 15px; right: 15px;
                width: 35px; height: 35px;
                background: rgba(255,255,255,0.25);
                backdrop-filter: blur(4px);
                border: 1px solid rgba(255,255,255,0.4);
                border-radius: 50%;
                display: flex; align-items: center; justify-content: center;
                color: white; font-size: 1.2rem;
                z-index: 20; cursor: pointer;
            }

            .drag-handle {
                display: block;
                width: 40px; height: 5px;
                background-color: rgba(255,255,255,0.7);
                border-radius: 10px;
                position: absolute; top: 10px; left: 50%;
                transform: translateX(-50%);
                z-index: 25;
            }
            
            .modal-name { font-size: 1.5rem; margin-bottom: 5px; color: var(--text-dark); }
            .modal-title { font-size: 0.9rem; color: var(--teal); margin-bottom: 15px; }
            .modal-tags { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
            .modal-tag {
                background-color: var(--teal-light);
                color: var(--teal);
                padding: 4px 12px; border-radius: 6px;
                font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
            }
            .modal-bio { font-size: 0.9rem; line-height: 1.6; color: var(--text-dark); }
        }

        body.modal-open { overflow: hidden; }