/* About page (about.html, body.about-v2).
   An editorial page in the site's own type: a large lead line, a portrait
   beside the bio, then index sections — a small uppercase label on the left,
   the content on the right — split by the site's dashed rule. */

body.about-v2 {
    --ab-ink: #0F0F0F;
    --ab-muted: rgba(15, 15, 15, 0.5);
    --ab-soft: rgba(15, 15, 15, 0.72);
    --ab-dash: rgba(15, 15, 15, 0.22);
    --ab-photo-bg: #E6E6E4;
}

html[data-theme="dark"] body.about-v2 {
    --ab-ink: #EDEDEC;
    --ab-muted: rgba(237, 237, 236, 0.5);
    --ab-soft: rgba(237, 237, 236, 0.72);
    --ab-dash: rgba(255, 255, 255, 0.2);
    --ab-photo-bg: #222221;
}

.ab {
    padding-bottom: 8px;
    color: var(--ab-ink);
    font-family: 'PP Neue Montreal', sans-serif;
}

/* 1. Portrait beside the lead line and bio ------------------------------ */
.ab-intro {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    align-items: start;
    padding-top: 56px;
    padding-bottom: 96px;
}

.ab-lead {
    margin: 0 0 32px;
    font-size: clamp(32px, 3.3vw, 50px);
    font-weight: 400;
    line-height: 1.06;
    letter-spacing: -0.035em;
    color: var(--ab-ink);
}

.ab-side {
    grid-column: 1 / span 4;
}

.ab-photo {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 20px;
    background: var(--ab-photo-bg);
    container-type: inline-size;
}

.ab-photo img {
    display: block;
    width: 100%;
    /* A touch shorter than the frame, so the portrait is smaller with air
       above the head; the strip left at the bottom sits under the glass. */
    height: 91%;
    object-fit: cover;
    object-position: 50% 0;
}

.ab-bio {
    grid-column: 6 / -1;
    max-width: 720px;
}

.ab-bio > p {
    margin: 0 0 16px;
    font-size: clamp(20px, 1.7vw, 24px);
    line-height: 1.35;
    letter-spacing: -0.015em;
    color: var(--ab-soft);
}

/* Contacts sit on the bottom of the photo on a pane of dark smoked glass
   with a crisp top edge, so white text and the orange hover read. */
.ab-contact {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 18px 20px 18px;
    color: #fff;
}

.ab-contact::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(14, 14, 14, 0.62);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    backdrop-filter: blur(20px) saturate(1.3);
    /* The glass's cut edge catches the light. */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.ab-hello {
    position: relative;
    display: inline-block;
    margin: 0 0 10px;
    font-size: 21px;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: #fff;
}

.ab-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

/* Links in the nav's voice, with the site's marching dashed underline. */
.ab-link {
    position: relative;
    font-size: 12px;
    line-height: 20px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    transition: color 200ms ease;
}

.ab-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 2px;
    background-image: linear-gradient(90deg, currentColor 6px, transparent 6px);
    background-size: 10px 2px;
    background-repeat: repeat-x;
    opacity: 0;
    transition: opacity 200ms ease;
    animation: hover-dash-march 600ms linear infinite paused;
}

@media (hover: hover) and (pointer: fine) {
    .ab-link:hover {
        color: rgb(255, 72, 16);
    }

    .ab-link:hover::after {
        opacity: 1;
        animation-play-state: running;
    }
}

.ab-link:focus-visible {
    outline: none;
    color: rgb(255, 72, 16);
}

.ab-link:focus-visible::after {
    opacity: 1;
}

/* A few plain facts under the bio, label over value. */
.ab-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: 40px 0 0;
    padding-top: 24px;
    background: linear-gradient(90deg, var(--ab-dash) 6px, transparent 6px) 0 0 / 10px 1px repeat-x;
}

.ab-facts dt {
    margin-bottom: 6px;
    font-size: 12px;
    line-height: 18px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ab-muted);
}

.ab-facts dd {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
    color: var(--ab-ink);
}

