@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Roboto:wght@300;400&display=swap');

        :root {
            --primary-bg: #010418;
            --text-color: #E0F7FA;
            --glow-color-1: #00A8FF;
            --glow-color-2: #00E5FF;
            --whatsapp-color: #25D366;
        }

        body {
            margin: 0;
            font-family: 'Roboto', sans-serif;
            background-color: var(--primary-bg);
            color: var(--text-color);
            overflow-x: hidden;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            background-image:
                -webkit-radial-gradient(circle at 20% 20%, rgba(0, 168, 255, 0.1), transparent 30%),
                -webkit-radial-gradient(circle at 80% 70%, rgba(0, 229, 255, 0.1), transparent 30%),
                radial-gradient(circle at 20% 20%, rgba(0, 168, 255, 0.1), transparent 30%),
                radial-gradient(circle at 80% 70%, rgba(0, 229, 255, 0.1), transparent 30%);
        }

#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0.3; /* Adjust opacity as needed for visibility */
    pointer-events: none;
}

/* WhatsApp Floating Button Styles */
.whatsapp-container {
    position: fixed;
    right: 0;
    bottom: 30%;
    z-index: 1000;
    display: flex;
    align-items: center;
    flex-direction: row;
    margin-right: 0;
}

.whatsapp-icon {
    width: 45px;
    height: 45px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.7);
    animation: pulse-glow 3s infinite alternate, float 6s ease-in-out infinite;
    position: relative;
    transition: transform 0.3s;
    margin-right: 0;
}

.whatsapp-icon:hover {
    transform: scale(1.1);
}

.whatsapp-icon a {
    color: var(--whatsapp-color) !important;
    font-size: 35px;
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    border-radius: 50%;
    background-color: rgba(37, 211, 102, 0.2);
    border: 2px solid var(--whatsapp-color);
}

.whatsapp-popup {
    background: rgba(1, 4, 24, 0.9);
    border: 1px solid var(--glow-color-1);
    border-radius: 10px;
    padding: 10px 15px;
    margin-right: 15px;
    margin-left: 0;
    max-width: 200px;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
    animation: fade-in-out 5s infinite;
    opacity: 0;
    align-self: flex-start;
}

.whatsapp-popup p {
    margin: 0;
    color: var(--text-color);
    font-size: 12px;
    text-align: center;
}

.whatsapp-popup:after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 10px 0 10px 10px;
    border-style: solid;
    border-color: transparent transparent transparent var(--glow-color-1);
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 15px rgba(0, 229, 255, 0.7), 
                    0 0 30px rgba(0, 168, 255, 0.5);
    }
    100% {
        box-shadow: 0 0 20px rgba(0, 229, 255, 0.9), 
                    0 0 40px rgba(0, 168, 255, 0.7),
                    0 0 60px rgba(0, 168, 255, 0.3);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes fade-in-out {
    0%, 100% {
        opacity: 0;
    }
    25%, 75% {
        opacity: 1;
    }
}
        .container {
            max-width: 1200px;
            padding: 0.5rem 1rem 0.5rem; /* Responsive top padding for fixed nav */
            width: 100%;
        }

        .container#cv {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            max-width: 100%;
        }

        .container#cv .cv-content p,
        .container#cv .content p {
            text-align: justify;
            text-justify: inter-word;
        }
        
        html {
            scroll-behavior: smooth;
        }

        /* 3D Title Styling */
        .title-container {
            perspective: 1000px;
            padding: 0.5rem 0;
        }

        .title-3d {
            font-family: 'Orbitron', sans-serif;
            font-size: clamp(2.5rem, 10vw, 5rem);
            font-weight: 700;
            color: var(--text-color);
            text-shadow: 
                0 0 5px var(--glow-color-2),
                0 0 10px var(--glow-color-2),
                0 0 20px var(--glow-color-1),
                0 0 40px var(--glow-color-1);
            transform: rotateX(15deg) rotateY(-10deg);
            transition: transform 0.5s ease-out, transform 0.5s ease-out;
            cursor: pointer;
            animation: float 6s ease-in-out infinite;
        }

        .title-container:hover .title-3d {
            transform: rotateX(0deg) rotateY(0deg) scale(1.05);
        }

        @keyframes float {
            0% { -webkit-transform: rotateX(15deg) rotateY(-10deg) translateZ(0px); transform: rotateX(15deg) rotateY(-10deg) translateZ(0px); }
            50% { -webkit-transform: rotateX(15deg) rotateY(-10deg) translateZ(20px); transform: rotateX(15deg) rotateY(-10deg) translateZ(20px); }
            100% { -webkit-transform: rotateX(15deg) rotateY(-10deg) translateZ(0px); transform: rotateX(15deg) rotateY(-10deg) translateZ(0px); }
        }

        /* Brain Container Styling */
        #brain-container {
            width: 100%;
            max-width: 600px; /* Limit max size on large screens */
            height: 0;
            margin: 0 auto;
            cursor: grab;
            border-radius: 15px;
            background: radial-gradient(circle, rgba(0, 168, 255, 0.05), transparent 70%);
        }
        #brain-container:active {
            cursor: grabbing;
        }


        /* Content Styling */
        .content {
            margin-top: 0.25rem;
            padding: 0.25rem;
            background-color: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(0, 168, 255, 0.2);
            border-radius: 15px;
            font-size: 1.1rem;
            line-height: 1.7;
            text-align: justify;
        }
        
        .content h2 {
            font-family: 'Orbitron', sans-serif;
            color: var(--glow-color-2);
            text-align: center;
        }

        .content p {
            font-weight: 300;
        }

        /* Summary Section Styles */
        .summary-section {
            margin-top: 2rem;
            text-align: center;
        }

        .summary-title {
            font-family: 'Orbitron', sans-serif;
            font-size: 2rem;
            color: var(--glow-color-2);
            margin-bottom: 2rem;
        }

        .summary-content {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 2rem;
            margin-bottom: 2rem;
        }

        .summary-link {
            text-decoration: none;
            color: inherit;
            display: block;
            transition: transform 0.3s ease;
        }

        .summary-link:hover {
            transform: scale(1.05);
        }

        .summary-card {
            background-color: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(0, 168, 255, 0.2);
            border-radius: 15px;
            padding: 2rem;
            text-align: center;
            transition: all 0.3s ease;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .summary-card:hover {
            background-color: rgba(0, 168, 255, 0.1);
            box-shadow: 0 0 20px rgba(0, 168, 255, 0.5);
            transform: translateY(-5px);
        }

        .summary-card i {
            font-size: 3rem;
            color: var(--glow-color-2);
            margin-bottom: 1rem;
        }

        .summary-card h3 {
            font-family: 'Orbitron', sans-serif;
            color: var(--text-color);
            margin-bottom: 1rem;
        }

        .summary-card p {
            font-weight: 300;
            line-height: 1.6;
        }

        /* Enhanced Gallery Section Styles - Universal Across All Pages */
        .gallery-section {
            padding: clamp(8px, 3vw, 20px);
            text-align: center;
            width: 100%;
            box-sizing: border-box;
        }
        
        .gallery-section h2 {
            font-size: clamp(1.8rem, 5vw, 2.5rem);
            margin-bottom: clamp(15px, 3vw, 20px);
            color: var(--glow-color-1);
            text-shadow: 0 0 10px rgba(0, 229, 255, 0.7);
            line-height: 1.2;
            text-align: center;
        }
        
        .gallery-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(clamp(250px, 25vw, 300px), 1fr));
            gap: clamp(15px, 3vw, 30px);
            max-width: 1400px;
            margin: 0 auto;
            width: 100%;
            justify-items: center;
            align-items: start;
            padding: 0 clamp(10px, 3vw, 20px);
            box-sizing: border-box;
        }
        
        /* Enhanced Card Styles with 3D Flip Effect - Universal */
        .gallery-card {
            width: 100%;
            max-width: clamp(250px, 25vw, 300px);
            height: clamp(350px, 45vw, 400px);
            perspective: 1000px;
            margin: 0;
            display: flex;
            justify-content: center;
            box-sizing: border-box;
            overflow: visible;
        }
        
        .gallery-card-inner {
            position: relative;
            width: 100%;
            height: 100%;
            text-align: center;
            transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
            transform-style: preserve-3d;
            box-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
            border-radius: clamp(10px, 2vw, 15px);
            overflow: hidden;
        }
        
        .gallery-card:hover .gallery-card-inner {
            transform: rotateY(180deg);
        }
        
        .gallery-card-front, .gallery-card-back {
            position: absolute;
            width: 100%;
            height: 100%;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            border-radius: clamp(10px, 2vw, 15px);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
            padding: clamp(15px, 3vw, 20px);
            box-sizing: border-box;
        }
        
        .gallery-card-front {
            background: linear-gradient(145deg, rgba(1, 4, 24, 0.95), rgba(1, 4, 24, 0.8));
            color: white;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }
        
        .gallery-card-front img {
            width: 100%;
            height: clamp(180px, 60%, 220px);
            object-fit: cover;
            border-radius: clamp(8px, 1.5vw, 12px);
            margin-bottom: clamp(8px, 2vw, 12px);
        }
        
        .gallery-card-front img.smaller-img {
            height: clamp(150px, 50%, 180px);
        }
        
        .gallery-card-front i {
            color: var(--glow-color-1);
            margin-bottom: clamp(8px, 2vw, 15px);
            font-size: clamp(2rem, 5vw, 3rem);
        }
        
        .gallery-card-front h3 {
            margin: 0;
            font-size: clamp(1rem, 3vw, 1.5rem);
            color: var(--glow-color-1);
            line-height: 1.2;
            text-align: center;
        }
        
        .gallery-card-back {
            background: rgba(1, 4, 24, 0.95);
            border: 2px solid rgba(0, 168, 255, 0.3);
            color: #E0F7FA;
            transform: rotateY(180deg);
            padding: clamp(15px, 3vw, 25px);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            justify-content: center;
            align-items: center;
            text-align: center;
            box-shadow: 0 0 20px rgba(0, 168, 255, 0.2);
        }
        
        .gallery-card-back h3 {
            font-size: clamp(1rem, 3vw, 1.5rem);
            margin-bottom: clamp(10px, 2.5vw, 20px);
            color: var(--glow-color-1);
            line-height: 1.2;
        }
        
        .gallery-card-back p {
            margin-bottom: clamp(15px, 3vw, 30px);
            line-height: 1.5;
            font-size: clamp(0.85rem, 2.2vw, 0.95rem);
            flex-grow: 1;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .gallery-btn {
            display: inline-block;
            padding: clamp(8px, 2vw, 12px) clamp(15px, 3vw, 20px);
            background: linear-gradient(45deg, var(--glow-color-1), var(--glow-color-2));
            color: white;
            text-decoration: none;
            border-radius: clamp(20px, 5vw, 25px);
            font-weight: bold;
            font-size: clamp(0.8rem, 2vw, 0.9rem);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
            border: 2px solid transparent;
            position: relative;
            overflow: hidden;
        }
        
        .gallery-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 0 20px rgba(0, 229, 255, 0.8);
            border-color: var(--glow-color-1);
        }
        
        .gallery-btn:active {
            transform: scale(0.98);
        }
        
        /* Video Section Responsive Enhancements */
        .video-section {
            padding: clamp(8px, 3vw, 20px);
            text-align: center;
            width: 100%;
            box-sizing: border-box;
        }
        
        .video-section h2 {
            font-size: clamp(1.8rem, 5vw, 2.5rem);
            margin-bottom: clamp(15px, 3vw, 20px);
            color: var(--glow-color-1);
            text-shadow: 0 0 10px rgba(0, 229, 255, 0.7);
            line-height: 1.2;
        }
        
        .video-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(clamp(280px, 35vw, 400px), 1fr));
            gap: clamp(20px, 4vw, 30px);
            max-width: 1400px;
            margin: 0 auto;
            width: 100%;
            padding: 0 clamp(10px, 3vw, 20px);
            box-sizing: border-box;
        }
        
        .video-item {
            background: rgba(255, 255, 255, 0.02);
            border-radius: clamp(10px, 2vw, 15px);
            padding: clamp(10px, 2vw, 15px);
            box-shadow: 0 4px 20px rgba(0, 168, 255, 0.2);
            transition: all 0.3s ease;
            border: 1px solid rgba(0, 168, 255, 0.1);
            width: 100%;
            box-sizing: border-box;
        }
        
        .video-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 30px rgba(0, 229, 255, 0.4);
        }
        
        .video-item h3 {
            margin-bottom: clamp(8px, 2vw, 12px);
            font-size: clamp(1rem, 2.5vw, 1.2rem);
            color: var(--glow-color-2);
            text-align: center;
            word-wrap: break-word;
            hyphens: auto;
        }
        
        .video-item video {
            width: 100%;
            height: clamp(180px, 25vw, 220px);
            border-radius: clamp(8px, 1.5vw, 12px);
            box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
            object-fit: cover;
            object-position: center;
            transition: all 0.3s ease;
            max-width: 100%;
        }
        
        .video-item:hover video {
            transform: scale(1.02);
            box-shadow: 0 0 25px rgba(0, 229, 255, 0.6);
        }

        /* Psychological Messages */
        .psych-messages {
            position: relative;
            overflow: hidden;
            height: 60px;
            margin: 5px 0;
            display: flex;
            align-items: center;
        }

        .psych-messages p {
            position: absolute;
            white-space: nowrap;
            font-size: 1.2rem;
            color: var(--glow-color-1);
            text-shadow: 0 0 5px rgba(0, 229, 255, 0.7);
            animation: scroll-left-final 1200s linear infinite;
        }

        @keyframes scroll-left-final {
            0% { transform: translateX(100%); }
            100% { transform: translateX(-100%); }
        }

        /* Video Section */
        .video-section {
            padding: 10px 20px;
            text-align: center;
        }

        .video-section h2 {
            font-size: 2.5rem;
            margin-bottom: 20px;
            color: var(--glow-color-1);
            text-shadow: 0 0 10px rgba(0, 229, 255, 0.7);
        }

        .video-container {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 30px;
            max-width: 1200px;
            margin: 0 auto;
        }

        .video-container video {
            width: 300px;
            height: 200px;
            border-radius: 15px;
            box-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
        }

