:root {
    /* Color Palette - Cyberpunk Theme */
    --primary-blue: #1548ff;
    --dark-blue: #4e2bb3;
    --light-blue: #1548ff;
    --brand-blue: #1548ff;
    --neon-blue: #3b78ff;
    --cyberpunk-black: #0a0a14;
    --dark-cyberpunk: #060610;
    --cyber-grid: #1a1a2e;
    --primary-black: #0a0a14;
    --secondary-black: #1a1a2e;
    --light-gray: #2a2a3c;
    --medium-gray: #404058;
    --cyber-text: #e0e0ffcc;
    --white: #ffffff;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    --font-secondary: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
    text-align: center;
    display: flex;
    flex-direction: column;
    /* align-items: center; */ /* Removed to allow sections to be full-width */
    min-height: 100vh;
    background-color: var(--cyberpunk-black);
    background-image: 
        linear-gradient(to right, rgba(26, 26, 46, 0.3) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(26, 26, 46, 0.3) 1px, transparent 1px);
    background-size: 50px 50px;
    color: var(--cyber-text);
    padding-top: 100px; /* Increased padding for fixed navbar */
}

a, a:visited, a:active {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color var(--transition-normal);
}

a:hover {
    color: var(--brand-blue);
}

.header {
    margin: 2rem auto;
    color: var(--brand-blue);
    background-color: rgba(10, 10, 20, 0.8);
    border: 3px solid var(--brand-blue);
    border-radius: 16px;
    padding: 2rem;
    width: 600px;
    max-width: 95vw;
    z-index: 2;
    box-shadow: 0 0 30px rgba(21, 72, 255, 0.5);
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(21, 72, 255, 0.1), transparent);
    z-index: -1;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-secondary);
    text-shadow: 0 0 15px rgba(21, 72, 255, 0.8);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: var(--brand-blue);
    text-shadow: 0 0 10px rgba(21, 72, 255, 0.6);
}

.team__photo, .team__name, .team__title, .team__experience {
    display: block;
}

.carousel {
    display: flex;
    align-items: center;
    position: relative;
    padding: 30px 50px;
    justify-content: center;
    margin-bottom: var(--spacing-lg); /* Add margin to create space before footer */
}

.carousel__scene {
    position: relative;
    width: 750px;
    height: 650px;
    max-width: calc(95vw - 120px);
    padding-top: 150px;
    perspective: 150px;
}

.carousel__controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: absolute;
    width: calc(100% - 50px);
    left: 25px;
    top: calc(150px + 400px + 25px);
    pointer-events: none;
    z-index: 10;
}

.carousel__list {
    width: 100%;
    height: 440px;
    margin: 0;
    padding: 0;
    position: absolute;
    transform: translateZ(-400px);
    transform-style: preserve-3d;
    transition: transform 1s ease;
    list-style: none;
    counter-reset: list-counter;
}

.previous-button, .next-button {
    margin: 0;
    padding: 12px;
    width: 70px;
    height: 70px;
    font-family: monospace;
    font-weight: bold;
    font-size: 2.2rem;
    border: 3px solid var(--brand-blue);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: var(--white);
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 0 15px rgba(21, 72, 255, 0.5);
    pointer-events: auto;
}

.previous-button:hover, .next-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 25px rgba(21, 72, 255, 0.8);
    background: linear-gradient(135deg, var(--brand-blue), var(--primary-blue));
}

.previous-button:focus, .next-button:focus {
    outline: none;
    box-shadow: 0 0 20px rgba(21, 72, 255, 1);
}

.carousel__cell {
    position: absolute;
    width: 720px;
    height: 400px;
    max-width: calc(95vw - 20px);
    left: 10px;
    top: 10px;
    border: 2px solid rgba(21, 72, 255, 0.5);
    border-radius: 16px;
    font-size: 16px;
    font-weight: 500;
    color: var(--cyber-text);
    text-align: center;
    transition: transform 1s ease, opacity 1s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    counter-increment: list-counter;
    background: linear-gradient(135deg, 
        rgba(26, 26, 46, 0.8), 
        rgba(10, 10, 20, 0.9)
    );
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    gap: 1.5rem;
}

.carousel__cell::before {
    content: counter(list-counter);
    position: absolute;
    top: 8px;
    right: 12px;
    color: rgba(21, 72, 255, 0.6);
    text-shadow: 0 0 5px rgba(21, 72, 255, 0.8);
    width: 30px;
    height: 30px;
    line-height: 30px;
    font-size: 1rem;
    font-weight: bold;
    z-index: 10;
}

.carousel__cell::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(21, 72, 255, 0.1), 
        transparent
    );
    border-radius: 16px;
    z-index: -1;
}

.carousel__cell.selected {
    border-color: var(--brand-blue);
    border-width: 3px;
    box-shadow: 0 0 30px rgba(21, 72, 255, 0.8);
    background: linear-gradient(135deg, 
        rgba(21, 72, 255, 0.2), 
        rgba(26, 26, 46, 0.9)
    );
}

.carousel__cell.selected::before {
    color: var(--brand-blue);
    text-shadow: 0 0 10px rgba(21, 72, 255, 1);
}

.team__photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--brand-blue));
    border: 3px solid rgba(21, 72, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-normal);
}

.team__photo::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.team__photo::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, 
        rgba(21, 72, 255, 0.2), 
        transparent
    );
    z-index: 1;
}

.carousel__cell.selected .team__photo {
    border-color: var(--brand-blue);
    box-shadow: 0 8px 25px rgba(21, 72, 255, 0.5);
}

