/* Reset */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

* {
    box-sizing: border-box;
}

/* Variables */
:root {
    --desktop-font-size: 1.2rem/1.5;
    --mobile-font-size: 1rem/1.4;
    --text-color: #fff;
    --link-color: hsl(207, 100%, 70%);
    --link-color-alt: hsl(207, 100%, 50%);
    --primary-color: hsl(200, 100%, 30%);
    --secondary-color: hsl(200, 70%, 80%);
    --tertiary-color: #2d2d2d;

    --page-baground: linear-gradient(170deg, hsla(258, 80%, 13%, 0.4) 0%, hsla(195, 100%, 30%, 0.4) 100%), url("images/background.webp");
    --glass-color: rgba(50, 50, 50, 0.5);
    --glass-primary-color: hsla(200, 100%, 30%, 0.5);
    --glass-edge-color: rgba(100, 100, 100, 0.7);
    --content-background: #242424;
    --muted-color: #858585;

    --display-font: "Cantarell", -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto, Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji", "Segoe UI Symbol";
    --primary-font: "Cantarell", -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto, Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji", "Segoe UI Symbol";
    --secondary-font: "Georgia", serif;
    --monospace-font: monospace;

    --roundness: 0.5rem;
}

/* Typography */
body {
    color: var(--text-color);
    background: var(--page-baground);
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    display: flex;
    height: 100vh;
    flex-direction: column;
}
main {
    margin: 0 auto;
    max-width: 90ch;
    padding: 0 0.5rem;
    width: 100%;
}
body, input, button {
    font: var(--desktop-font-size) var(--primary-font);
}

h1,h2,h3,h4,h5,h6,p,blockquote,dl,img,figure {
    margin: 2rem 0;
}

h1,h2,h3,h4,h5,h6 { font-weight: bold; line-height: 1.2; font-family: var(--display-font); }
h1 { font-size: 200%; }
h2 { font-size: 150%; }
h3 { font-size: 120%; }
h4,h5,h6 { font-size: 100%; font-weight: bold;  }
h5, h6 { text-transform: uppercase; }

p { margin: 2rem 0; }

a,a:visited { color: var(--link-color); }
a:hover,a:focus { color: var(--link-color-alt); }

strong, time, b { font-weight: bold; }
em, dfn, i { font-style: italic; }
sub { font-size: 60%; vertical-align: bottom; }
small { font-size: 80%; }

blockquote, q {
    background: var(--secondary-color);
    border-left: 10px solid var(--primary-color);
    display: block;
    font-family: var(--secondary-font);
    padding: 1rem;
    border-radius: var(--roundness);
}
blockquote p:first-child { margin-top: 0; }
blockquote p:last-child { margin-bottom: 0; }
cite {
    font-family: var(--secondary-font);
    font-style: italic;
    font-weight: bold;
    margin-top: 1rem;
}

kbd,code,samp,pre,var { font-family: var(--monospace-font); }
code, pre {
    background: var(--tertiary-color);
    overflow: auto;
    padding: 0.5rem 1rem;
}
code pre , pre code { padding: 0; }

h1+h2,
h3+h4{
    margin-top: -1.2em;
    margin-bottom: 1.2em;
    color: var(--muted-color)
}

/* Elements */
hr {
    background: var(--text-color);
    border: 0;
    height: 1px;
    margin: 4rem 0;
}

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

figure {
    border: 1px solid var(--primary-color);
    display: inline-block;
    padding: 1rem;
    width: 100%;
}
figure img { margin: 0 auto; }
figure figcaption { font-size: 80%; margin-top: 0.5rem; text-align: center; }

ul, ol { margin: 2rem 0; padding: 0 0 0 4rem; }

dl dd { padding-left: 2rem; }

table {
    border: 1px solid var(--primary-color);
    border-collapse: collapse;
    table-layout: fixed;
    text-align: left;
    width: 100%;
}
table caption { margin: 2rem 0; }
table tr { border-bottom: 1px solid var(--primary-color); }
table tbody tr:nth-child(even) { background: var(--tertiary-color); }
table th { background: var(--secondary-color); font-weight: bold; }
table th, table td { padding: 1rem; }
table th:not(last-of-type), table td:not(last-of-type) { border-right: 1px solid var(--primary-color); }

