
/* ==============================
   GLOBAL STYLES
============================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root {
    --bg-color: #ffffff;
    --snd-bg-color: #e8f7f5;
    --text-color: #172b2a;
    --main-color: #007f73;
    --dark-color: #005b52;
    --card-color: #f4fbfa;
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
    scroll-padding-top: 8rem;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

section {
    min-height: auto;
    padding: 10rem 9% 7rem;
}

span {
    color: var(--main-color);
}

.heading {
    text-align: center;
    font-size: 4.8rem;
    margin-bottom: 4rem;
}


/* ==============================
   HEADER & NAVIGATION
============================== */

.header {
    position: fixed;
    width: 100%;
    top: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.8rem 7%;
    background: var(--main-color);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.12);
    transition: 0.3s ease;
}

.logo {
    font-size: 2.8rem;
    color: white;
    font-weight: 700;
    transition: 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.multiple-text {
    color: #007f73;
    display: inline;
}

.navbar a {
    font-size: 1.65rem;
    color: white;
    margin-left: 2.8rem;
    font-weight: 600;
    transition: 0.3s ease;
}

.navbar a:hover,
.navbar a.active {
    color: #b9fff5;
}

#menu-icon {
    font-size: 3.6rem;
    color: white;
    cursor: pointer;
    display: none;
}


/* ==============================
HOME SECTION
============================== */

.home {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5rem;
    min-height: 100vh;
    padding-top: 12rem;
}

.home-img img {
    width: 28vw;
    max-width: 360px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--main-color);
    box-shadow: 0 0 25px rgba(0, 127, 115, 0.25);
    animation: floatImage 4s ease-in-out infinite;
    transition: 0.4s ease;
}

.home-img img:hover {
    box-shadow: 0 0 30px var(--main-color);
    transform: scale(1.03);
}

@keyframes floatImage {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-18px);
    }
}

.home-content {
    max-width: 650px;
}

.home-content h3 {
    font-size: 2.8rem;
    font-weight: 600;
}

.home-content h3:nth-of-type(2) {
    margin-bottom: 2rem;
}

.home-content h1 {
    font-size: 5.5rem;
    font-weight: 750;
    line-height: 1.2;
    margin: 0.8rem 0;
}

.home-content p {
    font-size: 1.65rem;
    margin-top: 1.5rem;
    line-height: 1.8;
}

.multiple-text {
    color: var(--main-color);
}

.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.5rem;
    height: 4.5rem;
    border: 2px solid var(--main-color);
    border-radius: 50%;
    font-size: 2.2rem;
    color: var(--main-color);
    margin: 2.5rem 1rem 2.5rem 0;
    transition: 0.3s ease;
}

.social-media a:hover {
    background: var(--main-color);
    color: white;
    transform: translateY(-6px);
    box-shadow: 0 0 15px rgba(0, 127, 115, 0.4);
}

.btn {
    display: inline-block;
    padding: 1.2rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    font-size: 1.6rem;
    color: white;
    letter-spacing: 0.05rem;
    font-weight: 650;
    transition: 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    background: var(--dark-color);
    box-shadow: 0 0 18px rgba(0, 127, 115, 0.3);
    transform: translateY(-3px);
}


/* ==============================
ABOUT SECTION
============================== */

.about {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5rem;
    background: var(--snd-bg-color);
}

.about-content {
    flex: 1;
    padding: 0 2rem;
}

.about-content h2 {
    text-align: left;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.about-content h3 {
    font-size: 2.8rem;
    color: var(--main-color);
}

.about-content p {
    font-size: 1.65rem;
    margin: 2rem 0 3rem;
    line-height: 1.9;
}

.about-img img {
    width: 27vw;
    max-width: 340px;
    aspect-ratio: 1;
    object-fit: cover;
    border: 3px solid var(--main-color);
    border-radius: 50%;
    box-shadow: 0 0 25px rgba(0, 127, 115, 0.25);
    transition: 0.4s ease;
}

.about-img img:hover {
    transform: scale(1.04);
    box-shadow: 0 0 30px var(--main-color);
}


/* ==============================
SKILLS / EXPERIENCE / PROJECTS
============================== */

.services {
    background: var(--bg-color);
}

.services:nth-of-type(even) {
    background: var(--snd-bg-color);
}

.services h2 {
    margin-bottom: 5rem;
}

.services-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: center;
    gap: 2.5rem;
}

