.team-page {
    --team-bg: #080510;
    --team-surface: rgba(25, 15, 43, 0.84);
    --team-border: rgba(212, 190, 255, 0.14);
    --team-text: #f8f5ff;
    --team-muted: #bdb4ce;
    --team-purple: #a980f8;
    --team-pink: #ff4f91;
}

.team-main {
    position: relative;
    z-index: 1;
    overflow: hidden;
    color: var(--team-text);
}

.team-shell {
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto;
}

.team-hero {
    position: relative;
    padding: clamp(90px, 11vw, 140px) 0 clamp(70px, 8vw, 105px);
    text-align: center;
}

.team-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.19;
    background-image: radial-gradient(rgba(226, 213, 255, 0.8) 0.7px, transparent 0.8px);
    background-size: 44px 44px;
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 94%);
    mask-image: linear-gradient(to bottom, #000, transparent 94%);
    pointer-events: none;
}

.team-hero-glow {
    position: absolute;
    top: -180px;
    left: 50%;
    width: 700px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(169, 128, 248, 0.16), rgba(255, 79, 145, 0.055) 48%, transparent 72%);
    filter: blur(65px);
    transform: translateX(-50%);
    pointer-events: none;
}

.team-hero-content {
    position: relative;
    z-index: 1;
}

.team-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--team-purple);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.team-kicker > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--team-pink);
    box-shadow: 0 0 12px var(--team-pink);
}

.team-hero h1 {
    margin: 18px 0 20px;
    color: var(--team-text);
    font-size: clamp(2.8rem, 7vw, 5rem);
    letter-spacing: -0.055em;
    line-height: 1;
}

.team-hero p {
    max-width: 670px;
    margin: 0 auto;
    color: var(--team-muted);
    font-size: clamp(1rem, 2vw, 1.14rem);
    line-height: 1.75;
}

.team-groups {
    display: grid;
    gap: 88px;
    padding-bottom: 120px;
}

.team-group {
    position: relative;
}

.team-group-heading {
    display: grid;
    grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1fr);
    align-items: end;
    gap: 40px;
    margin-bottom: 30px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(212, 190, 255, 0.1);
}

.team-group-heading > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-group-line {
    width: 28px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--team-purple), var(--team-pink));
    box-shadow: 0 0 12px rgba(169, 128, 248, 0.4);
}

.team-group-heading h2 {
    margin: 0;
    color: var(--team-text);
    font-size: clamp(1.65rem, 3vw, 2.2rem);
    letter-spacing: -0.035em;
}

.team-group-heading p {
    justify-self: end;
    max-width: 560px;
    margin: 0;
    color: var(--team-muted);
    font-size: 0.91rem;
    line-height: 1.65;
    text-align: right;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.team-grid-featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.team-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 400px;
    padding: 25px;
    border: 1px solid var(--team-border);
    border-radius: 20px;
    background: linear-gradient(150deg, rgba(31, 18, 51, 0.9), rgba(14, 9, 25, 0.95));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 22px 48px rgba(0, 0, 0, 0.2);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.team-card::before {
    content: '';
    position: absolute;
    top: -85px;
    left: -80px;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    background: rgba(169, 128, 248, 0.1);
    filter: blur(58px);
    pointer-events: none;
}

.team-card:hover {
    transform: translateY(-6px);
    border-color: rgba(185, 148, 255, 0.32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 28px 58px rgba(0, 0, 0, 0.3);
}

.team-card-featured {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 27px;
    min-height: 300px;
    padding: 30px;
}

.team-avatar-wrap {
    position: relative;
    z-index: 1;
    display: grid;
    width: 112px;
    height: 112px;
    margin-bottom: 24px;
    place-items: center;
    overflow: hidden;
    border: 2px solid rgba(169, 128, 248, 0.42);
    border-radius: 24px;
    background: rgba(169, 128, 248, 0.08);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25), 0 0 25px rgba(169, 128, 248, 0.1);
}

.team-card-featured .team-avatar-wrap {
    width: 150px;
    height: 150px;
    margin: 0;
    border-radius: 30px;
}

.team-avatar {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-avatar-empty svg {
    width: 44%;
    height: 44%;
    fill: rgba(211, 191, 248, 0.45);
}

.team-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
}

.team-card h3 {
    margin: 0 0 3px;
    color: var(--team-text);
    font-size: 1.45rem;
    letter-spacing: -0.03em;
}

.team-username {
    color: #958ca4;
    font-size: 0.8rem;
}

.team-placeholder-text {
    opacity: 0.7;
}

.team-card-content > p {
    margin: 18px 0 25px;
    color: var(--team-muted);
    font-size: 0.88rem;
    line-height: 1.68;
}

.team-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    width: 100%;
    margin: -7px 0 24px;
}

.team-role-tag {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 4px 10px;
    border: 1px solid rgba(169, 128, 248, 0.22);
    border-radius: 999px;
    color: #d4c0ff;
    background: rgba(169, 128, 248, 0.08);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.025em;
}

.team-recruitment {
    padding: 0 0 110px;
}

.team-recruitment-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
    padding: 42px;
    border: 1px solid var(--team-border);
    border-radius: 22px;
    background: linear-gradient(110deg, rgba(169, 128, 248, 0.09), transparent 45%), var(--team-surface);
}

.team-recruitment h2 {
    margin: 10px 0 8px;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.team-recruitment p {
    margin: 0;
    color: var(--team-muted);
}

.team-recruitment-button {
    display: inline-flex;
    min-height: 50px;
    padding: 0 22px;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, #7c4ddd, #ff4f91);
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
}

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

    .team-card-featured {
        display: flex;
        min-height: 400px;
        padding: 25px;
    }

    .team-card-featured .team-avatar-wrap {
        width: 112px;
        height: 112px;
        margin-bottom: 24px;
        border-radius: 24px;
    }
}

@media (max-width: 680px) {
    .team-shell {
        width: min(100% - 30px, 1120px);
    }

    .team-hero {
        padding-top: 80px;
    }

    .team-groups {
        gap: 68px;
        padding-bottom: 86px;
    }

    .team-group-heading {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .team-group-heading p {
        justify-self: start;
        text-align: left;
    }

    .team-grid,
    .team-grid-featured {
        grid-template-columns: 1fr;
    }

    .team-card,
    .team-card-featured {
        min-height: 0;
    }

    .team-recruitment-card {
        align-items: flex-start;
        flex-direction: column;
        padding: 30px;
    }

    .team-recruitment-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .team-page *,
    .team-page *::before,
    .team-page *::after {
        transition-duration: 0.01ms !important;
    }
}