/* Navigation Bar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(1, 4, 24, 0.95); /* Semi-transparent primary bg */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 168, 255, 0.3);
    transition: background-color 0.3s ease;
}

.navbar:hover {
    background-color: rgba(1, 4, 24, 1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--glow-color-2);
    text-decoration: none;
    text-shadow: 0 0 10px var(--glow-color-1);
    transition: transform 0.3s ease, text-shadow 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo-img {
    width: 32px !important;
    height: 32px !important;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 0 8px var(--glow-color-1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: block !important;
    background-color: rgba(0, 168, 255, 0.1);
    border: 2px solid var(--glow-color-1);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: pixelated;
    position: relative;
    z-index: 10;
    border-radius: 50% !important;
}

.nav-logo-img:hover {
    box-shadow: 0 0 12px var(--glow-color-2), 0 0 20px var(--glow-color-1);
    transform: scale(1.1);
}

.nav-logo:hover {
    -webkit-transform: scale(1.05);
    transform: scale(1.05);
    text-shadow: 0 0 20px var(--glow-color-2);
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-item {
    margin: 0;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: color 0.3s ease, background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border: 1px solid transparent;
}

.nav-link:hover {
    color: var(--glow-color-2);
    background-color: rgba(0, 168, 255, 0.2);
    border-color: rgba(0, 168, 255, 0.4);
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 168, 255, 0.4);
    text-shadow: 0 0 8px var(--glow-color-1);
}

.nav-link.active {
    background-color: rgba(0, 168, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 168, 255, 0.3);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: 0.3s;
    border-radius: 2px;
    box-shadow: 0 0 5px var(--glow-color-1);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.nav-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(1, 4, 24, 0.98);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    gap: 0;
    box-shadow: 0 4px 20px rgba(0, 168, 255, 0.2);
}

.nav-menu.active .nav-item {
    width: 100%;
    text-align: center;
}

.nav-menu.active .nav-link {
    display: block;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(0, 168, 255, 0.1);
}

/* Enhanced Global Responsive System */
@media (max-width: 1400px) {
    .container {
        max-width: 95%;
        padding: 4rem clamp(0.5rem, 2vw, 1.5rem) 2rem;
    }

    .nav-container {
        max-width: 100%;
        padding: 0 clamp(0.5rem, 2vw, 1.5rem);
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 4rem 1rem 2rem;
    }

    .nav-container {
        max-width: 100%;
        padding: 0 1rem;
    }

    .cv-grid {
        max-width: 100%;
        grid-template-columns: 1fr 2fr;
        padding: 0 0.5rem;
        margin: 1rem auto;
    }
    
    .gallery-container {
        gap: clamp(15px, 2vw, 25px);
    }
    
    .gallery-card {
        width: clamp(250px, 28vw, 300px);
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: none; /* Keep hidden as original design */
    }

    .nav-menu {
        display: none; /* Keep hidden as original design */
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-logo {
        font-size: clamp(1.2rem, 3vw, 1.5rem);
    }

    .nav-logo-img {
        width: clamp(24px, 3vw, 28px);
        height: clamp(24px, 3vw, 28px);
    }
    
    .nav-menu.active {
        left: 0;
    }

    .container {
        padding: 6rem 1rem 2rem;
    }

    .content {
        font-size: clamp(0.9rem, 2.5vw, 1rem);
        line-height: 1.6;
    }

    .content h2 {
        font-size: clamp(1.5rem, 4vw, 1.8rem);
    }

    .cv-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0;
    }
    
    /* Gallery responsive fixes */
    .gallery-container {
        justify-content: center;
        gap: clamp(10px, 3vw, 20px);
    }
    
    .gallery-card {
        width: clamp(240px, 45vw, 280px);
        margin: 0 auto;
    }
    
    .video-container {
        flex-direction: column;
        align-items: center;
    }
    
    .video-item {
        width: 100%;
        max-width: 500px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 clamp(0.25rem, 2vw, 0.5rem);
    }

    .nav-logo-img {
        width: clamp(20px, 5vw, 24px);
        height: clamp(20px, 5vw, 24px);
    }

    .container {
        padding: 5rem clamp(0.25rem, 2vw, 0.5rem) 2rem;
    }

    .title-3d {
        font-size: clamp(1.8rem, 8vw, 3rem);
    }

    #brain-container {
        max-width: 95vw;
    }

    .content {
        padding: clamp(0.5rem, 3vw, 1rem);
        font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    }

    .content h2 {
        font-size: clamp(1.3rem, 4vw, 1.5rem);
    }

    .content ul {
        padding-left: clamp(0.5rem, 3vw, 1rem);
    }

    .content li {
        margin-bottom: clamp(0.25rem, 1vw, 0.5rem);
    }
    
    /* Mobile gallery fixes */
    .gallery-card {
        width: clamp(220px, 90vw, 280px);
        max-width: 100%;
        margin: 0 auto;
    }
    
    .gallery-card-inner {
        height: clamp(320px, 80vw, 380px);
    }
    
    .gallery-card-front img {
        width: 100%;
        height: clamp(160px, 55%, 200px);
        object-fit: cover;
        object-position: center;
    }
    
    .gallery-card-front h3,
    .gallery-card-back h3 {
        font-size: clamp(1rem, 3vw, 1.2rem);
        line-height: 1.3;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .gallery-card-back p {
        font-size: clamp(0.8rem, 2.5vw, 0.9rem);
        line-height: 1.4;
        padding: 0 clamp(5px, 2vw, 10px);
    }
    
    .gallery-container {
        padding: 0 clamp(8px, 3vw, 16px);
        gap: clamp(12px, 3vw, 20px);
    }
    
    /* Mobile video fixes */
    .video-item video {
        width: 100%;
        height: auto;
        max-height: 200px;
    }
    
    /* Mobile social links fixes */
    .social-links {
        gap: clamp(0.25rem, 2vw, 0.5rem);
    }
    
    .social-links a {
        padding: clamp(0.3rem, 2vw, 0.5rem) clamp(0.5rem, 3vw, 0.8rem);
        font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    }
}

@media (max-width: 360px) {
    .container {
        padding: 4rem 0.25rem 1rem;
    }
    
    .title-3d {
        font-size: clamp(1.5rem, 8vw, 2rem);
    }
    
    .content {
        padding: 0.5rem;
    }
    
    .gallery-card {
        width: 95vw;
        margin: 0 2.5vw;
        max-width: 320px;
    }
    
    .gallery-card-inner {
        height: clamp(300px, 85vw, 350px);
    }
    
    .gallery-card-front img {
        height: clamp(140px, 50%, 180px);
        object-fit: cover;
        border-radius: 8px;
    }
    
    .gallery-card-front h3,
    .gallery-card-back h3 {
        font-size: clamp(0.9rem, 3vw, 1.1rem);
        margin: clamp(5px, 2vw, 10px) 0;
    }
    
    .gallery-card-back p {
        font-size: clamp(0.75rem, 2.8vw, 0.85rem);
        padding: 0 clamp(3px, 2vw, 8px);
    }
    
    .gallery-btn {
        padding: clamp(6px, 2vw, 10px) clamp(12px, 3vw, 16px);
        font-size: clamp(0.75rem, 2.5vw, 0.85rem);
    }
    
    .gallery-container {
        padding: 0 clamp(5px, 2vw, 12px);
        gap: clamp(10px, 3vw, 16px);
    }
    
    /* Enhanced video section for ultra-small screens */
    .video-item video {
        width: 100%;
        height: auto;
        max-height: 180px;
        border-radius: 8px;
    }
    
    .video-item {
        padding: clamp(8px, 2vw, 12px);
    }
    
    .video-item h3 {
        font-size: clamp(0.9rem, 3vw, 1rem);
        margin-bottom: clamp(6px, 2vw, 10px);
    }
}
/* Parallax Effects */
.parallax-element {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

.title-3d.parallax-element {
    transform: translateY(var(--title-y, 0px)) rotateX(15deg) rotateY(-10deg) scale(1);
}

#brain-container.parallax-element {
    transform: translateY(var(--brain-y, 0px)) translateZ(0);
}

.content.parallax-element {
    transform: translateY(var(--section-y, 0px)) translateZ(0);
}

/* Themed Custom Cursor */


@media (hover: none) and (pointer: coarse) {
    body {
        cursor: auto;
    }
}
.subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.25rem;
    @media (min-width: 768px) { font-size: clamp(1rem, 4vw, 1.5rem); }
    font-weight: 400;
    color: var(--text-color);
    text-shadow: 0 0 10px var(--glow-color-1);
    margin-top: 0.5rem;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease, text-shadow 0.3s ease;
}

.subtitle:hover {
    opacity: 1;
    -webkit-transform: scale(1.05);
    transform: scale(1.05);
    text-shadow: 0 0 20px var(--glow-color-2);
}

.title-container {
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.title-container.title-mode {
    opacity: 0;
    -webkit-transform: translateY(-100%);
    transform: translateY(-100%);
}

.nav-logo.title-mode {
    font-size: 2rem;
    @media (min-width: 768px) { font-size: clamp(2.5rem, 10vw, 5rem); }
    font-weight: 700;
    text-shadow:
        0 0 5px var(--glow-color-2),
        0 0 10px var(--glow-color-2),
        0 0 20px var(--glow-color-1),
        0 0 40px var(--glow-color-1);
    -webkit-transform: rotateX(15deg) rotateY(-10deg);
    transform: rotateX(15deg) rotateY(-10deg);
    animation: float 6s ease-in-out infinite;
}

.title-container.title-mode {
    opacity: 0;
    transform: translateY(-100%);
}

.subtitle.parallax-element {
    -webkit-transform: translateY(var(--subtitle-y, 0px));
    transform: translateY(var(--subtitle-y, 0px));
}

/* Social Media Links Styling */
.social-links {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    font-family: 'Roboto', sans-serif;
}

.social-links li {
    margin: 0;
}

.social-links a {
    color: var(--text-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: color 0.3s ease, background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    font-size: 1rem;
    font-weight: 400;
}

.social-links a:hover {
    color: var(--glow-color-2);
    background-color: rgba(0, 168, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 168, 255, 0.3);
}

.social-links i {
    font-size: 1.2em; /* Micro size for icons */
    width: 1.2em;
    text-align: center;
}

/* Responsive for mobile */
@media (max-width: 480px) {
    .social-links {
        gap: 0.5rem;
    }
    
    .social-links a {
        padding: 0.4rem 0.8rem;
        font-size: 0.95rem;
    }
    
    .social-links i {
        font-size: 1.1em;
    }
}

.pulse-word {
    font-weight: bold;
    color: var(--glow-color-2);
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 3px var(--glow-color-1);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 3px var(--glow-color-2), 0 0 20px var(--glow-color-1);
    }
}

/* Summary Section Styles */
.summary-section {
    padding: 10px 20px;
    margin: 5px 0;
    background-color: rgba(1, 4, 24, 0.7);
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.summary-title {
    text-align: center;
    color: var(--glow-color-1);
    margin-bottom: 15px;
    font-size: 2rem;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.7);
}

.summary-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.summary-card {
    width: 280px;
    height: 200px;
    padding: 20px;
    background-color: rgba(1, 4, 24, 0.8);
    border-radius: 10px;
    border: 1px solid var(--glow-color-1);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
}

.summary-card i {
    font-size: 2.5rem;
    color: var(--glow-color-1);
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.7);
}

.summary-card h3 {
    color: var(--glow-color-1);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.summary-card p {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Responsive styles for summary section */
@media (max-width: 768px) {
    .summary-content {
        flex-direction: column;
        align-items: center;
    }
    
    .summary-card {
        max-width: 100%;
    }
}
.photo {
    display: block;
    margin: 2rem auto;
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 
        0 0 20px rgba(0, 168, 255, 0.5),
        0 0 40px rgba(0, 229, 255, 0.3),
        inset 0 0 20px rgba(0, 168, 255, 0.1);
    animation: slow-pulse 3s ease-in-out infinite;
}

@keyframes slow-pulse {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(0, 168, 255, 0.5),
            0 0 40px rgba(0, 229, 255, 0.3),
            inset 0 0 20px rgba(0, 168, 255, 0.1);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(0, 168, 255, 0.8),
            0 0 60px rgba(0, 229, 255, 0.5),
            inset 0 0 30px rgba(0, 168, 255, 0.2);
        transform: scale(1.02);
    }
}

.close-btn {
    background: rgba(0, 168, 255, 0.2);
    color: var(--text-color);
    border: 1px solid var(--glow-color-1);
    padding: 1rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 168, 255, 0.3);
    margin-top: 2rem;
}

.close-btn:hover {
    background: rgba(0, 168, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 168, 255, 0.5);
    transform: translateY(-2px);
}
/* CV Specific Styles */
.cv-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 168, 255, 0.2);
  box-shadow: 0 0 20px rgba(0, 168, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.profile-section {
    padding: 2rem;
    text-align: center;
}

.contact-info h3 {
    margin: 0 0 1rem 0;
    color: var(--glow-color-2);
    font-family: 'Orbitron', sans-serif;
}

.profile-section .foto {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: block;
    box-shadow:
        0 0 20px rgba(0, 168, 255, 0.3),
        inset 0 0 10px rgba(0, 229, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    image-rendering: -webkit-optimize-contrast;
}

.profile-section .foto:hover {
    transform: scale(1.05);
    box-shadow:
        0 0 30px rgba(0, 168, 255, 0.5),
        inset 0 0 15px rgba(0, 229, 255, 0.2);
}

.contact-item {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item i {
    margin-right: 0.5rem;
    color: var(--glow-color-1);
    width: 1.2em;
}

.cv-content {
   padding: 2rem;
   text-align: center;
}

.cv-content h1.title-3d {
    font-size: clamp(2rem, 8vw, 3rem);
    margin-bottom: 2rem;
}

.cv-content h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--glow-color-2);
    border-bottom: 2px solid var(--glow-color-1);
    padding-bottom: 0.5rem;
    text-align: center;
}

.cv-content h3 {
    color: var(--text-color);
    margin-top: 1.5rem;
    font-family: 'Roboto', sans-serif;
}

.cv-content ul {
   list-style-type: disc;
   padding-left: 1.5rem;
   text-align: center;
}

.job-entry {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-left: 4px solid var(--glow-color-1);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0 8px 8px 0;
  text-align: center;
}

.job-entry h4 {
    margin: 0 0 0.5rem 0;
    color: var(--glow-color-2);
    font-family: 'Orbitron', sans-serif;
}

.job-entry p {
    margin: 0.25rem 0;
    font-weight: 300;
}

/* Responsive for CV */
@media (max-width: 768px) {
    .cv-grid {
        grid-template-columns: 1fr;
        margin: 1rem;
        padding: 1rem;
    }
    
    .profile-section {
        padding: 1rem;
    }
    
    .cv-content {
        padding: 1rem;
    }
    
    .cv-content h1.title-3d {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }
    
    .contact-item {
        justify-content: flex-start;
        font-size: 0.95rem;
    }
    
    .job-entry {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .cv-grid {
        margin: 0.5rem;
        padding: 0.5rem;
    }
    
    .cv-content ul {
        padding-left: 1rem;
    }
    
    .job-entry p {
        font-size: 0.9rem;
    }

/* Animated Presentation Styles - Compatible with all browsers */
.animated-presentation {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 250px;
    margin: 0 auto 2rem;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 168, 255, 0.2);
    background: rgba(1, 4, 24, 0.6);
    border: 1px solid rgba(0, 168, 255, 0.3);
    display: block; /* Force block display for better compatibility */
}

.presentation-container {
    display: flex;
    transition: -webkit-transform 0.5s ease-in-out; /* Safari support */
    transition: transform 0.5s ease-in-out;
    height: 100%;
    width: 100%;
}

.slide {
    min-width: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-sizing: border-box; /* Include padding in width/height calculations */
}

.slide h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--glow-color-2);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-shadow: 0 0 5px rgba(0, 229, 255, 0.3); /* Add glow effect */
}

