@import url('https://fonts.googleapis.com/css2?family=Asset&display=swap');

:root {
    --darkPurple: #51087E;
    --purple: #A020F0;
    --lightPurple: #D7A1F9;
    --black: #000;
    --white: #FFF;
    --grey: #ddd;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--darkPurple);
    font-family: 'JetBrains Mono', sans-serif;
    color: var(--white);
}

.container {
    padding: 50px;
}

section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

h1 {
    margin: 20px;
    font-family: 'Asset', cursive;
    color: var(--purple);
}

p {
    color: var(--lightPurple);
}

/* NAVBAR */

#navbar {
    background-color: var(--darkPurple);
    position: fixed;
    top: -50px;
    width: 100%;
    display: block;
    transition: top 0.3s;
    opacity: 0.7;
    z-index: 1;
}

#navbar a {
    float: right;
    display: block;
    color: var(--lightPurple);
    text-align: center;
    padding: 15px;
    text-decoration: none;
    font-size: 17px;
}

#navbar a:hover {
    background-color: var(--grey);
    color: var(--black);
}

/* HOME SECTION */

#home {
    text-align: center;
}

#home h1 {
    margin: 20px;
    font-size: 36px;
}

#home p {
    padding: 20px;
}

.home-photo {
    width: 20%;
    height: auto;
    border-radius: 50%;
    margin: 30px;
    border: 5px solid #ddd;
}

/* ABOUT SECTION */

li {
    line-height: 1.5;
    margin-bottom: 30px;
    color: var(--lightPurple);
}

.about-photo {
    width: 20%;
    height: auto;
    opacity: 0.5;
    margin: 20px;
}

/* CERTIFICATION SECTION */

.cert-heading {
    margin: 30px;
}

.certs {
    display: flex;
}

.cert-card {
    background: var(--purple);
    display: block;
    text-align: center;
    width: 200px;
    height: 150px;
    padding: 10px;
    margin: 5px;
}

.btn {
    background: var(--white);
    color: var(--darkPurple);
    border-style: none;
    border-radius: 4px;
    padding: 10px;
}

.btn:hover {
    background: var(--darkPurple);
    color: var(--white);
    cursor: pointer;
}

.close-btn {
    position: absolute;
    top: 1em;
    right: 1rem;
    font-size: 2rem;
    background: transparent;
    border-color: transparent;
    color: var(--purple);
    cursor: pointer;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--lightPurple);
    transform: scale(1.3);
}

.modal {
    width: auto;
    height: auto;
    position: fixed;
    top: -50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: top 0.3s ease-in-out;
    border-radius: 10px;
    z-index: 2;
    visibility: hidden;
}

.modal.active {
    visibility: visible;
    top: 50%;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
}

#overlay.active {
    display: block;
}

/* WORK SECTION */

#work {
    display: flex;
    /* justify-content: center; */
    /* align-items: stretch; */
    /* flex-wrap: wrap; */
}

.work-heading h1 {
    margin-top: 40px;
}

.projects {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
    padding: 0;
    margin: 0;
    list-style: none;
    margin-top: 20px;
    /* display: grid;
    grid-template-columns: auto auto auto;
    gap: 10px;
    margin: 0 50px; */
}

article {
    justify-content: center;
    align-items: center;
    display: block;
    padding: 10px;
    margin: 0;
    width: 365px;
    height: auto;
    border-radius: 10px;
}

.project-heading {
    text-align: center;
}

.card-img {
    object-fit: cover;
    width: 365px;
    height: 240px;
    max-width: 100%;
    border-radius: 10px;
    transition: all 0.3s ease;
    filter: grayscale(1);
}

.card-img:hover {
    cursor: pointer;
    transform: scale(1.2);
    filter: grayscale(0);
}

.project-info {
    text-align: center;
    padding: 0;
}

.buttons {
    text-align: center;
}

.buttons a {
    text-decoration: none;
}

.link-btn {
    margin: 5px;
    color: var(--white);
}

.link-btn:hover {
    color: var(--lightPurple);
}

/* CONTACT SECTION */

.contact-links {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    font-size: 3em;
}

.contact-details {
    margin: 30px;
    color: var(--lightPurple);
}

.contact-details:hover {
    margin: auto;
    color: var(--white);
    font-size: 2em;
    transition: 0.3s ease-out;
}

footer {
    color: var(--lightPurple);
    text-align: center;
}

/* FOR MOBILE */

@media only screen and (max-width: 480px) {
    #navbar {
        width: 100%;
    }

    #navbar a {
        font-size: 12px;
    }

    section {
        flex-direction: column;
        width: 100%;
    }

    .home-photo {
        width: 50%;
    }

    .about-photo {
        width: 50%;
    }

    .cert-heading {
        font-size: 12px;
    }

    .certs {
        flex-direction: column;
    }

    .modal {
        width: 100%;
    }

    .modal.active {
    top: 50%;
    }

    .modal img {
    width: 100%;
    }
}