
.team-section {
    padding: var(--space-4xl) 0 var(--space-4xl);
    background: #1a3a5c;
        text-align: center;
}

.team-section__heading {
    font-size: var(--fs-3xl);
    margin-bottom: var(--space-md);
    color: #ffffff;
}

.team-section__subtitle {
    font-size: var(--fs-md);
    color: #ffffff;
    font-weight: 500;
    margin-bottom: var(--space-3xl);
    padding: 0 var(--container-padding);
}

.team-section__intro {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    padding: var(--space-xl) var(--container-padding);
    margin-bottom: var(--space-4xl);
}

.team-section__intro p {
    max-width: 900px;
    margin: 0 auto;
    font-size: var(--fs-md);
    line-height: 1.6;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg) var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center;
}

.team-member {
    position: relative;
    width: min(100%, 280px);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: var(--space-md);
    cursor: pointer;
    outline: none;
}

.team-member__bg {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 240px;
    background-color: rgb(240, 234, 234);
    border: 5px solid rgba(123, 118, 185, 0.75);
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s ease;
    overflow: hidden;
}

.team-member:hover .team-member__bg {
    border-color: var(--color-accent);
    box-shadow: 0 0 20px rgba(0, 180, 216, 0.3);
}

.team-member:focus-visible .team-member__bg {
    border-color: var(--color-accent-light);
    box-shadow: 0 0 0 4px rgba(72, 202, 228, 0.16), 0 0 24px rgba(0, 180, 216, 0.3);
}

.team-member img {
    position: relative;
    z-index: 2;
    width: 220px;
    height: 220px;
    object-fit: contain;
    border-radius: 50%;
    transition: all 0.4s ease;
    margin-top: 10px;
}

.team-member:hover img {
    transform: scale(1.05);
}

.team-member:focus-visible img {
    transform: scale(1.04);
}

.team-member__info {
    position: relative;
    width: 100%;
    background: rgba(10, 25, 47, 0.92);
    border-radius: var(--radius-md);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: var(--space-lg) var(--space-md);
    box-sizing: border-box;
    text-align: center;
    margin-top: var(--space-md);
    opacity: 1;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.team-member:hover .team-member__info {
    background: rgba(10, 25, 47, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.team-member:focus-visible .team-member__info {
    background: rgba(10, 25, 47, 1);
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.32);
}

.team-member__name {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.team-member__role {
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
    line-height: 1.4;
}

.team-member__exp {
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 0;
}

.team-member__social {
    width: 32px;
    height: 32px;
    background: #000000;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: background 0.3s ease;
}

.team-member__social:hover {
    background: var(--color-accent);
}

.team-member__social svg {
    width: 16px;
    height: 16px;
}

.team-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 26, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.team-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.team-modal-content {
    background: #ffffff;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 850px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: var(--space-3xl) var(--space-2xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 180, 216, 0.45) rgba(148, 163, 184, 0.12);
    scrollbar-gutter: stable;
}

.team-modal-overlay.active .team-modal-content {
    transform: translateY(0) scale(1);
}

.team-modal-body {
    width: 100%;
    max-width: 720px;
}

.team-modal-info {
    width: 100%;
}

.team-modal-content::-webkit-scrollbar {
    width: 12px;
}

.team-modal-content::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(241, 245, 249, 0.9), rgba(226, 232, 240, 0.9));
    border-left: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 999px;
    margin: 14px 8px 14px 0;
}

.team-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.55), rgba(2, 132, 199, 0.75));
    border: 3px solid transparent;
    background-clip: padding-box;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.team-modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.75), rgba(3, 105, 161, 0.85));
    background-clip: padding-box;
}

.team-modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: rgba(0, 0, 0, 0.05);
    border: none;
    color: #333;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-size: 1.5rem;
    line-height: 1;
}

.team-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
}

.team-modal-close:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    background: rgba(0, 180, 216, 0.1);
}

.team-modal-image {
    width: 240px;
    height: 280px;
    margin: 0 auto var(--space-xl);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: flex-end;
}

.team-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

.team-modal-name {
    font-family: var(--font-heading);
    color: #111827;
    font-size: var(--fs-2xl);
    font-weight: 700;
    margin-bottom: var(--space-xs);
    line-height: 1.2;
}

.team-modal-role {
    color: var(--color-accent-dark);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-md);
}

.team-modal-divider {
    width: 40px;
    height: 3px;
    background: var(--color-accent);
    margin: 0 auto var(--space-md);
    border-radius: 2px;
}

.team-modal-exp {
    color: #475569;
    font-size: var(--fs-md);
    font-weight: 500;
}

.team-modal-bio-section {
    margin-top: var(--space-xl);
    text-align: left;
    border-top: 1px solid #e2e8f0;
    padding-top: var(--space-lg);
}

.team-modal-bio-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--space-md);
}

.team-modal-bio-accent {
    width: 4px;
    height: 24px;
    background: var(--gradient-accent);
    border-radius: 2px;
    flex-shrink: 0;
}

.team-modal-bio-header h4 {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: 700;
    color: #111827;
    margin: 0;
    letter-spacing: 0.3px;
}

.team-modal-bio {
    font-size: 0.93rem;
    line-height: 1.75;
    color: #4b5563;
}

.team-modal-bio p {
    margin: 0 0 var(--space-md) 0;
}

.team-modal-bio p:last-child {
    margin-bottom: 0;
}

.team-modal-bio-lead {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
}

@media (max-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 760px;
    }
}

@media (max-width: 768px) {
    .team-section__intro {
        padding: var(--space-lg) var(--container-padding);
        margin-bottom: var(--space-3xl);
    }

    .team-modal-overlay {
        padding: var(--space-md);
    }

    .team-modal-content {
        max-height: calc(100svh - (var(--space-md) * 2));
        padding: var(--space-2xl) var(--space-lg);
    }

    .team-modal-image {
        width: 200px;
        height: 240px;
        margin-bottom: var(--space-lg);
    }

    .team-modal-name {
        font-size: clamp(1.85rem, 6vw, 2.2rem);
    }

    .team-modal-exp {
        font-size: var(--fs-base);
    }
}

@media (max-width: 640px) {
    .team-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
    }
}

@media (max-width: 480px) {
    .team-section {
        padding: var(--space-3xl) 0;
    }

    .team-member__bg {
        width: 220px;
        height: 220px;
    }

    .team-member img {
        width: 205px;
        height: 205px;
    }

    .team-member__info {
        padding: var(--space-lg) var(--space-sm);
    }

    .team-modal-overlay {
        padding: 12px;
    }

    .team-modal-content {
        max-height: calc(100svh - 24px);
        padding: var(--space-xl) var(--space-md);
        border-radius: var(--radius-lg);
    }

    .team-modal-close {
        top: 12px;
        right: 12px;
        width: 34px;
        height: 34px;
    }

    .team-modal-image {
        width: 170px;
        height: 210px;
    }

    .team-modal-role {
        font-size: 0.76rem;
        line-height: 1.5;
    }

    .team-modal-bio-section {
        margin-top: var(--space-lg);
        padding-top: var(--space-md);
    }

    .team-modal-bio {
        font-size: 0.9rem;
        line-height: 1.7;
    }
}