.slide p {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto; /* Center text */
}

.slide ul {
    list-style-type: none;
    padding: 0;
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.slide li {
    margin-bottom: 0.8rem;
    text-align: left;
    padding-left: 1rem; /* Indent list items */
    position: relative; /* For bullet point */
}

.slide li:before {
    content: "•"; /* Add bullet point */
    color: var(--glow-color-2);
    position: absolute;
    left: 0;
}

.presentation-controls {
    position: absolute;
    bottom: 1rem;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    z-index: 10; /* Ensure buttons are clickable */
}

.presentation-controls button {
    background: rgba(0, 168, 255, 0.2);
    color: var(--text-color);
    border: 1px solid var(--glow-color-1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease; /* Safari support */
    -moz-transition: all 0.3s ease; /* Firefox support */
    outline: none; /* Remove focus outline */
}

.presentation-controls button:hover {
    background: rgba(0, 168, 255, 0.4);
    box-shadow: 0 0 15px rgba(0, 168, 255, 0.5);
    transform: scale(1.1);
    -webkit-transform: scale(1.1); /* Safari support */
    -moz-transform: scale(1.1); /* Firefox support */
}

.slide-indicator {
    color: var(--text-color);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    min-width: 60px; /* Ensure consistent width */
    text-align: center;
}

.full-content {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(0, 168, 255, 0.2);
    box-sizing: border-box; /* Include padding in width/height calculations */
}

.home-summary {
    margin-top: 1.5rem;
    padding: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(0, 168, 255, 0.1);
}

.home-summary p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.home-summary a {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    background: rgba(0, 168, 255, 0.1);
    border: 1px solid rgba(0, 168, 255, 0.3);
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}


.connection-message {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 700;
    background: linear-gradient(45deg, var(--glow-color-1), var(--glow-color-2), #00ffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    margin-top: 1.5rem;
    text-align: center;
    word-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
    line-height: 1.2;
    animation: quick-fade-in 0.8s ease-out;
    position: relative;
}

.connection-message::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, var(--glow-color-1), var(--glow-color-2));
    animation: underline-expand 1.2s ease-out 0.8s forwards;
}

@keyframes quick-fade-in {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes underline-expand {
    0% {
        width: 0;
    }
    100% {
        width: 80%;
    }
}

/* Mobile-specific adjustments for the message */
@media (max-width: 768px) {
    .connection-message {
        font-size: 1.8rem;
        padding: 0 0.5rem;
        margin-top: 1rem;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .connection-message {
        font-size: 1.5rem;
        padding: 0 0.25rem;
        margin-top: 0.75rem;
        line-height: 1.4;
    }
}

/* Neo-holographic contact interface */
#contact-form.contact-holo {
    --card-bg: rgba(1, 4, 24, 0.75);
    --card-border: rgba(0, 229, 255, 0.25);
    --chip-bg: rgba(255, 255, 255, 0.04);
    --chip-border: rgba(0, 229, 255, 0.15);
    --chip-hover: rgba(0, 229, 255, 0.25);
    --pill-bg: rgba(6, 16, 48, 0.6);
    --pill-border: rgba(0, 229, 255, 0.2);
    --pill-active: rgba(0, 229, 255, 0.35);
    --glare: rgba(0, 229, 255, 0.3);
    --blur: blur(14px);
    --radius: clamp(18px, 3vw, 28px);
    padding: clamp(1rem, 3vw, 2rem);
}

.contact-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    text-align: center;
    color: var(--glow-color-2);
    text-shadow: 0 0 12px rgba(0, 229, 255, 0.6);
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.contact-subtitle {
    text-align: center;
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    color: rgba(224, 247, 250, 0.85);
    max-width: 900px;
    margin: 0 auto clamp(1.5rem, 3vw, 2rem);
    line-height: 1.6;
}

/* Inline validation hints */
.inline-hint {
    font-size: 0.8rem;
    color: rgba(144, 224, 255, 0.95);
    margin-top: 0.3rem;
    display: none;
    align-items: center;
    gap: 0.35rem;
}

.inline-hint i {
    font-size: 0.75rem;
    color: var(--glow-color-2);
}

.inline-hint.active {
    display: inline-flex;
}

.contact-interface {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 2.5vw, 2rem);
}

@media (min-width: 900px) {
    .contact-interface {
        grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.05fr);
        align-items: stretch;
    }
}

