/* MY CSS PROD BY JAYTEE XABA */

/* HOME PAGE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

html {
    font-size: 62.5%;
    background: black fixed;
}

body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: black;
    color: white;
    display: flex; 
    flex-direction: column; 
}

header {
    margin-top: 20px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 9%;
    background-color: black;
    filter: drop-shadow(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.name {
    font-size: 3rem;
    color: #1493ff;
    font-weight: 800;
    cursor: pointer;
    transition: 0.5s ease;
}

.name:hover {
    transform: scale(1.1);
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    font-size: 1.8rem;
    color: white;
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
}

nav a:hover,
nav a.active {
    color: #1493ff;
    border-bottom: 3px solid #1493ff;
}

section {
    min-height: 100vh;
    padding: 5rem 9% 5rem;
}

.home {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
    background-color: black;
    flex-grow: 1; 
}

.home .home-content h1 {
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.3;
}

span {
    color: #1493ff;
}

.home-content h3 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.home-content p {
    font-size: 1.6rem;
}

.home-img img {
    position: relative;
    width: 36vw;
    box-shadow: 0 0 25px solid #1493ff;
    cursor: pointer;
    transition: 0.2s linear;
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background-color: transparent;
    border: 0.2rem solid #1493ff;
    font-size: 2rem;
    border-radius: 50%;
    margin: 1.5rem 1.5rem 1.5rem 0;
    transition: 0.3s ease;
    color: #1493ff;
}

.social-icons a:hover {
    color: black;
    transform: scale(1.3) translateY(-5px);
    background-color: #1493ff;
    box-shadow: 0 0 25px #1493ff;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 2.5rem;
    font-weight: 300;
    color: #1493ff;
}

.menu-toggle {
    display: none;
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background-color: black;
    border-radius: 4rem;
    font-size: 1.6rem;
    color: #1493ff;
    letter-spacing: 0.3rem;
    font-weight: 600;
    border: 2px solid #1493ff;
    transition: 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    transform: scale(1.03);
    background-color: #1493ff;
    color: black;
    box-shadow: 0 0 25px #1493ff;
}

.typing-text {
    font-size: 28px;
    font-weight: 600;
    min-width: 250px;
    min-height: 40px;
    display: inline-block;
}

.typing-text span {
    position: relative;
    display: inline-block;
    min-width: 250px;
}

.typing-text span::before {
    content: "software Developer";
    color: #1493ff;
    animation: words 20s infinite;
}

.typing-text span::after {
    content: "";
    background-color: black;
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px solid black;
    right: -8;
    animation: cursor 0.6s infinite;
}

@keyframes cursor {
    to {
        border-left: 3px solid #1493ff;
    }
}

/* === KEYFRAMES === */
@keyframes words {
    0%, 30% {
        content: "Web Developer";
    }
    31%, 45% {
        content: "UI/UX Designer";
    }
    31%, 45% {
        content: "App Developer";
    }
    46%, 60% {
        content: "Prompt Engineer";
    }
    61%, 75% {
        content: "Graphic Designer";
    }
    76%, 100% {
        content: "Creative Technologist";
    }
}

/* ======================================================= */
/* CONTACT PAGE STYLES */
/* ======================================================= */
.contact {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 6rem;
    background-color: black;
    padding: 10rem 9% 5rem;
    flex-wrap: wrap;
}

.contact-text {
    flex: 1;
    min-width: 300px;
}

.contact-text h1 {
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: white;
}

.contact-text p {
    font-size: 1.6rem;
    color: #ccc;
    margin-bottom: 3rem;
}

.email-social h2 {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 1.5rem;
}

.contact form {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
}

