:root {
    --bg: #180000;
    --surface: #301818;
    --ink: #E0A070;
    --ink-soft: #D89C6C;
    --body: #C0B080;    
    --muted: #B09070;   
    --accent: #C07854;  
    --accent-2: #B46048;
    --copper: #A06030;  
    --copper-2: #9C6030;
    --line: #706040;    
    --deep: #6C2418;    
    --header-bg: rgba(24, 0, 0, 0.94);
    --on-accent: #180000;

    --font-sans: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
    --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'Courier New', monospace;

    --pad: clamp(1rem, 4vw, 3rem);
    --ease: cubic-bezier(0.7, 0, 0.2, 1);
}

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

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

body {
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--body);
    background: var(--bg);
    overflow-x: hidden;
}

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

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

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

ul {
    list-style: none;
}

:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 4px;
}

.skip,
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip:focus {
    width: auto;
    height: auto;
    clip: auto;
    z-index: 300;
    left: var(--pad);
    top: 1rem;
    padding: 0.6rem 1rem;
    background: var(--ink);
    color: var(--bg);
}



.label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.h2 {
    font-size: clamp(2.4rem, 7vw, 6.5rem);
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.045em;
    color: var(--ink);
}

.h2 em,
.about__text em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--accent);
}



.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem var(--pad);
    background: var(--header-bg);
    border-bottom: 1px solid var(--surface);
}

.brand,
.nav a {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.brand {
    color: var(--ink);
    font-size: 0.85rem;
}

.nav {
    display: flex;
    gap: clamp(0.25rem, 2vw, 1.25rem);
}


.nav a {
    padding: 0.35rem 0.6rem;
    color: var(--ink-soft);
    transition: background-color 0.2s, color 0.2s;
}

.nav a:hover,
.nav a:focus-visible {
    background: var(--ink);
    color: var(--bg);
}

.status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.status__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--copper-2);
    animation: pulse 2s ease-in-out infinite;
}




.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    column-gap: clamp(2rem, 5vw, 6rem);
    align-items: center;
    min-height: calc(100vh - 4.5rem);
    min-height: calc(100svh - 4.5rem);
    padding: clamp(2rem, 4vw, 4rem) var(--pad);
}

.hero__main {
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.hero__title {
    font-size: clamp(3.2rem, 9vw, 11rem);
    font-weight: 600;
    line-height: 0.88;
    letter-spacing: -0.055em;
    color: var(--ink);
    font-variation-settings: 'opsz' 96;
}

.hero__title em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.03em;
    color: var(--accent);
}


.line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.1em;
}

.line > span {
    display: inline-block;
    transform: translateY(110%);
    animation: rise 1s var(--ease) forwards;
    animation-delay: calc(var(--i) * 0.12s + 0.1s);
}

.lead {
    max-width: 36ch;
    font-size: clamp(1.25rem, 2vw, 1.9rem);
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: var(--ink-soft);
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.4rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    border: 1px solid var(--accent);
    border-radius: 999px;
    transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}

.btn--solid {
    background: var(--accent);
    color: var(--on-accent);
}

.btn:hover,
.btn:focus-visible {
    background: var(--ink);
    color: var(--bg);
    border-color: var(--ink);
}


.hero__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.hero__meta dd {
    margin-top: 0.35rem;
    line-height: 1.3;
    color: var(--ink-soft);
}




.sequence {
    justify-self: end;
    width: min(100%, 560px, calc((100vh - 11rem) * 0.8));
    width: min(100%, 560px, calc((100svh - 11rem) * 0.8));
}

.sequence__frames {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--surface);
    cursor: crosshair;
}

.sequence__frames img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
}

.sequence__frames img:first-child {
    opacity: 1;
}

.sequence figcaption {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.75rem;
}



.marquee {
    overflow: hidden;
    padding: 1.1rem 0;
    border-block: 1px solid var(--line);
}

.marquee__track {
    display: flex;
    width: max-content;
    animation: marquee 32s linear infinite;
}

