@font-face {
    font-family: "GmarketSans";
    src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansLight.woff") format("woff");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "GmarketSans";
    src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansMedium.woff") format("woff");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "GmarketSans";
    src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansBold.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --black: #050505;
    --white: #ffffff;
    --paper: #f4f5f5;
    --silver: #c7ccd0;
    --line: rgba(35, 45, 50, 0.2);
    --deep-sea: #164b59;
    --plum: #8d1747;
    --page-pad: 3rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    overflow-x: hidden;
    background: var(--white);
    color: var(--black);
    font-family: "GmarketSans", "Noto Sans KR", sans-serif;
    word-break: keep-all;
}

body,
button,
a {
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    color: inherit;
    font: inherit;
}

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

.works-progress {
    position: fixed;
    inset: 0 auto auto 0;
    z-index: 10000;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--deep-sea), var(--silver), var(--plum));
}

.floating-language-switch {
    position: fixed;
    top: clamp(0.8rem, 2.2vh, 1.5rem);
    right: clamp(0.8rem, 1.8vw, 1.8rem);
    z-index: 5000;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: clamp(5.6rem, 7.2vw, 6.8rem);
    min-height: 2.5rem;
    padding: 0.2rem;
    overflow: hidden;
    border: 1px solid rgba(126, 136, 142, 0.54);
    border-radius: 999px;
    background: rgba(245, 247, 248, 0.74);
    box-shadow: 0 0.45rem 1.6rem rgba(10, 18, 22, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(1.1rem) saturate(125%);
}

.floating-language-switch a {
    display: grid;
    min-width: 0;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #32383b;
    font-family: "Inter", sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    transition: color 260ms ease, background 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.floating-language-switch a:hover,
.floating-language-switch a:focus-visible {
    border-color: rgba(117, 130, 137, 0.48);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 0 0.8rem rgba(194, 204, 209, 0.62);
    outline: none;
}

.floating-language-switch a.active {
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(145deg, #234c5c 0%, #111719 56%, #050505 100%);
    color: var(--white);
    box-shadow: 0 0.2rem 0.7rem rgba(6, 15, 19, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.works-main-menu {
    position: absolute;
    top: clamp(20px, 3vw, 38px);
    left: clamp(22px, 4.3vw, 70px);
    right: clamp(22px, 4.3vw, 70px);
    z-index: 30;
    display: grid;
    width: min(620px, calc(100% - 12rem));
    grid-template-columns: repeat(5, max-content);
    justify-content: space-between;
    gap: 0.875rem;
}

.works-main-menu a {
    display: inline-flex;
    min-height: 2.25rem;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    font-family: "Inter", sans-serif;
    font-size: clamp(12px, 1vw, 15px);
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    transition: border-color 280ms ease, background 280ms ease, color 280ms ease, box-shadow 280ms ease;
}

.works-main-menu a:hover,
.works-main-menu a:focus-visible {
    border-color: rgba(196, 200, 204, 0.86);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(196, 200, 204, 0.34)), rgba(246, 247, 247, 0.68);
    color: var(--deep-sea);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 0 1.4rem rgba(196, 200, 204, 0.38);
    outline: none;
}

.works-hero {
    position: relative;
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    grid-template-rows: 1fr auto;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0.96) 0 54%, rgba(210, 216, 219, 0.54) 100%),
        var(--white);
}

.works-hero::after {
    position: absolute;
    top: 12%;
    right: -7%;
    width: 44vw;
    height: 44vw;
    border: 1px solid rgba(105, 117, 123, 0.16);
    content: "";
    transform: rotate(24deg);
}

.works-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(20rem, 0.6fr);
    align-items: end;
    gap: 4rem;
    padding: 9rem var(--page-pad) 4rem;
}

.works-hero-title > p,
.archive-heading > div > p,
.works-cta-copy > p {
    margin: 0;
    color: var(--deep-sea);
    font-family: "Inter", sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
}

.works-hero h1 {
    margin: 1.5rem 0 0;
    font-family: "Inter", sans-serif;
    font-size: 11rem;
    font-weight: 800;
    line-height: 0.78;
}

.works-hero-copy {
    align-self: end;
    padding-bottom: 0.2rem;
}

.works-hero-copy p {
    margin: 0;
    color: rgba(5, 5, 5, 0.72);
    font-size: 1rem;
    line-height: 1.85;
}

.works-hero-index {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 18rem minmax(0, 1fr);
    align-items: center;
    gap: 3rem;
    padding: 1.55rem var(--page-pad);
    border-top: 1px solid var(--line);
    background: rgba(248, 249, 249, 0.72);
    backdrop-filter: blur(1rem) saturate(115%);
}

.works-hero-index > p {
    margin: 0;
    color: var(--plum);
    font-family: "Inter", sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
}

.works-hero-index > div {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.works-hero-index span {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.65rem 1rem;
    border-left: 1px solid var(--line);
    line-height: 1.4;
}

.works-hero-index strong {
    font-family: "Inter", sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
}

.works-hero-index small {
    color: rgba(5, 5, 5, 0.54);
    font-size: 0.72rem;
    line-height: 1.55;
}

.works-archive {
    padding: 8rem var(--page-pad) 9rem;
    background: var(--paper);
}

.archive-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 31rem;
    align-items: end;
    gap: 4rem;
    margin-bottom: 4rem;
}

.archive-heading h2 {
    margin: 1.25rem 0 0;
    font-size: 4.8rem;
    font-weight: 700;
    line-height: 1.05;
}

.archive-heading > p {
    margin: 0;
    color: rgba(5, 5, 5, 0.64);
    font-size: 0.92rem;
    line-height: 1.8;
}

.archive-filters {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    margin-bottom: 1.5rem;
    border-top: 1px solid var(--black);
    border-bottom: 1px solid var(--line);
}

.archive-filters button {
    width: 100%;
    min-width: 0;
    padding: 1rem 1.25rem;
    border: 0;
    border-right: 1px solid var(--line);
    background: transparent;
    font-family: "Inter", sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: color 250ms ease, background 250ms ease;
}

.archive-filters button:last-child {
    border-right: 0;
}

.archive-filters button:hover,
.archive-filters button:focus-visible,
.archive-filters button.is-active {
    background: var(--black);
    color: var(--white);
    outline: none;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem 1rem;
}

.project-card {
    --glow-x: 50%;
    --glow-y: 50%;
    position: relative;
    display: grid;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: end;
    gap: 1rem;
    padding: 0 0 0.25rem;
    overflow: hidden;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.project-card[hidden] {
    display: none;
}

.project-media {
    position: relative;
    grid-column: 1 / -1;
    width: 100%;
    aspect-ratio: 4 / 3;
    margin: 0 0 0.2rem;
    overflow: hidden;
    border: 1px solid rgba(104, 115, 121, 0.26);
    border-radius: 0.35rem;
    background: #dfe2e3;
}

.project-media::before {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(112deg, transparent 30%, rgba(255, 255, 255, 0.92) 49%, rgba(205, 212, 216, 0.5) 53%, transparent 70%);
    content: "";
    transform: translateX(-130%);
    transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.project-media::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(255, 255, 255, 0.76), transparent 42%);
    content: "";
    opacity: 0;
    transition: opacity 350ms ease;
}

.project-media img {
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) blur(2px) contrast(0.88) brightness(0.92);
    opacity: 0.78;
    transform: scale(1.035);
    transition: filter 850ms ease, opacity 650ms ease, transform 1100ms cubic-bezier(0.22, 1, 0.36, 1);
}

