@font-face {
    font-family: 'Quadrant Slab Duo';
    src:url('../fonts/quadrant/QuadrantSlabDuo-Thin.woff2') format('woff2'),
        url('../fonts/quadrant/QuadrantSlabDuo-Thin.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Quadrant Slab Duo';
    src:url('../fonts/quadrant/QuadrantSlabDuo-ThinItalic.woff2') format('woff2'),
        url('../fonts/quadrant/QuadrantSlabDuo-ThinItalic.woff') format('woff');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'Fragment Mono';
    src:url('../fonts/fragment/FragmentMono-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Fragment Mono';
    src:url('../fonts/fragment/FragmentMono-Italic.woff2') format('woff2');
    font-weight: normal;
    font-style: italic;
}

:root {
    --column-module: calc(100vw / var(--column-fraction));
    --column-fraction: 16;
    --indent: calc(var(--indent) * var(--column-module));
    --column-width: calc(var(--columns) *  var(--column-module));
    --wet: #961F87;
    --dry: #165D2E;
    --main-column-width: min(1000px, 100%);
    --column: 30em;
}

html {
    padding-top: 0;
    margin: 0;
    background:  rgb(87, 61, 89);
    background: color-mix(in srgb, #961F87, #165D2E var(--precipitation, 50%));
    transition: background ease 2s;
}

body {
    font-family: 'Quadrant Slab Duo', 'Courier New', 'Courier', monospace;
    font-size: 1rem;
    color: white;
    overflow-x: hidden;
}

main {
    width: 100%;
    margin-bottom: 10rem;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: inherit;
    font-size: inherit;
    margin: 0;
}

#site-title-wrapper {
    position: fixed;
    top: calc(50% - 1em);
    left: 50%;
    font-style: italic;
    text-align: center;
}

#site-title {
    position: relative;
    left: -50%;
    opacity: calc(var(--opacity));
    transition: opacity 0.2s ease;
}

#page-top {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100svh;
    background-color: cadetblue;
    user-select: none;
    pointer-events: none;
    opacity: 0;
}

header {
    font-size: 1rem;
    position: fixed;
    top: 1rem;
    left: 50%;
    /* translate: -50% 0; */
    text-align: center;
    width: calc(100% - 2rem);
}

header > a {
    position: relative;
    left: -50%;
}

.acknowledgement {
    margin: 3rem auto 3rem auto;
    max-width: calc(100% - 2rem);
    width: max(30%, 600px);
    text-align: center;
}

a {
    text-decoration: none;
    color: inherit;
}

a:hover,
a:focus {
    text-decoration: underline;
    outline: none;
}

a:hover .nav-description,
a:focus .nav-description {
    text-decoration: none !important;
    font-style: italic;
}

a.nav-project:focus {
    outline: 2px solid white;
    outline-offset: 1.2rem;
    border-radius: 0.2em;
    
}

a .nav-description {
    display: inline-block;
}

nav {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-top: 15svh;
    --indent-a: 2;
    --indent-b: 4;
    --indent-c: 10;
    --indent-d: 12;
}

.nav-project {
    --columns: 3;
    max-width: calc(var(--columns) * var(--column-module));
    width: fit-content;
    text-decoration: none;
    color: inherit;
    margin-bottom: 20svh;
    margin-left: calc(var(--indent) * var(--column-module));
}

.nav-project-type {
    text-transform: uppercase;
}

.nav-project[data-indent="a"] {
    --indent: var(--indent-a);
}
.nav-project[data-indent="b"] {
    --indent: var(--indent-b);
}
.nav-project[data-indent="c"] {
    --indent: var(--indent-c);
}
.nav-project[data-indent="d"] {
    --indent: var(--indent-d);
}

#about {
    --columns: 4;
    --indent: 3;
    width: calc(var(--columns) * var(--column-module));
    margin-bottom: 8rem;
    margin-left: calc(var(--indent) * var(--column-module));
}

#bios {
    --columns: 4;
    --indent: 8;
    width: calc(var(--columns) * var(--column-module));
    margin-left: calc(var(--indent) * var(--column-module));
}

#bios > p {
    /* margin-bottom: 1.5em; */
}

strong {
    font-weight: normal;
    text-transform: uppercase;
}

/* ------------ */
/* PROJECT PAGE */
/* ------------ */

.project-key-image {
    max-height: 90svh;
    width: 100%;
    display: flex;
    align-items: center;
    margin-top: 5svh;
}

.project-key-image > figure {
    max-height: 80svh;
    --columns: 10;
    max-width: calc(var(--columns) * var(--column-module));
    width: fit-content;
}

.project-classification {
    --indent: 8;
    --columns: 3;
    text-align: right;
    width: calc(var(--columns) * var(--column-module));
    margin-left: calc(var(--indent) * var(--column-module));
    margin-bottom: 8em;
}

.project-title {
    text-align: center;
    margin: 0 auto 2rem auto;
    font-style: italic;
}

.project-description {
    width: calc(var(--columns) * var(--column-module));
    --columns: 5;
    margin: 1rem auto 6rem auto;
}

