:root {
    --color-background: #13112f;
    --color-text: #e7ecee;
    --color-primary: #44d7b6;
    --color-secondary: #307674;

    --screen-width: 70vw;
    --content-width: 50vw;
}

* {
    box-sizing: border-box;
    color: var(--color-text);
    font-family: 'DM Sans', sans-serif;
}

::selection {
    color: var(--color-background);
    background-color: var(--color-primary);
}

html {
    background-color: var(--color-background);
    overflow-x: clip;
}

body {
    margin: 0;
    max-width: 100vw;
    overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'DM Sans', sans-serif;
}

h1 {
    font-size: 3rem;
    color: var(--color-secondary);
}

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

img {
    max-height: 100%;
    max-width: 100%;
}

div.hero-flex h1, div.game-info h1 { font-family: 'DM Mono', monospace; font-size: 24rem; margin: 0; color: var(--color-primary); }
div.game-info h1 { font-size: 4rem; }
div.hero-flex h2 { font-size: 4rem; margin: 0; color: var(--color-secondary); }
div.hero-flex div.interaction { margin: 2rem 0 0 0; }

label {
    display: block;
    margin: 1rem 0;
}

button, *.project, *.blog, *.featured, *.socials, select, iframe, *.image, a.button, input, textarea {
    padding: 1rem 1rem 1rem 2rem;
    border: none;
    border-left: 2px solid var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    background-color: var(--color-background);
    color: var(--color-primary);
    font-family: 'DM Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
}

button {
    margin: 1rem 0;
}

form {
    width: var(--post-width);
}

input, textarea, select {
    width: 100%;
    padding: 1rem;
}

textarea, input[type=text], input[type=email] {
    text-transform: none;
}

input[type=checkbox], input[type=radio] {
    width: max-content;
}

::file-selector-button {
    border: 2px solid var(--color-primary);
    background: none;
    padding: 4px 8px;
    font-family: 'DM Sans', sans-serif;
    margin-right: 10px;
    color: var(--color-primary);
    font-size: var(--font-size);
}

::-webkit-file-upload-button {
    border: 2px solid var(--color-primary);
    background: none;
    padding: 4px 8px;
    font-family: 'DM Sans', sans-serif;
    margin-right: 10px;
    color: var(--color-primary);
    font-size: var(--font-size);
}

::-ms-browse {
    border: 2px solid var(--color-primary);
    background: none;
    padding: 4px 8px;
    font-family: 'DM Sans', sans-serif;
    margin-right: 10px;
    color: var(--color-primary);
    font-size: var(--font-size);
}

textarea {
    resize: vertical;
}

input:not[type='submit'] {
    text-transform: none;
    padding: 1rem;
    width: 24rem;
}

div.box {
    border: 2px solid var(--color-primary);
    padding: 1rem;
}

a.button {
    padding: 1rem;
}

a.button.hidden {
    border: none;
    outline: none;
}

*.hidden, .pop-up {
    display: none;
}

.flex {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.flex.column {
    flex-flow: column;
}

.flex.no-gap {
    gap: 1rem;
}

.likes-dislikes {
    background: linear-gradient(90deg, var(--color-primary) 50%, rgba(0,0,0,0) 50%);
    background-size: 200%;
    background-position: 50%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    -webkit-text-stroke: var(--color-primary) 1px;
    font-weight: 400;
}

.blur-background {
    display: block;
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 500;
    background: rgba(0, 3, 5, 0.4);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.image-view-background {
    display: none;
}

.image-view-background.active {
    display: block;
}

.popup {
    position: fixed;
    top: -1000px;
    left: -1000px;
    min-width: 30vw;
    aspect-ratio: 16 / 9;
    background-color: var(--color-background);
    border: 2px solid var(--color-primary);
    padding: 1rem;
    z-index: 1000;
}

.popup.no-style {
    background: unset;
    border: unset;
    aspect-ratio: unset;
    padding: unset;
}

.popup.resize {
    width: max-content;
    height: max-content;
    max-width: 85vw;
    max-height: 85vh;
    aspect-ratio: unset;
}

.popup.center.active {
    top: 50vh;
    left: 50vw;
    transform: translate(-50%, -50%);
}

.popup.active {
    top: 27px;
    left: 27px;
}

.popup-open {
    color: var(--color-primary);
    font-weight: 700;
    cursor: pointer;
}

.popup-close {
    position: absolute;
    top: 15px;
    left: calc(100% - 30px);
    color: var(--color-primary);
    font-weight: 800;
    cursor: pointer;
}

*.image {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    padding: 2px;
}

*.file-preview img {
    max-width: 400px;
}

*.image img {
    width: 100%;
    height: 100%;
}

#image-view img {
    max-width: unset;
    max-height: unset;
}

*.images {
    padding: 1rem 0;
}

.content-outer {
    width: var(--content-width);
    margin: auto;
}

button.filled {
    background-color: var(--color-primary);
    color: var(--color-background);
    border: none;
    outline: 2px solid var(--color-primary);
    outline-offset: 0;
    padding: 1rem 1rem 1rem 1.3rem;
}

button::before, select::before {
    width: 20px;
    height: 4px;
    background-color: var(--color-background);
    border: 2px solid var(--color-primary);
    border-left: none;
    position: absolute;
    transform: translate(-34px, 7px);
    z-index: 100;
    content: ' ';
}

button.filled::before {
    display: none;
}

.user-types-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: var(--screen-width);
    margin: auto;
}

