:root {
    color-scheme: light;
    --bg: #f7f7f4;
    --surface: #ffffff;
    --text: #111214;
    --muted: #65686f;
    --faint: #92959b;
    --rule: #d8d9d5;
    --rule-strong: #aeb0ad;
    --accent: #4d57c8;
    --accent-soft: #eceefe;
    --success: #20764a;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --container: 1200px;
    --page-gutter: clamp(1.5rem, 5vw, 4.5rem);
    --section-space: clamp(4rem, 8vw, 7.5rem);
    --transition: 160ms ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5.5rem;
}

body {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.nav-open {
    overflow: hidden;
}

::selection {
    background: var(--accent);
    color: #fff;
}

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

img {
    height: auto;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    color: inherit;
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.24em;
}

a:hover {
    color: var(--accent);
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
    margin: 0;
}

h1,
h2,
h3,
h4 {
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

ul,
ol {
    margin-top: 0;
}

.container {
    width: 100%;
    max-width: calc(var(--container) + (var(--page-gutter) * 2));
    margin-inline: auto;
    padding-inline: var(--page-gutter);
}

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

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 0.75rem;
    left: 0.75rem;
    transform: translateY(-160%);
    padding: 0.65rem 0.9rem;
    background: var(--text);
    color: #fff;
    font-size: 0.875rem;
    text-decoration: none;
    transition: transform var(--transition);
}

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

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.overline,
.page-index,
.profile-index,
.section-label > p,
.case-row__meta,
.cs-meta,
.breadcrumb,
.experiment-item__meta {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
}

/* Header */
.site-header {
    position: sticky;
    z-index: 100;
    top: 0;
    height: 4.5rem;
    border-bottom: 1px solid var(--rule);
    background: rgba(247, 247, 244, 0.94);
    backdrop-filter: blur(12px);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.site-name,
.logo {
    color: var(--text);
    font-size: 0.925rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.logo span {
    color: inherit;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 3vw, 2.5rem);
}

.nav-links a {
    position: relative;
    color: var(--muted);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition);
}

.nav-links a::after {
    position: absolute;
    right: 0;
    bottom: -0.55rem;
    left: 0;
    height: 1px;
    transform: scaleX(0);
    transform-origin: left;
    background: currentColor;
    content: "";
    transition: transform var(--transition);
}

.nav-links a:hover,
.nav-links a.active,
.nav-links a[aria-current="page"] {
    color: var(--text);
}

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

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
}

.nav-toggle__mark {
    position: relative;
    display: block;
    width: 1.25rem;
    height: 0.75rem;
}

.nav-toggle__mark::before,
.nav-toggle__mark::after {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--text);
    content: "";
    transition: transform var(--transition), top var(--transition);
}

.nav-toggle__mark::before {
    top: 0.15rem;
}

.nav-toggle__mark::after {
    top: 0.55rem;
}

body.nav-open .nav-toggle__mark::before {
    top: 0.36rem;
    transform: rotate(45deg);
}

body.nav-open .nav-toggle__mark::after {
    top: 0.36rem;
    transform: rotate(-45deg);
}

/* Shared links and controls */
.inline-link,
.text-link,
.footer-back-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--rule-strong);
    transition: color var(--transition), text-decoration-color var(--transition);
}

.inline-link:hover,
.text-link:hover,
.footer-back-link:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

.inline-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    border: 1px solid var(--text);
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}

.btn:hover {
    background: var(--text);
    color: #fff;
}

.btn-primary {
    background: var(--text);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
}

/* Home / profile */
.profile-intro {
    padding-block: clamp(4.5rem, 8vw, 7.5rem) var(--section-space);
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(6rem, 1fr) minmax(0, 6fr) minmax(12rem, 2.2fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}

.profile-index {
    padding-top: 0.45rem;
}

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

.profile-copy .overline {
    margin-bottom: 1.35rem;
}

.profile-copy h1 {
    max-width: 14.5em;
    font-size: clamp(2.35rem, 4vw, 2.75rem);
}

.profile-summary {
    max-width: 42rem;
    margin-top: 2rem;
    color: #383a3f;
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    line-height: 1.65;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
    margin-top: 2.2rem;
    font-size: 0.8125rem;
}

.profile-meta a {
    font-weight: 500;
}

.availability {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--success);
    font-weight: 500;
}

.availability > span {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 50%;
    background: currentColor;
}

.profile-portrait {
    width: min(100%, 16rem);
    justify-self: end;
}

