@import url('https://fonts.googleapis.com/css2?family=Ovo&family=Poppins:wght@300;400;500;600&display=swap');
:root{
    --bg-color-light: #ffffff;
    --bg-color-dark: rgb(17 0 31);
    --text-color-light: #000000;
    --text-color-dark: #ffffff;
    --hover-color: #5858e3;
    /* --primary-color: #6200ee; */
}

/* ---------- defaults --------- */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    background-color: var(--bg-color-light);
    color: var(--text-color-light);
    font-family: 'Poppins', sans-serif;
}
body.dark-theme{
    background-color: var(--bg-color-dark);
    color: var(--text-color-dark);
    font-family: 'Poppins', sans-serif;
}
html{
    scroll-behavior: smooth;
}
a{
    text-decoration: none;
    color: inherit;
}
a:hover{
    color: var(--hover-color);
}

/* ---------- toggle-theme --------- */
.theme-toggle{
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all .3s ease;
    gap: .5rem;
}

.theme-toggle img{
    height: 2rem;
    display: none;
    color: inherit;
    transition: color 0.3s ease;
}
body.dark-theme .light-icon {
    display: inline-block;
}
body:not(.dark-theme) .dark-icon {
    display: inline-block;
}
.theme-toggle img:hover{
    color: var(--hover-color);
    transform: rotate(360deg);
    transition: transform 0.6s ease, color 0.3s ease;
    text-shadow: 0 0 10px var(--hover-color), 0 0 20px var(--hover-color);
} 

body.dark-theme p{
    color: var(--text-color-dark);
}

/* ---------- Header Background --------- */
.header-bg{
    position: fixed; 
    top: 0;
    right: 0;
    width: 91.666667%;
    z-index: -10;
    transform: translateY(-80%);
    display: block;
}
.header-bg img{
    width: 100%;
}
body.dark-theme .header-bg img{
    display: none;
}


/* ---------- Navigation Bar --------- */
nav{
    /* border: blue 2px solid; */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    font-family: 'Ovo', sans-serif;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    /* height: 17vh; */
    padding: 1rem 3rem;
    font-size: 1.5rem;
    transition: background-color .3s ease;
}
nav.scrolled{
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all .3s ease;
}
nav ul{
    display: flex;
    gap: 1.5rem;
    list-style: none;
    padding: .75rem 3rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    /* border-color: #e5e7eb; */
    border-radius: 9999px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    background-color: rgba(255, 255, 255, 0.5);
}
nav ul.scrolled{
    border: 1px transparent;
    background-color: transparent;
    box-shadow: none;
}
body.dark-theme nav ul{
    background-color: transparent;
}
nav ul li a{
    position: relative;
    transition: all .3s ease;
}
nav ul li a::after{
    content: '';
    width: 0;
    height: 3px;
    background: var(--hover-color);
    position: absolute;
    left: 0;
    bottom: -6px;
    transition: .5s ease;
}
nav ul li a:hover::after{
    width: 100%;
}
.logo a{
    font-size: 2rem;
    text-decoration: none;
    color: var(--text-color-light);
    transition: font-weight .3s ease, color .3s ease;
}
body.dark-theme .logo a{
    color: var(--text-color-dark);
}
.logo a:hover{
    color: var(--hover-color);
    font-weight: bold;
}

/* -------- toogle button ----------  */
.toggle-btn{
    display: none;
}

/* -------- media query (screen size < 1024px) ------- */
@media (max-width: 1024px){
    nav ul{
        display: none;  /*initially  hidden*/
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 2rem;
        border-width: 1.5px 0px;
        border-radius: 0 0 1.5rem 1.5rem;
        background-color: #FFFAFA;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        z-index: 998;
    }
    body.dark-theme nav ul{
        background-color: rgb(25, 0, 40);
    }

    .logo {
        flex: 1; /* Push the logo to the left */
    }
    .theme-toggle,
    .toggle-btn {
        display: inline-block;
        padding: .75rem;
    }

    nav ul.scrolled{
        background-color: #FFFAFA;
        border: 1px solid rgba(255, 255, 255, 0.5);
        border-width: 1.5px 0px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    /* set solid color for nav if menubar(ul) showed */
    nav.show{   
        background-color: #FFFAFA;
    }
    body.dark-theme nav.show{
        background-color: rgb(25, 0, 40);
    }
    nav ul.show{    /*script*/
        display: flex;
    }

    .toggle-btn.rotate{ /*clicked*/
        transform: rotate(-90deg) translateY(0px);
        transition: all .5s ease;
    }
}
@media (max-width: 768px){
    nav ul{
        height: 35vh;
        justify-content: center;
    }
}

/* --------------- profile --------------  */
#profile{
    /* border: rgb(40, 184, 40) 2px solid; */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5rem;
    height: 100vh;
    /* margin-top: 13vh; */
}
.profile-pic img{
    height: 350px;
    border-radius: 50%;
}
/*hero-text*/
.profile-intro p{
    font-weight: 600;
    color: rgb(85, 85, 85);
}
.profile-intro .p2{
    font-size: 1.75rem;
    /* margin-bottom: 1rem; */
}
.profile-intro h1{
    font-size: 3rem;
}
@media (max-width: 768px) {
    #profile{
        flex-direction: column;
        gap: 1rem;
        /* height: auto; */
        /* margin-top: 10vh; */
    }
    .profile-intro{
        margin-top: .75rem;
    }
}


