@keyframes background-pan {
    from {
        background-position: 0% center;
    }

    to {
        background-position: -200vw center;
    }
}

:root {
    --clickhere-x: 100vw;
    --clickhere-y: 100vh;
}

.content {
    font-family: 'Montserrat', sans-serif !important;
    transition: all 0.5s ease;
    position: fixed; 
    z-index: 0;
    top: 0; left: 0;
    overflow-x: hidden;
    overflow-y: scroll;
    width: 100%;
    height: 100%;
}

.hidden {
    display:none;
}

.content::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none;
}

#overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 1;
    pointer-events: none;
    z-index: 5;
    
    transition: background-position 0.3s ease-out;
    background-image: radial-gradient(rgba(128,128,128,0.2) 1.5px, transparent 0);
    background-size: calc(2 * var(--tile-w)) calc(2 * var(--tile-h));
    background-position : calc(calc(2 * var(--tile-w)) / 2) calc(var(--py) + calc(calc(2 * var(--tile-h)) / 2));
}

body {
    position: relative;
    animation: background-pan 10s linear infinite;
    background: linear-gradient(
        to right,
        var(--g1),
        var(--g2),
        var(--g1)
    );
    background-size: 200vw;
    width: 100%;
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: scroll;
    margin: 0px;
    transition: all 0.5s ease;
    cursor: default;
}

body.toggled > #title {
    opacity: 0;
}

body.toggled > #icon {
    opacity: 1;
}

body.toggled > #tiles > .tile:hover {
    opacity: 0.75 !important;
}

#tiles {
    height: 100vh;
    width: 100vw;
    z-index: 2 !important;
    cursor: default;

    display: grid;
    grid-template-columns: repeat(var(--columns), 1fr);
    grid-template-rows: repeat(var(--rows), 1fr);
    position: absolute;
}

.tile {
    z-index: 2;
    cursor: pointer;
    position: relative;
}

.tile:hover::before {
    background-color: rgb(30, 30, 30);
}

.tile::before {
    background-color: rgb(15, 15, 15);
    content: "";
    z-index: 1;
    position: absolute;
}

#title {
    box-sizing:border-box;
    color: white;
    font-family: 'Montserrat', sans-serif;
    padding: 0px 20vw 0px 10vw;
    transition: opacity 1200ms ease, height 0.5s ease;
    width: 100vw;
    transition: all 0.5s ease;
    font-size: 5rem;
    z-index: 7;
    pointer-events: none;
    cursor: default;
    font-weight: 500;
    opacity: 1;
}

#wrapper span {
    font-size: 1.25rem;
}

#wrapper {
    pointer-events: none;
    transition: all 0.5s ease-out;
    opacity: 1;
}

.unloaded #wrapper {
    opacity: 0;
    transform: translateX(10vw);
}

.svg {
    transition: background-color 0.3s ease-out, opacity 0.1s ease-in-out;
    display: flex;
    width: 100% !important;
    height: 100% !important;
    fill: #17181a;
    scale: 1.02;
}

.svg:hover {
    opacity: 0.9;
    background: rgba(23,24,26,0.5) !important;
}

.effect, #pre {
    transition: all 0.5s ease-in-out;
}

.effect {
    transition: all 0.5s ease-in-out;
    display: block;
    opacity: 1;
}

#pre {
    display: inline-block;
}

.toggled #title, .toggled #wrapper {
    pointer-events: none !important;
}
@media only screen and (max-width: 600px) {
    #title, h1 {
        font-size: 10vw !important;
        width: 100%;
        white-space:normal;
        margin-top: -1.5vw;
    }

    .centered {
        position: absolute;
        top: 50%;
        transform: translate(0, -50%);
    }

    .nav-button.toggled {
        margin: 9px !important;
        width: 100%;
    }
}
@media only screen and (max-width: 1000px) {
    #title, h1 {
        font-size: 13vw !important;
        width: 100%;
        white-space:normal;
        margin-top: -2vw;
        transition: all 0.5s ease;
        padding: 0 10vw 0 10vw !important;
    }


    .nav-element {
        font-size: 0.9rem;
        margin-left: 1vh;
        padding: 0 2vh 0 2vh;
    }

    .nav-name {
        display: none !important;
    }

    nav:not(.open) .nav-logo {
        display: inline-flex !important;
    }
    nav.open .nav-logo {
        display: none !important;
    }

    .nav-name {
        font-size: 4vw !important;
        letter-spacing: 0.6vw !important;
        padding-left: 2vw;
    }

    #navbar {
        height: 7vh !important;
        padding: 0 5vw 0 10vw !important;
    }
    #about {
        right: 5vw !important;
    }

    .nav-list:first-of-type:not(.open):not(.desktop) {
        display: none;
    }

    .nav-list {
        width: calc(100vw - 10vw) !important;
        padding: 0 !important;
    }

    .nav-button {
        margin: 9px !important;
        margin-left: auto !important;
    }

    .nav-title {
        height: 7vh !important;
        width: calc(100vw - 20vw) !important;
        margin-top: 3dvh !important;
    }

    .nav-title .nav-element {
        padding: 20px !important;
    }

    .centered {
        position: absolute;
        top: 50%;
        transform: translate(0, -50%);
    }

    .open .nav-open {
        transform: translate(50%, 100%);
    }

    .open .nav-open:after {
        transition: all 0.5s;
        content: "×";
        display: inline-block;
        transform: rotate(90deg);
    }
    
    .nav-open:after {
        transition: all 0.5s;
        content: "···";
        display: inline-block;
        transform: rotate(0deg);
    }

    .nav-open {
        transition: all 0.5s;
        display: block !important;
        width: 12vw;
        height: 12vw;
        border-radius: 50vw;
        background-color: var(--g2);
        position: fixed;
        top: calc(3.3vw + 3.5vh);
        right: calc(5vw + 3.5vh);
        transform: translate(50%, -50%);
        z-index: 999;
        font-size: 5vw;
        border: none;
    }

    .nav-button {
        display: block;
    }
    .mobile {
        display: inline-flex !important;
    }

    .nav-button.toggled {
        margin: 9px !important;
        width: 100%;
    }
}

