/* -------------------------------------------------------------------------
   Cristina Viganò — portfolio styles
   Minimal, refined, AA-accessible, low-carbon.
   ------------------------------------------------------------------------- */

/* Type: Inter for text and Fraunces for headings, both self-hosted as
   Latin-only WOFF2 (Fraunces is a free stand-in for Cooper). */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("fonts/inter-latin.woff2") format("woff2");
}

@font-face {
    font-family: "Fraunces";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("fonts/fraunces-latin.woff2") format("woff2");
}

:root {
    --bg: #f5f3f5;
    --ink: #1a1a1a;
    --muted: #616161;
    --line: #e5e2d9;
    --accent: #3c1030;
    --plum: #3c1030;
    --brick: #c84e3e;
    --intro-bg: #ebe7ec;

    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Helvetica, Arial, sans-serif;

    --step-0: 1.0625rem;
    --step-1: clamp(1.125rem, 0.5vw + 1rem, 1.375rem);
    --step-2: clamp(1.5rem, 1.2vw + 1rem, 2.125rem);
    --step-3: clamp(2rem, 2.4vw + 1rem, 3rem);
    --step-4: clamp(2.75rem, 4.5vw + 1rem, 4.75rem);
    --step-5: clamp(3.5rem, 7.5vw + 1rem, 7rem);

    --space-2xs: 0.25rem;
    --space-xs: 0.5rem;
    --space-s: 1rem;
    --space-m: 1.75rem;
    --space-l: 3rem;
    --space-xl: 5rem;
    --space-2xl: 8rem;
    --space-3xl: 12rem;

    --measure: 62ch;
    --container: 78rem;
}

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

html,
body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote,
dl,
dd {
    margin: 0;
    padding: 0;
}

ul,
ol {
    list-style: none;
}

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

/* Base */
html {
    font-size: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: var(--step-0);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4 {
    font-family: var(--serif);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

h1 {
    font-size: var(--step-5);
}

h2 {
    font-size: var(--step-4);
}

h3 {
    font-size: var(--step-3);
}

h4 {
    font-size: var(--step-2);
}

p {
    max-width: var(--measure);
    text-wrap: pretty;
}

p + p {
    margin-top: var(--space-s);
}

a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.25em;
    text-decoration-color: rgba(60, 16, 48, 0.35);
    transition: color 120ms ease-in-out,
        text-decoration-color 120ms ease-in-out,
        text-decoration-thickness 120ms ease-in-out;
}

a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
}

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

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

/* Skip link */
.skip-link {
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--ink);
    color: var(--bg);
    text-decoration: none;
    transform: translateY(-200%);
    transition: transform 150ms ease-in-out;
    z-index: 100;
}

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

/* Layout */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 1.5rem;
}

@media (min-width: 48rem) {
    .container {
        padding-inline: 3rem;
    }
}

@media (min-width: 80rem) {
    .container {
        padding-inline: 4rem;
    }
}

main {
    flex: 1 0 auto;
}

/* Header and navigation */
.site-header {
    padding-block: var(--space-m);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-s) var(--space-m);
}

.site-name {
    font-family: var(--serif);
    font-size: 1.125rem;
    font-weight: 500;
    letter-spacing: -0.005em;
    text-decoration: none;
}

.site-name:hover,
.site-name:focus-visible {
    text-decoration: none;
}

.nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-s) var(--space-m);
    font-size: 1rem;
}

.nav-list a {
    text-decoration: none;
    color: var(--muted);
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 0.35em;
}

/* Sections */
.section {
    padding-block: var(--space-xl);
}

.section + .section {
    border-top: 1px solid var(--line);
}

.hero {
    padding-block: var(--space-2xl) var(--space-xl);
}

@media (min-width: 48rem) {
    .hero {
        padding-block: var(--space-3xl) var(--space-2xl);
    }
}

.eyebrow {
    color: var(--muted);
    font-size: 0.875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: var(--space-m);
    font-family: var(--sans);
}