.team__info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 500px;
    z-index: 3;
}

.team__name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 0 10px rgba(21, 72, 255, 0.8);
}

.team__title {
    font-size: 1.1rem;
    color: var(--light-blue);
    text-shadow: 0 0 5px rgba(21, 72, 255, 0.6);
}

.team__experience {
    font-size: 0.9rem;
    color: var(--cyber-text);
    opacity: 0.8;
    line-height: 1.4;
}

.carousel__cell.selected .team__name {
    color: var(--brand-blue);
    text-shadow: 0 0 5px rgba(21, 72, 255, 0.6);
}

.carousel__cell.selected .team__title {
    color: var(--brand-blue);
    text-shadow: 0 0 10px rgba(21, 72, 255, 0.8);
}

.carousel__cell.selected .team__experience {
    opacity: 1;
}

.carousel__cell:nth-child(1) { transform: rotateX(  0deg) translateZ(400px); }
.carousel__cell:nth-child(2) { transform: rotateX( 72deg) translateZ(400px); }
.carousel__cell:nth-child(3) { transform: rotateX(144deg) translateZ(400px); }
.carousel__cell:nth-child(4) { transform: rotateX(216deg) translateZ(400px); }
.carousel__cell:nth-child(5) { transform: rotateX(288deg) translateZ(400px); }

@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .carousel {
        padding: 20px 20px;
        margin-bottom: 1rem;
    }
    
    .carousel__scene {
        width: 100%;
        max-width: 90vw;
        height: 500px;
        padding-top: 0;
        perspective: 1000px;
        margin: 0 auto;
    }
    
    .carousel__controls {
        width: 100%;
        left: 0;
        top: 350px;
        justify-content: space-around;
    }
    
    .carousel__cell {
        width: 100%;
        height: 350px;
        max-width: 100%;
        left: 0;
        padding: 1.5rem;
    }
    
    .team__photo {
        width: 120px;
        height: 120px;
    }
    
    .team__photo::before {
        background-size: 120px;
    }
    
    .team__name {
        font-size: 1.3rem;
    }
    
    .team__title {
        font-size: 1rem;
    }
    
    .team__experience {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .carousel__cell {
        width: calc(95vw - 40px);
        height: 400px;
        padding: 1rem;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 1rem;
    }
    
    .team__info {
        gap: 0.3rem;
    }
    
    .team__photo {
        width: 120px;
        height: 120px;
    }
    
    .team__experience {
        font-size: 0.8rem;
        line-height: 1.4;
    }
}

.carousel__cell:nth-child(1) .team__photo {
    background-image: url('/static/images/avarga.jpeg');
    background-size: cover;
    background-position: center;
}

.carousel__cell:nth-child(1) .team__photo::before {
    display: none;
}

.carousel__cell:nth-child(2) .team__photo {
    background-image: url('/static/images/jstolk.jpeg');
    background-size: cover;
    background-position: center;
}

.carousel__cell:nth-child(2) .team__photo::before {
    display: none;
}

.carousel__cell:nth-child(3) .team__photo {
    background-image: url('/static/images/chouse.jpeg');
    background-size: cover;
    background-position: center;
}

.carousel__cell:nth-child(3) .team__photo::before {
    display: none;
}

.carousel__cell:nth-child(4) .team__photo {
    background-image: url('/static/images/kmeema.png');
    background-size: cover;
    background-position: center;
}

.carousel__cell:nth-child(4) .team__photo::before {
    display: none;
}

.carousel__cell:nth-child(5) .team__photo {
    background-image: url('/static/images/lkuzma.jpeg');
    background-size: cover;
    background-position: center;
}

.carousel__cell:nth-child(5) .team__photo::before {
    display: none;
}

/* ===== TEAM CTA SECTION - BUILT FROM SCRATCH ===== */

/* Base CTA Section */
.team-cta-section {
    background-color: var(--dark-cyberpunk);
    padding: var(--spacing-xl) 0;
    position: relative;
    margin-top: var(--spacing-lg);
    border-top: 1px solid rgba(21, 72, 255, 0.3);
}

/* Background Effects */
.team-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, rgba(21, 72, 255, 0.1), transparent),
        linear-gradient(to right, rgba(26, 26, 46, 0.4) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(26, 26, 46, 0.4) 1px, transparent 1px);
    background-size: auto, 50px 50px, 50px 50px;
    z-index: 1;
}

.team-cta-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(21, 72, 255, 0.15), transparent 70%);
    z-index: 1;
}

/* Content Wrapper */
.team-cta-wrapper {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Typography */
.team-cta-heading {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--brand-blue);
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 0 20px rgba(21, 72, 255, 0.8);
    font-family: var(--font-secondary);
    letter-spacing: 1px;
    background: linear-gradient(90deg, var(--brand-blue), var(--primary-blue), var(--brand-blue));
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientText 3s linear infinite;
}

.team-cta-description {
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Button Container */
.team-cta-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
}

/* Animation */
@keyframes gradientText {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .team-cta-heading {
        font-size: 2rem;
    }
    
    .team-cta-description {
        font-size: 1rem;
    }
    
    .team-cta-actions {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
    }
    
    .team-cta-actions .btn-download {
        width: 100%;
        max-width: 300px;
    }
    
    .team-cta-section {
        padding: var(--spacing-lg) 0;
        margin-top: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .team-cta-heading {
        font-size: 1.8rem;
    }
    
    .team-cta-description {
        font-size: 0.95rem;
    }
    
    .team-cta-wrapper {
        padding: 0 var(--spacing-sm);
    }
}