/* Fun: pointing at a contact link waves a hand after "Say hello". */
body.about-v2:has(.ab-link:hover) .about-wave,
body.about-v2:has(.ab-link:focus-visible) .about-wave {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    transition: opacity 120ms ease, transform 320ms cubic-bezier(0.3, 1.8, 0.5, 1);
    animation: about-wave 1200ms ease-in-out 280ms infinite;
}

/* 2. Index sections ----------------------------------------------------- */
.ab-section {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    padding-bottom: 88px;
}

/* The dashed rule opens each section as its own full-width line, with
   room under it (as a background it hugged the content). */
.ab-section::before {
    content: '';
    grid-column: 1 / -1;
    height: 1px;
    margin-bottom: 72px;
    background: linear-gradient(90deg, var(--ab-dash) 6px, transparent 6px) 0 0 / 10px 1px repeat-x;
}

.ab-label {
    grid-column: 1 / span 4;
    margin: 0;
    padding-top: 2px;
    font-size: 13px;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ab-muted);
}

.ab-body {
    /* Same column as the bio above, so text runs on one line down the page. */
    grid-column: 6 / -1;
}

/* Experience rows: years, company (with city), role, [ + ]. */
.ab .exp {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ab .exp-row {
    display: grid;
    grid-template-columns: 132px minmax(0, 1.1fr) minmax(0, 1fr) 48px;
    column-gap: 24px;
    align-items: baseline;
    padding: 18px 0 20px;
    cursor: default;
    outline: none;
}

.ab .exp-row + .exp-row {
    background: linear-gradient(90deg, var(--ab-dash) 6px, transparent 6px) 0 0 / 10px 1px repeat-x;
}

.ab .exp-row:first-child {
    padding-top: 0;
}

.ab .exp-date {
    font-size: 14px;
    line-height: 24px;
    font-variant-numeric: tabular-nums;
    color: var(--ab-muted);
    white-space: nowrap;
}

.ab .exp-co {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ab .exp-name,
.ab .exp-role {
    font-size: 20px;
    line-height: 24px;
    letter-spacing: -0.015em;
    color: var(--ab-ink);
    transition: color 200ms ease;
}

.ab .exp-city {
    font-size: 14px;
    line-height: 20px;
    color: var(--ab-muted);
}

.ab .exp-toggle {
    justify-self: end;
    font-size: 15px;
    line-height: 24px;
    white-space: pre;
    color: var(--ab-muted);
    transition: color 200ms ease;
}

.ab .exp-toggle::before { content: '[ '; }
.ab .exp-toggle::after { content: ' ]'; }

.ab .exp-plus {
    display: inline-block;
    transition: transform 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ab .exp-row.is-active .exp-plus,
.ab .exp-row.is-open .exp-plus {
    transform: rotate(45deg);
}

.ab .exp-row.is-active .exp-name,
.ab .exp-row.is-active .exp-role,
.ab .exp-row.is-active .exp-toggle,
.ab .exp-row:focus-visible .exp-name {
    color: rgb(255, 72, 16);
}

/* Details: read by screen readers, opened in place on touch; on a mouse
   they show in the floating card (script in about.html, .xp-card). */
.ab .exp-details {
    display: none;
    grid-column: 2 / -1;
    margin: 14px 0 0;
    padding: 0 0 0 18px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--ab-soft);
}

.ab .exp-details li + li {
    margin-top: 6px;
}

.ab .exp-row.is-open .exp-details {
    display: block;
}

.ab-hint {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 18px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ab-muted);
}

.ab-hint {
    font-size: 0;
}

.ab-hint::after {
    content: 'Hover a row for details';
    font-size: 12px;
    letter-spacing: 0.14em;
}

@media not all and (hover: hover) and (pointer: fine) {
    .ab-hint::after {
        content: 'Tap a row for details';
    }

    .ab .exp-row {
        cursor: pointer;
    }
}

/* What I do */
.ab-do {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ab-do-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    column-gap: 24px;
    padding: 18px 0 20px;
}

.ab-do-row:first-child {
    padding-top: 0;
}

.ab-do-row + .ab-do-row {
    background: linear-gradient(90deg, var(--ab-dash) 6px, transparent 6px) 0 0 / 10px 1px repeat-x;
}

.ab-do-name {
    font-size: 20px;
    line-height: 24px;
    letter-spacing: -0.015em;
}

.ab-do-note {
    font-size: 16px;
    line-height: 1.45;
    color: var(--ab-soft);
}

/* Hobbies: one line; "football" drops a ball, "travelling" throws a paper
   plane, "films" starts a twist and "photography" runs a strip of film
   (scripts in about.html). */
.ab-hobbies {
    max-width: 640px;
    margin: 0;
    font-size: clamp(20px, 1.7vw, 24px);
    line-height: 1.35;
    letter-spacing: -0.015em;
    color: var(--ab-soft);
}

.ab-hobby-trigger {
    position: relative;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    letter-spacing: inherit;
    color: var(--ab-ink);
    cursor: pointer;
    transition: color 200ms ease;
}

/* A quiet dashed line hints it can be clicked; on hover it marches. */
.ab-hobby-trigger::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background-image: linear-gradient(90deg, currentColor 6px, transparent 6px);
    background-size: 10px 2px;
    background-repeat: repeat-x;
    opacity: 0.35;
    transition: opacity 200ms ease;
    animation: hover-dash-march 600ms linear infinite paused;
}