.marquee__group {
    display: flex;
    flex-shrink: 0;
}

.marquee__group span {
    padding-right: 3rem;
    font-size: clamp(1.25rem, 3vw, 2.5rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--ink-soft);
}

.marquee__group span::after {
    content: '\2731';
    margin-left: 3rem;
    color: var(--copper);
}



.section {
    padding: clamp(3rem, 7vw, 6.5rem) var(--pad);
}

.section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: clamp(2rem, 5vw, 4rem);
}



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

.row {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr) auto 5rem;
    align-items: baseline;
    gap: 1rem;
    padding: clamp(1.25rem, 3vw, 2.25rem) var(--pad);
    margin-inline: calc(var(--pad) * -1);
    border-top: 1px solid var(--line);
    color: var(--body);
    transition: background-color 0.25s, color 0.25s;
}

.row__n,
.row__meta,
.row__year {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.25s;
}

.row__year {
    text-align: right;
}

.row__title {
    font-size: clamp(1.75rem, 5.5vw, 5rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--ink);
    transition: color 0.25s, transform 0.4s var(--ease);
}

.row:hover,
.row:focus-visible {
    background: var(--ink);
    outline-offset: -4px;
}

.row:hover .row__title,
.row:focus-visible .row__title {
    color: var(--bg);
    transform: translateX(1rem);
}

.row:hover .row__n,
.row:hover .row__meta,
.row:hover .row__year,
.row:focus-visible .row__n,
.row:focus-visible .row__meta,
.row:focus-visible .row__year {
    color: var(--bg);
}



.about {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: start;
}