.lead {
    font-size: var(--step-2);
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.02em;
    max-width: 30ch;
    color: var(--ink);
    text-wrap: balance;
}

.body-lead {
    font-size: var(--step-1);
    line-height: 1.55;
    max-width: 50ch;
    color: var(--ink);
    margin-top: var(--space-m);
}

.section-title {
    margin-bottom: var(--space-l);
}

/* Projects list — big year / small copy, Sketchin-style contrast */
.project-list {
    display: flex;
    flex-direction: column;
}

.project {
    border-top: 1px solid var(--line);
    padding-block: var(--space-l);
    display: grid;
    gap: var(--space-s);
    align-items: baseline;
}

@media (min-width: 48rem) {
    .project {
        grid-template-columns: minmax(10rem, 14rem) 1fr;
        gap: var(--space-l);
    }
}

.project:last-child {
    border-bottom: 1px solid var(--line);
}

.project-meta {
    color: var(--accent);
    font-family: var(--serif);
    font-weight: 700;
    font-size: var(--step-4);
    line-height: 0.95;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    text-transform: none;
}

.project-title {
    font-family: var(--serif);
    font-size: var(--step-1);
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.005em;
    text-wrap: balance;
}

.project-title a {
    text-decoration: none;
    text-decoration-color: transparent;
}

.project-title a:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

.project-summary {
    color: var(--muted);
    margin-top: var(--space-xs);
    max-width: 55ch;
}

/* CTA link */
.cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: var(--space-l);
    font-size: var(--step-1);
    font-family: var(--serif);
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
    color: var(--ink);
    border-bottom: 1px solid var(--accent);
    padding-bottom: 0.15em;
    transition: color 120ms ease-in-out,
        border-color 120ms ease-in-out;
}

.cta::after {
    content: "\2192";
    color: var(--accent);
    transition: transform 150ms ease-in-out;
}

.cta:hover,
.cta:focus-visible {
    color: var(--accent);
}

.cta:hover::after,
.cta:focus-visible::after {
    transform: translateX(4px);
}

/* Contact details */
.contact-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--space-s) var(--space-m);
    margin-top: var(--space-l);
    max-width: 40rem;
}

.contact-list dt {
    color: var(--muted);
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    align-self: center;
}

.contact-list dd {
    font-size: var(--step-1);
    font-family: var(--serif);
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* Footer */
.site-footer {
    flex-shrink: 0;
    padding-block: var(--space-l);
    margin-top: var(--space-xl);
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9375rem;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-s) var(--space-m);
}

.footer-row a {
    color: var(--muted);
}

/* Fun projects intro */
.fun-intro {
    max-width: 50ch;
    margin-top: var(--space-m);
    color: var(--muted);
    font-size: var(--step-1);
    line-height: 1.55;
}

/* Work list, used on the projects page */
.work-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-l);
    margin-top: var(--space-xl);
    list-style: none;
    padding: 0;
}

.work-card {
    background: var(--card-bg, #eeeae0);
    color: var(--card-fg, var(--ink));
    border-radius: 10px;
    padding: var(--space-m);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-s);
    scroll-margin-top: var(--space-l);
    overflow: hidden;
    position: relative;
    transition: transform 220ms ease-out, box-shadow 220ms ease-out;
}

.work-card:hover,
.work-card:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px -12px rgba(26, 26, 26, 0.25);
}

.work-card__text {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    align-items: flex-start;
}

@media (min-width: 48rem) {
    .work-card {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
        gap: var(--space-l);
        align-items: center;
        padding: var(--space-l) var(--space-l) var(--space-l) var(--space-xl);
    }

    .work-card__media {
        margin-top: 0;
    }
}

.work-card__eyebrow {
    color: inherit;
    opacity: 0.75;
    font-size: 0.8125rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0;
}

.work-card__title {
    font-family: var(--serif);
    font-weight: 700;
    font-size: var(--step-3);
    line-height: 1.05;
    max-width: 22ch;
    letter-spacing: -0.03em;
    text-wrap: balance;
    margin: 0;
    color: inherit;
}

