@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --base: #556;
    --base-100: #f1f1f1;
    --base-400: #555;
    --base-800: #000;
    --gray: #a8a8a8; /* darker gray to replace yellow */
    --gray-100: #f2f2f2; /* very light gray */
    --gray-400: #a8a8a8; /* medium gray */
    --gray-800: #4f4f4f; /* dark gray */
    --blue: #0a61ae;
    --blue-100: #e2f8ff;
    --blue-400: #61dafb;
    --blue-800: #0a61ae;
}

* {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Poppins", sans-serif;
    padding-bottom: 100px;
}

html {
    scroll-behavior: smooth;
}

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

/* TRANSITION */

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

/* DESKTOP NAV */

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

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

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

/* Detail page */

header {
    /* background: var(--blue); */
    color: white;
    padding: 1rem;
    text-align: center;
}

main {
    padding: 2rem;
    line-height: 1.6;
}

h1, h2 {
    color: var(--base-800);
    margin-bottom: 1rem;
}

.key-contributions ul {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.image-gallery {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* figure {
    max-width: 300px;
} */

/* img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0px 2px 8px var(--gray-400);
} */

figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray-800);
    margin-top: 0.5rem;
}


header {
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 70px;
    padding-right: 70px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);

    .logo-holder {
        display: flex;
        padding: 10px;
        align-items: center;
        font-weight: 600;
        color: var(--base-800);

        &:hover {
            color: grey;
            text-decoration: none;
        }

        .logo {
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 32px;
            background-color: var(--base-800);
            color: var(--base-100);
            height: 64px;
            width: 64px;
            margin-right: 20px;
            border-radius: 50%;
        }
        .logo-text {
            flex: 1;
            font-size: 2rem;
        }
    }

    .menu {
        display: flex;
        align-items: center;

        .menu-links {
            display: flex;
            list-style-type: none;
            gap: 5px;

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

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

            li {
                list-style: none;
            }
        }

        .hamburger-menu {
            display: none;
            color: var(--base-800);
            padding: 10px;

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

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

            .hamburger-icon.open {
                span {
                    &:first-child {
                        transform: rotate(45deg) translate(10px, 5px);
                    }
                    &:nth-child(2) {
                        opacity: 0;
                    }
                    &:last-child {
                        transform: rotate(-45deg) translate(10px, -5px);
                    }
                }
            }

            @media (max-width: 768px) {
                display: inline-block;
                position: absolute;
                top: 20px;
                right: 20px;
            }
        }
    }

    @media (max-width: 1024px) {
        flex-direction: column;
        align-items: center;
    }

    @media (max-width: 768px) {
        flex-direction: column;
        align-items: center;

        .menu {
            margin-top: 10px;
            width: 100%;

            .menu-links {
                display: none;
                flex-direction: column;
                text-align: center;
                width: 100%;

                a {
                    width: 100%;
                }

                &.open {
                    display: flex;
                }
            }
        }
    }
}

footer {
    .footer-container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 17vh;
        .footer-menu {
            justify-content: space-around;
            align-items: center;
            .nav-links-container {
                .nav-links {
                    gap: 2rem;
                    list-style: none;
                    font-size: 1.5rem;
                    padding-bottom: 20px;
    
                    @media (max-width: 600px) {
                        font-size: 1rem;
                        flex-direction: column;
                        gap: 1rem;
                    }
                }
            }
        }

        .footer-links {
            justify-content: space-around;
            align-items: center;
            .nav-links-container {
                display: flex;
                gap: 2rem;
                .nav-links {
                    display: flex;
                    gap: 0.5rem;
                    list-style: none;
                    font-size: 1rem;
                    align-items: center;

                    .contact-icon {
                        cursor: default;
                        height: 2rem;
                    }
    
                    @media (max-width: 600px) {
                        font-size: 1rem;
                        .contact-icon {
                            height: 1.5rem;
                        }
                    }
                }

                @media (max-width: 600px) {
                    flex-direction: column;
                    gap: 1rem;
                }
            }
        }

        @media (max-width: 600px) {
            min-height: fit-content;
            flex-direction: row;
            gap: 3.5rem;
            padding: 6rem;
        }
    }

    p {
        text-align: center;
    }
}

/* SECTIONS */

.container {
    position: relative;
    margin: 0 10rem;
    max-width: 1440px;
    box-sizing: border-box;
    min-height: fit-content;
    margin: auto;
    padding-top: 2vh;
    padding-bottom: 2vh;
    gap: 30px;

    @media (max-width: 1440px) {
        padding-left: 30px;
        padding-right: 30px;
    }

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

        @media (max-width: 600px) {
            right: -2rem;
        }
    }
}

