:root {
    --bg: #F6F2FF;
    --ink: #1A1033;
    --muted: #5d5575;
    --rule: #d9d0ee;
    --accent: #FF4F81;
    --pop: #5B3DF5;
    --on-accent: #fff;
    --display: 'Unbounded', system-ui, sans-serif;
    --body: 'Figtree', system-ui, sans-serif;
}

:root[data-theme="dark"] {
    --bg: #150E2A;
    --ink: #F3EEFF;
    --muted: #a79fc4;
    --rule: #2f2450;
    --accent: #FF7AA2;
    --pop: #9C8CFF;
    --on-accent: #150E2A
}

* {
    box-sizing: border-box;
    margin: 0
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem
}

body {
    background: var(--bg);
    color: var(--ink);
    font: 400 1.0625rem/1.65 var(--body);
    transition: background .4s, color .4s;
    overflow-x: hidden
}

a {
    color: inherit
}

:focus-visible {
    outline: 3px solid var(--pop);
    outline-offset: 3px
}

::selection {
    background: var(--accent);
    color: var(--on-accent)
}

.progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0;
    background: var(--accent);
    z-index: 20
}

.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 30;
    opacity: 0;
    transition: width .25s, height .25s, margin .25s, opacity .3s, background .25s
}

.cursor.on {
    opacity: 1
}

.cursor.big {
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    background: color-mix(in srgb, var(--accent) 18%, transparent)
}

@media (hover:none) {
    .cursor {
        display: none
    }
}

.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem clamp(1.5rem, 6vw, 5rem);
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: blur(12px)
}

.logo {
    font: 700 1.1rem var(--display);
    text-decoration: none;
    margin-right: auto
}

nav {
    display: flex;
    gap: 1.5rem
}

nav a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
    background: linear-gradient(var(--accent), var(--accent)) 0 100%/0 2px no-repeat;
    padding-bottom: .2rem;
    transition: background-size .3s, color .3s
}

nav a:hover,
nav a.active {
    color: var(--ink);
    background-size: 100% 2px
}

.theme-toggle,
.menu {
    font: 600 .9rem var(--body);
    color: var(--ink);
    background: none;
    border: 1.5px solid var(--rule);
    border-radius: 999px;
    padding: .4rem 1rem;
    cursor: pointer;
    transition: border-color .2s, transform .2s
}

.theme-toggle:hover {
    border-color: var(--accent);
    transform: rotate(-4deg)
}

.menu {
    display: none
}

main,
footer {
    padding-inline: clamp(1.5rem, 6vw, 5rem)
}

.hero {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 3rem;
    align-items: center;
    min-height: calc(100svh - 4rem);
    padding-block: 3rem
}

.hi {
    font: 600 1.1rem var(--body);
    color: var(--pop);
    margin-bottom: .8rem;
    animation: fade .6s .1s both
}

h1 {
    font: 700 clamp(2.4rem, 6.5vw, 5.2rem)/1.02 var(--display);
    letter-spacing: -.04em;
    max-width: 12ch
}

h1 .w {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    padding-bottom: .08em;
    margin-right: .22em
}

h1 .c {
    display: inline-block;
    transform: translateY(110%) rotate(8deg);
    animation: letter .8s cubic-bezier(.2, .9, .2, 1) forwards;
    animation-delay: calc(var(--i)*40ms + .2s)
}

h1 .w:last-child .c {
    color: var(--accent)
}

.lead {
    font-size: 1.2rem;
    color: var(--muted);
    max-width: 36ch;
    margin: 1.5rem 0 2rem;
    animation: fade .7s 1.1s both
}

.buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fade .7s 1.3s both
}

.btn {
    display: inline-block;
    font: 600 1rem var(--body);
    padding: .9rem 1.6rem;
    border-radius: 999px;
    text-decoration: none;
    border: 2px solid var(--ink);
    cursor: pointer;
    transition: transform .2s ease-out, background .25s, color .25s
}

.btn.primary {
    background: var(--ink);
    color: var(--bg)
}

.btn.primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent)
}

.btn.ghost {
    background: none;
    color: var(--ink)
}

.btn.ghost:hover {
    background: var(--ink);
    color: var(--bg)
}

.portrait {
    position: relative;
    max-width: 380px;
    justify-self: center;
    animation: pop 1s .3s cubic-bezier(.2, .9, .2, 1) both
}

