@font-face {
    font-family: "Geist Pixel";
    src: url("../fonts/GeistPixel-Square.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
}

/* default dark theme */
:root {
    --base03: #002b36;
    --base02: #073642;
    --base01: #586e75;
    --base00: #657b83;
    --base0:  #839496;
    --base1:  #93a1a1;

    --yellow:  #b58900;
    --orange:  #cb4b16;
    --red:     #dc322f;
    --magenta: #d33682;
    --violet:  #6c71c4;
    --blue:    #268bd2;
    --cyan:    #2aa198;
    --green:   #859900;
}

/* light theme override */
html[data-theme="light"] {
    --base03: #fdf6e3;
    --base02: #eee8d5;
    --base01: #93a1a1;
    --base00: #839496;
    --base0:  #657b83;
    --base1:  #586e75;

    --yellow:  #b58900; 
    --orange:  #cb4b16;
    --red:     #dc322f;
    --magenta: #d33682;
    --violet:  #6c71c4;
    --blue:    #268bd2;
    --cyan:    #2aa198;
    --green:   #859900;
}

/* reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--base02);
}

body {
    background: var(--base03);
    color: var(--base0);

    font-family: "Geist Pixel", monospace;
    font-size: 18px;
    line-height: 1.65;

    max-width: 960px;
    min-height: 100vh;

    margin: 0 auto;
    padding: 0 2rem 0.5rem;

    display: flex;
    flex-direction: column;

    text-rendering: geometricPrecision;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: auto;
}

p {
    margin-bottom: 1rem;
}

.project-layout p {
    margin-bottom: 1rem;
}

.project-layout h2,
.project-layout h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

nav,
footer,
.project-card,
.project-image,
.video-container iframe,
.video-container video {
    border-radius: 0;
}

::selection {
    background: var(--base02);
}

/* links? idk man what the fuck did i do */

.nav-links a,
.nav-links a:visited,
.nav-links a:focus,
.nav-links a:active,
.nav-links a.active {
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}

.nav-links a:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.nav-links a {
    -webkit-tap-highlight-color: transparent;
}

a {
    text-decoration: none;
    transition: color 0.15s ease;
}

a:focus,
a:active {
    outline: none;
}

.nav-logo,
.nav-logo:focus,
.nav-logo:active {
    outline: none;
}

/* dark mode */
html:not([data-theme="light"]) a,
html:not([data-theme="light"]) .nav-links a,
html:not([data-theme="light"]) .about-links a,
html:not([data-theme="light"]) .back-link {
    color: var(--yellow);
}

html:not([data-theme="light"]) a:hover,
html:not([data-theme="light"]) .nav-links a:hover,
html:not([data-theme="light"]) .about-links a:hover,
html:not([data-theme="light"]) .back-link:hover {
    color: var(--cyan);
}

/* light mode */

html[data-theme="light"] a,
html[data-theme="light"] .nav-links a,
html[data-theme="light"] .about-links a,
html[data-theme="light"] .back-link {
    color: var(--red);
}

html[data-theme="light"] a:hover,
html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .about-links a:hover,
html[data-theme="light"] .back-link:hover {
    color: var(--cyan);
}

/* layout */
nav {
    position: sticky;
    top: 0;
    z-index: 100;

    background: var(--base03);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0.9rem 0;

    border-bottom: 2px solid var(--base02);

    margin-bottom: 1rem;
}

.nav-logo {
    width: 44px;
    height: 44px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    cursor: pointer;
    transition: opacity 0.12s ease;
    outline: none;
}

/* dark default */
html:not([data-theme="light"]) .nav-logo {
    background-image: url("../files/iconDark.webp");
}

/* light theme */
html[data-theme="light"] .nav-logo {
    background-image: url("../files/iconLight.webp");
}

/* hover overrides theme */
.nav-logo:hover {
    background-image: url("../files/iconHover.webp") !important;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* about links */
.about-links {
    display: flex;
    flex-direction: column;

    gap: 0.6rem;
    margin-top: 1.2rem;
}

.back-link::before {
    content: "< ";
}

.back-link {
    color: var(--yellow);
}

html[data-theme="light"] .back-link {
    color: var(--red);
}

.back-link::before {
    color: var(--cyan);
}

.back-link:hover {
    color: var(--cyan);
}

/* homepage */
.home {
    display: flex;
    flex-direction: column;
    gap: 0rem;
}

header {
    margin-bottom: 0;
}

h1 {
    color: var(--base1);
    font-size: 26px;
    line-height: 1.3;
    font-weight: normal;
    margin-bottom: 0.5rem;
}
.subtitle {
    color: var(--base01);
    font-size: 18px;
}

/* video */
.video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-top: 0;
    display: block;
}

.video-container iframe,
.video-container video {
    width: 100%;
    height: 100%;
    border: 1px solid var(--base02);
    display: block;
}

iframe {
    max-width: 100%;
}

/* PROJECT CARDS */

.project-list {
    display: flex;
    flex-direction: column;
}

.project-card {
    display: grid;
    grid-template-columns: 1fr minmax(180px, 28%);
    gap: 2rem;

    padding: 1.4rem;

    border-bottom: 2px solid var(--base02);

    transition: none;

    isolation: isolate;

}

.project-card:hover {
    background: var(--base02);
}

.project-card h2 {
    color: var(--base1);
    margin-bottom: 0.6rem;
    font-size: 20px;
    line-height: 1.3;
    font-weight: normal;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;

    margin-bottom: 0.6rem;
}

.project-date {
    color: var(--base00);
    font-size: 14px;
    margin: 0;
}

.project-tags {
    color: var(--base00);
    font-size: 14px;
    margin: 0;
    text-align: right;
}

.project-detail .project-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;

    margin-bottom: 1rem;
}

.project-detail .project-tags,
.project-detail .project-date {
    text-align: left;
    margin: 0;
}

/* images */
.project-image {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--base02);
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    /* darken image */

    /*
    filter: saturate(0.75) brightness(0.75);
    transition: filter 0.2s ease;
    */
}

/* reveal on hover*/

/*
.project-card:hover .project-image img {
    filter: saturate(1) brightness(1);
}
*/

.project-card:hover .project-tags {
    color: var(--base00);
}

/* PROJECT PAGE */

.project-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-top: 1.5rem;
}

.project-layout > * {
    min-width: 0;
}

.project-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 90px;
}

.project-sidebar,
.project-content {
    min-width: 0;
}

.project-sidebar iframe,
.project-sidebar img {
    width: 100%;
    display: block;
    border: 1px solid var(--base02);
}

.project-sidebar iframe {
    aspect-ratio: 16 / 9;
    height: auto;
}

.project-sidebar img {
    height: auto;
}

/* footer */
footer {
    margin-top: auto;

    padding-top: 1rem;
    padding-bottom: 0.5rem;

    color: var(--base01);
    font-size: 0.85rem;
}

/* mobile */
@media (max-width: 1100px) {

    html {
        background: var(--base03);
    }
}

@media (max-width: 900px) {

    body {
        font-size: 16px;
    }

    .project-layout {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .project-sidebar {
        position: static;
    }
}

@media (max-width: 600px) {

    body {
        padding-left: 1rem;
        padding-right: 1rem;
        font-size: 15px;
    }

    h1 {
        font-size: 1.4rem;
    }

    .project-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .project-card h2 {
        font-size: 0.95rem;
    }

    .project-image {
        width: 100%;
        height: 200px;
    }

    .project-layout {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    nav {
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

@media (hover: none) and (pointer: coarse) {
    .nav-logo:hover {
        background-image: inherit !important;
    }
}