.profile-portrait img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center 18%;
    filter: saturate(0.82);
}

.profile-portrait figcaption {
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 0.725rem;
    line-height: 1.5;
}

.anchor-alias {
    position: absolute;
    transform: translateY(-6rem);
}

.resume-section {
    position: relative;
}

.ruled-section {
    display: grid;
    grid-template-columns: minmax(10rem, 2fr) minmax(0, 8fr);
    gap: clamp(2rem, 6vw, 6rem);
    padding-block: var(--section-space);
    border-top: 1px solid var(--rule);
}

.section-label {
    display: grid;
    align-content: start;
    gap: 1rem;
}

.section-label h2 {
    font-size: 1.25rem;
}

.resume-list {
    min-width: 0;
}

.resume-entry {
    padding-bottom: clamp(3rem, 5vw, 4.75rem);
}

.resume-entry + .resume-entry,
.education-entry {
    padding-top: clamp(3rem, 5vw, 4.75rem);
    border-top: 1px solid var(--rule);
}

.resume-entry:last-child {
    padding-bottom: 0;
}

.resume-entry__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: start;
}

.resume-entry__header h3 {
    font-size: clamp(1.4rem, 2vw, 1.75rem);
}

.resume-entry__header p {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.875rem;
}

.resume-entry__header time {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.resume-entry ul {
    max-width: 52rem;
    margin-block: 1.75rem 1.35rem;
    padding-left: 1.2rem;
    color: #36383d;
}

.resume-entry li {
    margin-top: 0.7rem;
    padding-left: 0.45rem;
}

.resume-entry--project > p {
    max-width: 50rem;
    margin-block: 1.5rem 1.25rem;
    color: #36383d;
}

.capability-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 3.5rem;
}

.capability-list article {
    padding-block: 1.65rem 2rem;
    border-top: 1px solid var(--rule);
}

.capability-list article:nth-child(-n + 2) {
    padding-top: 0;
    border-top: 0;
}

.capability-list h3 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.capability-list p {
    color: var(--muted);
    font-size: 0.9rem;
}

.answer-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 3.5rem;
}

.answer-list > div {
    padding-block: 1.65rem 2rem;
    border-top: 1px solid var(--rule);
}

.answer-list > div:nth-child(-n + 2) {
    padding-top: 0;
    border-top: 0;
}

.answer-list dt {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.45;
}

