/* ===== Base ===== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    margin: 0;
    background: var(--color-paper);
    color: var(--color-ink);
    font-family: var(--font-sans);
    font-size: var(--text-md);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Faint paper grain over everything, so flat fills read like a sheet of drawing paper. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 100;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: .09;
    pointer-events: none;
    mix-blend-mode: multiply;
}

button,
input {
    font: inherit;
    color: inherit;
}

button {
    -webkit-appearance: none;
    appearance: none;
}

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

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1;
}

p {
    margin: 0;
}

a {
    color: var(--color-indigo);
}

a:focus-visible,
button:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

[hidden] {
    display: none !important;
}

.no-scroll {
    overflow: hidden;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* Small mono label, like the tag on a gallery wall. */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--color-sienna);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: .16em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: currentColor;
}

/* Sketchbook margin notes. */
.hand-note {
    color: var(--color-sienna);
    font-family: var(--font-hand);
    font-size: var(--text-hand);
    font-weight: 500;
    line-height: 1.1;
}

/* ===== Motion ===== */

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .7s ease, transform .7s ease;
}

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

/* ===== Buttons ===== */

/* Poster-print buttons: square corners, ink outline, hard offset shadow. */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 22px;
    border: 2px solid var(--color-ink);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-hard);
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, background-color .2s ease, color .2s ease;
}

.btn:hover {
    box-shadow: 6px 6px 0 var(--color-ink);
    transform: translate(-2px, -2px);
}

.btn:active {
    box-shadow: 1px 1px 0 var(--color-ink);
    transform: translate(3px, 3px);
}

.btn-primary {
    background: var(--color-indigo);
    color: var(--color-mat);
}

.btn-gold {
    background: var(--color-gold);
    color: var(--color-ink);
}

.btn-ghost {
    background: var(--color-mat);
    color: var(--color-ink);
}

.btn-sm {
    padding: 7px 14px;
    box-shadow: 3px 3px 0 var(--color-ink);
    font-size: var(--text-sm);
}

.btn-sm:hover {
    box-shadow: 4px 4px 0 var(--color-ink);
}

/* ===== Header ===== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--color-paper) 90%, transparent);
    border-bottom: 2px solid var(--color-ink);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 70px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-ink);
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: -0.03em;
    text-decoration: none;
    white-space: nowrap;
}

.brand__mark {
    width: 34px;
    height: 34px;
    transform: rotate(-6deg);
    transition: transform .3s ease;
}

.brand:hover .brand__mark {
    transform: rotate(6deg);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.site-nav__link {
    color: var(--color-ink);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: .14em;
    text-decoration: none;
    text-transform: uppercase;
    background: linear-gradient(var(--color-gold), var(--color-gold)) 0 88% / 0 40% no-repeat;
    transition: background-size .25s ease;
}

.site-nav__link:hover {
    background-size: 100% 40%;
}

/* ===== Intro ===== */

.intro {
    overflow: hidden;
    padding: 64px 0 112px;
}

.intro__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 56px;
    align-items: center;
}

.intro__hello {
    transform: rotate(-3deg);
    transform-origin: left bottom;
}

.intro__title {
    margin-top: 14px;
    font-size: var(--text-hero);
    font-weight: 600;
    line-height: .92;
}

/* Hand-drawn marigold underline under the key phrase. */
.scribble {
    position: relative;
    display: inline-block;
    isolation: isolate;
    color: var(--color-indigo);
    font-weight: 400;
}

.scribble__line {
    position: absolute;
    left: -2%;
    bottom: -.12em;
    z-index: -1;
    width: 104%;
    height: .32em;
    color: var(--color-gold);
}

.intro__lede {
    max-width: 44ch;
    margin-top: 32px;
    color: var(--color-muted);
    font-size: var(--text-lg);
}

.intro__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 34px;
}

/* Mediums as little colored swatches, one per paint. */
.intro__mediums {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin: 48px 0 0;
    padding: 0;
    color: var(--color-ink);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: .1em;
    list-style: none;
    text-transform: uppercase;
}

.intro__mediums li {
    display: flex;
    align-items: center;
    gap: 9px;
}

.intro__mediums li::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--color-ink);
    border-radius: 50% 45% 55% 50%;
    background: var(--color-gold);
}

.intro__mediums li:nth-child(5n + 2)::before {
    background: var(--color-rose);
}