@media (hover: hover) and (pointer: fine) {
    .ab-hobby-trigger:hover {
        color: rgb(255, 72, 16);
    }

    .ab-hobby-trigger:hover::after {
        opacity: 1;
        animation-play-state: running;
    }
}

.ab-hobby-trigger:focus-visible {
    outline: none;
    color: rgb(255, 72, 16);
}

.ab-hobby-trigger:focus-visible::after {
    opacity: 1;
}

/* The ball: fixed over the page, moved by script; kick it to keep it up. */
.ab-ball,
.ab-ball-shadow,
.ab-ball-count {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1200;
    will-change: transform;
}

.ab-ball {
    width: 72px;
    height: 72px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    cursor: grab;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 400ms ease;
}

.ab-ball:focus-visible {
    outline: 2px dashed rgb(255, 72, 16);
    outline-offset: 4px;
}

.ab-ball.is-gone {
    opacity: 0;
}

.ab-ball-squash {
    position: relative;
    width: 100%;
    height: 100%;
    transform-origin: 50% 100%;
}

.ab-ball-spin {
    position: relative;
    width: 100%;
    height: 100%;
}

.ab-ball-spin > img:first-child {
    display: block;
    width: 100%;
    height: 100%;
}

/* The crest is printed on the ball's front panel: it fits inside the
   panel's seams and turns with the ball under the same light. Kept sharp:
   a blend or blur here made it a smudge on iPhone. */
.ab-ball-crest {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 34%;
    height: 34%;
    object-fit: contain;
    transform: translate(-50%, -50%);
    opacity: 0.95;
    pointer-events: none;
}

/* Light from the top left; it does not turn with the ball. */
.ab-ball-squash::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 38%),
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0.28) 100%);
    pointer-events: none;
}

.ab-ball-shadow {
    width: 64px;
    height: 10px;
    margin-left: -32px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0));
    pointer-events: none;
    transition: opacity 400ms ease;
}

.ab-ball-count {
    font-size: 12px;
    line-height: 18px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
    color: rgb(255, 72, 16);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 200ms ease;
}

.ab-ball-count.is-on {
    opacity: 1;
}

/* Tablet: bio under a smaller photo. */
@media (max-width: 1023px) {
    .ab-side {
        grid-column: 1 / span 5;
    }

    .ab-bio {
        grid-column: 7 / -1;
    }

    .ab-label {
        grid-column: 1 / -1;
        margin-bottom: 24px;
    }

    .ab-body {
        grid-column: 1 / -1;
    }
}

