@font-face {
    font-family: "Space Grotesk";
    src: url("/assets/space-grotesk.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
}

@font-face {
    font-family: "Instrument Serif";
    src: url("/assets/instrument-serif-italic.woff2") format("woff2");
    font-style: italic;
    font-weight: 400;
    font-display: swap;
}

:root {
    color-scheme: light dark;
    --paper: #f4f1e9;
    --ink: #1d1c25;
    --muted: #565360;
    --line: #d5d0c7;
    --blue: #3625c7;
    --underline: #9d92e7;
    --tint: #e8e2f9;
    --tint-ink: #493997;
    --selection: #d5cef9;
    --portal-shadow: #21118dcc;
    --menu-shadow: #20184133;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --sans: "Space Grotesk", sans-serif;
    --serif: "Instrument Serif", Georgia, serif;
    background: var(--paper);
    color: var(--ink);
    font: 400 100%/1.55 var(--sans);
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

@supports (color: light-dark(white, black)) {
    :root {
        --paper: light-dark(#f4f1e9, #17141f);
        --ink: light-dark(#1d1c25, #f6f0e9);
        --muted: light-dark(#565360, #cbc3d6);
        --line: light-dark(#d5d0c7, #413950);
        --blue: light-dark(#3625c7, #b6a7ff);
        --underline: light-dark(#9d92e7, #8b78dc);
        --tint: light-dark(#e8e2f9, #29213b);
        --tint-ink: light-dark(#493997, #cbbdff);
        --selection: light-dark(#d5cef9, #4d3b77);
        --portal-shadow: light-dark(#21118dcc, #050310e6);
        --menu-shadow: light-dark(#20184133, #05031099);
    }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
button { font: inherit; }
a { color: inherit; text-underline-offset: .22em; }
a:hover { color: var(--blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 5px; }
::selection { background: var(--selection); color: var(--ink); }

.shell {
    width: min(100% - 96px, 1280px);
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    padding: .7rem 1rem;
    background: var(--paper);
    transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.site-header, .site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 82px;
}

.site-header { border-bottom: 1px solid var(--line); }

.wordmark {
    width: fit-content;
    font-size: 1.58rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -.085em;
    text-decoration: none;
}

.wordmark span, .section-heading h2 span { color: var(--blue); }

.site-header nav {
    display: flex;
    align-items: center;
    gap: clamp(.85rem, 2.5vw, 2.25rem);
}

.site-header nav a, .back-top {
    font-size: .92rem;
    font-weight: 600;
    text-decoration: none;
}

.site-header nav a:hover, .back-top:hover { text-decoration: underline; }
.site-header nav a span, .back-top span { margin-left: .22em; }

.theme-picker { position: relative; }

.theme-picker summary {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    list-style: none;
    cursor: pointer;
}

.theme-picker summary::-webkit-details-marker { display: none; }

.theme-picker summary::before {
    content: "";
    width: 16px;
    height: 16px;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

.theme-picker summary:hover, .theme-picker[open] summary {
    color: var(--blue);
    border-color: var(--blue);
}

.theme-picker fieldset {
    position: absolute;
    z-index: 2;
    top: calc(100% + .65rem);
    right: 0;
    min-width: 9rem;
    margin: 0;
    padding: .18rem .4rem .4rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
    box-shadow: 0 10px 28px var(--menu-shadow);
}

.theme-picker legend {
    padding-inline: .42rem;
    color: var(--muted);
    font: .69rem/1.4 var(--mono);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.theme-picker label {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 44px;
    padding-inline: .4rem;
    border-radius: 3px;
    font-size: .9rem;
    cursor: pointer;
}

.theme-picker label:hover, .theme-picker label:has(input:checked) { background: var(--tint); }
.theme-picker input { margin: 0; accent-color: var(--blue); }
.theme-picker input:focus-visible { outline-offset: 2px; }

.hero {
    display: grid;
    grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
    align-items: center;
    gap: clamp(1.4rem, 4.6vw, 4.5rem);
    padding-block: clamp(3.25rem, 6vw, 6.1rem);
}

.hero-copy { padding-block: .5rem; }

.eyebrow {
    font: 500 .75rem/1.4 var(--mono);
    text-transform: uppercase;
    letter-spacing: .085em;
}

.location {
    display: flex;
    align-items: center;
    gap: .62rem;
    margin-bottom: 1.35rem;
    color: var(--muted);
}

.location::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--blue);
}

.hero h1 {
    font-size: clamp(3rem, 7.25vw, 7.25rem);
    line-height: .87;
    letter-spacing: -.088em;
    font-weight: 600;
}

.hero h1 em {
    display: block;
    margin-top: .05em;
    margin-left: .025em;
    color: var(--blue);
    font: italic 400 1.26em/.8 var(--serif);
    letter-spacing: -.073em;
}

.intro {
    max-width: 37ch;
    margin-top: 2.15rem;
    color: var(--muted);
    font-size: clamp(1rem, 1.5vw, 1.22rem);
    line-height: 1.58;
    text-wrap: pretty;
}

.hero-link {
    display: inline-flex;
    align-items: center;
    gap: .62rem;
    padding: .58rem 0;
    margin-top: 1.15rem;
    font-size: .98rem;
    font-weight: 700;
    text-decoration-color: var(--underline);
}

.hero-link span { color: var(--blue); }

.portal {
    position: relative;
    min-width: 0;
    overflow: hidden;
    color: #f5f0ff;
    background: #2519a1;
    border: 1px solid #4334c2;
    border-radius: 8px;
    box-shadow: 0 18px 36px -27px var(--portal-shadow);
}

.portal-view {
    position: relative;
    isolation: isolate;
    aspect-ratio: 1.16;
    min-height: 250px;
    background:
        radial-gradient(ellipse at 57% 30%, #5137f4 0%, #3e2bcc 48%, #251b99 100%);
}

.portal-view::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background:
        linear-gradient(#e7daff1a 1px, transparent 1px) center / 30px 30px,
        linear-gradient(90deg, #e7daff1a 1px, transparent 1px) center / 30px 30px;
    mask-image: radial-gradient(ellipse at center, #000 28%, transparent 88%);
}

.portal-caption {
    position: absolute;
    z-index: 1;
    inset: 1.13rem auto auto 1.2rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #f7efff;
    font: 400 .72rem/1.2 var(--mono);
    letter-spacing: .09em;
    text-transform: uppercase;
}

.portal-caption span { color: #f2ff99; font-size: 1.2rem; }

.portal-canvas, .portal-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.portal-canvas { visibility: hidden; }
.portal[data-ready] .portal-canvas { visibility: visible; }
.portal[data-ready] .portal-fallback { display: none; }

.portal-fallback {
    display: grid;
    place-items: center;
    color: #ebe4ff;
}

.portal-fallback pre {
    margin: 1rem 0 0;
    font: 600 clamp(.65rem, 1.3vw, 1.12rem)/1.08 var(--mono);
}

.portal-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .45rem;
    min-height: 58px;
    padding: .34rem .65rem;
    border-top: 1px solid #e7daff36;
}

.form-buttons { display: flex; gap: .18rem; }

.portal-controls button {
    min-height: 44px;
    padding: .4rem .79rem;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #e2d9ff;
    font: 500 .77rem/1.15 var(--mono);
    cursor: pointer;
}

.portal-controls button:hover { background: #f1e8ff1a; color: white; }
.portal-controls button[aria-pressed="true"] {
    border-color: #e8daff40;
    background: #f0eaff22;
    color: white;
}

.portal-controls button:focus-visible { outline-color: #f2ff99; outline-offset: 1px; }
.motion-toggle { min-width: 5.5em; }

.interests {
    padding-block: clamp(2.5rem, 5vw, 4.25rem);
    border-top: 1px solid var(--line);
    scroll-margin-top: 1rem;
}

.section-heading h2 {
    font-size: clamp(2.35rem, 4.9vw, 4.9rem);
    font-weight: 600;
    line-height: .97;
    letter-spacing: -.075em;
}

.section-heading > p {
    margin-top: .9rem;
    color: var(--muted);
}

.interest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: clamp(1.65rem, 3.8vw, 3.25rem);
    border-block: 1px solid var(--line);
}

.interest-grid article {
    min-width: 0;
    padding: 1.6rem clamp(1rem, 3vw, 2.65rem) 1.7rem;
}

.interest-grid article:first-child { padding-inline-start: 0; }
.interest-grid article:last-child { padding-inline-end: 0; }
.interest-grid article + article { border-left: 1px solid var(--line); }

.interest-grid .eyebrow { color: var(--blue); }

.interest-grid h3 {
    margin-top: .52rem;
    font-size: clamp(1.4rem, 2.32vw, 2.25rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -.055em;
}

.interest-grid article > p:not(.eyebrow), .interview div > p:not(.eyebrow) {
    margin-top: .65rem;
    color: var(--muted);
    font-size: 1rem;
    text-wrap: pretty;
}

.interest-grid a, .interview a {
    display: inline-block;
    font-size: .95rem;
    font-weight: 700;
    text-decoration-color: var(--underline);
}

.interest-grid a { margin-top: .85rem; }

.work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.work-grid article:nth-child(odd) { padding-inline-start: 0; border-left: 0; }
.work-grid article:nth-child(even) { padding-inline-end: 0; }
.work-grid article:nth-child(n+3) { border-top: 1px solid var(--line); }
.work-grid article > p:not(.eyebrow) { max-width: 55ch; }
.work-grid a.related-link { margin-inline-start: 1rem; }

.experiments h2 { font-size: clamp(2.1rem, 3.7vw, 3.6rem); }
.experiments .interest-grid h3:first-child { margin-top: 0; }

.social-grid blockquote {
    margin-top: .75rem;
    color: var(--muted);
    text-wrap: pretty;
}

.project-screens {
    margin-top: clamp(2rem, 4vw, 3.25rem);
    scroll-margin-top: 1rem;
}

.project-screens h3 {
    font-size: clamp(1.55rem, 3vw, 2.6rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -.055em;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: clamp(1.1rem, 2.6vw, 2.25rem);
    margin-top: 1rem;
}

.project-gallery > a { display: block; border-radius: 7px; text-decoration: none; }
.project-gallery > a:hover figcaption { text-decoration: underline; }

.project-gallery img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.project-gallery figcaption {
    margin-bottom: .55rem;
    font-size: .92rem;
    font-weight: 700;
}

.interview {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem 2rem;
    padding: clamp(1.35rem, 3.5vw, 2.6rem);
    background: var(--tint);
    border-radius: 6px;
}

.interview .eyebrow { color: var(--tint-ink); }

.interview h2, .interview h3 {
    margin-top: .3rem;
    font-size: clamp(1.55rem, 3vw, 2.6rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -.055em;
}

.interview a { margin-block: .2rem; }
.chart-feature { margin-top: 1.4rem; }
.chart-feature p { max-width: 68ch; }

.music { margin-top: clamp(2.5rem, 5vw, 4.25rem); padding-bottom: 0; }
.music .section-heading p { max-width: 59ch; text-wrap: pretty; }

.music-profiles {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem clamp(1.6rem, 4vw, 3.5rem);
    margin: 1.4rem 0 0;
    padding: 0;
    list-style: none;
}

.music-profiles a {
    display: inline-block;
    padding-block: .25rem;
    font-weight: 700;
    text-decoration-color: var(--underline);
}

.music-profiles p { color: var(--muted); font-size: .9rem; }

.site-footer { margin-top: clamp(1.5rem, 4vw, 3.5rem); border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

@media (max-width: 870px) {
    .shell { width: calc(100% - 64px); }
    .hero { gap: 1.8rem; }
    .hero h1 { font-size: clamp(2.55rem, 7.43vw, 4.8rem); }
    .intro { margin-top: 1.65rem; }
}

@media (max-width: 690px) {
    .shell { width: calc(100% - 40px); }
    .site-header, .site-footer { min-height: 66px; }
    .hero { grid-template-columns: 1fr; gap: 1.85rem; padding-block: 2.5rem 2.75rem; }
    .hero h1 { font-size: clamp(2.8rem, 13.2vw, 5.4rem); }
    .hero-copy { padding-block: .2rem 0; }
    .location { margin-bottom: 1.18rem; }
    .intro { margin-top: 1.55rem; }
    .hero-link { margin-top: .75rem; }
    .portal-caption { inset: .8rem auto auto .9rem; }
    .portal-controls { min-height: 51px; padding: .18rem .32rem; }
    .portal-controls button { padding-inline: .58rem; }
    .interest-grid, .project-gallery { grid-template-columns: 1fr; }
    .interest-grid article { padding: 1.4rem 0; }
    .interest-grid article + article { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 430px) {
    .site-header { gap: .55rem; }
    .site-header .wordmark { font-size: 1.42rem; }
    .site-header nav { gap: .5rem; }
    .site-header nav a { font-size: .82rem; }
}

@media (max-width: 350px) {
    .shell { width: calc(100% - 32px); }
    .portal-view { min-height: 225px; }
}

@media (forced-colors: active) {
    .portal-controls button[aria-pressed="true"] { border-color: Highlight; }
    .theme-picker summary::before { forced-color-adjust: none; }
}
