/* Portfolio refinement: hierarchy, editorial pacing and usable navigation. */

:root {
    --editorial-ink: #141637;
}

html:has(body.project-page),
body.project-page {
    overflow-x: clip;
}

.portfolio-banner-home .portfolio-banner-copy {
    padding-right: 12px;
}

.portfolio-banner-home h1 {
    font-size: clamp(68px, 9cqw, 110px);
    line-height: 0.92;
}

.portfolio-banner-home .banner-introduction {
    display: block;
    margin-top: 18px;
    max-width: 26ch;
    font-size: 16px;
    line-height: 1.5;
}

.project-info {
    padding-top: 0;
}

.projects .project-info {
    --caption-title-size: 18px;
    --caption-category-size: 12px;
}

.projects .project-info h3 {
    font-size: var(--caption-title-size);
}

.projects .project-info > span:not(.project-company):not(.project-number) {
    font-size: var(--caption-category-size);
}

.editorial-link {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    font-size: 17px;
    font-weight: 600;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding: 8px 0;
}

.editorial-link:hover {
    color: #ae421f;
}

.all-work-link {
    display: flex;
    justify-content: center;
    margin: 34px 0 0;
}

.all-work-link .editorial-link {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 124px;
    height: 124px;
    box-sizing: border-box;
    padding: 16px;
    border: 0;
    border-radius: 50%;
    gap: 0;
    background: var(--brand-orange, #d34e24);
    color: #fff;
    text-align: center;
    font-size: 19px;
    line-height: 1.2;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.all-work-link .editorial-link:hover {
    background: var(--brand-indigo, #101334);
    color: #fff;
}

.all-work-link .editorial-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 5px;
}

.home-invitation {
    margin: 90px 0 20px;
    padding: 40px 0;
    border-top: 1px solid #dcdce1;
    max-width: 780px;
}

.eyebrow {
    display: block;
    font-size: 11px;
    letter-spacing: 0.13em;
    margin-bottom: 20px;
}

.home-invitation h2 {
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 50px);
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin: 0 0 20px;
    max-width: 20ch;
}

.home-invitation p {
    max-width: 53ch;
    line-height: 1.7;
    margin: 0 0 20px;
}

.project-facts {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 18px 26px;
    margin: 0 0 32px;
    padding: 18px 0;
    border-top: 1px solid #dcdce1;
    border-bottom: 1px solid #dcdce1;
}

.project-facts dt {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 6px;
}

.project-facts dd {
    font-size: 12px;
    line-height: 1.6;
    margin: 0;
}

[data-project='iron'] .project-facts {
    border-color: #444;
}

.project-page .case-title h1 {
    font-size: clamp(42px, 5.5vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.project-page .case-title {
    padding-bottom: 24px;
}

.project-page .case-section-heading h2 {
    font-size: clamp(26px, 2.7vw, 36px);
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.opening-object {
    margin: 0 0 44px;
    width: 100%;
}

.opening-object img {
    display: block;
    width: 100%;
    max-height: 600px;
    object-fit: contain;
}

body[data-project='pinball'] .opening-object img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
}

body[data-project='hairdryer'] .opening-object img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
}

[data-project='melo'] .melo-hero-photo {
    margin: 0 0 36px;
}

[data-project='melo'] .melo-hero-photo img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
}

[data-project='melo'] .melo-intro {
    padding-top: 0;
}

[data-project='melo'] .melo-project-meta {
    margin-top: 24px;
}

[data-project='melo'] .melo-section {
    padding-top: 48px;
    padding-bottom: 48px;
}

[data-project='iron'] .iron-final-render {
    filter: brightness(1.35);
}

[data-project='pinball'] .case-title h1,
[data-project='pinball'] h2 {
    color: var(--project-accent) !important;
}

[data-project='pinball'] .case-year,
[data-project='pinball'] .case-type {
    color: var(--project-accent) !important;
}

.case-actions {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    margin-top: 35px;
}

.practice-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 26px 0 38px;
}

.practice-strip figure {
    margin: 0;
}

.practice-strip img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.practice-strip figcaption {
    font-size: 12px;
    padding-top: 10px;
}

body[data-page='about'] .software-tools {
    gap: 20px;
    justify-content: flex-start;
}

body[data-page='about'] .software-tools img {
    width: 32px;
    height: 32px;
}

body[data-page='about'] .software-heading {
    font-size: 15px;
}

.translated-title {
    font-size: 0.8em;
    font-weight: 400;
}

.prototype-reading {
    font-size: 14px;
    line-height: 1.7;
    max-width: 65ch;
    margin: 14px 0 34px;
    color: #505057;
}

[data-project='clock'] .clock-room-grid img {
    object-fit: contain;
    height: 360px;
    aspect-ratio: auto;
    background: #f5f1e9;
}

.editorial-case-section {
    margin: 50px 0;
}

.editorial-case-section h2 {
    color: #836221;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.15;
    margin: 0 0 20px;
    letter-spacing: -0.035em;
}

.editorial-case-section p {
    max-width: 68ch;
    line-height: 1.8;
}

