@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/playfair-display-v30-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/montserrat-v25-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/montserrat-v25-latin-700.woff2') format('woff2');
}

:root {
    --bg: #ececec;
    --bg-rgb: 236, 236, 236;
    --ink: #141414;
    --muted: #4f5357;
    --line: rgba(20, 20, 20, .14);
    --glass: rgba(255, 255, 255, .66);
    --glass-border: 1px solid rgba(255, 255, 255, .7);
    --accent: #9c7a45;
    --pad: clamp(20px, 4vw, 56px);
    --radius: 14px;
    --serif: 'Playfair Display', Georgia, serif;
    --ease: cubic-bezier(.2, .7, .2, 1);
    /* These two belong together: the backdrop is scaled up so the portrait
       sits in the right half, and the content column is sized to stay clear
       of it. The scale is repeated in the <img sizes> of both pages (132vw). */
    --backdrop-scale: 1.32;
    --col: min(580px, 40vw);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 16px/1.6 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

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

.skip-link {
    position: absolute;
    left: -9999px;
}

.skip-link:focus {
    left: var(--pad);
    top: 12px;
    z-index: 10;
    padding: 8px 14px;
    background: var(--ink);
    color: #fff;
}

/* Full-bleed portrait. The box is larger than the viewport and anchored
   top-left, which pushes the subject into the right half and keeps the
   left half free for content. */
.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    width: calc(100vw * var(--backdrop-scale));
    height: calc(100vh * var(--backdrop-scale));
    height: calc(100lvh * var(--backdrop-scale));
    pointer-events: none;
}

.backdrop img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Left-anchored: on tall windows the surplus width is cropped on the
       right, so the portrait never slides under the content column. */
    object-position: 0 0;
}

.shell {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(18px, 2.6vw, 34px) var(--pad);
}

/* Small uppercase labels; each rule sets its own size and tracking. */
.nav,
.eyebrow,
.section-title,
.more,
.timeline__when,
.badge span,
.card__link,
.facts dt,
.details dt,
.bottom {
    font-weight: 700;
    text-transform: uppercase;
}

.eyebrow,
.section-title {
    display: flex;
    align-items: center;
    font-size: .74rem;
    letter-spacing: .22em;
}

/* Header */
.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-width: var(--col);
    width: max-content;
    max-width: 100%;
}

.brand img {
    display: block;
    width: 68px;
    height: 68px;
}

.nav {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.7vw, 26px);
    font-size: .74rem;
    letter-spacing: .16em;
}

.nav a {
    padding: 6px 0;
    text-decoration: none;
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
    transition: background-size .3s ease;
}

.nav a:hover,
.nav a:focus-visible,
.nav a[aria-current="page"] {
    background-size: 100% 1px;
}

/* Language switch */
.lang {
    display: flex;
    padding: 2px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: .66rem;
    letter-spacing: .1em;
}

.lang a,
.lang span {
    padding: 3px 9px;
    border-radius: 999px;
    background: none;
    transition: background-color .25s ease;
}

.lang a:hover,
.lang a:focus-visible {
    background: var(--line);
}

.lang [aria-current] {
    background: var(--ink);
    color: #fff;
}

/* Speaker button: plays the spoken company name (js/pronounce.js) */
.speaker {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin: 0 -7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: inherit;
    cursor: pointer;
    transition: background-color .25s ease, color .25s ease;
}

.speaker:hover,
.speaker.is-playing {
    background: var(--ink);
    color: #fff;
}

.speaker__wave {
    opacity: .45;
    transition: opacity .25s ease;
}

.speaker:hover .speaker__wave,
.speaker.is-playing .speaker__wave {
    opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
    .speaker.is-playing .speaker__wave {
        animation: pulse .7s ease-in-out infinite alternate;
    }

    .speaker.is-playing .speaker__wave + .speaker__wave {
        animation-delay: .2s;
    }
}

@keyframes pulse {
    from {
        opacity: .25;
    }
}

/* Content column */
.content {
    align-self: center;
    width: var(--col);
    padding: clamp(24px, 4vh, 56px) 0;
}

.eyebrow {
    gap: 14px;
    margin: 0 0 22px;
}

.eyebrow::before {
    content: '';
    width: 36px;
    height: 2px;
    background: var(--accent);
}

