
/* Root attributes */

:root {
    /* Grey-scale Colors */
    --color-dark: #141213;
    --color-light: #FBFBFC;
    --color-light-less: #EBEBEC;
    --color-gray-border: #C8CBCF;

    --font-mono: 'JetBrains Mono', monospace;
    --font-poppins: 'Poppins', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;
}

/* Defaults */

html, body {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-dark);
    color: var(--color-dark);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: scroll;
    transition: all 0.3s ease 0s;
}

h1, h2, h3, h4, h5, h6, a {
    color: var(--color-light);
    border-color: var(--color-light);
    font-family: var(--font-body);
    font-optical-sizing: auto;
    font-weight: 600;
    font-size: 18px;
    line-height: 200%;
    font-style: normal;
}

b {
    font-weight: 600;
}

div, p, input, ul, ol, li {
    color: var(--color-light);
    border-color: var(--color-light);
    font-family: var(--font-body);
    font-optical-sizing: auto;
    font-weight: 400;
    font-size: 18px;
    line-height: 200%;
    font-style: normal;
}

button {
    width: fit-content;
    background-color: var(--color-dark);
    color: var(--color-light);
    text-align: center;
    border: 3px solid var(--color-dark);
    border-radius: 34px;
    padding: 11px 25px;
    cursor: pointer;
    pointer-events: all;

    font-family: var(--font-mono);
    font-optical-sizing: auto;
    font-weight: 400;
    font-size: 16px;
    line-height: 150%;
    font-style: normal;

    transition: all 0.2s ease 0s;
}

button:hover, button:active {
    background-color: var(--color-light);
    color: var(--color-dark);
    font-weight: 500;
    transform: scale(1.04);
    span {
        opacity: 1;
    }
}

.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
    width: 100%;
    max-width: 1400px;
    margin: auto;
    transition: all 0.3s ease 0s;
}

/* Game canvas */

main, canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -2;
    background-color: var(--color-dark);
    transition: all 0.2s ease 0s;
}

.blur {
    filter: blur(12px)
}

/* Home Splash */

#home {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: max(300px, calc(100vh - 140px - 1vh));
    
    #home-title {
        display: flex;
        width: 100%;
        top: max(90px, 50vh - 180px);
        justify-content: center;
        align-items: center;
        text-align: center;
        padding-inline: 20px;
        padding-bottom: 100px;
        transition: all 0.3s ease 0s;

        h1 {
            font-weight: 500;
            font-size: min(8vw, 48px);
            font-family: var(--font-poppins);
        }
    }
}

#reticle {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    border: 3px solid #404040;
    border-radius: 50%;
    pointer-events: none; 
    transform: none;
    transition: all 0.15s ease-out 0s;
}
#reticle.glow {
    filter: drop-shadow(0 0 12px #303030);
}

/* Navigation */

nav {
    display: flex;
    flex-direction: row;
    width: 1400px;
    max-width: calc(100vw - 100px);
    padding-inline: 50px;
    height: 100px;
    justify-content: space-between;
    align-items: center;    

    h1, a, p {
        font-weight: 300;
        font-family: var(--font-poppins);
    }

    #nav-name {
        font-weight: 500;
        font-size: 21px;
        line-height: 120%;
        text-decoration: none;
    }

    #nav-links {
        display: flex;
        flex-direction: row;
        gap: 20px;
        margin-left: 10px;
        a {
            padding: 0px 10px;
            text-decoration: none;
            p {
                font-size: 18px;
                transition: all 0.2s ease 0s;
                margin-block: 2px;
            }
        }
        a:hover {
            p {
                transform: translateY(-5px);
            }
        }
        a.active {
            /* border-bottom: 1px solid; */
            p {
                font-weight: 500;
            }
        }
    }
}

nav.sticky {
    position: sticky;
    top: 0px;
}

/* Footer */

footer {
    display: flex;
    flex-direction: column;
    background-color: var(--color-light);
    color: var(--color-dark);
    width: 100vw;
    padding-block: 0px 40px;
    align-items: center;
    justify-content: center;

    h1, p {
        color: var(--color-dark);
        max-width: min(640px, 100%);
        padding-inline: 20px;
        /* font-size: 18px; */
    }
    h1 {
        font-size: 40px;
        font-weight: 600;
        margin-block: 0px;
    }
    .footer-links {
        display: flex;
        flex-wrap: wrap;
        max-width: min(640px, 100%);
        margin-block: 12px 4px;
        gap: 12px;
        align-content: center;
        justify-content: center;

        a {
            text-align: center;
            text-decoration: none;
            p {
                color: var(--color-dark);
                font-family: var(--font-poppins);
                font-weight: 400;
                margin-block: 2px;
                padding-inline: 8px;
                padding-block: 36px 3px;
                
                background-position: top; 
                background-repeat: no-repeat;
                background-size: 30px;
                transition: all 0.2s ease 0s;
            }
            #email {
                background-image: url( '../resources/email.svg' );
            }
            #linkedin {
                background-image: url( '../resources/linkedin.svg' );
            }
            #resume {
                background-image: url( '../resources/resume.svg' );
            }
            #about {
                background-image: url( '../resources/about.svg' );
            }
        }
        a:hover {
            p {
                /* font-weight: 500; */
                transform: scale(110%);
            }
        }
    }
    #copyright {
        width: 100%;
        text-align: center;
        font-weight: 300;
        font-size: 16px;
    }
}


/* Highlighted Project Items */

#projects {
    display: flex;
    flex-direction: column;
    background-color: var(--color-light);
    color: var(--color-dark);
    width: 100vw;
    padding-block: 40px;
    padding-inline: 0;
    align-items: center;

    border-top: 4px solid var(--color-gray-border);
}

