/* ===== PROJECT PAGE (PF26 "Project Page Template") =====
   Column: 952px, centred (280px side margins at 1512).
   Rhythm: media → 64 → text → 64 → media; consecutive media → 24. */

:root {
    --col: 952px;
    --line: #D9D9D9;
    --label: #82849A;      /* secondary text — same as --ink-muted */
    --media-radius: 24px;
}

body.project {
    background: var(--bg);
}

/* Text highlight in each project's own colour (carried over from portfolio '25,
   set per project as "selection" in content/projects.json) */
body.project ::selection {
    background: var(--selection, var(--accent));
    color: #FDFDFD;
}

/* Content sits above the fixed "Up next" footer and slides off it at the end (parallax reveal) */
.page {
    position: relative;
    z-index: 1;
    background: var(--bg);
    margin-bottom: 80vh;
    margin-bottom: 80dvh;
}

/* ===== ENTRY =====
   Elements rise and blur in on a spring, staggered 50ms apart in reading order.
   Spring: stiffness 140, damping 16, mass 1, initial velocity 4 (damping ratio 0.68:
   ~6% overshoot at 325ms, settled by 850ms). CSS can't run springs, so the curve is
   pre-computed and baked into linear() easings — exact to the spring, no JS needed.
   Movement uses the spring as-is (gentle overshoot); fade + blur use it capped at 1,
   since opacity/blur can't go past their end values.
   The page itself stays opaque, so the fixed footer behind it never shows through. */
:root {
    --spring-dur: 0.85s;
    --spring: linear(0, 0.0777 2%, 0.1696 4%, 0.2688 6%, 0.3703 8%, 0.4698 10%, 0.5644 12%, 0.6517 14%, 0.7306 16%, 0.8002 18%, 0.8602 20%, 0.9109 22%, 0.9526 24%, 0.9861 26%, 1.012 28%, 1.0314 30%, 1.045 32%, 1.0538 34%, 1.0585 36%, 1.0601 38%, 1.0592 40%, 1.0564 42%, 1.0523 44%, 1.0473 46%, 1.0418 48%, 1.0362 50%, 1.0306 52%, 1.0253 54%, 1.0203 56%, 1.0158 58%, 1.0118 60%, 1.0084 62%, 1.0055 64%, 1.0031 66%, 1.0011 68%, 0.9996 70%, 0.9984 72%, 0.9976 74%, 0.9971 76%, 0.9968 78%, 0.9967 80%, 0.9967 82%, 0.9968 84%, 0.997 86%, 0.9973 88%, 0.9976 90%, 0.9979 92%, 0.9982 94%, 0.9985 96%, 0.9988 98%, 1);
    --spring-capped: linear(0, 0.0777 2%, 0.1696 4%, 0.2688 6%, 0.3703 8%, 0.4698 10%, 0.5644 12%, 0.6517 14%, 0.7306 16%, 0.8002 18%, 0.8602 20%, 0.9109 22%, 0.9526 24%, 0.9861 26%, 1 28%, 1 30%, 1 32%, 1 34%, 1 36%, 1 38%, 1 40%, 1 42%, 1 44%, 1 46%, 1 48%, 1 50%, 1 52%, 1 54%, 1 56%, 1 58%, 1 60%, 1 62%, 1 64%, 1 66%, 1 68%, 0.9996 70%, 0.9984 72%, 0.9976 74%, 0.9971 76%, 0.9968 78%, 0.9967 80%, 0.9967 82%, 0.9968 84%, 0.997 86%, 0.9973 88%, 0.9976 90%, 0.9979 92%, 0.9982 94%, 0.9985 96%, 0.9988 98%, 1);
    --stagger: 0.05s;
}

.back,
.project-head h1,
.project-head .summary,
.meta > div,
.blocks > .block:nth-child(1),
.blocks > .block:nth-child(2) > * {
    opacity: 0;
    /* fallback for browsers without linear(): a close ease-out-back */
    animation:
        pp-rise var(--spring-dur) cubic-bezier(0.34, 1.3, 0.64, 1) calc(var(--i, 0) * var(--stagger)) both,
        pp-clear var(--spring-dur) cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i, 0) * var(--stagger)) both;
}

