.teams-page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem 8rem 4rem 8rem;
}

/* ----- hero section ----- */
.hero {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-image {
    width: 100%;
    height: 240px;
    border-radius: 28px;
    background: linear-gradient(105deg, #2b3b4a 0%, #4b6a82 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 30px -10px rgba(0,20,40,0.15);
}

/* simulate a dynamic workspace collage (video freeze / team image) */
.hero-image .collage {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 6px;
    padding: 6px;
    background: #1e2e3b;
}

.hero-image .collage span {
    flex: 1;
    background-size: cover;
    background-position: center;
    border-radius: 22px;
    transition: all 0.3s;
}

.hero-image .collage span:nth-child(1) { background-image: linear-gradient(145deg, #b8d8e3, #7fa5b8); }
.hero-image .collage span:nth-child(2) { background-image: linear-gradient(145deg, #cfbba3, #b2947a); }
.hero-image .collage span:nth-child(3) { background-image: linear-gradient(145deg, #aac7cf, #6f8f9c); }
.hero-image .collage span:nth-child(4) { background-image: linear-gradient(145deg, #b5c9b0, #7f9a7a); }

.hero-content {
    max-width: 700px;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    color: #0f1a24;
}

.hero p {
    font-size: 1.3rem;
    color: #3e4f5e;
    font-weight: 400;
    max-width: 580px;
}

/* ----- filter bar (heart of scalability) ----- */
.filter-bar {
    background: white;
    border-radius: 60px;
    padding: 0.5rem 0.5rem 0.5rem 1.8rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 1.2rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.02), 0 2px 6px rgba(0,20,40,0.05);
    margin: 1.8rem 0 1.2rem;
    border: 1px solid #e9edf2;
    justify-content: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #617788;
    letter-spacing: 0.3px;
}

.filter-btn {
    background: #f0f4f8;
    border: none;
    padding: 0.45rem 1.2rem;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1f2e3c;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid transparent;
}

.filter-btn i {
    font-size: 0.8rem;
    margin-right: 6px;
    color: #5b7a93;
}

.filter-btn:hover {
    background: #e2e9f2;
    color: #0b1a26;
}

.filter-btn.active {
    background: #1e2f3f;
    color: white;
    border-color: #1e2f3f;
}

.filter-btn.active i {
    color: white;
}

.search-wrapper {
    margin-left: auto;
    display: flex;
    align-items: center;
    background: #f4f7fb;
    border-radius: 40px;
    padding: 0.3rem 0.3rem 0.3rem 1.2rem;
    border: 1px solid #dee5ed;
}

.search-wrapper i {
    color: #7d93aa;
    font-size: 1rem;
}

.search-wrapper input {
    border: none;
    background: transparent;
    padding: 0.45rem 0.8rem;
    font-size: 0.95rem;
    min-width: 200px;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.search-wrapper input::placeholder {
    color: #96a9bb;
    font-weight: 400;
}

.search-wrapper button {
    background: #1f2e3c;
    border: none;
    color: white;
    border-radius: 40px;
    padding: 0.45rem 1.4rem;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s;
}

.search-wrapper button:hover {
    background: #111f2b;
}

/* team grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem 1.5rem;
    margin: 2.5rem 0 3.5rem;
}

/* profile card */
.profile-card {
    background: white;
    border-radius: 28px;
    padding: 10px;
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.02), 0 0 0 1px rgba(0,0,0,0.02);
    transition: all 0.25s ease;
    cursor: pointer;
    border: 1px solid #eff2f6;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    height: 300px;
}

.h-250 {
  height: 250px;
}

.profile-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 30px -12px rgba(0,40,70,0.15), 0 0 0 1px rgba(130,160,200,0.2);
    border-color: transparent;
}

/* photo wrapper */
/* .photo-wrapper {
    height: 135px;
    border-radius: 50%;
    margin-bottom: 1.2rem;
    overflow: hidden;
    transition: all 0.3s;
    background: #d0ddee;
    border: 3px solid white;
    box-shadow: 0 8px 15px -6px rgba(0,32,64,0.2);
} */

 .photo-wrapper {
    width: 100px;
    height: 100px;          /* equal width & height = perfect circle */
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 16px;
    background: #e0e0e0;    /* fallback if image is missing */
}

.photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;       /* ✅ fills circle without stretching */
    object-position: center top; /* ✅ keeps face visible (top-biased) */
    display: block;
    border-radius: 50%;
    display: flex;
    transition: transform 0.4s;
}

.profile-card:hover .photo-wrapper {
    transform: scale(1.02);
    border-color: #f0f5fe;
}

.profile-card:hover .photo-wrapper img {
    transform: scale(1.07);
}

/* name & title */
.profile-name {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: #0f202d;
}

.profile-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: #5f7485;
    margin-bottom: 0.5rem;
}

.location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.85rem;
    color: #617e99;
    background: #f0f6fc;
    padding: 0.2rem 1rem;
    border-radius: 40px;
    margin: 0.5rem 0 0.8rem;
}

.location i {
    font-size: 0.75rem;
    color: #517a9e;
}

/* fun fact — the secret sauce */
.fun-fact {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    background: #f7fafd;
    padding: 0.5rem 1rem;
    border-radius: 60px;
    color: #2e4d6b;
    margin: 0.4rem 0 1rem;
    line-height: 1.3;
    max-width: 220px;
    border: 1px dashed #cbdae9;
}

/* social links */
.social-links {
    display: flex;
    gap: 0.9rem;
    margin-top: 0.3rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.profile-card:hover .social-links {
    opacity: 1;
}

.social-links a {
    color: #7089a2;
    font-size: 1.2rem;
    transition: color 0.15s, transform 0.15s;
    text-decoration: none;
}

.social-links a:hover {
    color: #1f3a57;
    transform: scale(1.15);
}

/* subtle "view profile" indicator on hover */


/* expanded card modal (hidden by default) */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10,25,40,0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    background: white;
    max-width: 600px;
    width: 90%;
    border-radius: 40px;
    padding: 2.4rem 2rem 2rem;
    box-shadow: 0 40px 60px rgba(0,15,30,0.4);
    position: relative;
    animation: modalPop 0.3s;
}

@keyframes modalPop {
    from { opacity: 0.6; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-close {
    position: absolute;
    top: 18px; right: 22px;
    background: #ecf2f9;
    border: none;
    border-radius: 30px;
    width: 38px; height: 38px;
    font-size: 1.2rem;
    color: #2f4b68;
    cursor: pointer;
    transition: 0.15s;
}

.modal-close:hover {
    background: #d2dfec;
}

.modal-header {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.8rem;
}

.modal-photo {
    width: 100px;
    height: 100px;
    border-radius: 30px;
    object-fit: cover;
    background: #bacee0;
    border: 3px solid white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.modal-name h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.modal-name p {
    color: #4d6a83;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-bio {
    font-size: 1rem;
    color: #2a3d51;
    margin: 1.5rem 0 1.2rem;
    padding: 1rem 0;
    border-top: 1px solid #dde5ef;
    border-bottom: 1px solid #dde5ef;
}

.modal-contact {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 1.8rem 0 0.5rem;
}

.email-chip {
    background: #e7f0fa;
    padding: 0.5rem 1.2rem;
    border-radius: 60px;
    color: #15405e;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #c6daf0;
}

.question-prompt {
    background: #1d3143;
    color: white;
    border: none;
    padding: 0.6rem 1.4rem;
    border-radius: 60px;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.15s;
}

.question-prompt:hover {
    background: #0f2233;
}

/* join us footer */
.join-section {
    background: #f2f7fd;
    border-radius: 60px;
    padding: 3rem 3rem;
    text-align: center;
    margin-top: 4rem;
    border: 1px solid #dae6f2;
}

.join-section h2 {
    font-size: 2.6rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #102433;
}

.join-section p {
    font-size: 1.2rem;
    color: #456079;
    margin: 0.8rem 0 1.8rem;
}

.join-btn {
    background: #1e3347;
    border: none;
    color: white;
    padding: 1rem 3rem;
    border-radius: 60px;
    font-weight: 600;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid #163141;
}

.join-btn:hover {
    background: #0b202f;
}

/* filter responsive */
/* ----- Responsive Design ----- */

/* Tablet & Smaller Desktops (Under 1200px) */
@media (max-width: 1200px) {
    .teams-page {
        padding: 2rem 4rem 4rem 4rem;
    }
    
    .team-grid {
        grid-template-columns: repeat(3, 1fr); /* Drop to 3 columns */
    }
}

/* Tablets (Under 992px) */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr); /* Drop to 2 columns */
        gap: 1.5rem;
    }

    .filter-bar {
        border-radius: 24px;
        padding: 1.2rem;
        justify-content: flex-start;
    }

    .search-wrapper {
        margin-left: 0;
        width: 100%; /* Search takes full width on tablet */
        margin-top: 0.5rem;
    }
    
    .search-wrapper input {
        flex: 1;
    }
}

/* Large Mobile (Under 768px) */
@media (max-width: 768px) {
    .teams-page {
        padding: 1.5rem 1.5rem 3rem 1.5rem;
    }

    .hero-image {
        height: 180px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .join-section {
        padding: 2.5rem 1.5rem;
        border-radius: 40px;
    }

    .join-section h2 {
        font-size: 2rem;
    }
}

/* Small Mobile (Under 480px) */
@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: 1fr; /* Single column for readability */
    }

    .filter-group {
        justify-content: center;
        width: 100%;
    }

    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .profile-card {
        height: auto;
        padding-bottom: 1.5rem;
    }

    .modal-card {
        width: 95%;
        padding: 2rem 1.2rem 1.5rem;
    }

    .modal-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* utility */
.text-small { font-size: 0.9rem; }
i { color: #66809b; }