button::after, *.project::before, *.blog::before, *.featured::before,
*.socials::before, *.featured div.content::before, *.project div.content::before, select::after, a.button::after {
    width: 20px;
    height: 20px;
    background-color: var(--color-background);
    border-top: 2px solid var(--color-primary);
    position: absolute;
    transform: translate(10px, 32px) rotate(-45deg);
    z-index: 100;
    content: ' ';
    clip-path: polygon(0px 0px, 20px 0px, 20px 4px, 10px 14px, 0px 4px);
}

button.filled::after {
    transform: translate(7px, 27px) rotate(-45deg);
}

a.button::after {
    transform: translate(26px, 32px) rotate(-45deg);
    border-top: 2px solid var(--color-background);
}

*.featured div.content::before, *.project div.content::before {
    transform: translate(-12px, -12px) rotate(135deg);
    border: none; clip-path:
        polygon(0px 0px, 20px 0px, 20px 4px, 10px 8px, 0px 4px);
}

*.project::before, *.blog::before, *.featured::before, *.socials::before {
    transform: translate(-20px, -21px) rotate(135deg);
}

*.featured::after {
    content: "featured";
    text-transform: uppercase;
    position: absolute;
    transform: translate(-6px, 6px);
    font-size: 5px;
    background-color: var(--color-background);
    padding: 0 2px 2px 3px;
}

div.home-grid {
    display: grid;
    grid-template-columns: 1fr 26vw;
    width: 100%;
    height: 100vh;
}

div.gallery-grid {
    display: grid;
    width: var(--screen-width);
    margin: auto;
    grid-template-columns: repeat(6, 1fr);
    gap: 2rem;
}

div.game-banner {
    width: calc(100vw - 4rem);
    height: 100vh;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

div.game-banner > div.game-info, div.game-banner > div.game-video {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

div.game-banner > div.game-info {
    text-align: left;
    align-items: start;
    gap: 2rem;
}

div.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr max-content;
    grid-template-areas: 'buttons navigation'
                        'projects projects';
    max-width: 100%;
    gap: 2rem;
    margin: 6rem 2rem;
    padding-top: 4rem;
    border-top: 1px solid var(--color-secondary);
}

div.portfolio-grid div.buttons {
    grid-area: buttons;
    display: flex;
    gap: 2rem;
}

div.portfolio-grid div.buttons select { width: 24rem; }
div.portfolio-grid div.buttons select::after { transform: translate(calc(9rem - 2px), 32px) rotate(-45deg); }
div.portfolio-grid div.buttons select::before { transform: translate(calc(-2rem - 6px), 7px); }

div.portfolio-grid div.navigation {
    grid-area: navigation;
}

div.header {
    text-align: center;
}

div.navigation {
    display: flex;
    justify-content: end;
}

div.portfolio-grid *.projects {
    display: grid;
    grid-area: projects;
    grid-template-columns: repeat(8, 1fr);
    max-width: 100%;
    gap: 2rem;
}

div.hero-flex {
    display: flex;
    align-items: start;
    justify-content: center;
    flex-flow: column;
    height: 100vh;
    padding: 0 2rem;
}

div.panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 'featured featured'
                        'project-1 project-2';
    height: 100vh;
    max-width: 100%;
    padding: 2rem;
    gap: 2rem;
}

div.panel-grid *.project:nth-child(4) { grid-area: project-1; }
div.panel-grid *.project:nth-child(5) { grid-area: project-2; }

*.project, *.blog, *.featured, *.socials {
    /*background-color: var(--color-secondary);*/
    width: 100%;
    max-width: calc(100% - 0px);
    height: 100%;
    margin: 0px;
    padding: 6px 6px 3px 6px;
    border-left: none;
}

*.project div.content, *.featured div.content {
    height: 100%;
}

div.portfolio-grid *.blog {
    grid-column: span 2;
    grid-row: span 1;
    display: grid;
    max-height: 426px;
}

*.project { aspect-ratio: 2 / 3; }
*.blog { grid-area: blog; min-height: 160px; }
*.featured { grid-area: featured; aspect-ratio: 2 / 3; }
*.socials { grid-area: socials; }

