:root {
    --portfolio-white: #f7f6f2;
    --portfolio-muted: #717171;
    --portfolio-line: #d3d2ce;
    --portfolio-accent: #ff5b35;
    --portfolio-font: "Inter", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--portfolio-white);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 20rem;
    font-family: var(--portfolio-font);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: 0;
}

body.portfolio-body {
    background: var(--portfolio-white);
    color: #151515;
}

body.portfolio-light {
    background: var(--portfolio-white);
    color: #151515;
}

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

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible {
    outline: 0.15rem solid var(--portfolio-accent);
    outline-offset: 0.3rem;
}

.portfolio-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    color: #fff;
    border-bottom: 0.08rem solid transparent;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.portfolio-header.is-scrolled,
.portfolio-light .portfolio-header {
    color: #151515;
    background: rgba(247, 246, 242, 0.94);
    border-bottom-color: var(--portfolio-line);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.portfolio-home .portfolio-header {
    color: #151515;
    background: rgba(247, 246, 242, 0.94);
    border-bottom-color: var(--portfolio-line);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.portfolio-header.is-scrolled .portfolio-brand span,
.portfolio-light .portfolio-brand span,
.portfolio-home .portfolio-brand span {
    color: #686868;
}

.portfolio-nav {
    min-height: 4.75rem;
    padding: 1rem clamp(1rem, 2.6vw, 2.75rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.portfolio-brand {
    flex: 0 0 auto;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

.portfolio-brand span {
    margin-left: 0.4rem;
    color: rgba(255, 255, 255, 0.62);
    font-family: var(--portfolio-font);
    font-size: 12px;
    font-weight: 500;
}

.portfolio-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(0.75rem, 1.8vw, 1.8rem);
}

.portfolio-links a {
    position: relative;
    padding: 0.4rem 0;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.38;
}

.portfolio-links a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 0.08rem;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 180ms ease;
}

.portfolio-links a:hover::after,
.portfolio-links a[aria-current="page"]::after {
    transform: scaleX(1);
    transform-origin: left;
}

.topic-rail {
    display: none;
}

.home-hero,
.series-hero,
.work-panel {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.home-hero {
    min-height: 88svh;
    background: var(--portfolio-white);
}

.home-hero > img,
.series-hero > img,
.work-panel > img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.home-hero::after,
.series-hero::after,
.work-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 28%, rgba(0, 0, 0, 0.76) 100%);
}

.home-hero::after {
    display: none;
}

.home-hero-copy,
.series-hero-copy,
.work-panel-copy {
    position: absolute;
    right: clamp(1rem, 3.5vw, 3.75rem);
    bottom: clamp(2rem, 6vh, 4.5rem);
    left: clamp(1rem, 3.5vw, 3.75rem);
}

.home-kicker,
.series-kicker,
.work-kicker,
.page-kicker {
    margin: 0 0 0.7rem;
    font-family: var(--portfolio-font);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.38;
    letter-spacing: 0;
}

.home-kicker,
.series-kicker,
.work-kicker {
    color: #fff;
}

.home-kicker {
    color: #686868;
}

.home-hero h1,
.series-hero h1,
.work-panel h3 {
    margin: 0;
    max-width: 15ch;
    color: #fff;
    font-size: clamp(2.6rem, 7vw, 7rem);
    font-weight: 500;
    line-height: 0.95;
}

.home-hero h1 {
    max-width: none;
    color: #151515;
    font-size: 9rem;
    line-height: 0.88;
    white-space: nowrap;
}

.home-location,
.series-summary,
.work-summary {
    margin: 1rem 0 0;
    max-width: 38rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(0.9rem, 1.15vw, 1.08rem);
    line-height: 1.5;
}

.home-location {
    color: #4f4f4f;
}

.work-panel {
    display: block;
    min-height: 82svh;
    border-top: 0.08rem solid rgba(255, 255, 255, 0.18);
    text-decoration: none;
}

.work-group {
    background: var(--portfolio-white);
}

.work-group-header {
    min-height: 15rem;
    padding: 3.5rem clamp(1rem, 3.5vw, 3.75rem);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    color: #151515;
    border-top: 0.08rem solid var(--portfolio-line);
}

.work-group-header p,
.work-group-header h2 {
    margin: 0;
}

.work-group-header p {
    color: #686868;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.38;
}

.work-group-header h2 {
    font-size: 4rem;
    font-weight: 500;
    line-height: 0.95;
}

.work-panel:hover > img {
    transform: scale(1.018);
}

.work-panel-number {
    display: inline-block;
    margin-bottom: 1.2rem;
    color: rgba(255, 255, 255, 0.62);
    font-family: var(--portfolio-font);
    font-size: 12px;
    font-weight: 500;
}

.series-hero {
    min-height: 100svh;
}

.series-gallery {
    background: var(--portfolio-white);
}

.series-status {
    margin: 0;
    padding: 2rem;
    color: #686868;
    font-family: var(--portfolio-font);
    font-size: 12px;
    text-align: center;
}

.series-status[hidden] {
    display: none;
}

.series-photo {
    min-height: 88svh;
    margin: 0;
    padding: clamp(0.65rem, 2vw, 2rem);
    display: grid;
    place-items: center;
    background: var(--portfolio-white);
}

.series-photo a {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
}

.series-photo img {
    width: 100%;
    max-height: 92svh;
    object-fit: contain;
}

.series-photo figcaption {
    width: 100%;
    margin-top: 0.65rem;
    color: #686868;
    font-family: var(--portfolio-font);
    font-size: 12px;
    line-height: 1.38;
}

.series-info {
    padding: clamp(4rem, 8vw, 8rem) clamp(1rem, 3.5vw, 3.75rem);
    display: grid;
    grid-template-columns: minmax(16rem, 0.9fr) minmax(20rem, 1.1fr);
    gap: clamp(2.5rem, 8vw, 8rem);
    background: var(--portfolio-white);
    border-bottom: 0.08rem solid var(--portfolio-line);
}

.series-info-kicker {
    margin: 0 0 1rem;
    color: #686868;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.38;
}

.series-info h2 {
    max-width: 10ch;
    margin: 0;
    font-size: clamp(2.6rem, 6vw, 5.5rem);
    font-weight: 500;
    line-height: 0.95;
}

.series-info-copy {
    max-width: 46rem;
}

.series-info-copy > p {
    margin: 0;
    font-size: 22.2px;
    font-weight: 500;
    line-height: 1.35;
}

.series-info-facts {
    margin: 2.5rem 0 0;
    border-top: 0.08rem solid var(--portfolio-line);
}

.series-info-facts div {
    padding: 1rem 0;
    display: grid;
    grid-template-columns: minmax(7rem, 0.32fr) minmax(0, 1fr);
    gap: 1rem;
    border-bottom: 0.08rem solid var(--portfolio-line);
}

.series-info-facts dt,
.series-info-facts dd {
    margin: 0;
}

.series-info-facts dt {
    color: #686868;
    font-size: 12px;
    font-weight: 500;
}

.series-info-link {
    display: inline-block;
    margin-top: 2rem;
    font-weight: 500;
    text-decoration-thickness: 0.08rem;
    text-underline-offset: 0.25rem;
}

.series-navigation {
    padding: clamp(3rem, 7vw, 7rem) clamp(1rem, 3.5vw, 3.75rem);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    border-top: 0.08rem solid var(--portfolio-line);
}

.series-navigation a {
    text-decoration: none;
}

.series-navigation span {
    display: block;
    margin-bottom: 0.6rem;
    color: #686868;
    font-family: var(--portfolio-font);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.38;
}

.series-navigation strong {
    font-size: clamp(1.5rem, 3vw, 3rem);
    font-weight: 500;
}

.page-main {
    width: min(100% - 2rem, 78rem);
    margin: 0 auto;
    padding: clamp(8rem, 14vw, 11rem) 0 clamp(4rem, 8vw, 8rem);
}

.page-intro {
    max-width: 58rem;
}

.page-intro h1 {
    margin: 0;
    font-size: clamp(2.6rem, 7vw, 6.5rem);
    font-weight: 500;
    line-height: 0.95;
}

.page-lead {
    max-width: 46rem;
    margin: 1.5rem 0 0;
    color: #4f4f4f;
    font-size: 22.2px;
    font-weight: 500;
    line-height: 1.27;
}

.about-layout {
    margin-top: clamp(3rem, 7vw, 7rem);
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: start;
}

.about-portrait {
    margin: 0;
}

.about-portrait img {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
}

.about-copy {
    max-width: 42rem;
}

.about-copy p {
    margin: 0 0 1.5rem;
    font-size: 22.2px;
    font-weight: 500;
    line-height: 1.27;
}

.about-facts,
.simple-sections {
    margin-top: clamp(3rem, 7vw, 6rem);
    border-top: 0.08rem solid #bcbcb8;
}

.about-fact,
.simple-section {
    padding: 1.4rem 0;
    display: grid;
    grid-template-columns: minmax(9rem, 0.32fr) minmax(0, 1fr);
    gap: 1.5rem;
    border-bottom: 0.08rem solid #bcbcb8;
}

.about-fact dt,
.simple-section h2,
.simple-section h3 {
    margin: 0;
    font-family: var(--portfolio-font);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.38;
}

.about-equipment {
    margin-top: clamp(4rem, 8vw, 8rem);
    padding-top: clamp(3rem, 6vw, 6rem);
    border-top: 0.08rem solid var(--portfolio-line);
}

.about-equipment > h2 {
    margin: 0;
    font-size: clamp(2.6rem, 7vw, 6.5rem);
    font-weight: 500;
    line-height: 0.95;
}

.about-equipment > .page-lead {
    margin-top: 1.5rem;
}

.about-equipment .simple-sections {
    margin-top: clamp(2.5rem, 5vw, 4rem);
}

.about-fact dd,
.simple-section p,
.simple-section ul {
    margin: 0;
    max-width: 42rem;
    line-height: 1.7;
}

.simple-section ul {
    padding-left: 1.2rem;
}

.simple-section li + li {
    margin-top: 0.5rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    padding: 0;
    list-style: none;
}

.social-links li + li {
    margin-top: 0;
}

.text-link,
.contact-email {
    text-decoration-thickness: 0.08rem;
    text-underline-offset: 0.25rem;
}

.equipment-code {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.7rem 0.9rem;
    border: 0.08rem solid var(--portfolio-line);
    font-size: 14px;
    font-weight: 500;
}

.equipment-code[hidden] {
    display: none;
}

.contact-email {
    display: inline-block;
    margin-top: clamp(2.5rem, 5vw, 5rem);
    font-size: clamp(1.25rem, 3.2vw, 3rem);
    font-weight: 500;
}

.portfolio-footer {
    padding: 2.5rem clamp(1rem, 2.6vw, 2.75rem);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: #686868;
    border-top: 0.08rem solid var(--portfolio-line);
    font-family: var(--portfolio-font);
    font-size: 12px;
    line-height: 1.38;
}

.portfolio-light .portfolio-footer {
    color: #686868;
    border-top-color: var(--portfolio-line);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem 1rem;
}

@media (min-width: 1600px) {
    .home-hero h1 {
        font-size: 12rem;
    }
}

@media screen {
    .topic-rail {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 45;
        width: 2.5rem;
        height: 100svh;
        display: block;
        overflow: hidden;
        color: #fff;
        background: transparent;
        border: 0;
        backdrop-filter: blur(0);
        -webkit-backdrop-filter: blur(0);
        transform: translateX(calc(-100% + 1.2rem));
        transition: transform 340ms cubic-bezier(0.22, 1, 0.36, 1), background-color 180ms ease, backdrop-filter 180ms ease;
    }

    .topic-rail.is-visible {
        background: rgba(12, 12, 12, 0.32);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        transform: translateX(0);
    }

    .topic-rail-trigger {
        position: absolute;
        top: 50%;
        right: 0;
        z-index: 2;
        width: 1.2rem;
        height: 4rem;
        padding: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
        transform: translateY(-50%);
    }

    .topic-rail-trigger::after {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0.22rem;
        height: 2.8rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.82);
        box-shadow: 0 0 0 0.06rem rgba(0, 0, 0, 0.24);
        content: "";
        transform: translate(-50%, -50%);
        transition: opacity 180ms ease, transform 240ms ease;
    }

    .topic-rail.is-visible .topic-rail-trigger::after {
        opacity: 0.24;
        transform: translate(-50%, -50%) scaleY(0.58);
    }

    .topic-rail-track {
        --topic-rail-drift: 0px;
        position: absolute;
        top: 50%;
        left: 50%;
        display: flex;
        flex-direction: row;
        align-items: center;
        color: #fff;
        font-size: 10px;
        line-height: 1;
        opacity: 0;
        visibility: hidden;
        white-space: nowrap;
        writing-mode: vertical-rl;
        text-orientation: mixed;
        transform: translate(-50%, calc(-50% + var(--topic-rail-drift)));
        transition: transform 240ms ease-out, opacity 120ms ease, visibility 0s linear 340ms;
    }

    .topic-rail.is-visible .topic-rail-track {
        opacity: 1;
        visibility: visible;
        transition-delay: 0s, 90ms, 0s;
    }

    .topic-rail a {
        display: inline;
        color: #fff;
        opacity: 0.7;
        font-size: inherit;
        line-height: inherit;
        text-decoration: none;
        transition: color 160ms ease, opacity 160ms ease;
    }

    .topic-rail a:not(:last-child)::after {
        margin: 0.42rem 0;
        display: inline-block;
        color: rgba(255, 255, 255, 0.52);
        content: "-";
        font-weight: 400;
    }

    .topic-rail a:hover,
    .topic-rail a[aria-current="location"] {
        color: #fff;
        opacity: 1;
    }

    .topic-rail a[aria-current="location"] {
        font-weight: 600;
    }
}

@media (max-height: 820px) {
    .topic-rail-track {
        font-size: 9px;
    }
}

@media (min-width: 2400px) {
    .home-hero h1 {
        font-size: 15rem;
    }
}

@media (min-width: 3200px) {
    .home-hero h1 {
        font-size: 21rem;
    }
}

@media (max-width: 1100px) {
    .home-hero h1 {
        font-size: 6.5rem;
    }
}

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

    .about-copy {
        max-width: 46rem;
    }
}