.work-card__title a {
    color: inherit;
    text-decoration: none;
}

.work-card__title a::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.work-card__title a:focus-visible {
    outline: none;
}

.work-card:focus-within {
    outline: 2px solid var(--card-fg, var(--accent));
    outline-offset: 4px;
}

.work-card__tag {
    display: inline-block;
    align-self: flex-start;
    padding: 0.3125rem 0.8125rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: inherit;
    opacity: 0.85;
    margin-top: var(--space-2xs);
}

.work-card__media {
    aspect-ratio: 4 / 3;
    width: 100%;
    background: transparent;
    overflow: hidden;
    margin-top: 0;
    border-radius: 2px;
    position: relative;
}

.work-card__media picture {
    display: block;
    width: 100%;
    height: 100%;
}

.work-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Case study layout */
.case-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-m);
    margin-top: var(--space-l);
    padding-block: var(--space-m);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

@media (min-width: 40rem) {
    .case-meta {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 64rem) {
    .case-meta {
        grid-template-columns: repeat(4, 1fr);
    }
}

.case-meta dt {
    color: var(--muted);
    font-size: 0.8125rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-2xs);
}

.case-meta dd {
    font-family: var(--serif);
    font-size: var(--step-1);
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.case-body {
    padding-block: var(--space-xl);
}

.case-body > .container {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.case-narrative {
    max-width: 42rem;
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
}

.case-divider {
    border: none;
    border-top: 1px solid var(--line);
    width: 100%;
    max-width: none;
    margin: var(--space-l) 0 var(--space-s);
}

.case-intro-section {
    background: var(--intro-bg);
    padding-block: var(--space-xl);
}

/* The hero's curved edge opens onto the intro panel, with no gap between. */
.hero:has(+ .case-intro-section) {
    background-color: var(--intro-bg);
}

/* Same on the Fun page, where the first accordion band is white. */
.hero:has(+ .fun-accordions) {
    background-color: #fff;
}

.case-intro-section > .container {
    display: flex;
    flex-direction: column;
    gap: var(--space-m);
}

.case-lead {
    font-size: var(--step-2);
    line-height: 1.4;
    max-width: 55ch;
    margin-top: var(--space-m);
}

.case-tags {
    list-style: none;
    padding: 0;
    margin: var(--space-l) 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.case-tags li {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.case-narrative ul.case-list {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.case-narrative ul.case-list li {
    padding-left: 0.25rem;
    line-height: 1.55;
}

.case-back {
    margin-bottom: var(--space-m);
    font-size: 0.9375rem;
    color: var(--muted);
    max-width: none;
}

.case-back a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(60, 16, 48, 0.3);
    transition: color 120ms, border-color 120ms;
}

.case-back a:hover,
.case-back a:focus-visible {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.case-narrative h2 {
    font-size: var(--step-3);
    margin-bottom: var(--space-s);
}

.case-narrative h3 {
    font-size: var(--step-2);
    margin-top: var(--space-m);
    margin-bottom: var(--space-xs);
}

.case-narrative__label {
    font-size: var(--step-2) !important;
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: -0.02em;
    text-transform: none;
    color: var(--ink);
    margin-top: 0 !important;
    margin-bottom: var(--space-xs) !important;
}

.case-intro-section .case-narrative__label {
    font-size: var(--step-2) !important;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink);
    margin-bottom: var(--space-s) !important;
}

.case-narrative + .case-figure {
    margin-top: calc(var(--space-l) - var(--space-xl));
}

.case-figure--blend .case-figure__media {
    background: var(--bg);
    isolation: isolate;
}

.case-figure--blend .case-figure__media img {
    mix-blend-mode: darken;
    image-rendering: -webkit-optimize-contrast;
}

.case-figure-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-s);
    align-items: start;
}

.case-figure-row .case-figure {
    margin: 0;
}

.case-figure-row .case-figure__media {
    max-width: none;
    margin-inline: 0;
}

@media (max-width: 720px) {
    .case-figure-row {
        grid-template-columns: 1fr;
    }
}

.stat-cards {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-s);
}

.stat-cards li {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-l) var(--space-m);
    border: 1px solid var(--line);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.35);
}

