@font-face {
    font-family: 'Bowler';
    src: url(../fonts/BOWLER.otf);
}
@font-face {
    font-family: 'Rock Salt';
    src: url(../fonts/RockSalt.ttf);
}
@font-face {
    font-family: 'Le Jardin du Bonheur';
    src: url(../fonts/Le\ Jardin\ du\ Bonheur.ttf);
}
@font-face {
    font-family: 'Bonyfish';
    src: url(../fonts/Bonyfish-Regular.otf);
}
@font-face {
    font-family: 'NeverMind Rounded Mono';
    src: url(../fonts/NeverMindRoundedMono-Regular.ttf);
    font-weight: normal;
}
@font-face {
    font-family: 'NeverMind Rounded Mono';
    src: url(../fonts/NeverMindRoundedMono-DemiBold.ttf);
    font-weight: bold;
}
@font-face {
    font-family: 'Andada Pro';
    src: url(../fonts/AndadaPro-VariableFont_wght.ttf);
    font-weight: 400 840;
    font-style: normal;
}
@font-face {
    font-family: 'Andada Pro';
    src: url(../fonts/AndadaPro-Italic-VariableFont_wght.ttf);
    font-weight: 400 840;
    font-style: italic;
}

:root {
    --core: rgb(31, 26, 36);
    --mantle: rgb(26, 103, 139);
    --light: rgb(167, 205, 212);
    --light-translucent: rgba(167, 205, 212, 0.15);
    --light-very-translucent: rgba(167, 205, 212, 0.06);
    --accent: rgb(55, 146, 199);
}

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-image:
    linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px),
    linear-gradient(179deg, var(--core) 0%, var(--mantle) 100%);
    background-size: 28px 28px, 28px 28px, 100% 100%;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    padding: env(safe-area-inset);
}

/* MAIN PAGE STYLES */
header {
    margin: 0;
    padding: 0 1.5rem;
    background: var(--light-translucent);
    border-bottom: 1px solid var(--light);
}

header h1 {
    color: rgb(247, 238, 232);
    text-shadow: 
        0 0 10px var(--light);
    ;
    font-family: 'Bowler';
    font-weight: 500;
    text-align: center;
}

img {
    max-width: 100%;
}

main > h1 {
    font-family: 'Bowler';
    color: white;
    text-align: center;
    position: absolute;
    bottom: 0rem;
    margin: 0.5rem 0;
    padding: 0 0.5rem;
}

#lads img:hover {
    filter: drop-shadow(0 0 5px var(--light))
}

#lads {
    height: calc(100vh - 20rem);
    margin: 2rem 0;
}

#lads img {
    max-height: fit-content;
    transition: filter 0.5s;
}
#zhiaa-transparent {
    height: 84%;
    width: calc(52% - 1rem);
    object-fit: scale-down;
}
#clem-transparent {
    height: 100%;
    width: calc(48% - 1rem);
    object-fit: scale-down;
}

.info {
    display: none;
    clip-path: polygon(
        0 2rem,
        2rem 0,
        100% 0,
        100% calc(100% - 2rem),
        calc(100% - 2rem) 100%,
        0 100%
        );
    background: var(--light-very-translucent);
    filter: drop-shadow(0 0 2px var(--light));    
}
.info:before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--light);
    clip-path: polygon(
        0 2rem,
        2rem 0,
        100% 0,
        100% calc(100% - 2rem)
        ,calc(100% - 2rem) 100%,
        0 100%,
        0 2rem,
        1px calc(2rem + 0.41px),
        1px calc(100% - 1px),
        calc(100% - 2rem - 0.41px) calc(100% - 1px),
        calc(100% - 1px) calc(100% - 2rem - 0.41px),
        calc(100% - 1px) 1px,
        calc(2rem + 0.41px) 1px,
        1px calc(2rem + 0.41px));
}

.info ul {
    list-style: none;
    padding: 0rem;
    margin: 0;
}

.info ul li {
    color: white;
    font-family: 'NeverMind Rounded Mono', monospace;
    padding: 0.5rem;
}
.info ul li:not(:last-of-type) {
    border-bottom: 1px solid var(--light);
}

