@font-face {
    font-family: Bitsumishi;
    src: url(/resources/fonts/bitsumishi.ttf)
}

@font-face {
    font-family: MonsterPumpkin;
    src: url(/resources/fonts/MonsterPumpkin.ttf)
}

@font-face {
    font-family: Interceptor;
    src: url(/resources/fonts/interceptor.ttf)
}

@font-face {
    font-family: MeltedMonster;
    src: url(/resources/fonts/MeltedMonster.ttf)
}

@font-face {
    font-family: MedodicaRegular;
    src: url(/resources/fonts/MedodicaRegular.otf)
}

@font-face {
    font-family: Bodoni175;
    src: url(/resources/fonts/Bodoni-175.otf)
}

:root {
    --primary-fill: #DCCFC0; 
    --secondary-fill: #EEEEEE;
    --main-body: #A2AF9B;
    --border: #1C352D;
}

@keyframes bg {
    0% { transform: translate(0, 0) }
    100% { transform: translate(240px, 240px); }
}

html, body {
    overflow-x: hidden;
} 

.bg-container {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 150vw;
    height: 600%;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
    transform: translateZ(0); /* promote bg its own layer for smoother animation */
    will-change: transform;
}

.bg {
    background-color: var(--primary-fill);
	background-image: linear-gradient(45deg, var(--secondary-fill) 25%, transparent 25%), 
                      linear-gradient(-45deg, var(--secondary-fill) 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, var(--secondary-fill) 75%), 
                      linear-gradient(-45deg, transparent 75%, var(--secondary-fill) 75%);
    animation: bg 32s infinite linear;
    background-size: 480px 480px;
    background-position: 0 0, 0 240px, 240px -240px, -240px 0px;
    width: 100%;
    height: 100%;
}

nav {
    display: flex;
    flex-wrap: wrap;
    
    align-content: center;
    justify-content: left;
    width: 100%;
    height: 48px;
}

nav > a {
    padding: 8px;
}

#projects-nav {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: 10% 10% 10% 10% 10% 10%;
    column-gap: 5%;
    width: 100%;
    margin: 16px 0;
    
    -webkit-mask-image: linear-gradient(90deg, transparent 0% 6%, black 10% 90%, transparent 94% 100%);
    mask-image: linear-gradient(90deg, transparent 0% 6%, black 10% 90%, transparent 94% 100%);
    background: var(--main-body);
    border-top: 6px solid var(--border);
    border-bottom: 6px solid var(--border);
}

@keyframes nav-scroll {
    0% { left: -4vw; pointer-events: none;}
    4% { pointer-events: all;}
    88% { pointer-events: all; }
    92% { pointer-events: none; }
    100% { left: 100vw; pointer-events: none; }
}

#projects-nav a {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    text-align: center;
    border: solid var(--border) 4px;

    height: 100%;
    aspect-ratio: 1;
    margin: 0 2.5%;

    font-size: 3vw;
    text-decoration: inherit;
    color: inherit;

    transition: 0.2s;
}

#projects-nav a:hover {
    transform: scale(1.15);
}

#projects-nav > div {
    grid-row: 1;
    grid-column: 1;
    position: relative;
    height: 80%;
    margin: 10% 0;
    animation: 80s nav-scroll linear infinite;
}

p {
	font-family: "Lato", verdana,arial,helvetica,sans-serif;
	font-size: 1cqw;
    line-height: 1.35;
}

body {
    position: relative;
    margin: 0;
}

.main {
    background-color: var(--main-body);
    border: 0.35vw var(--border) solid;
    border-radius: 4px;
    margin: 2vw 4vw 4vw 4vw;
    max-width: 2400px;
}

div.portfolio-block {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 45cqw;
    background: none;
    text-shadow: none;
}

.top-info {
    width: 100%;
    margin-top: 8px;
    margin-bottom: 0.5vw;
    margin-left: 4px;
    display: flex;
    font-size: 2.5vw;
    justify-items: center;
    align-items: flex-end;
    background: none;
}

.thumbnail-info {
    font-family: "Lato", verdana,arial,helvetica,sans-serif;
    width: auto;
    padding: 0vw 1vw;
    font-size: 0.45em;
}