/* ------------ social-links ----------  */
.socials{
    display: inline-flex;
    list-style: none;
    margin-top: 20px;
    /* border: blue 2px solid; */
}
.socials li{
    /* list-style: none; */
    margin: 0 4px;
}
.socials li a{
    display: block;
    background-color: black;
    padding: 0px 8px;
    border-radius: 50%;
    box-shadow: 0px 4px rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 25px;
    /* border: red 2px solid; */
}
body.dark-theme .socials li a{
    background-color: white;
    color: black;
}
.socials li a:hover{
    transform: translate(0,-7px);
    transition: transform 0.5s, color .3s ease;  
}

.socials li:nth-child(1) a:hover{
    background-color: #3b5999;
}
.socials li:nth-child(2) a:hover{
    background-color: #e4405f;
}
.socials li:nth-child(3) a:hover{
    background-color: #55acee;
}
.socials li:nth-child(4) a:hover{
    background-color: #0077B5;
}
.socials li:nth-child(5) a:hover{
    background-color: #4f4c4c;
}

/* ------------ section ------------  */
.section{
    /* border: red 4px solid; */
    display: flex;
    flex-direction: column;
    padding-top: 13vh;
    height: 100vh;
    max-width: 90%;
    margin: 0 auto;
    opacity: 0;
    animation: fadeIn 1s forwards, slideIn 1s forwards;
}
.section-header{
    /* border: blueviolet 2px solid; */
    padding-top: .75rem;
    text-align: center;
    animation-delay: 0.5s;
}
.section-header p{
    color: rgb(85, 85, 85);
}
.section-header h1{
    font-size: 2.5rem;
    font-weight: bold;
}

.section-content{
    /* border: blue 2px solid; */
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
}

@media (max-width:1024px){
    .section{
        height: auto;
    }
    .section-content{
        padding: 2rem 0;
    }
}
@media (max-width:768px){
    .section-content{
        flex-direction: column;
    }
}

/* ------------ about -----------  */
#about .section-content{
    gap: 4vh;
}
#about .section-content img{
    height: 300px;
    border-radius: 2rem;
}
.about-text{
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 50rem;
    border: rgb(53, 53, 53) 0.1rem solid;   
    border-radius: 2rem;
    padding: 1rem;
    font-size: 1.1rem;
    max-width: 600px;
}
.about-text h2{
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #2d5267;
}
body.dark-theme .about-text h2{
    color: #FFF0F5;
}


/* --------------- education -----------  */
#education .section-content{
    flex-direction: column;
}
.education-card{
    /* border: red 2px solid; */
    display: flex;
    gap: 1.5rem;
    margin: 1rem 0;
    /* align-items: center; */
    /* justify-content: center; */
    /* flex-wrap: wrap; */
}
.education-card img{
    height: 100px;
}
.edu-text{
    border: rgb(53, 53, 53) 0.1rem solid;   
    border-radius: 2rem;
    padding: .7rem;
    width: 31rem;
}
@media (max-width:768px){
    .education-card{
        width: 100%;
    }
}


/* ------------- skills ----------------  */
#skills .section-content{
    flex-direction: column;
}
.skill-item{
    display: flex;
    align-items: center;   
    justify-content: space-between;
    margin: 1rem 0;
    width: 700px;
    /* border: red 2px solid; */
}

.tool-icons{
    display: flex;
    flex-wrap: wrap;
    /* align-items: center; */
    justify-content: center;
    list-style: none;
}
.tool-icons li{
    margin: 0 1rem;
}
.tool-icons li img{
    height: 3rem;
}

@media (max-width:768px){
    .skill-item{
        flex-direction: column;
        width: auto;
    }
}


/* --------------- projects -----------  */
.projects-container{
    /* border: red 2px solid; */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width:1024px){
    .projects-container{
        padding: 2rem 0;
    }
}

/* -------------- project-card ---------- */
.project-card{
    overflow: hidden;
    width: 350px;
    height: auto;
    padding: 1rem;
    text-align: center;
    border-radius: 0.75rem;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    background: rgb(247, 247, 247);
}

