:root {
    /*the darkly green is kinda fugly*/
    --bs-link-color: #f0f;
    --bs-link-color-rgb: 255, 0, 255;
    --bs-link-hover-color: #b515b0;
    --bs-link-hover-color-rgb: 181, 21, 176;
}

.block {
    background-color: #111;
    padding: 3px;
    margin: 10px 0;
    border-radius: 5px;
}

.block-header {
    background-color: #111;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    vertical-align: middle;
    word-break: break-word;
}

.block-footer {
    background-color: #1d1d1d;
    padding: 10px;
    border-radius: 3px;
}

.header {
    width: 100%;
    position: sticky;
    top: 0;
    background-color: #111;
    padding: 10px;
    text-align: center;
    z-index: 10;
    overflow: hidden;
    /*margin-bottom: 5px;*/
}

.pfix {
    margin-top: 0;
    margin-bottom: 0;
}

.footer {
    /*position: fixed;*/
    /*left: 0;*/
    /*bottom: 0;*/
    width: 100%;
    text-align: center;
    background-color: #111;
    padding: 10px;
}

body {
    /*padding-bottom: 45px;*/
    overflow-x: hidden;
}

.afix, .afix:hover, .afix:active, .afix:focus {
    color: inherit;
    text-decoration: inherit;
    background-color: inherit;
    outline: 0;
}

/*@media (max-width: 400px) {*/
/*    body {*/
/*        font-size: 2em;*/
/*    }*/
/*}*/


.header img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 25vmin;
}

.link {
    font-size: 1.40625rem;
}

.link svg {
    margin-left: 5px;
}

.word-wrap {
    word-wrap: break-word;
}

.display-1 {
    font-size: 6em;
    line-height: 1.2;
    font-family: "Segoe UI", Helvetica, Arial, sans-serif;
    margin-top: 0;
}

.cool-link {
    color: #fff;
    text-decoration: none;
}

.cool-link:hover {
    text-decoration: underline;
    color: #aaa;
    cursor: pointer;
}

.silent-link, .silent-link:hover {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

#pauseanimation {
    width: 100%;
    padding: 10px;
    text-align: center;
}

/*literally how does this even work there's 1 fucking keyframe*/
@keyframes gradient {
    0% {
        background-position: calc(var(--d) / sin(var(--angle))) 0;
    }
}

.textemphasis {
    /* https://stackoverflow.com/a/63791417/9044183 evil css trig hack to get gradients to loop properly */
    --d: 100vh;
    --angle: -45deg;
    background: repeating-linear-gradient(var(--angle) in hsl,
    hsl(149, 100%, 50%),
    hsl(305, 100%, 50%),
    hsl(149, 100%, 50%)
     var(--d));
    background-size: calc(-1 * /*remove that -1 if angle goes positive*/(var(--d) / sin(var(--angle)))) 100%;
    animation: gradient 5s linear infinite;

    /*font-size:25vw;*/
    /*
    ok let me explain this mess
    18vw makes the text take up the whole width
    the -18% thing makes it account for the scroll bar for some reason?
    and -.82rem makes it account for the margin (1-.18=.82)
    and 6rem is the target/max
    */
    font-size: min(calc((18vw - 18%) - .82rem), 6rem);

    font-weight: 800;
    /*max-font-size: 6rem;*/

    /*white-space: nowrap;*/
    /*font-size: min(6rem, 15vw);*/
    /*text-shadow: black 0 0 1rem;*/


    /* https://stackoverflow.com/a/69989367/9044183 yippee no vendor prefixes! */
    /*DO NOT MOVE THIS ABOVE THE BACKGROUND CSS, IT BREAKS IT FOR SOME FUCKING REASON?*/
    color: transparent;
    background-clip: text;

}