.stat-cards__value {
    font-family: var(--serif);
    font-size: var(--step-4);
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    margin: 0;
}

.stat-cards__label {
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.4;
    margin: 0;
}

@media (max-width: 560px) {
    .stat-cards {
        grid-template-columns: 1fr;
    }
}

.design-process {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-m);
    padding: var(--space-l) var(--space-m);
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid var(--line);
    border-radius: 4px;
    max-width: 44rem;
    color: var(--accent);
    margin: 0;
}

.design-process__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-m);
    text-align: center;
}

.design-process__title {
    font-family: var(--sans);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink);
    margin: 0;
}

.design-process__loop {
    display: grid;
    grid-template-columns: auto minmax(4rem, 1fr) auto;
    align-items: center;
    gap: var(--space-xs);
}

.design-process__node {
    font-family: var(--serif);
    font-size: var(--step-1);
    font-weight: 500;
    color: var(--ink);
    line-height: 1.15;
    text-align: center;
    max-width: 6rem;
}

.design-process__cycle,
.design-process__connector svg {
    width: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.design-process__cycle {
    height: 4.5rem;
}

.design-process__connector svg {
    width: 3rem;
    height: 1rem;
}

@media (max-width: 640px) {
    .design-process {
        grid-template-columns: 1fr;
    }
    .design-process__connector svg {
        transform: rotate(90deg);
        margin-inline: auto;
        display: block;
    }
}

.case-figure--small .case-figure__media {
    max-width: 24rem;
    margin-inline-start: 0;
    margin-inline-end: auto;
}

.case-figure--medium .case-figure__media {
    max-width: 40rem;
    margin-inline-start: 0;
    margin-inline-end: auto;
}

.brand-pillars {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-s);
    max-width: 56rem;
}

.brand-pillars li {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-m);
    padding: var(--space-m) var(--space-s);
    border: 1px solid var(--line);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.35);
    aspect-ratio: 3 / 4;
}

.brand-pillars__index {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.brand-pillars__name {
    font-family: var(--serif);
    font-size: var(--step-2);
    font-weight: 700;
    line-height: 1.05;
    color: var(--accent);
    margin: 0;
}

@media (max-width: 720px) {
    .brand-pillars {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 420px) {
    .brand-pillars {
        grid-template-columns: 1fr;
    }
    .brand-pillars li {
        aspect-ratio: auto;
        flex-direction: row;
        align-items: center;
    }
}

.type-specimen {
    display: grid;
    gap: var(--space-l);
    padding: var(--space-l);
    border: 1px solid var(--line);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.35);
    max-width: 44rem;
}

.type-specimen__item {
    display: grid;
    gap: var(--space-s);
    grid-template-columns: 1fr;
}

.type-specimen__meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-s);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    padding-bottom: var(--space-xs);
}

.type-specimen__label {
    color: var(--ink);
}

.type-specimen__sample {
    margin: 0;
    line-height: 1.05;
    color: var(--ink);
    font-size: clamp(2.5rem, 5vw + 1rem, 4rem);
}

.type-specimen__sample--geist {
    font-family: "Geist", var(--sans);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.type-specimen__sample--inter {
    font-family: "Inter", var(--sans);
    font-weight: 500;
    letter-spacing: -0.01em;
}

.type-specimen__glyphs {
    font-size: clamp(1.25rem, 1.5vw + 0.75rem, 1.5rem);
    color: var(--muted);
    letter-spacing: 0.05em;
}

.project-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-s);
    counter-reset: timeline;
    position: relative;
}

.project-timeline::before {
    content: "";
    position: absolute;
    top: 0.75rem;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--line);
    z-index: 0;
}

.project-timeline li {
    counter-increment: timeline;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding-top: var(--space-m);
}