@media only screen and (min-width: 1000px) {
    .nav-button.toggled {
        margin: 9px;
        width: 100%;
    }

    .desktop {
        display: inline-flex !important;
    }
    .mobile {
        display: none !important;
    }

    .centered {
        left: 50%;
        position: absolute;
        top: 50%;
        transform: translate(-50%, calc(-50% - 2.5vw));
    }

    .over .nav-list:first-of-type {
        transform: translateY(-4vh);
    }
}

.nav-open {
    display: none;
}

.desktop {
    margin-left: 0 !important;
    margin-top: 5vh !important;
}

#navbar {
    width: 100vw;
    height: 3.1vw;
    padding: 0 10vw 0 10vw;
    position: fixed;
    top: 3.3vw;
    left: 0;
    z-index: 99;
    box-sizing:border-box;
}

nav {
    pointer-events: none;
}

.nav {
    height: 100%;
    display: inline-flex;
    font-family: 'Montserrat', sans-serif;
    color: white;
    font-weight: 300;
    align-items:center;
    justify-content:center;
    font-size: 1.4vw;
    pointer-events: all !important;
}

.nav-left {
    float: left;
}

.nav-right {
    float: right;
}

.nav:not(.nav-right) {
    margin-right: 2.5vw;
}

nav img {
    height: 100%;
}

.nav-name {
    font-weight: 300;
    font-size:1.2rem;
    letter-spacing: 0.1rem;
}

.nav-list {
    background: white;
    height: 100%;
    color: #525e6b;
    border-radius: 500vw;
    display: flex;
    transition: all 0.3s;
    padding: 0 0 0;
    position: relative;
    z-index: 10 !important;
    -webkit-box-shadow: 0 0 15px 5px rgba(0, 0, 0, 0.4); 
    box-shadow: 0 0 15px 5px rgba(0, 0, 0, 0.4);
}

.nav-element {
    transition: all 0.4s ease;
    display: inline-flex;
    justify-content:center;
    align-items:center;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0 2vh 0 2vh;
    cursor: pointer;
}
.nav-element:not(.nav-button):not(.nav-element-centered) {
    align-items:center;
    padding: 0 2vh 0 2vh;
}

.nav-element:hover {
    color: black;
}

.nav-button {
    font-family: 'Montserrat', sans-serif !important;
    background-color: var(--g2);
    color: #18132e;
    margin: 0.5vw;
    font-size: 0.9rem;
    border-radius: 50vw;
    border: 0;
}
.nav-button:hover {
    background-color: var(--g2a);

}

.title-button {
    background-color: white;
    color: #18132e;
    border-radius: 50vw;
    border: 0;
    font-weight: 500;
    padding: 0.5vw 1vw 0.5vw 1vw;
    height: 2vw;
    transition: all 0.3s;
    margin-right: -0.5vw;
}

.title-bar {
    margin-left: -1vw;
    border-radius: 50vw;
    padding: 1vw;
}

.title-bar span {
    font-size: 0.8vw !important;
}

.title-bar:hover {
    background-color: white;
    color: #18132e;
}

.title-bar:hover .title-button,.title-button:hover {
    background-color: var(--g2);
}

.nav-title {
    pointer-events: all !important;
    transition: background 0.3s, box-shadow 0.3s;
    width: 20vw;
}

.nav-title {
    background: rgba(255, 255, 255,1);
    margin-top: 1vw;
    height: 3vw;
    margin-left: -1.75vw;
}

.nav-title > .nav-button {
    margin-left: auto;
}

.nav-title .nav-element:first-child {
    cursor: default !important;
}

.nav-logo, .nav-name {
    transition: all 0.3s;
}

.over .nav-logo, .over .nav-name {
    transform: translateY(-2vh);
    opacity: 0;
}

.white {
    color: white;
}

.wrapper {
    position: relative;
    z-index: 8;
    margin: 10vw 10vw 5vh 10vw;
}

.icon-clickhere {
    display: none;
    position: fixed;
    bottom: var(--clickhere-y);
    right: var(--clickhere-x);
    width: max(200px, 5vw);
    z-index: 999;
}
.icon-clickhere.visible {
    display: block;
}

#gradient-overlay {
    position: fixed;
    width: 100vw;
    height: 100vh;
    bottom: 0;
    left: 0;
    pointer-events: none;
    opacity: 0.7;
    background: radial-gradient(ellipse at center top, rgba(44,58,87,1) 0%, rgba(24,22,35,1) 100%);
    z-index: 4;
}