/*@media screen and (max-width: 500px) {!*adjust*!*/
/*    .textemphasis {*/
/*        font-size: 15vw;*/
/*    }*/
/*}*/
.glass {
    /*margin: 1rem;*/
    /*padding: 1rem;*/
    backdrop-filter: blur(1rem);
    border-radius: 1rem;
    background: #0006;
    /*outline: 0.25rem solid #0003;*/
    box-shadow: #0008 0.25rem 0.25rem 1rem;
    /*filter: drop-shadow(0 0 0.5rem black);*/
}

@supports (-webkit-touch-callout: inherit) or (not (background-attachment: fixed)) {
    .safari-bg {
        background-image: url("assets/newbgdark.png");
        image-rendering: pixelated;
        /*evil hack to get it to be fixed on safari ios*/
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: -1;
        background-position: center;

        /*doesnt work on safari ios*/
        background-size: cover;
        /*background-repeat: no-repeat;*/
        /*background-attachment: fixed;*/
    }

    .safari-bg * {
        image-rendering: auto;
    }

    .bg {
        background: transparent !important;
    }
}

@supports (background-attachment: fixed) and (not (-webkit-touch-callout: inherit)) {
    .safari-bg {
        display: none;
    }

    .bg {
        background-image: url("assets/newbgdark.png");
        image-rendering: pixelated;
        /*doesnt work on safari ios*/
        background-size: cover;
        background-repeat: no-repeat;
        background-attachment: fixed;
        background-position: center;
    }

    .bg * {
        image-rendering: auto;
    }

    /*THIS SHIT IS SUPER LAGGY*/
    /*.glass {*/
    /*    background-image: url("assets/bg_blur.png");*/
    /*    !*doesnt work on safari ios*!*/
    /*    background-size: cover;*/
    /*    background-repeat: no-repeat;*/
    /*    background-attachment: fixed;*/
    /*}*/
}

.container-fluid {
    padding: 1rem;
}

/*thanks to chatgpt for this*/

.grid-container {
    display: flex;
    flex-wrap: wrap;
    padding-top: 1rem;
    padding-bottom: 1rem;
    justify-content: center;
}

.grid-item {
    --item-width: 400px;
    padding: 1rem;
    flex: 1 1 var(--item-width);
    margin: .5rem;
    /*it has to be able to grow up to 2x the min size to take up the whole column*/
    max-width: calc(var(--item-width) * 2);
}

.grid-item h3 {
    text-align: center;
    font-weight: bold;
}

.glass p:last-child {
    margin-bottom: 0;
}

.grid-item h3 img, .icon {
    display: inline-block;
    position: relative;
    /*ripped straight from fontawesome*/
    height: 1em;
    vertical-align: -.125em;
}

* {
    word-break: break-word;
}

.sparkle {
    font-size: 60%;
    vertical-align: middle;
}

.link-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.link-icon img {
    width: 1.5rem;
}

a.grid-item h3 {
    margin: 0 1.5rem;
}

/*make the footer always at the bottom*/
.container-fluid {
    flex-grow: 1;
}

body {
    display: flex;
    flex-direction: column;
}

/*for some reason, these need to be set separately or else it dont fill properly*/
html {
    height: 100%;
}

body {
    min-height: 100%;
}

html, body {
    margin: 0;
}

.header h3 {
    margin-top: 0.25em;
    margin-bottom: 0;
    font-weight: bold;
}

.header:has(h3) {
    padding-bottom: 0;
}

#animation {
    width: 100vw;
    height: 100vh;
    background: url("assets/load.svg") no-repeat center;
}

@media not (scripting: enabled) {
    #animation, #pauseanimation {
        display: none;
    }
}

#scroll-popup {
    position: absolute;
    bottom: 1em;
    left: 50%;
    transform: translateX(-50%);
    padding: .5em;
    animation: scroll-popup 1.5s ease-out 1;
}

@keyframes scroll-popup {
    0% {
        bottom: -2em;
        opacity: 0;
    }
    100% {
        bottom: 1em;
        opacity: 1;
    }
}