.info ul li.info-heading {
    text-align: right;
    background: var(--core);
    font-weight: 700;
    text-transform: uppercase;
}

/* SECTION STYLES */
section {
    padding: 2rem;
    margin: 1rem;
    position: relative;
    color: black;
}
section::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    filter: url(#squiggle);
}

section.zhiaa::after {
    background: url('../img/tilingtextures_textured-vintage-paper.jpg');
}
section.clem::after {
    background: url('../img/tilingtextures_16th-century-dutch-paper_lightened.jpg');
}
section.about::after {
    background: url('../img/tilingtextures_old-white-paper-used-by-rubens.jpg');
}

section h1 {
    margin: 0 0 1rem 0;
    line-height: 3rem;
    color: black;
    font-weight: 500;
    text-align: center;
}
section h2 {
    margin-bottom: -1rem;
    margin-left: 1rem;
}

section.zhiaa h1, section.zhiaa h2, section.zhiaa h3 {
    font-family: 'Rock Salt';
}

section.clem h1, section.clem h2, section.clem h3 {
    font-family: 'Le Jardin du Bonheur';
    font-weight: 500;
}
section.clem h1 {
    font-size: 3em;
}
section.clem h2 {
    font-size: 2em;
}

section.about h1, section.about h2, section.about h3 {
    font-family: 'Bonyfish';
    font-weight: normal;
}
section.about h1 {
    font-size: 3.5rem;
}
section.about h2 {
    font-size: 2.5rem;
    margin-top: 0;
}

section img {
    box-sizing: border-box;
    border: 10px solid white;
}

section p, section ul {
    font-family: 'Andada Pro';
    font-weight: 550;
}

section a {
    color: black;
    text-decoration-color: var(--accent);
    text-decoration-style: dotted;
    text-decoration-thickness: 2px;
    transition: all 0.3s;
}
section a:hover {
    text-decoration-color: white;
}

/* Sidebar */

nav {
    background: var(--light-very-translucent);
    /* border: 1px solid var(--light); */
    font-family: 'Bowler';
    color: white;
    background: var(--light-very-translucent);
    filter: drop-shadow(0 0 2px var(--light));
    margin: 1rem;
    /* height: fit-content; */
    clip-path: polygon(
        0 2rem,
        2rem 0,
        100% 0,
        100% calc(100% - 2rem),
        calc(100% - 2rem) 100%,
        0 100%
        );
    display: none;
}
nav::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--light);
    clip-path: polygon(
        0 2rem,
        2rem 0,
        100% 0,
        100% calc(100% - 2rem)
        ,calc(100% - 2rem) 100%,
        0 100%,
        0 2rem,
        1px calc(2rem + 0.41px),
        1px calc(100% - 1px),
        calc(100% - 2rem - 0.41px) calc(100% - 1px),
        calc(100% - 1px) calc(100% - 2rem - 0.41px),
        calc(100% - 1px) 1px,
        calc(2rem + 0.41px) 1px,
        1px calc(2rem + 0.41px));
}
nav a {
    color: white;
    text-decoration: none;
}
nav ul li {
    list-style: '> ';
    font-size: 1.5rem;
    padding: 0.5rem 0.5rem;
}
nav ul li ul {
    padding-left: 0.5rem;
}
nav ul li li {
    font-size: 1.2rem;
}

/* Menu button */

input[type="checkbox"]:checked ~ #openMenu {
    transform: translateX(0);
}

input[type="checkbox"] {
    transition: all 0.3s;
    box-sizing: border-box;
    display: none;
}

.menuIconToggle {
    transition: all 0.3s;
    box-sizing: border-box;
    cursor: pointer;
    width: 1.5rem;
    height: 1.5rem;
    position: absolute;
    top: calc(4vh - (1.5rem / 2));
    right: calc(4vh - (1.5rem / 2));
}

.spinner {
    transition: all 0.3s;
    box-sizing: border-box;
    height: 0.18rem;
    width: 100%;
    background-color: white;
    filter: drop-shadow(0 0 2px var(--light));
}