.headline {
    margin: 0;
    font: 400 clamp(2.1rem, 3.7vw, 3.5rem)/1.12 var(--serif);
    letter-spacing: -.01em;
    text-wrap: balance;
}

.lede {
    margin: 22px 0 0;
    max-width: 30em;
    color: var(--muted);
    font-size: clamp(.95rem, 1.1vw, 1.05rem);
}

.lede a {
    color: var(--ink);
    text-underline-offset: 3px;
}

/* Link below the intro text */
.more {
    margin: 22px 0 0;
    font-size: .74rem;
    letter-spacing: .16em;
}

.more a {
    text-decoration: none;
}

.more a:hover .arrow,
.more a:focus-visible .arrow {
    transform: translateX(4px);
}

/* Projects */
.projects,
.legal,
.cv {
    margin-top: clamp(30px, 5vh, 56px);
}

.section-title {
    gap: 16px;
    margin: 0 0 18px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

.cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(14px, 1.6vw, 22px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: var(--glass-border);
    border-radius: var(--radius);
    background: var(--glass);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    backdrop-filter: blur(18px) saturate(1.2);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 14px 34px -18px rgba(0, 0, 0, .35);
    text-decoration: none;
    transition: transform .35s var(--ease), box-shadow .35s ease;
}

a.card:hover,
a.card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 26px 44px -20px rgba(0, 0, 0, .45);
}

.card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #1b1b1b;
}

.card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease);
}

.card__media--neuy img {
    object-position: 50% 24%;
}

a.card:hover .card__media img,
a.card:focus-visible .card__media img {
    transform: scale(1.05);
}

.card--soon .card__media img {
    filter: blur(14px) saturate(.9);
    transform: scale(1.25);
}

.badge {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.badge span {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 999px;
    background: rgba(20, 20, 20, .45);
    color: #fff;
    font-size: .68rem;
    letter-spacing: .2em;
}

.card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px 18px;
}

.card__title {
    margin: 0;
    font: 400 1.3rem/1.2 var(--serif);
}

.card__text {
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.5;
}

.card__link {
    margin-top: auto;
    padding-top: 10px;
    font-size: .72rem;
    letter-spacing: .12em;
}

.arrow {
    display: inline-block;
    transition: transform .3s ease;
}

a.card:hover .arrow,
a.card:focus-visible .arrow {
    transform: translate(3px, -3px);
}

.card--soon .card__link {
    color: var(--muted);
}

/* Imprint */
.legal .card {
    padding: clamp(20px, 2.4vw, 30px);
}

/* Both lists share the same label column so the values line up. */
.facts,
.details {
    display: grid;
    grid-template-columns: 11.5rem 1fr;
    column-gap: 28px;
}

.facts {
    margin: 0 0 22px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.facts dt,
.details dt {
    color: var(--muted);
    font-size: .68rem;
    letter-spacing: .16em;
}

.facts dd {
    margin: 2px 0 0;
    font: 400 1.5rem/1.2 var(--serif);
}

.details {
    row-gap: 14px;
    margin: 0;
    font-size: .92rem;
    line-height: 1.55;
}

.details dt {
    padding-top: .3em;
}

.details dd {
    margin: 0;
}

.details a {
    text-underline-offset: 3px;
}

/* CV */
.timeline,
.plain {
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.timeline li:first-child {
    padding-top: 0;
}

.timeline li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.timeline p,
.timeline h3 {
    margin: 0;
}

.timeline__when {
    color: var(--muted);
    font-size: .68rem;
    letter-spacing: .16em;
}

.timeline__role {
    margin-top: 4px;
    font: 400 1.3rem/1.25 var(--serif);
}

.timeline__org {
    font-size: .9rem;
    font-weight: 700;
}

.timeline__text,
.plain,
.cv__note,
.cv__source {
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.55;
}

.timeline .timeline__text {
    margin-top: 8px;
}

.plain li + li {
    margin-top: 8px;
}

.plain__when {
    margin-right: 8px;
    color: var(--ink);
    font-weight: 700;
}

.cv__note {
    margin: -6px 0 14px;
}

.cv__source {
    margin: clamp(30px, 5vh, 56px) 0 0;
}

.timeline__org a,
.cv__source a {
    color: var(--ink);
    text-underline-offset: 3px;
}

/* Footer */
.bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
    width: var(--col);
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .7rem;
    letter-spacing: .14em;
}

.bottom nav {
    display: flex;
    align-items: baseline;
    gap: 20px;
}

/* The icon sits on the text baseline and is about as tall as the capitals.
   Its glyph ends 1/8 above the bottom of the viewBox, hence the offset. */
.bottom .icon svg {
    display: block;
    width: 1.1em;
    height: 1.1em;
    margin-bottom: -.1375em;
}

.bottom a {
    text-decoration: none;
}

.bottom a:hover,
.bottom a:focus-visible {
    color: var(--ink);
}

/* Entrance */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        animation: rise .8s var(--ease) both;
        animation-delay: calc(var(--i, 0) * 90ms + 80ms);
    }

    .backdrop img {
        animation: fade 1.1s ease both;
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
}

