:root {
    --base-clr: #e0e0e0;
    --text-clr: #1e1e1e;
    --text-clr-light: #808080;
    --accent-clr: #009DEC;
    --accent-clr-lightest: #009DEC20;
    --accent-clr-light: #009DEC40;
    --font-mono: "Source Code Pro", monospace;
    --font-sans: "Balsamiq Sans", sans-serif;
}

* {
    margin: 0;
    padding: 0;
    line-height: 1.5em;
}

html {
    font-family: var(--font-mono);
    height: 100%;
}

h1 {
    font-size: clamp(2.5rem, calc(2rem + 3.5vw), 6rem);
    overflow-wrap: break-word;
    hyphens: auto;
}

h2 {
    font-size: 2.5rem;
    overflow-wrap: break-word;
    hyphens: auto;
}

h3 {
    font-size: 2rem;
    overflow-wrap: break-word;
    hyphens: auto;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
    font-weight: 600;
}

h6 {
    font-size: 1rem;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0.125em 0 0.25em 0;
    line-height: 100%;
    font-weight: 600;
}

p {
    font-size: 0.75rem;
}

p:has(img + img) {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5em;
}

p:has(a.glightbox + a.glightbox) {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5em;
}

.font-reading p {
    font-family: 'Neue Haas Grotesk Text Pro';
    font-size: 1.125rem;
}

p.time-stamp {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-clr-light);
}

img,
iframe {
    display: block;
    width: 100%;
    height: auto;
}

a:hover {
    background-color: var(--accent-clr-light);
}

ul {
    list-style: disc inside;
}

.small {
    font-size: 0.625rem;
}

/* article {
    display: flex;
    flex-direction: column;
    gap: 1rem;
} */

article img,
article iframe,
.glightbox {
    border-radius: 0.5rem;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    height: 100%;
    background-color: var(--base-clr);
    color: var(--text-clr);
    display: grid;
    grid-template-columns: max(16%, 14.5rem) 1fr;
}

header {
    font-size: 1rem;
    border: solid var(--text-clr);
    border-width: 0 1px 0 0;
    overflow: scroll;
    display: flex;
    flex-direction: column;
    background-color: var(--base-clr);
    z-index: 10;
}

header a {
    text-decoration: none;
    color: var(--text-clr);
}

.header-top {
    display: grid;
    grid-template-rows: auto 1fr;
    position: relative;
    box-sizing: border-box;
    border: solid var(--text-clr);
    border-width: 0 0 1px 0;
    padding: 1rem 1.5rem;
}

.header-top-logo {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.header-top-logo > a {
    display: block;
    background-color: transparent;
}

.header-top-about {
    overflow-wrap: break-word;
    hyphens: auto;
}

.header-top-about a {
    text-decoration: underline;
    font-weight: bold;
}

.burger-line {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    transform-origin: center; 
}

.header-menu > li {
    list-style-type: none;
}

.header-menu > li > a {
    display: block;
    box-sizing: border-box;
    border: solid var(--text-clr);
    border-width: 0 0 1px 0;
    padding: 1rem 1.5rem;
}

/* .header-menu > li.is-current > a {
    font-weight: bold;
} */

.header-menu > li.is-current > a::before {
    content: '>>> '
}

#header-menu-btn {
    all: unset;
    cursor: pointer;
    position: absolute;
    right: 0;
    width: 4.25rem;
    height: 4.25rem;
    display: none;
}

#header-menu-btn > svg {
    width: 2rem;
    height: 2rem;
}

#header-menu-btn.is-open #top-line {
    transform: rotate(45deg) translateY(8px); 
}

#header-menu-btn.is-open #mid-line {
    opacity: 0;
    transform: scaleX(0); 
}

#header-menu-btn.is-open #bottom-line {
    transform: rotate(-45deg) translateY(-8px);
}

.header-bottom {
    margin-top: auto;
    padding: 1rem 1.5rem;
}

canvas[resize] {
    width: 100%;
    height: 100%;
}

main {
    height: 100%;
    overflow: auto;
}

main:has(#paper-canvas) {
    overflow: hidden;
}

main article {
    padding: 2rem 3rem;
}

main article.size-constrain {
    max-width: 50rem;
    margin: 0 auto;
}

main article > * {
    display: block;
    margin-bottom: 1.5rem;
}

