:root {
    --bg: #0a0b09;
    --bg-raised: #10120e;
    --text: #e8e7de;
    --muted: #aaa99f;
    --line: #363831;
    --accent: #d8dd36;
    --accent-strong: #eef43b;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --page: 76rem;
    --gutter: clamp(1.25rem, 4vw, 3rem);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 20% 0%, rgba(216, 221, 54, 0.035), transparent 25rem),
        var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}

body::before {
    position: fixed;
    z-index: -1;
    inset: 0;
    content: "";
    pointer-events: none;
    opacity: 0.24;
    background-image: repeating-linear-gradient(115deg, transparent 0, transparent 8rem, rgba(255, 255, 255, 0.012) 8rem, rgba(255, 255, 255, 0.012) 8.05rem);
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

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

img {
    height: auto;
}

a {
    color: inherit;
    text-underline-offset: 0.24em;
    text-decoration-thickness: 1px;
}

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

a:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 5px;
}

h1,
h2,
h3,
p,
figure {
    margin-top: 0;
}

h1,
h2,
h3,
.eyebrow,
.section-number,
.tags,
.brand,
nav,
.text-button,
.media-label,
.project-id,
.external-links,
.footer-name {
    font-family: var(--mono);
}

h1,
h2,
h3 {
    line-height: 1.04;
    letter-spacing: -0.04em;
}

h2 {
    margin-bottom: 0;
    font-size: clamp(2.15rem, 6vw, 4.9rem);
    font-weight: 600;
}

h3 {
    margin-bottom: 1.15rem;
    font-size: clamp(2rem, 4vw, 3.55rem);
    font-weight: 600;
}