.intro__mediums li:nth-child(5n + 3)::before {
    background: var(--color-indigo);
}

.intro__mediums li:nth-child(5n + 4)::before {
    background: var(--color-sage);
}

.intro__mediums li:nth-child(5n + 5)::before {
    background: var(--color-sienna);
}

/* The hero hangs in front of a big painted sun. */
.intro__art {
    position: relative;
    isolation: isolate;
}

.intro__art::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: -1;
    width: min(118%, 640px);
    aspect-ratio: 1;
    border-radius: 48% 52% 50% 50%;
    background:
        radial-gradient(circle at 35% 30%, var(--color-gold-soft), transparent 60%),
        var(--color-gold);
    transform: translate(-46%, -54%);
}

/* ===== Artwork frames ===== */

.hero-art,
.feature {
    margin: 0;
}

.hero-art__frame,
.feature__frame,
.work-card {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    text-align: left;
}

/* A matted print, taped to the wall at a slight angle. */
.hero-art__frame {
    position: relative;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    padding: 14px;
    background: var(--color-mat);
    box-shadow: var(--shadow-lift);
    transform: rotate(2deg);
    transition: transform .4s ease;
}

.hero-art__frame:hover {
    transform: rotate(0deg) scale(1.01);
}

.hero-art__frame::before,
.hero-art__frame::after {
    content: "";
    position: absolute;
    z-index: 1;
    width: 92px;
    height: 26px;
    background: color-mix(in srgb, var(--color-paper-deep) 72%, transparent);
    box-shadow: 0 1px 2px rgba(31, 29, 36, .12);
}

.hero-art__frame::before {
    top: -12px;
    left: -24px;
    transform: rotate(-32deg);
}

.hero-art__frame::after {
    right: -24px;
    bottom: -10px;
    transform: rotate(-28deg);
}

.hero-art__img {
    width: auto;
    height: auto;
    max-height: 66vh;
}

.hero-art .art-placeholder {
    width: min(420px, 80vw);
    aspect-ratio: 4 / 5;
}

/* The hero's label is a handwritten note pinned below it. */
.hero-art .art-caption {
    justify-content: center;
    gap: 0 12px;
    padding-top: 26px;
    transform: rotate(-1.5deg);
}

.hero-art .art-caption__title {
    font-family: var(--font-hand);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0;
}

.hero-art .art-caption__meta {
    font-family: var(--font-hand);
    font-size: 22px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--color-ink);
}

.art-caption {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 14px;
    padding: 16px 2px 0;
}

.art-caption__no {
    flex-basis: 100%;
    color: var(--color-gold);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: .16em;
}

.art-caption__title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.art-caption__meta {
    color: var(--color-muted);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* Shown until a piece's photos are added. */
.art-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 100%;
    min-height: 180px;
    padding: 24px;
    background:
        repeating-linear-gradient(-45deg, transparent 0 10px, rgba(31, 29, 36, .04) 10px 11px),
        var(--color-paper-deep);
    color: var(--color-muted);
    text-align: center;
}

.art-placeholder__title {
    color: var(--color-ink);
    font-family: var(--font-hand);
    font-size: 26px;
}

.art-placeholder__note {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* ===== Section heads ===== */

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 40px;
    margin-bottom: 48px;
}

.section-head__title {
    margin-top: 14px;
    font-size: var(--text-display);
}

.section-head__hint {
    max-width: 34ch;
    color: var(--color-muted);
    font-family: var(--font-hand);
    font-size: 24px;
    line-height: 1.15;
}

/* ===== Selected work: an evening gallery wall ===== */

.featured {
    position: relative;
    padding: 104px 0 120px;
    background:
        radial-gradient(ellipse at 85% 0%, rgba(77, 86, 180, .35), transparent 55%),
        var(--color-indigo-deep);
    color: var(--color-mat);
    scroll-margin-top: 70px;
}

.featured .eyebrow {
    color: var(--color-gold);
}

.featured .section-head__hint {
    color: var(--color-gold-soft);
}

.featured .art-caption__meta {
    color: rgba(252, 250, 246, .66);
}

/* Each frame keeps its piece's shape; widths follow the shapes so a row shares one height.
   Every other piece hangs a little lower, like a salon wall. */
.featured__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 56px 44px;
}