.about__text {
    font-size: clamp(1.6rem, 3.6vw, 3.4rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.about__text .dim {
    color: var(--muted);
}

.stats {
    display: grid;
    gap: 1.5rem;
}

.stats li {
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.stats strong {
    display: block;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.05em;
    color: var(--copper);
}

.stats span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}



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

.skill-card {
    min-height: 13rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid transparent;
    transition: background-color 0.25s, color 0.25s, transform 0.4s var(--ease), border-color 0.25s;
}

.skill-card h3 {
    margin-bottom: 1.25rem;
    font-size: clamp(1.5rem, 2.4vw, 2.2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.skill-card li {
    padding: 0.35rem 0;
    border-top: 1px solid var(--line);
    color: var(--body);
}

.skill-card:hover {
    background: var(--deep);
    border-color: var(--copper-2);
    transform: translateY(-6px);
}

.skill-card:hover li {
    color: var(--ink);
}



.contact__link {
    display: block;
    margin: 1.5rem 0 2rem;
    font-size: clamp(3rem, 12vw, 11rem);
    font-weight: 600;
    line-height: 0.9;
    letter-spacing: -0.055em;
    white-space: nowrap;
    color: var(--ink);
    transition: color 0.25s;
}

.contact__link:hover,
.contact__link:focus-visible {
    color: var(--accent);
}

.contact__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact__meta a {
    color: var(--ink-soft);
    background: linear-gradient(var(--copper-2), var(--copper-2)) left bottom / 0 1px no-repeat;
    transition: background-size 0.3s var(--ease), color 0.2s;
}

.contact__meta a:hover,
.contact__meta a:focus-visible {
    background-size: 100% 1px;
    color: var(--ink);
}



.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem var(--pad);
    border-top: 1px solid var(--surface);
}

.pause {
    padding: 0.4rem 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-soft);
    background: none;
    border: 1px solid var(--line);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.pause:hover,
.pause:focus-visible,
.pause[aria-pressed='true'] {
    background: var(--ink);
    color: var(--bg);
}



.cursor,
.preview {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.cursor {
    display: grid;
    place-items: center;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: var(--ink);
    transition: opacity 0.2s, width 0.3s var(--ease), height 0.3s var(--ease), margin 0.3s var(--ease), background-color 0.2s;
}

.cursor.is-on {
    opacity: 1;
}

.cursor.is-big {
    width: 84px;
    height: 84px;
    margin: -42px 0 0 -42px;
    background: var(--accent);
}

.cursor.is-big.is-deep {
    background: var(--deep);
}

.cursor__label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--on-accent);
    opacity: 0;
    transition: opacity 0.2s;
}

.cursor.is-big .cursor__label {
    opacity: 1;
}

.cursor.is-deep .cursor__label {
    color: var(--ink);
}

.preview {
    z-index: 150;
    width: clamp(180px, 20vw, 280px);
    aspect-ratio: 4 / 5;
    overflow: hidden;
    translate: 1.5rem -50%;
    background: var(--surface);
}

.preview.is-on {
    opacity: 1;
}

.preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal-up.is-in {
    opacity: 1;
    transform: none;
}



@keyframes rise {
    to { transform: translateY(0); }
}

@keyframes marquee {
    to { transform: translateX(-50%); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}



@media (min-width: 1800px) {
    html { font-size: 112.5%; }
}

@media (min-width: 2400px) {
    html { font-size: 125%; }
}

@media (max-width: 1100px) {
    .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .hero,
    .about {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 0;
        row-gap: 2.5rem;
    }

    .hero__title {
        font-size: clamp(3.4rem, 15vw, 9rem);
    }

    .sequence {
        justify-self: start;
        width: min(100%, 420px);
    }

    .row {
        grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    }

    .row__meta {
        grid-column: 2 / 4;
        grid-row: 2;
    }

    .stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .status { display: none; }
    .site-footer { justify-content: center; }
}

@media (max-width: 560px) {
    .hero__meta { grid-template-columns: 1fr; }
    .nav a { padding: 0.35rem 0.4rem; font-size: 0.68rem; }
    .skills { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr; }
    .skill-card { min-height: 0; }
    .contact__link { white-space: normal; }
}


@media (hover: none), (pointer: coarse) {
    .cursor,
    .preview { display: none; }
    .skill-card:hover { transform: none; }
    .row:hover .row__title { transform: none; }
}



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

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
    .line > span { transform: none; }
    .reveal-up { opacity: 1; transform: none; }
}

html[data-motion='off'] {
    scroll-behavior: auto;
}

html[data-motion='off'] *,
html[data-motion='off'] *::before,
html[data-motion='off'] *::after {
    animation: none !important;
    transition: none !important;
}

html[data-motion='off'] .line > span { transform: none; }
html[data-motion='off'] .reveal-up { opacity: 1; transform: none; }





html[data-theme='paper'] {
    --bg: #F3ECDD;
    --surface: #E7DDC9;
    --ink: #1F1510;
    --ink-soft: #3B2B21;
    --body: #4B3B30;
    --muted: #6A5848;
    --accent: #A63F27;
    --accent-2: #8C3321;
    --copper: #B8672A;
    --copper-2: #9C5A28;
    --line: #BDAE93;
    --deep: #E2CDAE;
    --header-bg: rgba(243, 236, 221, 0.94);
    --on-accent: #FFF6EA;
    --font-sans: 'Fraunces', Georgia, 'Times New Roman', serif;
}

html[data-theme='paper'] .hero__title,
html[data-theme='paper'] .h2,
html[data-theme='paper'] .row__title,
html[data-theme='paper'] .about__text,
html[data-theme='paper'] .contact__link {
    font-weight: 500;
    letter-spacing: -0.035em;
}


html[data-theme='signal'] {
    --bg: #0A0F1E;
    --surface: #141B33;
    --ink: #EAF1FF;
    --ink-soft: #CBD8F5;
    --body: #AEBCDB;
    --muted: #8E9CC2;
    --accent: #6EF3A5;
    --accent-2: #4CC9F0;
    --copper: #6F86E8;
    --copper-2: #5568C9;
    --line: #2C3860;
    --deep: #1B2A66;
    --header-bg: rgba(10, 15, 30, 0.94);
    --on-accent: #0A0F1E;
    --font-sans: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
}



.theme-switch {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.theme-switch__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}


.theme-switch__btn::before {
    content: '';
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: var(--swatch);
    border: 1px solid var(--line);
}

.theme-switch__btn:hover,
.theme-switch__btn:focus-visible {
    color: var(--ink);
}

.theme-switch__btn[aria-pressed='true'] {
    color: var(--ink);
    border-color: var(--line);
}

@media (max-width: 700px) {
    .site-header {
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }

   
    .theme-switch__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .theme-switch__btn {
        padding: 0.45rem;
    }
}


html.theme-fade,
html.theme-fade *,
html.theme-fade *::before,
html.theme-fade *::after {
    transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease !important;
}





.progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 300;
    height: 3px;
    pointer-events: none;
}

.progress span {
    display: block;
    height: 100%;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
}



.hscroll__head {
    padding: clamp(3rem, 7vw, 6rem) var(--pad) clamp(1.5rem, 3vw, 2.5rem);
}

.hscroll__head .h2 {
    margin-top: 0.75rem;
}

.hscroll__track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    padding: 0 var(--pad) clamp(3rem, 7vw, 6rem);
}