.services-container .services-box {
    background: var(--card-color);
    padding: 3.5rem 2.5rem;
    border-radius: 2rem;
    text-align: center;
    border: 1px solid rgba(0, 127, 115, 0.12);
    transition: 0.35s ease;
}

.services-container .services-box:hover {
    border-color: var(--main-color);
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 127, 115, 0.12);
}

.services-box i {
    font-size: 5.5rem;
    color: var(--main-color);
    margin-bottom: 1rem;
}

.services-box h3 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.services-box h4 {
    font-size: 1.7rem;
    color: var(--main-color);
    margin-bottom: 1.5rem;
}

.services-box p {
    font-size: 1.5rem;
    margin-top: 1rem;
    line-height: 1.8;
    color: #435553;
}


/* ==============================
EXPERIENCE SECTION
============================== */

#experience .services-container {
    grid-template-columns: minmax(0, 85rem);
    justify-content: center;
}

#experience .services-box {
    text-align: left;
    padding: 4rem;
}

#experience .services-box > i {
    display: block;
    text-align: center;
}

#experience .services-box h3,
#experience .services-box h4 {
    text-align: center;
}

#experience .services-box p {
    font-size: 1.55rem;
}


/* ==============================
PROJECTS SECTION
============================== */

#projects .services-box {
    text-align: left;
}

#projects .services-box i {
    display: block;
    text-align: center;
}

#projects .services-box h3 {
    text-align: center;
    color: var(--main-color);
}


/* ==============================
EDUCATION & LEARNING
============================== */

#education .services-box,
#learning .services-box {
    padding: 4rem 2.5rem;
}


/* ==============================
CONTACT SECTION
============================== */

.contact {
    background: var(--bg-color);
}

.contact h2 {
    margin-bottom: 3rem;
}

.contact form {
    max-width: 80rem;
    margin: 1rem auto 3rem;
    text-align: center;
}

.contact form .input-box {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--card-color);
    border-radius: 1rem;
    border: 2px solid rgba(0, 127, 115, 0.3);
    margin: 0.5rem 0;
    resize: vertical;
}

.contact form .input-box input {
    width: calc(50% - 0.5rem);
}

.contact form .input-box input:focus,
.contact form textarea:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 10px rgba(0, 127, 115, 0.1);
}

.contact form .btn {
    margin-top: 2rem;
}


/* ==============================
FOOTER SECTION
============================== */

.footer {
    width: 100%;
    padding: 4rem 7%;
    background: var(--snd-bg-color);
    text-align: center;
}

.footer .social {
    padding-bottom: 2rem;
}

.footer .social a {
    font-size: 2.4rem;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    width: 4.5rem;
    height: 4.5rem;
    line-height: 4.2rem;
    display: inline-block;
    border-radius: 50%;
    margin: 0 0.7rem;
    transition: 0.3s ease;
}

.footer .social a:hover {
    background: var(--main-color);
    color: white;
    transform: translateY(-5px);
}

.footer .copyright {
    margin-top: 1rem;
    font-size: 1.5rem;
    color: var(--text-color);
}


/* ==============================
RESPONSIVE DESIGN
============================== */

@media (max-width: 1200px) {

    html {
        font-size: 55%;
    }

    .header {
        padding: 1.8rem 4%;
    }

    section {
        padding: 9rem 5% 6rem;
    }

    .navbar a {
        margin-left: 1.8rem;
    }
}


@media (max-width: 991px) {

    .home {
        gap: 3rem;
    }

    .home-content h1 {
        font-size: 4.5rem;
    }

    .home-img img {
        width: 32vw;
    }

    .services-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about {
        gap: 2rem;
    }

    .about-content {
        padding: 0;
    }

    .about-img img {
        width: 30vw;
    }

}


@media (max-width: 786px) {

    #menu-icon {
        display: block;
    }

    .navbar {
        position: absolute;
        top: 100%;
        right: -100%;
        width: 260px;
        min-height: calc(100vh - 7rem);
        display: flex;
        flex-direction: column;
        background: var(--main-color);
        transition: 0.4s ease;
        padding: 2rem 0;
        box-shadow: -5px 10px 20px rgba(0, 0, 0, 0.15);
    }

    .navbar.active {
        right: 0;
    }

    .navbar a {
        display: block;
        padding: 1.5rem 2.5rem;
        font-size: 1.9rem;
        margin: 0;
    }

    .home {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
        padding-top: 12rem;
    }

    .home-content {
        order: 2;
        margin: 0;
    }

    .home-img img {
        width: 55vw;
        max-width: 300px;
    }

    .home-content h1 {
        font-size: 4.5rem;
    }

    .home-content h3 {
        font-size: 2.5rem;
    }

    .home-content p {
        font-size: 1.55rem;
    }

    .about {
        flex-direction: column-reverse;
        text-align: center;
    }

    .about-content h2 {
        text-align: center;
    }

    .about-img img {
        width: 55vw;
        max-width: 300px;
    }

    .services-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .heading {
        font-size: 4rem;
    }

}