.project {
    display: grid;
    grid-template-columns: 5fr 4fr;
    align-items: center;
    gap: 80px;
    max-width: 1300px;
    padding-block: 40px;
    padding-inline: 60px 40px;

    h1, h2, p {
        color: var(--color-dark);
        padding: 0;
        margin: 5px 0px;
    }
    a {
        color: var(--color-dark);
        font-weight: 400;
        text-decoration: none;
        transition: all 0.2s ease 0s;
    }
    a:hover {
        /* transform: translateY(-5px); */
    }

    .project-thumbnail {
        padding-block: 20px 0px;
        text-align: center;
        
        height: fit-content;
        img {
            width: 100%;
            max-width: 700px;
            height: auto;
            object-fit: cover;
            aspect-ratio: 17 / 10;
            border-radius: 20px;
        }
    }

    .project-info {
        display: flex;
        flex-direction: column;
        max-width: 450px;
        h1 {
            font-size: 44px;
            font-weight: 600;
            line-height: 120%;
            margin-block: 6px;
        }
        h2 {
            font-weight: 400;
        }
        .info-separator {
            background-color: var(--color-dark);
            height: 1px;
            width: 100px;
            margin-block: 23px 20px;
        }
        p {
            margin-bottom: 26px;
            max-width: 420px;
        }
        .project-tags {
            font-family: var(--font-mono);
        }
    }

}

/* Project Page */

.about-content, .project-content {
    display: flex;
    flex-direction: column;
    background-color: var(--color-light);
    color: var(--color-dark);
    width: calc(100vw - 50px);
    max-width: 1000px;
    padding-block: 75px 0px;
    padding-inline: 25px;
    align-items: center;
    
    /* border-top: 4px solid var(--color-gray-border); */

    /* Mass Override */

    h1, h2, h3 {
        color: var(--color-dark);
        font-weight: 400;
        text-align: center;
        margin-block: 12px;
    }

    h3, h4, h5, h6, a, div, p, input, ul, ol, li, img {
        width: 100%;
        color: var(--color-dark);
        font-weight: 400;
        font-size: 17px;
        margin-block: 10px;
    }
    ul, ol {
        width: calc(100% - 26px);
        padding-left: 26px;
        margin-block: 0px;
    }
    li {
        width: calc(100% - 5px);
        padding-left: 5px;
        margin-block: 0;
    }

    /* Specific overrides */

    h1 {
        font-weight: 600;
        font-size: 50px;
        line-height: 120%;
        /* margin: 0px; */
    }
    h2 {
        font-family: var(--font-mono);
        font-size: 20px;
        /* margin: 0px;  */
    }
    h3 {
        text-align: center;
        /* margin: 0px; */
    }
    h4 {
        font-weight: 600;
        font-size: 36px;
        line-height: 125%;
        margin-block: 14px 12px;
    }
    h5 {
        font-weight: 600;
        font-size: 21px;
        margin-block: 4px 4px;
    }
    .note {
        width: fit-content;
        max-width: 100%;
        margin-block: 10px 20px;
    }
    .overview-info {
        display: grid;
        grid-template-columns: 1fr 1fr 2fr;
        gap: 30px;
        grid-template-rows: 2;
        margin-block: 0;
        p {
            display: flex;
            flex-direction: column;
        }
        .span-2 {
            grid-column: 3;
            grid-row: 1 / span 2;
            /* grid-row: 2;
            grid-column: 1 / span 4; */
        }
    }
    img {
        object-fit: contain;
        display: block;
        max-width: 100%;
        margin-inline: auto;
        text-align: center;
        margin-block: 30px 20px;
        max-height: min(600px, 80vh);
    }
    .caption {
        text-align: center;
        font-weight: 300;
        font-size: 15px;
        margin-block: 5px 25px;
    }
    .page-break {
        background-color: var(--color-gray-border);
        height: 1px;
        margin-block: 30px 20px;
    }
    .page-break.hidden {
        height: 0px;
    }
    .page-break.last {
        margin-top: 40px;
    }
}

/* Specific to About */

.about-content {
    h3, h4, h5, h6, a, div, p, input, ul, ol, li {
        width: 800px;
        max-width: calc(100vw - 50px);
    }
    img {
        max-height: 600px;
        aspect-ratio: 1 / 1;
    }
}

/* Project Change Viewport */
@media only screen and (max-width: 1200px) {
    
    /* Navigation */

    .project {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding-inline: 30px;
        text-align: center;
    
        .project-info {
            align-items: center;
        }
    
    }
    
}

/* Mobile Viewport */
@media only screen and (max-width: 800px) {
    
    /* Navigation */

    nav {
        max-width: calc(100vw - 40px);
        padding-inline: 20px;
        height: 80px;
        
        #nav-name {
            font-size: 21px;
        }

        #nav-links {
            padding-left: 12px;
            a {
                padding-inline: 0px;
            }
        }
    }
    
    /* Home Splash */
    
    #home {
        #home-title {
            padding-bottom: 30px;
        }
    }

    
    .about-content, .project-content {
        .overview-info {
            display: flex;
            flex-direction: column;
            gap: 0;
        }
    }
}

/* Color override classes */

.white-on-black {
    color: var(--color-light);
    background-color: var(--color-dark);

    h1, h2, h3, h4, h5, h6, a, p, input, ul, ol, li {
        color: var(--color-light);
        border-color: var(--color-dark);
    }
}

.black-on-white {
    color: var(--color-dark);
    background-color: var(--color-light);

    h1, h2, h3, h4, h5, h6, a, p, input, ul, ol, li {
        color: var(--color-dark);
        border-color: var(--color-dark);
    }
}