.section-shell {
    width: min(100%, calc(var(--page) + (2 * var(--gutter))));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section {
    padding-block: clamp(5.5rem, 10vw, 10rem);
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 0.8rem;
    left: 0.8rem;
    padding: 0.65rem 0.9rem;
    transform: translateY(-180%);
    background: var(--accent);
    color: var(--bg);
    font-family: var(--mono);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    z-index: 20;
    top: 0;
    border-bottom: 1px solid rgba(232, 231, 222, 0.17);
    background: rgba(10, 11, 9, 0.93);
    backdrop-filter: blur(12px);
}

.header-inner {
    display: flex;
    width: min(100%, calc(var(--page) + (2 * var(--gutter))));
    min-height: 4.2rem;
    margin-inline: auto;
    padding: 0.8rem var(--gutter);
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    flex: none;
    color: var(--accent);
    font-size: 0.83rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
}

nav {
    display: flex;
    justify-content: flex-end;
    gap: clamp(0.8rem, 2.5vw, 2rem);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

nav a {
    color: var(--muted);
    text-decoration: none;
}

.hero {
    position: relative;
    padding-top: clamp(5rem, 11vw, 9.5rem);
    padding-bottom: clamp(4rem, 9vw, 8rem);
}

.hero::after {
    position: absolute;
    right: var(--gutter);
    bottom: 9rem;
    width: clamp(3rem, 9vw, 7rem);
    height: 1px;
    content: "";
    background: var(--accent);
    box-shadow: 0 0 1.4rem rgba(216, 221, 54, 0.42);
}

.eyebrow,
.section-number,
.media-label,
.project-id {
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow {
    margin-bottom: clamp(1.5rem, 4vw, 3rem);
}

.hero h1 {
    max-width: 15ch;
    margin-bottom: clamp(2rem, 5vw, 4rem);
    font-size: clamp(3.25rem, 7.5vw, 6.5rem);
    font-weight: 700;
    text-transform: uppercase;
}

.cursor {
    color: var(--accent);
    animation: blink 1.25s steps(2, start) infinite;
}

@keyframes blink {
    55% { opacity: 0; }
}

.hero-statement {
    max-width: 25ch;
    margin-bottom: 1rem;
    color: var(--text);
    font-size: clamp(1.45rem, 4vw, 2.65rem);
    font-weight: 500;
    line-height: 1.18;
}

.byline {
    margin-bottom: 2.5rem;
    color: var(--muted);
}

.hero-actions,
.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
}

.text-button,
.project-links a {
    display: inline-flex;
    min-height: 2.8rem;
    align-items: center;
    gap: 0.7rem;
    border-bottom: 1px solid var(--accent);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
}

.text-button span,
.project-links a span,
.external-links a span:last-child {
    transition: transform 160ms ease;
}

.text-button:hover span,
.project-links a:hover span,
.external-links a:hover span:last-child {
    transform: translateX(0.25rem);
}

.feedback-strip {
    display: flex;
    margin-top: clamp(4rem, 9vw, 7rem);
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 0.45rem 1rem;
    border-block: 1px solid var(--line);
    color: var(--muted);
    font-family: var(--mono);
    font-size: clamp(0.72rem, 2vw, 0.9rem);
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.feedback-strip span:nth-child(even) {
    color: var(--accent);
}

.section-heading {
    display: grid;
    margin-bottom: clamp(3rem, 7vw, 6rem);
    grid-template-columns: minmax(8rem, 1fr) minmax(0, 2.2fr);
    gap: 2rem;
}

.section-heading h2 {
    max-width: 16ch;
}

.ruled-heading {
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.prose {
    max-width: 42rem;
    color: var(--muted);
    font-size: clamp(1.05rem, 2vw, 1.22rem);
}

.prose p:last-child {
    margin-bottom: 0;
}

.prose-large {
    color: var(--text);
    font-size: clamp(1.2rem, 2.3vw, 1.55rem);
    line-height: 1.6;
}

.about .prose {
    grid-column: 2;
    max-width: 48rem;
    margin-left: 31.2%;
}

.music-intro,
.machines-intro {
    margin-bottom: clamp(3.5rem, 7vw, 6rem);
    margin-left: 31.2%;
}

.media-grid {
    display: grid;
    grid-template-columns: 0.88fr 1.12fr;
    gap: 1.2rem;
    align-items: start;
}

.media-block {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--line);
    background: var(--bg-raised);
}

.media-label {
    margin-bottom: 1rem;
}

.spotify-embed {
    border: 0;
}

.video-frame {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

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

.media-fallback {
    display: inline-flex;
    margin-top: 1rem;
    align-items: center;
    gap: 0.55rem;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.media-fallback span {
    transition: transform 160ms ease;
}

.media-fallback:hover span {
    transform: translateX(0.25rem);
}

.project-index {
    border-top: 1px solid var(--line);
}

.project {
    display: grid;
    padding-block: clamp(3.5rem, 8vw, 7rem);
    grid-template-columns: 1fr 1.15fr;
    gap: clamp(2rem, 7vw, 6rem);
    align-items: center;
    border-bottom: 1px solid var(--line);
}

.project:nth-child(even) {
    grid-template-columns: 1.15fr 1fr;
}

.project:nth-child(even) .project-copy {
    order: 2;
}

.project-copy > p:not(.project-id, .tags) {
    max-width: 35rem;
    margin-bottom: 1.8rem;
    color: var(--muted);
    font-size: clamp(1.03rem, 2vw, 1.18rem);
}

.project-id {
    margin-bottom: 1.5rem;
}

.tags {
    margin-bottom: 1.5rem;
    color: var(--accent);
    font-size: 0.72rem;
    line-height: 1.7;
    letter-spacing: 0.09em;
}

.project-links a {
    min-height: 2.4rem;
    font-family: var(--mono);
    font-size: 0.75rem;
}

.project-media {
    position: relative;
    margin-bottom: 0;
}

.project-media::before {
    position: absolute;
    z-index: 1;
    top: -0.55rem;
    right: -0.55rem;
    width: 3rem;
    height: 3rem;
    content: "";
    border-top: 1px solid var(--accent);
    border-right: 1px solid var(--accent);
}

.project-media img {
    width: 100%;
    border: 1px solid #22241f;
    background: #111;
    filter: saturate(0.8) contrast(1.05);
    transition: filter 220ms ease;
}

.project:hover .project-media img {
    filter: saturate(1) contrast(1.02);
}

.code-section {
    padding-bottom: clamp(6rem, 12vw, 11rem);
}

.code-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(3rem, 8vw, 7rem);
    align-items: start;
}

.large-link {
    display: inline-block;
    max-width: 100%;
    margin-top: 2rem;
    color: var(--accent);
    font-family: var(--mono);
    font-size: clamp(1.05rem, 2.5vw, 1.5rem);
    overflow-wrap: anywhere;
}

.software-entry {
    padding: clamp(1.5rem, 4vw, 2.7rem);
    border-block: 1px solid var(--line);
}

.software-entry h3 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.software-entry > p:not(.project-id, .tags) {
    color: var(--muted);
}

.feedback-section {
    overflow: hidden;
    padding-block: clamp(5.5rem, 11vw, 10rem);
    border-block: 1px solid var(--accent);
    background: var(--accent);
    color: var(--bg);
}

.feedback-section .section-number {
    margin-bottom: 2rem;
    color: var(--bg);
}

.feedback-section h2 {
    max-width: 14ch;
    margin-bottom: clamp(3rem, 7vw, 6rem);
    font-size: clamp(3rem, 8vw, 7rem);
}

.feedback-copy {
    max-width: 43rem;
    margin-left: 31.2%;
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
}

.loop-line {
    margin-top: clamp(4rem, 8vw, 7rem);
    margin-bottom: 0;
    font-family: var(--mono);
    font-size: clamp(1.1rem, 3.7vw, 2.7rem);
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.loop-line span {
    margin-inline: 0.25em;
}

.watch-content {
    margin-left: 31.2%;
}

.watch-content p {
    margin-bottom: 2rem;
}

.links-section {
    padding-top: clamp(4rem, 8vw, 7rem);
}

.external-links {
    margin-left: 31.2%;
    border-top: 1px solid var(--line);
}

.external-links a {
    display: flex;
    min-height: 4.3rem;
    padding-inline: 0.2rem;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-size: clamp(1rem, 2vw, 1.22rem);
    text-decoration: none;
}

.site-footer {
    padding-block: 3.5rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.78rem;
}

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

.footer-inner p {
    margin-bottom: 0.25rem;
}

.footer-name {
    color: var(--text);
    font-weight: 700;
    text-transform: uppercase;
}

.footer-right {
    text-align: right;
}

@media (max-width: 760px) {
    html {
        scroll-padding-top: 7rem;
    }

    .header-inner {
        min-height: auto;
        padding-block: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.55rem;
    }

    nav {
        width: 100%;
        justify-content: space-between;
        gap: 0.5rem;
        font-size: 0.67rem;
    }

    .hero::after {
        display: none;
    }

    .section-heading,
    .media-grid,
    .project,
    .project:nth-child(even),
    .code-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        gap: 1rem;
    }

    .about .prose,
    .music-intro,
    .machines-intro,
    .feedback-copy,
    .watch-content,
    .external-links {
        margin-left: 0;
    }

    .media-grid {
        gap: 2rem;
    }

    .project:nth-child(even) .project-copy {
        order: initial;
    }

    .project {
        gap: 2.25rem;
    }

    .project-media {
        order: 2;
    }

    .feedback-section h2 {
        font-size: clamp(2.8rem, 14vw, 4.8rem);
    }

    .loop-line {
        white-space: normal;
    }

}

@media (max-width: 430px) {
    :root {
        --gutter: 1rem;
    }

    nav {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 0.15rem;
        gap: 1rem;
        scrollbar-width: thin;
    }

    .hero h1 {
        font-size: clamp(2.85rem, 15.3vw, 4rem);
    }

    .feedback-strip {
        gap: 0.35rem 0.55rem;
    }

    .media-block {
        padding: 0.65rem;
    }

    .spotify-embed {
        height: 352px;
    }

    .footer-inner {
        flex-direction: column;
    }

    .footer-right {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: more) {
    :root {
        --muted: #d0d0c7;
        --line: #717268;
    }
}
