        /* Prevent flash of unstyled content */
        html,
        body {
            background-color: #121212 !important;
            color: #ffffff !important;
            margin: 0;
            padding: 0;
        }

        html[data-theme="light"],
        html[data-theme="light"] body {
            background-color: #f5f7f9 !important;
            color: #2c3e50 !important;
        }

        /* Light theme specific improvements */
        [data-theme="light"] .contact-form,
        [data-theme="light"] .contact-info,
        [data-theme="light"] .faq-section {
            border: 1px solid var(--border-color);
        }

        :root {
            --secondary-color: #00c853;
            --primary-hover: #1565c0;
            --hover-color: rgba(25, 118, 210, 0.1);
        }

        /* Theme Switch Styles */
        .theme-switch {
            --toggle-size: 18px;
            --container-width: 4em;
            --container-height: 1.8em;
            --container-radius: 4.5em;
            --circle-container-diameter: 2.4em;
            --sun-moon-diameter: 1.5em;
            --container-light-bg: #3D7EAE;
            --container-night-bg: #1D1F2C;
            --sun-bg: #ECCA2F;
            --moon-bg: #C4C9D1;
            --spot-color: #959DB1;
            --circle-container-offset: calc((var(--circle-container-diameter) - var(--container-height)) / 2 * -1);
            --stars-color: #fff;
            --clouds-color: #F3FDFF;
            --back-clouds-color: #AACADF;
            --transition: .5s cubic-bezier(0, -0.02, 0.4, 1.25);
            --circle-transition: .3s cubic-bezier(0, -0.02, 0.35, 1.17);
        }

        .theme-switch,
        .theme-switch *,
        .theme-switch *::before,
        .theme-switch *::after {
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-size: var(--toggle-size);
        }

        .theme-switch__container {
            width: var(--container-width);
            height: var(--container-height);
            background-color: var(--container-light-bg);
            border-radius: var(--container-radius);
            overflow: hidden;
            cursor: pointer;
            -webkit-box-shadow: 0em -0.062em 0.062em rgba(0, 0, 0, 0.25), 0em 0.062em 0.125em rgba(255, 255, 255, 0.94);
            box-shadow: 0em -0.062em 0.062em rgba(0, 0, 0, 0.25), 0em 0.062em 0.125em rgba(255, 255, 255, 0.94);
            -webkit-transition: var(--transition);
            -o-transition: var(--transition);
            transition: var(--transition);
            position: relative;
        }

        .theme-switch__container::before {
            content: "";
            position: absolute;
            z-index: 1;
            inset: 0;
            -webkit-box-shadow: 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset, 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset;
            box-shadow: 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset, 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset;
            border-radius: var(--container-radius)
        }

        .theme-switch__checkbox {
            display: none;
        }

        .theme-switch__circle-container {
            width: var(--circle-container-diameter);
            height: var(--circle-container-diameter);
            background-color: rgba(255, 255, 255, 0.1);
            position: absolute;
            left: var(--circle-container-offset);
            top: var(--circle-container-offset);
            border-radius: var(--container-radius);
            -webkit-box-shadow: inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), 0 0 0 0.625em rgba(255, 255, 255, 0.1), 0 0 0 1.25em rgba(255, 255, 255, 0.1);
            box-shadow: inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), 0 0 0 0.625em rgba(255, 255, 255, 0.1), 0 0 0 1.25em rgba(255, 255, 255, 0.1);
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            -webkit-transition: var(--circle-transition);
            -o-transition: var(--circle-transition);
            transition: var(--circle-transition);
            pointer-events: none;
        }

        .theme-switch__sun-moon-container {
            pointer-events: auto;
            position: relative;
            z-index: 2;
            width: var(--sun-moon-diameter);
            height: var(--sun-moon-diameter);
            margin: auto;
            border-radius: var(--container-radius);
            background-color: var(--sun-bg);
            -webkit-box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #a1872a inset;
            box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #a1872a inset;
            -webkit-filter: drop-shadow(0.062em 0.125em 0.125em rgba(0, 0, 0, 0.25)) drop-shadow(0em 0.062em 0.125em rgba(0, 0, 0, 0.25));
            filter: drop-shadow(0.062em 0.125em 0.125em rgba(0, 0, 0, 0.25)) drop-shadow(0em 0.062em 0.125em rgba(0, 0, 0, 0.25));
            overflow: hidden;
            -webkit-transition: var(--transition);
            -o-transition: var(--transition);
            transition: var(--transition);
        }

        .theme-switch__moon {
            -webkit-transform: translateX(100%);
            -ms-transform: translateX(100%);
            transform: translateX(100%);
            width: 100%;
            height: 100%;
            background-color: var(--moon-bg);
            border-radius: inherit;
            -webkit-box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #969696 inset;
            box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #969696 inset;
            -webkit-transition: var(--transition);
            -o-transition: var(--transition);
            transition: var(--transition);
            position: relative;
        }

        .theme-switch__spot {
            position: absolute;
            top: 0.75em;
            left: 0.312em;
            width: 0.75em;
            height: 0.75em;
            border-radius: var(--container-radius);
            background-color: var(--spot-color);
            -webkit-box-shadow: 0em 0.0312em 0.062em rgba(0, 0, 0, 0.25) inset;
            box-shadow: 0em 0.0312em 0.062em rgba(0, 0, 0, 0.25) inset;
        }

        .theme-switch__spot:nth-of-type(2) {
            width: 0.375em;
            height: 0.375em;
            top: 0.937em;
            left: 1.375em;
        }

        .theme-switch__spot:nth-last-of-type(3) {
            width: 0.25em;
            height: 0.25em;
            top: 0.312em;
            left: 0.812em;
        }

        .theme-switch__clouds {
            width: 1.25em;
            height: 1.25em;
            background-color: var(--clouds-color);
            border-radius: var(--container-radius);
            position: absolute;
            bottom: -0.625em;
            left: 0.312em;
            -webkit-box-shadow: 0.937em 0.312em var(--clouds-color), -0.312em -0.312em var(--back-clouds-color), 1.437em 0.375em var(--clouds-color), 0.5em -0.125em var(--back-clouds-color), 2.187em 0 var(--clouds-color), 1.25em -0.062em var(--back-clouds-color), 2.937em 0.312em var(--clouds-color), 2em -0.312em var(--back-clouds-color), 3.625em -0.062em var(--clouds-color), 2.625em 0em var(--back-clouds-color), 4.5em -0.312em var(--clouds-color), 3.375em -0.437em var(--back-clouds-color), 4.625em -1.75em 0 0.437em var(--clouds-color), 4em -0.625em var(--back-clouds-color), 4.125em -2.125em 0 0.437em var(--back-clouds-color);
            box-shadow: 0.937em 0.312em var(--clouds-color), -0.312em -0.312em var(--back-clouds-color), 1.437em 0.375em var(--clouds-color), 0.5em -0.125em var(--back-clouds-color), 2.187em 0 var(--clouds-color), 1.25em -0.062em var(--back-clouds-color), 2.937em 0.312em var(--clouds-color), 2em -0.312em var(--back-clouds-color), 3.625em -0.062em var(--clouds-color), 2.625em 0em var(--back-clouds-color), 4.5em -0.312em var(--clouds-color), 3.375em -0.437em var(--back-clouds-color), 4.625em -1.75em 0 0.437em var(--clouds-color), 4em -0.625em var(--back-clouds-color), 4.125em -2.125em 0 0.437em var(--back-clouds-color);
            -webkit-transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
            -o-transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
            transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
        }

        .theme-switch__stars-container {
            position: absolute;
            color: var(--stars-color);
            top: -100%;
            left: 0.312em;
            width: 2.75em;
            height: auto;
            -webkit-transition: var(--transition);
            -o-transition: var(--transition);
            transition: var(--transition);
        }

        /* Theme Switch Actions */
        .theme-switch__checkbox:checked+.theme-switch__container {
            background-color: var(--container-night-bg);
        }

        .theme-switch__checkbox:checked+.theme-switch__container .theme-switch__circle-container {
            left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter));
        }

        .theme-switch__checkbox:checked+.theme-switch__container .theme-switch__circle-container:hover {
            left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter) - 0.187em)
        }

        .theme-switch__circle-container:hover {
            left: calc(var(--circle-container-offset) + 0.187em);
        }

        .theme-switch__checkbox:checked+.theme-switch__container .theme-switch__moon {
            -webkit-transform: translate(0);
            -ms-transform: translate(0);
            transform: translate(0);
        }

        .theme-switch__checkbox:checked+.theme-switch__container .theme-switch__clouds {
            bottom: -4.062em;
        }

        .theme-switch__checkbox:checked+.theme-switch__container .theme-switch__stars-container {
            top: 50%;
            -webkit-transform: translateY(-50%);
            -ms-transform: translateY(-50%);
            transform: translateY(-50%);
        }

        /* Fade Animation Keyframes */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Performance optimizations for animations */
        .hero-section,
        .contact-grid,
        .faq-section {
            will-change: transform, opacity;
            backface-visibility: hidden;
        }

        /* Staggered animations for FAQ items */
        .faq-item {
            animation: fadeInUp 0.6s ease-out forwards;
            opacity: 0;
        }

        .faq-item:nth-child(1) {
            animation-delay: 0.2s;
        }

        .faq-item:nth-child(2) {
            animation-delay: 0.3s;
        }

        .faq-item:nth-child(3) {
            animation-delay: 0.4s;
        }

        .faq-item:nth-child(4) {
            animation-delay: 0.5s;
        }

        .faq-item:nth-child(5) {
            animation-delay: 0.6s;
        }

        .faq-item:nth-child(6) {
            animation-delay: 0.7s;
        }

        .faq-item:nth-child(7) {
            animation-delay: 0.8s;
        }

        .contact-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 2rem;
        }

        .hero-section {
            text-align: center;
            padding: 10px 0 20px 0;
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            border-radius: 20px;
            margin-bottom: 2rem;
            color: white;
            animation: fadeInUp 0.8s ease-out;
        }

        .hero-section h1 {
            font-size: 2.2rem;
            font-weight: 600;
        }

        .hero-section p {
            font-size: 1rem;
            opacity: 0.9;
            max-width: 600px;
            margin: 0 auto;
        }

        .contact-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 3rem;
            margin-bottom: 3rem;
            animation: fadeInUp 1s ease-out forwards;
        }

        .contact-form {
            background: var(--card-bg);
            border-radius: 20px;
            padding: 2.5rem;
            box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            animation: fadeInUp 0.8s ease-out forwards;
            opacity: 0;
            animation-delay: 0.2s;
        }

        .contact-info {
            background: var(--card-bg);
            border-radius: 20px;
            padding: 2.5rem;
            box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            animation: fadeInUp 0.8s ease-out forwards;
            opacity: 0;
            animation-delay: 0.4s;
        }

        /* Light theme specific improvements */
        [data-theme="light"] .contact-form,
        [data-theme="light"] .contact-info {
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        }

        [ data-theme="light"] .hero-section h1 {
            color: rgba(0, 0, 0, 0.722);
        }

        [ data-theme="light"] .hero-section p {
            color: rgba(0, 0, 0, 0.735);
        }

        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            color: var(--text-primary);
            font-weight: 500;
        }

        .form-group input,
        .form-group textarea,
        .form-group select {
            width: 100%;
            padding: 0.75rem;
            border: 2px solid var(--border-color);
            border-radius: 10px;
            background: var(--bg-color);
            color: var(--text-primary);
            font-family: inherit;
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }

        .form-group input:focus,
        .form-group textarea:focus,
        .form-group select:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
        }

        .form-group textarea {
            resize: vertical;
            min-height: 120px;
        }

        .submit-btn {
            background: var(--primary-color);
            color: white;
            border: none;
            padding: 0.75rem 2rem;
            border-radius: 10px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            width: 100%;
        }

        .submit-btn:hover {
            background: var(--primary-hover);
            transform: translateY(-2px);
        }

        .contact-item {
            display: flex;
            align-items: center;
            margin-bottom: 2rem;
            padding: 1.5rem;
            background: var(--bg-color);
            border-radius: 15px;
            transition: transform 0.3s ease;
            border: 1px solid var(--border-color);
        }

        .contact-item:hover {
            transform: translateX(5px);
            border-color: var(--primary-color);
        }

        /* Light theme specific improvements */
        [data-theme="light"] .contact-item {
            background: #fafafa;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }

        [data-theme="light"] .contact-item:hover {
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .contact-icon {
            width: 50px;
            height: 50px;
            background: var(--primary-color);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 1rem;
            color: white;
            font-size: 1.2rem;
        }

        .contact-details h4 {
            margin: 0 0 0.5rem 0;
            color: var(--text-primary);
        }

        .contact-details p {
            margin: 0;
            color: var(--text-secondary);
        }

        .contact-details a {
            color: var(--primary-color);
            text-decoration: none;
        }

        .contact-details a:hover {
            text-decoration: underline;
        }

        /* .social-section {
            background: var(--card-bg);
            border-radius: 20px;
            padding: 2.5rem;
            text-align: center;
            box-shadow: var(--shadow);
            margin-bottom: 3rem;
        } */

        .social-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1.5rem;
            margin-top: 2rem;
        }

        .social-card {
            background: var(--card-bg);
            border-radius: 15px;
            padding: 2rem;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            border: 1px solid var(--border-color);
        }

        .social-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-hover);
            border-color: var(--primary-color);
        }

        /* Light theme specific improvements */
        [data-theme="light"] .social-card {
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }

        .social-icon {
            font-size: 2.5rem;
            margin-bottom: 1rem;
        }

        .social-card.linkedin .social-icon {
            color: #0077b5;
        }

        .social-card.github .social-icon {
            color: #333;
        }

        .social-card.instagram .social-icon {
            color: #e4405f;
        }

        .faq-section {
            background: var(--card-bg);
            border-radius: 20px;
            padding: 2.5rem;
            box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            animation: fadeInUp 1.2s ease-out forwards;
        }

        .faq-item {
            margin-bottom: 1.5rem;
            border: 1px solid var(--border-color);
            border-radius: 10px;
            overflow: hidden;
        }

        .faq-question {
            background: var(--bg-color);
            padding: 1rem 1.5rem;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: background-color 0.3s ease;
        }

        /* Light theme specific improvements */
        [data-theme="light"] .faq-section {
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        }

        [data-theme="light"] .faq-question {
            background: #fafafa;
            border-bottom: 1px solid var(--border-color);
        }

        .faq-question:hover {
            background: var(--hover-color);
        }

        .faq-answer {
            padding: 1.5rem;
            background: var(--card-bg);
            display: none;
            color: var(--text-secondary);
            line-height: 1.6;
        }

        .faq-answer.active {
            display: block;
        }

        .faq-icon {
            transition: transform 0.3s ease;
        }

        .faq-item.active .faq-icon {
            transform: rotate(180deg);
        }

        .success-message {
            background: #d4edda;
            color: #155724;
            padding: 1rem;
            border-radius: 10px;
            margin-bottom: 1rem;
            display: none;
        }

        .error-message {
            background: #f8d7da;
            color: #721c24;
            padding: 1rem;
            border-radius: 10px;
            margin-bottom: 1rem;
            display: none;
        }

        @media (max-width: 768px) {
            .contact-container {
                padding: 0.75rem;
            }

            .hero-section {
                padding: 1rem 0;
                margin-bottom: 1.5rem;
                border-radius: 15px;
            }

            .hero-section h1 {
                font-size: 1.4rem;
                margin-bottom: 0.5rem;
            }
             .hero-section p {
                font-size: 0.8rem;
                margin: 0;
             }

            .contact-grid {
                grid-template-columns: 1fr;
                gap: 1.5rem;
                margin-bottom: 2rem;
            }

            .contact-form,
            .contact-info {
                padding: 1.25rem;
                border-radius: 15px;
            }

            .contact-form h2,
            .contact-info h2 {
                font-size: 1.3rem;
                margin-bottom: 1rem;
            }

            /* Compact form styles for mobile */
            .form-group {
                margin-bottom: 1rem;
            }

            .form-group label {
                font-size: 0.9rem;
                margin-bottom: 0.4rem;
                font-weight: 500;
            }

            .form-group input,
            .form-group textarea,
            .form-group select {
                padding: 0.6rem;
                font-size: 0.9rem;
                border-radius: 8px;
                border-width: 1px;
            }

            .form-group textarea {
                min-height: 100px;
            }

            .submit-btn {
                padding: 0.75rem 1.5rem;
                font-size: 0.9rem;
                border-radius: 8px;
                width: 100%;
                margin-top: 0.5rem;
            }

            /* Compact contact info styles */
            .contact-item {
                align-items: flex-start;
                padding: 0.75rem;
                margin-bottom: 0.75rem;
                border-radius: 10px;
            }

            .contact-icon {
                width: 40px;
                height: 40px;
                min-width: 40px;
                min-height: 40px;
                flex-shrink: 0;
                margin-right: 0.75rem;
                margin-top: 0.1rem;
                font-size: 1rem;
            }

            .contact-item h3 {
                font-size: 1rem;
                margin-bottom: 0.25rem;
            }

            .contact-item p {
                font-size: 0.85rem;
                line-height: 1.4;
                margin: 0;
            }

            .social-grid {
                grid-template-columns: 1fr;
                gap: 0.75rem;
            }

            /* Compact FAQ section for mobile */
            .faq-section {
                padding: 1.25rem;
                border-radius: 15px;
            }

            .faq-section h2 {
                font-size: 1.3rem;
                margin-bottom: 1rem;
            }

            .faq-item {
                margin-bottom: 1rem;
                border-radius: 8px;
            }

            .faq-question {
                padding: 0.75rem 1rem;
                font-size: 0.9rem;
                font-weight: 500;
            }

            .faq-answer {
                padding: 1rem;
                font-size: 0.85rem;
                line-height: 1.5;
            }

            .faq-icon {
                font-size: 0.8rem;
            }

            /* Theme switch mobile styles */
            .theme-switch {
                --toggle-size: 16px;
            }
        }

        /* Extra small screens optimization */
        @media (max-width: 480px) {
            .contact-container {
                padding: 0.5rem;
            }

            .hero-section {
                padding: 0.75rem 0;
                margin-bottom: 1rem;
            }

            .hero-section h1 {
                font-size: 1.2rem;
            }

            .hero-section p {
                font-size: 0.8rem;
                max-width: 330px;
            }

            .contact-grid {
                gap: 1rem;
                margin-bottom: 1.5rem;
            }

            .contact-form,
            .contact-info,
            .faq-section {
                padding: 1rem;
                border-radius: 12px;
            }

            .contact-form h2,
            .contact-info h2,
            .faq-section h2 {
                font-size: 1.1rem;
                margin-bottom: 0.75rem;
            }

            .form-group {
                margin-bottom: 0.75rem;
            }

            .form-group label {
                font-size: 0.85rem;
                margin-bottom: 0.3rem;
            }

            .form-group input,
            .form-group textarea,
            .form-group select {
                padding: 0.5rem;
                font-size: 0.85rem;
            }

            .form-group textarea {
                min-height: 80px;
            }

            .submit-btn {
                padding: 0.65rem 1.25rem;
                font-size: 0.85rem;
                width: 100%;
                margin-top: 0.5rem;
            }

            .contact-item {
                padding: 0.6rem;
                margin-bottom: 0.6rem;
            }

            .contact-icon {
                width: 35px;
                height: 35px;
                min-width: 35px;
                min-height: 35px;
                font-size: 0.9rem;
                margin-right: 0.6rem;
            }

            .contact-item h3 {
                font-size: 0.9rem;
                margin-bottom: 0.2rem;
            }

            .contact-item p {
                font-size: 0.8rem;
            }

            .faq-item {
                margin-bottom: 0.75rem;
            }

            .faq-question {
                padding: 0.6rem 0.8rem;
                font-size: 0.85rem;
            }

            .faq-answer {
                padding: 0.8rem;
                font-size: 0.8rem;
            }

            .faq-icon {
                font-size: 0.75rem;
            }
        }