:root {
            --primary-color: #4f46e5; /* Indigo-600 */
            --secondary-color: #374151; /* Gray-800 */
            --text-color: #4b5563; /* Gray-600 */
            --bg-light: #f7fafc;
            --border-color: #e5e7eb; /* Gray-200 */
            --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            --max-content-width: 76rem;
        }
        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--bg-light);
            line-height: 1.6;
            -webkit-font-smoothing: antialiased;
            margin: 0;
        }
        .hidden { display: none !important; }

        /* Prevent scrolling on body when modal is open */
        body.overflow-hidden { overflow: hidden; }

        /* --- LAYOUT AND HEADER --- */
        .app-container {
            min-height: 100vh;
            padding: 1rem;
            max-width: var(--max-content-width);
            margin: 0 auto;
        }
        .header { margin-bottom: 2rem; }
        .header h1 {
            font-size: 1.875rem;
            font-weight: 800;
            color: #1f2937;
        }
        @media (min-width: 768px) { .app-container { padding: 2rem; } }
        @media (min-width: 1024px) { .app-container { padding: 3rem; } }

        /* --- INTRO SECTION --- */
        .intro-section {
            background-color: white;
            padding: 2.5rem;
            border-radius: 0.75rem;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border-color);
            margin-bottom: 3rem;
        }
        .intro-section h2 {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--secondary-color);
            margin-bottom: 1rem;
        }
        .intro-section p {
            color: var(--text-color);
            max-width: 42rem;
        }

        /* --- TEAM GRID & CARDS --- */
        .team-grid {
            display: grid;
            grid-template-columns: repeat(1, minmax(0, 1fr));
            gap: 1.5rem;
        }
        @media (min-width: 640px) { .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
        @media (min-width: 768px) { .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
        @media (min-width: 1024px) { .team-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

        .member-card {
            background-color: white;
            padding: 1.5rem;
            border-radius: 0.75rem;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border-color);
            transition: all 300ms ease;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }
        .member-card:hover {
            box-shadow: var(--shadow-xl);
            transform: scale(1.02);
        }
        .card-headshot {
            width: 5rem;
            height: 5rem;
            background-color: #e5e7eb;
            border-radius: 9999px;
            margin-bottom: 1rem;
            box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
            overflow: hidden;
        }
        .card-headshot img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 9999px;
        }
        .member-card h4 {
            font-size: 1.125rem;
            font-weight: 600;
            color: #1f2937;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 100%;
            padding: 0 0.5rem;
            margin: 0;
        }
        .member-card p {
            font-size: 0.875rem;
            color: var(--primary-color);
            font-weight: 500;
            margin-top: 0.25rem;
        }

        /* --- MODAL STYLES --- */
        .modal-backdrop {
            position: fixed;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            background-color: rgba(17, 24, 39, 0.75);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            z-index: 50;
            transition: opacity 300ms ease;
            opacity: 0;
        }
        .modal-backdrop.show-modal {
            opacity: 1;
        }

        .modal-content-box {
            background-color: white;
            width: 100%;
            max-width: 56rem;
            max-height: 90vh;
            border-radius: 0.75rem;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            display: flex;
            flex-direction: column;
            transition: all 300ms ease;
            transform: scale(0.95);
            opacity: 0;
        }
        .modal-backdrop.show-modal .modal-content-box {
            transform: scale(1);
            opacity: 1;
        }

        /* Header & Close Button */
        .modal-header {
            padding: 1.5rem;
            display: flex;
            justify-content: flex-end;
            position: sticky;
            top: 0;
            background-color: white;
            border-top-left-radius: 0.75rem;
            border-top-right-radius: 0.75rem;
            z-index: 10;
            border-bottom: 1px solid var(--border-color);
        }
        .close-modal-btn {
            color: #6b7280;
            padding: 0.5rem;
            margin-right: -0.5rem;
            border-radius: 9999px;
            transition: color 150ms ease;
            border: none;
            background: none;
            cursor: pointer;
        }
        .close-modal-btn:hover { color: #1f2937; }
        .close-modal-btn svg { width: 1.5rem; height: 1.5rem; }

        /* Modal Body */
        .modal-body {
            display: flex;
            flex-direction: column;
            padding: 1.5rem; /* Default mobile padding */
            overflow-y: auto;
        }
        .modal-content-area::-webkit-scrollbar { width: 6px; }
        .modal-content-area::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 3px; }
        .modal-content-area::-webkit-scrollbar-track { background: transparent; }

        @media (min-width: 768px) {
            .modal-body {
                flex-direction: row;
                padding: 2.5rem; /* Larger desktop padding */
            }
        }

        /* Modal Left Column (Headshot) */
        .modal-left-col {
            flex-shrink: 0;
            margin-bottom: 1.5rem;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        @media (min-width: 768px) {
            .modal-left-col {
                width: 33.333333%;
                margin-right: 2.5rem;
                margin-bottom: 0;
            }
        }
        .modal-headshot {
            width: 12rem;
            height: 12rem;
            background-color: #e5e7eb;
            border-radius: 9999px;
            margin-bottom: 1.5rem;
            box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
            overflow: hidden;
        }
        .modal-headshot img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        /* Modal Right Column (Details) */
        .modal-right-col {
            width: 100%;
        }
        @media (min-width: 768px) {
            .modal-right-col { width: 66.666667%; }
        }
        .modal-role {
            font-size: 0.875rem;
            font-weight: 600;
            color: var(--primary-color);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 0.5rem;
        }
        .modal-title-row {
            display: flex;
            align-items: center;
            margin-bottom: 1.5rem;
        }
        .modal-name {
            font-size: 1.875rem;
            font-weight: 700;
            color: #1f2937;
            margin-right: 0.75rem;
            margin-top: 0;
            margin-bottom: 0;
        }
        .modal-linkedin-link {
            color: #6b7280;
            transition: color 150ms ease;
        }
        .modal-linkedin-link:hover { color: var(--primary-color); }
        .modal-linkedin-link svg { width: 1.5rem; height: 1.5rem; }

        .modal-bio {
            color: #374151;
        }
        /* Custom spacing for bio paragraphs */
        .modal-bio p { margin-top: 0; margin-bottom: 1rem; }

        /* --- MODAL FOOTER & NAVIGATION --- */
        .modal-footer {
            padding: 1.5rem;
            display: flex;
            justify-content: space-between;
            border-top: 1px solid var(--border-color);
            position: sticky;
            bottom: 0;
            background-color: white;
            border-bottom-left-radius: 0.75rem;
            border-bottom-right-radius: 0.75rem;
            z-index: 10;
        }
        .nav-button {
            display: flex;
            align-items: center;
            color: var(--primary-color);
            transition: color 150ms ease;
            font-weight: 500;
            background: none;
            border: none;
            cursor: pointer;
            padding: 0.5rem;
        }
        .nav-button:hover { color: #3730a3; }
        .nav-button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            pointer-events: none;
        }
        .nav-button svg { width: 1.25rem; height: 1.25rem; }
        .nav-button#prev-member svg { margin-right: 0.5rem; }
        .nav-button#next-member svg { margin-left: 0.5rem; }
    </style>