/* === The Holographic Twin-Deck Modal === */
.cv-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 20, 0.85);
    backdrop-filter: blur(15px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cv-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cv-container {
    display: flex;
    gap: 40px;
    perspective: 1500px;
    /* Deep 3D perspective */
    transform-style: preserve-3d;
    max-width: 90vw;
}

.cv-card-wrapper {
    position: relative;
    width: 400px;
    /* Adjust based on aspect ratio */
    aspect-ratio: 1 / 1.414;
    /* A4 Ratio */
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.1s ease-out;
    /* Smooth tilt follow */
    animation: cardFloat 6s ease-in-out infinite;
}

.cv-card-wrapper:nth-child(2) {
    animation-delay: -3s;
    /* Desync float animation */
}

@keyframes cardFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Glass & Neon Border */
.cv-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.3);
    /* Cyan border */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(6, 182, 212, 0.1) inset;
    transform-style: preserve-3d;
}

.cv-card-wrapper.en .cv-card-inner {
    border-color: rgba(168, 85, 247, 0.4);
    /* Purple for English */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(168, 85, 247, 0.1);
}

.cv-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.cv-card-wrapper:hover .cv-image {
    opacity: 1;
}

/* Holographic Shine */
.holo-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg,
            transparent 20%,
            rgba(255, 255, 255, 0.1) 25%,
            rgba(6, 182, 212, 0.2) 30%,
            transparent 35%);
    z-index: 10;
    pointer-events: none;
    mix-blend-mode: overlay;
    background-size: 200% 100%;
    animation: holoSwipe 4s infinite linear;
}

@keyframes holoSwipe {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Scanner Line */
.scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #22d3ee;
    box-shadow: 0 0 10px #22d3ee, 0 0 20px #22d3ee;
    z-index: 11;
    animation: scanMove 3s ease-in-out infinite;
    opacity: 0.5;
}

.cv-card-wrapper.en .scanner-line {
    background: #a855f7;
    box-shadow: 0 0 10px #a855f7, 0 0 20px #a855f7;
    animation-delay: 1.5s;
}

@keyframes scanMove {
    0% {
        top: 0%;
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Info Badge */
.cv-badge {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateZ(40px);
    padding: 8px 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    z-index: 20;
    white-space: nowrap;
}

.cv-close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 1001;
}

.cv-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    transform: rotate(90deg);
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .cv-container {
        flex-direction: column;
        gap: 20px;
        max-height: 80vh;
        overflow-y: auto;
        padding: 40px 0;
    }

    .cv-card-wrapper {
        width: 280px;
    }
}