.project-timeline li::before {
    content: counter(timeline, decimal-leading-zero);
    position: absolute;
    top: 0;
    left: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.project-timeline__phase {
    font-family: var(--serif);
    font-size: var(--step-1);
    font-weight: 700;
    line-height: 1.15;
    color: var(--ink);
    margin: 0;
}

.project-timeline__note {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.4;
    margin: 0;
}

.project-timeline a {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    height: 100%;
    transition: color 120ms ease-in-out;
}

.project-timeline a:hover .project-timeline__phase,
.project-timeline a:focus-visible .project-timeline__phase {
    color: var(--accent);
}

.project-timeline a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 2px;
}

@media (max-width: 720px) {
    .project-timeline {
        grid-template-columns: 1fr;
        gap: var(--space-m);
    }
    .project-timeline::before {
        top: 0;
        bottom: 0;
        left: 0.75rem;
        right: auto;
        width: 1px;
        height: auto;
    }
    .project-timeline li {
        padding-top: 0;
        padding-left: 2.5rem;
    }
}

.case-figure {
    margin: 0;
}

.case-figure__media {
    width: 100%;
    background: transparent;
    border-radius: 2px;
    position: relative;
}

.case-figure__media img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
}

.case-figure__media--video {
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.case-figure__media--video video {
    display: block;
    max-width: 100%;
    height: auto;
}

.phone-mockup {
    width: min(300px, 80%);
    margin: 0 auto;
    padding: 12px;
    background: #111;
    border-radius: 44px;
    box-shadow: 0 0 0 2px #333, 0 24px 48px rgba(0, 0, 0, 0.25);
}

.phone-mockup__screen {
    aspect-ratio: 375 / 780;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 32px;
    background: #000;
    scrollbar-width: none;
}

.phone-mockup__screen::-webkit-scrollbar {
    display: none;
}

.laptop-mockup {
    width: min(860px, 100%);
    margin: 0 auto;
}

.laptop-mockup__screen {
    aspect-ratio: 16 / 10;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #000;
    border: 12px solid #111;
    border-bottom-width: 14px;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 0 0 2px #333;
    scrollbar-width: thin;
}

.laptop-mockup__base {
    height: 14px;
    width: 112%;
    margin: 0 -6%;
    background: linear-gradient(#d9d9dc, #a9a9ae);
    border-radius: 0 0 18px 18px;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.2);
}

.phone-mockup__screen img,
.laptop-mockup__screen img {
    display: block;
    width: 100%;
    height: auto;
}

.phone-mockup__screen:focus-visible,
.laptop-mockup__screen:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.case-figure__media--empty::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(
            135deg,
            transparent 49.5%,
            rgba(26, 26, 26, 0.06) 49.5% 50.5%,
            transparent 50.5%
        ),
        linear-gradient(
            45deg,
            transparent 49.5%,
            rgba(26, 26, 26, 0.06) 49.5% 50.5%,
            transparent 50.5%
        );
}

.case-figure figcaption {
    margin-top: var(--space-s);
    color: var(--muted);
    font-size: 0.9375rem;
    line-height: 1.5;
    max-width: 55ch;
}

.case-quote {
    position: relative;
    font-family: var(--serif);
    font-size: var(--step-1);
    font-weight: 400;
    font-style: italic;
    line-height: 1.5;
    max-width: 50ch;
    margin: 0;
    padding-left: 3.5rem;
    letter-spacing: 0;
}

.case-quote::before {
    content: "\201C";
    position: absolute;
    left: 0;
    top: -0.25em;
    font-family: var(--serif);
    font-style: normal;
    font-weight: 700;
    font-size: 4.5rem;
    line-height: 1;
    color: var(--accent);
}

.case-quote cite {
    display: block;
    margin-top: var(--space-s);
    font-family: var(--sans);
    font-size: 0.9375rem;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--muted);
}

.case-quote cite::before {
    content: "\2014\00a0";
}

.case-next {
    border-top: 1px solid var(--line);
    padding-block: var(--space-xl);
}

.case-next a {
    display: block;
    text-decoration: none;
}

