:root {
    --color-background: rgb(10,10,10);
    --color-background-light: rgb(20,20,20);
    --color-tile: rgb(20,20,20);
    --color-tile-light: rgb(30,30,30);

    --color-text: rgb(255,255,255);
    --color-text-darker: rgb(200,200,200);
    --color-text-dark: rgb(128, 128, 128);
}

body, html {
    background-color: var(--color-background);
    margin: 0;
    padding: 0;

    font-family: "Old Standard TT", serif;
    font-weight: 400;
    font-style: normal;
    color: var(--color-text);

    /* scroll-behavior: smooth; */
    -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape while allowing user zoom */
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Instrument Serif", serif;
    margin: 0;
}

h1 {
    font-size: 1.4rem;
}

p, ul, li {
    font-size: 1rem;
    margin: 0;
    padding: 0;
}

ul {
    list-style: "- ";
    /* list-style-position: outside; */
    margin-left: 1rem;

}

li {
    margin-bottom: 0.2rem;
}

a {
    color: inherit;
}

footer {
    padding-bottom: 1rem;
    color: var(--color-text-dark);
}

.scrollbar {
    scrollbar-color: rgba(128,128,128,0.5) transparent;
    scrollbar-width: thin;
    
}

.no-wrap {
    white-space: nowrap;
}

.main-container {
    display: flex;
    flex-direction: column;
}

.navbar {
    background: linear-gradient(var(--color-background) 25%, rgba(0,0,0,0));
    backdrop-filter: blur(5px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 99;
    padding: 1rem 1rem 0.4rem 1rem;
    box-sizing: border-box;
}

.navbar > ul {
    margin: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    list-style: none;
    gap: 1rem;
}

.navbar > ul > li {
    user-select: none;
}

li > a, .project-board > a {
    text-decoration: none;
}



.main {
    padding: 0px 1rem;
    /* scrollbar-width: thin; */
}

.inline-icon {
    height: 1rem;
    vertical-align: -0.2rem;
    border-radius: 0.2rem;
}

.project-board {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    user-select: none;
}

.project-tile {
    display: flex;
    box-sizing: content-box;
    flex-direction: row;
    gap: 0.4rem;
    background-color: var(--color-tile);
    
    border-color: var(--color-tile-light);
    border-style: solid;
    border-width: 1px;

    height: 6rem;
    padding: 0.4rem;

    transition: background-color 250ms;
}

.project-tile-icon {
    height: 100%;
    aspect-ratio: 1;
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: no-repeat;
}

.project-tile-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-tile-text>:nth-child(1) {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
            line-clamp: 3;
}

.project-tile-text>:nth-child(2) {
    color: var(--color-text-dark);
    font-style: italic;

    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
            line-clamp: 1;
}

.skills-tools {
    margin: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.skills-tools > li {
    font-size: 0.8rem;
    color: var(--color-text-darker);
    list-style: none;
    background-color: var(--color-tile);
    padding: 0.2rem 0.4rem;
    border-radius: 0.8rem;
    border-style: solid;
    border-width: 1px;
    border-color: var(--color-tile-light);
    white-space: nowrap;
}

/* project gallery */
.gallery-container {
    box-sizing: border-box;
    width: 100%;
    /* height: max(10rem); */
    padding: 0.4rem;
    background-color: var(--color-tile);
    
    border-style: solid;
    border-width: 1px;
    border-color: var(--color-tile-light);
}

.gallery-main {

    /* box-sizing: content-box; */
    background-color: var(--color-tile);
    
    /* width: 100%;
    height: max(30rem); */

    width: 100%;
    max-height: 20rem;
    /* height: clamp(1rem, 1rem, 40rem); */
    /* height: max(80%); */
    aspect-ratio: 1;
    
    /* height: clamp(1px, 10rem, 30rem); */

    /* width: clamp(100%, 100%, 40vh); */
    /* height: clamp(100px, 50vh, 1000px); */

    /* aspect-ratio: 1; */
    /* width: max(480px); */
    /* aspect-ratio: clamp(1, 2, 2); */
    /* height: clamp(20vh, 20vh, 40vh); */
    /* aspect-ratio: clamp(0.75, 1, 100); */
    
    
    margin-bottom: 1.2rem;

    background-size: contain;
    background-repeat: no-repeat;
    background-position: 50% 50%;
}

.gallery-thumbs {
    width: max-content;
    max-width: 100%;
    display: flex;
    overflow: scroll hidden;
    gap: 0.4rem;
    margin: 0 auto;

    
}

.gallery-thumbs > div {
    aspect-ratio: 1;
    height: 5rem;
    background-color: white;

    background-size: cover;
    background-position: 50% 50%;
    background-repeat: no-repeat;
}

.contact {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    list-style: none;
    gap: 1rem;
}

.contact > li {
    text-decoration: underline;
}

.spacer {
    margin-bottom: 4rem;
}

.spacer:first-of-type {
    margin-bottom: 6.4rem;
}

.spacer:last-of-type {
   margin-bottom: 10rem;
}

noscript {
    font-style: italic;
    color: var(--color-text-dark);
}

/* tablet */
@media (min-width: 768px) {
    .main-container {
        max-width: 80vw;
        margin: auto;
    }

    .project-board {
        grid-template-columns: 1fr 1fr;
    }
}

/* desktop */
@media (min-width: 1024px) {
    footer {
        text-align: right;
    }

    .main-container {
        flex-direction: row;
        max-width: 1024px;
        margin: 12vh auto 8vh auto;
        height: 80vh;
    }

    .navbar {
        flex: 1;
        padding: 0 1rem;
        position: static;
    }

    .main {
        flex: 3;
        margin-top: 0;
        overflow-y: auto;
    }

    .navbar > ul {
        flex-direction: column;
    }

    .navbar > ul > li:hover {
        text-decoration: underline;
    }


    .project-tile:hover {
        background-color: var(--color-tile-light);
    }

    .gallery-thumbs > div {
        height: 4rem;
        /* height: unset; */
        /* width: 100%; */
    }

    .spacer {
        margin-top: 4rem;
        margin-bottom: 0;
    }

    .spacer:first-of-type {
        margin: 0 0 0 0;
    }

    .spacer:last-of-type {
        margin-top: 10rem;
        margin-bottom: 0;
    }
}