@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,300;0,400;0,500;0,600;1,100&display=swap');


/* General */

* {
    margin: 0;
    padding: 0;
}

body{
    font-family: "Poppins", serif;
}

html{
    scroll-behavior: smooth;
}

p{
    color: rgb(85, 85, 85);
}

/* Transition */

a, 
.btn{
    transition: all 300ms ease;
}

/* Desktop Navigation */

nav, .nav-links{
    display: flex;
}

nav{
    justify-content: space-around;
    align-items: center;
    height: 17vh;
}

.nav-links{
    gap: 2rem;
    list-style: none;
    font-size: 1.5rem;
}

a{
    text-decoration: none;
    color: black;
    text-decoration-color: white;
}

a:hover{
    color: gray;
    text-decoration: underline;
    text-underline-offset: 1rem;
    text-decoration-color: rgb(181, 181, 181);
}

.logo{
    font-size: 2rem;;
}

.logo:hover{
    cursor: default;
}

/* Hamburger Menu */

#hamburger-nav{
    display: none;
}

.hamburger-menu{
    display: inline-block;
    position: relative;
}

.hamburger-icon{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 24px;
    width: 30px;
    cursor: pointer;
}

.hamburger-icon span{
    width: 100%;
    height: 2px;
    background-color: black;
    transition: all 0.3s ease-in-out; 
}

.menu-links{
    position: absolute;
    top: 100%;
    right: 0%;
    background-color: white;
    width: fit-content;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out; 
}

.menu-links a{
    display: block;
    padding: 10px;
    text-align: center;
    font-size: 1.5rem;
    color: black;
    text-decoration: none;
    transition: all 0.3s ease-in-out; 
}

.menu-links li{
    list-style: none;
}

.menu-links.open{
    max-height: 300px;
}

.hamburger-icon.open span:first-child{
    transform: rotate(45deg) translate(10px, 5px);
}

.hamburger-icon.open span:nth-child(2){
    opacity: 0;
}

.hamburger-icon.open span:last-child{
    transform: rotate(-45deg) translate(10px, -5px);
}

.hamburger-icon span:first-child{
    transform: none;
    opacity: 1;
}

.hamburger-icon span:nth-child(2){
    opacity: 1;
}

.hamburger-icon span:last-child{
    transform: none;
}

/* Sections */

section{
    padding-top: 4vh;
    height: 96vh;
    margin: 0 10rem;
    box-sizing: border-box;
    min-height: fit-content;
}

.section-container{
    display: flex;
}

/* Profile section */

#profile{
    display: flex;
    justify-content: center;
    gap: 5rem;
    height: 80vh;
}

.section__pic-container{
    display: flex;
    height: 400px;
    width: 400px;
    margin: auto 0;
}

.section__text{
    align-self: center;
    text-align: center;
}

.section__text p{
    font-size: 600;
}

.section__text__p1{
    text-align: center;
}
.section__text__p2{
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.title{
    font-size: 3rem;
    text-align: center;
}

#socials-container{
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    gap: 1rem;
}

.icon{
    cursor: pointer;
    height: 2rem;
}

/* buttons */

.btn-container{
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn{
    font-weight: 600;
    transition: all 300ms ease;
    padding: 1rem;
    width: 8rem;
    border-radius: 2rem;
}

.btn-color-1, .btn-color-2{
    border: rgb(53, 53, 53) 0.1rem solid;
}
.btn-color-1:hover, .btn-color-2:hover{
    cursor: pointer;
}
.btn-color-1, .btn-color-2:hover{
    background: rgb(53, 53, 53);
    color: white;
}

.btn-color-1:hover{
    background: rgb(0, 0, 0);
}

.btn-color-2{
    background: none;
}

.btn-color-2:hover{
    border: rgb(255, 255, 255) 0.1rem solid;
}

.btn-container{
    gap: 1rem;
}

/* About section */

#about{
    position: relative;
}

.about-container{
    gap: 2rem;
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.about-details-container{
    justify-content: center;
    flex-direction: column;
}

.about-container, .about-details-container{
    display: flex;
}

.about-pic{
    border-radius: 2rem;
}

.arrow{
    position: absolute;
    right: -5rem;
    bottom: 2.5rem;
}

.details-container{
    padding: 1.5rem;
    flex: 1;
    background: white;
    border-radius: 2rem;
    border: rgb(53, 53, 53) 0.1rem solid;
    border-color: rgb(163, 163, 163);
    text-align: center;
}

.section-container{
    gap: 4rem;
    height: 80%;

}

.section__pic-container{
    height: 400px;
    width: 400px;
    margin: auto 0;
}
/* 
Experiece section */

#experience{
    position: relative;
}

.experience-sub-title{
    color: rgb(85, 85, 85);
    font-weight: 600;
    font-size: 1.75rem;
    margin-bottom: 2rem;
}