.project-card img.project-preview{
    width: 100%;
    height: auto;
    max-height: 200px;
    border-radius: 1rem;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.1);
}
.project-card h3 {
    font-size: 1.25rem;
    font-weight: bold;
    color: rgb(34, 34, 34);
    padding: 1rem;
}
.project-card p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

.project-card .tools {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}
.project-card .tools img {
    height: 2rem;
    width: 2rem;
    object-fit: contain;
}
.project-card .tools img:hover {
    filter: grayscale(50%);
    transform: translateY(-3px);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.project-card .source-btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.project-card .source-btn:hover {
    background-color: black;
    transform: scale(1.05);
}

/* Dark Mode */
body.dark-theme .project-card {
    background-color: rgb(17 0 31);
    color: var(--text-color-dark);
    box-shadow: 0 8px 15px rgba(255, 255, 255, 0.2), 0 2px 4px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-theme .project-card h3 {
    color: rgb(193, 180, 180);
}

body.dark-theme .project-card .source-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--bg-color-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
body.dark-theme .project-card .source-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}
body.dark-theme .project-card .tools img {
    filter: brightness(1.3);
}


/* --------------- contact ---------- */
#contact{
    margin-top: -3rem;
}
#contact .section-content{
    flex-direction: column;
    gap: 1rem;
}
.form-header{
    text-align: center;
    margin-bottom: 1rem;
    animation-delay: 0.5s;
}
.form-header p{
    color: rgb(85, 85, 85);
}
#contact-form{
    /* border: red 2px solid; */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 700px;
    gap: 1rem;
    padding: 2rem;
    border-radius: 1rem;
    /* width: 700px; */
    line-height: 2rem;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
}
.sender-info{
    display: flex;
    width: 100%;
    gap: 1rem;
}
@media (max-width:405px){
    .sender-info{
        flex-direction: column;
    }
}
.sender-info input, 
#contact-form textarea{
    width: 100%;
    padding: .75rem;
    border-radius: .375rem;
    border: 1px solid #d1d1d1;
    background-color: var(--bg-color-light);
    transition: border-color 0.3s ease;
    font-family: 'Ovo', 'Poppins', sans-serif;
    font-size: 1rem;
    /* outline: none; */
}
#contact-form textarea {
    resize: none;
}
.sender-info input:focus, 
#contact-form textarea:focus{
    border-color: #0077cc;
}

#contact-submit-btn{
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Ovo', 'Poppins', sans-serif;
    padding: 0.4rem 1rem;
    font-size: .9rem;
    font-weight: bold;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    /* padding: .75rem 2rem; */
    border-radius: 9999px;
    gap: .5rem;
    cursor: pointer;
    transition: background-color 0.5s ease, transform 0.2s ease;
}
#contact-submit-btn:hover{
    background-color: black;
    transform: translateY(-2px);
}
#contact-submit-btn img{
    height: 2rem;
}

/* for dark mode */
body.dark-theme #contact-form {
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1), 0 4px 8px rgba(255, 255, 255, 0.05);
}
body.dark-theme .sender-info input, 
body.dark-theme #contact-form textarea{
    /* background-color: rgba(25, 25, 25, 0.3); */
    background-color: #2a004a4d;

    border-color: rgba(255, 255, 255, 0.9);
    color: var(--text-color-dark);
}
body.dark-theme #contact-submit-btn{
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.9);
}
body.dark-theme #contact-submit-btn:hover{
    /* background-color: rgba(70, 65, 65, 0.5); */
    background-color: #2a004a4d;

    /* background-color: wheat; */
    /* background-color: var(--hover-color); */
}

/* form-confirmation */
#confirmation-message {
    display: none;
    color: green;
    font-size: 1.2rem;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#confirmation-message.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}


/* ------------ footer ----------- */
footer{
    margin-top: 2rem;
    width: 100%;
    padding: 1.5vh;
    text-align: center;
    background: #282525;
    color: white;
}
footer a{
    text-decoration: none;
    color: rgb(132, 103, 103);
}

/* --------- back to top -------- */
#backToTop {
    display: none; /* Initially hidden */
    position: fixed; 
    bottom: 2rem; 
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white; 
    font-size: 24px;
    /* line-height: 40px; */
    text-align: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: extra-bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}
#backToTop:hover {
    transform: translate(0,-6px);
    transition: .5s ease;
    background-color: black;
}

/* Dark Mode */
body.dark-theme #backToTop {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
body.dark-theme #backToTop:hover {
    background-color: rgba(255, 255, 255, 0.4);
}


/*------------ Animations --------------*/
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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