.contact-card {
    background: rgba(1, 4, 24, 0.9);
    border: 2px solid rgba(0, 229, 255, 0.4);
    border-radius: var(--radius);
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    position: relative;
    overflow: hidden;
}

.contact-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(120deg, transparent, var(--glow-color-2), transparent);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    opacity: 0.3;
    pointer-events: none;
}

.contact-info-card h3,
.contact-form-card h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--glow-color-2);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    font-size: clamp(0.95rem, 2.2vw, 1rem);
    color: rgba(224, 247, 250, 0.8);
    padding: 0.75rem 1rem;
    background: var(--chip-bg);
    border: 1px solid var(--chip-border);
    border-radius: clamp(8px, 2vw, 12px);
}

.info-list strong {
    color: var(--glow-color-2);
    font-weight: 600;
}

.info-badges {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge {
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: var(--pill-bg);
    border: 1px solid var(--pill-border);
    font-size: 0.85rem;
    color: rgba(224, 247, 250, 0.85);
}

.availability {
    font-size: 0.95rem;
    color: rgba(224, 247, 250, 0.9);
    margin-top: 1rem;
}

.contact-form-card {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2vw, 1.5rem);
}

.form-heading p {
    color: rgba(224, 247, 250, 0.75);
    margin: 0;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(0.75rem, 2vw, 1.25rem);
}

