@font-face {
    font-family: 'Jost';
    src: url('fonts/jost.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* palette comes off the dome: frosted glazing, spruce, galvanized struts, leaf, grow light */
    --frost: #edf1ee;
    --paper: #f8faf8;
    --spruce: #10261f;
    --steel: #6f807d;
    --leaf: #2a7349;
    --glow: #e8457a;

    --bg: var(--frost);
    --surface: var(--paper);
    --text: var(--spruce);
    --muted: #4c5f5a;
    --rule: #c5cfcb;
    --accent: var(--glow);
    --accent-ink: #b01f55;
    --dome-strut: var(--steel);
    --dome-hub: var(--glow);
    --dome-glass: #ffffff;

    --font: 'Jost', 'Century Gothic', 'Avenir Next', sans-serif;
    --max-width: 1200px;
    --measure: 34rem;
    --gutter: clamp(1.25rem, 4vw, 3rem);
    --radius: 4px;
    --header-h: 4.25rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* the dome at night with the lights on */
        --bg: #0c1c17;
        --surface: #12261f;
        --text: #e6ede9;
        --muted: #a3b4ae;
        --rule: #2a403a;
        --accent-ink: #ff7fa8;
        --dome-strut: #9fb0ac;
        --dome-glass: #bfe6d2;
        --leaf: #6fc391;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
    -webkit-text-size-adjust: 100%;
}

html.lenis-smooth {
    scroll-behavior: auto !important;
}

@view-transition {
    navigation: auto;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img,
canvas {
    display: block;
    max-width: 100%;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
    margin: 0;
}

h1 {
    font-size: clamp(3.25rem, 9.5vw, 7.5rem);
    font-weight: 300;
    line-height: 0.95;
    letter-spacing: -0.035em;
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.015em;
}

h3 {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
}

a {
    color: inherit;
    text-decoration-line: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
}

a:hover {
    color: var(--accent-ink);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.wrap {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 30;
    padding: 0.6rem 1rem;
    background: var(--text);
    color: var(--bg);
}

.skip:focus {
    top: 1rem;
}

/* draft notice, delete this bar and the .fill marks once the copy is final */
.draft-bar {
    background: var(--spruce);
    color: #e6ede9;
    font-size: 0.875rem;
    line-height: 1.4;
    padding: 0.5rem var(--gutter);
    text-align: center;
}

.fill {
    background: color-mix(in srgb, var(--glow) 16%, transparent);
    color: inherit;
    border-bottom: 1px dashed var(--glow);
    padding: 0 0.2em;
    border-radius: 2px;
}

/* header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.site-header.is-scrolled {
    border-bottom-color: var(--rule);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0 1rem;
    min-height: var(--header-h);
}

.wordmark {
    font-size: 1.125rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-decoration: none;
    padding-block: 0.75rem;
    white-space: nowrap;
}

.site-nav ul {
    display: flex;
    margin: 0 -0.3rem;
    gap: clamp(0rem, 2vw, 2rem);
    list-style: none;
    padding: 0;
}

.site-nav a {
    display: block;
    padding: 0.75rem 0.3rem;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.15s ease;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
    color: inherit;
    text-decoration-color: var(--accent);
}

/* buttons */
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    align-items: center;
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.4rem;
    background: var(--glow);
    color: var(--spruce);
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius);
    transition: background-color 0.15s ease;
}

.btn:hover {
    background: #f06492;
    color: var(--spruce);
}

/* about page: pinned scene. the tall section gives the scroll distance, the pin holds the view */
.scene {
    position: relative;
}

.scene.is-live {
    height: 260vh;
    height: 260svh;
}

/* first screen: leave room for the draft bar so the buttons are not cut off */
.scene-copy {
    margin-bottom: var(--bar-h, 0px);
}

.scene-pin {
    position: sticky;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    height: calc(100svh - var(--header-h));
    min-height: 26rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.scene-pin canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    touch-action: pan-y;
    cursor: grab;
}

.scene-pin canvas.is-dragging {
    cursor: grabbing;
}

.scene-copy {
    position: relative;
    padding-bottom: clamp(1.5rem, 6vh, 4.5rem);
    pointer-events: none;
    will-change: transform, opacity;
}

.scene-copy a,
.scene-copy .btn {
    pointer-events: auto;
}

.scene-copy h1 {
    font-size: clamp(4rem, 21vw, 6.5rem);
    font-weight: 200;
}

.scene-copy h1 .line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.12em;
    margin-bottom: -0.12em;
}