.breadcrumb {
    border: solid var(--text-clr);
    border-width: 0 0 1px 0;
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    list-style: none;
    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
}

.breadcrumb.small {
    padding: 0;
    border: none;
    font-size: 0.625rem;
}

.breadcrumb a {
    text-decoration: none;
    color: var(--text-clr);
}

.breadcrumb > li ~ li::before {
    content: '> ';
}

.tags-group {
    list-style: none;
    display: flex;
    gap: 1rem 0.5rem;
    flex-wrap: wrap;
}

.tags-group a {
    text-decoration: none;
    color: var(--text-clr);
    padding: 0.25rem 0.75rem;
    border: solid 1px var(--text-clr);
    border-radius: 1rem;
}

.tags-group.simple {
    gap: 0;
}

.tags-group.simple > li,
.tags-group.simple a {
    border-width: 0;
    border-radius: 0;
    padding: 0;
    color: var(--text-clr-light);
}

.tags-group.simple > li ~ li::before {
    content: ', ';
}

.content-card-array {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(max(15rem, 18%), 1fr));
    gap: 2.5rem 1.75rem;
    margin-top: 2.5rem;
}

.content-card img {
    transition: opacity 300ms ease-in-out;
}

.content-card .time-and-author {
    margin: 0 0 0.25rem 0;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--accent-clr);
}

.content-card > a {
    display: block;
    margin: 0 0 0.25rem 0;
    text-decoration: none;
    color: var(--text-clr);
    transition: opacity 300ms ease-in-out;
}

.content-card > a:hover {
    background-color: transparent;
    text-decoration: underline var(--accent-clr) 2px;
}

.content-card > a:hover .content-cover {
    background-color: var(--accent-clr-light);
}

.content-card > a:hover img {
    opacity: 0.5;
}

/* .content-card p {
    color: var(--text-clr-light);
} */

.content-cover {
    aspect-ratio: 16 / 9;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
    transition: opacity 300ms ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 0 0.75rem 0;
}

/* .content-cover:hover {
    background: var(--accent-clr-light);
} */

.content-cover:hover > a {
    opacity: 0.5;
}

.content-cover img {
    object-fit: cover;
}

.project-title {
    padding-bottom: 0.5rem;
    border-bottom: dotted 3px var(--accent-clr);
    margin: 0 0 2rem 0;
}

.project-description {
    display: grid;
    grid-template-columns: clamp(6rem, 25%, 12rem) 1fr;
    gap: 1rem;
    margin: 0 0 3rem 0;
}

.info-column {
    display: grid;
    grid-template-columns: clamp(4rem, 20%, 8rem) 1fr;
    gap: 1rem;
    padding: 0.75rem 0;
    border-top: solid 1px var(--text-clr);
}

.info-column > div {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-column ul {
    list-style: none;
}

#profile {
    max-width: 12rem;
}

@media (max-width: 60rem) {
    main article {
        padding: 2rem;
    }
}

@media (max-width: 45rem) {
    body {
        display: block;
        padding-top: 4.25rem;
        overflow: hidden;
    }

    header {
        position: absolute;
        top: 0;
        width: 100%;
        border: solid var(--text-clr);
        border-width: 0 0 1px 0;
        max-height: 4.25rem;
        box-shadow: 0 0 0 rgb(0, 0, 0, 0.5);
        transition: max-height 500ms ease;
        overflow: hidden;
    }

    .header-top {
        padding-right: 4.25rem;
        grid-template-rows: auto 0fr;
        transition: 300ms ease;
    }

    .header-top > p {
        opacity: 0;
    }

    #header-menu-btn {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .header-top-about {
        overflow: hidden;
    }

    header.is-open {
        max-height: 40rem;
        box-shadow: 0 0 40px rgb(0, 0, 0, 0.5);
    }

    .header-top.is-open {
        grid-template-rows: auto 1fr;
    }

    .header-top.is-open > p {
        opacity: 1;
    }

    main {
        height: calc(100% - 4.25rem);
    }

    main article {
        padding: 2rem 3rem;
    }

    .breadcrumb {
        padding: 0.5rem 1.5rem;
    }

    .content-card-array {
        gap: 2.5rem 1.5rem;
    }
}

@media (max-width: 35rem) {
    main article {
        padding: 1.5rem;
    }
}