.team-page-wrapper {
    min-height: 100vh;
    font-family: var(--font-body);
    position: relative;
    overflow: hidden;
}

.team-page-header {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 64px 24px 48px;
    overflow: hidden;
}

.team-page-header::after {
    content: 'TEAM';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: clamp(80px, 18vw, 220px);
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px rgba(249, 27, 51, 0.06);
    letter-spacing: -0.04em;
    pointer-events: none;
    white-space: nowrap;
    z-index: 0;
    user-select: none;
}

.team-page-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 12px;
    color: #fff;
    position: relative;
    z-index: 1;
}

.team-page-header h2 span {
    color: var(--red);
}

.team-page-header p {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0;
    position: relative;
    z-index: 1;
}

.team-filter-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 24px 40px;
    position: relative;
    z-index: 1;
}

.filter-btn {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 8px 20px;
    border-radius: 100px;
    border: 1px solid var(--card-border);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: all 220ms ease;
}

.filter-btn:hover {
    border-color: rgba(249, 27, 51, 0.4);
    color: #fff;
    background: var(--red-dim);
}

.filter-btn.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    box-shadow: 0 0 20px var(--red-glow);
}

.team-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto !important;
    padding: 0 24px !important;
    position: relative;
    z-index: 1;
    width: auto !important;

    flex-wrap: unset;
    justify-content: unset;
    align-items: unset;
    box-sizing: border-box;
}

.team-grid.team-blur-bg {
    position: relative;
}

.team-grid.team-blur-bg::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: var(--org-thumb);
    background-size: cover;
    background-position: center;
    filter: blur(40px) brightness(0.4) saturate(80%);
    opacity: 0.18;
    z-index: 0;
    pointer-events: none;
}

.team-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 20px;
    outline: none;

    flex: unset !important;
    max-width: unset !important;
    box-shadow: none !important;
    background-color: transparent !important;
    overflow: visible !important;

    opacity: 0;
    transform: translateY(28px);
    transition: none;
}

.team-card-link.card-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 550ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 550ms cubic-bezier(0.22, 1, 0.36, 1);
}

.team-card-link.hidden-unit {
    display: none !important;
}

.team-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 300ms ease,
        border-color 300ms ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.team-card-link:hover .team-card {
    transform: translateY(-8px) scale(1.012);
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(249, 27, 51, 0.2),
        0 0 50px rgba(249, 27, 51, 0.07);
    border-color: rgba(249, 27, 51, 0.22);
}

.team-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%),
            rgba(249, 27, 51, 0.07) 0%,
            transparent 60%);
    opacity: 0;
    transition: opacity 300ms ease;
    pointer-events: none;
    z-index: 4;
}

.team-card-link:hover .team-card::after {
    opacity: 1;
}

.team-thumb-small {
    height: 130px !important;
    background-position: center;
    background-size: cover;
    position: relative;
    filter: none !important;
    border-radius: 0 !important;
}

.team-thumb-small::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.05) 0%,
            rgba(12, 12, 14, 0.65) 80%,
            var(--card-bg) 100%);
}

.team-profile-pic {
    width: 76px !important;
    height: 76px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--red);
    position: absolute;
    top: 92px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #0c0c0e;
    z-index: 3;
    box-shadow: 0 0 0 4px rgba(12, 12, 14, 0.95),
        0 0 22px var(--red-glow);
    transition: box-shadow 280ms ease, transform 280ms ease;
}

.team-card-link:hover .team-profile-pic {
    box-shadow: 0 0 0 4px rgba(12, 12, 14, 0.95),
        0 0 36px rgba(249, 27, 51, 0.55);
    transform: translateX(-50%) scale(1.06);
}

.team-card-info {
    padding: 52px 20px 24px !important;
    text-align: center;
    background: transparent !important;
    position: relative;
    z-index: 1;
}

.team-card-info h3:first-of-type {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--red);
    letter-spacing: 1px;
    margin: 5px 0 3px;
    opacity: 0.85;
}

.team-card-info h3+h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    margin: 0 0 10px;
}

.team-position {
    font-size: 0.82rem !important;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5) !important;
    margin: 0 0 6px !important;
}

.team-org-unit {
    display: inline-block;
    font-size: 0.7rem !important;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--red) !important;
    background: var(--red-dim);
    border: 1px solid rgba(249, 27, 51, 0.2);
    border-radius: 100px;
    padding: 3px 12px;
    margin: 4px 0 0 !important;
    font-style: normal !important;
}

.team-card-info>p:empty,
.team-card-info small {
    display: none !important;
}

.team-count-badge {
    text-align: center;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 0 36px;
    position: relative;
    z-index: 1;
    margin-top: 12px;
}

.team-count-badge span {
    color: var(--red);
}

.user-profile {
    max-width: 720px;
    margin: 40px auto 0px !important;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    font-family: var(--font-body);
    text-align: left !important;
    background-color: transparent !important;
    border-radius: unset !important;
    box-shadow: none !important;
    animation: profileEnter 650ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes profileEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.team-thumb {
    height: 280px !important;
    background-position: center;
    background-size: cover;
    border-radius: 22px 22px 0 0 !important;
    position: relative;
    overflow: hidden;
    filter: none !important;
}

.team-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(150deg,
            rgba(249, 27, 51, 0.1) 0%,
            rgba(0, 0, 0, 0.25) 50%,
            rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
}

.team-thumb::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, #0a0a0c);
    z-index: 2;
}