@media (min-width: 700px) {
    .input-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .input-row .input-chip:nth-child(odd) {
        justify-self: stretch;
    }

    .input-row .input-chip:nth-child(even) {
        justify-self: stretch;
    }
}

.input-chip,
.textarea-chip {
    background: var(--chip-bg);
    border: 1px solid var(--chip-border);
    border-radius: clamp(12px, 2vw, 16px);
    padding: clamp(0.9rem, 2vw, 1.1rem);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

.input-chip:hover,
.textarea-chip:hover {
    border-color: var(--glow-color-2);
    box-shadow: 0 0 20px rgba(0, 168, 255, 0.25);
}

.input-chip label,
.textarea-chip label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(224, 247, 250, 0.8);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.input-chip input,
.input-chip select,
.textarea-chip textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    color: var(--text-color);
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
}

.input-chip input:focus,
.input-chip select:focus,
.textarea-chip textarea:focus {
    border-color: var(--glow-color-2);
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.25);
    outline: none;
}

.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: var(--pill-bg);
    border: 1px solid var(--pill-border);
    border-radius: clamp(12px, 2vw, 16px);
    padding: clamp(0.75rem, 2vw, 1.1rem);
}

.pill-group span {
    flex-basis: 100%;
    font-size: 0.9rem;
    color: rgba(224, 247, 250, 0.85);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pill-group label {
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.pill-group input[type="checkbox"] {
    accent-color: var(--glow-color-2);
}

.pill-group label:hover {
    background: var(--pill-active);
}

.form-footer-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(0, 229, 255, 0.3);
    border-radius: clamp(12px, 2vw, 16px);
    padding: clamp(0.85rem, 2vw, 1.1rem);
}

.form-footer-card small {
    color: rgba(224, 247, 250, 0.75);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.contact-submit {
    align-self: flex-start;
    max-width: var(--form-max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--form-gap);
    padding: 0 clamp(1rem, 2vw, 2rem);
    box-sizing: border-box;
    align-items: stretch;
    container-type: inline-size;
}

/* Modern CSS Grid with Container Queries for Progressive Enhancement */
@container (min-width: 768px) {
    #contact-form form {
        display: grid;
        grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr);
        gap: var(--form-gap);
        align-items: start;
        grid-auto-rows: min-content;
    }
    
    /* Advanced fieldset positioning with auto-fit */
    #contact-form fieldset:nth-child(1) { /* Service Selection */
        grid-column: 1;
        grid-row: 1;
        align-self: start;
    }
    
    #contact-form fieldset:nth-child(2) { /* Contact Information */
        grid-column: 2;
        grid-row: 1;
        align-self: start;
    }
    
    #contact-form fieldset:nth-child(3) { /* Project Details */
        grid-column: 1 / -1;
        grid-row: 2;
        align-self: stretch;
    }
}

/* Fallback for browsers without container query support */
@supports not (container-type: inline-size) {
    @media (min-width: 768px) {
        #contact-form form {
            display: grid;
            grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr);
            gap: var(--form-gap);
            align-items: start;
        }
        
        #contact-form fieldset:nth-child(1) { grid-column: 1; grid-row: 1; }
        #contact-form fieldset:nth-child(2) { grid-column: 2; grid-row: 1; }
        #contact-form fieldset:nth-child(3) { grid-column: 1 / -1; grid-row: 2; }
    }
}

/* Modern Fieldset Design with Advanced CSS Custom Properties */
#contact-form fieldset {
    --fieldset-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    --fieldset-border: rgba(0, 168, 255, 0.2);
    --fieldset-shadow: 0 8px 32px rgba(0, 168, 255, 0.1);
    --fieldset-hover-border: rgba(0, 168, 255, 0.4);
    --fieldset-hover-shadow: 0 12px 40px rgba(0, 168, 255, 0.15);
    
    border: 1px solid var(--fieldset-border);
    border-radius: var(--border-radius);
    padding: var(--fieldset-padding);
    background: var(--fieldset-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--fieldset-shadow);
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    contain: layout style paint;
}

/* Advanced pseudo-element for visual hierarchy */
#contact-form fieldset::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--glow-color-1), var(--glow-color-2));
    opacity: 0.6;
    transition: opacity var(--transition-speed) ease;
}

#contact-form fieldset::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius);
    padding: 1px;
    background: linear-gradient(45deg, var(--glow-color-1), transparent, var(--glow-color-2));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
    pointer-events: none;
}

#contact-form fieldset:hover {
    border-color: var(--fieldset-hover-border);
    box-shadow: var(--fieldset-hover-shadow);
    transform: translateY(-2px);
}

#contact-form fieldset:hover::after {
    opacity: 0.3;
}

/* Focus-visible support for accessibility */
#contact-form fieldset:focus-within {
    outline: 2px solid var(--glow-color-1);
    outline-offset: 2px;
}

/* Advanced Form Container with Modern CSS Grid */
.form-container {
    --container-gap: clamp(1rem, 2.5vw, 2rem);
    --container-padding: 0;
    
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--container-gap);
    margin-bottom: var(--container-gap);
    width: 100%;
    padding: var(--container-padding);
    container-type: inline-size;
}

/* Container Query for Contact Information Fieldset */
@container (min-width: 600px) {
    #contact-form fieldset:nth-child(2) .form-container {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--container-gap);
        align-items: start;
        align-content: start;
    }
    
    /* Advanced grid positioning for Contact Information */
    #contact-form fieldset:nth-child(2) .form-group:nth-child(1) { /* Full Name */
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: start;
    }
    
    #contact-form fieldset:nth-child(2) .form-group:nth-child(2) { /* Email - Primary Field */
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        align-self: start;
        order: -1; /* Visual priority */
    }
    
    #contact-form fieldset:nth-child(2) .form-group:nth-child(3) { /* Phone */
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
        align-self: start;
    }
    
    #contact-form fieldset:nth-child(2) .form-group:nth-child(4) { /* Country */
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        align-self: start;
    }
    
    #contact-form fieldset:nth-child(2) .form-group:nth-child(5) { /* Company */
        grid-column: 1 / -1;
        grid-row: 3;
        max-width: 400px;
        margin: 0 auto;
        justify-self: center;
        align-self: start;
    }
}