.scene-copy h1 .line > span {
    display: block;
}

.scene-copy .lede {
    max-width: 27rem;
    margin-top: 1.25rem;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    line-height: 1.4;
}

.scene-copy .actions {
    margin-top: 1.5rem;
}

.scene-count {
    position: absolute;
    top: 0.75rem;
    right: var(--gutter);
    font-size: 0.875rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.scene-inside {
    position: absolute;
    left: 0;
    right: 0;
    bottom: clamp(2rem, 12vh, 7rem);
    display: grid;
    justify-items: center;
    gap: 1.5rem;
    text-align: center;
    opacity: 0;
}

.scene-inside-line {
    max-width: 24ch;
    font-size: clamp(1.6rem, 4.6vw, 3rem);
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-shadow: 0 0 6px var(--bg), 0 0 14px var(--bg), 0 0 28px var(--bg);
}

@media (min-width: 900px) {
    .scene-pin {
        justify-content: center;
    }

    .scene-copy {
        padding-bottom: 0;
    }

    .scene-copy h1 {
        font-size: clamp(6.5rem, 13vw, 12.5rem);
        line-height: 0.88;
    }

    .scene-copy .lede {
        margin-top: 2rem;
    }

    .scene-count {
        top: auto;
        bottom: calc(1.5rem + var(--bar-h, 0px));
    }
}

@media (max-height: 700px) and (max-width: 899px) {
    .scene-copy h1 {
        font-size: clamp(3rem, 16vw, 4.75rem);
    }

    .scene-copy .lede {
        margin-top: 0.75rem;
        font-size: 1.05rem;
    }

    .scene-copy .actions {
        margin-top: 1rem;
    }
}

.reveal {
    overflow: hidden;
    padding-bottom: 0.12em;
}

.reveal-inner {
    display: block;
}

.btn-quiet {
    min-height: 2.75rem;
    padding: 0.6rem 1.1rem;
    border: 1.5px solid var(--steel);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text);
    font-weight: 500;
    transition: border-color 0.15s ease;
}

.btn-quiet:hover {
    border-color: var(--text);
}

.about-copy {
    padding-top: clamp(1rem, 4vh, 3rem);
}

.split-body {
    display: grid;
    gap: 1.75rem;
}

@media (min-width: 900px) {
    .split {
        display: grid;
        grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
        column-gap: clamp(2rem, 5vw, 5rem);
        align-items: start;
    }

    .split > h2 {
        position: sticky;
        top: calc(var(--header-h) + 1.5rem);
        margin-bottom: 0;
    }

    .split-body {
        grid-template-columns: 13rem minmax(0, 1fr);
        gap: 2.5rem;
        align-items: start;
    }
}

.contact .contact-line a {
    text-decoration-thickness: 3px;
}

.dome-stage canvas,
.explorer-view canvas,
.stage canvas {
    width: 100%;
    height: 100%;
    touch-action: pan-y;
    cursor: grab;
}

.explorer-view canvas.is-dragging,
.stage canvas.is-dragging {
    cursor: grabbing;
}

.block {
    padding-block: clamp(2.5rem, 7vh, 4.5rem);
    border-top: 1px solid var(--rule);
    position: relative;
}

/* a strut and its hub */
.block::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--glow);
}