.experience-detail-container{
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.about-container{
    gap: 2rem;
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.article-container{
    display: flex;
    text-align: initial;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 1.5rem;
    justify-content: space-between;
}

article{
    display: flex;
    width: 10rem;
    justify-content: flex-start;
    gap: 0.5rem;
    align-items: center;
}

article.icon{
    cursor: default;
}

/* Project Section */

#project{
    position: relative;
}

.color-container {
    border-color: rgb(163, 163, 163);
    background: rgb(250, 250, 250);
}

.project-img{
    border-radius: 0;
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: center;
}

.project-title{
    margin: 1rem;
    color: black;
    font-size: 1.5rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.project-btn{
    color: black;
    border-color: rgb(163, 163, 163);
    margin-top: auto;
}

.slide .btn-container {
    margin-top: auto;
    padding: 1rem;
}

/* Mobile specific project styles */
@media screen and (max-width: 768px) {
    #project {
        margin: 0 2rem;
    }
    
    .title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .section__text__p1 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .slider-dots {
        margin-top: 2rem;
    }
    
    .dot {
        height: 12px;
        width: 12px;
        margin: 0 3px;
    }
}

/* Slider Styles */
.slider-container {
    position: relative;
    overflow: hidden;
    width: 85%;
    margin: 2rem auto;
    display: flex;
    align-items: center;
    padding: 0 60px;
}

.slider-wrapper {
    width: 100%;
    overflow: hidden;
    cursor: grab;
    touch-action: pan-y pinch-zoom;
}

.slider-wrapper:active {
    cursor: grabbing;
}

.slider-track {
    display: flex;
    width: 200%; /* 2 slide groups */
    transition: transform 0.5s ease-in-out;
}

.slide-group {
    flex: 0 0 50%; /* Each group takes 50% of track */
    display: flex;
    gap: 1.5rem;
    padding: 0 0.5rem;
}

.slide {
    flex: 1; /* Each slide takes equal space within the group */
    min-height: 400px;
    transition: transform 0.3s ease;
    box-sizing: border-box;
    max-width: 48%;
    display: flex;
    flex-direction: column;
}

.slide .article-container {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 0;
    margin-bottom: 1rem;
}

/* Mobile Responsive Design */
@media screen and (max-width: 768px) {
    .slider-container {
        width: 90%;
        padding: 0; /* Remove padding since no buttons */
        margin: 1rem auto;
    }
    
    /* Hide navigation buttons on mobile */
    .slider-btn {
        display: none;
    }
    
    .slider-track {
        width: 200%; /* Keep original 2 groups for desktop compatibility */
    }
    
    .slide-group {
        flex: 0 0 50%; /* Each group is 50% for original desktop layout */
        flex-direction: column;
        gap: 0;
        padding: 0;
        justify-content: center;
        align-items: center;
    }
    
    .slide {
        max-width: 85%;
        min-height: 380px;
        margin: 0 auto;
        width: 85%;
    }
    
    /* Mobile: Show only one slide at a time based on current index */
    .slide-group .slide {
        display: none; /* Hide all slides by default on mobile */
    }
    
    /* Show slides based on JavaScript index */
    .slide-group:first-child .slide:first-child {
        display: flex; /* Default: show first project */
    }
    
    .slide .article-container {
        height: 220px;
    }
    
    .project-img {
        height: 220px;
    }
    
    .project-title {
        font-size: 1.4rem;
        min-height: 60px;
        padding: 0 0.5rem;
    }
    
    /* Style dots for mobile */
    .slider-dots {
        margin-top: 2rem;
        text-align: center;
    }
    
    .dot {
        height: 15px;
        width: 15px;
        margin: 0 8px;
        background-color: #bbb;
        border-radius: 50%;
        display: inline-block;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }
    
    .dot:hover, .dot.active {
        background-color: #717171;
    }
}

.slide:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Navigation Buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(53, 53, 53, 0.8);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.slider-btn:hover {
    background-color: rgba(53, 53, 53, 1);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

/* Dots Navigation */
.slider-dots {
    text-align: center;
    margin-top: 1rem;
}

.dot {
    height: 15px;
    width: 15px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot:hover, .dot.active {
    background-color: #717171;
}

/* Contact Section */

#contact{
    display: flex;
    justify-content: center;
    flex-direction: column;
    height: 70vh;
}

.contact-info-upper-container{
    display: flex;
    justify-content: center;
    border-radius: 2rem;
    border: rgb(53, 53, 53) 0.1rem solid;
    border-color: rgb(163, 163, 163);
    background: rgb(250, 250, 250);
    margin: 2rem auto;
    padding: 0.5rem;
}

.contact-info-container{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem;
}

.email-icon{
    height: 2.3rem;

}


/* Footer Section */

footer{
    height: 26vh;
    margin: 0 1rem;
}

footer p{
    text-align: center;

}

/* Floating Chatbot Widget */
.chat-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
}

.chat-toggle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: #111;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.chat-toggle:hover { background: #000; }
.chat-toggle:active { transform: translateY(1px); }

.chat-popup {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: min(420px, calc(100vw - 32px));
    height: 600px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.chat-popup.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.chat-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #111;
    color: #fff;
}

.chat-popup-title {
    font-size: 14px;
    font-weight: 600;
}

.chat-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.chat-popup iframe {
    width: 100%;
    height: auto;
    flex: 1 1 auto;
    min-height: 0; /* allow flex child to shrink inside container */
    border: 0;
    background: #fafafa;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 480px) {
    .chat-popup {
        width: min(100vw - 24px, 380px);
    height: min(75vh, 560px);
        right: 0;
        bottom: 72px;
    }
}