/* CSS Variables & Global Reset */
:root {
    --bg-color: #05050a;
    --text-color: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --primary-color: #6366f1;
    --secondary-color: #ec4899;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    --card-hover-bg: rgba(255, 255, 255, 0.08);
    --transition-speed: 0.3s;
    --border-radius: 16px;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.15), transparent 25%);
    z-index: -1;
    pointer-events: none;
}

/* Typography elements */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: color var(--transition-speed) ease;
}

.highlight-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    background: rgba(5, 5, 10, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: all var(--transition-speed) ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.8;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6rem 2rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    z-index: 10;
    animation: fadeInUp 1s ease forwards;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-speed) ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(236, 72, 153, 0.6);
}

/* Teams Section */
.teams-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    backdrop-filter: blur(5px);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

/* Grid Layout */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* Team Card */
.team-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all var(--transition-speed) ease;
    cursor: pointer;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
}

.team-card:hover {
    transform: translateY(-10px);
    background: var(--card-hover-bg);
    box-shadow: var(--glass-shadow);
    border-color: rgba(99, 102, 241, 0.5);
}

/* Card image setup */
.card-header {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.card-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-card:hover .card-banner {
    transform: scale(1.05);
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, var(--bg-color), transparent);
}

.card-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--bg-color);
    position: absolute;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    object-fit: cover;
    z-index: 5;
    background: #111;
}

.card-body {
    padding: 4rem 1.5rem 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.card-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.view-team-btn {
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.team-card:hover .view-team-btn {
    gap: 1rem;
}

/* Team Page Custom Styles (Reusing variables) */
.team-hero {
    margin-top: 70px;
    position: relative;
    height: 50vh;
    min-height: 350px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.team-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.team-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, var(--bg-color) 90%);
    z-index: -1;
}

.team-profile-container {
    max-width: 1200px;
    width: 100%;
    padding: 0 2rem;
    transform: translateY(30%);
    display: flex;
    align-items: flex-end;
    gap: 2rem;
    position: relative;
    z-index: 5;
}

.team-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid var(--bg-color);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    object-fit: cover;
    background: #111;
}

.team-hero-info {
    padding-bottom: 0.5rem;
}

.team-hero-info h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0.25rem;
}

.team-badge {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.team-content-wrapper {
    max-width: 1200px;
    margin: 8rem auto 4rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.team-main-col {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.team-sidebar {
    position: sticky;
    top: 100px;
    height: max-content;
}

.detail-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    backdrop-filter: blur(10px);
}

.detail-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.detail-section h3 i {
    color: var(--primary-color);
}

.info-list {
    list-style: none;
}

.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-list li:last-child {
    margin-bottom: 0;
}

.info-list i {
    color: var(--secondary-color);
    font-size: 1.25rem;
    margin-top: 0.25rem;
}

.info-content strong {
    display: block;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.info-content span,
.info-content a {
    color: var(--text-muted);
}

.info-content a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border: 1px solid var(--glass-border);
    transition: all var(--transition-speed) ease;
}

.social-links a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(99, 102, 241, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Footer (Shared) */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0;
    background: rgba(0, 0, 0, 0.5);
    margin-top: 5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-socials {
    display: flex;
    gap: 1rem;
}

.footer-socials a {
    color: var(--text-muted);
    font-size: 1.25rem;
}

.footer-socials a:hover {
    color: var(--primary-color);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .team-content-wrapper {
        grid-template-columns: 1fr;
    }

    .team-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* simple mobile handling */
    }

    .team-profile-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        transform: translateY(50%);
        padding: 0 1rem;
    }

    .team-content-wrapper {
        margin-top: 15rem;
        padding: 0 1rem;
    }

    .detail-section {
        padding: 1.5rem;
    }

    .team-hero-info h1 {
        font-size: 1.8rem;
    }
}

/* Image Lightbox Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    /* Kept flex, but overwritten by JS to block/none, so JS handles display */
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.image-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.image-modal.show .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}