.hscroll__bar {
    display: none;
}

.panel {
    display: grid;
    align-content: start;
    gap: 1rem;
    padding: clamp(1.25rem, 2.5vw, 2rem);
    background: var(--surface);
    border: 1px solid var(--line);
}

.panel:nth-child(even) {
    background: var(--deep);
}

.panel__n {
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 600;
    line-height: 0.8;
    letter-spacing: -0.06em;
    color: var(--copper);
}

.panel h3 {
    font-size: clamp(1.5rem, 2.6vw, 2.4rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.panel p {
    max-width: 38ch;
    color: var(--body);
}

.panel img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.hscroll.is-pinned {
    position: relative;
    height: var(--hs-height, auto);
}

.hscroll.is-pinned .hscroll__pin {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(1rem, 3vh, 2rem);
    height: 100vh;
    height: 100svh;
    padding-top: 4.5rem;
    overflow: hidden;
}

.hscroll.is-pinned .hscroll__head {
    padding-block: 0;
}

.hscroll.is-pinned .hscroll__track {
    display: flex;
    width: max-content;
    gap: clamp(1rem, 2vw, 2rem);
    padding: 0 var(--pad);
    will-change: transform;
}

.hscroll.is-pinned .panel {
    flex: 0 0 min(78vw, 520px);
    grid-template-columns: 1fr;
}

.hscroll.is-pinned .hscroll__bar {
    display: block;
    height: 2px;
    margin: 0 var(--pad);
    background: var(--line);
}

.hscroll__bar span {
    display: block;
    height: 100%;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
}



.about__side {
    display: grid;
    gap: 2.5rem;
}

.cube-wrap {
    --cube: clamp(110px, 13vw, 180px);
    --half: calc(var(--cube) / 2);
    display: grid;
    place-items: center;
    height: calc(var(--cube) * 1.8);
    perspective: 900px;
}

.cube {
    position: relative;
    width: var(--cube);
    height: var(--cube);
    transform-style: preserve-3d;
    transform: rotateX(-22deg) rotateY(-32deg);
    will-change: transform;
}

.cube__face {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
}

.cube__face--front {
    transform: translateZ(var(--half));
    background: var(--accent);
    color: var(--on-accent);
}

.cube__face--back { transform: rotateY(180deg) translateZ(var(--half)); }
.cube__face--right { transform: rotateY(90deg) translateZ(var(--half)); }
.cube__face--left { transform: rotateY(-90deg) translateZ(var(--half)); }
.cube__face--top { transform: rotateX(90deg) translateZ(var(--half)); background: var(--deep); }
.cube__face--bottom { transform: rotateX(-90deg) translateZ(var(--half)); background: var(--deep); }


html[data-motion='off'] .hscroll__track,
html[data-motion='off'] .sequence__frames,
html[data-motion='off'] .cube-wrap {
    transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .hscroll__track,
    .sequence__frames,
    .cube-wrap {
        transform: none !important;
    }
}
