* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family:'HNL', 'HNB','Franklin Gothic Medium', Arial, sans-serif;
}

@font-face {
    font-family:HNL;
    src: url(/assets/font/HelveticaNeue-Light.otf);
    font-display: swap;
}
@font-face {
    font-family:HNB;
    src: url(/assets/font/HelveticaNeue-Bold.otf);
    font-display: swap;
}

h1, h2 {
    font-weight: normal;
}

body {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px;
}

body::before {
    content: "";
    position: fixed;
    inset: -20px;
    z-index: -2;
    background: url("./images/tuffbackground.webp") center / cover no-repeat;
    filter: blur(8px);
    transform: scale(1);
}

/* im losing it bro THE LEAVES AHHH!!! */
html::before,
html::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    width: min(200px, calc((100% - 1200px) / 2));
    z-index: -1;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: 100% auto;
}

/* left column: leaves hang from the top corner!!! :D*/
html::before {
    left: 0;
    background-image: url("./images/fall_leaves_bg2.webp");
    background-position: left top;
}

/* right column: leaves rise from the bottom corner!!! */
html::after {
    right: 0;
    background-image: url("./images/fall_leaves_bg1.webp");
    background-position: right bottom;
}

/* not enough room for side columns on smaller screens */
@media (max-width: 1360px) {
    html::before,
    html::after {
        display: none;
    }
}
header {
    border-bottom: 1px solid;
    padding-bottom: 12px;
}

nav {
    display: flex;
    justify-content: flex-end;
    gap: 3.3em;
}

nav a{
    text-decoration: none;
}
nav a:hover{
    color: teal;
}
nav a:last-child{
    padding-right: 1em;
}
a {
    color: inherit;
}



#hero {
    background-image: url('/assets/images/fall.webp');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    min-height: 365px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3em;
    padding: 1em;
}
#hero p{
    font-size:2em;
}

/* Fade-in on page load */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#hero h1 {
    animation: fade-in 1s ease-out both;
}

#hero p {
    animation: fade-in 1s ease-out .4s both;
}


h1 {
    font-size: clamp(3.5rem, 10vw, 7rem);
    line-height: .9;
}

.sections {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 8px solid;
    border-bottom: 1px solid;
}

.sections a {
    text-decoration: none;
    min-height: 180px;
    padding: 28px 16px;
    border-right: 1px solid;
    font-size: 1.4rem;
}
.sections a:hover{
    background: linear-gradient(180deg,rgba(255, 255, 255, 0) 25%, rgba(128, 149, 168, 1) 100%);
}

.section-FT {
    display: block;
    margin-inline: 2em;
    min-height: 10em;
    margin-top: 18px;
    font-size: 1rem;
}

.sections a:last-child {
    border-right: 0;
}

/* Below this are the stuff for the project page. */

.projects-intro {
    padding: 3rem 0 4rem;
    max-width: 760px;
}

.projects-intro h1 {
    margin: .2em 0 .35em;
}

.projects-intro > p:last-child {
    font-size: 1.35rem;
    line-height: 1.35;
}

.project-number {
    font-family: HNB, sans-serif;
    font-size: .78rem;
    letter-spacing: .08em;
}

.project-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 8px solid;
}

.project-card {
    display: flex;
    flex-direction: column;
    min-height: 440px;
    color: inherit;
    text-decoration: none;
    background: rgba(255, 255, 255, .35);
    border-right: 1px solid;
    border-bottom: 1px solid;
    transition: background-color .2s ease;
}

.project-card:hover {
    background: rgba(128, 149, 168, .32);
}

.project-card:nth-child(2n) {
    border-right: 0;
}

.project-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    border-right: 0;
}

.project-card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-bottom: 1px solid;
    background: rgba(0, 0, 0, .08);
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
}

.project-card-content h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: .95;
}

.project-card-content p:not(.project-number) {
    max-width: 32rem;
    font-size: 1.1rem;
    line-height: 1.35;
}

.project-link,
.projects-footer a {
    margin-top: auto;
    font-family: HNB, sans-serif;
}

.project-card-no-image {
    min-height: 280px;
}

.project-detail {
    padding: 4rem 0 6rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 5rem;
    font-family: HNB, sans-serif;
}

.project-detail h1 {
    max-width: 900px;
    margin: .2em 0 .5em;
}

.project-detail-image,
.project-detail-placeholder {
    width: 100%;
    max-height: 560px;
    object-fit: cover;
    display: block;
    border-top: 8px solid;
    border-bottom: 1px solid;
}

.project-detail-placeholder {
    min-height: 320px;
    display: grid;
    place-items: center;
    background: rgba(128, 149, 168, .3);
    font-family: HNB, sans-serif;
}

.project-detail-copy {
    display: grid;
    gap: 1.25rem;
    max-width: 680px;
    padding: 2rem 0;
    font-size: 1.25rem;
    line-height: 1.4;
}

.project-detail-copy .project-link {
    margin-top: .5rem;
}

footer{
    padding: 1.5em;
}

/* Info section on the home page */
.info {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-top: 3rem;
    padding: 2rem 1rem 3rem;
    border-top: 8px solid;
    border-bottom: 1px solid;
    background: rgba(255, 255, 255, .35);
}

.info p{
    font-size: 1.33em
}

.info h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: .95;
}

.info-copy {
    display: grid;
    gap: 1.25rem;
    max-width: 680px;
    font-size: 1.25rem;
    line-height: 1.4;
}

@media (max-width: 640px) {
    body {
        padding: 18px;
    }

    nav {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 12px 24px;
    }

    #hero {
        min-height: 300px;
    }

    .sections {
        grid-template-columns: repeat(2, 1fr);
    }

    .sections a:nth-child(2) {
        border-right: 0;
    }

    .sections a:nth-child(-n + 2) {
        border-bottom: 1px solid;
    }

    .projects-intro {
        padding: 5rem 0 3rem;
    }

    .project-list {
        grid-template-columns: 1fr;
    }

    .project-card,
    .project-card:nth-child(2n) {
        min-height: 0;
        border-right: 0;
    }

    .projects-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

    .info {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 2rem;
    }

    .project-detail {
        padding-top: 3rem;
    }

    .back-link {
        margin-bottom: 3rem;
    }

    .project-detail-placeholder {
        min-height: 220px;
    }
}