/* Phone: one column throughout. */
@media (max-width: 768px) {
    .ab-intro {
        display: block;
        padding-top: 24px;
        padding-bottom: 64px;
    }

    .ab-lead {
        margin-bottom: 24px;
    }

    .ab-ball {
        width: 60px;
        height: 60px;
    }

    .ab-photo {
        max-width: 320px;
    }

    .ab-side {
        margin-bottom: 40px;
    }

    .ab-facts {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .ab-section {
        display: block;
        padding-bottom: 56px;
    }

    .ab-section::before {
        display: block;
        margin-bottom: 48px;
    }

    .ab .exp-row {
        grid-template-columns: minmax(0, 1fr) auto;
        row-gap: 4px;
    }

    .ab .exp-date { grid-column: 1; grid-row: 1; }
    .ab .exp-toggle { grid-column: 2; grid-row: 1; }
    .ab .exp-co { grid-column: 1 / -1; grid-row: 2; }
    .ab .exp-role { grid-column: 1 / -1; grid-row: 3; font-size: 16px; color: var(--ab-soft); }
    .ab .exp-details { grid-column: 1 / -1; grid-row: 4; }

    .ab-do-row {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 6px;
    }
}

/* Paper plane: a full-screen layer over the page; the plane and its dashed
   trail are drawn by the script along one looping route. */
.ab-plane-sky {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1200;
    pointer-events: none;
    overflow: visible;
    color: var(--ab-ink);
    transition: opacity 800ms ease;
}

.ab-plane-sky.is-done {
    opacity: 0;
}

.ab-plane-trail {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-dasharray: 5 7;
    stroke-linecap: round;
    opacity: 0.35;
}

.ab-plane {
    filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.12));
}

/* Cinema: a screen in the dark behind a velvet curtain. The curtain
   halves gather to the sides when it opens; the screen flickers a little
   and has grain, like a projected print. */
.ab-cinema {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    width: min(760px, calc(100vw - 32px));
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 500ms ease;
}

.ab-cinema.is-on {
    opacity: 1;
}

.ab-cinema-close {
    align-self: flex-end;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #EDEDEC;
    cursor: pointer;
}

.ab-cinema-stage {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 6px;
    background: #0B0A09;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* The screen, lit by the projector: brightest in the middle. */
.ab-cinema-screen {
    position: absolute;
    inset: 22px 18px 10px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 45%, #FBF8F1 0%, #EAE4D6 62%, #BDB5A3 100%);
    box-shadow: 0 0 80px rgba(255, 244, 214, 0.25);
    animation: ab-cinema-flicker 180ms steps(2) infinite;
}

@keyframes ab-cinema-flicker {
    0% { filter: brightness(1); }
    100% { filter: brightness(0.97); }
}

.ab-cinema-grain {
    position: absolute;
    z-index: 3;
    inset: -20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.22'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
    pointer-events: none;
    animation: ab-cinema-grain 300ms steps(3) infinite;
}

@keyframes ab-cinema-grain {
    0% { transform: translate(0, 0); }
    33% { transform: translate(-8px, 6px); }
    66% { transform: translate(6px, -4px); }
    100% { transform: translate(0, 0); }
}

/* The splice between films: a white flash. */
.ab-cinema.is-cut .ab-cinema-reel {
    animation: ab-cinema-cut 420ms ease-out;
}

@keyframes ab-cinema-cut {
    0% { opacity: 0; filter: brightness(2.2) blur(2px); }
    100% { opacity: 1; filter: none; }
}

/* A reel: the still fills the screen, darkened at the bottom where the
   title, year and why sit; number top left, owner bottom right. */
.ab-cinema-reel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 5% 5.5%;
    color: #FFFFFF;
    text-align: left;
}

.ab-cinema-reel::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.78) 100%);
}

.ab-cinema-reel.is-end {
    align-items: center;
    justify-content: center;
    color: #0F0F0F;
}

.ab-cinema-reel.is-end::before {
    display: none;
}

.ab-cinema-still {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Warmed a touch, like a print on the screen. */
    filter: sepia(0.12) contrast(1.04);
}

.ab-cinema-no,
.ab-cinema-text,
.ab-cinema-credit {
    position: relative;
    z-index: 2;
}

.ab-cinema-no {
    position: absolute;
    left: 5.5%;
    top: 6%;
    font: 500 11px/1 'PP Neue Montreal', sans-serif;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.75);
}

.ab-cinema-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 80%;
}