.answer-list dd {
    margin: 0.75rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

.education-entry .overline {
    margin-bottom: 1rem;
}

.education-entry h3 {
    font-size: 1.35rem;
}

.education-entry > p:last-child {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.875rem;
}

.explore-section {
    padding-block: var(--section-space);
    border-top: 1px solid var(--rule);
}

.section-label--standalone {
    grid-template-columns: minmax(6rem, 1fr) 8fr;
    gap: clamp(2rem, 6vw, 6rem);
    margin-bottom: 3rem;
}

.explore-list {
    border-top: 1px solid var(--text);
}

.explore-list a {
    display: grid;
    grid-template-columns: minmax(10rem, 2fr) minmax(0, 7fr) 1fr;
    gap: 2rem;
    align-items: center;
    min-height: 7rem;
    border-bottom: 1px solid var(--rule);
    color: var(--text);
    text-decoration: none;
    transition: color var(--transition), padding-inline var(--transition);
}

.explore-list a:hover {
    padding-inline: 0.75rem;
    color: var(--accent);
}

.explore-list span {
    font-size: clamp(1.3rem, 2vw, 1.75rem);
    font-weight: 500;
    letter-spacing: -0.03em;
}

.explore-list small {
    color: var(--muted);
    font-size: 0.875rem;
}

.explore-list b {
    justify-self: end;
    font-size: 1.25rem;
    font-weight: 400;
}

.contact-section {
    padding-block: var(--section-space);
    background: var(--text);
    color: #fff;
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(6rem, 1fr) minmax(0, 5fr) minmax(12rem, 2fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: start;
}

.contact-grid > .overline {
    color: #a7a8aa;
}

.contact-grid h2 {
    max-width: 15em;
    font-size: clamp(2rem, 3.5vw, 2.75rem);
}

.contact-grid > div:nth-child(2) p {
    max-width: 38rem;
    margin-top: 1.5rem;
    color: #bbbcbf;
}

.contact-links {
    display: grid;
    justify-items: start;
    gap: 0.9rem;
    font-size: 0.875rem;
}

.contact-links a {
    color: inherit;
}

.contact-links a:hover {
    color: #bfc3ff;
}

.email-line {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #3f4043;
}

.email-copy-btn {
    padding: 0;
    border: 0;
    background: transparent;
    color: #a7a8aa;
    cursor: pointer;
    font-size: 0.75rem;
}

.email-copy-btn:hover {
    color: #fff;
}

/* Shared page intro */
.page-intro {
    padding-block: clamp(4.5rem, 8vw, 7.5rem);
}

.page-intro__grid {
    display: grid;
    grid-template-columns: minmax(10rem, 2fr) minmax(0, 8fr);
    gap: clamp(2rem, 6vw, 6rem);
}

.page-index {
    padding-top: 0.5rem;
}

.page-intro .overline {
    margin-bottom: 1.25rem;
}

.page-intro h1 {
    max-width: 16em;
    font-size: clamp(2.35rem, 4vw, 2.75rem);
}

.page-intro__grid > div > p:last-child {
    max-width: 44rem;
    margin-top: 1.6rem;
    color: var(--muted);
    font-size: 1.05rem;
}

/* Case-study index */
.case-index {
    padding-bottom: var(--section-space);
}

.case-index > .container {
    border-top: 1px solid var(--text);
}

.case-row {
    display: grid;
    grid-template-columns: minmax(15rem, 4fr) minmax(2rem, 0.65fr) minmax(0, 5.35fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    padding-block: clamp(3rem, 6vw, 5.5rem);
    border-bottom: 1px solid var(--rule);
}

.case-row__media {
    display: block;
    align-self: start;
    overflow: hidden;
    background: #e9e9e5;
}

.case-row__media img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    transition: transform 450ms ease;
}

.case-row__media:hover img {
    transform: scale(1.015);
}

.case-row__media--text {
    display: grid;
    align-content: space-between;
    aspect-ratio: 3 / 2;
    padding: clamp(1.25rem, 3vw, 2.25rem);
    background: var(--text);
    color: #fff;
    text-decoration: none;
    transition: background-color 180ms ease;
}

.case-row__media--text:hover {
    background: var(--accent);
}

.case-row__media--text small {
    font-size: 0.675rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.case-row__media--text strong {
    max-width: 7ch;
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 500;
    letter-spacing: -0.06em;
    line-height: 0.95;
}

.case-row__media--text span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.75rem;
}

.case-row__number {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.case-row__content {
    align-self: center;
}

.case-row__content h2 {
    max-width: 20em;
    margin-block: 1rem;
    font-size: clamp(1.65rem, 2.6vw, 2.2rem);
}

.case-row__content h2 a {
    color: inherit;
    text-decoration: none;
}

.case-row__content h2 a:hover {
    color: var(--accent);
}

.case-row__content > p:not(.case-row__meta) {
    max-width: 42rem;
    margin-bottom: 1.4rem;
    color: var(--muted);
}

/* Gallery */
.gallery-collection {
    padding-bottom: var(--section-space);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(3rem, 7vw, 7rem) clamp(1.5rem, 3vw, 3rem);
    align-items: start;
}

.gallery-item {
    min-width: 0;
}

.gallery-item--wide {
    grid-column: span 8;
}

.gallery-item--narrow {
    grid-column: span 4;
}

.gallery-item--half {
    grid-column: span 6;
}

.gallery-open {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: #e7e7e3;
    cursor: zoom-in;
    text-align: left;
}

.gallery-open img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    transition: transform 450ms ease, filter 450ms ease;
}

.gallery-item--narrow .gallery-open img {
    aspect-ratio: 4 / 5;
}

.gallery-open:hover img {
    transform: scale(1.015);
    filter: saturate(0.9);
}

.gallery-open__hint,
.gallery-play {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.4rem 0.55rem;
    background: rgba(17, 18, 20, 0.88);
    color: #fff;
    font-size: 0.675rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.gallery-play {
    left: 0.75rem;
    right: auto;
}

.gallery-item figcaption {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    margin-top: 0.8rem;
    font-size: 0.75rem;
    line-height: 1.45;
}

.gallery-item figcaption strong {
    font-weight: 500;
}

.gallery-item figcaption span {
    color: var(--muted);
    text-align: right;
}

.gallery-dialog {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: var(--bg);
    color: var(--text);
}

.gallery-dialog::backdrop {
    background: rgba(17, 18, 20, 0.55);
}

.gallery-dialog__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4.5rem;
    padding-inline: var(--page-gutter);
    border-bottom: 1px solid var(--rule);
}

.gallery-dialog__topbar p,
.gallery-dialog__topbar button {
    font-size: 0.75rem;
    font-weight: 500;
}

.gallery-dialog__topbar > div {
    display: flex;
    gap: 0.25rem;
}

.gallery-dialog__topbar button {
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding-inline: 0.7rem;
    border: 1px solid var(--rule);
    background: transparent;
    cursor: pointer;
}

.gallery-dialog__topbar button:hover {
    border-color: var(--text);
}

.gallery-dialog__body {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    height: calc(100dvh - 4.5rem);
}

.gallery-dialog__media {
    display: grid;
    place-items: center;
    min-height: 0;
    padding: clamp(1rem, 3vw, 2rem) var(--page-gutter);
    overflow: hidden;
    background: #eeeeea;
}

.gallery-dialog__media img,
.gallery-dialog__media video {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
}

.gallery-dialog__media video {
    background: #111;
}

.gallery-dialog__caption {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.25rem var(--page-gutter) 1.5rem;
    border-top: 1px solid var(--rule);
}

.gallery-dialog__caption h2 {
    font-size: 1.125rem;
}

.gallery-dialog__caption p {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.75rem;
}

/* Experiments */
.experiment-index {
    padding-bottom: var(--section-space);
}

.experiment-index > .container {
    border-top: 1px solid var(--text);
}

.experiment-item {
    padding-block: clamp(3rem, 6vw, 5.5rem);
    border-bottom: 1px solid var(--rule);
}

.experiment-item__meta {
    display: grid;
    grid-template-columns: 0.5fr 2fr 1fr 0.5fr;
    gap: 1.5rem;
    margin-bottom: 2.25rem;
}

.experiment-item__meta time {
    text-align: right;
}

.status-mark {
    position: relative;
    padding-left: 0.8rem;
}

.status-mark::before {
    position: absolute;
    top: 0.42em;
    left: 0;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: var(--faint);
    content: "";
}

.status-mark--shipped::before {
    background: var(--success);
}

.status-mark--ongoing::before {
    background: var(--accent);
}

.experiment-item__main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.85fr);
    gap: clamp(2rem, 7vw, 7rem);
    align-items: center;
}

