* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Default theme variables - will be overridden by JavaScript */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --hero-gradient-start: #667eea;
    --hero-gradient-end: #764ba2;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Split Screen Container */
.split-container {
    display: table;
    width: 100%;
    height: 100vh;
    table-layout: fixed;
}

.split-left,
.split-right {
    display: table-cell;
    width: 60%;
    height: 100vh;
    vertical-align: middle;
}

/* Layout: Classic Split (Default) */
.layout-classic .split-left,
.layout-classic .split-right {
    /* Uses default table-cell layout - no modifications needed */
}

/* Layout: Diagonal Split */
.layout-diagonal {
    display: flex !important;
    position: relative;
    overflow: hidden;
}

.layout-diagonal .split-left,
.layout-diagonal .split-right {
    display: block !important;
    position: relative;
    width: auto !important;
}

.layout-diagonal .split-left {
    flex: 0 0 60%;
    clip-path: polygon(0 0, 100% 0, 75% 100%, 0 100%);
    z-index: 2;
}

.layout-diagonal .split-right {
    flex: 0 0 55%;
    margin-left: -15%;
    z-index: 1;
    padding-left: 8%;
}

/* Layout: Blob Split */
.layout-blob {
    display: flex !important;
    position: relative;
    overflow: hidden;
}

.layout-blob .split-left,
.layout-blob .split-right {
    display: block !important;
    position: relative;
    width: auto !important;
}

.layout-blob .split-left {
    flex: 0 0 58%;
    clip-path: polygon(
        0 0,
        100% 0,
        95% 5%,
        98% 10%,
        96% 15%,
        98% 20%,
        95% 25%,
        97% 30%,
        94% 35%,
        96% 40%,
        93% 45%,
        95% 50%,
        92% 55%,
        94% 60%,
        91% 65%,
        93% 70%,
        90% 75%,
        92% 80%,
        89% 85%,
        91% 90%,
        88% 95%,
        90% 100%,
        0 100%
    );
    z-index: 2;
    animation: morphBlob 8s ease-in-out infinite;
}

.layout-blob .split-right {
    flex: 0 0 58%;
    margin-left: -16%;
    z-index: 1;
    padding-left: 10%;
}

.layout-blob .contact-section {
    padding-left: 4rem;
}

@keyframes morphBlob {
    0%, 100% {
        clip-path: polygon(
            0 0, 100% 0, 95% 5%, 98% 10%, 96% 15%, 98% 20%,
            95% 25%, 97% 30%, 94% 35%, 96% 40%, 93% 45%, 95% 50%,
            92% 55%, 94% 60%, 91% 65%, 93% 70%, 90% 75%, 92% 80%,
            89% 85%, 91% 90%, 88% 95%, 90% 100%, 0 100%
        );
    }
    25% {
        clip-path: polygon(
            0 0, 100% 0, 93% 5%, 96% 10%, 94% 15%, 97% 20%,
            93% 25%, 95% 30%, 92% 35%, 94% 40%, 91% 45%, 93% 50%,
            90% 55%, 92% 60%, 89% 65%, 91% 70%, 88% 75%, 90% 80%,
            87% 85%, 89% 90%, 86% 95%, 88% 100%, 0 100%
        );
    }
    50% {
        clip-path: polygon(
            0 0, 100% 0, 97% 5%, 99% 10%, 97% 15%, 99% 20%,
            96% 25%, 98% 30%, 95% 35%, 97% 40%, 94% 45%, 96% 50%,
            93% 55%, 95% 60%, 92% 65%, 94% 70%, 91% 75%, 93% 80%,
            90% 85%, 92% 90%, 89% 95%, 91% 100%, 0 100%
        );
    }
    75% {
        clip-path: polygon(
            0 0, 100% 0, 94% 5%, 97% 10%, 95% 15%, 98% 20%,
            94% 25%, 96% 30%, 93% 35%, 95% 40%, 92% 45%, 94% 50%,
            91% 55%, 93% 60%, 90% 65%, 92% 70%, 89% 75%, 91% 80%,
            88% 85%, 90% 90%, 87% 95%, 89% 100%, 0 100%
        );
    }
}

/* Layout: Curved Wave Split */
.layout-curved {
    display: flex !important;
    position: relative;
    overflow: hidden;
}

.layout-curved .split-left,
.layout-curved .split-right {
    display: block !important;
    position: relative;
    width: auto !important;
}

