@import url('https://fonts.googleapis.com/css2?family=Arvo&family=Lato:wght@300;400;700&display=swap');

:root {
    --darkpurple: #8a3eff;
    --purple: #8a3eff;
    --grayishblue: #3e4464;
    --softyellow: #FFFD8C;
    --orange: #FF6000;
    --darkblue: #3C486B;
    --pinkred: #F45050;
    --blue: #3C79F5;
    --white: #F0F0F0;
    --darkgray: #454545;
    --yellow: #FBC252;
}

/* CSS Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* General Design */
body {
    background-color: #F0F0F0;
    color: #454545;
    font-family: 'Lato', sans-serif;
}
html {
    font-size: 10px;
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
}

main {
    width: 100%;
    min-height: 100%;
}


/* Header - Logo - Nav*/
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--darkpurple);
    padding: 1rem;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 4px 10px;
}

.logo-name {
    font-size: 3rem;
    color: var(--white);
}
.job-title{
    font-size: 1.65rem;
    font-weight: 400;
    color: var(--softyellow);
}

.nav-btn {
    position: absolute;     
    top: 2rem;
    right: 3rem;
    font-size: 2.3rem;
    color: var(--white);
    border: 2px solid var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    z-index: 1;

    visibility: hidden;
}

.main-nav {
    list-style-type: none;
    display: flex;
    gap: 2.5rem;
    z-index: 1001;
}

.nav-link {
    color: var(--white);
    font-size: 2rem;
    transition: .3s;
}
.nav-link:hover {
    color: #272727;
}

/* Toggle Dark/Light Mode */
.toggle-mode {
    color: var(--white);
    position: absolute;
    top: 2.3rem;
    right: 4rem;
    font-size: 2.2rem;
    cursor: pointer;
    transition: .3s;
}
.toggle-mode:hover {
    color: #272727; 
}

/* Navbar Responsive */

@media (max-width:768px) {
    header {
        justify-content: space-between;
    }

    .nav-btn {
        visibility: visible;
    }

    nav {
        visibility: hidden;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        opacity: 0.85; 
    }   
    nav.open {
        visibility: visible;
    }

    .main-nav {
        display: flex;
        flex-flow: column wrap;
        align-items: center;
        justify-content: center;
        gap: 5rem;
        height: 100vh;
        overflow: hidden;
        background: var(--darkpurple);
        transform: translateY(-100%);
        transition: .5s ease-in-out;
    }
    .main-nav.open {
        transform: translateY(0);
    }

    .nav-item {
        transform: translateX(100vw);
        transition: .5s ease-in-out;
    }
    .nav-item.open {
        transform: translateX(0);
    }

    .nav-link {
        text-transform: uppercase;
        font-size: 2.5rem;
    }
    .nav-link:hover {
        color: var(--blue);
    }

    .toggle-mode {
        position: relative;
        top: 0;
        right: 0;
        font-size: 4rem;
    }
    .toggle-mode:hover {
        color: var(--blue);
    }
}


/* Home Section */
.home {
    width: 100%;
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5rem;
    padding-top: 1rem;
}

.greeting {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: 10rem;
    text-align: right;
}

.greeting-title {
    font-size: 3.7rem;
    /* text-align: center; */
    font-weight: 400;
    line-height: 4rem;
}
.fname {
    font-size: 7rem;
    color: var(--grayishblue);
    font-weight: 700;
}

.divider {
    border-style: none;
    border-bottom: 2px solid;
}

.home-divider {
    margin: 2rem 0 1rem 0;
    width: 100%;
    color: var(--grayishblue);
}

.description {
    font-family: 'Arvo', serif;
    font-size: 2rem;
    color: var(--purple);
    font-weight: bold;
    /* text-align: center; */
}
    /* main-img */

.main-img {
    width: 80rem;
}
.main-img img {
    object-fit: cover;
    width: 100%;
}

/* Home Responsive */
@media (max-width: 992px) {
    .home {
        padding-top: 1rem;
        flex-direction: column-reverse;
    }
    .greeting {
        margin: 0;
        text-align: center;
        margin-top: -30px;
    }
    .greeting-title {
        font-size: 3.4rem;
    }
    .fname {
        font-size: 4.7rem;
    }
    .description {
        font-size: 2rem;
    }

    .home-divider {
        margin: 2rem auto 1rem auto;
        width: 80%;
    }

    .main-img {
        width: 600px;
    }

}

@media (max-width: 576px) {
    .home {
        padding: 1rem;
        flex-direction: column-reverse;
    }
    .greeting {
        width: 100%;
    }
    .greeting-title {
        font-size: 3.4rem;
    }
    .fname {
        font-size: 4.7rem;
    }
    .description {
        font-size: 2rem;
    }

    .home-divider {
        margin: 2rem auto 1rem auto;
        width: 80%;
    }

    .main-img {
        width: 100%;
    }
}

/* About Section */
.about {
    margin-top: 10rem;
    width: 100%;
    min-height: 100vh;
    padding-top: 17rem;
}

.card {
    width: 80%;
    margin: 1rem auto;
    display: flex;
    flex-direction: row;
    gap: 2rem;
}
.card-img {
    width: 35%;
}
.card-img img {
    width: 100%;
    border: 1px solid var(--darkgray);
    padding: 0.3rem;
    background-color: var(--darkgray);
    border-radius: 50%;
}
.card-body {
    width: 65%;
    padding: 1rem 3rem;
}