.editorial-wide {
    display: block;
    width: 100%;
    height: auto;
    margin: 26px 0;
}

.clock-room-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
}

.clock-room-grid figure {
    margin: 0;
}

.clock-room-grid img {
    width: 100%;
    aspect-ratio: 1.3;
    object-fit: cover;
}

.clock-room-grid figcaption {
    font-size: 14px;
    line-height: 1.7;
    margin-top: 15px;
}

.clock-room-grid figcaption strong {
    display: block;
}

.clock-plan-link {
    color: inherit;
    text-decoration: none;
}

.original-boards {
    border-top: 1px solid #ddd;
    padding-top: 22px;
    margin: 45px 0;
}

.original-boards summary {
    cursor: pointer;
    font-size: 14px;
}

.clock-original-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 22px;
}

.clock-original-grid img {
    width: 100%;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 3px solid #a54320;
    outline-offset: 5px;
}

@media (max-width: 650px) {
    .portfolio-banner-home h1 {
        font-size: 64px;
        margin-bottom: 15px;
    }

    .portfolio-banner-home .banner-introduction {
        font-size: 15px;
        margin-top: 12px;
        max-width: 30ch;
    }

.portfolio-banner-work .banner-art {
        height: 125px;
    }

.portfolio-banner-copy {
        padding-bottom: 14px;
    }

    .home-invitation {
        margin-top: 55px;
        padding-top: 28px;
    }

    .project-facts {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 24px;
        padding: 16px 0;
    }

    .project-facts > div {
        display: grid;
        grid-template-columns: 90px 1fr;
        gap: 12px;
    }

    .project-facts dt {
        margin-top: 2px;
    }

    .project-page .case-title h1 {
        font-size: clamp(30px, 9vw, 48px);
        overflow-wrap: anywhere;
        white-space: normal;
    }

    body[data-project='toko'] .case-title .toko-logo-title {
        display: flex !important;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        margin: 0;
        font-size: clamp(27px, 8vw, 44px) !important;
        white-space: normal !important;
        transform: none !important;
    }

    body[data-project='toko'] .toko-heading-logo {
        width: 100px !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 !important;
    }

    body[data-project='toko'] .toko-logo-title span {
        display: block;
        max-width: 100%;
        font-size: inherit;
        letter-spacing: -0.04em;
    }

    .opening-object {
        margin-bottom: 28px;
    }

    .opening-object img {
        max-height: 350px;
    }

    .practice-strip {
        gap: 10px;
    }

    .practice-strip figcaption {
        font-size: 11px;
    }

    .clock-room-grid {
        grid-template-columns: 1fr;
    }

    .clock-original-grid {
        grid-template-columns: 1fr;
    }

    .case-actions {
        gap: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation: none !important;
        transition: none !important;
    }
}

/* Align the two time-of-day photos with the full-width photograph below. */

