/* =========================================================
   BASIC
========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    margin: 0;

    background:
        repeating-linear-gradient(
            135deg,
            #020202,
            #020202 40px,
            #0a0a0a 40px,
            #0a0a0a 56px
        );

    color: #eeeeee;

    font-family:
        "Courier New",
        Courier,
        monospace;

    font-size: 13px;
    line-height: 1.5;
}


/* =========================================================
   SITE
========================================================= */

.site {
    width: min(780px, 94%);
    min-height: 100vh;

    margin: 0 auto;
    padding: 14px;

    display: flex;
    flex-direction: column;

    background: #000;

    border-left: 1px solid #333;
    border-right: 1px solid #333;
}


/* =========================================================
   TEXT
========================================================= */

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin: 0;

    font-size: 28px;
    font-weight: 900;

    letter-spacing: 1px;

    text-shadow:
        2px 2px 0 #333;
}

h2 {
    margin: 0;

    font-size: 17px;
}

p {
    max-width: 620px;
}

a {
    color: white;

    text-decoration: underline;
}

a:hover {
    color: black;
    background: white;
}


/* =========================================================
   HEADER
========================================================= */

header {
    padding-bottom: 10px;
}

/* =========================================================
   SECTIONS
========================================================= */

section {
    padding: 18px 0;

    border-bottom: 1px solid #444;
}

.section-heading {
    display: flex;

    justify-content: space-between;
    align-items: baseline;

    gap: 20px;

    margin-bottom: 13px;
}

.section-heading span {
    color: #777;

    font-size: 10px;
}


/* =========================================================
   NORMAL PAGES
========================================================= */

.page-content {
    padding: 22px 0 35px;
}

.page-content > h2 {
    margin-bottom: 18px;
}


/* =========================================================
   ABOUT
========================================================= */

.about-text {
    max-width: 650px;
}

.about-text p {
    margin-bottom: 12px;
}

.tools {
    margin-top: 15px;

    color: #aaa;

    font-size: 11px;
}

/* =========================================================
   CONTACT
========================================================= */

.contact-page {
    max-width: 720px;
}

.contact-page h2 {
    margin-bottom: 14px;
}

.contact-intro {
    margin-bottom: 22px;
    color: #ddd;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-links a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 7px 12px;
    color: #ddd;
    background: #181818;
    border: 1px solid #383838;
    font-weight: 600;
    text-decoration: none;
}

.contact-links a span:last-child {
    color: #aaa;
    font-size: 13px;
    font-weight: 400;
}

.contact-links a:hover {
    color: #fff;
    background: #242424;
    border-color: #666;
    text-decoration: none;
}

.contact-links a:hover span:last-child {
    color: #fff;
}


/* ELSEWHERE */

.elsewhere {
    margin-top: 5px;
}

.elsewhere h3 {
    margin-bottom: 8px;

    font-size: 13px;
}

.elsewhere p {
    margin-bottom: 8px;

    color: #aaa;
}

.elsewhere-links {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;
}

.elsewhere-links span {
    color: #555;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {

    .site {
        width: 100%;

        border-left: none;
        border-right: none;
    }


    h1 {
        font-size: 23px;
    }


    .section-heading {
        display: block;
    }


    .section-heading span {
        display: block;

        margin-top: 3px;
    }


}


/* =========================================================
   HOME
========================================================= */

.home-page {
    min-width: 320px;
    background: #000;
    color: #eee;
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.home-page .site {
    width: min(1040px, 100%);
    min-height: 100vh;
    padding: 0;
    background: transparent;
    border: 0;
}

.home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    align-items: start;
    align-content: start;
    column-gap: 22px;
    row-gap: 0;
    min-height: 100vh;
    padding: 24px;
    background: #0d0d0d;
}

.home-header {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    width: calc(100% + 48px);
    margin: -24px 0 0 -24px;
    padding: 16px 28px;
    background: #292929;
    border-bottom: 1px solid #333;
}

.home-header nav,
.page-header nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(360px, 100%);
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.home-header nav a,
.page-header nav a {
    justify-self: center;
    color: #ccc;
    font-size: 18px;
    text-decoration: none;
    text-underline-offset: 4px;
    white-space: nowrap;
}

.home-header nav a:first-child {
    color: #fff;
    font-weight: 700;
}

.home-main {
    padding: 12px 0 0;
}