.subtitle {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--purple);
}
.paragraph {
    font-size: 2rem;
    line-height: 1.5;
}

.box-1 {
    margin-bottom: 4rem;
}

/* About Responsive */
@media (max-width: 768px) {
    .about {
        margin-top: 0rem;
        min-height: 50vh;
    }
    .card {
        flex-direction: column;
        width: 100%;
        padding: 1rem;
    }
    
    .card-img {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .card-img img {
        width: 75%;

    }
    
    .card-body {
        width: 100%;
    }
    
}

@media (max-width: 992px) {
    .card {
        flex-direction: column;
        width: 100%;
        padding: 1rem;
    }
    
    .card-img {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 3rem;
    }
    
    .card-img img {
        width: 50%;

    }
    
    .card-body {
        width: 100%;
    }
}
    
/* Portfolio Section */

.portfolio {
    width: 100%;
    min-height: 65vh;
    text-align: center;
    padding-top: 14rem;
}

.main-title {
    font-size: 4rem;
    text-align: center;
    color: var(--grayishblue);
}

.general-divider {
    width: 50%;
    margin: 1.5rem auto 1rem auto;
}

.loading {
    margin: 5rem auto;
    font-size: 4rem;
}

.projects {
    width: 90%;
    margin: 5rem auto;
    display: flex;
    gap: 3rem;
    justify-content: space-evenly;
}

.project {
    /* border: 2px solid var(--darkblue); */
    background-color: var(--darkgray);
    border-radius: 10px;
    /* width: 30%; */
    aspect-ratio: 2/1;
}
.project img {
    width: 100%;
    object-fit: cover;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.project-details {
    padding: 1rem;
}
.project-details h3{
    color: var(--white);
    font-size: 1.6rem;
}
.btns {
    margin-top: 1.7rem;
    display: flex;
    justify-content: center;
    gap: 3rem;
}
.btns a {
    color: var(--white);
    font-size: 1.9rem;
    transition: .3s;
}
.btns a:hover {
    color: var(--pinkred);
} 

.button {
    padding: 1rem 4.5rem;
    border: 2px solid var(--purple);
    color: var(--purple);
    font-size: 2.5rem;
    border-radius: 30px;
    transition: .2s ease-in-out;
}
.button:hover {
    background-color: var(--purple);
    color: var(--white);
}

/* Portfolio Responsive */
@media (max-width: 992px) {
    .projects {
        flex-direction: column;
    }
    .project {
        width: 100%;
        aspect-ratio: 2/1;
    }
    .button {
        font-size: 2rem;
    }
}

/* Articles Section */
.articles {
    width: 100%;
    min-height: 65vh;
    text-align: center;
    padding-top: 14rem;
    background-color: var(--white);
}

#articles-container {
    width: 90%;
    margin: 5rem auto;
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: center;
}

.article-card {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: calc(33.333% - 2rem);
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-details {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-title {
    font-size: 2rem;
    color: var(--darkgray);
    margin-bottom: 1rem;
}

.article-excerpt {
    font-size: 1.4rem;
    color: var(--grayishblue);
    margin-bottom: 1.5rem;
}

.read-more {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--purple);
    color: var(--white);
    font-size: 1.4rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    align-self: center;
}

.read-more:hover {
    background-color: var(--darkpurple);
}

#pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

#pagination button {
    margin: 0 5px;
    padding: 5px 10px;
    border: 1px solid var(--purple);
    background-color: white;
    color: var(--purple);
    cursor: pointer;
}

#pagination button.active {
    background-color: var(--purple);
    color: white;
}

#article-details {
    width: 80%;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

#article-details h2 {
    color: var(--purple);
    margin-bottom: 20px;
}

#article-details p {
    line-height: 1.6;
    margin-bottom: 20px;
}

#article-details button {
    background-color: var(--purple);
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
}

#article-details button:hover {
    background-color: var(--darkpurple);
}

/* Articles Responsive */
@media (max-width: 992px) {
    .article-card {
        width: calc(50% - 2rem);
    }
}

@media (max-width: 768px) {
    .article-card {
        width: 100%;
    }
}

/* Contact Section */
.contact {
    width: 100%;
    min-height: 65vh;
    text-align: center;
    padding: 5rem;
    margin: 4rem auto;
}

.contact h1 {
    font-size: 5rem;
    color: var(--darkblue);
    margin-top: 10rem;
}

.social-box {
    display: flex;
    justify-content: center;
    gap: 5rem;
    text-align: center;
    margin-top: 5rem;
}

.social-box a{
    color: var(--orange);
    font-size: 2.5rem;
    transition: .5s;
}
.social-box a:hover {
    transform: translateY(10px);
    text-decoration: underline;
}

/* Contact Responsive */
@media (max-width: 768px) {
    .contact {
        height: 80vh;
    }
    .social-box {
        flex-direction: column;
        gap: 1.5rem;
    }
    .social-box a {
        font-size: 3rem;
        margin-bottom: 0.5rem;
    }
    .social-box a:hover {
        transform: scale(110%);
    }
}

/* Footer */
footer {
    width: 100%;
    padding: 2rem;
    background-color: var(--darkpurple);
    color: var(--white);
    text-align: center;
    font-size: 2rem;
}