.page-title {
    margin: 40svh auto 40svh auto;
}

.project-key-image + .page-title {
    margin: 5rem auto 10rem auto;
}

.project-subtitle {
    --indent: 3;
    --columns: 3;
    width: calc(var(--columns) * var(--column-module));
    margin-left: calc(var(--indent) * var(--column-module));
}

.main-content {
    width: 100%;
}

.main-content p,
.main-content blockquote,
.main-content ul,
.main-content ol,
.main-content hr,
.main-content table,
.main-content h3,
.main-content h4,
.main-content h5
 {
    position: relative;
    width: calc(var(--columns) * var(--column-module));
    margin-left: calc(var(--indent) * var(--column-module));
}

p {
    --columns: 4;
    --indent: 4;
}

.main-content h3 {
    text-align: center;
}

h4 {
    --indent: 4;
    --columns: 4;
}

h5 {
    --columns: 4;
    --indent: 8;
    text-align: right;
}

blockquote {
    --indent: 6;
    --columns: 4;
    font-style: italic;
    margin: 1rem 0;
}

ul, ol {
    --indent: 5;
    --columns: 5;
}

ul {
    padding-left: 1rem;
}

ol {
    padding-left: 2rem;
}

li {
    padding-left: calc(var(--column-module)/ 2);
}

hr {
    border: none;
    color: inherit;
    font-size: 1.5rem;
    margin: 4.5rem auto 4rem auto;
    text-align: center;
}

hr::after {
    content: "~";
}

figure {
    width: calc(var(--columns) * var(--column-module));
    margin: 3rem auto;
    /* max-height: 90svh; */
    --columns: 8;
}

figure.small {
    --columns: 4;
}

figure.large {
    --columns: 12;
}

figure.audio {
    position: relative;
    --columns: 8;
    height: fit-content;
}

.video-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%;
}

.video {
    width: calc(var(--columns) * var(--column-module));
    --columns: 10;
}

.video.large {
    --columns: 12;
}

.video.small {
    --columns: 8;
}

.video-container > iframe {
    height: 100%;
    position: absolute;
    inset: 0;
}

iframe {
    width: 100%;
    border: none;
    filter: grayscale(1);
    mix-blend-mode: screen;
}

img {
    width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 0 1rem 0;
    filter: grayscale(1);
    mix-blend-mode: screen;
}

figure > img {
    max-width: inherit;
    max-height: inherit;
}

img:hover, img:focus,
iframe:hover, iframe:focus {
    filter: grayscale(0);
    mix-blend-mode: normal;
}

figcaption {
    font-size: 0.85rem;
    margin: 1rem auto;
    width: fit-content;
    opacity: 0.8;
}

.gallery {
    width: 100%;
    margin: 8rem 0;
}

.gallery-images {
    display: flex;
    flex-wrap: wrap;
    column-gap: calc(2 * var(--column-module));
    row-gap: calc(2 * var(--column-module));
    width: 100%;
    padding: calc(var(--column-module) / 2) var(--column-module);
}

.gallery-image {
    width: calc(var(--columns) * var(--column-module));
    --columns: 4;
    margin: inherit;
}

.gallery-image.large {
    --columns: 7;
}

.gallery-image:nth-child(4n - 1) {
    margin-left: calc(3 * var(--column-module));
}

.gallery > figcaption {
    justify-self: center;
    text-align: center;
    width: fit-content;
    max-width: 30em;
}

#temperature-description::after {
    content: ', ';
}

#temperature-description:empty::after {
    content: '';
}

#weather-description {
    text-transform: lowercase;
}

footer {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    text-align: center;
    display: flex;
    justify-content: center;
}

#background-info {
    font-size: 0.8rem;
    color: white;
    opacity: 0.5;
    width: fit-content;
}

@media screen and (max-width: 900px) {
    :root {
        --column-fraction: 15;
    }
    footer {
        position: relative;
        max-width: 100%;
    }
    nav {
        --indent-a: 1;
        --indent-b: 2;
        --indent-c: 3;
        --indent-d: 4;
    }
    .nav-project {
        --columns: 10;
    }
    #about {
        --columns: 10;
        --indent: 1;
    }
    #bios {
        --columns: 10;
        --indent: 4;
    }
    #background-info {
        /* width: 100%; */
    }
    .project-description {
        --columns: 12;
    }
    .main-content p {
        --columns: 10;
        --indent: 1;
    }
    .main-content blockquote {
        --columns: 10;
        --indent: 4;
    }
    .main-content h4 {
        --indent: 1;
    }
    .main-content h5 {
        --columns: 10;
        --indent: 3;
    }
    figure {
        --columns: 14;
    }
    .gallery-image {
        --columns: 10 !important;
    }
    .gallery-image:nth-child(3n + 2) {
        margin-left: calc(1 * var(--column-module));
    }
    ol, ul {
        --indent: 2;
        --columns: 10;
    }
    .video,
    .video.large,
    .video.small {
        width: 100%;
    }
    figure.audio {
        width: calc(100% - 2rem);
    }
}