.layout-curved .split-left {
    flex: 0 0 58%;
    clip-path: polygon(
        0 0,
        100% 0,
        100% 10%,
        98% 15%,
        95% 20%,
        92% 25%,
        88% 30%,
        85% 35%,
        83% 40%,
        82% 45%,
        82% 50%,
        83% 55%,
        85% 60%,
        88% 65%,
        92% 70%,
        95% 75%,
        98% 80%,
        100% 85%,
        100% 100%,
        0 100%
    );
    z-index: 2;
}

.layout-curved .split-right {
    flex: 0 0 58%;
    margin-left: -16%;
    z-index: 1;
    padding-left: 10%;
}

.layout-curved .contact-section {
    padding-left: 4rem;
}

/* Hero Section - Left Side */
.hero {
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(-10px) rotate(-1deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding: 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: slideUp 1s ease-out 0.5s forwards;
    background: linear-gradient(135deg, #fff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    opacity: 0;
    animation: slideUp 1s ease-out 0.7s forwards;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent) 0%, #f97316 100%);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    opacity: 0;
    animation: slideUp 1s ease-out 0.9s forwards;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, #f97316 0%, var(--accent) 100%);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contact Section - Right Side */
.contact-section {
    width: 100%;
    height: 100vh;
    padding: 2rem 1.5rem;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, white 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.layout-diagonal .contact-section {
    padding-left: 3rem;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 2px;
}

.container {
    max-width: 550px;
    margin: 0 auto;
    width: 100%;
}

.contact-header {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.contact-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

.contact-form {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 2rem;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    transition: all 0.3s ease;
}

.contact-form:hover {
    transform: translateY(-5px);
    box-shadow:
        0 35px 70px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    letter-spacing: 0.025em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

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

/* Honeypot field - hidden from users */
.honeypot {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 1.25rem 3rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.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::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.submit-btn:active {
    transform: translateY(0);
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: floatShape 15s infinite linear;
}

.shape:nth-child(1) {
    top: 20%;
    left: 10%;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    top: 60%;
    right: 15%;
    width: 40px;
    height: 40px;
    background: var(--secondary);
    transform: rotate(45deg);
    animation-delay: -5s;
}

.shape:nth-child(3) {
    bottom: 30%;
    left: 20%;
    width: 80px;
    height: 80px;
    background: var(--accent);
    border-radius: 20px;
    animation-delay: -10s;
}

@keyframes floatShape {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

/* Success Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup {
    background: white;
    border-radius: 20px;
    padding: 3rem 2.5rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.popup-overlay.show .popup {
    transform: scale(1);
}

.popup-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: white;
}

.popup h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.popup p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.popup-close {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popup-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.error-popup .popup-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Mobile Responsive - Unified Design for All Layouts */
@media (max-width: 968px) {
    /* Reset all layouts to simple stacked design */
    .split-container,
    .layout-classic,
    .layout-diagonal,
    .layout-blob,
    .layout-curved {
        display: block !important;
        height: auto;
    }

    .split-left,
    .split-right,
    .layout-diagonal .split-left,
    .layout-diagonal .split-right,
    .layout-blob .split-left,
    .layout-blob .split-right,
    .layout-curved .split-left,
    .layout-curved .split-right {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        clip-path: none !important;
        margin-left: 0 !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        animation: none !important;
        flex: none !important;
    }

    /* Compact Hero Section - 30% of viewport */
    .hero {
        height: 30vh;
        min-height: 250px;
        max-height: 30vh;
        padding: 1.5rem 1rem;
    }

    .hero-content {
        padding: 0.5rem;
    }

    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 0.75rem;
    }

    .hero p {
        font-size: 0.95rem;
        margin-bottom: 1rem;
        line-height: 1.4;
    }

    .cta-button {
        padding: 0.7rem 1.8rem;
        font-size: 0.95rem;
    }

    /* Compact Contact Section - Fits in remaining viewport */
    .contact-section,
    .layout-diagonal .contact-section,
    .layout-blob .contact-section,
    .layout-curved .contact-section {
        height: auto;
        min-height: auto;
        padding: 1.5rem 1rem !important;
    }

    .contact-header {
        margin-bottom: 1.25rem;
    }

    .contact-header h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .contact-header p {
        font-size: 0.9rem;
    }

    /* Compact Form */
    .contact-form {
        padding: 1.5rem 1.25rem;
        margin: 0;
    }

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

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

    .form-group input,
    .form-group textarea {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

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

    .submit-btn {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }

    /* Compact Popup */
    .popup {
        padding: 1.75rem 1.25rem;
        max-width: 320px;
    }

    .popup h3 {
        font-size: 1.3rem;
    }

    .popup p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
}
