/* ── Team page (MIT Earth Intelligence style) ── */

.team-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(30px, 4vw, 60px) clamp(16px, 3vw, 36px);
}

/* ── Section heading ── */
.team-heading {
    font-size: clamp(1.6rem, 2vw, 2.2rem);
    font-weight: 300;
    color: #1a1a1a;
    margin: 0 0 clamp(10px, 1.5vw, 20px);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

/* ── Filter bar ── */
.team-filter {
    margin-bottom: clamp(24px, 3vw, 40px);
}

.team-search {
    width: 100%;
    max-width: 360px;
    padding: 9px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: var(--font-sm, 0.95rem);
    font-family: inherit;
    color: #374151;
    background: #f9fafb;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
}

.team-search:focus {
    border-color: #16d3b7;
    background: #fff;
}

.team-search::placeholder {
    color: #9ca3af;
}

/* ── Member grid: 4 columns ── */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(24px, 3vw, 40px) clamp(16px, 2vw, 28px);
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ── Member card: photo left + text right ── */
.team-card {
    display: flex;
    gap: clamp(12px, 1.2vw, 18px);
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.team-card:hover {
    opacity: 0.85;
}

.team-card.hidden {
    display: none;
}

/* ── Photo ── */
.team-photo {
    width: clamp(90px, 8vw, 140px);
    height: clamp(108px, 9.6vw, 168px);
    flex-shrink: 0;
    object-fit: cover;
    background: #f0f0f0;
    border-radius: 0;
}

/* ── Text block ── */
.team-info {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}

.team-name {
    font-size: clamp(1.1rem, 1.3vw, 1.5rem);
    font-weight: 300;
    color: #1a1a1a;
    line-height: 1.25;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.team-role {
    font-size: var(--font-sm, clamp(0.85rem, 0.2vw + 0.8rem, 0.95rem));
    color: #555;
    line-height: 1.5;
    margin: 0 0 10px;
}

/* ── Links row ── */
.team-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}

.team-links a {
    font-size: var(--font-sm, 0.9rem);
    color: #1a1a1a;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.team-links a:hover {
    color: #014240;
}

/* ── Social icon links (small) ── */
.team-social {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.team-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f0f0;
    transition: background 0.2s;
}

.team-social a:hover {
    background: #e0e0e0;
}

.team-social a img {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* ── Empty state ── */
.team-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    color: #9ca3af;
    font-size: var(--font-base, 1rem);
    display: none;
}

.team-empty.visible {
    display: block;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
    .team-photo {
        width: 100px;
        height: 120px;
    }
}