/* Container Query for Project Details Fieldset */
@container (min-width: 900px) {
    #contact-form fieldset:nth-child(3) .form-container:not(.full-width) {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--container-gap);
        align-items: start;
    }
}

#contact-form fieldset:nth-child(3) .form-container.full-width {
    grid-template-columns: 1fr;
}

/* Fallback for browsers without container query support */
@supports not (container-type: inline-size) {
    @media (min-width: 768px) {
        #contact-form fieldset:nth-child(2) .form-container {
            grid-template-columns: repeat(2, 1fr);
            gap: var(--container-gap);
            align-items: start;
        }
        
        #contact-form fieldset:nth-child(2) .form-group:nth-child(1) { grid-column: 2; grid-row: 1; justify-self: end; }
        #contact-form fieldset:nth-child(2) .form-group:nth-child(2) { grid-column: 1; grid-row: 1; justify-self: start; order: -1; }
        #contact-form fieldset:nth-child(2) .form-group:nth-child(3) { grid-column: 1; grid-row: 2; justify-self: start; }
        #contact-form fieldset:nth-child(2) .form-group:nth-child(4) { grid-column: 2; grid-row: 2; justify-self: end; }
        #contact-form fieldset:nth-child(2) .form-group:nth-child(5) { grid-column: 1 / -1; grid-row: 3; max-width: 400px; margin: 0 auto; justify-self: center; }
        
        @media (min-width: 900px) {
            #contact-form fieldset:nth-child(3) .form-container:not(.full-width) {
                grid-template-columns: repeat(3, 1fr);
            }
        }
    }
}

/* For wider screens, optimize the invisible table structure */
@media (min-width: 1200px) {
    .form-container {
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Ensure proper alignment in wide screens */
    .form-container .form-group:nth-child(5) {
        max-width: 500px;
    }
}

.form-container.full-width {
    grid-template-columns: 1fr;
}

/* Modern Form Group with Advanced CSS Custom Properties */
.form-group {
    --group-min-height: auto;
    --group-padding: 0;
    --group-margin: 0;
    
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    min-width: 0; /* Prevent grid overflow */
    padding: var(--group-padding);
    margin: var(--group-margin);
    contain: layout style;
    transition: transform var(--transition-speed) ease;
}

/* Enhanced form group for larger screens */
@container (min-width: 600px) {
    #contact-form fieldset:nth-child(2) .form-group {
        --group-min-height: 120px;
        min-height: var(--group-min-height);
        justify-content: flex-start;
        align-items: stretch;
    }
    
    #contact-form fieldset:nth-child(3) .form-group {
        --group-min-height: 100px;
        min-height: var(--group-min-height);
    }
}

/* Primary field enhancement (Email) */
#contact-form fieldset:nth-child(2) .form-group:nth-child(2) {
    order: -1; /* Visual priority in source order */
}

#contact-form fieldset:nth-child(2) .form-group:nth-child(2) label {
    color: var(--glow-color-1);
    font-weight: 600;
    text-shadow: 0 0 4px rgba(0, 168, 255, 0.3);
}

#contact-form fieldset:nth-child(2) .form-group:nth-child(2) input:focus {
    border-color: var(--glow-color-2);
    box-shadow:
        0 0 0 3px rgba(0, 229, 255, 0.15),
        0 4px 12px rgba(0, 229, 255, 0.2),
        0 0 25px rgba(0, 229, 255, 0.3);
}

/* Micro-interactions */
.form-group:hover {
    transform: translateY(-1px);
}

/* Accessibility enhancements */
.form-group:focus-within {
    transform: translateY(-1px);
}

/* Fallback for browsers without container query support */
@supports not (container-type: inline-size) {
    @media (min-width: 768px) {
        #contact-form fieldset:nth-child(2) .form-group {
            min-height: 120px;
            justify-content: flex-start;
            align-items: stretch;
        }
        
        #contact-form fieldset:nth-child(3) .form-group {
            min-height: 100px;
        }
        
        #contact-form fieldset:nth-child(2) .form-group:nth-child(2) {
            order: -1;
        }
    }
}

/* Enhanced Professional Label Design */
.form-group label {
    font-family: 'Orbitron', sans-serif;
    color: var(--text-color);
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    font-weight: 500;
    margin-bottom: clamp(0.4rem, 1.5vw, 0.5rem);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 0 3px var(--glow-color-1);
    transition: color 0.3s ease, text-shadow 0.3s ease;
    line-height: 1.3;
}

.form-group label i {
    color: var(--glow-color-1);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
}

/* Professional Input Design with Enhanced Mobile Support */
.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(1, 4, 24, 0.8);
    border: 2px solid rgba(0, 168, 255, 0.4);
    border-radius: clamp(6px, 1.5vw, 8px);
    padding: clamp(0.875rem, 2.5vw, 1rem) clamp(1rem, 3vw, 1.2rem);
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    font-size: clamp(0.95rem, 2.5vw, 1rem);
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    min-height: clamp(48px, 6vw, 56px); /* Enhanced touch targets */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Enhanced Select Dropdown Styling */
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300A8FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: clamp(14px, 2vw, 18px);
    padding-right: clamp(2.5rem, 5vw, 3rem);
    cursor: pointer;
    line-height: 1.3;
}

.form-group select:focus {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300A8FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
}

/* Select Dropdown Options Styling */
.form-group select option {
    background-color: var(--primary-bg);
    color: var(--text-color);
    font-size: clamp(0.9rem, 2.2vw, 1rem);
    font-family: 'Roboto', sans-serif;
    padding: clamp(0.75rem, 2vw, 1rem);
    line-height: 1.4;
    border: none;
    margin: 0;
    white-space: normal;
    word-wrap: break-word;
    min-height: 40px;
}

/* Webkit Browsers Select Styling */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .form-group select {
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300A8FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    }
    
    .form-group select option {
        -webkit-appearance: none;
        background-color: var(--primary-bg);
        color: var(--text-color);
    }
}

/* Firefox Select Styling */
@-moz-document url-prefix() {
    .form-group select {
        -moz-appearance: none;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300A8FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    }
}

/* Enhanced Option Text Formatting for Long Content */
.form-group select option {
    padding: clamp(0.75rem, 2vw, 1rem) clamp(1rem, 3vw, 1.2rem);
    line-height: 1.5;
    white-space: normal;
    word-break: break-word;
    hyphens: auto;
    overflow-wrap: break-word;
    max-width: 100%;
    display: block;
}

/* Specific Styling for Budget Range Options */
#budget option {
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Mobile-Optimized Select Dropdown */
@media (max-width: 768px) {
    .form-group select {
        min-height: 52px;
        font-size: 16px; /* Prevents zoom on iOS */
        background-size: 16px;
        padding-right: 3rem;
    }
    
    .form-group select option {
        padding: 1rem;
        font-size: 16px;
        line-height: 1.4;
    }
}

/* Advanced Validation States with WCAG 2.1 Compliance */
.form-group input:valid:not(:placeholder-shown),
.form-group select:valid,
.form-group textarea:valid:not(:placeholder-shown) {
    border-color: rgba(0, 229, 255, 0.6);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.1);
    background: rgba(0, 229, 255, 0.02);
}

.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
    border-color: rgba(255, 87, 34, 0.6);
    background: rgba(255, 87, 34, 0.02);
}

.form-group input:invalid:not(:placeholder-shown):focus,
.form-group textarea:invalid:not(:placeholder-shown):focus {
    border-color: rgba(255, 87, 34, 0.8);
    box-shadow:
        0 0 0 3px rgba(255, 87, 34, 0.1),
        0 4px 12px rgba(255, 87, 34, 0.15);
    outline: 2px solid rgba(255, 87, 34, 0.3);
    outline-offset: 2px;
}

/* Required field indicators */
.form-group input:required,
.form-group select:required,
.form-group textarea:required {
    background-image: linear-gradient(90deg, transparent 98%, rgba(255, 87, 34, 0.3) 100%);
}

/* Improved Dropdown Arrow and Container */
.form-group select {
    position: relative;
    overflow: hidden;
}

