/* ========================================
   RESET
======================================== */

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

button,
input,
textarea,
select {
    font: inherit;
}

/* ========================================
   PAGE
======================================== */

body {
    background: var(--color-bg);
    color: var(--color-text);

    font-family: var(--font-main);
    font-size: var(--fs-body);
    font-weight: var(--fw-body);

    padding-bottom: 4rem;
}

/* ========================================
   CONTAINER
======================================== */

.container {
    padding: 0.75rem var(--space-sm);
}

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

.site-top {
    position: sticky;
    top: 0;
    z-index: 100;

    /* Keep the 12px area above the sticky header opaque while scrolling. */
    padding-top: var(--space-sm);
    background: var(--color-bg);
}

header {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);

    min-height: 1.5rem;

    align-items: center;

    margin: 0;
    padding: 0.375rem var(--space-sm);

    background: var(--color-blue);
}

/* ========================================
   IDENTITY
======================================== */

.identity {
    min-height: 1.5rem;

    display: flex;
    flex-direction: column;
    justify-content: center;

    text-decoration: none;
    color: var(--color-header-text);

    text-align: left;
    width: auto;
    justify-self: start;

    transition: color 0.2s ease;
}

.primary-nav {
    grid-column: span 3;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    align-items: center;
}

.identity h1 {
    font-size: var(--fs-name);
    line-height: 1.75;
    font-weight: var(--fw-name);
}

.identity p {
    margin-top: var(--space-sm);

    font-size: var(--fs-role);
    line-height: 0.5;
    font-weight: var(--fw-role);
    color: var(--color-header-text);
}

/* ========================================
   NAVIGATION
======================================== */

.primary-nav a {
    position: relative;

    width: 100%;

    text-align: center;
    text-decoration: none;

    color: var(--color-header-text);

    font-size: var(--fs-nav);
    line-height: 1;
    font-weight: var(--fw-nav);

    transition: color 0.2s ease;
}

.primary-nav a::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: -0.3rem;

    width: 0;
    height: 0.0625rem;

    background: var(--color-header-text);

    transform: translateX(-50%);

    transition: width 0.2s ease;
}

.primary-nav a:hover,
.primary-nav a.active-page {
    color: var(--color-header-text);
}

.primary-nav a:hover::after,
.primary-nav a.active-page::after {
    width: 2rem;
}

/* ========================================
   DIVIDERS
======================================== */

.divider-group {
    margin-top: var(--space-sm);

    height: 0.0625rem;
}

.divider {
    width: 100%;
    height: 0.0625rem;

    background: var(--color-text);
}

/* ========================================
   WORK PAGE / PROJECTS GRID
======================================== */

.projects-grid {
    position: relative;

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: var(--space-sm);
    row-gap: var(--space-sm);
    align-content: start;

    margin-top: 0.75rem;
    padding-left: calc(25% + var(--space-sm));
    min-height: calc(100vh - 6rem);
}

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

/* Join the horizontal divider and carry the column split to the page bottom. */
.projects-grid::before {
    content: "";

    position: absolute;
    top: calc(-1 * var(--space-sm));
    bottom: calc(-1 * (4rem + 0.75rem));
    left: 25%;

    width: 0.0625rem;
    background: var(--color-text);
}

.work-about {
    position: absolute;
    top: 0;
    left: 0;

    width: calc(25% - var(--space-sm));
}

.project-thumbnail {
    display: block;
    aspect-ratio: 1 / 1;

    overflow: hidden;

    border: none;
    background: rgba(0, 0, 0, 0.04);
}

.project-thumbnail img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    display: block;
}

.project-info {
    margin-top: var(--space-sm);
}

.project-info h2 {
    font-size: var(--fs-project-title);
    line-height: 1;
    font-weight: var(--fw-project-title);
    transition: color 0.2s ease;
}

.project-title-link {
    color: inherit;
    text-decoration: none;
}

.work-about p,
.project-info p {
    margin-top: 0.35rem;

    font-size: var(--fs-project-category);
    line-height: 1;
    font-weight: var(--fw-project-category);
    color: var(--color-muted);
}

.work-about p {
    font-size: 1rem;
    line-height: 1.3;
    margin-top: var(--space-sm);
}

.work-about-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;

    margin-top: calc(var(--space-sm) * 3);
}

.work-about-links a {
    font-size: var(--fs-project-title);
    line-height: 1;
    font-weight: var(--fw-project-title);
    color: var(--color-text);
    text-decoration: none;

    transition: color 0.2s ease;
}

