:root {
    --primary-blue: #0d6efd;
    --accent-cyan: #0dcaf0;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --card-bg: #ffffff;
}

* {
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

.page-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.page-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(13, 110, 253, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(13, 202, 240, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

#team h1 {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 3rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

#team hr {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Team Card Styling */
.team-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem 1.5rem 1.75rem;
    box-shadow: 0 4px 20px rgba(13, 110, 253, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-cyan));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(13, 110, 253, 0.18);
    border-color: rgba(13, 110, 253, 0.2);
}

.team-card:hover::before {
    transform: scaleX(1);
}

/* Profile Photo Styling */
.team-photo-wrapper {
    width: 128px;
    height: 128px;
    margin-bottom: 1.5rem;
    position: relative;
    transition: transform 0.4s ease;
}

.team-card:hover .team-photo-wrapper {
    transform: scale(1.08);
}

.team-photo-bg {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.15) 0%, rgba(13, 202, 240, 0.15) 100%);
    border-radius: 50%;
    transition: all 0.4s ease;
}

.team-card:hover .team-photo-bg {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.25) 0%, rgba(13, 202, 240, 0.25) 100%);
    box-shadow: 0 8px 24px rgba(13, 110, 253, 0.3);
}

.team-photo {
    position: relative;
    z-index: 1;
    width: 128px;
    height: 128px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Name and Title */
.team-name {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    text-align: center;
}

.team-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-blue);
    margin-bottom: 1.25rem;
    padding: 0.375rem 1rem;
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.08), rgba(13, 202, 240, 0.08));
    border-radius: 20px;
    display: inline-block;
    text-align: center;
}

/* Email Display */
.team-email {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(13, 110, 253, 0.1);
    width: 100%;
}

.team-email object {
    width: 140px !important;
    height: 30px !important;
}

.team-email object {
    display: block;
    margin: 0 auto;
    pointer-events: none;
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .team-card:active {
        transform: translateY(-6px);
        box-shadow: 0 10px 35px rgba(13, 110, 253, 0.16);
    }

    .team-card:active .team-photo-wrapper {
        transform: scale(1.05);
    }

    .team-card:active::before {
        transform: scaleX(1);
    }
}

/* Fade-in animation */
.team-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.team-card:nth-child(1) { animation-delay: 0.1s; }
.team-card:nth-child(2) { animation-delay: 0.2s; }
.team-card:nth-child(3) { animation-delay: 0.3s; }
.team-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
    from {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Responsive adjustments */
@media (max-width: 575px) {
    .page-section {
        padding: 3rem 0;
    }

    #team h1 {
        font-size: 2rem;
    }

    .team-card {
        padding: 1.5rem 1rem 1.25rem;
        border-radius: 16px;
    }

    .team-photo-wrapper {
        width: 96px;
        height: 96px;
        margin-bottom: 1rem;
    }

    .team-photo {
        width: 96px;
        height: 96px;
        border-width: 3px;
    }

    .team-name {
        font-size: 1.25rem;
        margin-bottom: 0.375rem;
    }

    .team-title {
        font-size: 0.75rem;
        padding: 0.3rem 0.75rem;
        margin-bottom: 1rem;
    }

    .team-email {
        padding-top: 0.75rem;
    }

}

@media (min-width: 576px) and (max-width: 767px) {
    .page-section {
        padding: 4rem 0;
    }

    #team h1 {
        font-size: 2.25rem;
    }

    .team-card {
        padding: 1.75rem 1.25rem 1.5rem;
    }

    .team-photo-wrapper {
        width: 110px;
        height: 110px;
        margin-bottom: 1.25rem;
    }

    .team-photo {
        width: 110px;
        height: 110px;
    }

    .team-name {
        font-size: 1.35rem;
    }

    .team-title {
        font-size: 0.8rem;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .team-card {
        padding: 2rem 1.25rem 1.75rem;
    }

    .team-photo-wrapper {
        width: 120px;
        height: 120px;
    }

    .team-photo {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 991px) {
    .team-card:hover {
        transform: translateY(-6px);
    }

    .team-card:hover .team-photo-wrapper {
        transform: scale(1.05);
    }
}