.experiment-item__copy h2 {
    font-size: clamp(1.75rem, 3vw, 2.35rem);
}

.experiment-item__copy > p {
    max-width: 38rem;
    margin-block: 1.35rem 1.5rem;
    color: var(--muted);
}

.experiment-item__media {
    overflow: hidden;
    background: #e8e8e4;
}

.experiment-item__media img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 450ms ease;
}

.experiment-item__media:hover img {
    transform: scale(1.015);
}

/* Case-study detail pages */
.case-study-hero {
    padding-block: clamp(3rem, 7vw, 6.5rem) clamp(4rem, 8vw, 7rem);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 3.5rem;
    padding: 0;
    list-style: none;
}

.breadcrumb li + li::before {
    margin-right: 0.4rem;
    color: var(--faint);
    content: "/";
}

.breadcrumb a {
    color: inherit;
}

.cs-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1.4rem;
}

.cs-title {
    max-width: 19em;
    font-size: clamp(2.35rem, 4vw, 2.75rem);
}

.cs-summary {
    max-width: 49rem;
    margin-top: 1.75rem;
    color: var(--muted);
    font-size: 1.08rem;
}

.text-gradient-red {
    color: inherit;
    background: none;
    -webkit-text-fill-color: currentColor;
}

.cs-project-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: clamp(3rem, 6vw, 5rem);
    border-top: 1px solid var(--text);
    border-bottom: 1px solid var(--rule);
}

.cs-project-facts > div {
    min-width: 0;
    padding: 1.2rem 1.5rem 1.35rem 0;
}

.cs-project-facts > div + div {
    padding-left: 1.5rem;
    border-left: 1px solid var(--rule);
}

