/* ==================== Variables ==================== */

:root {
    --large-space: min(2vw, 6rem);
    --medium-space: min(1vw, 3rem);
    --small-space: min(0.5vw, 1.5rem);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Geist';
    font-weight: 300;

    font-size: 25px;
    line-height: 1.5;
    color: #eeeeee;

    transition: background 1s ease;
}

/* ==================== Titles ==================== */

h1,
h2,
h3 {
    font-family: 'Space Grotesk';
    font-weight: normal;
    line-height: 1.3;

    margin: var(--medium-space) 0 var(--large-space) 0;
}

h1 {
    font-size: 50px;

    color: #d4c1ff;
    text-shadow: 0 0 20px rgb(115, 60, 226);
}

h1 b,
h1 strong {
    font-size: 75px;
}

h1 b,
h1 strong,
h2 b,
h2 strong,
h3 b,
h3 strong {
    color: #9872ff;
    text-shadow: 0 0 20px #4800ff;
}

h2 {
    font-size: 40px;

    color: #ab87ff;
    text-shadow: 0 0 20px rgb(115, 60, 226);
}

h3 {
    font-size: 35px;

    margin: 0.1em 0;

    color: #f5d0f5;
    text-shadow: 0 0 20px rgb(115, 60, 226);
}

ul,
ol {
    padding: var(--medium-space) var(--large-space);
    margin: var(--large-space) 0;

    background-color: rgba(255, 255, 255, 0.075);
    backdrop-filter: blur(10px);
    color: #e6e6fa;
    border-radius: min(0.5vw, 0.2em);
    box-shadow:
        0 0 20px rgba(255, 255, 255, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.04);

    transition: background-color 0.2s ease;

    overflow-y: auto;
    overflow-x: hidden;
}

ul:hover,
ol:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

ul h3,
ol h3 {
    font-size: 30px;

    margin: 0.75em 0.25em;
}

b,
strong {
    font-weight: 500;

    color: #e6e6fa;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

b.plain,
strong.plain {
    text-shadow: none;
}

i,
em {
    font-weight: 400;
    font-style: italic;

    color: #e6e6fa;
}

a {
    display: inline-block;

    border-radius: 10px;

    color: #aaa;
    text-decoration: underline;

    transition: all 0.2s ease;
}

a:hover {
    color: #777;
    transform: translateY(-2px);
}

a.legacy {
    text-decoration: none;

    background: linear-gradient(120deg, #895eff, #4d47ff);
    color: transparent;
    text-shadow: 0 10px 20px #5117ff;

    background-clip: text;
    -webkit-background-clip: text;
}

a.legacy:hover {
    text-decoration: none;

    background: linear-gradient(120deg, #a281ff, #8282ff);
    color: transparent;

    -webkit-background-clip: text;
    background-clip: text;
}

code,
kbd {
    font-family: 'JetBrains Mono';

    padding: 1px 5px;
    border-radius: 6px;
    white-space: nowrap;
    display: inline-block;
}

code {
    background-color: rgb(35, 35, 55);
    color: rgb(170, 190, 220);
    border: 1px solid rgb(181, 186, 255);
}

kbd {
    background-color: rgb(29, 29, 29);
    color: rgb(145, 145, 145);
    border: 1px solid rgb(100, 100, 100);
}

hr {
    margin: 10px 0 20px 0;

    width: auto;
    height: 5px;

    background: linear-gradient(120deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.3));
    border: none;
    border-radius: 20px;
}

/* ==================== Other Elements ==================== */

p {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;

    padding: 15px;
    margin-bottom: 1rem;

    transition: background-color 0.2s ease;
}

p.plain,
p.plain:hover {
    background: none;
}

p:hover {
    background: rgba(255, 255, 255, 0.15);
}

blockquote {
    padding: 0.75em;
    margin: 1em 0;

    color: #e6e6fa;
    background-color: rgba(255, 255, 255, 0.08);

    border: 5px solid #aaaaaa20;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.08);

    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        border 0.2s ease;
}

blockquote:hover {
    background-color: rgba(255, 255, 255, 0.16);
    border: 5px solid #aaaaaa75;
    box-shadow: 0 10px 25px #aaaaaa75;
}

table,
th,
td {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    vertical-align: middle;
    border: 2px solid rgb(100, 105, 130);
    border-collapse: collapse;
    padding: 10px;
    transition:
        background-color 0.2s,
        box-shadow 0.2s;
}

table {
    margin-top: 1em;
    margin-bottom: 1em;
    box-shadow: 0 0 20px rgba(100, 105, 130, 0.5);
}

td:hover {
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 0 4px 2px rgba(120, 125, 150, 0.5),
        inset 0 0 5px rgba(255, 255, 255, 0.5);
}

th {
    background-color: rgba(255, 255, 255, 0.15);
}

th:hover {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow:
        0 0 4px 2px rgba(120, 125, 150, 0.6),
        inset 0 0 7.5px rgba(255, 255, 255, 0.75);
}

.aligned-left {
    text-align: left;
}

.aligned-center {
    text-align: center;
}

.aligned-right {
    text-align: right;
}

.all-unset {
    all: unset;
}

.section {
    position: relative;

    min-width: 100vw;
    max-height: none;

    flex: none;

    overflow: hidden;
    padding: min(100%, 5vh);
}

.section.no-padding {
    padding: 0;
}

.section.fixed-bg {
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-attachment: fixed !important;
}

.section.stretched {
    min-height: 100vh;
}

.section.centered.horizontally {
    text-align: center;
}

.section.centered.vertically {
    vertical-align: middle;
}

.dim {
    opacity: 0.6;
}

.dimmer {
    opacity: 0.45;
}

.dimmest {
    opacity: 0.3;
}

.tooltip {
    position: relative;
    cursor: pointer;
    display: inline-block;
}

.tooltip-label {
    display: inline-block;
    position: relative;

    font-weight: bold;

    color: #ffffff;
    text-shadow: 0 0 25px rgb(116, 51, 255) !important;
    vertical-align: 0em;
}

.tooltip-text {
    font-family: 'Fira Code';
    font-size: 17.5px;
    user-select: none;
    display: block;

    visibility: hidden;
    opacity: 0;

    position: absolute;
    bottom: 130%;
    left: 50%;
    padding: 16px 20px;
    transform: translate(-50%, -25px);

    background: rgba(50, 4, 111, 0.75);
    backdrop-filter: blur(4px);

    border: 2px solid rgb(168, 121, 255);
    box-shadow: inset 0 0 10px rgb(168, 121, 255);
    border-radius: 12px;

    white-space: nowrap;
    max-width: calc(100vw - 40px);
    overflow-wrap: break-word;
    pointer-events: none;

    transition: all 0.5s ease-in;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, 0);

    transition: all 0.1s ease-in;
}

.flex-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    min-width: 100vw;

    overflow-x: auto;
}

/* ==================== Debug (COMMENT OUT WHEN PRODUCTION) ==================== */

/* * {
    outline: 1px solid red !important;
} */

/* ==================== The Responsive Zone ==================== */

@media (max-width: 768px) {
    body,
    p,
    blockquote,
    a {
        font-size: 20px;
    }

    h1 {
        font-size: 40px;
    }
    h1 b,
    h1 strong {
        font-size: 50px;
    }
    h2 {
        font-size: 30px;
    }
    h3 {
        font-size: 30px;
    }

    .section.fixed-bg {
        background-attachment: scroll !important;
    }
}