.profile-card-body {
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-top: none;
    border-radius: 0 0 22px 22px;
    padding: 0 40px 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
}

.profile-card-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 40px;
    right: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(249, 27, 51, 0.45), transparent);
}

.user-profile-pic-large {
    width: 116px !important;
    height: 116px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--red);
    position: absolute;
    top: 224px;
    left: 43px;
    transform: none !important;
    background-color: #0c0c0e;
    z-index: 10;
    box-shadow: 0 0 0 5px #0a0a0c,
        0 0 40px var(--red-glow),
        0 8px 32px rgba(0, 0, 0, 0.6);
    transition: box-shadow 300ms ease;
}

.user-profile-pic-large:hover {
    box-shadow: 0 0 0 5px #0a0a0c,
        0 0 60px rgba(249, 27, 51, 0.55),
        0 8px 32px rgba(0, 0, 0, 0.6);
}

.name-holder {
    padding-top: 68px;
    margin: 0 0 16px !important;
    text-align: left;
}

.name-holder h1:first-child {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 700;
    color: var(--red);
    letter-spacing: 2px;
    margin: 0 0 6px;
    opacity: 0.85;
}

.name-holder h1:last-child {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4.5vw, 2.6rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    margin: 0;
    line-height: 1.1;
}

.user-position {
    font-family: var(--font-body);
    font-size: 0.9rem !important;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5) !important;
    margin: 12px 0 6px !important;
    letter-spacing: 0.01em;
    font-style: normal !important;
}

.user-org-unit {
    display: inline-block;
    font-size: 0.72rem !important;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--red) !important;
    background: var(--red-dim);
    border: 1px solid rgba(249, 27, 51, 0.22);
    border-radius: 100px;
    padding: 4px 14px;
    margin: 0 0 24px !important;
    font-style: normal !important;
}

.inline-links {
    display: flex !important;
    justify-content: flex-start !important;
    height: auto !important;
    list-style: none !important;
    padding: 0 !important;
    gap: 8px !important;
    margin: 0 0 28px !important;
}

.inline-links li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    transition: background 220ms ease, border-color 220ms ease, transform 220ms ease;
    text-decoration: none;
}

.inline-links li a i {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.55);
    transition: color 220ms ease;
}

.inline-links li a:hover {
    background: var(--red-dim);
    border-color: rgba(249, 27, 51, 0.4);
    transform: translateY(-2px);
}

.inline-links li a:hover i {
    color: var(--red);
}

.user-description {
    font-size: 0.96rem !important;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.65) !important;
    background: rgba(255, 255, 255, 0.025) !important;
    border: 1px solid var(--card-border);
    border-left: 3px solid var(--red) !important;
    border-radius: 0 12px 12px 0 !important;
    padding: 18px 22px !important;
    margin-bottom: 28px !important;
    text-align: left;
    font-weight: 300;
}

.link-cards {
    display: flex !important;
    flex-direction: column;
    list-style: none !important;
    padding: 0 !important;
    gap: 8px !important;
    margin: 0 0 32px !important;
}

.link-cards li {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--card-border);
    border-radius: 12px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    transition: border-color 220ms ease, background 220ms ease, transform 220ms ease;
}

.link-cards li:hover {
    border-color: rgba(249, 27, 51, 0.28);
    background: var(--red-dim) !important;
    transform: translateX(4px);
}

.link-cards li a {
    display: flex !important;
    align-items: center !important;
    text-decoration: none;
    padding: 0 !important;
    justify-content: flex-start !important;
}

.link-cards li a i {
    font-size: 1.1rem !important;
    padding: 16px 20px !important;
    background: rgba(249, 27, 51, 0.07);
    border-right: 1px solid var(--card-border);
    color: var(--red) !important;
    width: 20px !important;
    border-radius: 0 !important;
    flex-shrink: 0;
    transition: background 220ms ease;
}

.link-cards li:hover a i {
    background: rgba(249, 27, 51, 0.15);
}

.link-cards li a p {
    font-family: var(--font-body);
    font-size: 0.9rem !important;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7) !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 18px !important;
    letter-spacing: 0.01em;
}

.link-cards li:hover a p {
    color: #fff !important;
}

.back-link {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    color: var(--muted) !important;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-decoration: none !important;
    padding: 9px 20px;
    border: 1px solid var(--card-border);
    border-radius: 100px;
    transition: color 220ms ease, border-color 220ms ease, background 220ms ease;
    margin-top: 4px;
}

.back-link:hover {
    color: #fff !important;
    border-color: rgba(249, 27, 51, 0.4);
    background: var(--red-dim);
}

@media (max-width: 640px) {
    .team-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        padding: 0 12px !important;
    }

    .team-thumb-small {
        height: 90px !important;
    }

    .team-profile-pic {
        width: 60px !important;
        height: 60px !important;
        top: 68px !important;
    }

    .team-card-info {
        padding: 40px 12px 16px !important;
    }

    .profile-card-body {
        padding: 0 20px 28px !important;
    }

    .user-profile-pic-large {
        width: 90px !important;
        height: 90px !important;
        top: 160px !important;
        left: 27px !important;
    }

    .team-thumb {
        height: 210px !important;
        border-radius: 16px 16px 0 0 !important;
    }

    .name-holder {
        padding-top: 56px !important;
    }
}

@media (max-width: 450px) {
    .team-grid {
        grid-template-columns: 1fr !important;
    }
}