.feature {
    --ratio: .8;
    flex: var(--ratio) 1 calc(var(--ratio) * 300px);
    min-width: 0;
    max-width: calc(var(--ratio) * 520px);
}

.feature:nth-child(even) {
    margin-top: 56px;
}

.feature__frame {
    aspect-ratio: var(--ratio);
    padding: 10px;
    background: var(--color-mat);
    box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .7);
    transition: transform .3s ease, box-shadow .3s ease;
}

.feature__frame:hover {
    box-shadow: 10px 10px 0 var(--color-gold), 0 24px 50px -18px rgba(0, 0, 0, .7);
    transform: translate(-4px, -4px);
}

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

/* ===== Portfolio ===== */

.work {
    padding: 104px 0 112px;
    scroll-margin-top: 70px;
}

/* Filters read like index tabs; the active one gets a marigold highlighter swipe. */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 26px;
    margin-bottom: 48px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--color-ink);
}

.filter-btn {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 4px 2px;
    border: 0;
    background: linear-gradient(var(--color-gold), var(--color-gold)) 0 85% / 0 45% no-repeat;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: background-size .25s ease;
}

.filter-btn:hover {
    background-size: 100% 45%;
}

.filter-btn__count {
    color: var(--color-sienna);
    font-size: var(--text-xs);
}

.filter-btn[aria-pressed="true"] {
    background-size: 100% 45%;
}

/* Masonry columns, so every piece shows uncropped at its own proportions. */
.gallery {
    columns: 3 300px;
    column-gap: 40px;
}

.work-card {
    margin-bottom: 52px;
    break-inside: avoid;
}

.work-card__frame {
    display: block;
    padding: 10px;
    background: var(--color-mat);
    box-shadow: var(--shadow-print);
    transform: rotate(var(--tilt, 0deg));
    transition: transform .35s ease, box-shadow .35s ease;
}

.work-card:nth-child(4n + 1) {
    --tilt: -.8deg;
}

.work-card:nth-child(4n + 2) {
    --tilt: .6deg;
}

.work-card:nth-child(4n + 3) {
    --tilt: -.4deg;
}

.work-card:nth-child(4n + 4) {
    --tilt: 1deg;
}

.work-card:hover .work-card__frame {
    box-shadow: var(--shadow-lift);
    transform: rotate(0deg) translateY(-6px);
}

.work-card__img {
    width: 100%;
    height: auto;
}

.work-card .art-placeholder {
    aspect-ratio: 4 / 5;
}

.work-card__body {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 2px 0;
}

.work-card__title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.work-card__count {
    flex: none;
    color: var(--color-sienna);
    font-family: var(--font-hand);
    font-size: 20px;
}

.work-card__meta {
    display: block;
    padding: 4px 2px 0;
    color: var(--color-muted);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* ===== About ===== */

.about {
    padding: 104px 0 120px;
    background: var(--color-paper-deep);
    border-top: 2px solid var(--color-ink);
    scroll-margin-top: 70px;
}

.about__grid {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: 24px 72px;
}

.about__pull {
    max-width: 14ch;
    margin-top: 36px;
    font-size: clamp(32px, 3.4vw, 44px);
    transform: rotate(-2deg);
}

.about__body {
    display: grid;
    gap: 20px;
    max-width: 60ch;
    padding-top: 34px;
    font-size: var(--text-lg);
}

/* ===== Contact: a marigold poster ===== */

.contact {
    position: relative;
    overflow: hidden;
    padding: 112px 0 40px;
    background: var(--color-gold);
    border-top: 2px solid var(--color-ink);
    color: var(--color-indigo-deep);
    scroll-margin-top: 70px;
}

/* A rising indigo sun in the corner. */
.contact::before {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -220px;
    width: 520px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--color-indigo);
    opacity: .12;
}

.contact .container {
    position: relative;
}

.contact .eyebrow {
    color: var(--color-indigo-deep);
}

.contact__title {
    max-width: 14ch;
    margin-top: 16px;
    font-size: var(--text-hero);
    line-height: .92;
}

.contact__lede {
    max-width: 46ch;
    margin-top: 26px;
    font-size: var(--text-lg);
}

.contact__links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 38px;
}

.contact__link {
    background: var(--color-mat);
    color: var(--color-ink);
    overflow-wrap: anywhere;
}