.work-about-links a:hover {
    color: var(--color-blue);
}

.project-title-link:hover {
    color: var(--color-blue);
}

/* ========================================
   PROJECT PAGE / HERO
======================================== */

.project-intro-layout {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);

    margin-top: var(--space-sm);
}

.project-hero {
    grid-column: 2 / span 3;
}

.project-hero-image {
    width: 100%;
}

.project-hero-image img {
    width: 100%;
    display: block;
}

.project-headings {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-headings h2 {
    font-size: 1rem;
    line-height: 1.3;
    font-weight: var(--fw-project-title);
    color: var(--color-muted);
}

/* ========================================
   PROJECT PAGE / VIDEO
======================================== */

.project-content {
    margin-top: var(--space-sm);
}

.project-content video {
    width: 100%;
    display: block;
}

.project-video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.project-video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ========================================
   PROJECT PAGE / STYLEFRAMES
======================================== */

.styleframes-section {
    margin-top: 1.5rem;
}

.section-title {
    margin-top: 0;
    margin-bottom: 1.5rem;

    font-size: var(--fs-section-title);
    line-height: 1;
    font-weight: 400;
}

.styleframes-grid {
    margin-top: var(--space-sm);

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.styleframes-grid img {
    width: 100%;
    display: block;
}

.full-width-frame {
    grid-column: 1 / -1;
}

/* ========================================
   INFO PAGE
======================================== */

.info-section {
    position: relative;

    display: grid;
    grid-template-columns: calc(25% - var(--space-sm)) 1fr;
    column-gap: calc(var(--space-sm) * 2);

    margin-top: var(--space-sm);
    min-height: calc(100vh - 6rem);
}

/* Continue the header divider between the image and biography columns. */
.info-section::before {
    content: "";

    position: absolute;
    top: calc(-1 * var(--space-sm));
    bottom: calc(-1 * (4rem + 0.75rem));
    left: 25%;

    width: 0.0625rem;
    background: var(--color-text);
}

.info-photo {
    grid-column: 1;
}

.info-photo img {
    width: 100%;
    display: block;
}

.info-content {
    grid-column: 2;
    color: var(--color-muted);
}

.info-content h2 {
    margin-bottom: 1.5rem;

    font-size: var(--fs-info-heading);
    line-height: 1;
    font-weight: var(--fw-info-heading);
}

.info-content p {
    max-width: 75rem;

    margin-bottom: 1.5rem;

    font-size: var(--fs-info-body);
    line-height: 1.3;
    font-weight: var(--fw-info-body);
}

.education-section {
    margin-top: 3rem;
    padding: 1.5rem 0;

    border-top: 0.0625rem solid var(--color-text);
    border-bottom: 0.0625rem solid var(--color-text);
    color: var(--color-muted);
}

.education-section h2 {
    margin-bottom: var(--space-sm);
}

.education-section p {
    margin-bottom: 0;
    color: var(--color-muted);
}

/* ========================================
   PLAY PAGE
======================================== */

.play-layout {
    position: relative;
}

.play-about {
    position: absolute;
    top: var(--space-sm);
    left: 0;

    width: calc(25% - var(--space-sm));
}

.play-about p {
    margin-top: var(--space-sm);

    font-size: 1rem;
    line-height: 1.3;
    font-weight: var(--fw-project-category);
    color: var(--color-muted);
}

.play-grid {
    position: relative;

    column-count: 3;
    column-gap: var(--space-sm);

    padding: var(--space-sm) 0 0 calc(25% + var(--space-sm));
    min-height: calc(100vh - 6rem);
}

/* Match the column divider used on the Work and Info pages. */
.play-grid::before {
    content: "";

    position: absolute;
    top: 0;
    bottom: calc(-1 * (4rem + 0.75rem));
    left: 25%;

    width: 0.0625rem;
    background: var(--color-text);
}

.play-grid video,
.play-grid img {
    width: 100%;

    display: block;

    margin-bottom: var(--space-sm);

    break-inside: avoid;

    vertical-align: top;

    object-fit: cover;
}

/* ========================================
   BOTTOM NAV
======================================== */

.bottom-nav {
    position: fixed;

    bottom: 0;
    left: 0;
    right: 0;

    padding: var(--space-sm);

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);

    align-items: center;

    background: var(--color-bg);

    border-top: 0.0625rem solid var(--color-text);

    z-index: 1000;
}

.footer-label {
    text-align: left;

    font-size: var(--fs-footer);
    line-height: 1;
    font-weight: var(--fw-footer);
}

.bottom-nav a {
    text-align: center;
    text-decoration: none;

    color: var(--color-text);

    font-size: var(--fs-footer);
    line-height: 1;
    font-weight: var(--fw-footer);

    transition: color 0.2s ease;
}

.bottom-nav a:hover {
    color: var(--color-blue);
}

/* ========================================
   HOME LANDING PAGE
======================================== */

.home-landing {
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    justify-content: center;
    align-items: center;

    padding: var(--space-sm);
}

.landing-link {
    position: relative;

    text-decoration: none;

    color: var(--color-text);

    font-family: var(--font-home);
    font-size: var(--fs-home);
    line-height: 16rem;
    letter-spacing: 1rem;
    font-weight: var(--fw-home);
    transition: color 0.2s ease;
}

.landing-link:hover {
    color: var(--color-blue);
}

.landing-link::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: 0.5rem;

    width: 0;
    height: 0.125rem;

    background: var(--color-blue);

    transform: translateX(-50%);

    transition: width 0.2s ease;
}

