* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    /* \/ BECAUSE CHROME IS A SPECIAL FUCKING SNOWFLAKE */
    min-height: fit-content;
}

:root {
    color-scheme: light dark;
}

body {
    --bg-light: #f4f4f7;
    --fg-light: #444;

    --bg-light-ish: #c4c4d0;
    --fg-light-ish: #666;

    --bg-gray: #383840;

    --bg-dark: #242427;
    --fg-dark: #ddd;

    --highlight-blue: #2F5684;
    --highlight-bright-blue: #5F86F4;
    --highlight-magenta: #D00FA0;
    --highlight-magenta-semitransparent: #D00FA0B2;

    --stripe-color: var(--highlight-blue);
    font-family: "Helvetica", sans-serif;
    line-height: 1.2em;
    padding: 0;
    margin: 0;
    background: var(--bg-dark);
    color: var(--fg-dark);
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dark {
    --bg-light: #242427;
    --fg-light: #ddd;

    --bg-light-ish: #1a1a20;
    --fg-light-ish: #9999aa;

    --bg-gray: #18181A;

    --bg-dark: #101010;
    --fg-dark: #c0c0c8;

    --highlight-blue: #5F86F4;
    --highlight-bright-blue: #7992d8;
    --highlight-magenta: #E058B0;
}

@media (prefers-color-scheme: dark) {
    body {
        --bg-light: #242427;
        --fg-light: #ddd;

        --bg-light-ish: #1a1a20;
        --fg-light-ish: #9999aa;

        --bg-gray: #18181A;

        --bg-dark: #101010;
        --fg-dark: #c0c0c8;

        --highlight-blue: #5F86F4;
        --highlight-bright-blue: #7992d8;
        --highlight-magenta: #E058B0;
    }
}

html {
    height: 100%;
}

/* Utility classes */

.style-primary {
    background-color: var(--bg-light);
    color: var(--fg-light);
}
.style-secondary {
    background-color: var(--bg-dark);
    color: var(--fg-dark);
}

.holder, .column {
    display: flex;
}

.column {
    flex-direction: column;
}

code {
    text-shadow: none;
    margin-left: 3em;
    padding: 0 0.5em;
    border-radius: 2px;
    background-color: var(--bg-gray);
    color: var(--fg-dark);
}

span.subtitle {
    font-size: 0.75em;
}

.stripe  {
    background: repeating-linear-gradient(
        45deg,
        var(--stripe-color),
        var(--stripe-color) 10px,
        transparent 10px,
        transparent 20px
    );
}

.center {
    text-align: center;
}
.center-v {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.fill {
    flex: 1 1 auto;
}

a, .highlight {
    text-decoration: none;
    transition: color, text-shadow, border-color;
    transition-duration: 0.3s;
    color: var(--highlight-blue);
}

a:not(.nohover):hover {
    color: var(--highlight-magenta);
}

@media not (prefers-color-scheme: dark) {
    :not(.dark) #card a, :not(.dark) #card .highlight {
        text-shadow: 0 0 1px var(--highlight-blue);
    }

    :not(.dark) #card a:not(.nohover):hover {
        text-shadow: 0 0 2px var(--highlight-blue);
    }
}

#card > *, .margin {
    margin: 5px 10px;
}

/* Main content */

#card {
    padding: 15px 10px;
    line-height: 1.2em;
    border-radius: 10px;
}

#navigation, #description {
    max-width: 25em;
    justify-content: space-evenly;
}
#description.wide {
    max-width: 50em;
}

#navigation > * {
    margin: 3px;
    list-style-type: none;
}

.avatar {
    min-width: 150px;
    min-height: 150px;
    max-width: 150px;
    max-height: 150px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
}

hr {
    border-style: solid;
    border-color: var(--bg-dark);
    border-width: 1px 0 0 1px;
}

/* Navigation! Finally */

nav {
    align-self: center;
    width: 100%;
    max-width: 800px;
}

nav ul {
    display: flex;
}

nav ul li {
    display: flex;
    flex: 1;
    list-style-type: none;
}

.nav-link {
    flex: 1;
    padding: 1em 1em;
    text-align: center;
    border-top: 1px solid transparent;
}

:not(.dark) .nav-link {
    --highlight-blue: #5F86F4;
    --highlight-magenta: #D050B0;
}

.nav-link.active {
    color: var(--highlight-magenta);
    border-top-color: var(--highlight-magenta);
}

.nav-link:hover {
    border-top-color: var(--highlight-blue);
}

.nav-link::before, .nav-link::after {
    font-size: 1.25em;
}

.nav-link::before {
    content: "[";
}

.nav-link::after {
    content: "]";
}

.nav-link:not(.active)::before, .nav-link:not(.active)::after {
    color: transparent
}

/* Content pages */

.content-wrapper {
    max-width: 100%;
    margin: 3em 1em;
    align-self: center;
    display: flex;
    flex-direction: column;
}

.content {
    width: 100%;
    max-width: 800px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    padding: 2em;
    align-self: center;
}
.content.wide {
    max-width: 1200px;
}

.content h1 {
    margin: auto;
    text-align: center;
}
.content hr {
    margin: 1em 0;
}
.content p {
    margin: 1em 0 0 0;
}
.content .link {
    margin: 0.5rem 1rem;
}

/* Footer.. */

footer {
    display: flex;
    justify-content: space-between;
}

.footer {
    padding: 7px 10px 2px;
}

/* Hotswap progress bar */

.hotswap-bar-wrapper {
    display: flex;
    position: fixed;
    z-index: 99999;
    height: 2px;
    width: 100%;
    overflow: hidden;
    border-radius: 6px;
    outline: 1px solid transparent;
    background-color: transparent;
    opacity: 0;
    transition: opacity .4s linear .4s;
}
.hotswap-bar-wrapper.active {
    opacity: 1;
    transition: none;
}
.hotswap-progress {
    background-color: var(--highlight-magenta);
    outline: 2px solid transparent;
    box-shadow: 0 0 10px var(--highlight-magenta-semitransparent);
}
.hotswap-bar-wrapper.active .hotswap-progress {
    transition: width .4s ease;
}


/* Responsive design! */

@media only screen and (max-height: 600px) and (max-width: 600px) {
    #card {
        height: 100%;
        max-width: 100%;
        border-radius: 0;
    }
}

@media only screen and (max-width: 1000px) {
    #card, #card #description {
        flex-direction: column;
    }

    .avatar {
        margin: 0 auto 1em;
    }

    footer {
        border-top: var(--fg-dark) solid 1px;
    }

    #navigation > a, #navigation > span {
        margin-top: 0.5em;
    }
}

@media only screen and (min-width: 1001px) {
    .footer {
        border-top: var(--fg-dark) solid 1px;
    }
}

/* Responsive design - Content */

@media only screen and (max-width: 800px) and (max-height: 800px) {
    .content-wrapper {
        margin-top: 0;
        margin-bottom: 0;
    }

    .content {
        border-radius: 0;
    }
}

@media only screen and (max-width: 800px) {
    .content-wrapper {
        margin-left: 0;
        margin-right: 0;
    }

    .content .link {
        margin-top: 0.5em;
    }
}

/* Error pages */

.error {
    align-self: normal;
}

.error .stripe {
    padding: 25px 0;
}
#e403.error {
    --stripe-color: var(--highlight-magenta);
}
.error .stripe div {
    padding: 10px 15px;
}

.hide {
    display: none;
}