*.project img, *.featured img {
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    /*object-fit: cover;*/
    aspect-ratio: 2 / 3;
}

div.center-form {
    display: flex;
    flex-flow: column;
    margin: auto;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
}

nav {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    height: max-content;
    width: max-content;
    padding: 1rem 3rem 1rem 3rem;
    margin-right: 10px;
    display: flex;
    gap: 4rem;
    background-color: var(--color-background);
}

nav a {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

span.dash { border-top: 1px dashed var(--color-secondary); width: 100vw; position: absolute; z-index: -1; }

span.illustration img { width: 110vw; position: absolute; z-index: -1; max-width: unset; }

span.illustration.first img { top: -8rem; left: -2rem; }
span.illustration.second img { top: 62vh; left: -2rem; }

div.page-selector {
    display: flex;
    justify-content: center;
    align-content: center;
    gap: 2rem;
    margin: 3rem 0;
}

div.header-layout {
    display: grid;
    grid-template-columns: 1fr max-content;

}

div.page-layout {
    padding: 2rem;
}

div.content-layout {
    width: var(--content-width);
    margin: auto;
    display: flex;
    gap: 2rem;
    flex-flow: column;
}

div.content-layout.blogs *.blog {
    padding-bottom: 2rem;
}

div.content-layout.blogs *.blog::before{
    position: absolute;
    transform: translate(-20px, -21px) rotate(135deg);
    z-index: 100;
    content: ' ';
    clip-path: polygon(0px 0px, 20px 0px, 20px 4px, 10px 14px, 0px 4px);
}

iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 1rem;
}

div.floating#continue-scroll {
    position: absolute;
    top: calc(100vh - 5rem);
    left: 50%;
    transform: translate(-50%);
    animation: bounce 1.5s ease-in-out infinite;
}

div.floating#continue-scroll p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-primary);
}

#image-view img {
    max-width: 100%;
    max-height: 100%;
    width: max-content;
    height: max-content;
}

.mobile-only {
    display: none;
}

@keyframes bounce {
    0% {

    }

    50% {
        transform: translate(-50%, -10px);
    }

    90% {

    }

    95% {

    }

    100% {

    }
}

@media only screen and (max-width: 1080px) and (max-aspect-ratio: 4 / 3) {
    :root {
        --width: 50vw;
        --post-width: 50vw;
    }
}

@media only screen and (max-width: 950px) {
    :root {
        --width: 60vw;
        --post-width: 60vw;
    }

    .panel-grid {
        grid-template-areas: 'featured blog';
    }

    .game-banner {
        grid-template-columns: 1fr;
    }
}

@media only screen and (max-width: 720px) {
    :root {
        --width: 60vw;
        --post-width: 60vw;
    }
}

@media only screen and (max-width: 480px) {
    :root {
        --width: 90vw;
        --content-width: 90vw;
    }

    .desktop-only {
        display: none;
    }

    * {
        font-size: 0.9rem;
    }

    h1 { font-size: 3rem !important;  }
    h2 { font-size: 2rem !important;  }

    .panel-grid {
        grid-template-areas: 'featured blog';
    }

    .game-banner {
        grid-template-columns: 1fr !important;
        grid-template-rows: 1fr 1fr;
    }

    a.blog {
        min-height: unset;
    }

    .projects {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    nav {
        padding: 1rem;
        gap: 1rem;
    }

    div.buttons {
        display: none !important;
    }

    .page-layout > * {
        max-width: 100%;
    }
    .page-layout .content-layout {
        max-width: 100%;
    }

    .home-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: 1fr 1fr;
    }

    div.hero-flex, div.panel-grid {
        height: min-content;
    }

    div.panel-grid {
        grid-template-columns: 2fr 1fr;
        grid-template-areas: 'featured project-1'
                            'featured project-2';
    }

    div.gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        margin: 0;
        width: 100%;
    }

    button::before, select::before {
        transform: translate(-34px, 7px);
    }

    button::after, *.project::before, *.blog::before, *.featured::before,
    *.socials::before, *.featured div.content::before, *.project div.content::before, select::after, a.button::after {
        transform: translate(8px, 30px) rotate(-45deg);
    }

    button.filled::after {
        transform: translate(5px, 25px) rotate(-45deg);
    }

    a.button::after {
        transform: translate(26px, 32px) rotate(-45deg);
        border-top: 2px solid var(--color-background);
    }

    *.featured div.content::before, *.project div.content::before {
        transform: translate(-12px, -12px) rotate(135deg);
        border: none; clip-path:
            polygon(0px 0px, 20px 0px, 20px 4px, 10px 8px, 0px 4px);
    }

    *.project::before, *.blog::before, *.featured::before, *.socials::before {
        transform: translate(-20px, -21px) rotate(135deg);
    }
}