.form-group select::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--glow-color-1);
    pointer-events: none;
    z-index: 1;
}

/* Remove default arrow for modern browsers */
.form-group select::-ms-expand {
    display: none;
}

.form-group select::-webkit-appearance {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Custom Focus Ring for Select */
.form-group select:focus {
    outline: 2px solid var(--glow-color-1);
    outline-offset: -2px;
}

/* Enhanced Select Hover State */
.form-group select:hover {
    border-color: var(--glow-color-1);
    box-shadow: 0 0 8px rgba(0, 168, 255, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(224, 247, 250, 0.6);
    opacity: 1;
    transition: color 0.3s ease;
    font-size: clamp(0.9rem, 2.2vw, 1rem);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--glow-color-1);
    box-shadow:
        0 0 0 3px rgba(0, 168, 255, 0.2),
        0 4px 12px rgba(0, 168, 255, 0.25);
    background: rgba(1, 4, 24, 0.9);
    transform: translateY(-1px);
}

.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
    color: #0D47A1;
    opacity: 0.6;
}

/* Enhanced Valid and Invalid States */
.form-group input:valid:not(:placeholder-shown),
.form-group select:valid,
.form-group textarea:valid:not(:placeholder-shown) {
    border-color: rgba(0, 229, 255, 0.6);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.1);
}

.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
    border-color: rgba(255, 87, 34, 0.6);
}

.form-group input:invalid:not(:placeholder-shown):focus,
.form-group textarea:invalid:not(:placeholder-shown):focus {
    border-color: rgba(255, 87, 34, 0.8);
    box-shadow:
        0 0 0 3px rgba(255, 87, 34, 0.1),
        0 4px 12px rgba(255, 87, 34, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: clamp(120px, 20vw, 140px);
    line-height: 1.6;
    overflow-y: auto;
    font-family: 'Roboto', sans-serif;
}

/* Comprehensive Checkbox Group Design - Mobile Theme with PC Field Justification */
.checkbox-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(0.75rem, 2vw, 1rem);
    margin-top: clamp(0.75rem, 2vw, 1rem);
    padding: clamp(1rem, 3vw, 1.5rem);
    background: rgba(255, 255, 255, 0.02);
    border-radius: clamp(8px, 2vw, 10px);
    border: 1px solid rgba(0, 168, 255, 0.1);
    width: 100%;
}

/* Responsive Checkbox Grid - Mobile Theme with PC Field Justification */
@media (min-width: 768px) {
    .checkbox-group {
        grid-template-columns: repeat(2, 1fr);
        gap: clamp(1rem, 2vw, 1.5rem);
    }
}

/* For wider screens, maintain 2 columns for better checkbox organization */
@media (min-width: 1200px) {
    .checkbox-group {
        grid-template-columns: repeat(2, 1fr);
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1.5vw, 0.75rem);
    font-family: 'Roboto', sans-serif;
    font-size: clamp(0.85rem, 2.2vw, 0.95rem);
    color: #E0F7FA;
    cursor: pointer;
    padding: clamp(0.4rem, 1vw, 0.5rem);
    border-radius: clamp(4px, 1vw, 6px);
    transition: all 0.2s ease;
    background: rgba(1, 4, 24, 0.6);
    border: 1px solid rgba(0, 168, 255, 0.2);
    min-height: clamp(40px, 5vw, 48px); /* Enhanced touch targets */
    line-height: 1.4;
}

.checkbox-group label:hover {
    background: rgba(0, 168, 255, 0.2);
    border-color: rgba(0, 168, 255, 0.4);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 168, 255, 0.3);
}

.checkbox-group input[type="checkbox"] {
    margin: 0;
    width: clamp(1rem, 2.5vw, 1.1rem);
    height: clamp(1rem, 2.5vw, 1.1rem);
    accent-color: var(--glow-color-1);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Enhanced Professional Legend Design */
#contact-form legend {
    font-family: 'Orbitron', sans-serif;
    color: var(--glow-color-2);
    font-size: clamp(1.1rem, 3.5vw, 1.3rem);
    font-weight: 600;
    padding: 0 clamp(0.75rem, 2vw, 1rem);
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.2;
}

#contact-form legend::before {
    content: '';
    width: clamp(3px, 1vw, 4px);
    height: clamp(1.2rem, 3vw, 1.5rem);
    background: linear-gradient(180deg, var(--glow-color-1), var(--glow-color-2));
    border-radius: 2px;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

/* Professional Submit Button with Enhanced Mobile Support */
.submit-btn {
    background: linear-gradient(135deg, var(--glow-color-1), var(--glow-color-2), var(--glow-color-1));
    background-size: 200% 200%;
    color: var(--text-color);
    border: none;
    border-radius: clamp(10px, 2vw, 12px);
    padding: clamp(1rem, 3vw, 1.25rem) clamp(2rem, 6vw, 3rem);
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 20px rgba(0, 229, 255, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.12);
    align-self: center;
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1.5vw, 0.75rem);
    position: relative;
    overflow: hidden;
    animation: gradient-shift 3s ease infinite;
    min-height: clamp(52px, 8vw, 60px); /* Enhanced touch targets */
    width: 100%;
    max-width: 400px;
    justify-content: center;
    margin-top: 1rem; /* Add spacing above submit button */
}

/* Enhanced submit button positioning for PC layout */
@media (min-width: 768px) {
    .submit-btn {
        margin-top: 2rem;
        max-width: 500px;
    }
}

.submit-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: left 0.5s ease;
}

.submit-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 8px 30px rgba(0, 229, 255, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.12);
    animation-duration: 1.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow:
        0 2px 15px rgba(0, 229, 255, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.12);
}

.submit-btn i {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.submit-btn:hover i {
    transform: translateX(3px);
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Enhanced Focus States */
.form-group:focus-within label {
    color: var(--glow-color-1);
    text-shadow: 0 0 8px var(--glow-color-1);
}

/* Professional Form Footer */
.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: clamp(1.5rem, 4vw, 2rem);
    padding: clamp(1rem, 3vw, 1.5rem);
    background: rgba(255, 255, 255, 0.02);
    border-radius: clamp(6px, 1.5vw, 8px);
    border: 1px solid rgba(0, 168, 255, 0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

.form-footer-text {
    font-size: clamp(0.8rem, 2.2vw, 0.9rem);
    color: rgba(224, 247, 250, 0.7);
    line-height: 1.4;
    flex: 1;
    min-width: 200px;
}

.form-footer-text a {
    color: var(--glow-color-1);
    text-decoration: none;
    transition: color 0.3s ease;
}

.form-footer-text a:hover {
    color: var(--glow-color-2);
}

/* Enhanced Accessibility */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
}

.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group textarea:focus-visible {
    outline: 2px solid var(--glow-color-1);
    outline-offset: 2px;
}

/* Professional Animation Enhancements */
.form-group {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

/* Updated animation delays for new field arrangement - Email appears first */
.form-container .form-group:nth-child(2) { animation-delay: 0.1s; } /* Email - primary field */
.form-container .form-group:nth-child(1) { animation-delay: 0.2s; } /* Full Name */
.form-container .form-group:nth-child(3) { animation-delay: 0.3s; } /* Phone */
.form-container .form-group:nth-child(4) { animation-delay: 0.4s; } /* Company */
.form-container .form-group:nth-child(5) { animation-delay: 0.5s; } /* Budget */

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Mobile-First Responsive Breakpoints - Mobile Theme with PC Field Justification */

/* PC-specific form container adjustments with mobile theme colors */
@media (min-width: 768px) {
    .form-container {
        align-items: start;
    }
    
    /* Ensure proper spacing for horizontally arranged fields */
    .form-group {
        margin-bottom: 0;
    }
    
    /* Adjust fieldset padding for horizontal layout */
    #contact-form fieldset {
        padding: clamp(2rem, 4vw, 3rem);
    }
    
    /* Enhanced mobile theme colors for PC view */
    .form-group input,
    .form-group select,
    .form-group textarea {
        background: rgba(255, 255, 255, 0.05);
        border: 2px solid rgba(0, 168, 255, 0.2);
        color: var(--text-color);
        box-shadow: 0 0 10px rgba(0, 229, 255, 0.1);
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: var(--glow-color-1);
        box-shadow:
            0 0 0 3px rgba(0, 168, 255, 0.1),
            0 4px 12px rgba(0, 168, 255, 0.15),
            0 0 20px rgba(0, 229, 255, 0.2);
        background: rgba(255, 255, 255, 0.08);
    }
    
    /* Mobile theme glow effects for PC */
    .form-group label {
        color: var(--text-color);
        text-shadow: 0 0 3px var(--glow-color-1);
    }
    
    .form-group:focus-within label {
        color: var(--glow-color-1);
        text-shadow: 0 0 8px var(--glow-color-1);
    }
    
    /* Enhanced fieldset styling with mobile theme */
    #contact-form fieldset {
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
        border: 1px solid rgba(0, 168, 255, 0.2);
        box-shadow: 0 8px 32px rgba(0, 168, 255, 0.1);
    }
    
    #contact-form fieldset:hover {
        border-color: rgba(0, 168, 255, 0.4);
        box-shadow: 0 12px 40px rgba(0, 168, 255, 0.15);
    }
}

