:root {
    --bg-color: #0d0e15;
    --text-primary: #ffffff;
    --text-secondary: #a0a5b5;
    --glow-color: rgba(147, 51, 234, 0.5);
    /* Purple glow */
    --accent-primary: #9333ea;
    --accent-secondary: #ec4899;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Background Animations */
.blob {
    position: fixed;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    top: 10%;
    left: 10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    animation-delay: 0s;
}

.blob-2 {
    bottom: 0%;
    right: 5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
    animation-delay: -5s;
}

.blob-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    /* Blue */
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(50px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-30px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

.container {
    padding: 4rem 2rem;
    max-width: 1200px;
    width: 100%;
    margin: auto;
    z-index: 10;
}

.hero {
    text-align: center;
    margin-bottom: 4rem;
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.hero .subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Cards Grid */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    justify-items: center;
}

.card-wrapper {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    max-width: 420px;
    perspective: 1000px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    /* 3D preserve */
    transform-style: preserve-3d;
}

/* Glassmorphism subtle inner reflection */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

/* The hover glow element controlled by JS */
.card-glow {
    position: absolute;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle closest-side, rgba(255, 255, 255, 0.15), transparent);
    border-radius: 50%;
    pointer-events: none;
    top: var(--y, 50%);
    left: var(--x, 50%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.card:hover .card-glow {
    opacity: 1;
}

.card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(147, 51, 234, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-content {
    position: relative;
    z-index: 2;
    transform: translateZ(40px);
    /* PUSH CONTENT FORWARD IN 3D SPACE */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 3rem;
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.card:hover .icon-wrapper {
    transform: scale(1.1) translateY(-10px) rotate(5deg);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(147, 51, 234, 0.4));
    color: #d8b4fe;
}

.specialized-icon {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(244, 63, 94, 0.2));
    color: #fb7185;
    border-color: rgba(251, 113, 133, 0.3);
}

.card:hover .specialized-icon {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.4), rgba(244, 63, 94, 0.4));
    color: #fda4af;
}

.card h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

.btn-group {
    display: flex;
    gap: 1rem;
    transform: translateZ(20px);
}

.view-btn,
.download-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
    outline: none;
    text-decoration: none;
}

.view-btn {
    background: var(--text-primary);
    color: var(--bg-color);
    flex-grow: 1;
    justify-content: center;
}

.view-btn:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.download-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.8rem;
}

.download-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Modal Styles */
.cv-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cv-modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 90%;
    max-width: 1000px;
    height: 90vh;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    position: relative;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    background: var(--accent-secondary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(236, 72, 153, 0.4);
    transition: transform 0.3s ease, background 0.3s ease;
    z-index: 1001;
}

.close-btn:hover {
    transform: scale(1.1) rotate(90deg);
    background: #be185d;
}

#cvIframe {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    background: #fff;
    border: none;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 3rem 1.5rem;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 8vw, 3.5rem);
    }

    .cards-container {
        gap: 2rem;
    }

    .card {
        padding: 2.5rem 1.5rem;
    }

    .modal-content {
        width: 95%;
        height: 80vh;
        padding: 0.25rem;
    }

    .close-btn {
        top: -10px;
        right: -10px;
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 2rem 1rem;
    }

    .hero {
        margin-bottom: 2rem;
    }

    .hero h1 {
        font-size: clamp(2rem, 10vw, 2.5rem);
    }

    .card {
        padding: 2rem 1.2rem;
    }

    .icon-wrapper {
        width: 60px;
        height: 60px;
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }

    .card h2 {
        font-size: 1.5rem;
    }

    .btn-group {
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
        width: 100%;
        gap: 0.8rem;
    }

    .view-btn,
    .download-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}