:root {
    --color-ink: #202024;
    --color-muted: #5f6065;
    --color-paper: #fafaf8;
    --color-surface: #ffffff;
    --color-chrome: #2d2d30;
    --color-chrome-deep: #242427;
    --color-on-dark: #f4f4f2;
    --color-border: #d8d8d4;
    --color-focus: #ffbf47;
    --content-width: 74rem;
    --text-width: 48rem;
    --space-1: 0.5rem;
    --space-2: 0.75rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 2rem;
    --space-6: clamp(2.5rem, 6vw, 5.5rem);
    --header-height: 4.25rem;
}

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

html {
    color-scheme: light;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
    min-width: 20rem;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--color-paper);
    color: var(--color-ink);
    font: 400 1rem/1.75 Lato, system-ui, -apple-system, "Segoe UI", sans-serif;
    text-rendering: optimizeLegibility;
}

form#siteForm {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
    outline: none;
}

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

a {
    color: inherit;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
}

a:hover {
    text-decoration-thickness: 0.14em;
}

button,
input,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 0.2rem solid var(--color-focus);
    outline-offset: 0.2rem;
}

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

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.75rem 1rem;
    transform: translateY(-150%);
    background: var(--color-surface);
    color: var(--color-ink);
}

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

.site-header {
    position: sticky;
    z-index: 100;
    top: 0;
    min-height: var(--header-height);
    background: rgba(45, 45, 48, 0.97);
    color: var(--color-on-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-nav {
    width: min(100%, var(--content-width));
    min-height: var(--header-height);
    margin-inline: auto;
    padding-inline: clamp(1rem, 3vw, 2rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    font-family: Montserrat, system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.site-brand {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    font-size: clamp(0.78rem, 2.6vw, 0.95rem);
    font-weight: 500;
    text-decoration: none;
}

.nav-toggle,
.projects-toggle {
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
    width: 1.25rem;
    height: 1px;
    display: block;
    background: currentColor;
    transition: transform 180ms ease;
}

.nav-toggle__icon {
    position: relative;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
    position: absolute;
    left: 0;
    content: "";
}

.nav-toggle__icon::before {
    top: -0.38rem;
}

.nav-toggle__icon::after {
    top: 0.38rem;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after {
    top: 0;
    transform: rotate(-45deg);
}

.nav-panel {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    padding: 0.5rem clamp(1rem, 3vw, 2rem) 1.25rem;
    background: var(--color-chrome);
}

.nav-panel.is-open {
    display: block;
}

.nav-list,
.projects-list,
.social-links,
.gallery-track {
    padding: 0;
    margin: 0;
    list-style: none;
}

.nav-list a,
.projects-toggle {
    width: 100%;
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    padding: 0.65rem;
    border: 0;
    color: var(--color-on-dark);
    font-size: 0.78rem;
    text-decoration: none;
}

.nav-list a:hover,
.nav-list a[aria-current="page"],
.projects-toggle:hover {
    background: rgba(255, 255, 255, 0.09);
}

.projects-toggle::after {
    content: "＋";
    margin-left: auto;
}

.projects-toggle[aria-expanded="true"]::after {
    content: "−";
}

.projects-list {
    display: none;
    padding-left: 1rem;
}

.projects-list.is-open {
    display: block;
}

.page-shell {
    width: min(100%, var(--content-width));
    margin-inline: auto;
    padding: var(--space-6) clamp(1rem, 4vw, 2rem);
}

.text-page {
    width: min(100%, var(--text-width));
}

.page-title {
    margin: 0 0 clamp(2rem, 5vw, 4rem);
    color: var(--color-ink);
    font-family: Montserrat, system-ui, sans-serif;
    font-size: clamp(1.3rem, 4vw, 2rem);
    font-weight: 400;
    letter-spacing: clamp(0.14em, 1vw, 0.35em);
    line-height: 1.3;
    text-align: center;
    text-transform: uppercase;
}

.section-title {
    margin: var(--space-6) 0 var(--space-4);
    font-family: Montserrat, system-ui, sans-serif;
    font-size: clamp(1rem, 3vw, 1.25rem);
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.prose p,
.prose li {
    max-width: 72ch;
}

.prose ul {
    padding-left: 1.25rem;
}

.prose li + li {
    margin-top: 0.85rem;
}

.portrait {
    width: clamp(8rem, 22vw, 12rem);
    margin: 0 auto var(--space-5);
    border-radius: 50%;
}

.hero {
    position: relative;
    min-height: calc(100vh - var(--header-height));
    min-height: calc(100svh - var(--header-height));
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #161619;
}

.home-slider__viewport,
.home-slide {
    position: absolute;
    inset: 0;
}

.home-slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s ease, visibility 0s linear 1.2s;
}

.home-slide.is-active {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.home-slide img {
    width: 100%;
    height: calc(100vh - var(--header-height));
    height: calc(100svh - var(--header-height));
    object-fit: cover;
    object-position: center;
    filter: grayscale(1);
}

.series-intro {
    max-width: 46rem;
    margin: calc(-1 * clamp(1rem, 2vw, 2rem)) auto var(--space-5);
    text-align: center;
}

.concept-button,
.button,
.gallery-button {
    min-height: 2.75rem;
    border: 1px solid var(--color-ink);
    border-radius: 0;
    background: var(--color-ink);
    color: var(--color-on-dark);
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease;
}

.concept-button,
.button {
    padding: 0.7rem 1.15rem;
}

.concept-button:hover,
.button:hover,
.gallery-button:hover {
    background: var(--color-surface);
    color: var(--color-ink);
}

.concept-dialog {
    width: min(calc(100% - 2rem), 42rem);
    max-height: calc(100dvh - 2rem);
    padding: clamp(1.25rem, 4vw, 2.5rem);
    border: 0;
    background: var(--color-paper);
    color: var(--color-ink);
    box-shadow: 0 1rem 4rem rgba(0, 0, 0, 0.3);
}

.concept-dialog::backdrop {
    background: rgba(15, 15, 17, 0.76);
}

.no-js .concept-button,
.no-js .dialog-close {
    display: none;
}

.no-js .concept-dialog:not([open]) {
    position: static;
    width: min(100%, 42rem);
    max-height: none;
    display: block;
    margin: var(--space-5) auto;
    box-shadow: none;
}

.dialog-close {
    position: sticky;
    top: 0;
    float: right;
    min-width: 2.75rem;
    min-height: 2.75rem;
    border: 1px solid var(--color-ink);
    background: var(--color-paper);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

.concept-dialog h2 {
    font-family: Montserrat, system-ui, sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.art-gallery {
    margin-top: var(--space-5);
}

.gallery-toolbar {
    width: min(100%, var(--content-width));
    margin: 0 auto var(--space-3);
    padding-inline: clamp(1rem, 4vw, 2rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.gallery-instructions,
.gallery-status {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.88rem;
}

.gallery-controls {
    display: flex;
    gap: 0.5rem;
}

.gallery-button {
    width: 2.75rem;
    padding: 0;
    font-size: 1.35rem;
}

.gallery-viewport {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-color: var(--color-muted) transparent;
    scrollbar-width: thin;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
}

.gallery-track {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    width: max-content;
    padding: 0 clamp(1rem, 4vw, 4rem) var(--space-4);
}

.gallery-item {
    width: min(84vw, 64rem);
    flex: 0 0 auto;
    scroll-snap-align: center;
}

.gallery-item figure {
    margin: 0;
}

.gallery-item--portrait {
    width: min(74vw, 38rem);
}

.gallery-item--square {
    width: min(80vw, 44rem);
}

.gallery-item a {
    display: block;
    background: #eeeeeb;
}

.gallery-item img {
    width: 100%;
    max-height: calc(100svh - 12rem);
    object-fit: contain;
}

.gallery-item figcaption {
    padding-top: 0.6rem;
    color: var(--color-muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-align: right;
    text-transform: uppercase;
}

.field-grid {
    display: grid;
    gap: var(--space-4);
}

.field label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.required-note {
    color: var(--color-muted);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid #737378;
    border-radius: 0;
    background: var(--color-surface);
    color: var(--color-ink);
}

textarea.form-control {
    min-height: 10rem;
    resize: vertical;
}

.validation-summary,
.form-message {
    margin-block: var(--space-3);
    padding: 0.85rem 1rem;
    border-left: 0.3rem solid #a32626;
    background: #fff1f1;
    color: #681717;
}

.form-message--success {
    border-color: #28723e;
    background: #eff9f1;
    color: #174e28;
}

.field-validation {
    display: block;
    margin-top: 0.3rem;
    color: #8a1d1d;
    font-size: 0.88rem;
}

.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.site-footer {
    padding: 2.5rem clamp(1rem, 4vw, 2rem);
    background: var(--color-chrome);
    color: var(--color-on-dark);
    font-family: Montserrat, system-ui, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.back-to-top {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    padding-inline: 0.75rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-links a {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 48rem) {
    .field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (min-width: 64rem) {
    .nav-toggle {
        display: none;
    }

    .nav-panel {
        position: static;
        display: block;
        padding: 0;
        background: transparent;
    }

    .nav-list {
        display: flex;
        align-items: center;
    }

    .nav-projects {
        position: relative;
    }

    .projects-toggle {
        width: auto;
    }

    .projects-list {
        position: absolute;
        z-index: 110;
        top: 100%;
        left: 0;
        min-width: 15rem;
        padding: 0.4rem;
        background: var(--color-chrome);
        box-shadow: 0 0.8rem 1.5rem rgba(0, 0, 0, 0.18);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media (forced-colors: active) {
    .nav-toggle,
    .projects-toggle,
    .concept-button,
    .button,
.gallery-button {
        border: 1px solid ButtonText;
    }
}

.gallery-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