@supports (animation-timing-function: linear(0, 1)) {
    .back,
    .project-head h1,
    .project-head .summary,
    .meta > div,
    .blocks > .block:nth-child(1),
    .blocks > .block:nth-child(2) > * {
        animation:
            pp-rise var(--spring-dur) var(--spring) calc(var(--i, 0) * var(--stagger)) both,
            pp-clear var(--spring-dur) var(--spring-capped) calc(var(--i, 0) * var(--stagger)) both;
    }
}

@keyframes pp-rise {
    from { transform: translateY(12px); }
    to   { transform: none; }
}

@keyframes pp-clear {
    from { opacity: 0; filter: blur(12px); }
    to   { opacity: 1; filter: blur(0); }
}

/* stagger order (× 50ms) */
.back                         { --i: 0; }
.project-head h1              { --i: 1; }
.project-head .summary        { --i: 2; }
/* divider = 3 (below) */
.meta > div:nth-child(1)      { --i: 4; }
.meta > div:nth-child(2)      { --i: 5; }
.meta > div:nth-child(3)      { --i: 6; }
.meta > div:nth-child(4)      { --i: 7; }
.blocks > .block:nth-child(1) { --i: 8; }
/* the next block follows the media with a beat (skips 2 steps), then its parts stagger:
   heading, then text */
.blocks > .block:nth-child(2) > :nth-child(1) { --i: 11; }
.blocks > .block:nth-child(2) > :nth-child(2) { --i: 12; }
.blocks > .block:nth-child(2) > :nth-child(n + 3) { --i: 13; }

/* the divider draws in from the left on the same (capped) spring */
.meta {
    border-top-color: transparent !important;
    position: relative;
}

.meta::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -1px;
    height: 1px;
    background: var(--line);
    transform-origin: left center;
    transform: scaleX(0);
    animation: rule-in var(--spring-dur) cubic-bezier(0.22, 1, 0.36, 1) calc(3 * var(--stagger)) forwards;
}

@supports (animation-timing-function: linear(0, 1)) {
    .meta::before {
        animation-timing-function: var(--spring-capped);
    }
}

@keyframes rule-in {
    to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
    .back,
    .project-head h1,
    .project-head .summary,
    .meta > div,
    .blocks > .block:nth-child(1),
    .blocks > .block:nth-child(2) > * {
        animation: fade-in 0.3s ease-out forwards !important;
    }

    .meta::before {
        animation: none;
        transform: none;
    }
}

/* reveal on scroll (js/project.js): elements below the fold wait, then run the entry spring */
[data-reveal].is-pending {
    opacity: 0;
    animation: none;
}

[data-reveal].is-pending.is-revealed {
    animation:
        pp-rise var(--spring-dur) cubic-bezier(0.34, 1.3, 0.64, 1) both,
        pp-clear var(--spring-dur) cubic-bezier(0.22, 1, 0.36, 1) both;
}

@supports (animation-timing-function: linear(0, 1)) {
    [data-reveal].is-pending.is-revealed {
        animation:
            pp-rise var(--spring-dur) var(--spring) both,
            pp-clear var(--spring-dur) var(--spring-capped) both;
    }
}

/* ===== PROGRESSIVE EDGE BLUR =====
   Fixed bars at the top and bottom of the window built from stacked backdrop-blur layers,
   each masked to a band and blurring harder towards the edge, so content softens smoothly
   as it scrolls out (top) and sharpens as it comes in (bottom). Built by js/project.js. */