.cs-project-facts dt {
    color: var(--muted);
    font-size: 0.675rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cs-project-facts dd {
    margin-top: 0.35rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.cs-hero-visual {
    margin-top: clamp(3rem, 7vw, 6rem);
}

.cs-visual {
    margin-block: 2.5rem;
}

.cs-visual img,
.cs-visual video {
    width: 100%;
    background: #e7e7e3;
}

.cs-visual video {
    max-height: 42rem;
    background: #111;
}

.cs-hero-visual video {
    aspect-ratio: 16 / 9;
    object-fit: contain;
}

.cs-hero-prototype {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 0.9fr);
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: center;
    min-height: clamp(31rem, 50vw, 40rem);
    padding: clamp(2.5rem, 6vw, 5.5rem);
    overflow: hidden;
    background: #202226;
    color: #fff;
}

.cs-hero-prototype__copy > p {
    margin-bottom: 1.25rem;
    color: #aeb0b5;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cs-hero-prototype__copy h2 {
    max-width: 11em;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.02;
}

.cs-hero-prototype__copy span {
    display: block;
    margin-top: 1.5rem;
    color: #aeb0b5;
    font-size: 0.75rem;
}

.cs-hero-prototype__screens {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    min-width: 0;
}

.cs-hero-prototype__screens img {
    width: min(48%, 17rem);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.32);
}

.cs-hero-prototype__screens img:first-child {
    transform: translateY(2.5rem);
}

.cs-visual--artifact img,
.cs-visual--artifact video {
    background: #323232;
}

.cs-visual figcaption {
    margin-top: 0.7rem;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.5;
}

.cs-prototype-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-block: 2.5rem;
}

.cs-phone-visual {
    display: grid;
    justify-items: center;
    min-width: 0;
    margin: 0;
    padding: 2rem 1rem 1.25rem;
    background: #e7e7e3;
}

.cs-phone-visual img {
    width: min(100%, 20.625rem);
    border: 1px solid var(--rule);
    background: #fff;
}

.cs-phone-visual figcaption {
    width: 100%;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.5;
}

.case-study-content {
    padding-bottom: var(--section-space);
}

.cs-layout {
    display: grid;
    grid-template-columns: minmax(10rem, 2fr) minmax(0, 8fr);
    gap: clamp(2rem, 6vw, 6rem);
}

.cs-layout::before {
    color: var(--muted);
    content: "Case study";
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cs-body {
    min-width: 0;
    max-width: 50rem;
}

.cs-body > h2 {
    margin-top: clamp(4.25rem, 7vw, 6rem);
    padding-top: 1rem;
    border-top: 1px solid var(--rule);
    font-size: clamp(1.65rem, 2.4vw, 2rem);
}

.cs-body > h2:first-child {
    margin-top: 0;
    border-top-color: var(--text);
}

.cs-body > h3 {
    margin-top: 2rem;
    font-size: 1.2rem;
}

.cs-body > p {
    margin-top: 1.15rem;
    color: #37393e;
}

.cs-body > ul,
.cs-body > ol {
    margin-block: 1.25rem 0;
    padding-left: 1.35rem;
    color: #37393e;
}

.cs-body > ol li,
.cs-body > ul li {
    margin-top: 0.85rem;
    padding-left: 0.35rem;
}

.cs-body a {
    text-decoration-color: var(--rule-strong);
}

.cs-data-table {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin-block: 2.5rem;
    overflow-x: auto;
    border-top: 1px solid var(--text);
    border-bottom: 1px solid var(--rule);
}

.cs-data-table table {
    width: 100%;
    min-width: 38rem;
    border-collapse: collapse;
    color: #37393e;
    font-size: 0.8rem;
    text-align: left;
}

.cs-data-table th,
.cs-data-table td {
    padding: 0.9rem 1rem 0.9rem 0;
    border-bottom: 1px solid var(--rule);
    vertical-align: top;
}

.cs-data-table th {
    color: var(--muted);
    font-size: 0.675rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.cs-data-table th + th,
.cs-data-table td + td {
    padding-left: 1rem;
}

.cs-data-table tbody tr:last-child td {
    border-bottom: 0;
}

.cs-data-table td:first-child {
    width: 52%;
    color: var(--text);
    font-weight: 500;
}

.cs-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-block: 2rem;
    border-top: 1px solid var(--text);
    border-bottom: 1px solid var(--rule);
}

.cs-metric-card {
    min-width: 0;
    padding: 1.5rem 1.25rem 1.5rem 0;
}

.cs-metric-card + .cs-metric-card {
    padding-left: 1.25rem;
    border-left: 1px solid var(--rule);
}

.cs-metric-num {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 500;
    letter-spacing: -0.04em;
    line-height: 1;
}

.cs-metric-lbl {
    margin-top: 0.6rem;
    color: var(--muted);
    font-size: 0.75rem;
}

.cs-evidence-panel,
.cs-callout,
.cs-external-banner {
    margin-block: 2rem;
    padding: 1.5rem;
    border-left: 2px solid var(--accent);
    background: var(--accent-soft);
}

.cs-evidence-panel h3,
.cs-external-banner strong {
    font-size: 1rem;
    font-weight: 500;
}

.cs-evidence-panel p,
.cs-callout p,
.cs-external-banner p {
    margin-top: 0.55rem;
    color: #464a71;
    font-size: 0.875rem;
}

.cs-callout p:first-child {
    margin-top: 0;
}

.cs-process,
.cs-design-grid,
.cs-quote-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-block: 2.5rem;
    border-top: 1px solid var(--text);
    border-bottom: 1px solid var(--rule);
}

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