@keyframes fade {
    from {
        opacity: 0;
    }
}

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

    .card,
    .card__media img,
    .arrow,
    .nav a {
        transition: none;
    }
}

/* Narrow column: stack labels above values. */
@media (max-width: 1200px) {
    .facts {
        grid-template-columns: 1fr 1fr;
    }

    .details {
        grid-template-columns: 1fr;
        row-gap: 2px;
    }

    .details dd {
        margin-bottom: 14px;
    }

    .details dd:last-child {
        margin-bottom: 0;
    }
}

/* Tablet & mobile: portrait fills the screen, intro sits on a soft scrim at
   the bottom of the first screen, projects follow on a frosted panel. */
@media (max-width: 900px) {
    /* Darker secondary text: small grey type is hard to read on phones. */
    :root {
        --muted: #2f3236;
    }

    .backdrop {
        --backdrop-scale: 1;
    }

    .backdrop img {
        object-position: 53% 0;
    }

    .shell {
        display: block;
        padding: 0;
    }

    .top {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        width: auto;
        min-width: 0;
        padding: 14px var(--pad);
    }

    .brand img {
        width: 54px;
        height: 54px;
    }

    .nav {
        gap: 18px;
        padding: 4px 16px;
        border: var(--glass-border);
        border-radius: 999px;
        background: var(--glass);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        font-size: .68rem;
    }

    .content {
        width: auto;
        padding: 0;
    }

    .intro {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        min-height: 100vh;
        min-height: 100svh;
        padding: 0 var(--pad) 34px;
        /* Solid from about where the text starts, so nothing of the dark
           jacket shows through behind it. */
        background: linear-gradient(to bottom,
                rgba(var(--bg-rgb), 0) 34%,
                rgba(var(--bg-rgb), .9) 54%,
                var(--bg) 66%);
    }

    .headline {
        font-size: clamp(1.9rem, 7.4vw, 2.9rem);
    }

    .projects,
    .legal,
    .cv {
        margin: 0;
        padding: 34px var(--pad) 40px;
        background: var(--bg);
    }

    /* The panels above are opaque, so there is nothing left to blur. */
    .card {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .cv__source {
        margin: 0;
        padding: 0 var(--pad) 34px;
        background: var(--bg);
    }

    .timeline__text,
    .plain,
    .cv__note,
    .cv__source {
        font-size: 1rem;
        line-height: 1.6;
    }

    .timeline__when {
        font-size: .74rem;
    }

    .timeline__org {
        font-size: .95rem;
    }

    .bottom {
        width: auto;
        padding: 18px var(--pad) 26px;
        border-top: 0;
        background: var(--bg);
        box-shadow: inset 0 1px 0 var(--line);
    }
}

@media (max-width: 560px) {
    .nav__optional {
        display: none;
    }

    .nav {
        gap: 12px;
        padding: 4px 6px 4px 12px;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    /* Footer links take their own full-width row; the icon moves to the right edge. */
    .bottom nav {
        flex-basis: 100%;
    }

    .bottom .icon {
        margin-left: auto;
    }

    .card__media {
        aspect-ratio: 16 / 10;
    }
}

/* Smallest phones: tighten the menu pill so it still fits next to the logo. */
@media (max-width: 380px) {
    .top {
        gap: 12px;
    }

    .nav {
        gap: 8px;
        padding: 4px 4px 4px 8px;
        letter-spacing: .1em;
    }

    .lang a,
    .lang span {
        padding: 3px 7px;
    }
}