body.project-page[data-project='sundial'] .sundial-action-gallery {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

body.project-page[data-project='sundial'] .sundial-action-gallery figure {
    min-width: 0;
    margin: 0;
}

body.project-page[data-project='sundial'] .sundial-action-gallery img {
    width: 100%;
}

/* Slightly stronger closing slogan for Toy Set. */

body[data-project='combo'] .combo-play-slogan {
    font-size: clamp(43px, 6.6vw, 96px);
}

@media (max-width: 640px) {
    body[data-project='combo'] .combo-play-slogan {
        font-size: clamp(30px, 8vw, 52px);
    }
}

/* Let prototype captions use the full photo-row width. */

[data-project='toko'] .prototype-reading {
    max-width: none;
    width: 100%;
    text-wrap: pretty;
}

/* Inset the paired time photos on tablet; retain full-width photos on mobile. */

@media (min-width: 651px) and (max-width: 1000px) {
    body.project-page[data-project='sundial'] .sundial-action-gallery {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 650px) {
    body.project-page[data-project='sundial'] .sundial-action-gallery figcaption {
        margin-left: var(--project-gutter, 20px);
        margin-right: var(--project-gutter, 20px);
    }
}

body.pointer-navigation :is(.project-link, .next-project-card):focus {
    outline: none;
}

@media (max-width: 1000px) {
    body[data-project='pinball'] .opening-object {
        width: calc(100% + 2 * var(--project-gutter, 35px));
        max-width: none;
        margin-left: calc(-1 * var(--project-gutter, 35px));
        margin-right: calc(-1 * var(--project-gutter, 35px));
    }

    body[data-project='pinball'] .opening-object img {
        display: block;
        width: 100%;
        height: auto;
        max-width: none;
        max-height: none;
    }
}

body[data-project='pinball'] .pinball-opening-layout {
    align-items: start;
    margin: 0 0 48px;
}

body[data-project='pinball'] .pinball-opening-layout .opening-object {
    max-width: none;
}

.pinball-opening-copy {
    padding-top: 28px;
    min-width: 0;
}

.pinball-opening-copy p {
    font-size: 16px;
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 650px) {
    body[data-project='pinball'] .pinball-opening-layout {
        gap: 18px;
    }

    body[data-project='pinball'] .pinball-opening-layout .opening-object {
        margin-inline: calc(-1 * var(--project-gutter, 20px));
    }

    .pinball-opening-copy {
        padding-top: 0;
    }
}

@media (min-width: 651px) and (max-width: 1000px) {
    body[data-project='pinball'] .pinball-opening-layout .opening-object {
        width: calc(100% + var(--project-gutter, 35px));
        margin-left: calc(-1 * var(--project-gutter, 35px));
        margin-right: 0;
    }
}

@media (max-width: 650px) {
    body[data-project='pinball'] .pinball-opening-layout .opening-object {
        width: calc(100% + 2 * var(--project-gutter, 20px));
        margin-left: calc(-1 * var(--project-gutter, 20px));
        margin-right: calc(-1 * var(--project-gutter, 20px));
    }
}

body[data-project='pinball'] .pinball-opening-layout .opening-object img {
    transform-origin: 35% 20%;
}

@media (max-width: 650px) {
    body[data-project='pinball'] .pinball-opening-layout {
        grid-template-columns: 1fr;
    }
}

/* Let the copy overlap the transparent part of the opening photograph. */

body[data-project='pinball'] .pinball-opening-layout {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    isolation: isolate;
    gap: 0;
}

body[data-project='pinball'] .pinball-opening-layout .opening-object {
    grid-area: 1 / 1;
    width: 100%;
    margin: 0;
    overflow: visible;
    align-self: start;
    z-index: 0;
}

body[data-project='pinball'] .pinball-opening-layout .opening-object img {
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: contain;
}

body[data-project='pinball'] .pinball-opening-copy {
    grid-area: 1 / 1;
    z-index: 1;
    justify-self: end;
    align-self: start;
    padding-top: 28px;
}

@media (max-width: 1000px) {
    body[data-project='pinball'] .pinball-opening-layout .opening-object {
        width: calc(100% + 2 * var(--project-gutter, 35px));
        margin-left: calc(-1 * var(--project-gutter, 35px));
        margin-right: calc(-1 * var(--project-gutter, 35px));
    }
}

@media (max-width: 650px) {
    body[data-project='pinball'] .pinball-opening-copy {
        padding-top: 0;
    }

    .pinball-opening-copy p {
        font-size: clamp(11px, 2.8vw, 15px);
        line-height: 1.5;
    }
}

body[data-project='pinball'] .pinball-opening-layout .opening-object img {
    width: 94%;
}

body[data-project='pinball'] .pinball-opening-copy {
    width: 40%;
}

@media (max-width: 650px) {
    body[data-project='pinball'] .pinball-opening-copy {
        width: 48%;
    }
}

body[data-project='pinball'] .pinball-opening-layout .opening-object img {
    transform: translateX(-3%);
}

/* Reduce the gap before Pinball design development. */

body[data-project='pinball'] .pinball-opening-layout {
    margin-bottom: -120px;
}

/* Mobile introduction: full-width copy above the Pinball image. */

@media (max-width: 650px) {
    body[data-project='pinball'] .pinball-opening-layout {
        display: flex;
        flex-direction: column;
        gap: 20px;
        margin-bottom: 20px;
    }

    body[data-project='pinball'] .pinball-opening-copy {
        order: -1;
        width: 100%;
        padding-top: 0;
        align-self: stretch;
    }

    body[data-project='pinball'] .pinball-opening-copy p {
        font-size: 16px;
        line-height: 1.7;
        margin: 0;
    }
}


/* A compact introduction sits above the clear right side of the photograph. */
@media (min-width: 651px) and (max-width: 1300px) {
    body[data-project='pinball'] .pinball-opening-layout {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    body[data-project='pinball'] .pinball-opening-copy {
        order: -1;
        width: 52%;
        min-width: 320px;
        max-width: 420px;
        padding-top: 0;
        transform: translateY(40px);
        align-self: flex-end;
    }
    body[data-project='pinball'] .pinball-opening-copy p {
        margin: 0;
    }
    body[data-project='pinball'] .pinball-opening-layout .opening-object {
        margin-top: -48px;
    }
}

/* Keep the open navigation above the home banner and inside the viewport. */
@media (max-width: 1000px) {
    body .mobile-menu.open { position: fixed; inset: 0; width: 100%; height: 100dvh; max-height: 100dvh; box-sizing: border-box; z-index: 10000; padding: 80px 20px 35px; overflow-y: auto; justify-content: safe center; }
    body .mobile-menu.open > a { flex-shrink: 0; }
    body .mobile-header:has(+ .mobile-menu.open) { position: fixed; inset: 0 0 auto; height: 75px; padding: 20px 35px; box-sizing: border-box; z-index: 10001; background: transparent; }
    body:has(.mobile-menu.open) { overflow: hidden; }
}
@media (max-width: 1000px) and (max-height: 500px) {
    body .mobile-menu.open { padding-top: 65px; padding-bottom: 20px; gap: 2px; }
}

/* Slightly reduce the identity mark in mobile navigation. */
@media (max-width: 1000px) {
    body .mobile-header .profile-placeholder .personal-logo {
        transform: scale(1.05);
    }
}