@media only screen and (min-aspect-ratio: 1 / 1) and (max-aspect-ratio: 4 / 3) {
    :root {
        --screen-width: 70vw;
        --content-width: 50vw;
    }

    @media (min-width: 2000px) {
        :root {
            --width: 50vw;
            --post-width: 40vw;
        }
    }

    @media (max-width: 2000px) and (min-width: 1680px) {
        :root {
            --width: 60vw;
            --post-width: 40vw;
        }
    }

    @media (max-width: 1680px) and (min-width: 1200px) {
        :root {
            --width: 70vw;
            --post-width: 40vw;
        }
    }

    @media (max-width: 1200px) and (min-width: 1000px) {
        :root {
            --width: 86vw;
            --post-width: 40vw;
        }
    }

    @media (max-width: 1000px) {
        :root {
            --width: 90vw;
            --post-width: 40vw;
        }

        .panel-grid {
            grid-template-areas: 'featured blog';
        }

        .game-banner {
            grid-template-columns: 1fr;
        }
    }
}

@media only screen and (min-aspect-ratio: 4 / 3) and (max-aspect-ratio: 8 / 5) {

    :root {
        --width: 70vw;
        --post-width: 40vw;
    }

    @media (min-width: 2000px) {
        :root {
            --width: 50vw;
            --post-width: 40vw;
        }
    }

    @media (max-width: 2000px) and (min-width: 1680px) {
        :root {
            --width: 60vw;
            --post-width: 40vw;
        }
    }

    @media (max-width: 1680px) and (min-width: 1200px) {
        :root {
            --width: 70vw;
            --post-width: 40vw;
        }
    }

    @media (max-width: 1200px) and (min-width: 1000px) {
        :root {
            --width: 70vw;
            --post-width: 40vw;
        }
    }

    @media (max-width: 1000px) {
        :root {
            --width: 90vw;
            --post-width: 40vw;
        }

        .panel-grid {
            grid-template-areas: 'featured blog';
        }

        .game-banner {
            grid-template-columns: 1fr;
        }
    }
}

@media only screen and (min-aspect-ratio: 8 / 5) and (max-aspect-ratio: 16 / 9) {
    :root {
        --screen-width: 70vw;
    --content-width: 50vw;
    }

    @media (min-width: 2000px) {
        :root {
            --width: 50vw;
            --post-width: 40vw;
        }
    }

    @media (max-width: 2000px) and (min-width: 1680px) {
        :root {
            --width: 60vw;
            --post-width: 40vw;
        }
    }

    @media (max-width: 1680px) and (min-width: 1200px) {
        :root {
            --width: 70vw;
            --post-width: 40vw;
        }
    }

    @media (max-width: 1200px) and (min-width: 1000px) {
        :root {
            --width: 70vw;
            --post-width: 40vw;
        }

        .projects {
            grid-template-columns: repeat(6, 1fr) !important;
        }
    }

    @media (max-width: 1000px) {
        :root {
            --width: 90vw;
            --post-width: 40vw;
        }

        .panel-grid {
            grid-template-areas: 'featured blog';
        }

        .game-banner {
            grid-template-columns: 1fr;
        }
    }
}

@media only screen and (min-aspect-ratio: 16 / 9) and (max-aspect-ratio: 21 / 9) {

    :root {
        --screen-width: 70vw;
        --content-width: 50vw;
    }

    @media (min-width: 2000px) {
        :root {
            --width: 50vw;
            --post-width: 40vw;
        }
    }

    @media (max-width: 2000px) and (min-width: 1680px) {
        :root {
            --width: 60vw;
            --post-width: 40vw;
        }

        .projects {
            grid-template-columns: repeat(6, 1fr) !important;
        }
    }

    @media (max-width: 1680px) and (min-width: 1200px) {
        :root {
            --width: 70vw;
            --post-width: 40vw;
        }

        .projects {
            grid-template-columns: repeat(4, 1fr) !important;
        }

        .popup.resize {
            max-width: 85vw;
            max-height: 70vh;
            width: min-content;
            height: min-content;
        }
    }

    @media (max-width: 1200px) and (min-width: 1000px) {
        :root {
            --width: 70vw;
            --post-width: 40vw;
        }
    }

    @media (max-width: 1000px) {
        :root {
            --width: 90vw;
            --post-width: 40vw;
        }

        .panel-grid {
            grid-template-areas: 'featured blog';
        }

        .game-banner {
            grid-template-columns: 1fr;
        }
    }
}

@media only screen and (max-width: 360px) {
    :root {
        --screen-width: 90vw;
        --content-width: 90vw;
    }

    .desktop-only {
        display: none;
    }
}