.contact__link--primary {
    background: var(--color-indigo);
    color: var(--color-mat);
}

.contact__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    margin-top: 104px;
    padding-top: 20px;
    border-top: 2px solid var(--color-indigo-deep);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: .06em;
    text-transform: uppercase;
}

.contact__credit {
    color: inherit;
    text-underline-offset: 3px;
}

.contact__legal {
    max-width: 78ch;
    margin-top: 12px;
    color: color-mix(in srgb, var(--color-indigo-deep) 78%, transparent);
    font-size: var(--text-xs);
    line-height: 1.5;
}

/* ===== Viewer ===== */

.lightbox {
    width: min(1080px, 100vw - 24px);
    max-width: none;
    max-height: none;
    padding: 0;
    border: 2px solid var(--color-ink);
    border-radius: var(--radius);
    background: var(--color-paper);
    color: var(--color-ink);
    box-shadow: 8px 8px 0 var(--color-gold);
    overflow: hidden;
}

.lightbox::backdrop {
    background: rgba(22, 25, 64, .86);
}

.lightbox__header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px 14px 22px;
    border-bottom: 2px solid var(--color-ink);
}

.lightbox__title {
    flex: 1;
    font-size: var(--text-xl);
}

.lightbox__counter {
    color: var(--color-muted);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-variant-numeric: tabular-nums;
}

.lightbox__close,
.lightbox__nav {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 2px solid var(--color-ink);
    border-radius: var(--radius-sm);
    background: var(--color-mat);
    cursor: pointer;
    line-height: 1;
}

.lightbox__close:hover,
.lightbox__nav:hover {
    background: var(--color-gold);
}

/* Dark, neutral stage so the artwork's own colors read true. */
.lightbox__stage {
    position: relative;
    background: var(--color-viewer);
}

.lightbox__track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.lightbox__track::-webkit-scrollbar {
    display: none;
}

.lightbox__slide {
    position: relative;
    flex: 0 0 100%;
    height: min(72vh, 760px);
    margin: 0;
    padding: 16px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.lightbox__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lightbox__slide .art-placeholder {
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .6);
}

.lightbox__slide .art-placeholder__title {
    color: #fff;
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    font-size: 22px;
    transform: translateY(-50%);
}

.lightbox__nav:disabled {
    opacity: .35;
    cursor: default;
}

.lightbox__nav--prev {
    left: 12px;
}

.lightbox__nav--next {
    right: 12px;
}

.lightbox__info {
    display: grid;
    gap: 4px;
    padding: 14px 22px 18px;
    border-top: 2px solid var(--color-ink);
    font-size: var(--text-sm);
}

.lightbox__meta {
    color: var(--color-muted);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: .06em;
    text-transform: uppercase;
}

.lightbox__note {
    color: var(--color-sienna);
    font-family: var(--font-hand);
    font-size: 22px;
    line-height: 1.2;
}

.lightbox__desc {
    max-width: 70ch;
    margin-top: 4px;
    font-size: var(--text-md);
}

.lightbox__info p:empty {
    display: none;
}

/* ===== Responsive ===== */

@media (max-width: 900px) {
    .intro {
        padding: 44px 0 88px;
    }

    .intro__grid,
    .about__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 72px;
    }

    .about__grid {
        gap: 8px;
    }

    .about__pull {
        max-width: none;
        margin-top: 24px;
    }

    .about__body {
        padding-top: 24px;
    }

    .feature:nth-child(even) {
        margin-top: 0;
    }
}

@media (max-width: 560px) {
    :root {
        --gutter: 16px;
    }

    .brand {
        font-size: var(--text-lg);
    }

    .site-nav {
        gap: 14px;
    }

    .site-nav__link {
        display: none;
    }

    .intro__art::before {
        width: 112%;
    }

    .hero-art__frame {
        padding: 10px;
    }

    .hero-art__img {
        max-height: 58vh;
    }

    .featured,
    .work,
    .about {
        padding: 72px 0 88px;
    }

    .lightbox__slide {
        height: min(60vh, 560px);
        padding: 8px;
    }

    .contact {
        padding-top: 80px;
    }

    .contact__link {
        width: 100%;
    }
}

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

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .btn,
    .brand__mark,
    .hero-art__frame,
    .feature__frame,
    .work-card__frame {
        transition: none;
    }
}