.contact form label {
    display: block;
    font-size: 1.6rem;
    color: white;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.contact form input,
.contact form textarea {
    width: 100%;
    padding: 1.2rem 1.5rem;
    font-size: 1.6rem;
    color: white;
    background-color: #1a1a1a; 
    border: 2px solid #333;
    border-radius: 8px;
    margin-bottom: 2rem;
    transition: border-color 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.contact form input:focus,
.contact form textarea:focus {
    border-color: #1493ff;
    outline: none;
}

.contact form textarea {
    resize: vertical;
    min-height: 150px;
}

.contact form button {
    display: inline-block;
    padding: 1.2rem 3rem;
    background-color: #1493ff;
    border-radius: 8px;
    font-size: 1.6rem;
    color: black;
    font-weight: 700;
    border: 2px solid #1493ff;
    transition: 0.3s ease;
    cursor: pointer;
    width: 100%;
}

.contact form button:hover {
    background-color: black;
    color: #1493ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 49, 198, 0.4);
}

footer {
    background-color: black;
    text-align: center;
    padding: 20px 0;
    margin-top: auto; 
    width: 100%;
}

footer p {
    color: white;
    margin: 0;
    font-size: 1.3rem;
}

/* ======================================================= */
/* AI ASSISTANT STYLES */
/* ======================================================= */
.chat-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #1493ff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(40, 49, 198, 0.4);
    z-index: 999;
    transition: transform 0.3s ease;
}

.chat-bubble:hover {
    transform: scale(1.1);
}

.chat-bubble i {
    font-size: 2.4rem;
    color: black;
    animation: blink-icon 2s ease-in-out infinite;
}

@keyframes blink-icon {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 90%;
    max-width: 400px;
    height: 500px;
    background: #111;
    border: 1px solid #1493ff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.chat-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a1a;
    padding: 10px 20px;
    color: #1493ff;
    font-weight: 600;
    font-size: 1.8rem;
    border-bottom: 1px solid #1493ff;
}

.chat-header-title {
    flex-grow: 1;
    text-align: center;
    padding-left: 20px;
}

.chat-close-button {
    background: none;
    border: none;
    color: #888;
    font-size: 2.4rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.chat-close-button:hover {
    color: #fff;
}

.chat-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.5;
    font-size: 1.4rem;
    word-wrap: break-word;
}

.chat-message.user {
    background-color: #1493ff;
    color: black;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-message.bot {
    background-color: #333;
    color: #eaeaea;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-message.bot.loading span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #888;
    animation: pulse 1.5s infinite ease-in-out;
}

.chat-message.bot.loading span:nth-child(1) { animation-delay: 0.1s; }
.chat-message.bot.loading span:nth-child(2) { animation-delay: 0.2s; }
.chat-message.bot.loading span:nth-child(3) { animation-delay: 0.3s; }

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.chat-footer {
    display: flex;
    padding: 10px;
    border-top: 1px solid #333;
}

.chat-footer input {
    flex-grow: 1;
    border: none;
    background: #222;
    padding: 12px;
    border-radius: 8px;
    color: white;
    font-size: 1.4rem;
}

.chat-footer input:focus {
    outline: 1px solid #1493ff;
}

.chat-footer button {
    background: none;
    border: none;
    color: #1493ff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0 15px;
}

/* ======================================================= */
/* RESPONSIVE STYLES */
/* ======================================================= */
@media (max-width: 1000px) {
    .home {
        gap: 4rem;
    }
}

@media (max-width: 995px) {
    header {
        padding: 1.5rem 4%;
    }

    nav {
        display: none;
        position: absolute;
        top: 100%; 
        left: 0;
        background-color: black;
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
    }

    .hamburger {
        display: block;
    }

    #menu-toggle:checked ~ nav {
        display: flex;
    }

    nav a {
        margin: 10px 0;
    }

    section {
        padding: 10rem 4% 5rem;
    }

    .home {
        flex-direction: column;
        margin: 0; 
        padding: 15rem 4rem 5rem 4rem; 
        text-align: center;
    }

    .home .home-content h3 {
        font-size: 2.5rem;
    }

    .home-content h1 {
        font-size: 5rem;
    }

    
    .home-img {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    /* Controls the size of the logo*/
    .home-img img {
        width: 80vw; 
        margin-top: 4rem;
    }



    .social-icons {
        justify-content: center;
    }

    /* === RESPONSIVE FIX FOR TYPING TEXT === */
    .typing-text {
        min-width: 0;
        font-size: 21px; 
    }

    .typing-text span {
        min-width: 0;
    }

    /* === CONTACT FORM RESPONSIVE === */
    .contact {
        flex-direction: column;
        gap: 4rem;
        padding: 10rem 4% 5rem;
    }

    .contact-text h1 {
        font-size: 4rem;
        text-align: center;
    }

    .contact-text p {
        text-align: center;
    }

    .email-social {
        text-align: center;
    }

    .email-social h2 {
        font-size: 1.6rem;
    }

    .contact form {
        width: 100%;
    }

    .contact form input,
    .contact form textarea {
        font-size: 1.4rem;
        padding: 1rem 1.2rem;
    }

    .contact form button {
        font-size: 1.5rem;
        padding: 1rem 2.5rem;
    }

    /* Ensures chatbot stays visible on mobile */
    .chat-bubble {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .chat-bubble i {
        font-size: 2rem;
    }

    .chat-window {
        bottom: 80px;
        right: 20px;
        width: 90%;
        max-width: 350px;
        height: 450px;
    }
}