@media (max-width: 760px) {
    .topic-rail {
        display: none;
        top: 4.4rem;
        bottom: 0;
        height: auto;
    }

    .portfolio-nav {
        min-height: 4.4rem;
        padding: 0.8rem 1rem;
        gap: 0.8rem;
    }

    .portfolio-brand {
        font-size: 14px;
    }

    .portfolio-brand span {
        display: none;
    }

    .portfolio-links {
        gap: 0.72rem;
    }

    .portfolio-links a {
        font-size: 12px;
    }

    .portfolio-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-links {
        justify-content: flex-start;
    }

    .home-hero {
        min-height: 82svh;
    }

    .series-hero h1,
    .work-panel h3 {
        font-size: clamp(2.55rem, 13vw, 4.5rem);
    }

    .home-hero h1 {
        font-size: 5rem;
        line-height: 0.92;
        white-space: normal;
    }

    .work-panel {
        min-height: 70svh;
    }

    .work-group-header {
        min-height: 11rem;
        padding: 2.5rem 1rem;
        align-items: flex-start;
        flex-direction: column;
        justify-content: flex-end;
        gap: 0.8rem;
    }

    .work-group-header h2 {
        font-size: 2.5rem;
    }

    .series-hero {
        min-height: 76svh;
    }

    .series-info {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .series-info h2 {
        font-size: 2.6rem;
    }

    .series-info-copy > p {
        font-size: 18px;
        line-height: 1.4;
    }

    .series-photo {
        min-height: 0;
        padding: 0.4rem 0;
    }

    .series-photo img {
        max-height: none;
    }

    .series-photo figcaption {
        padding: 0 0.85rem 0.5rem;
    }

    .series-navigation {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-lead,
    .about-copy p {
        font-size: 18px;
        line-height: 1.4;
    }

    .about-fact,
    .simple-section {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