.cs-process-step,
.cs-design-card,
.cs-quote-card {
    padding: 1.4rem 1.3rem 1.5rem 0;
}

.cs-process-step + .cs-process-step,
.cs-design-card + .cs-design-card,
.cs-quote-card + .cs-quote-card {
    padding-left: 1.3rem;
    border-left: 1px solid var(--rule);
}

.cs-process h3,
.cs-design-card h3,
.cs-quote-card strong {
    font-size: 0.925rem;
    font-weight: 500;
}

.cs-process p,
.cs-design-card p,
.cs-quote-card p {
    margin-top: 0.55rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.cs-visual-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.5rem;
    margin-block: 2.5rem;
}

.cs-visual-grid .cs-visual {
    margin: 0;
}

.cs-visual--white img {
    border: 1px solid var(--rule);
    background: #fff;
}

.cs-visual-grid--layers .cs-visual:first-child {
    grid-column: 1 / -1;
}

.cs-visual-grid--product-evidence img {
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.cs-external-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cs-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-block: 2rem;
}

.cs-version-index {
    margin-block: 2.5rem;
    border-top: 1px solid var(--text);
}

.cs-version-index a {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    min-height: 5rem;
    border-bottom: 1px solid var(--rule);
    color: var(--text);
    text-decoration: none;
}

.cs-version-index a:hover {
    color: var(--accent);
}

.cs-version-index span,
.cs-version-index small {
    color: var(--muted);
    font-size: 0.75rem;
}

.cs-version-index strong {
    font-size: 1rem;
    font-weight: 500;
}

.embargo-note {
    display: grid;
    grid-template-columns: minmax(8rem, 2fr) minmax(0, 4fr) minmax(0, 5fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    margin-top: clamp(3.5rem, 7vw, 6rem);
    padding-block: clamp(2rem, 4vw, 3rem);
    border-top: 1px solid var(--text);
    border-bottom: 1px solid var(--rule);
}

.embargo-note h2 {
    max-width: 12em;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.embargo-note > p:last-child {
    color: var(--muted);
}

.cs-surface-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-block: 2.5rem;
    border-top: 1px solid var(--text);
}

.cs-surface-grid > div {
    min-width: 0;
    padding: 1.4rem 1.3rem 1.5rem 0;
    border-bottom: 1px solid var(--rule);
}

.cs-surface-grid > div:nth-child(even) {
    padding-left: 1.3rem;
    border-left: 1px solid var(--rule);
}

.cs-surface-grid strong {
    font-size: 0.925rem;
    font-weight: 500;
}

.cs-surface-grid p {
    margin-top: 0.55rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.cs-body--wide {
    max-width: 60rem;
}

.motion-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(2.5rem, 5vw, 4.5rem) clamp(1.25rem, 3vw, 2rem);
    margin-block: 2.5rem;
}

.motion-piece {
    min-width: 0;
}

.motion-piece--feature {
    margin-top: clamp(3rem, 7vw, 6rem);
}

.motion-frame {
    overflow: hidden;
    background: #080912;
}

.motion-launch {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: #080912;
    cursor: pointer;
}

.motion-launch img,
.motion-frame video,
.motion-frame iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    object-fit: cover;
    background: #080912;
}

.motion-piece--square .motion-launch img,
.motion-piece--square .motion-frame video {
    aspect-ratio: 1 / 1;
}

.motion-launch img {
    transition: transform 450ms ease, filter 450ms ease;
}

.motion-launch:hover img {
    transform: scale(1.012);
    filter: brightness(0.92);
}

.motion-launch__action {
    position: absolute;
    right: 0.85rem;
    bottom: 0.85rem;
    padding: 0.5rem 0.65rem;
    background: rgba(17, 18, 20, 0.9);
    color: #fff;
    font-size: 0.675rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.motion-piece figcaption {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 0.8fr);
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--rule);
}