.arch {
    border-radius: 999px 999px 24px 24px;
    overflow: hidden;
    background: var(--pop);
    box-shadow: 14px 14px 0 var(--accent)
}

.arch img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    transition: transform .8s
}

.arch:hover img {
    transform: scale(1.06)
}

.badge {
    position: absolute;
    width: 130px;
    right: -45px;
    top: -25px;
    animation: spin 18s linear infinite;
    z-index: 2
}

.badge text {
    font: 600 15px var(--body);
    letter-spacing: .14em;
    text-transform: uppercase;
    fill: var(--ink)
}

.marquee {
    margin-inline: calc(-1*clamp(1.5rem, 6vw, 5rem));
    overflow: hidden;
    background: var(--ink);
    color: var(--bg);
    padding: 1rem 0;
    transform: rotate(-1.2deg)
}

.track {
    display: flex;
    gap: 2.5rem;
    width: max-content;
    animation: scroll 28s linear infinite;
    font: 700 1.4rem var(--display)
}

.track span::after {
    content: "✦";
    margin-left: 2.5rem;
    color: var(--accent)
}

.marquee:hover .track {
    animation-play-state: paused
}

.section {
    display: grid;
    grid-template-columns: minmax(10rem, 1fr) 2.4fr;
    gap: 3rem;
    padding-block: 6rem
}

h2 {
    font: 700 1.2rem/1.2 var(--display);
    color: var(--pop)
}

.big {
    font: 600 clamp(1.5rem, 3.2vw, 2.4rem)/1.35 var(--display);
    letter-spacing: -.02em;
    max-width: 30ch
}

.words .wd {
    color: color-mix(in srgb, var(--ink) 18%, transparent);
    transition: color .3s
}

.words .wd.lit {
    color: var(--ink)
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 2rem 0;
    border-top: 2px solid var(--ink);
    position: relative;
    transition: padding .35s
}

.row::before {
    content: "";
    position: absolute;
    left: 0;
    top: -2px;
    height: 2px;
    width: 0;
    background: var(--accent);
    transition: width .5s
}

.row:hover::before {
    width: 100%
}

.row:hover {
    padding-left: 1rem
}

h3 {
    font: 700 1.3rem/1.2 var(--display)
}

.row p {
    color: var(--muted)
}

.skills {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 2rem
}

.skills li {
    border: 2px solid var(--rule);
    border-radius: 999px;
    padding: .35rem 1rem;
    font-weight: 600;
    transition: transform .25s, background .25s, border-color .25s
}

.skills li:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
    transform: translateY(-4px) rotate(-3deg)
}

.contact-form {
    margin-top: 3rem;
    display: grid;
    gap: 1.8rem;
    max-width: 36rem
}

.form-group {
    position: relative
}

input,
textarea {
    width: 100%;
    font: inherit;
    font-size: 1.1rem;
    color: var(--ink);
    background: none;
    border: 0;
    border-bottom: 2px solid var(--rule);
    padding: 1.2rem 0 .5rem;
    resize: vertical;
    transition: border-color .3s
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent)
}

.form-group label {
    position: absolute;
    left: 0;
    top: 1.2rem;
    color: var(--muted);
    pointer-events: none;
    transition: transform .25s, color .25s;
    transform-origin: left
}

input:focus+label,
input:not(:placeholder-shown)+label,
textarea:focus+label,
textarea:not(:placeholder-shown)+label {
    transform: translateY(-1.2rem) scale(.8);
    color: var(--pop)
}

.contact-form .btn {
    justify-self: start
}

#formStatus {
    min-height: 1.5rem;
    color: var(--muted)
}

#formStatus.error {
    color: #d6264f
}

footer {
    padding-block: 2.5rem;
    color: var(--muted);
    font-size: .9rem
}

/* scroll reveal: only when JS is running */
.js .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .8s, transform .8s cubic-bezier(.2, .9, .2, 1)
}

.js .reveal.in {
    opacity: 1;
    transform: none
}

@keyframes letter {
    to {
        transform: none
    }
}

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(14px)
    }
}

