@keyframes fade-in {
    from {
        opacity: 0;
    }
    
    to {
        opacity: 1;
    }
}

* {
    text-wrap-style: balance;
}

.alt-at {
    font-feature-settings: "case" 1;
}

.square-p5-container {
    max-height: 100vh;
    margin: 4rem auto;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 2rem 4rem;
    font-family: adelle-mono, monospace;
    font-weight: 400;
    color: #FFFFFF;
    background-color: #000000;
}

a {
    color: #FFFFFF;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 0.25rem;
}

hr {
    min-width: 100%;
    border-color: #ffffff;

    /* margin: 3rem auto; */

    /* border-color: #808080; */
    border-style: solid;
    border-width: 1px;
}

h1 {
    margin-bottom: 4.0rem;
    font-size: 2.8rem;
    font-weight: 400;
    line-height: 4.0rem;
}

h2 {
    margin-top: 0.5rem;
    font-size: 2.4rem;
    font-weight: 400;
    text-align: left;
}

.section-with-list > h2 {
    margin-bottom: 8rem;
}

p {
    line-height: 1.6rem;
    text-wrap: balance;
}

p.big-type {
    font-size: 1.75rem;
    line-height: 2.125rem;
    text-wrap: balance;
}

blockquote {
    margin-inline-start: 1rem;
    color: #808080;
}

.center {
    text-align: center;
}

.grid-1 .caption {
    max-width: 50%;
}

header {
    z-index: 999;
    margin-top: 1rem;
    margin-bottom: 4rem;
}

header, nav, footer, .footer-links {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.grid-1, .grid-2, .grid-3, .grid-4 {
    display: grid;
    gap: 2rem;
    width: 100%;
    margin-bottom: 2rem;
}

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

.portfolio-img {
    width: 100%;
    max-width: 100%;
}

.nav-item > a, .footer-links > a {
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
    margin-left: 2rem;
    text-align: right;

    /* display: inline-flex;
    align-items: center; */
}


.header-logo {
    height: 1rem;
}

.tagline-wrap {
    width: 75vw;
    margin: 0 auto;
    margin-bottom: 8rem;
}

/* TODO: trigger this onScroll, sequentially */
.fade {
    opacity: 0;

    /* animation: fade-in 2s ease-in forwards; */
    animation: fade-in 1.5s cubic-bezier(.55,.1,.9,.55) forwards;
}

section {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.section-content {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-left: 25%;
}

.section-with-list {
    gap: 8rem;
    margin-bottom: 8rem;
}

.section-last {
    gap: 0;
}

.section-item {
    max-width: 50%;
    margin-bottom: 4rem;
}

.section-item h3 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 2.125rem;
}

.hero {
    margin-top: -4rem;
}

.hero .hero-logo {
    width: 75vw;
    height: auto;
    margin: 8rem auto;
}

.hero a {
    max-width: 100%;
}

.hero a noscript {
    width: 100vw;
}

.half-height {
    min-height: 50vh;
}

main {
    flex-grow: 1;
}

footer {
    margin-top: 0.5rem;
}

.footer-cta {
    margin-top: 1rem;
    margin-bottom: 6.125rem;
}

.og-scale {
    width: 100%;
    aspect-ratio: 1200/630;
}

.project-list-item, .idea-list-item {
    margin-top: 1rem;
    margin-bottom: 1rem;
}


.project-list-item a {
    text-decoration: none;
}

h3.project-title, h3.idea-title {
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 1.75rem;
    font-weight: bold;
    text-decoration: none;
}

p.project-meta, p.idea-meta {
    margin-top: 0.125rem;
    margin-bottom: 0.125rem;
    color: #808080;
}

.project-header {
    margin-bottom: 4rem;
}

.idea-header > h1 {
    margin-bottom: 0.5rem;
}

.idea-body {
    max-width: 60vw;
}

.video-16-9 {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
}

.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

.spacious {
    margin-bottom: 30vh;
}

img {
    max-width: 100%;
    max-height: 100%;
}

canvas {
    display: block;
    padding: 2rem;
    margin: auto;
}

.btn-row {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    margin: 0 auto;
}

button, .btn {
    display: block;
    justify-self: start;
    padding: 0.75rem 1.2rem;
    font-family: adelle-mono, monospace;
    font-size: 1rem;
    font-weight: 700;
    color: #000000;
    background-color: #FFFFFF;
}

.btn:hover {
    text-decoration: none;
}

.btn-outline {
    color: #FFFFFF;
    background-color: #000000;
    border-color: #FFFFFF;
    border-style: solid;
    border-radius: 1px;
}

button > a {
    color: #000000;
}

button > a:hover {
    text-decoration: none;
}

/* TODO: responsive font sizes */
@media only screen and (max-width: 860px) {
    body {
        margin: 1rem 2rem;
    }

    /* header {
        flex-wrap: wrap;
    }

    nav {
        margin-top: 1rem;
    }

    .nav-item > a {
        padding: 0.75rem;
        font-size: 1.1rem;
    } */

    footer {
        flex-direction: column-reverse;
        margin-top: 1rem;
    }

    p {
        font-size: 0.9rem;
        text-wrap: balance;
    }

    h1 {
        font-size: 2.8rem;
        line-height: 4rem;
    }

    .section-with-list > h2 {
        margin-bottom: 0;
    }

    h3.project-title, h3.idea-title {
        margin-bottom: 0.25rem;
        font-size: 1.25rem;
        line-height: 1.75rem;
    }

    p.project-meta, p.idea-meta {
        margin: 0;
        font-size: 0.8rem;
        line-height: 1.25rem;
    }

    p.big-type {
        font-size: 1.25rem;
        line-height: 1.75rem;
        text-wrap: balance;
    }

    .idea-body {
        max-width: 100vw;
    }

    .section-content {
        gap: 1rem;
        margin-bottom: 1rem;
        margin-left: 0;
    }

    .section-with-list {
        gap: 1rem;
        margin-bottom: 4rem;
    }

    .section-item {
        max-width: 100%;
        margin-bottom: 0;
    }

    .hero {
        min-height: 40vh;
        margin-top: 2rem;
    }

    .hero .hero-logo {
        width: 100vw;
    }

    .hero a {
        width: 100vw;
    }

    /* TODO: uncomment once mobile menu is built */

    /* .nav-item > a, */
    .footer-links > a {
        min-height: 28px;
        padding: 0;
        margin-left: 0;
        text-align: left;
    }

    .footer-cta {
        margin-bottom: 1rem;
    }

    .footer-links {
        flex-direction: column;
    }

    .full-width {
        width: 100vw;
        margin-right: -2rem;
        margin-left: -2rem;
    }

    .tagline-wrap {
        width: 100vw;
        margin: 0 -2rem;
    }

    .tagline {
        padding-bottom: 2rem;
        margin: 1rem;
        font-size: 1.25rem;
        line-height: 1.75rem;
        text-wrap: balance;
    }

    .btn-row {
        flex-direction: column;
        margin-bottom: 4rem;
    }

    .btn {
        margin-bottom: 1rem;
    }

    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none;
    }

    .grid-1 .caption {
        max-width: 100%;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}