/**
 * Jesuspended Developer Testimonials
 * Silk Performance Testimonials Carousel Styles
 * 
 * Objective: 60FPS stable + 0 Network Latency
 */

/* Google Font - Outfit */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;800&display=swap');

/* 1. MASTER CONTAINER (LASER FRAME) */
.jesd-titan-wrapper {
    position: relative;
    width: 95%;
    max-width: 1400px;
    height: 200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    overflow: hidden;

    border-radius: 24px;
    background: radial-gradient(circle at center, #110514 0%, #000 100%);

    /* Lateral Mask (Optimized) */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);

    user-select: none;
    cursor: default;

    /* Static Laser Lines (Cheap to render) */
    border-top: 1px solid rgba(189, 0, 255, 0.3);
    border-bottom: 1px solid rgba(189, 0, 255, 0.3);
    border-left: none;
    border-right: none;

    box-shadow: inset 0 0 20px rgba(189, 0, 255, 0.05);

    /* Strict isolation */
    contain: strict;
    
    font-family: 'Outfit', sans-serif;
}

/* 2. TRACK (Graphics Engine) */
.jesd-titan-track {
    display: flex;
    align-items: center;
    gap: 0;
    width: max-content;

    /* Hardware Optimizations */
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.jesd-titan-group {
    display: flex;
    align-items: center;
    gap: 30px;
    padding-right: 30px;
    /* Force group to flatten for GPU */
    transform-style: preserve-3d;
}

/* 3. OPTIMIZED CARD (No heavy filters) */
.jesd-titan-card {
    position: relative;
    width: 360px;
    height: 140px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 18px;

    /* Solid base background (Fast) */
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.05);

    /* Pre-calculated static shadow */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

    /* Layer isolation for each card */
    transform: translateZ(0);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
}

/* 3.1 THE RGB BORDER (Optimized Pseudo-element) */
.jesd-titan-card::before {
    content: '';
    position: absolute;
    inset: calc(var(--jesd-neon-border-width, 2px) * -1);
    border-radius: calc(20px + var(--jesd-neon-border-width, 2px));
    padding: var(--jesd-neon-border-width, 2px);
    background: linear-gradient(90deg, var(--jesd-neon-color-1, #bd00ff), var(--jesd-neon-color-2, #ffffff), var(--jesd-neon-color-1, #bd00ff));
    background-size: 200% 100%;

    /* Composite mask to show only border */
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;

    /* Flow animation */
    animation: jesd-border-flow var(--jesd-border-flow-speed, 4s) linear infinite;
    pointer-events: none;
}

/* 3.2 THE LIGHT PULSE (Opacity instead of filter) */
.jesd-titan-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    box-shadow: 0 0 var(--jesd-pulse-glow-size, 20px) var(--jesd-pulse-glow-color, rgba(189, 0, 255, 0.4));
    opacity: 0;
    /* Cheap animation (opacity only) */
    animation: jesd-pulse-opacity var(--jesd-pulse-speed, 2s) ease-in-out infinite alternate;
    pointer-events: none;
    z-index: -1;
}

@keyframes jesd-border-flow {
    0% {
        background-position: 0% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes jesd-pulse-opacity {
    0% {
        opacity: var(--jesd-pulse-opacity-min, 0.2);
    }
    100% {
        opacity: var(--jesd-pulse-opacity-max, 0.6);
    }
}

/* 4. SEPARATOR (Stars) */
.jesd-titan-separator {
    color: #bd00ff;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    /* Use transform instead of filter for pulse */
    animation: jesd-star-pulse var(--jesd-star-pulse-speed, 2s) ease-in-out infinite alternate;
}

.jesd-titan-separator svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

@keyframes jesd-star-pulse {
    0% {
        transform: scale(var(--jesd-separator-scale-min, 0.8));
        opacity: var(--jesd-separator-opacity-min, 0.6);
    }
    100% {
        transform: scale(var(--jesd-separator-scale-max, 1.1));
        opacity: 1;
    }
}

/* 5. AVATAR */
.jesd-titan-avatar {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* Transform to avoid repaints */
    transform: translateZ(0);

    filter: grayscale(10%) contrast(1.1);
    transition: filter 0.3s ease, border-color 0.3s ease;
}

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

/* 6. TEXTS */
.jesd-titan-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.jesd-titan-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.jesd-titan-role {
    font-size: 0.8rem;
    font-weight: 600;
    color: #bd00ff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.jesd-titan-quote {
    font-size: 0.85rem;
    color: #ccc;
    font-style: italic;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jesd-titan-quote strong {
    color: #fff;
    font-weight: 600;
}

/* --- INTERACTIONS --- */
.jesd-titan-card:hover {
    transform: scale(1.02) translateZ(0);
    z-index: 10;
    cursor: default;
    background: #151515;
    border-color: rgba(189, 0, 255, 0.5);
}

/* On hover, intensify brightness using after layer */
.jesd-titan-card:hover::after {
    opacity: 1;
    animation: none;
    box-shadow: 0 0 30px var(--jesd-pulse-glow-hover-color, rgba(189, 0, 255, 0.6));
}

.jesd-titan-card:hover .jesd-titan-avatar {
    filter: grayscale(0%) contrast(1.2);
    border-color: #fff;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .jesd-titan-wrapper {
        height: 170px;
    }

    .jesd-titan-card {
        width: 300px;
        height: 120px;
        padding: 12px;
        gap: 12px;
    }

    .jesd-titan-avatar {
        width: 65px;
        height: 65px;
    }

    .jesd-titan-name {
        font-size: 1rem;
    }

    .jesd-titan-quote {
        -webkit-line-clamp: 2;
        font-size: 0.8rem;
    }
}