input,
button { 
    appearance: none; 
    border: 1px solid var(--muted-color);
    display: block;
    margin: 0.5rem 0;
    padding: 0.8rem; 
    border-radius: var(--roundness);
    background-color: var(--page-background);
    color: var(--text-color);
}
input:focus,
input:active {
     background-color: var(--secondary-color); border-color: var(--primary-color);
}

input[type=button],
input[type=submit],
input[type=reset],
button {
    padding: 0.2rem 0.8rem; 
    background-color: var(--tertiary-color);
    display: inline-block;
}

input[type=button]:hover,
input[type=submit]:hover,
input[type=reset]:hover,
button:hover {
    background-color: var(--secondary-color);
}

input[type=button]:active,
input[type=submit]:active,
input[type=reset]:active,
button:active {
    background-color: var(--secondary-color);
    border-color: var(--primary-color);
    color: var(--muted-color);
}
input[type=button]:focus,
input[type=submit]:focus,
input[type=reset]:focus,
button:focus {
     border-color: var(--primary-color);
}

header[role=banner] {

    background-color: var(--glass-color);
    border-bottom: var(--glass-edge-color) 1px solid;
    backdrop-filter: blur(10px);

    margin-top: -32px;
    padding-top: 32px;
    margin-bottom: 32px;

    width: 100%;

    box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.38);
}

header[role=banner] > * {
    padding-left: calc(max(18px, (100% - 90ch)/2 + 18px));
    padding-right: calc(max(18px, (100% - 90ch)/2 + 18px));
}

header[role=banner] h1 {
    margin-bottom: 8px;
}

footer {

    mask-image: linear-gradient(transparent 0%, rgb(0 0 0 / 100%) 128px);

    background-color: var(--glass-color);
    backdrop-filter: blur(10px);

    padding-top: 128px;
    padding-bottom: 8px;

    width: 100%;
    padding-left: calc(max(8px, (100% - 90ch)/2 + 8px));
    padding-right: calc(max(8px, (100% - 90ch)/2 + 8px));

    margin-top: auto;
}

article,
section {
    background-color: var(--content-background);
    border-radius: var(--roundness);
    
    margin: 0 0 1em;
    width: 100%;
    
    page-break-inside: avoid;
    break-inside: avoid-column; 

    box-sizing: border-box;
    padding: 8px 18px 18px 18px;
    border: 1px solid var(--tertiary-color);

    box-shadow: 0 0px 80px 0 rgba(0, 0, 0, 0.4), 0 6px 20px 0 rgba(0, 0, 0, 0.38);

}

details summary {
    cursor: pointer;
}

/* Classes */
.muted {
    color: var(--muted-color);
}

.border-primary {
    border-color: var(--primary-color);
}
.border-secondary {
    border-color: var(--secondary-color);
}
.border-tertiary {
    border-color: var(--tertiary-color);
}

.background-primary {
    background-color: var(--primary-color);
}
.background-secondary {
    background-color: var(--secondary-color);
}
.background-tertiary {
    background-color: var(--tertiary-color);
}

section ul.compressed {
    margin-top: auto;
}
ul.compressed {
    list-style: none;
    padding-left: 0px;
    margin: 0px;
}
ul.compressed li {
    display: inline-block;
    margin-right: 18px;
    margin-bottom: 8px;
}

.larger {
    width: 130%;
    margin-left: -15%;
}

section.subtle {
    background-color: transparent;
    border-color: transparent;
}

.tight {
    margin-bottom: 0px;
    margin-top: 0px;
}

span.icon {
    text-decoration: none !important;
    display: inline-block;
    margin-right: 1ch;
}

section.glass {
    background-color: var(--glass-color);
    backdrop-filter: blur(10px);
}

section.glass.background-primary {
    background-color: var(--glass-primary-color);
}




/* Mobile Styling */
@media screen and (max-width: 90ch) {
    body, input {
        font: var(--mobile-font-size) var(--primary-font);
    }
    table { table-layout: auto; }
}
