@font-face {
    font-family: "Perfect DOS VGA 437";
    src: url("../fonts/Perfect DOS VGA 437.ttf");
}

html {
    background: rgb(53, 59, 66) url(images/bgpattern.svg) center;
    background-size: 15px;
    background-position-y: top;
    color: white;
}

body {
    margin: 0;
    font-family: "Perfect DOS VGA 437";
}

p, h1, h2, h3 {
    padding: 0 20px;
}

h1 {
    font-size: 200%;
    font-family: "Slackey";
    text-align: center;
    color: #00ffcc;
    filter: drop-shadow(-3px 3px #01aa88);
}

img {
    display: block;
    max-width: 100%;
}

@keyframes heroFloat {
    0%   { transform: translateY(-2px); }
    100% { transform: translateY(2px);  }
}

@keyframes blinkOn {
    0%   { opacity: 0; }
    19%  { opacity: 0; }
    20%  { opacity: 1; }
    39%  { opacity: 1; }
    40%  { opacity: 0; }
    49%  { opacity: 0; }
    50%  { opacity: 1; }
    59%  { opacity: 1; }
    60%  { opacity: 0; }
    69%  { opacity: 0; }
    70%  { opacity: 1; }
    79%  { opacity: 1; }
    80%  { opacity: 0; }
    86%  { opacity: 0; }
    87%  { opacity: 1; }
    93%  { opacity: 1; }
    94%  { opacity: 0; }
    99%  { opacity: 0; }
    100% { opacity: 1; }
}

#apeirobyte {
    fill: #efccff;
    filter: drop-shadow(0 0 20px #efccff);
}

#apeirobyte * {
    animation:
         2s ease-in-out calc(.2s  * var(--i)) infinite alternate both heroFloat,
        .6s ease-in     calc(.09s * var(--i)) both blinkOn;
}

#apeirobyte :nth-child(1)  { --i: 0; }
#apeirobyte :nth-child(2)  { --i: 1; }
#apeirobyte :nth-child(3)  { --i: 2; }
#apeirobyte :nth-child(4)  { --i: 3; }
#apeirobyte :nth-child(5)  { --i: 4; }
#apeirobyte :nth-child(6)  { --i: 5; }
#apeirobyte :nth-child(7)  { --i: 6; }
#apeirobyte :nth-child(8)  { --i: 7; }
#apeirobyte :nth-child(9)  { --i: 8; }
#apeirobyte :nth-child(10) { --i: 9; }

#heroImg {
    height: 200px;
    background-image: url(images/herobg.png);
    background-repeat: repeat-x;
    background-size: auto 100%;
    background-position-x: center;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    overflow: hidden;
    align-items: center;
    padding: 0 20px;
    gap: 30px;
}

#heroImg svg {
    max-height: 80%;
}

/* Navigation */

nav {
    display: flex;
    align-items: center;
    height: 55px;
}

header {
    z-index: 1;
    position: sticky;
    top: 0px;
}

footer {
    background-color: black;
    color: white;
    text-align: center;
    padding: 20px 0;
}

header nav {
    background: linear-gradient(#b574ff,#5155b1);
}

header:not(:has(nav:first-child)) {
    top: -200px;
}

nav img, nav svg {
    height: 45px;
    max-height: 100%;
    transition: filter .2s;
}

nav a, .dropdown summary {
    font-size: 175%;
    padding: 0 20px 0 20px;
    color: white;
    text-decoration: none;
    line-height: 55px;
    transition: background-color .2s, border-right .2s, border-left .2s;
    max-height: 100%;
    border-left: 1px solid rgba(0,0,0,.2);
    border-right: 1px solid rgba(0,0,0,.2);
    height: 100%;
}

footer nav {
    padding: 0 20px 20px 20px;
    flex-wrap: wrap;
    height: auto;
    justify-content: center;
}

footer a {
    font-size: 130%;
    transition: color .2s;
    line-height: 150%;
    text-decoration: underline;
}

nav svg:hover, #socials a:hover img, footer a:hover {
    filter: opacity(75%);
    color: rgba(255,255,255,.75);
}

#logo:hover, #hamburgerItems a:hover, .dropdown summary:hover {
    background-color: rgba(0,0,0,.2);
    border-right: 1px solid rgba(0,0,0,0);
    border-left: 1px solid rgba(0,0,0,0);
}

#hamburgerItems > :last-child { border-right: 2px solid rgba(0,0,0,.2); }
#hamburgerItems > :last-child:hover { border-right: 2px solid rgba(0,0,0,0); }

.dropdown {
    cursor: pointer;
}

.dropdown summary::marker {
    content: "";
}

.dropdown summary::before {
    content: "";
    display: inline-block;
    width: .8em;
    height: .8em;
    margin-right: .3em;
    background: white;
    clip-path: polygon(
        0%   0%,
        100% 50%,
        0%   100%/*,
        50%  50%*/
    );
    transition: transform .2s;
}

.dropdown[open] summary::before {
    transform: rotate(90deg);
}

.dropdownItems {
    background-color: #3420a4;
    position: absolute;
    display: flex;
    flex-direction: column;
}

.dropdownItems a {
    border: none !important;
}

#hamburgerItems {
    display: flex;
    min-width: fit-content;
    transition: clip-path .4s;
}

#hamburgerItems img {
    display: inline;
    vertical-align: middle;
    height: 40px;
}

#hamburgerIcon {
    height: 30px;
    max-width: 100%;
    margin-left: 20px;
    fill: white;
    display: none;
}

@media (max-width: 725px) {
    #hamburgerItems {
        position: absolute;
        top: 55px;
        background-color: #3420a4;
        flex-direction: column;
        width: 100%;
        height: fit-content;
        clip-path: polygon(
            0%   0%,
            100% 0%,
            100% 100%,
            0%   100%
        );
    }

    header:not(:has(nav:first-child)) #hamburgerItems {
        top: 255px;
    }

    #hamburgerItems:not([open]) {
        clip-path: polygon(
            0%   0%,
            100% 0%,
            100% 0%,
            0%   0%
        );
    }

    #logo:hover {
        background-color: transparent;
    }

    #hamburgerIcon {
        display: block;
    }

    .dropdownItems {
        background-color: #261875;
        position: relative;
        text-indent: 2em;
    }

    nav a, .dropdown summary {
        border: none !important;
    }
}

#socials {
    display: flex;
    margin: 0 10px 0 auto;
}

#socials a {
    padding: 0 0 0 10px;
    border: none;
}

#socials img {
    height: 40px;
}

@keyframes glErrBlink {
    from { color: red; }
    to   { color: darkred; }
}

.glcontainer {
	width: 200px;
	height: 200px;
}

.glcontainer * {
	position: absolute;
	width: inherit;
	height: inherit;
	margin: 0;
}

.glcontainer .glerr {
    animation: 1s steps(2, jump-none) infinite both glErrBlink;
	text-align: center;
	background-color: black;
    clip-path: stroke-box;
    padding: 0;
    font-size: 300%;
}