@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

.skill-bar {
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 1.5s ease-in-out;
}

.card-3d {
    transform-style: preserve-3d;
    transition: all 0.5s ease;
}

.card-3d:hover {
    transform: rotateY(10deg) rotateX(5deg) translateY(-10px);
    box-shadow: 0 30px 50px rgba(0,0,0,0.2);
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.glow {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 10px rgba(59, 130, 246, 0.5); }
    to { box-shadow: 0 0 20px rgba(59, 130, 246, 0.8); }
}

#vanta-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.card-3d {
    transform-style: preserve-3d;
    transition: all 0.5s ease;
    perspective: 1000px; /* Helps restore depth context */
    will-change: transform;
    pointer-events: auto; /* ensure it's interactive */
}

.card-3d * {
    pointer-events: auto; /* allow child elements to be clickable */
    backface-visibility: hidden; /* prevent flipped render */
}

button[type="submit"] {
    position: relative;
    z-index: 1; /* Make sure it's above any potential hover layers */
    pointer-events: auto;
}


.card-3d {
    position: relative;
    z-index: 0;
}

form {
    position: relative;
    z-index: 10;
}

button[type="submit"] {
    position: relative;
    z-index: 20;
    pointer-events: auto;
}






/* Custom Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.modal-overlay.active .modal-container {
    transform: translateY(0) scale(1);
}

.modal-success {
    border-top: 4px solid #10b981;
}

.modal-error {
    border-top: 4px solid #ef4444;
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    transform: translateZ(50px);
}

.modal-success .modal-icon {
    color: #10b981;
}

.modal-error .modal-icon {
    color: #ef4444;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
    transform: translateZ(30px);
}

.modal-message {
    color: #94a3b8;
    margin-bottom: 2rem;
    transform: translateZ(20px);
}

.modal-button {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateZ(40px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.modal-button:hover {
    transform: translateZ(40px) translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Particle animation for success modal */
@keyframes float {
    0% {
transform: translateY(0px) rotate(0deg);
opacity: 1;
    }
    100% {
transform: translateY(-100px) rotate(360deg);
opacity: 0;
    }
}

.particle {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    animation: float 2s ease-out forwards;
}

/* Input focus effect */
.input-focus-effect {
    position: relative;
    overflow: hidden;
}

.input-focus-effect:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.input-focus-effect:focus-within:after {
    transform: scaleX(1);
}

/* Submit button animation */
@keyframes pulse {
    0% {
box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    70% {
box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}


/* Animation Classes */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.skill-bar {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    animation: skillAnimation 1.5s ease-out forwards;
}

@keyframes skillAnimation {
    from { width: 0; }
    to { width: attr(data-width); }
}

.card-3d {
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.card-3d:hover {
    transform: translateY(-5px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #1f2937;
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    border: 1px solid #374151;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.modal-success .modal-icon {
    color: #10b981;
}

.modal-error .modal-icon {
    color: #ef4444;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.modal-message {
    color: #9ca3af;
    margin-bottom: 1.5rem;
}

.modal-button {
    background: #3b82f6;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal-button:hover {
    background: #2563eb;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu.active {
    max-height: 500px;
}

/* Vanta.js container fix */
#vanta-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}