.block h2 {
    margin-bottom: 1.25rem;
}

.block p,
.block ul,
.block dl {
    max-width: var(--measure);
}

.block p + p {
    margin-top: 1rem;
}

.plain-list {
    list-style: none;
    padding: 0;
}

.plain-list li {
    padding-block: 0.7rem;
    border-bottom: 1px solid var(--rule);
}

.plain-list li:first-child {
    border-top: 1px solid var(--rule);
}

.plain-list strong {
    font-weight: 600;
}

.portrait {
    width: min(100%, 13rem);
}

.slot {
    display: grid;
    place-items: center;
    padding: 1.25rem;
    border: 1.5px dashed var(--steel);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.9375rem;
    line-height: 1.4;
    text-align: center;
}

.portrait .slot {
    aspect-ratio: 4 / 5;
}

.work-links {
    list-style: none;
    padding: 0;
}

.work-links li {
    border-bottom: 1px solid var(--rule);
}

.work-links li:first-child {
    border-top: 1px solid var(--rule);
}

.work-links a {
    display: grid;
    gap: 0.15rem;
    padding-block: 1rem;
    text-decoration: none;
}

.work-links a span:first-child {
    font-size: 1.25rem;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
}

.work-links a span:last-child {
    color: var(--muted);
}

.block .after-list {
    margin-top: 1.25rem;
}

.contact-line {
    font-size: clamp(1.35rem, 5.4vw, 4rem);
    font-weight: 300;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
}

/* capstone and reflection pages */
.page-head {
    padding-block: clamp(2.5rem, 8vh, 5rem) clamp(2rem, 5vh, 3rem);
}

.page-head h1 {
    font-size: clamp(2.75rem, 8vw, 6rem);
}

.page-head .lede {
    max-width: 38rem;
    margin-top: 1.5rem;
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    line-height: 1.45;
}

/* drawing title block */
.title-block {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--steel);
    margin-top: 2.5rem;
}

.title-block div {
    padding: 0.7rem 0.9rem;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    min-width: 0;
}

.title-block dt {
    font-size: 0.875rem;
    color: var(--muted);
}

.title-block dd {
    font-weight: 500;
    overflow-wrap: anywhere;
}