.ab-cinema-title {
    font: 400 clamp(22px, 3.6vw, 40px)/1.05 'PP Neue Montreal', sans-serif;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.ab-cinema-year {
    font-size: 0.5em;
    letter-spacing: 0;
    vertical-align: 0.6em;
    color: rgba(255, 255, 255, 0.65);
}

.ab-cinema-why {
    font: 400 clamp(13px, 1.5vw, 17px)/1.35 'PP Neue Montreal', sans-serif;
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
}

.ab-cinema-credit {
    position: absolute;
    right: 4%;
    bottom: 4%;
    font: 400 10px/1 'PP Neue Montreal', sans-serif;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5);
}

/* The why above the screen: phones only, where the still is too small to
   carry it as well as the title. */
.ab-cinema-caption {
    display: none;
}

@media (max-width: 768px) {
    .ab-cinema-why {
        display: none;
    }

    .ab-cinema-caption {
        display: block;
        align-self: stretch;
        min-height: 2.7em;
        font: 400 16px/1.35 'PP Neue Montreal', sans-serif;
        font-style: italic;
        text-align: center;
        text-wrap: balance;
        color: rgba(237, 237, 236, 0.85);
    }
}

.ab-cinema-end {
    position: relative;
    z-index: 2;
    font: 400 clamp(36px, 6vw, 64px)/1 Georgia, 'Times New Roman', serif;
    font-style: italic;
    letter-spacing: -0.01em;
    color: #0F0F0F;
}

/* Velvet: vertical folds in deep reds, shaded at the inner edge. */
.ab-cinema-curtain {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 51%;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.35)),
        repeating-linear-gradient(90deg, #5C0A0E 0, #8E131A 14px, #B01D24 22px, #8E131A 30px, #5C0A0E 44px);
    box-shadow: inset 0 -30px 40px rgba(0, 0, 0, 0.45);
    transition: transform 1400ms cubic-bezier(0.65, 0, 0.35, 1);
}

.ab-cinema-curtain--l {
    left: 0;
    transform-origin: 0 50%;
}

.ab-cinema-curtain--r {
    right: 0;
    transform-origin: 100% 50%;
}

/* Open: each half gathers to its side. */
.ab-cinema.is-open .ab-cinema-curtain {
    transform: scaleX(0.1);
}