.landing-link:hover::after {
    width: 100%;
}

/* ========================================
   QUICK CHANGE SETTINGS
   Change font sizes here only
======================================== */
:root {
    /* Colors */
    --color-bg: #efefef;
    --color-text: #111;
    --color-muted: #999;
    --color-blue: #0909d6;
    --color-header-text: #fff;

    /* Fonts */
    --font-main: "roc-grotesk", "Helvetica Neue", Arial, sans-serif;
    --font-home: "roc-grotesk", "Helvetica Neue", Arial, sans-serif;

    /* Spacing */
    --space-sm: 0.75rem;

    /* Font Sizes */
    --fs-body: 1rem;

    --fs-name: 1rem;
    --fs-role: 0.75rem;
    --fs-nav: 1rem;

    --fs-project-title: 1rem;
    --fs-project-category: 0.75rem;

    --fs-project-page-title: 1rem;
    --fs-project-description: 0.75rem;
    --fs-detail: 0.75rem;
    --fs-section-title: 3rem;

    --fs-info-heading: 1rem;
    --fs-info-body: 1rem;

    --fs-footer: 1rem;

    --fs-home: 12rem;

    /* Font Weights */
    --fw-body: 400;

    --fw-name: 400;
    --fw-role: 400;
    --fw-nav: 400;

    --fw-project-title: 400;
    --fw-project-category: 400;

    --fw-project-page-title: 400;
    --fw-project-description: 400;
    --fw-detail: 400;
    --fw-section-title: 400;

    --fw-info-heading: 400;
    --fw-info-body: 400;

    --fw-footer: 400;

    --fw-home: 400;
}

@media (max-width: 47.5rem) {
    body {
        padding-bottom: 0;
    }

    header,
    .primary-nav,
    .divider-group,
    .projects-grid,
    .project-intro-layout,
    .info-section,
    .bottom-nav {
        grid-template-columns: 1fr;
    }

    header {
        height: auto;
    }

    .identity,
    .primary-nav {
        grid-column: 1;
    }

    .project-hero,
    .project-headings {
        grid-column: 1;
    }

    .project-headings {
        gap: 0.6rem;
    }

    .identity {
        width: 100%;
    }

    .primary-nav {
        margin-top: var(--space-sm);
    }

    .divider-group {
        height: auto;
        gap: var(--space-sm);
    }

    .info-photo,
    .info-content {
        grid-column: 1;
    }

    .play-grid {
        column-count: 1;
        padding-left: 0;
    }

    .play-about {
        position: static;
        width: auto;
        margin-top: var(--space-sm);
    }

    .play-grid::before {
        display: none;
    }

    .bottom-nav {
        position: static;
        margin-top: 3rem;
    }

    .landing-link {
        font-size: 5rem;
        line-height: 1.1;
        letter-spacing: 0.35rem;
    }

    .projects-grid {
        padding-left: 0;
        min-height: auto;
    }

    .projects-grid::before {
        display: none;
    }

    .info-section::before {
        display: none;
    }

    .work-about {
        position: static;
        width: auto;
    }

}

@media (min-width: 47.5625rem) and (max-width: 68.75rem) {
    .play-grid {
        column-count: 2;
    }

    .landing-link {
        font-size: 8rem;
        line-height: 1.2;
        letter-spacing: 0.6rem;
    }
}