.project-media-portrait img {
    object-position: center 38%;
}

.project-media-poster {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(218, 222, 224, 0.72));
}

.project-media-poster img {
    object-fit: contain;
    object-position: center;
}

.project-card:hover .project-media::before,
.project-card:focus-visible .project-media::before {
    transform: translateX(130%);
}

.project-card:hover .project-media::after,
.project-card:focus-visible .project-media::after {
    opacity: 0.72;
}

.project-card:hover .project-media img,
.project-card:focus-visible .project-media img {
    filter: grayscale(0) blur(0) contrast(1) brightness(1);
    opacity: 1;
    transform: scale(1.055);
}

.project-card:hover,
.project-card:focus-visible {
    outline: none;
}

.project-card:focus-visible .project-media {
    box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--deep-sea), 0 0 2rem rgba(199, 204, 208, 0.82);
}

.project-number {
    align-self: center;
    color: var(--plum);
    font-family: "Inter", sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
}

.project-info {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.9rem 0;
}

.project-info strong {
    overflow: hidden;
    font-family: "Inter", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-info small {
    color: rgba(5, 5, 5, 0.54);
    font-family: "GmarketSans", "Noto Sans KR", sans-serif;
    font-size: 0.64rem;
    line-height: 1.45;
}

.project-arrow {
    align-self: center;
    font-family: "Inter", sans-serif;
    font-size: 1.35rem;
    transition: transform 300ms ease;
}

.project-card:hover .project-arrow,
.project-card:focus-visible .project-arrow {
    transform: translate(0.2rem, -0.2rem);
}

.works-cta {
    display: grid;
    min-height: 78vh;
    grid-template-columns: minmax(0, 1fr) 22rem;
    align-items: end;
    gap: 4rem;
    padding: 8rem var(--page-pad) 4rem;
    border-top: 1px solid var(--line);
    background: var(--white);
}

.works-cta-copy h2 {
    max-width: 65rem;
    margin: 1.5rem 0 0;
    font-size: 5.5rem;
    font-weight: 700;
    line-height: 1.05;
}

.works-cta-link {
    display: flex;
    min-height: 11rem;
    align-items: flex-end;
    justify-content: space-between;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(196, 202, 206, 0.45));
    box-shadow: inset 0 1px 0 #fff, 0 1rem 3rem rgba(35, 47, 53, 0.1);
    transition: color 300ms ease, background 300ms ease, box-shadow 300ms ease;
}