.ab-cinema-valance {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 3;
    height: 22px;
    background:
        radial-gradient(circle at 50% 0, #8E131A 14px, transparent 15px) 0 6px / 30px 20px repeat-x,
        linear-gradient(#6E0E13, #8E131A);
    background-size: 30px 22px, 100% 10px;
    background-repeat: repeat-x, no-repeat;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.35);
}

.ab-cinema-hint {
    min-height: 11px;
    font: 500 11px/1 'PP Neue Montreal', sans-serif;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    white-space: nowrap;
    color: rgba(237, 237, 236, 0.6);
}

@media (prefers-reduced-motion: reduce) {
    .ab-cinema-screen,
    .ab-cinema-grain {
        animation: none;
    }
}

/* Frosted veil behind the eggs that take the screen; dark for the cinema. */
.ab-veil {
    position: fixed;
    inset: 0;
    z-index: 1190;
    background: rgba(241, 241, 240, 0.72);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 350ms ease;
}

.ab-veil.is-on {
    opacity: 1;
}

html[data-theme="dark"] .ab-veil {
    background: rgba(17, 17, 16, 0.72);
}

.ab-veil--dark,
html[data-theme="dark"] .ab-veil--dark {
    background: rgba(8, 8, 7, 0.9);
    transition-duration: 700ms;
}

/* Viewfinder: corner brackets, a centre cross and the exposure, in ink
   with a soft light halo so they read on any background. */
html.ab-vf-on,
html.ab-vf-on * {
    cursor: none !important;
}

html.ab-vf-on .ab-vf-close,
html.ab-vf-on .ab-vf-close * {
    cursor: pointer !important;
}

.ab-vf {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1300;
    pointer-events: none;
    opacity: 0;
    transition: opacity 200ms ease;
    will-change: transform;
}

.ab-vf.is-on {
    opacity: 1;
}

.ab-vf {
    --vf: #0F0F0F;
    --vf-halo: rgba(255, 255, 255, 0.7);
}

html[data-theme="dark"] .ab-vf {
    --vf: #EDEDEC;
    --vf-halo: rgba(0, 0, 0, 0.6);
}

.ab-vf i,
.ab-vf b,
.ab-vf-meta {
    position: absolute;
    color: var(--vf);
    filter: drop-shadow(0 0 1.5px var(--vf-halo));
}

.ab-vf i {
    width: 22px;
    height: 22px;
    border: 0 solid var(--vf);
}

.ab-vf i:nth-child(1) { left: 0; top: 0; border-left-width: 2px; border-top-width: 2px; }
.ab-vf i:nth-child(2) { right: 0; top: 0; border-right-width: 2px; border-top-width: 2px; }
.ab-vf i:nth-child(3) { left: 0; bottom: 0; border-left-width: 2px; border-bottom-width: 2px; }
.ab-vf i:nth-child(4) { right: 0; bottom: 0; border-right-width: 2px; border-bottom-width: 2px; }

.ab-vf b {
    left: 50%;
    top: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    background:
        linear-gradient(var(--vf), var(--vf)) 50% 50% / 1.5px 100% no-repeat,
        linear-gradient(var(--vf), var(--vf)) 50% 50% / 100% 1.5px no-repeat;
}

.ab-vf-meta {
    left: 0;
    right: 0;
    bottom: -22px;
    font: 500 10px/1 'PP Neue Montreal', sans-serif;
    letter-spacing: 0.12em;
    text-align: center;
    white-space: nowrap;
}

.ab-vf-flash {
    position: absolute;
    inset: 0;
    background: #FFFFFF;
    opacity: 0;
}

.ab-vf.is-flash .ab-vf-flash {
    animation: ab-vf-flash 420ms ease-out;
}

@keyframes ab-vf-flash {
    0% { opacity: 0.95; }
    100% { opacity: 0; }
}

/* Bottom bar: the hint and the cross that puts the camera away. */
.ab-vf-bar {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 1300;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 6px 6px 16px;
    border: 1px solid rgba(15, 15, 15, 0.12);
    border-radius: 999px;
    background: #FFFFFF;
    box-shadow: 0 4px 12px rgba(15, 15, 15, 0.12);
    opacity: 0;
    transform: translate(-50%, 8px);
    transition: opacity 250ms ease, transform 250ms ease;
}

.ab-vf-bar.is-on {
    opacity: 1;
    transform: translate(-50%, 0);
}

.ab-vf-hint {
    font: 500 11px/1 'PP Neue Montreal', sans-serif;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    white-space: nowrap;
    color: rgba(15, 15, 15, 0.6);
}

.ab-vf-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #F1F1F0;
    color: #0F0F0F;
}

html[data-theme="dark"] .ab-vf-bar {
    border-color: rgba(255, 255, 255, 0.12);
    background: #222221;
}

html[data-theme="dark"] .ab-vf-hint {
    color: rgba(237, 237, 236, 0.6);
}

html[data-theme="dark"] .ab-vf-close {
    background: #2A2A29;
    color: #EDEDEC;
}

/* The shelf: prints from the camera on the footer's top edge, a loose
   row in the middle, half over the line as if dropped there. */
.footer {
    position: relative;
}

.ab-shelf {
    position: absolute;
    left: 50%;
    top: 0;
    width: 392px;
    height: 0;
    margin-left: -196px;
    pointer-events: none;
}

.ab-print {
    position: absolute;
    top: -52px;
    width: 64px;
    padding: 4px 4px 14px;
    border-radius: 3px;
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 8px 16px -6px rgba(0, 0, 0, 0.3);
    transform: rotate(var(--rot, 0deg));
    transform-origin: 0 0;
    will-change: transform;
}

.ab-print-shot {
    display: block;
    height: 64px;
    overflow: hidden;
    border-radius: 2px;
    background: #ECEAE6;
}

.ab-print-shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Developing on the way down: washed out, then the picture comes in. */
    animation: ab-print-develop 2200ms ease-out both;
}

@keyframes ab-print-develop {
    0% { filter: brightness(1.7) contrast(0.45) saturate(0); }
    100% { filter: none; }
}

@media (max-width: 768px) {
    .ab-shelf {
        transform: scale(0.8);
        transform-origin: 50% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ab-print-shot img {
        animation: none;
    }
}