.case-next__label {
    color: var(--muted);
    font-size: 0.875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: var(--space-s);
}

.case-next__title {
    font-family: var(--serif);
    font-weight: 700;
    font-size: var(--step-3);
    line-height: 1.05;
    letter-spacing: -0.03em;
    max-width: 22ch;
    text-wrap: balance;
    background-image: linear-gradient(var(--ink), var(--ink));
    background-size: 0 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 250ms ease-in-out;
    display: inline;
    padding-bottom: 0.1em;
}

.case-next a:hover .case-next__title,
.case-next a:focus-visible .case-next__title {
    background-size: 100% 1px;
}

/* Compact list, used for talks and other short entries */
.compact-list {
    display: flex;
    flex-direction: column;
    margin-top: var(--space-l);
}

.compact-list li {
    border-top: 1px solid var(--line);
    padding-block: var(--space-l);
    display: grid;
    gap: var(--space-xs);
    align-items: baseline;
}

@media (min-width: 48rem) {
    .compact-list li {
        grid-template-columns: minmax(10rem, 14rem) 1fr;
        gap: var(--space-l);
    }
}

.compact-list li:last-child {
    border-bottom: 1px solid var(--line);
}

.compact-list .meta {
    color: var(--accent);
    font-family: var(--serif);
    font-weight: 700;
    font-size: var(--step-3);
    line-height: 0.95;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    text-transform: none;
}

.compact-list .title {
    font-family: var(--serif);
    font-size: var(--step-1);
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.005em;
    text-wrap: balance;
}