.home-page .home-main h1 {
    margin: 0 0 16px;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0;
    text-shadow: none;
}

.home-heading {
    margin-bottom: 24px;
}

.home-intro {
    max-width: 440px;
    margin: 0;
    color: #ddd;
    font-size: 18px;
    line-height: 1.55;
}

.home-details {
    max-width: 480px;
    margin: 16px 0 22px;
    color: #bbb;
    line-height: 1.6;
}

.home-page a:hover {
    color: #fff;
    background: transparent;
    text-decoration: underline;
}

.home-page a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

.all-projects-label {
    display: inline-block;
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.home-platform-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.home-platform-links a {
    padding: 7px 12px;
    color: #ddd;
    background: #181818;
    border: 1px solid #383838;
    font-weight: 600;
    text-decoration: none;
}

.home-platform-links a:hover {
    color: #fff;
    background: #242424;
    border-color: #666;
    text-decoration: none;
}

.image-rail {
    display: grid;
    gap: 8px;
    margin-top: 56px;
}

.image-rail a {
    display: block;
    overflow: hidden;
}

.image-rail img {
    display: block;
    width: 100%;
    height: auto;
    transition: opacity 160ms ease;
}

.image-rail a:hover img {
    opacity: 0.82;
}

.home-footer {
    grid-column: 1 / -1;
    margin-top: 12px;
    padding-top: 10px;
    color: #888;
    border-top: 1px solid #292929;
    font-size: 13px;
}

@media (max-width: 820px) {
    .home-layout {
        grid-template-columns: 1fr;
        column-gap: 22px;
        row-gap: 8px;
        min-height: 100vh;
        padding: 28px;
    }

    .home-main {
        padding: 12px 0 0;
    }

    .home-header {
        justify-content: flex-start;
        width: calc(100% + 56px);
        margin: -28px 0 0 -28px;
        padding: 16px 28px;
    }

    .image-rail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 16px;
    }
}

@media (max-width: 520px) {
    .home-layout {
        column-gap: 16px;
        row-gap: 8px;
        padding: 22px 20px;
        background: #0d0d0d;
    }

    .home-header {
        width: calc(100% + 40px);
        margin: -22px 0 0 -20px;
        padding: 16px 20px;
    }

    .home-page .home-main h1 {
        font-size: 34px;
    }

    .home-intro {
        font-size: 16px;
    }

    .image-rail {
        gap: 6px;
    }

}

.content-page {
    min-width: 320px;
    background: #000;
    color: #eee;
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.content-page .site {
    width: min(1040px, 100%);
    min-height: 100vh;
    padding: 0;
    background: #0d0d0d;
    border: 0;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    padding: 16px 28px;
    background: #292929;
    border-bottom: 1px solid #333;
}

.page-brand {
    flex: 0 0 auto;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}

.page-header nav a[aria-current="page"] {
    color: #fff;
    font-weight: 700;
}

.content-page a:hover {
    color: #fff;
    background: transparent;
    text-decoration: underline;
}

.content-page a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

.content-page .page-content {
    padding: 28px 28px 36px;
}

.content-page .page-content > h2 {
    margin-bottom: 18px;
    font-size: 26px;
}

.content-footer {
    margin-top: auto;
    padding: 14px 28px;
    color: #888;
    border-top: 1px solid #292929;
    font-size: 13px;
}

.gallery-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
}

.gallery-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    padding: 0;
    background: #080808;
    border: 0;
    cursor: pointer;
}

.gallery-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-thumb:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.gallery-viewer {
    position: fixed;
    place-items: center;
    width: fit-content;
    max-width: min(94vw, 1200px);
    max-height: 90vh;
    margin: auto;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
}

.gallery-viewer[open] {
    display: grid;
}

.gallery-viewer::backdrop {
    background: rgb(0 0 0 / 88%);
}

.gallery-viewer-image {
    display: block;
    max-width: 94vw;
    max-height: 88vh;
    object-fit: contain;
}

@media (max-width: 700px) {
    .page-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding: 16px 20px;
    }

    .home-layout {
        padding-right: 20px;
        padding-left: 20px;
    }

    .home-header {
        width: calc(100% + 40px);
        margin-left: -20px;
        padding-right: 20px;
        padding-left: 20px;
    }

    .home-header nav {
        width: min(360px, 100%);
    }

    .content-page .page-content {
        padding: 24px 20px 32px;
    }

    .gallery-preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}