/* ===== Reset & base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
html {
    height: 100%;
    margin: 0;
}

body {
    /* Unique gradient: deep plum, teal, and warm amber accent */
    background: linear-gradient(135deg, #1a0a2e 0%, #16213e 35%, #0f3460 60%, #1b4332 85%, #2d6a4f 100%);
    background-attachment: fixed;
    color: #e8f0f6;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    min-height: 100%;
}

/* ===== Site header & navigation ===== */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: opacity 0.2s ease;
}

.site-logo:hover {
    opacity: 0.9;
}

.nav-tabs {
    display: flex;
    gap: 0.25rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

.tab-btn.is-active {
    background: rgba(45, 106, 79, 0.5);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.tab-btn:focus-visible {
    outline: 2px solid rgba(45, 106, 79, 0.8);
    outline-offset: 2px;
}

/* ===== Main content ===== */
.team-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}

/* Only the active section is visible */
.team-section {
    display: none;
    margin-bottom: 0;
}

.team-section.is-active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.section-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.5rem;
    padding: 0.5rem 1rem;
    font-size: 1.35rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: default;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.section-title:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(0, 80, 140, 0.25);
}

.section-icon {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* ===== Team grid ===== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.75rem;
}

.team-grid--single {
    max-width: 340px;
}

/* ===== Team cards ===== */
.team-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.team-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 60, 100, 0.35);
    border-color: rgba(255, 255, 255, 0.2);
}

.team-card.is-expanded {
    border-color: rgba(100, 180, 255, 0.5);
    box-shadow: 0 14px 40px rgba(0, 80, 140, 0.45), 0 0 0 2px rgba(100, 180, 255, 0.2);
}

.team-card.is-expanded .team-card__content {
    max-height: 600px;
}

.team-card.is-expanded .team-card__bio {
    display: block;
    -webkit-line-clamp: unset;
    opacity: 1;
    transform: translateY(0);
}

.team-card.is-expanded .team-card__overlay {
    opacity: 0;
    pointer-events: none;
}

/* Card image block */
.team-card__image-wrap {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.team-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.team-card:hover .team-card__photo {
    transform: scale(1.06);
}

/* View bio overlay – real button so it’s clickable and works */
.team-card__overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 50%);
    border: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.team-card:hover .team-card__overlay {
    opacity: 1;
}

.team-card__overlay:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Card content */
.team-card__content {
    padding: 1.25rem;
    max-height: 1000px;
    transition: max-height 0.4s ease;
}

.team-card__name {
    margin: 0 0 0.25rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

.team-card__role {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Bio: collapsed by default (2 lines), full when card is expanded */
.team-card__bio {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.team-card.is-expanded .team-card__bio {
    -webkit-line-clamp: unset;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .site-header {
        padding: 0.75rem 1rem;
    }

    .nav-tabs {
        width: 100%;
        justify-content: center;
    }

    .tab-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }

    .team-main {
        padding: 1.5rem 1rem 2rem;
    }

    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .team-grid--single {
        max-width: 100%;
    }

    .section-title {
        font-size: 1.2rem;
    }
}
