:root {
    --open-black: #212121;
    --russet: #7f4f24ff;
    --raw-umber: #936639ff;
    --lion: #a68a64ff;
    --khaki: #b6ad90ff;
    --sage: #c2c5aaff;
    --sage-2: #a4ac86ff;
    --reseda-green: #656d4aff;

    scroll-behavior: smooth;

    --text-color: black; 
    --background-color: whitesmoke;
    --primary: var(--russet);
    --secondary: var(--reseda-green);

    @media (prefers-color-scheme: dark) {
        --text-color: white;
        --background-color: var(--open-black);
        --primary: var(--lion);
        --secondary: var(--khaki);

    }


}

@media (prefers-color-scheme: dark) {

    body {
        background-color: var(--open-black);
        color: whitesmoke;
    }

}

body {
    font-family: "JetBrains Mono", monospace;
    margin: 0 4rem 0 4rem;
    background-color: var(--background-color);

    a {
        transition: .2s;
        color: var(--secondary)
    }

    a:hover {
        color: var(--primary);
    }
}

@media (max-width: 768px) {
    body {
        margin: 0 2rem;
    }
}

@media (max-width: 600px) {
    body {
        margin: 0;
    }
}

section {
    margin: 8rem 0;

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

a {
    text-decoration: none;
}

h2 {
    color: var(--primary);
}

header {
    text-align: center;

    nav {
        margin-top: .75rem;

        ul {
            list-style: none;
            display: flex;
            gap: 1rem;
            margin: 0;
            padding: 1rem;

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

        .cv-btn {
            border: 1px solid var(--russet);
            border-radius: 5px;
            padding: 4px 6px 4px 6px;
            color: var(--text-color);
            cursor: pointer;
            transition: .2s;

            @media (prefers-color-scheme: light) {
                color: var(--russet);
            }
        }

        .cv-btn:hover {
            background-color: var(--russet);
            color: whitesmoke;
        }
    }

    ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        justify-content: center;

        @media (min-width: 768px) {
            gap: 1rem;
        }

        li {
            display: inline;
        }

        @media (min-width: 769px) {
            li+li::before {
                content: "| ";
                margin: 0;
            }
        }

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

    }

    h1 {
        font-size: 5rem;
        margin: 0;

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

#about {
    margin: 2rem 0 2rem 0;

    div {
        text-align: start;

        @media (max-width: 600px) {
            text-align: center;
        }
    }

    .flex-container {
        display: flex;
        justify-content: center;
        gap: 2rem;
        align-items: center;
        margin-top: 5rem;

        @media (max-width: 600px) {
            flex-direction: column;
            gap: 1.5rem;
            margin-top: 2rem;
        }
    }

    & img {
        max-width: 17rem;
        max-height: 90vh;
        height: auto;
        border-radius: 3rem;
        border-style: double;
        border-width: 5px;
        border-color: var(--lion);

        @media (max-width: 600px) {
            max-width: 80%;
            border-radius: 2rem;
        }
    }
}

#projects {
    text-align: center;
    margin-top: 4rem;

    h2 {
        margin-bottom: 2rem;
    }

    .container {
        display: flex;
        align-items: center;
        gap: 2rem;

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

        .btn {
            border: 2px solid var(--russet);
            border-radius: 5px;
            padding: 4px 6px 4px 6px;
            color: var(--text-color);
            font-size: 1rem;
            cursor: pointer;

            @media (prefers-color-scheme: light) {
                color: var(--russet);
            }
        }

        .btn:hover {
            background-color: var(--russet);
            color: white;
        }

        .project-img {

            & img {
                width: 36rem;
                border-radius: 5px;
                transition: .2s;

                @media (max-width: 1028px) {
                    width: 100%;
                    max-width: 128rem;
                }

                @media (max-width: 600px) {
                    width: 100%;
                    border-radius: 0;
                }
            }

            & img:hover {
                opacity: .8;
                transform: scale(1.1);
                border-radius: 7px;
            }
        }


    }

    & hr {
        border-color: var(--khaki);
        margin: 2.5rem 0 2.5rem 0;
        width: 80%;
        margin-left: auto;
        margin-right: auto;
    }


}

#publications {

    h2 {
        text-align: center;
        margin-bottom: 2rem;
    }

    @media (max-width: 600px) {
        text-align: center;
    }

    .articles {
        list-style: none;
        margin-top: 3rem;
        padding-left: 0;
        margin-left: 0;
    }

    .article {
        display: flex;
        align-items: center;
        gap: 1rem;



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

        .read-more {
            text-decoration: underline;
        }

        & div {
            margin: 0 10px 0 10px;

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

        & img {
            max-width: 15rem;
            height: auto;
            background-color: whitesmoke;
            transition: .2s;

            @media (max-width: 600px) {
                max-width: 100%;
                width: 100%;
            }
        }

        & img:hover {
            opacity: .5;
            transform: scale(1.1);
            border-radius: 7px;
        }

        .text-emphasize {
            font-weight: bold;
            color: var(--raw-umber);
        }
    }

    .btn-container {
        text-align: center;

        .btn {
            border: 2px solid var(--russet);
            border-radius: 5px;
            padding: 4px 6px 4px 6px;
            color: var(--text-color);
            font-size: 1.25rem;
            cursor: pointer;

            @media (prefers-color-scheme: light) {
                color: var(--russet);
            }
        }

        .btn:hover {
            background-color: var(--russet);
            color: white;
        }

    }

}

#certifications {
    text-align: center;

    h2 {
        margin-bottom: 2rem;
    }

    .certifications-list {
        list-style: none;
        display: flex;
        text-align: center;
        flex-wrap: wrap;
        justify-content: center;

        @media (max-width: 600px) {
            flex-direction: column;
            align-items: center;
            padding-left: 0;
        }

        .certification {

            .cert-card {
                border: 2px solid var(--sage);
                border-radius: 5px;
                margin: 1rem;
                width: 16rem;
                height: 20rem;

                @media (prefers-color-scheme: light) {
                    border-color: var(--sage-2);
                }

                @media (max-width: 600px) {
                    width: 90vw;
                    height: auto;
                    margin: 1rem 0;
                }

                & h3 {
                    margin: 0;
                    font-size: 1.1rem;
                }

                & p {
                    margin: 0;
                }

                .btn {
                    background-color: var(--background-color);
                    border: 2px solid var(--russet);
                    border-radius: 5px;
                    padding: 1px 6px 1px 6px;
                    color: var(--text-color);
                    cursor: pointer;

                    @media (prefers-color-scheme: light) {
                        border-color: var(--sage-2);
                    }
                }

                .btn:hover {
                    background-color: var(--russet);
                    color: white;

                    @media (prefers-color-scheme: light) {
                        border-color: var(--primary);
                    }
                }

            }

            & img {
                width: 100%;
                height: auto;
                background-color: var(--reseda-green);
                transition: .2s;
            }

            & img:hover {
                opacity: .7;
                background-color: var(--russet);
            }

            .cert-institution {
                font-style: italic;
            }
        }
    }

    .text-emphasize {
        font-style: italic;
    }
}

footer {
    border-top: 2px solid var(--raw-umber);
    margin: 8rem 0 1.5rem 0;

    @media (max-width: 600px) {
        margin: 4rem 1rem 1rem 1rem;
    }

    .footer-link:not(:last-child)::after {
        content: " | ";
        color: #999;
        margin: 0 0.5rem 0 0;
    }

    @media (max-width: 600px) {
        .footer-link:not(:last-child)::after {
            content: "";
            /* remove the "|" separator on small screens */
            margin: 0;
        }
    }

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

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

    .footer-link {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        text-decoration: none;
        color: inherit;
    }

    .icon {
        width: 1.5rem;
        height: 1.5rem;
    }
}