.motion-piece figcaption > div > p {
    margin-bottom: 0.45rem;
    color: var(--muted);
    font-size: 0.675rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.motion-piece figcaption h2,
.motion-piece figcaption h3 {
    font-size: 1rem;
    font-weight: 500;
}

.motion-piece figcaption > p {
    color: var(--muted);
    font-size: 0.8rem;
}

.motion-piece--feature figcaption h2 {
    font-size: 1.15rem;
}

.motion-grid--mixed .motion-piece {
    grid-column: span 1;
}

.more-case-studies {
    padding-block: var(--section-space);
    border-top: 1px solid var(--text);
}

.more-case-studies h2 {
    margin-bottom: 2.5rem;
    font-size: 1.25rem;
}

.more-cs-grid {
    border-top: 1px solid var(--rule);
}

.more-cs-card {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 1fr;
    gap: 2rem;
    align-items: center;
    min-height: 5rem;
    border-bottom: 1px solid var(--rule);
    color: var(--text);
    text-decoration: none;
}

.more-cs-card:hover {
    color: var(--accent);
}

.cs-card-title {
    font-size: 1rem;
    font-weight: 500;
}

.cs-card-meta {
    color: var(--muted);
    font-size: 0.75rem;
    text-align: right;
}

/* Footer */
.site-footer,
footer {
    border-top: 1px solid var(--rule);
}

.footer-grid,
.footer-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 2rem;
    align-items: center;
    min-height: 7rem;
    color: var(--muted);
    font-size: 0.75rem;
}

.footer-grid a,
.footer-bottom a {
    color: inherit;
}

.footer-grid > :last-child,
.footer-bottom > :last-child {
    justify-self: end;
}

/* Retired controls from the previous design */
.theme-btn,
.nav-resume-btn,
.nav-cta-btn,
.ambient-glow {
    display: none !important;
}

/* Responsive */
@media (max-width: 960px) {
    .profile-grid {
        grid-template-columns: minmax(5rem, 1fr) minmax(0, 5fr) minmax(10rem, 2fr);
        gap: 2rem;
    }

    .profile-copy h1,
    .page-intro h1,
    .cs-title {
        font-size: 2.3rem;
    }

    .ruled-section,
    .page-intro__grid,
    .cs-layout {
        grid-template-columns: minmax(7rem, 1.5fr) minmax(0, 7fr);
        gap: 3rem;
    }

    .contact-grid {
        grid-template-columns: minmax(6rem, 1fr) minmax(0, 5fr);
        gap: 2rem 3rem;
    }

    .contact-links {
        grid-column: 2;
    }

    .case-row {
        grid-template-columns: minmax(12rem, 3fr) 2rem minmax(0, 5fr);
        gap: 1.5rem;
    }

    .gallery-grid {
        gap-block: 4rem;
    }

    .experiment-item__main {
        grid-template-columns: 1fr 0.8fr;
        gap: 3rem;
    }
}