@media (max-width: 617px) {

    section {
        padding: 8rem 5% 5rem;
    }

    .home-img img {
        width: 65vw;
    }

    .about-img img {
        width: 65vw;
    }

    .services-container {
        grid-template-columns: 1fr;
    }

    .services h2 {
        margin-bottom: 3rem;
    }

    #experience .services-box {
        padding: 3rem 2rem;
    }

    .contact form .input-box input {
        width: 100%;
    }

    .heading {
        font-size: 3.5rem;
    }

    .home-content h1 {
        font-size: 3.8rem;
    }

    .home-content h3 {
        font-size: 2.2rem;
    }

}


@media (max-width: 450px) {

    html {
        font-size: 50%;
    }

    .logo {
        font-size: 2.3rem;
    }

    .home-content h1 {
        font-size: 3.5rem;
    }

    .footer {
        padding: 3rem 2rem;
    }

}


/* ============================= */
/* AI PORTFOLIO CHATBOT */
/* ============================= */

.chatbot-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    font-family: inherit;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: #007f73;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 127, 115, 0.3);
    transition: 0.3s;
}

.chatbot-toggle:hover {
    transform: scale(1.08);
}

.chatbot-window {
    display: none;
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 350px;
    height: 490px;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
    flex-direction: column;
}

.chatbot-window.active {
    display: flex;
}

.chatbot-header {
    background: #007f73;
    color: #fff;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: #fff;
    color: #007f73;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
}

.chatbot-header h3 {
    font-size: 15px;
    margin: 0;
}

.chatbot-header span {
    font-size: 11px;
    opacity: 0.85;
}

#chatbot-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 25px;
    cursor: pointer;
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bot-message,
.user-message {
    max-width: 85%;
    padding: 11px 13px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.bot-message {
    background: #f0f5f4;
    color: #333;
    align-self: flex-start;
}

.user-message {
    background: #007f73;
    color: #fff;
    align-self: flex-end;
}

.chatbot-suggestions {
    padding: 5px 12px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chat-suggestion {
    background: #fff;
    border: 1px solid #007f73;
    color: #007f73;
    padding: 6px 9px;
    border-radius: 15px;
    font-size: 10px;
    cursor: pointer;
}

.chat-suggestion:hover {
    background: #007f73;
    color: #fff;
}

.chatbot-input-area {
    display: flex;
    padding: 12px;
    border-top: 1px solid #eee;
    gap: 8px;
}

.chatbot-input-area input {
    flex: 1;
    min-width: 0;
    border: 1px solid #ddd;
    outline: none;
    padding: 10px;
    border-radius: 20px;
    font-size: 13px;
}

.chatbot-input-area input:focus {
    border-color: #007f73;
}

.chatbot-input-area button {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #007f73;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.chatbot-input-area button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chatbot-status {
    font-size: 10px;
    color: #777;
    text-align: center;
    padding: 0 8px 6px;
}

@media (max-width: 480px) {
    .chatbot-container {
        right: 15px;
        bottom: 15px;
    }

    .chatbot-window {
        position: fixed;
        width: auto;
        height: min(500px, 75dvh);
        left: 12px;
        right: 12px;
        bottom: 85px;
    }
}

/* Chatbot header actions */

.chatbot-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-header-actions button {
    background: transparent;
    border: none;
    color: white;
    font-size: 23px;
    cursor: pointer;
    transition: 0.2s;
}

.chatbot-header-actions button:hover {
    transform: scale(1.15);
}

/* Typing indicator */

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    padding: 13px 15px;
    background: #f0f5f4;
    border-radius: 12px;
}

.typing-indicator span {
    width: 7px;
    height: 7px;
    background: #007f73;
    border-radius: 50%;
    animation: chatbotTyping 1.2s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes chatbotTyping {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

/* Message readability */

.bot-message,
.user-message {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}