.thumbnail-info a {
    color: inherit;
    text-decoration: inherit;
}

.platform-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin: 0 0 0.5vw 0;
    font-size: 0.45em;
    font-family: "Lato", verdana,arial,helvetica,sans-serif;
    text-decoration: none;
    border-bottom: 0.1cqw dashed black;
}

.platform-info a {
    color: inherit;
    text-decoration: inherit;
}

div.project-info {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    background-color: var(--primary-fill);
    border-radius: 8px;
    border: 0.3vw solid var(--border);
    padding: 1em;
    padding-top: 0;
    column-gap: 1em;
    font-size: 1.75vw;
    height: 100%;
    z-index: 1;
}

div.project-info img, iframe {
    display: block;
    max-width: 80%;
    border: 2px solid var(--border);
    margin: 0em auto 1em auto;
    grid-column: 2 / span 1
}

div.project-info p > img {
    margin: 0 1em 0.2em 0.5em;
}

div.project-info iframe {
    aspect-ratio: 16 / 9;
}

div.project-info > p {
    grid-column: 1;
    margin-top: 0px;
}

.image-pair {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
    width: 90%;
    max-width: 100%;
    margin: 0 auto 1em auto;
}

.image-pair img {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    max-width: 100%;
    height: auto;
    margin: 0;
    object-fit: contain;
}

div.banner {
    display: flex;
    align-content: center;
    justify-content: center;
    font-size: 5vw;
    flex-wrap: wrap;
    margin: 0;
    height: 10vw;
    width: 100vw;
    background-color: var(--main-body);
    /* background-image: 
        repeating-linear-gradient(45deg,var(--secondary-fill),
                                        var(--secondary-fill) 50px, 
                                          transparent 50px,
                                          transparent 100px); */
    background-position: 0 0;
    border-bottom: 4px solid var(--border);
    border-top: 4px solid var(--border);
}

div.projects-container {
    display: grid;
    grid-template-areas: "onion onion soup" "eyespy bps bps" "apartment apartment soto" "deerstranger intcd igb ";
    grid-template-columns: 33% 33% 33%;
    justify-items: center;
    margin-top: 32px;
    width: 92%;
    padding: 1% 4%;
    column-gap: 16px;
    row-gap: 32px;
}

a.project {
    display: grid;
    align-content: center;
    text-align: center;
    border: 0.75cqw var(--border) double;
    border-radius: 0.2cqw;
    box-shadow: 0.25cqw 0.25cqw 0.25cqw var(--border);
    max-width: 70%;
    height: 4.5cqw;
    aspect-ratio: 4 / 1;
    text-decoration: none;
    container-type: inline-size;
    & >span {
        text-align: center;
        user-select: none;
    }
}

@media only screen and (max-width: 1000px) {
    div.projects-container {
        grid-template-areas: "onion" "soup" "eyespy" "bps" "apartment" "soto" "deerstranger" "intcd" "igb";
        grid-template-columns: 100%;
    }

    .main {
        width: 96%;
    }

    div.portfolio-block {
        max-width: 100%;
    }

    p {
        font-size: 2em;
    }

    .top-info {
        justify-content: center;
    }
    
    a.project {
        transform: scale(3);
        margin-bottom: 8vw;
        margin-top: 4vw;
    }

    .platform-info {
        font-size: 1em;
    }
}

@media only screen and (max-width: 600px) {
    #projects-nav {
        display: none;
    }
}



div#about-me {
    display: flex;
    justify-content: center; 
    margin-top: 64px;
    width: 100%;
}

#about-me > div {
    width: 80%;
}

div#social-media{
    display:grid; 
    grid-template-columns: auto auto; 
    grid-template-rows: auto;
    margin: 9px;
    column-gap: 16px;
    justify-content: left;
}

div.infobar {
    position: absolute;
    background-color: black;
    border-top: 4px gold ridge;
    top: 100%;
    width: 100%;
    height: 240px;
}

table {
    border-collapse: collapse;
}

td {
    border: 4px ridge var(--border);
    background-color: slateblue;
}

.decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.decoration img {
    position: absolute;
}