.compact-list .topics {
    margin-top: var(--space-2xs);
    color: var(--muted);
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* Accordion — used on the Fun page for collapsible sections */
.fun-accordions > .container {
    display: flex;
    flex-direction: column;
}

.fun-accordions {
    padding-block: 0;
    overflow-x: clip;
}

.accordion {
    background: #fff;
    box-shadow: 0 0 0 100vmax #fff;
    clip-path: inset(0 -100vmax);
}

.accordion:nth-of-type(even) {
    background: var(--intro-bg);
    box-shadow: 0 0 0 100vmax var(--intro-bg);
}

.accordion__summary {
    list-style: none;
    cursor: pointer;
    padding-block: var(--space-l);
    padding-right: 3.5rem;
    position: relative;
    display: block;
    transition: color 150ms ease-in-out;
}

.accordion__summary::-webkit-details-marker {
    display: none;
}

.accordion__summary::after {
    content: "+";
    position: absolute;
    top: var(--space-l);
    right: 0;
    font-family: var(--serif);
    font-weight: 400;
    font-size: var(--step-3);
    line-height: 0.9;
    color: var(--accent);
    transition: transform 200ms ease-in-out;
}

.accordion[open] .accordion__summary::after {
    content: "\2013";
}

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

.accordion__title {
    font-family: var(--serif);
    font-weight: 700;
    font-size: var(--step-4);
    line-height: 1;
    letter-spacing: -0.035em;
    margin: 0 0 var(--space-s);
    max-width: 22ch;
    text-wrap: balance;
    transition: color 150ms ease-in-out;
}

.accordion__summary:hover .accordion__title {
    color: var(--accent);
}

.accordion__teaser {
    color: var(--muted);
    font-size: var(--step-1);
    line-height: 1.5;
    max-width: 55ch;
    margin: 0;
}

.accordion__body {
    padding-bottom: var(--space-l);
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
}

.accordion__body > p {
    max-width: 55ch;
    color: var(--ink);
}

.accordion__body .compact-list {
    margin-top: var(--space-s);
}

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

/* High-contrast preference */
@media (prefers-contrast: more) {
    :root {
        --muted: #333333;
        --line: #1a1a1a;
    }
    a {
        text-decoration-color: var(--ink);
    }
}

/* -------------------------------------------------------------------------
   Site design: plum hero with a curved edge, serif headings, case tiles.
   ------------------------------------------------------------------------- */
.site-header {
    padding-block: 1rem;
}

/* One line at every width. The text scales down on small screens and the
   links keep a 44px tall tap area. */
.site-nav {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.75rem;
}

.site-name,
.nav-list {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(0.75rem, 3.4vw, 1.25rem);
}

.nav-list {
    flex-wrap: nowrap;
    gap: clamp(0.5rem, 2.4vw, 1.75rem);
    white-space: nowrap;
}

.site-name,
.nav-list a {
    display: inline-block;
    padding-block: 0.75rem;
}

.site-name {
    white-space: nowrap;
}

@media (max-width: 22.5rem) {
    .site-nav {
        flex-wrap: wrap;
    }
}

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

.eyebrow {
    font-family: var(--serif);
}

h1 {
    font-weight: 400;
    letter-spacing: -0.015em;
}

h2 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Hero */
.hero {
    color: #fff;
    background: url("images/hero-bg.svg") center top / 100% 100% no-repeat;
    padding-block: 4rem 6rem;
}

@media (min-width: 48rem) {
    .hero {
        padding-block: 4.5rem 8rem;
    }

    .home .hero {
        padding-block: 6.5rem 9.5rem;
    }
}

.hero .eyebrow,
.hero .body-lead,
.hero .case-lead {
    color: #fff;
}

.hero h1 {
    font-size: clamp(3.25rem, 8vw, 7rem);
    line-height: 1.08;
    margin-bottom: var(--space-m);
}

/* Two lines at every width: the size follows the space the longer line needs. */
.home .hero h1 {
    font-size: min(7rem, calc((100vw - 3rem) / 8.1));
}

@media (min-width: 48rem) {
    .home .hero h1 {
        font-size: min(7rem, calc((100vw - 6rem) / 8.1));
    }
}

@media (min-width: 80rem) {
    .home .hero h1 {
        font-size: min(7rem, calc((100vw - 8rem) / 8.1));
    }
}

.hero .body-lead {
    max-width: 43.5rem;
    margin-top: 0;
}

.hero .body-lead + .body-lead {
    margin-top: var(--space-s);
}

.hero .case-back,
.hero .case-back a {
    color: #fff;
}

.hero .case-back a {
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

.hero .case-back a:hover,
.hero .case-back a:focus-visible {
    border-bottom-color: #fff;
}

.hero .case-tags li {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}

.hero a:focus-visible {
    outline-color: #fff;
}

.mark {
    --bar: 0.134em;
    --hl: 0.62em;
    --p: 0;
    background: linear-gradient(var(--brick), var(--brick)) no-repeat
        0 calc(88% - 4% * var(--p)) / 100%
        calc(var(--bar) + (var(--hl) - var(--bar)) * var(--p));
    transition: background-size 2.8s cubic-bezier(0.25, 0.1, 0.25, 1),
        background-position 2.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.mark + .mark {
    transition-delay: 0.5s;
}

.hl-on .mark {
    --p: 1;
}

/* The underline grows into a highlight behind the words shortly after load.
   Script adds .hl-on to the body. */
@media (prefers-reduced-motion: reduce) {
    .mark {
        --p: 0 !important;
        transition: none;
    }
}

.cta--light {
    color: #fff;
    border-bottom-color: #fff;
}

.cta--light::after {
    color: #fff;
}

.cta--light:hover,
.cta--light:focus-visible {
    color: #fff;
    border-bottom-width: 2px;
}

.hero .cta {
    margin-top: var(--space-m);
}

.home a:focus-visible {
    outline-color: var(--brick);
}

.fun-band a:focus-visible {
    outline-color: #fff;
}

/* Section headings */
.section-title {
    font-weight: 600;
    letter-spacing: -0.02em;
}

.home .section-title {
    font-size: clamp(2.75rem, 5vw + 1rem, 4.75rem);
    margin-bottom: 0;
}

.home .section + .section {
    border-top: 0;
}

/* Case cards */
.work-list {
    gap: 3rem;
    margin-top: var(--space-l);
}

.work-card {
    isolation: isolate;
    border-radius: 10px;
    padding: var(--space-l) var(--space-m) 0;
    min-height: 0;
    grid-template-columns: 1fr;
    gap: var(--space-m);
    align-items: start;
}

.work-card__logo {
    display: block;
    height: 1.4375rem;
    width: auto;
    margin-bottom: 0.875rem;
}

.work-card__logo--tall {
    height: 2.5rem;
}

.work-card__title {
    font-size: clamp(2rem, 2vw + 1.25rem, 3rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    max-width: 8em;
}

.work-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4375rem;
    margin-top: 0.875rem;
}

.work-card__tags li {
    padding: 0.28rem 0.8125rem 0.33rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-family: var(--serif);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 1;
}

.work-card__media {
    aspect-ratio: 650 / 514;
    width: auto;
    margin-inline: -1.75rem;
    overflow: hidden;
    border-radius: 0;
}

.work-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
}

@media (min-width: 48rem) {
    .work-card {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
        min-height: 32.125rem;
        padding: 0 0 0 5rem;
    }

    .work-card__text {
        justify-content: center;
        padding-block: var(--space-l);
        max-width: 42%;
    }

    .work-card__media {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 58%;
        aspect-ratio: auto;
        margin: 0;
        z-index: -1;
    }
}

.work-card:hover,
.work-card:focus-within {
    transform: none;
    box-shadow: none;
}

/* Fun projects band */
.fun-band {
    background: var(--plum);
    color: #fff;
    padding-block: 5rem;
}

.fun-band .eyebrow,
.fun-band .fun-intro {
    color: #dedede;
}

.fun-band .section-title {
    margin-bottom: 0;
}

.fun-band .fun-intro {
    margin-top: var(--space-m);
    max-width: 44ch;
}

.fun-band .cta {
    margin-top: var(--space-m);
}

.home .site-footer {
    margin-top: 0;
    border-top: 1px solid var(--line);
}

/* Tile hover: the image eases in slightly and the title is underlined. */
.work-card__media img {
    transition: transform 700ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

.work-card:hover .work-card__media img,
.work-card:focus-within .work-card__media img {
    transform: scale(1.04);
}

.work-card:hover .work-card__title a,
.work-card:focus-within .work-card__title a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

/* Burger menu on mobile breakpoints. The toggle only shows once nav.js has
   run (html.js), so the plain one-line menu still works without scripts. */
.nav-toggle {
    display: none;
}

@media (max-width: 47.99rem) {
    .site-header {
        position: relative;
        z-index: 50;
    }

    .js .site-nav {
        position: relative;
    }

    .js .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.75rem;
        height: 2.75rem;
        margin-right: -0.5rem;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--ink);
        cursor: pointer;
    }

    .nav-toggle:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
        border-radius: 4px;
    }

    .nav-toggle__bars,
    .nav-toggle__bars::before,
    .nav-toggle__bars::after {
        display: block;
        width: 1.5rem;
        height: 2px;
        background: currentColor;
        border-radius: 1px;
        transition: transform 200ms ease-in-out, background-color 200ms;
    }

    .nav-toggle__bars {
        position: relative;
    }

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

    .nav-toggle__bars::before {
        top: -0.4rem;
    }

    .nav-toggle__bars::after {
        top: 0.4rem;
    }

    .is-open .nav-toggle__bars {
        background: transparent;
    }

    .is-open .nav-toggle__bars::before {
        transform: translateY(0.4rem) rotate(45deg);
    }

    .is-open .nav-toggle__bars::after {
        transform: translateY(-0.4rem) rotate(-45deg);
    }

    .js .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0;
        margin-top: 0.5rem;
        padding: 0.5rem 1.5rem;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 12px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
        font-size: 1.25rem;
    }

    .js .is-open .nav-list {
        display: flex;
    }

    .js .nav-list a {
        display: block;
        padding-block: 0.875rem;
        color: var(--ink);
    }

    .js .nav-list li + li {
        border-top: 1px solid var(--line);
    }

    .js .nav-list a[aria-current="page"] {
        text-decoration-thickness: 2px;
    }
}