@keyframes pop {
    from {
        opacity: 0;
        transform: scale(.85) translateY(30px)
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

@keyframes scroll {
    to {
        transform: translateX(-50%)
    }
}

@media (prefers-reduced-motion:reduce) {

    *,
    *::before {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important
    }

    h1 .c {
        transform: none
    }

    .js .reveal {
        opacity: 1;
        transform: none
    }

    .words .wd {
        color: var(--ink)
    }
}

@media (max-width:820px) {

    .hero,
    .section,
    .row {
        grid-template-columns: 1fr;
        gap: 1.5rem
    }

    .portrait {
        max-width: 260px;
        order: -1
    }

    .badge {
        width: 100px;
        right: -30px
    }

    .section {
        padding-block: 4rem
    }

    .menu {
        display: block
    }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--bg);
        padding: .5rem clamp(1.5rem, 6vw, 5rem)
    }

    nav.open {
        display: flex
    }

    nav a {
        padding: .8rem 0;
        background: none
    }
}

/* photos */
.arch {
    aspect-ratio: 4/5;
    display: flex;
    align-items: flex-end;
    justify-content: center
}

.arch img {
    width: auto;
    height: 94%;
    max-height: none;
    object-fit: contain;
    transform-origin: bottom
}

.arch:hover img {
    transform: scale(1.05)
}

.wide {
    margin-top: 3rem;
    border-radius: 20px;
    overflow: hidden;
    max-width: 46rem
}

.wide img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 1s
}

.wide:hover img {
    transform: scale(1.03)
}

.gallery {
    padding-block: 5rem 6rem;
    margin-inline: calc(-1*clamp(1.5rem, 6vw, 5rem))
}

.gallery h2 {
    padding-inline: clamp(1.5rem, 6vw, 5rem);
    margin-bottom: 2rem
}

.strip {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 1.5rem clamp(1.5rem, 6vw, 5rem) 2.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent
}

.strip figure {
    flex: 0 0 clamp(220px, 26vw, 320px);
    aspect-ratio: 3/4;
    border-radius: 18px;
    overflow: hidden;
    scroll-snap-align: center;
    transition: transform .5s cubic-bezier(.2, .9, .2, 1)
}

.strip figure:nth-child(odd) {
    transform: rotate(-2.5deg) translateY(10px)
}

.strip figure:nth-child(even) {
    transform: rotate(2deg) translateY(-10px)
}

.strip figure:hover {
    transform: rotate(0) scale(1.04)
}

.strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.js .strip figure.reveal {
    opacity: 0;
    transform: translateY(40px) rotate(0)
}

.js .strip figure.reveal.in {
    opacity: 1
}

.js .strip figure.reveal.in:nth-child(odd) {
    transform: rotate(-2.5deg) translateY(10px)
}

.js .strip figure.reveal.in:nth-child(even) {
    transform: rotate(2deg) translateY(-10px)
}

.js .strip figure.reveal.in:hover {
    transform: rotate(0) scale(1.04)
}

.side {
    position: sticky;
    top: 6rem;
    align-self: start
}

.cutout {
    margin-top: 2rem;
    max-width: 230px;
    background: var(--pop);
    border-radius: 999px 999px 18px 18px;
    padding-top: 1.5rem;
    overflow: hidden
}

.cutout img {
    display: block;
    width: 100%;
    height: auto
}

@media (max-width:820px) {
    .side {
        position: static
    }

    .cutout {
        max-width: 180px
    }
}

/* hero without portrait; about text starts at the left */
.hero {
    grid-template-columns: 1fr
}

h1 {
    max-width: 14ch
}

#about.section {
    grid-template-columns: 1fr;
    gap: 1.5rem
}

#about .big {
    max-width: 34ch
}

/* about: text left, small photo right */
#about.section {
    grid-template-columns: 1fr minmax(160px, 240px);
    column-gap: 3rem;
    row-gap: 1.5rem;
    align-items: start
}

#about h2 {
    grid-column: 1/-1
}

#about .wide {
    margin-top: .5rem;
    max-width: 240px;
    border-radius: 16px
}

@media (max-width:820px) {
    #about.section {
        grid-template-columns: 1fr
    }

    #about .wide {
        max-width: 200px
    }
}

/* hero: text left, photo right */
.hero {
    grid-template-columns: 1.25fr .75fr
}

@media (max-width:820px) {
    .hero {
        grid-template-columns: 1fr
    }
}

/* page scrollbar hidden (scrolling still works) */
html {
    scrollbar-width: none;
    -ms-overflow-style: none
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none
}

/* gallery strip keeps a slim bar so mouse users can scroll it sideways */
.strip {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent}   