/* CONTACT SECTION - "THE NEURAL NEXUS" */
/* Concept: Connecting dots, glowing pathways, clean and futuristic communication interface */

.contact-section {
    position: relative;
    padding: 150px 0;
    /* Huge padding for grandeur */
    background-color: #050505;
    /* Deep cyber black */
    color: #fff;
    z-index: 6;
    /* Below portfolio */
    margin-top: -80px;
    /* EXTRAORDINARY SEPARATION: "The Data Breach" */
    /* A jagged, tech-inspired cut */
    clip-path: polygon(0 100px,
            20% 0,
            35% 80px,
            50% 0,
            65% 80px,
            80% 0,
            100% 100px,
            100% 100%,
            0 100%);
    overflow: hidden;
}

.contact-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    pointer-events: none;
}

.contact-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 0 20px;
}

/* LEFT SIDE: VISUAL & INFO */
.contact-visuals {
    position: relative;
}

.contact-title-wrapper {
    position: relative;
    margin-bottom: 30px;
    display: inline-block;
}

.contact-title {
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
    letter-spacing: -2px;
    text-transform: uppercase;
}

/* The Liquid Fill Effect */
.contact-title::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    color: var(--color-cyan);
    overflow: hidden;
    border-right: 4px solid var(--color-magenta);
    white-space: nowrap;
    animation: typingTitle 4s steps(10) infinite alternate;
    filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.5));
}

@keyframes typingTitle {
    0% {
        width: 0;
    }

    40% {
        width: 100%;
    }

    100% {
        width: 100%;
    }
}

.contact-subtitle-bar {
    width: 100px;
    height: 6px;
    background: linear-gradient(90deg, var(--color-magenta), var(--color-yellow));
    margin-top: 15px;
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(255, 0, 230, 0.6);
}

@media (max-width: 768px) {
    .contact-title {
        font-size: 3rem;
        -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    }

    .contact-title-wrapper {
        margin-bottom: 20px;
    }

    .contact-subtitle-bar {
        height: 4px;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .contact-title {
        font-size: 2.2rem;
    }
}

.contact-desc {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 40px;
    max-width: 450px;
}

/* FRAME: THE PORTAL WINDOW */
.contact-img-frame {
    width: 100%;
    height: 450px;
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    border: none;
    transform: perspective(1000px) rotateY(2deg);
    transition: all 0.5s ease;
}

.contact-img-frame:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.9),
        0 0 30px rgba(86, 186, 231, 0.2);
}

.contact-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    filter: brightness(0.9) contrast(1.1);
}

.contact-img-frame:hover .contact-img {
    transform: scale(1.1);
    filter: brightness(1) contrast(1.2);
}

.contact-overlay-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(5, 5, 16, 0.9) 100%);
    pointer-events: none;
    z-index: 2;
}

/* DECORATIVE CORNERS for the Image */
.contact-img-frame::after {
    content: '';
    position: absolute;
    inset: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 3;
    transition: all 0.5s ease;
}

.contact-img-frame:hover::after {
    inset: 15px;
    border-color: var(--color-cyan);
    opacity: 1;
    box-shadow: 0 0 20px rgba(86, 186, 231, 0.4);
}

/* RIGHT SIDE: THE ULTRA FORM - REDESIGNED */
/* RIGHT SIDE: THE ULTRA FORM - REDESIGNED "HOLOGRAPHIC CONSOLE" */
.contact-form-wrapper {
    background: linear-gradient(135deg, rgba(20, 25, 40, 0.8), rgba(10, 10, 20, 0.9));
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    padding: 60px 50px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle border */
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.7),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Moving Border Light Effect */
.contact-form-wrapper::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, transparent, transparent, var(--color-cyan));
    animation: rotateBorder 4s linear infinite;
    z-index: -1;
    opacity: 0.3;
}

/* Inner Background to hide rotation center */
.contact-form-inner-bg {
    /* Use pseudo-element trick or just layer it */
    /* Handled by background on wrapper, this is for effect */
}

@keyframes rotateBorder {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Header Line Gradient */
.contact-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-cyan), var(--color-magenta), var(--color-yellow));
    z-index: 10;
}

.form-group {
    position: relative;
    margin-bottom: 35px;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 20px;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: #fff;
    border-radius: 12px;
    outline: none;
    transition: all 0.4s ease;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

.form-input:focus {
    background: rgba(0, 229, 255, 0.05);
    border-color: var(--color-cyan);
    box-shadow:
        0 0 0 4px rgba(0, 229, 255, 0.1),
        inset 0 0 20px rgba(0, 229, 255, 0.05);
    padding-left: 20px;
}

.form-label {
    position: absolute;
    top: 15px;
    left: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-heading);
    letter-spacing: 1px;
    pointer-events: none;
    transition: all 0.4s ease;
    font-size: 0.95rem;
    text-transform: uppercase;
}

/* Floating label logic */
.form-input:focus~.form-label,
.form-input:not(:placeholder-shown)~.form-label {
    top: -22px;
    left: 0;
    font-size: 0.8rem;
    color: var(--color-magenta);
    letter-spacing: 2px;
    font-weight: 700;
}

.submit-btn {
    width: 100%;
    padding: 22px;
    background: #000;
    border: 1px solid var(--color-cyan);
    border-radius: 12px;
    color: var(--color-cyan);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 10;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, var(--color-cyan), transparent 60%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s ease;
    z-index: -1;
}

.submit-btn:hover {
    color: #000;
    border-color: transparent;
    box-shadow: 0 0 50px rgba(0, 229, 255, 0.6);
    transform: translateY(-2px);
}

.submit-btn:hover::before {
    transform: translate(-50%, -50%) scale(1);
}


/* Success/Error Messages */
#form-status {
    margin-top: 20px;
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.9rem;
    min-height: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

#form-status.success {
    color: #00ff88;
    opacity: 1;
}

#form-status.error {
    color: #ff3333;
    opacity: 1;
}

/* Responsive */
@media (max-width: 900px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-title {
        font-size: 3rem;
    }

    .contact-img-frame {
        height: 250px;
    }

    .contact-section {
        clip-path: polygon(0 50px, 100% 0, 100% 100%, 0 100%);
        /* Simpler cut for mobile */
    }
}