@media (min-width: 760px) {
    .title-block {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .title-block div {
        border-bottom: 0;
    }

    .title-block div:last-child {
        border-right: 0;
    }
}

.prose {
    max-width: 40rem;
}

.prose p + p {
    margin-top: 1rem;
}

.three-up {
    display: grid;
    gap: 2rem;
}

.three-up h3 {
    margin-bottom: 0.4rem;
    color: var(--leaf);
}

@media (min-width: 760px) {
    .three-up {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: clamp(1.5rem, 4vw, 3.5rem);
    }
}

.process {
    display: grid;
}

.stage {
    position: sticky;
    top: var(--header-h);
    z-index: 5;
    height: 30vh;
    height: 30svh;
    min-height: 11rem;
    margin-inline: calc(var(--gutter) * -1);
    padding: 0.25rem var(--gutter) 0;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    display: flex;
    flex-direction: column;
}

.stage canvas {
    flex: 1;
    min-height: 0;
}

.stage-label {
    min-height: 1.6em;
    padding-bottom: 0.4rem;
    text-align: center;
    font-size: 0.9375rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.process .steps {
    padding-top: 2rem;
}

@media (min-width: 900px) {
    .process {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
        column-gap: clamp(2rem, 5vw, 5rem);
        align-items: start;
    }

    .stage {
        grid-column: 2;
        grid-row: 1;
        height: calc(100vh - var(--header-h));
        height: calc(100svh - var(--header-h));
        margin-inline: 0;
        padding: 0;
        border-bottom: 0;
    }

    .stage-label {
        padding-bottom: 2rem;
    }

    .process .steps {
        grid-column: 1;
        grid-row: 1;
        padding-top: 0;
        padding-block: 12vh;
        gap: 22vh;
    }
}

.steps {
    list-style: none;
    padding: 0;
    counter-reset: step;
    display: grid;
    gap: clamp(2.5rem, 6vh, 4rem);
}

.step {
    counter-increment: step;
    display: grid;
    gap: 1.25rem 3rem;
    align-items: start;
}

.step h3 {
    font-size: 1.35rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.step {
    transition: opacity 0.3s ease;
}

.js .process .step:not(.is-current) {
    opacity: 0.45;
}

.step h3::before {
    content: counter(step) '. ';
    color: var(--accent-ink);
}

.step p {
    max-width: 30rem;
}

.step .changed {
    margin-top: 0.75rem;
    padding-left: 0.9rem;
    border-left: 2px solid var(--glow);
    color: var(--muted);
}

figure .slot {
    aspect-ratio: 4 / 3;
}

figcaption {
    margin-top: 0.6rem;
    font-size: 0.9375rem;
    line-height: 1.45;
    color: var(--muted);
    max-width: 34rem;
}

.two-views {
    display: grid;
    gap: 1.5rem;
}

.view {
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--surface);
    border-radius: var(--radius);
    border-top: 3px solid var(--leaf);
}

.view.is-eng {
    border-top-color: var(--steel);
}

.view h3 {
    margin-bottom: 0.75rem;
}

.view p + p {
    margin-top: 0.75rem;
}

.view ul {
    padding-left: 1.1rem;
}

.view li + li {
    margin-top: 0.4rem;
}

@media (min-width: 760px) {
    .two-views {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* geometry explorer */
.explorer {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: clamp(1rem, 3vw, 2rem);
    background: var(--surface);
    border-radius: var(--radius);
}

.explorer-view {
    height: min(70vw, 26rem);
}

.explorer-controls {
    display: grid;
    gap: 1.5rem;
    align-content: start;
    min-width: 0;
}

.control-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.freq-group {
    display: flex;
    gap: 0.5rem;
}

.freq-btn {
    flex: 1;
    min-height: 2.9rem;
    border: 1.5px solid var(--steel);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text);
    font-weight: 500;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.freq-btn:hover {
    border-color: var(--text);
}

.freq-btn[aria-checked='true'] {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg);
}

input[type='range'] {
    width: 100%;
    height: 2.75rem;
    margin: 0;
    accent-color: var(--glow);
    background: transparent;
}

.readout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1.5rem;
}

.readout div {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding-block: 0.45rem;
    border-bottom: 1px solid var(--rule);
}

.readout dt {
    color: var(--muted);
}

.readout dd {
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.explorer-note {
    font-size: 0.9375rem;
    color: var(--muted);
}

@media (max-width: 379px) {
    .wordmark {
        display: none;
    }
}

@media (max-width: 479px) {
    .site-nav a,
    .wordmark {
        font-size: 1rem;
    }

    .readout {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 900px) {
    .explorer {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
        gap: 2.5rem;
    }

    .explorer-view {
        height: 100%;
        min-height: 26rem;
    }
}

/* reflection */
.reflection {
    max-width: 40rem;
}

.reflection section + section {
    margin-top: 2.75rem;
}

.reflection h2 {
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--leaf);
    margin-bottom: 0.6rem;
}

.reflection p {
    font-size: 1.1875rem;
    line-height: 1.6;
}

.word-count {
    margin-top: 2.5rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.next {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 2rem;
}

.next a {
    display: inline-block;
    padding-block: 0.6rem;
}

/* footer */
.site-footer {
    margin-top: clamp(3rem, 8vh, 6rem);
    padding-block: 2rem 2.5rem;
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-size: 0.9375rem;
}

.site-footer .wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 2rem;
}

.site-footer ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    list-style: none;
    padding: 0;
}

.site-footer a {
    display: inline-block;
    padding-block: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }

    @view-transition {
        navigation: none;
    }
}
