.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.dark .loading-screen {
    background-color: #111827;
}

.loading-content {
    text-align: center;
}

.loading-cube {
    width: 60px;
    height: 60px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate 5s infinite linear;
    margin: 0 auto 30px;
}

.loading-cube .face {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid #3b82f6;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    background: rgba(255, 255, 255, 0.8);
}

.dark .loading-cube .face {
    background: rgba(17, 24, 39, 0.8);
    border-color: #8b5cf6;
}

.loading-cube .front {
    transform: rotateY(0deg) translateZ(30px);
}

.loading-cube .back {
    transform: rotateY(180deg) translateZ(30px);
}

.loading-cube .right {
    transform: rotateY(90deg) translateZ(30px);
}

.loading-cube .left {
    transform: rotateY(-90deg) translateZ(30px);
}

.loading-cube .top {
    transform: rotateX(90deg) translateZ(30px);
}

.loading-cube .bottom {
    transform: rotateX(-90deg) translateZ(30px);
}

.loading-text {
    font-size: 18px;
    margin-bottom: 20px;
    color: #3b82f6;
}

.dark .loading-text {
    color: #8b5cf6;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}

.dark .loading-bar {
    background: #374151;
}

.loading-progress {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    animation: loading 2s ease-in-out forwards;
}

@keyframes rotate {
    from {
        transform: rotateX(0deg) rotateY(0deg);
    }

    to {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

@keyframes loading {
    0% {
        width: 0;
    }

    100% {
        width: 100;
    }
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    overflow-x: hidden;
    background: transparent;
    color: #1f2937;
}

.dark body {
    color: #f3f4f6;
}

.gradient-text {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(90deg, #3b82f6, #8b5cf6);
}

.blob {
    filter: blur(60px);
    opacity: 0.15;
    z-index: -1;
}

.card-hover {
    transition: all 0.3s ease;
    transform: translateY(0);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background-color: rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    border: 1px solid rgba(209, 213, 219, 0.3);
}

.dark .card-hover {
    background-color: rgba(17, 24, 39, 0.75);
    border: 1px solid rgba(55, 65, 81, 0.3);
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.dark .card-hover:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.skill-bar {
    height: 8px;
    border-radius: 4px;
    background: rgba(156, 163, 175, 0.2);
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 1.5s ease;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: 3px solid white;
}

.dark .timeline-item::before {
    border-color: #1f2937;
}

.timeline::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 0;
    height: 100%;
    width: 2px;
    background: #e5e7eb;
}

.dark .timeline::before {
    background: #4b5563;
}

.contact-input {
    transition: all 0.3s ease;
    background: rgba(243, 244, 246, 0.8);
}

.dark .contact-input {
    background: rgba(31, 41, 55, 0.8);
}

.contact-input:focus {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.5);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    mix-blend-mode: screen;
}

/* Liquid button effect */
.liquid-btn {
    position: relative;
    overflow: hidden;
    background-size: 200% 100%;
    background-image: linear-gradient(90deg, #3b82f6, #8b5cf6, #3b82f6);
    transition: all 0.4s ease;
}

.liquid-btn:hover {
    background-position: 100% 0;
}

.liquid-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.4s ease;
}

.liquid-btn:hover::before {
    left: 100%;
}

/* Glass effect */
.glass {
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background-color: rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    border: 1px solid rgba(209, 213, 219, 0.3);
}

.dark .glass {
    background-color: rgba(17, 24, 39, 0.75);
    border: 1px solid rgba(55, 65, 81, 0.3);
}

/* Mobile menu styles */
.mobile-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-150%);
    transition: transform 0.3s ease-out;
    z-index: 40;
}

.dark .mobile-menu {
    background: rgba(17, 24, 39, 0.95);
}

.mobile-menu.open {
    transform: translateY(0);
}

.mobile-menu .nav-link {
    display: block;
    padding: 0.75rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.dark .mobile-menu .nav-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Section animation classes */
.section-hidden {
    opacity: 0;
    transform: translateY(50px);
}

.section-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animation delays */
.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

.delay-400 {
    animation-delay: 400ms;
}

.delay-500 {
    animation-delay: 500ms;
}

/* Project card hover effect */
.project-card {
    transition: all 0.3s ease;
    transform: perspective(1000px) rotateX(0) rotateY(0) translateY(0);
}

.project-card:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg) translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.dark .project-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

/* View All button */
.view-all-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.view-all-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
}

.view-all-btn:hover::after {
    left: 100%;
}

/* Contact page specific styles */
.contact-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.contact-form-card {
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

.contact-form-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            rgba(59, 130, 246, 0.1) 0%,
            rgba(139, 92, 246, 0.1) 50%,
            rgba(59, 130, 246, 0.1) 100%);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    z-index: -1;
}

.contact-form-card:hover::before {
    animation: liquid 3s linear infinite;
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.contact-icon:hover {
    transform: scale(1.1) rotate(10deg);
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-5px);
}

.map-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.map-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    pointer-events: none;
}

.contact-success {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 1000;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
}

.contact-success.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* 3D Background */
#vanta-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Floating 3D elements */
.floating-element {
    position: absolute;
    z-index: -1;
    opacity: 0.2;
    filter: blur(1px);
}

.floating-cube {
    width: 100px;
    height: 100px;
    transform-style: preserve-3d;
    animation: float 8s ease-in-out infinite;
}

.floating-pyramid {
    width: 80px;
    height: 80px;
    transform-style: preserve-3d;
    animation: float-reverse 7s ease-in-out infinite;
}

.floating-sphere {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    animation: float 10s ease-in-out infinite;
}

/* Form loading spinner */
.form-spinner {
    display: none;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

.form-spinner.active {
    display: inline-block;
}

/* Ensure text is readable over the background */
.text-over-bg {
    position: relative;
    z-index: 1;
    color: #1f2937;
}

.dark .text-over-bg {
    color: #0055ff;
}

/* Section backgrounds with contrast */
section {
    position: relative;
    z-index: 1;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: -1;
}

.dark section::before {
    background: rgba(17, 24, 39, 0.7);
}