@font-face {
    font-family: 'Kode Mono';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/KodeMono-latin.woff2') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/JetBrainsMono-latin.woff2') format('woff2');
}

:root {
    --bg: #fbfbfa;
    --ink: #111;
    --ink-faint: #d2d2d0;
    --font-mono: 'Kode Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
    --font-mono-body: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
    --font-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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

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

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    overflow-x: hidden;
    animation: pagefade 0.6s ease both;
}

@keyframes pagefade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

a {
    color: inherit;
    text-decoration: none;
}

/* ---------- nav ---------- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 22px 20%;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 19px;
    letter-spacing: 0.02em;
    z-index: 60;
    pointer-events: none;
    background: var(--bg);
}

.nav--clear {
    background: transparent;
}

.nav.nav--clear a {
    -webkit-mask-image: none;
    mask-image: none;
}

.nav a {
    pointer-events: auto;
    padding: 1px 4px;
    position: relative;
}

.nav a {
    -webkit-mask-image: repeating-linear-gradient(
        to bottom,
        transparent 0 1px,
        #000 1px 3px
    );
    mask-image: repeating-linear-gradient(
        to bottom,
        transparent 0 1px,
        #000 1px 3px
    );
}

.nav a:hover {
    -webkit-mask-image: none;
    mask-image: none;
}

/* ---------- landing ---------- */

.hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background: url('../images/snowy_road_web.jpg') center / cover no-repeat;
}

.hero-item {
    position: absolute;
    white-space: nowrap;
}

.hero-name {
    font-family: var(--font-sans);
    font-size: 14vw;
    font-weight: 500;
    line-height: 0.9;
    letter-spacing: -0.02em;
}

.hero-label {
    font-family: var(--font-sans);
    font-size: clamp(15px, 1.9vw, 26px);
    font-weight: 400;
    line-height: 1.3;
}

#hero-robert       { left: 37%; top: 21%; }
#hero-stewart      { left: 14%; top: 47%; }
#hero-bluesky      { left: 59%; top: 16%; }
#hero-title        { left: 3%;  top: 34%; text-align: right; width: 24%; min-width: 170px; }
#hero-researcher   { left: 15%; top: 76%; }
#hero-minnesotan   { left: 66%; top: 69%; }
#hero-email-umd    { left: 70%; top: 44%; }

.hero-link svg {
    height: 0.9em;
    width: auto;
    fill: currentColor;
    margin-right: 0.4em;
    vertical-align: -0.05em;
}

.hero-link:hover {
    text-decoration: underline;
}

/* ---------- scroll pages (about / projects) ---------- */

.section {
    display: grid;
    grid-template-columns: minmax(280px, 38%) 1fr;
    column-gap: 4vw;
    align-items: center;
    min-height: 100vh;
    padding: 0 6vw 20vh 0;
}

.section-media {
    position: relative;
}

.section-media img {
    display: block;
    width: 100%;
    max-height: 72vh;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05);
}

.section-media img.no-fx {
    filter: none;
}

.section-label {
    position: absolute;
    top: 100%;
    left: 15%;
    right: 15%;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: clamp(17px, 1.9vw, 26px);
    text-align: center;
    line-height: 1.3;
    margin-top: 4vh;
}

.section-text {
    font-family: var(--font-mono-body);
    font-size: clamp(14px, 1.35vw, 19px);
    line-height: 1.6;
    max-width: 60ch;
}

.section-text p + p {
    margin-top: 1.5em;
}

/* per-character fill effect */
.section-text .word {
    display: inline-block;
    white-space: nowrap;
}

/* ---------- giant fixed word ---------- */

.giant {
    position: fixed;
    right: 1vw;
    bottom: 5vh;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: clamp(110px, 17.5vw, 340px);
    line-height: 0.75;
    letter-spacing: -0.03em;
    z-index: 50;
    pointer-events: none;
    user-select: none;
}

/* ---------- page footer ---------- */

.page-footer {
    position: fixed;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 0.08em;
    z-index: 55;
    pointer-events: none;
}

/* ---------- mobile ---------- */

@media (max-width: 820px) {
    .nav {
        padding: 16px 14px;
        font-size: 15px;
    }

    .hero-name {
        font-size: 19vw;
    }

    #hero-bluesky     { left: 50%; top: 14%; }
    #hero-title       { left: 6%;  top: 24%; }
    #hero-robert      { left: 8%;  top: 37%; }
    #hero-stewart     { left: 16%; top: 47%; }
    #hero-minnesotan  { left: 62%; top: 63%; }
    #hero-researcher  { left: 10%; top: 70%; }
    #hero-email-umd   { top: 78%; }

    .section {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 9vh 6vw;
        row-gap: 3vh;
    }

    #hero-email-umd {
        left: auto;
        right: 5%;
    }

    .section-label {
        position: static;
        margin-top: 2vh;
    }

    .sections {
        padding-bottom: 22vh;
    }

    .page-footer {
        font-size: 12px;
    }

    .section-media img {
        max-height: 44vh;
    }

    .giant {
        font-size: 24vw;
    }
}