.profile {
    display: flex;
    justify-content: center;
    gap: 5rem;
    height: 70vh;

    .profile-pic-container {
        display: flex;
        height: 400px;
        width: 400px;
        margin: auto 0;

        @media (max-width: 768px) {
            height: 300px;
            width: 300px;
        }

        .profile-pic {
            height: 400px;
            width: 400px;
            @media (max-width: 768px) {
                height: 300px;
                width: 300px;
            }
        }
    }

    @media (max-width: 768px) {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

.logos {
    background-color: var(--base-100);
    border-radius: 30px;
    padding: 30px 0px;

    @media (max-width: 1440px) {
        border-radius: 0px;
    }

    .marquee {
        width: 100vw;
        max-width: 100%;
        height: 128px;
        overflow: hidden;
        position: relative;

        .track {
            position: absolute;
            white-space: nowrap;
            animation: marquee 40s linear infinite;
            display: flex;
            gap: 10px;
        }
    }
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.about {
    position: relative;
    margin: 0 10rem;

    @media (max-width: 1400px) {
        margin: 0 0rem;
    }

    .about-container {
        display: flex;
        gap: 4rem;
        height: fit-content;

        @media (max-width: 1400px) {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0rem;
        }

        .about-pic-container {
            display: flex;
            justify-content: center;
            height: 400px;
            width: 400px;
            margin: auto 0;

            @media (max-width: 1400px) {
                width: 275px;
                height: 275px;
                margin: auto 2rem;
            }

            .about-pic {
                border-radius: 2rem;
                height: 400px;
                margin: auto 0;

                @media (max-width: 1400px) {
                    width: 275px;
                    height: 275px;
                    margin: auto 2rem;
                }
            }
        }

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

            .experience-container {
                display: flex;
                gap: 2rem;
                margin-bottom: 2rem;
                margin-top: 2rem;

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

                .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;
                }
            }
        }
    }

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

.experience {
    .job {
        display: grid;
        gap: 30px;
        padding-top: 70px;
        grid-template-columns: repeat(3, 1fr); /* 3-column layout */

        /* Responsive adjustment for tablet screens */
        @media (max-width: 1024px) {
            grid-template-columns: repeat(2, 1fr); /* 2-column layout on tablet screens */
        }

        @media (max-width: 768px) {
            grid-template-columns: 1fr; /* Single-column layout on smaller screens */
        }

        article {
            background-color: var(--gray-100);
            padding: 30px;
            border-radius: 30px;
        }

        h3 {
            margin-top: 20px;
            margin-bottom: 10px;
        }

        div {
            font-weight: 600;
            margin-bottom: 5px;
            color: var(--base-800);
        }

        p {
            margin-bottom: 10px;
        }

        figure {
            width: 100%;
            padding-top: 56.25%;
            overflow: hidden;
            position: relative;

            img {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                object-fit: cover;
                transition: transform 3s ease;
            }

            figcaption {
                position: absolute;
                bottom: 0;
                left: 0;
                right: 0;
                background-color: rgba(0, 0, 0, 0.5);
                color: var(--base-100);
                opacity: 0;
                visibility: hidden;
                transition: opacity 0.3s ease;
            }

            &:hover {
                figcaption {
                    opacity: 1;
                    visibility: visible;
                }
                img {
                    transform: scale(1.5);
                }
                cursor: pointer;
            }
        }
    }
}

.projects {
    .works {
        display: grid;
        gap: 30px;
        padding-top: 70px;
        grid-template-columns: repeat(3, 1fr); /* 3-column layout */

        /* Responsive adjustment for tablet screens */
        @media (max-width: 1024px) {
            grid-template-columns: repeat(2, 1fr); /* 2-column layout on tablet screens */
        }

        @media (max-width: 768px) {
            grid-template-columns: 1fr; /* Single-column layout on smaller screens */
        }

        article {
            background-color: var(--gray-100);
            border-color: var(--base-400);
            border: var(--base-400) 0.1rem solid;
            padding: 1.5rem;
            border-radius: 2rem;
            text-align: center;
        }

        .project-title {
            margin: 1rem;
            color: var(--base-800);
            font-weight: 600;
            font-size: 1.75rem;
        }

        div {
            font-weight: 600;
            margin-bottom: 5px;
            color: var(--base-800);
        }

        p {
            margin-bottom: 10px;
        }

        figure {
            width: 100%;
            padding-top: 90.25%;
            overflow: hidden;
            position: relative;

            img {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                object-fit: cover;
                transition: transform 3s ease;
            }

            figcaption {
                position: absolute;
                bottom: 0;
                left: 0;
                right: 0;
                background-color: rgba(0, 0, 0, 0.5);
                color: var(--base-100);
                opacity: 0;
                visibility: hidden;
                transition: opacity 0.3s ease;
            }

            &:hover {
                figcaption {
                    opacity: 1;
                    visibility: visible;
                }
                img {
                    transform: scale(1.5);
                }
            }
        }
    }
}

.contact {
    .contact-info-upper-container {
        display: flex;
        justify-content: center;
        border-radius: 2rem;
        border: var(--base) 0.1rem solid;
        border-color: var(--base-400);
        background: (250, 250, 250);
        margin: 2rem auto;
        width: fit-content;
        padding: 0.5rem;

        @media (max-width: 600px) {
            gap: 0.5rem;
        }

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

            p {
                font-size: larger;
            }

            .contact-icon {
                cursor: default;
                height: 2.5rem;
            }

            @media (max-width: 600px) {
                font-size: 0.7rem;
                margin: 1rem 0.5rem;

                .contact-icon {
                    height: 1.5rem;
                }
            }
        }
    }
}


/* ICONS */

.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;
}

/* TEXT */

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

.text-p1 {
    text-align: center;
}

.text-p2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.p {
    font-weight: 600;
}

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

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