@media (max-width: 760px) {
    :root {
        --page-gutter: 1.5rem;
        --section-space: 4rem;
    }

    html {
        scroll-padding-top: 4.5rem;
    }

    .site-header {
        height: 4.25rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        z-index: -1;
        top: 4.25rem;
        right: 0;
        left: 0;
        display: grid;
        align-content: start;
        gap: 0;
        height: calc(100dvh - 4.25rem);
        padding: 1rem var(--page-gutter) 2rem;
        transform: translateY(-105%);
        border-bottom: 1px solid var(--rule);
        background: var(--bg);
        visibility: hidden;
        opacity: 0;
        transition: transform 240ms ease, opacity 180ms ease, visibility 0s 240ms;
    }

    body.nav-open .nav-links {
        transform: translateY(0);
        visibility: visible;
        opacity: 1;
        transition: transform 240ms ease, opacity 180ms ease, visibility 0s;
    }

    .nav-links a {
        display: flex;
        align-items: center;
        min-height: 4.5rem;
        border-bottom: 1px solid var(--rule);
        color: var(--text);
        font-size: 1.15rem;
        font-weight: 500;
    }

    .nav-links a::after {
        display: none;
    }

    .profile-intro {
        padding-top: 3.5rem;
    }

    .profile-grid,
    .ruled-section,
    .page-intro__grid,
    .cs-layout,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .profile-index,
    .page-index {
        padding-top: 0;
    }

    .profile-copy h1,
    .page-intro h1,
    .cs-title {
        font-size: clamp(2.05rem, 9vw, 2.25rem);
    }

    .profile-summary {
        margin-top: 1.5rem;
        font-size: 1rem;
    }

    .profile-portrait {
        width: 11.5rem;
        justify-self: start;
    }

    .profile-portrait figcaption {
        max-width: 15rem;
    }

    .ruled-section {
        gap: 3rem;
    }

    .section-label {
        grid-template-columns: 2.5rem 1fr;
        gap: 1rem;
        align-items: center;
    }

    .resume-entry__header {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .resume-entry__header time {
        white-space: normal;
    }

    .resume-entry ul {
        padding-left: 1.05rem;
    }

    .capability-list,
    .answer-list {
        grid-template-columns: 1fr;
    }

    .capability-list article:nth-child(2),
    .answer-list > div:nth-child(2) {
        padding-top: 1.65rem;
        border-top: 1px solid var(--rule);
    }

    .section-label--standalone {
        grid-template-columns: 2.5rem 1fr;
        gap: 1rem;
    }

    .explore-list a {
        grid-template-columns: 1fr auto;
        gap: 0.65rem 1rem;
        min-height: 7.5rem;
        padding-block: 1.25rem;
    }

    .explore-list small {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .explore-list b {
        grid-column: 2;
        grid-row: 1;
    }

    .contact-links {
        grid-column: auto;
        margin-top: 0.5rem;
    }

    .page-intro {
        padding-block: 3.75rem;
    }

    .case-row {
        grid-template-columns: 2.5rem minmax(0, 1fr);
        gap: 1.25rem;
    }

    .case-row__media {
        grid-column: 1 / -1;
    }

    .case-row__number {
        padding-top: 0.35rem;
    }

    .case-row__content h2 {
        font-size: 1.65rem;
    }

    .gallery-grid {
        display: block;
    }

    .gallery-item + .gallery-item {
        margin-top: 3.5rem;
    }

    .gallery-item--narrow {
        width: 78%;
        margin-left: auto;
    }

    .gallery-item figcaption {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .gallery-item figcaption span {
        text-align: left;
    }

    .gallery-dialog__caption {
        align-items: start;
    }

    .gallery-dialog__caption .inline-link {
        display: none;
    }

    .experiment-item__meta {
        grid-template-columns: 2.5rem 1fr;
        gap: 0.75rem 1rem;
    }

    .experiment-item__meta time {
        text-align: left;
    }

    .experiment-item__main {
        grid-template-columns: 1fr;
        gap: 2.25rem;
    }

    .experiment-item__media {
        grid-row: 1;
    }

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

    .cs-project-facts > div:nth-child(3) {
        padding-left: 0;
        border-top: 1px solid var(--rule);
        border-left: 0;
    }

    .cs-project-facts > div:nth-child(4) {
        border-top: 1px solid var(--rule);
    }

    .cs-layout::before {
        display: none;
    }

    .cs-body > h2:first-child {
        margin-top: 0;
    }

    .cs-metrics-grid,
    .cs-process,
    .cs-design-grid,
    .cs-quote-grid,
    .cs-visual-grid,
    .cs-prototype-grid {
        grid-template-columns: 1fr;
    }

    .cs-hero-prototype {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 2rem 1.25rem 3rem;
    }

    .cs-hero-prototype__copy h2 {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .cs-hero-prototype__screens img {
        width: min(47%, 14rem);
    }

    .cs-metric-card + .cs-metric-card,
    .cs-process-step + .cs-process-step,
    .cs-design-card + .cs-design-card,
    .cs-quote-card + .cs-quote-card {
        padding-left: 0;
        border-top: 1px solid var(--rule);
        border-left: 0;
    }

    .cs-external-banner {
        display: grid;
    }

    .embargo-note {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .cs-version-index a {
        grid-template-columns: 2.5rem minmax(0, 1fr);
        padding-block: 1rem;
    }

    .cs-version-index small {
        grid-column: 2;
    }

    .cs-surface-grid,
    .motion-grid {
        grid-template-columns: 1fr;
    }

    .cs-surface-grid > div:nth-child(even) {
        padding-left: 0;
        border-left: 0;
    }

    .motion-piece figcaption {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .more-cs-card {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        min-height: 6rem;
        padding-block: 1rem;
    }

    .cs-card-meta {
        text-align: left;
    }

    .footer-grid,
    .footer-bottom {
        grid-template-columns: 1fr;
        gap: 0.55rem;
        min-height: 0;
        padding-block: 2.25rem;
    }

    .footer-grid > :last-child,
    .footer-bottom > :last-child {
        justify-self: start;
    }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