/* Wide screen optimizations with mobile theme consistency */
@media (min-width: 1200px) {
    .form-container {
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Optimize checkbox layout for very wide screens */
    .checkbox-group {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Maintain mobile theme colors on wide screens */
    .checkbox-group label {
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(0, 168, 255, 0.1);
    }
    
    .checkbox-group label:hover {
        background: rgba(0, 168, 255, 0.1);
        box-shadow: 0 2px 8px rgba(0, 168, 255, 0.2);
    }
}

/* Enhanced Touch Device Support */
@media (hover: none) and (pointer: coarse) {
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 48px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .checkbox-group label {
        min-height: 44px;
        padding: 0.75rem;
    }
    
    .submit-btn {
        min-height: 56px;
        padding: 1.25rem 2.5rem;
    }
    
    .checkbox-group input[type="checkbox"] {
        width: 1.25rem;
        height: 1.25rem;
    }
}

/* Universal PC/Desktop Form Enhancements - Applied Across All Forms */
@media (hover: hover) and (pointer: fine) {
    
    /* Enhanced PC form interactions - Universal for all form elements */
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 52px;
        font-size: 1rem;
        cursor: text;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: rgba(1, 4, 24, 0.85);
        border-color: rgba(0, 168, 255, 0.5);
        color: #E0F7FA;
    }
    
    .form-group select {
        cursor: pointer;
        background-size: 18px;
        background: rgba(1, 4, 24, 0.85);
        border-color: rgba(0, 168, 255, 0.5);
        color: #E0F7FA;
    }
    
    .checkbox-group label {
        min-height: 42px;
        padding: 0.6rem 0.8rem;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .checkbox-group label:hover {
        background: rgba(0, 168, 255, 0.25);
        border-color: rgba(0, 168, 255, 0.4);
        color: var(--glow-color-2);
        text-shadow: 0 0 4px var(--glow-color-1);
        transform: translateX(3px);
        box-shadow: 0 2px 8px rgba(0, 168, 255, 0.3);
    }
    
    .submit-btn {
        min-height: 56px;
        padding: 1.125rem 2.75rem;
        font-size: 1.05rem;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .submit-btn:hover {
        transform: translateY(-4px) scale(1.03);
        box-shadow:
            0 12px 35px rgba(0, 229, 255, 0.4),
            0 6px 12px rgba(0, 0, 0, 0.15);
        animation-duration: 1.2s;
    }
    
    .submit-btn:active {
        transform: translateY(-2px) scale(0.99);
        transition: all 0.15s ease;
    }
    
    /* Enhanced fieldset hover effects for PC - Universal */
    #contact-form fieldset,
    fieldset {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    #contact-form fieldset:hover,
    fieldset:hover {
        border-color: rgba(0, 168, 255, 0.5);
        box-shadow:
            0 15px 45px rgba(0, 168, 255, 0.2),
            0 8px 25px rgba(0, 168, 255, 0.1);
        transform: translateY(-3px);
    }
    
    /* PC-specific form group enhancements - Universal */
    .form-group {
        transition: all 0.2s ease;
    }
    
    .form-group:hover {
        transform: translateY(-1px);
    }
    
    /* Enhanced focus states for PC - Universal */
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        outline: none;
        border-color: var(--glow-color-1);
        box-shadow:
            0 0 0 3px rgba(0, 168, 255, 0.15),
            0 6px 20px rgba(0, 168, 255, 0.2),
            0 2px 8px rgba(0, 0, 0, 0.1);
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-2px);
    }
    
    .form-group:focus-within label {
        color: var(--glow-color-1);
        text-shadow: 0 0 12px rgba(0, 168, 255, 0.6);
    }
    
    /* Enhanced validation states for PC - Universal */
    .form-group input:valid:not(:placeholder-shown),
    .form-group select:valid,
    .form-group textarea:valid:not(:placeholder-shown) {
        border-color: rgba(0, 229, 255, 0.8);
        box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
    }
    
    .form-group input:invalid:not(:placeholder-shown),
    .form-group textarea:invalid:not(:placeholder-shown) {
        border-color: rgba(255, 87, 34, 0.8);
        box-shadow: 0 0 12px rgba(255, 87, 34, 0.2);
    }
    
    .form-group input:invalid:not(:placeholder-shown):focus,
    .form-group textarea:invalid:not(:placeholder-shown):focus {
        border-color: rgba(255, 87, 34, 1);
        box-shadow:
            0 0 0 3px rgba(255, 87, 34, 0.2),
            0 6px 20px rgba(255, 87, 34, 0.3);
    }
    
    /* Enhanced visual connections for PC layout */
    .form-container .form-group:nth-child(1)::after,
    .form-container .form-group:nth-child(2)::after {
        opacity: 0.8;
        transition: opacity 0.3s ease;
    }
    
    .form-container:hover .form-group:nth-child(1)::after,
    .form-container:hover .form-group:nth-child(2)::after {
        opacity: 1;
    }
}

/* Future-Proof Universal Form Styling - Applied to All Pages */
@media (hover: hover) and (pointer: fine) {
    
    /* Apply enhanced styling to any future forms across all pages */
    form {
        font-family: 'Roboto', sans-serif;
    }
    
    form fieldset {
        border: 1px solid rgba(0, 168, 255, 0.2);
        border-radius: 12px;
        padding: 2rem;
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 8px 32px rgba(0, 168, 255, 0.1);
    }
    
    form legend {
        font-family: 'Orbitron', sans-serif;
        color: var(--glow-color-2);
        font-size: 1.2rem;
        font-weight: 600;
        padding: 0 1rem;
        text-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
    }
    
    form input,
    form select,
    form textarea {
        background: rgba(255, 255, 255, 0.05);
        border: 2px solid rgba(0, 168, 255, 0.2);
        border-radius: 8px;
        padding: 1rem;
        color: var(--text-color);
        font-family: 'Roboto', sans-serif;
        font-size: 1rem;
        min-height: 52px;
        transition: all 0.3s ease;
    }
    
    form button[type="submit"] {
        background: linear-gradient(135deg, var(--glow-color-1), var(--glow-color-2), var(--glow-color-1));
        color: var(--text-color);
        border: none;
        border-radius: 12px;
        padding: 1.125rem 2.75rem;
        font-family: 'Orbitron', sans-serif;
        font-size: 1.05rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 4px 20px rgba(0, 229, 255, 0.3);
    }
}

/* Print Styles */
@media print {
    #contact-form {
        background: white !important;
        color: black !important;
    }
    
    #contact-form form {
        box-shadow: none !important;
        background: white !important;
    }
    
    #contact-form fieldset {
        border: 1px solid #ccc !important;
        background: white !important;
        box-shadow: none !important;
    }
    
    .submit-btn {
        display: none !important;
    }
}

/* Footer Navigation Styles */
.footer {
    text-align: center;
    margin: 10px 0;
    padding: 10px 0;
    background-color: rgba(1, 4, 24, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(0, 168, 255, 0.2);
}

.footer ul {
    display: flex;
    justify-content: center;
    gap: 20px;
    list-style: none;
    padding: 0;
}

.footer li {
    margin: 0;
}

.footer a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.footer a:hover {
    background-color: rgba(0, 168, 255, 0.1);
    transform: translateY(-2px);
}

.footer img {
    width: 12px;
    height: 12px;
    vertical-align: middle;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer ul {
        gap: 10px;
    }

    .footer a {
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .footer ul {
        gap: 5px;
    }

    .footer a {
        padding: 0.4rem 0.5rem;
        font-size: 0.9rem;
    }
}
}