@keyframes GLCanvasFadeIn {
    from { opacity: 0;   }
    to   { opacity: 100; }
}

@keyframes rainbow-text {
    from { background-position: 200%, 50%; }
    to   { background-position: 0%, 50%;   }
}

/* Proudly taken from animate.css - https://animate.style/ */
@keyframes zoomIn {
    from {
      opacity: 0;
      transform: scale3d(0.3, 0.3, 0.3);
    }
  
    50% {
      opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translate3d(0, 100%, 0);
    }
  
    to {
      opacity: 1;
      transform: translate3d(0, 0, 0);
    }
}

@keyframes zoomOut {
    from {
      opacity: 1;
    }
  
    50% {
      opacity: 0;
      transform: scale3d(0.3, 0.3, 0.3);
    }
  
    to {
      opacity: 0;
    }
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Times New Roman', Times, serif;
    margin-left: 5%;
    margin-right: 5%;
    margin-top: 0;
    margin-bottom: 0;
    background-color: black;
    color: white;
    overflow: hidden;
}

:root {
    --main-background-color: #11131C;
    --main-border-color: #0e152b;

    --info-box-background-color: #1b2240;
    --info-box-background-color-2: #0f1324;
    --info-box-background-color-hover: #16204d;
    --info-box-background-color-active: #141a31;

    --info-box-border-color-1: #27447b;
    --info-box-border-color-2: #16142b;
}

main {
    animation: zoomIn 1.5s;
    border: solid var(--main-border-color) 2px;
    border-image: linear-gradient(to bottom, #394264ed, #00020fcc);
    border-image-slice: 1;
    margin-top: 3rem;
    margin-bottom: 3rem;
    box-sizing: border-box;
    height: auto;
    min-height: calc(100% - 6rem);
    box-shadow: 0px 0px 30px 15px #251a5963;
    position: relative;
}

hr {
    width: 95%;
    border-color: #0d111e;
    border: 1px solid #1b2240;
    border-top-color: black;
}

p {
    margin: 0;
}

nav {
    margin-top: 1em;
    margin-bottom: .5em;
}

a {
    color: #b163ff;
    text-shadow: 0px 0px 10px #9a35ff, 0px 0px 10px #9a35ff;
}

a:hover {
    color: #6e61ff;
    text-shadow: 0px 0px 10px #ab34ee, 0px 0px 10px #ab34ee;
}

a:active {
    color: #432c75;
    text-shadow: 0px 0px 5px #312537;
}

#gl-canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    animation: GLCanvasFadeIn 5s;
}

#content-container {
    overflow-y: auto;
    overflow-wrap: anywhere;
    margin-left: 1em;
    margin-right: 1em;
    margin-bottom: 1em;
}

#main-window {
    height: 100%;
    width: 100%;
    position: absolute;
    background: linear-gradient(to bottom, #0b1126, #00020fcc);
    display: flex;
    flex-direction: column;
}

#info-boxes {
    gap: 1em;
    position: relative;
    display: flex;
    justify-content: center;
}

#info-boxes a {
    color: white;
}

#info-boxes a:active {
    color: rgba(255, 255, 255, 0.199);
}

#content-container .content {
    margin-left: 2em;
    margin-right: 2em;
}

#content-container .content img {
    vertical-align: top;
}

div.info-box {
    border-left:    1px solid var(--info-box-border-color-1);
    border-top:     1px solid var(--info-box-border-color-1);
    border-right:   1px solid var(--info-box-border-color-2);
    border-bottom:  1px solid var(--info-box-border-color-2);
    
    background-image: linear-gradient(180deg, var(--info-box-background-color), var(--info-box-background-color-2));

    display: flex;
    align-items: center;
    justify-content: center;
    width: 6.25em;
    height: 6.25em;

    box-shadow: 0px 0px 20px 2px black;
      
}

div.info-box:active {
    background-image: linear-gradient(0deg, var(--info-box-background-color), var(--info-box-background-color-2));

    border-right:   1px solid var(--info-box-border-color-1);
    border-bottom:  1px solid var(--info-box-border-color-1);
    border-top:     1px solid var(--info-box-border-color-2);
    border-left:    1px solid var(--info-box-border-color-2);
}

/* Make images and text not selectable in the button */
.info-box img,
.info-box p {
    user-select: none;
    pointer-events: none;
}

.info-box.content {
    position: absolute;
    font-size: 2em;
    text-shadow: 2px 2px 5px black, 2px 2px 5px black, 2px 2px 5px black, 2px 2px 5px black;
}

.background {
    height: 100%;
    width: 100%;
    background-repeat: no-repeat;
    background-size: 90%;
    background-position: center;
    image-rendering: pixelated;
    opacity: 50%;
    transition: filter 2s;
}

.background:hover {
    cursor: pointer;
    opacity: 100%;
}

.background:hover {
    filter: hue-rotate(255deg);
}

.background:active {
    opacity: 50%;
}

.background.home {
    background-image: url("/resources/images/globe.png");
}

.background.about {
    background-image: url("/resources/images/about.png");
}

.background.contact {
    background-image: url("/resources/images/contact.png");
}

.fade-out-main {
    animation: zoomOut 1.0s !important;
}

.hidden {
    display: none;
}

.info-text {
    text-indent: 2em;
    color: grey;
    font-style: italic;
}

.rainbow-text {
    background-image: linear-gradient(
        to right,
        rgb(255,0,0),
        rgb(0,255,0),
        rgb(0,0,255),
        rgb(255,0,0)
    );
    background-clip: text;
    color: transparent;
    background-size: 200%, auto;
    animation: rainbow-text 1s linear infinite;
}

@media (min-width: 1279px) {
    body {
        margin-left: 25%;
        margin-right: 25%;
    }
}