.horizontal {
    transition: all 0.3s;
    box-sizing: border-box;
    position: relative;
    float: left;
    margin-top: 0.2rem;
}
.diagonal.part-1 {
    position: relative;
    transition: all 0.3s;
    box-sizing: border-box;
    float: left;
}
.diagonal.part-2 {
    transition: all 0.3s;
    box-sizing: border-box;
    position: relative;
    float: left;
    margin-top: 0.2rem;
}

input[type=checkbox]:checked ~ .menuIconToggle > .horizontal {
    transition: all 0.3s;
    box-sizing: border-box;
    opacity: 0;
}
input[type=checkbox]:checked ~ .menuIconToggle > .diagonal.part-1 {
    transition: all 0.3s;
    box-sizing: border-box;
    transform: rotate(135deg);
    margin-top: 0.5rem;
}
input[type=checkbox]:checked ~ .menuIconToggle > .diagonal.part-2 {
    transition: all 0.3s;
    box-sizing: border-box;
    transform: rotate(-135deg);
    margin-top: -0.56rem;
}

input[type="checkbox"]:checked ~ nav {
    display: flex;
}

/* hide the SVG filter */
svg[height='0'][aria-hidden='true'] { position: fixed }

/* Gallery */
section.gallery {
    padding: 0;
}
section.gallery h2 {
    margin: 0;
    color: white;
    font-family: 'Bowler';
    font-weight: normal;
    font-size: 2rem;
    padding-top: 1rem;
}
section.gallery h2::before {
    content: '> ';
}
section.gallery p {
    color: white;
}

div.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
}
img.gallery-thumb {
    width: 45%;
    margin: 0.25rem;
    border: 1px solid var(--light);
    filter: drop-shadow(0 0 2px var(--light));
}

/* DESKTOP STYLES */
@media (min-width: 768px) {
    body {
        display: grid;
        grid-template-columns: 12% 88%;
        grid-template-rows: 5rem auto;
    }

    main {
        display: grid;
        margin: auto;
        justify-content: center;
    }

    main > h1 {
        left: calc(50vw - 12em);
        width: 24em;
    }

    main:has(#lads) {
        grid-column: 1 / span 2;
    }

    #lads {
        height: calc(100vh - 10rem);
        margin: 2rem 0;
    }

    .info {
        opacity: 0;
        transition: opacity 0.3s;
    }

    header {
        grid-column: 1 / span 2;
    }

    section {
        width: 60%;
        margin: 1rem auto;
    }

    section img {
        max-height: 50vh;
    }

    section p:has(img) {
        text-align: center;
    }
    
    #zhiaa-info {
        display: block;
        position: absolute;
        top: 20%;
        left: 15%;
    }

    #clem-info {
        display: block;
        position: absolute;
        bottom: 20%;
        right: 15%;
    }

    /* Sidebar */
    .menuIconToggle {
        display: none;
    }

    nav {
        clip-path: polygon(
        0 0,
        calc(100% - 2rem) 0,
        100% 2rem,
        100% calc(100% - 2rem),
        calc(100% - 2rem) 100%,
        0 100%,
        0 2rem,
        0 0
        );
        display: block;
        min-width: fit-content;
        padding-right: 1rem;
        margin: 1rem 0;
    }

    nav::before {
        clip-path: polygon(
        0 0,
        calc(100% - 2rem) 0,
        100% 2rem,
        100% calc(100% - 2rem),
        calc(100% - 2rem) 100%,
        0 100%,
        0 2rem,
        0 0,
        0 calc(100% - 2px),
        calc(100% - 2rem - 1px) calc(100% - 2px),
        calc(100% - 1px) calc(100% - 2rem - 1px),
        calc(100% - 1px) calc(2rem + 1px),
        calc(100% - 2rem - 1px) 1px,
        1px 1px
        );
    }

    /* Gallery */

    section.gallery {
        width: 90%;
    }
    div.gallery {
        justify-content: flex-start;
    }

    img.gallery-thumb {
        width: 200px;
        margin: 0.25rem;
    }
}