.works-cta-link:hover,
.works-cta-link:focus-visible {
    background: var(--deep-sea);
    color: var(--white);
    box-shadow: 0 0 2.5rem rgba(22, 75, 89, 0.28);
    outline: none;
}

.works-cta-link span {
    font-size: 1rem;
    font-weight: 700;
}

.works-cta-link strong {
    font-family: "Inter", sans-serif;
    font-size: 2.5rem;
    font-weight: 400;
}

.works-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 7rem;
    padding: 1.5rem var(--page-pad);
    background: var(--black);
    color: var(--white);
}

.works-footer > span {
    font-family: "Inter", sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
}

.works-footer a {
    font-size: 0.72rem;
}

.works-footer small {
    justify-self: end;
    color: rgba(255, 255, 255, 0.56);
    font-family: "Inter", sans-serif;
    font-size: 0.62rem;
}

.project-dialog {
    width: min(90rem, calc(100vw - 3rem));
    max-width: none;
    height: min(47rem, calc(100vh - 3rem));
    max-height: calc(100vh - 3rem);
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(121, 132, 138, 0.55);
    border-radius: 0.5rem;
    background: rgba(246, 248, 248, 0.88);
    box-shadow: 0 2.5rem 7rem rgba(4, 10, 13, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(1.5rem) saturate(120%);
}

.project-dialog::backdrop {
    background: rgba(5, 8, 10, 0.72);
    backdrop-filter: blur(0.4rem);
}

.dialog-layout {
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-columns: minmax(0, 1.65fr) minmax(20rem, 0.55fr);
}

.dialog-media {
    position: relative;
    display: grid;
    margin: 0;
    overflow: hidden;
    background: #dfe2e3;
    place-items: center;
}

.dialog-image-stack {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.dialog-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.dialog-media.is-scroll-gallery {
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    padding: clamp(1.25rem, 2vw, 2rem) 0;
    overscroll-behavior: contain;
    scrollbar-color: rgba(45, 57, 62, 0.48) transparent;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
}

.dialog-media.is-scroll-gallery::-webkit-scrollbar {
    width: 0.55rem;
}

.dialog-media.is-scroll-gallery::-webkit-scrollbar-thumb {
    border: 0.12rem solid transparent;
    border-radius: 999px;
    background: rgba(45, 57, 62, 0.48);
    background-clip: padding-box;
}

.dialog-image-stack.is-scroll-gallery {
    position: static;
    display: flex;
    width: min(58%, 36rem);
    height: auto;
    min-height: 100%;
    margin: 0 auto;
    flex-direction: column;
    gap: clamp(1rem, 1.5vw, 1.5rem);
}

.dialog-media.is-scroll-gallery .dialog-image-stack > img {
    position: static;
    inset: auto;
    width: 100%;
    height: auto;
    max-width: none;
    max-height: none;
    flex: 0 0 auto;
    background: #fff;
    box-shadow: 0 0.9rem 2.2rem rgba(28, 37, 41, 0.13);
    object-fit: contain;
}

.dialog-copy {
    display: flex;
    min-height: 0;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 2rem 2rem;
    border-left: 1px solid var(--line);
}

.dialog-copy > p {
    margin: 0;
    color: var(--plum);
    font-family: "Inter", sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
}

.dialog-thumbnails {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1.25rem 0 auto;
}

.dialog-thumbnail {
    display: grid;
    aspect-ratio: 1 / 0.82;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    border: 2px solid rgba(5, 5, 5, 0.18);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: border-color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.dialog-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
    transition: opacity 180ms ease, transform 220ms ease;
}

.project-dialog.has-scroll-gallery .dialog-thumbnails {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dialog-thumbnail.has-label {
    height: 7.25rem;
    min-height: 0;
    aspect-ratio: auto;
    grid-template-rows: 4.7rem minmax(0, 1fr);
    text-align: left;
}

.dialog-thumbnail.has-label img {
    height: 100%;
    min-height: 0;
}

.dialog-thumbnail.has-label span {
    overflow: hidden;
    padding: 0.55rem 0.5rem 0.5rem;
    color: rgba(5, 5, 5, 0.72);
    font-family: "GmarketSans", "Noto Sans KR", sans-serif;
    font-size: 0.58rem;
    font-weight: 500;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dialog-thumbnail:hover,
.dialog-thumbnail:focus-visible,
.dialog-thumbnail.is-active {
    border-color: var(--plum);
    outline: none;
}

.dialog-thumbnail:hover img,
.dialog-thumbnail:focus-visible img,
.dialog-thumbnail.is-active img {
    opacity: 1;
    transform: scale(1.03);
}

.dialog-copy h2 {
    margin: 0 0 1rem;
    font-family: "Inter", sans-serif;
    font-size: 2.8rem;
    line-height: 1.02;
}

.dialog-copy > span {
    color: rgba(5, 5, 5, 0.58);
    font-family: "Inter", sans-serif;
    font-size: 0.76rem;
}

.dialog-copy > .dialog-description {
    margin: 0.9rem 0 0;
    color: rgba(5, 5, 5, 0.72);
    font-family: "GmarketSans", "Noto Sans KR", sans-serif;
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.65;
}

.dialog-count {
    display: block;
    min-height: 1rem;
    margin-top: 1rem;
    color: rgba(5, 5, 5, 0.46);
    font-family: "Inter", sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
}

.dialog-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 2rem;
    border-top: 1px solid var(--line);
}

.dialog-controls button,
.dialog-close {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.dialog-controls button {
    min-height: 4rem;
    border-right: 1px solid var(--line);
    font-family: "Inter", sans-serif;
    font-size: 1.25rem;
}

.dialog-controls button:last-child {
    border-right: 0;
}

.dialog-controls button:hover,
.dialog-controls button:focus-visible,
.dialog-close:hover,
.dialog-close:focus-visible {
    background: var(--black);
    color: var(--white);
    outline: none;
}

.dialog-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 5;
    display: grid;
    width: 2.8rem;
    height: 2.8rem;
    place-items: center;
    border: 1px solid rgba(5, 5, 5, 0.4);
    background: rgba(255, 255, 255, 0.72);
    font-family: "Inter", sans-serif;
    font-size: 1.5rem;
    backdrop-filter: blur(0.8rem);
}

.works-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 2000;
    display: grid;
    width: 3rem;
    height: 3rem;
    place-items: center;
    border: 1px solid var(--black);
    background: rgba(255, 255, 255, 0.86);
    color: var(--black);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(0.8rem);
    transition: opacity 240ms ease, background 240ms ease, color 240ms ease;
}

.works-top.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.works-top:hover,
.works-top:focus-visible {
    background: var(--black);
    color: var(--white);
    outline: none;
}

.reveal {
    opacity: 0;
    transform: translateY(1.75rem);
    transition: opacity 850ms ease, transform 850ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1280px) {
    :root {
        --page-pad: 2.25rem;
    }

    .works-hero h1 {
        font-size: 9rem;
    }

    .archive-heading h2 {
        font-size: 4rem;
    }

    .works-cta-copy h2 {
        font-size: 4.8rem;
    }

    .archive-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .archive-filters button {
        border-bottom: 1px solid var(--line);
    }

    .archive-filters button:nth-child(3n) {
        border-right: 0;
    }

    .archive-filters button:nth-last-child(-n + 3) {
        border-bottom: 0;
    }
}

@media (max-width: 960px) {
    :root {
        --page-pad: 1.5rem;
    }

    .works-main-menu {
        left: var(--page-pad);
        width: calc(100% - 10rem);
    }

    .works-hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .works-hero-index {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .works-hero-index > div {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .archive-heading {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .archive-heading > p {
        max-width: 35rem;
    }

    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .works-cta {
        grid-template-columns: 1fr;
    }

    .dialog-layout {
        grid-template-columns: minmax(0, 1.35fr) minmax(17rem, 0.65fr);
    }

    .dialog-copy h2 {
        font-size: 2.1rem;
    }

    .works-footer small {
        margin-right: 4rem;
    }
}

@media (max-width: 720px) {
    :root {
        --page-pad: 1.25rem;
    }

    .floating-language-switch {
        top: max(0.75rem, env(safe-area-inset-top));
        right: max(0.75rem, env(safe-area-inset-right));
        width: 5.35rem;
        min-height: 2.3rem;
    }

    .floating-language-switch a {
        font-size: 0.64rem;
    }

    .works-main-menu {
        top: 4.1rem;
        left: var(--page-pad);
        right: var(--page-pad);
        width: auto;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0.125rem;
    }

    .works-main-menu a {
        min-width: 0;
        min-height: 2rem;
        justify-content: center;
        padding: 0.5rem 0.1rem;
        font-size: 0.625rem;
        text-align: center;
    }

    .works-hero {
        min-height: 0;
    }

    .works-hero::after {
        top: 22%;
        right: -28%;
        width: 100vw;
        height: 100vw;
    }

    .works-hero-grid {
        min-height: 74svh;
        align-content: end;
        gap: 2rem;
        padding: 10rem var(--page-pad) 3.5rem;
    }

    .works-hero-title > p {
        max-width: 14rem;
        font-size: 0.62rem;
        line-height: 1.45;
    }

    .works-hero h1 {
        margin-top: 1.2rem;
        font-size: 4.1rem;
        line-height: 0.86;
    }

    .works-hero-copy p {
        font-size: 0.9rem;
        line-height: 1.75;
    }

    .works-hero-copy br {
        display: none;
    }

    .works-hero-index {
        padding: 1.5rem var(--page-pad);
    }

    .works-hero-index > div {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .works-hero-index span {
        padding: 0.8rem 0.7rem;
        border-bottom: 1px solid var(--line);
        font-size: 0.64rem;
    }

    .works-archive {
        padding: 5.5rem var(--page-pad) 6rem;
    }

    .archive-heading {
        margin-bottom: 2.5rem;
    }

    .archive-heading h2 {
        font-size: 2.7rem;
        line-height: 1.1;
    }

    .archive-heading > p {
        font-size: 0.85rem;
        line-height: 1.78;
    }

    .archive-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-bottom: 0;
    }

    .archive-filters button {
        padding: 0.9rem 1rem;
        border-right: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        font-size: 0.62rem;
    }

    .archive-filters button:nth-child(even) {
        border-right: 0;
    }

    .archive-filters button:nth-last-child(-n + 3) {
        border-bottom: 1px solid var(--line);
    }

    .archive-filters button:last-child {
        grid-column: 1 / -1;
        border-right: 0;
        border-bottom: 0;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .project-info strong {
        font-size: 0.98rem;
    }

    .works-cta {
        min-height: 0;
        gap: 2.5rem;
        padding: 6rem var(--page-pad) 2.5rem;
    }

    .works-cta-copy h2 {
        font-size: 3rem;
        line-height: 1.08;
    }

    .works-cta-link {
        min-height: 9rem;
        padding: 1.25rem;
    }

    .works-footer {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 1.4rem 1rem;
        min-height: 0;
        padding: 1.6rem var(--page-pad);
    }

    .works-footer small {
        grid-column: 1 / -1;
        justify-self: start;
        margin-right: 0;
        line-height: 1.5;
    }

    .project-dialog {
        width: calc(100vw - 1.5rem);
        height: calc(100svh - 1.5rem);
        max-height: calc(100svh - 1.5rem);
    }

    .dialog-layout {
        min-height: 0;
        height: 100%;
        max-height: calc(100svh - 1.5rem);
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) auto;
        overflow: hidden;
    }

    .dialog-image-stack.is-scroll-gallery {
        width: min(92%, 30rem);
        gap: 0.8rem;
    }

    .dialog-copy {
        min-height: 0;
        max-height: none;
        overflow: hidden;
        padding: 1.5rem;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .dialog-copy h2 {
        font-size: 1.9rem;
    }

    .dialog-copy > p {
        margin-bottom: 1rem;
    }

    .dialog-thumbnails {
        grid-template-columns: repeat(3, minmax(4.25rem, 1fr));
        gap: 0.55rem;
        margin: 0 0 1.5rem;
    }

    .project-dialog.has-scroll-gallery .dialog-thumbnails {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.4rem;
        margin-bottom: 1rem;
    }

    .dialog-thumbnail.has-label {
        height: auto;
        min-height: 0;
        aspect-ratio: 1 / 0.86;
        grid-template-rows: 1fr;
    }

    .dialog-thumbnail.has-label span {
        display: none;
    }

    .project-dialog.has-scroll-gallery .dialog-copy h2 {
        margin-bottom: 0.5rem;
        font-size: 1.45rem;
    }

    .project-dialog.has-scroll-gallery .dialog-copy > .dialog-description {
        margin-top: 0.55rem;
        font-size: 0.66rem;
        line-height: 1.5;
    }

    .project-dialog.has-scroll-gallery .dialog-count {
        margin-top: 0.55rem;
    }

    .project-dialog.has-scroll-gallery .dialog-controls {
        margin-top: 0.75rem;
    }

    .dialog-controls {
        margin-top: 1.25rem;
    }

    .dialog-close {
        top: 0.75rem;
        right: 0.75rem;
    }

    .works-top {
        right: 0.75rem;
        bottom: 0.75rem;
        width: 2.75rem;
        height: 2.75rem;
    }
}

@media (max-width: 380px) {
    .works-main-menu a {
        font-size: 0.57rem;
    }

    .works-hero h1 {
        font-size: 3.8rem;
    }

    .archive-heading h2 {
        font-size: 2.45rem;
    }

    .works-cta-copy h2 {
        font-size: 2.7rem;
    }
}

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

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

    .project-media::before,
    .project-media img,
    .project-arrow {
        transition: none;
    }
}