.edge-blur {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 4;
    height: calc(var(--edge, 88px) + 2px);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* bars overhang the window edge by 2px so no sliver of unblurred content shows through */
.edge-blur--top { top: -2px; }
.edge-blur--bottom { bottom: -2px; --edge: 112px; }

.edge-blur > span {
    position: absolute;
    inset: 0;
    -webkit-backdrop-filter: blur(var(--b));
    backdrop-filter: blur(var(--b));
    -webkit-mask-image: linear-gradient(var(--dir), transparent var(--s0), #000 var(--s1), #000 var(--s2), transparent var(--s3));
    mask-image: linear-gradient(var(--dir), transparent var(--s0), #000 var(--s1), #000 var(--s2), transparent var(--s3));
}

/* a whisper of the page colour right at the edge so the blur fades into the background */
.edge-blur::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(var(--dir), rgba(242, 242, 242, 0) 0%, rgba(242, 242, 242, 0.55) 100%);
}

.edge-blur--top { --dir: to top; }
.edge-blur--bottom { --dir: to bottom; }

.project-main {
    width: min(var(--col), calc(100% - 2 * var(--gutter)));
    margin: 0 auto;
    padding: 120px 0 180px;
}

/* Back arrow */
.back {
    display: inline-block;
    width: 40px;
    height: 40px;
    margin-bottom: 40px;
}

/* The nudge lives on the image: the link itself runs the entry animation, which holds its
   transform after finishing and would override a hover transform on the same element */
.back img {
    display: block;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Title + summary */
.project-head h1 {
    margin: 0;
    font-weight: 700;
    font-size: 40px;
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.project-head .summary {
    margin-top: 8px;
    max-width: 530px;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: -0.02em;
    color: var(--ink-muted);
    font-feature-settings: "liga" 0;
}

/* Meta row: divider, then up to four label/value columns spread across the column */
.meta {
    display: flex;
    justify-content: space-between;
    gap: 24px 40px;
    flex-wrap: wrap;
    margin: 24px 0 0;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.meta div,
.notes div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta dt,
.notes dt {
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--label);
}

.meta dd,
.notes dd {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: var(--ink);
}

/* ===== BLOCKS ===== */
.blocks {
    margin-top: 64px;
}

/* Gap between a media block and a text block (consecutive media keep 24px below) */
.block + .block {
    margin-top: 96px;
}

.media + .media {
    margin-top: 24px;
}

/* Text: heading (400) + 24 gap + body (528) */
.block--text {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.block--text h2 {
    flex: 0 0 400px;
    margin: 0;
    font-weight: 600;
    font-size: 24px;
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: var(--ink);
    font-feature-settings: "liga" 0;
}

.block-body {
    flex: 1 1 528px;
    max-width: 528px;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: -0.02em;
    color: var(--ink);
    font-feature-settings: "liga" 0;
}

.block-body p + p {
    margin-top: 16px;
}

.block-body a,
.meta a,
.notes a,
.summary a {
    color: var(--accent);
}

/* Notes (discoveries, quotes, feedback…) inside a text block */
.notes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 0;
}

.block-body p + .notes,
.notes + p {
    margin-top: 24px;
}

.notes dd {
    line-height: 1.6;
}

/* Media */
.media {
    margin: 0;
    border-radius: var(--media-radius);
    overflow: hidden;
    background: #E6E6E6;
}

.media > img,
.media > video {
    display: block;
    width: 100%;
    height: auto;
}

.media--embed {
    position: relative;
    aspect-ratio: 952 / 535;
    background: #1C1C1C;
}

.media--embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Local-preview stand-in for YouTube embeds (see js/project.js) */
.embed-poster {
    position: absolute;
    inset: 0;
    display: block;
}

.embed-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.embed-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    transform: translate(-50%, -50%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.embed-play::after {
    content: '';
    position: absolute;
    left: 33px;
    top: 26px;
    border-left: 22px solid var(--ink);
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
}

.embed-poster:hover .embed-play {
    transform: translate(-50%, -50%) scale(1.08);
}

/* Two phones side by side on a dark panel (Circles) */
.media--phones {
    display: flex;
    justify-content: center;
    gap: 12%;
    padding: 48px 8%;
    background: #1F1F1F;
}

.phone {
    position: relative;
    width: 34%;
    max-width: 300px;
    aspect-ratio: 438 / 904;
}

.phone-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.phone-screen {
    position: absolute;
    width: calc(100% / 1.08);
    height: calc(100% / 1.032);
    left: calc((100% - 100% / 1.08) / 2);
    top: calc((100% - 100% / 1.032) / 2 + 0.25%);
    border-radius: 9%/4.4%;
    overflow: hidden;
    z-index: 1;
}

.phone-screen video,
.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* A row of images on a tinted panel (Weathermate mockups) */
.media--row {
    display: flex;
    justify-content: center;
    gap: 6%;
    padding: 56px 8%;
    background: color-mix(in srgb, var(--project) 10%, #FFFFFF);
}

.media--row img {
    width: 26%;
    height: auto;
}

/* Gesture animations (Arkade) */
.media--gestures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px 24px;
    padding: 56px 40px;
    background: #0A0A0A;
}

.gesture {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.gesture-anim {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 16 / 9;
}

.gesture p {
    color: #FFFFFF;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: -0.02em;
    max-width: 220px;
}

/* ===== LIGHTBOX (js/project.js) ===== */
.zoomable {
    cursor: zoom-in;
}

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

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 50;
    visibility: hidden;
    pointer-events: none;
}

.lightbox.is-open {
    visibility: visible;
    pointer-events: auto;
}

/* stays visible while the image shrinks back into the page on close */
.lightbox.is-closing {
    visibility: visible;
}

.lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 16, 18, 0.9);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox.is-open .lb-backdrop {
    opacity: 1;
}

.lb-scroll {
    position: absolute;
    inset: 0;
    overflow: hidden;
    overscroll-behavior: contain;
}

.lightbox.is-tall .lb-scroll {
    overflow-y: auto;
    cursor: zoom-out;
}

.lb-img {
    position: absolute;
    display: block;
    object-fit: contain;
    transform-origin: 0 0;
    border-radius: 12px;
    cursor: default;
    will-change: transform;
}

/* tall images scroll: spacer below so the bottom of the image clears the controls */
.lb-spacer {
    position: absolute;
    left: 0;
    width: 1px;
    height: 80px;
    pointer-events: none;
}

.lb-btn {
    position: absolute;
    z-index: 2;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.2s ease, transform 0.2s ease;
}

.lightbox.is-open .lb-btn {
    opacity: 1;
}

.lb-btn:hover,
.lb-btn:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    outline: none;
}

.lb-close { top: 16px; right: 16px; }
.lb-prev  { left: 24px; top: 50%; margin-top: -22px; }
.lb-next  { right: 24px; top: 50%; margin-top: -22px; }
.lb-prev:hover { transform: translateX(-2px); }
.lb-next:hover { transform: translateX(2px); }

.lb-count {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    letter-spacing: -0.01em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.is-open .lb-count {
    opacity: 1;
}

.lightbox.is-single .lb-prev,
.lightbox.is-single .lb-next,
.lightbox.is-single .lb-count {
    display: none;
}

@media (max-width: 760px) {
    .lb-prev,
    .lb-next {
        top: auto;
        bottom: 12px;
        margin-top: 0;
    }

    .lb-prev { left: 16px; }
    .lb-next { right: 16px; }

    .lb-count { bottom: 22px; }
}

/* ===== UP NEXT FOOTER (fixed; revealed as the page scrolls off it) ===== */
.up-next {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 80vh;
    height: 80dvh;
    z-index: 0;
    overflow: hidden;
    background: var(--next);
    visibility: hidden;      /* shown by js/project.js only once the page has scrolled to it */
}

.up-next-link {
    position: absolute;
    inset: 0;
    display: block;
    color: #FDFDFD;
}

.up-next-text {
    position: absolute;
    left: 14.55%;             /* 220 / 1512 */
    top: 36.3%;               /* 363 / 1000 */
    z-index: 2;
    will-change: transform;
}

.up-next-label {
    position: relative;
    display: inline-block;
    padding-bottom: 9px;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.75);
}

.up-next-label::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 1px;
    background: rgba(255, 255, 255, 0.75);
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.up-next-link:hover .up-next-label::after,
.up-next-link:focus-visible .up-next-label::after {
    width: 100%;
}

.up-next-title {
    margin: 64px 0 0;
    font-weight: 600;
    font-size: 80px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #FDFDFD;
    font-feature-settings: "calt" 0, "liga" 0;
}

/* Illustration of the next project, bleeding off the bottom-right corner */
.up-next-art {
    position: absolute;
    right: -6%;
    bottom: -8%;
    width: 36.4%;            /* 70% of the earlier size */
    max-width: 616px;
    height: auto;
    z-index: 1;
    transform: rotate(-15deg);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.up-next-link:hover .up-next-art {
    transform: rotate(-12deg) scale(1.03);
}

/* Per-project art tweaks */
.up-next-art--arkade { width: 40.6%; right: -4%; bottom: -4%; transform: none; }
.up-next-link:hover .up-next-art--arkade { transform: scale(1.03); }
.up-next-art--audioviz { left: 15%; right: auto; width: 70%; max-width: none; bottom: -2%; transform: none; }
.up-next-link:hover .up-next-art--audioviz { transform: none; }
.up-next-art--circles { width: 42%; right: -12%; bottom: -21%; }
.up-next-art--medicab { width: 28%; }
.up-next-art--odyssey { width: 32.2%; }

/* ===== SCROLL TO TOP (with scroll progress ring) ===== */
.to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 5;
    width: 80px;
    height: 80px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 4px 20px rgba(26, 27, 33, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: translateY(150px);
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.to-top.is-visible {
    transform: translateY(0);
    pointer-events: auto;
}

.to-top.is-visible:hover {
    transform: translateY(-4px);
}

.to-top-ring {
    position: absolute;
    inset: 0;
    transform: rotate(-90deg);
}

.to-top-ring circle {
    stroke: var(--project);
    transition: stroke-dashoffset 0.1s linear;
}

.to-top img {
    position: relative;
}

/* ===== PASSWORD GATE (Circles) ===== */
.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.auth-card {
    width: 440px;
    max-width: calc(100vw - 48px);
    padding: 48px;
    border-radius: 24px;
    background: #FFFFFF;
    box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.1), 0 4px 20px rgba(26, 27, 33, 0.08);
    text-align: center;
    display: flex;
    flex-direction: column;
}

.auth-title {
    margin: 0 0 8px;
    font-weight: 700;
    font-size: 40px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.auth-desc {
    margin: 0 0 28px;
    color: var(--ink-muted);
    font-size: 16px;
    letter-spacing: -0.02em;
}

.auth-form {
    margin: 0 0 32px;
}

.auth-input-wrap {
    position: relative;
}

.auth-input {
    width: 100%;
    height: 56px;
    padding: 0 56px 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--bg);
    color: var(--ink);
    font: 500 16px var(--font-body);
    outline: none;
}

.auth-input:focus {
    border-color: var(--line);
}

.auth-input::placeholder {
    color: var(--ink-muted);
}

.auth-submit {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-submit-icon {
    width: 20px;
    height: 20px;
    background: url('../assets/ui/top-arrow.svg') center / contain no-repeat;
    filter: invert(1);
    transform: rotate(90deg);
}

.auth-back {
    color: var(--ink-muted);
    font-size: 14px;
}

.auth-error {
    min-height: 20px;
    margin: 12px 0 0;
    color: #E5484D;
    font-size: 14px;
    text-align: left;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.auth-error.show {
    opacity: 1;
}

.auth-input[aria-invalid="true"] {
    border-color: #E5484D;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .block--text h2 {
        flex-basis: 34%;
    }
}

@media (max-width: 760px) {
    .project-main {
        padding: 72px 0 120px;
    }

    .edge-blur--top { --edge: 56px; }
    .edge-blur--bottom { --edge: 72px; }

    .back {
        margin-bottom: 32px;
    }

    .project-head h1 {
        font-size: 32px;
    }

    .meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px 24px;
    }

    .blocks {
        margin-top: 48px;
    }

    .block + .block {
        margin-top: 64px;
    }

    .media + .media {
        margin-top: 16px;
    }

    .block--text {
        flex-direction: column;
        gap: 12px;
    }

    .block--text h2 {
        flex: none;
        font-size: 22px;
    }

    .block-body {
        flex: none;          /* stacked: the desktop 528px flex-basis would become a min-height */
        max-width: none;
    }

    .notes {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    :root {
        --media-radius: 16px;
    }

    .media--phones {
        padding: 32px 6%;
        gap: 8%;
    }

    .phone {
        width: 42%;
    }

    .media--gestures {
        grid-template-columns: 1fr 1fr;
        padding: 32px 16px;
        gap: 24px 12px;
    }

    .gesture p {
        font-size: 13px;
    }

    .up-next-text {
        left: var(--gutter);
        top: 30%;
    }

    .up-next-title {
        margin-top: 40px;
        font-size: 48px;
    }

    .up-next-art {
        width: 63%;
        right: -14%;
    }

    .up-next-art--arkade { width: 77%; right: -8%; }
    .up-next-art--circles { width: 77%; right: -28%; }

    .to-top {
        display: none;
    }
}
