﻿/* White everywhere, one surface, hairlines instead of boxes.
   Blue is carried over from the old site, and marks music too. */
:root {
    --paper: #ffffff;
    --ground: #ffffff;
    --hover: #f4f9fc;
    --line: #dae5ee;
    --line-soft: #eaf0f5;

    --ink: #0f2231;
    --ink-2: #4c6274;
    --ink-3: #566e82;

    --blue: #007ab9;
    --blue-deep: #005f91;
    --on-blue: #ffffff;

}

@font-face { font-family: "headerFont"; src: url("fonts/headerfont.ttf"); }
@font-face { font-family: "paragraphFont"; src: url("fonts/paragraphfont.otf"); }
@font-face { font-family: "projectFont"; src: url("fonts/projectfont.ttf"); }

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: paragraphFont, Georgia, serif;
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* The docked strip is only on the screen once a track is in it, so the room
   it needs is only reserved then. Set by paintPlayer. */
.player { display: none; }
body.playing { padding-bottom: 78px; } /* clears the docked player */
body.playing .player { display: block; }

h1, h2, h3 {
    font-family: headerFont, sans-serif;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.015em;
    text-wrap: balance;
    margin: 0;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }

.mono {
    font-family: projectFont, sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

/* HEADER */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 62px;
}

.site-nav { display: flex; align-items: center; justify-content: center; gap: 2px; flex-wrap: wrap; }

.site-nav a {
    padding: 8px 14px;
    color: var(--ink);
    font-size: 20px;
    transition: color 0.15s;
}

.site-nav a:hover { color: var(--blue-deep); }
.site-nav a.active { color: var(--blue-deep); font-weight: 600; }

/* LANGUAGE PICKER
   Collapsed it is only the current flag; the labels appear on open. */
.lang { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }

/* MOBILE NAVIGATION
   The link row does not fit a phone, so the same dropdown stands in for it
   there, mirrored to the left edge. Hidden until the responsive block below
   asks for it. */
.nav-select { display: none; position: absolute; left: 0; top: 50%; transform: translateY(-50%); }

.lang-btn,
.nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border: 1px solid transparent;
    background: var(--paper);
    cursor: pointer;
    font-family: inherit;
    color: var(--ink-2);
    transition: border-color 0.15s, color 0.15s;
}

.lang-btn:hover,
.lang-btn[aria-expanded="true"],
.nav-btn:hover,
.nav-btn[aria-expanded="true"] { border-color: var(--line); color: var(--ink); }
.lang-btn .chev, .nav-btn .chev { font-size: 0.6rem; line-height: 1; }
/* The flag sets the language button's height; without one the label has to,
   so it takes the size the dropdown entries use. */
.nav-btn { font-size: 0.93rem; }
.lang-flag { width: 26px; height: 18px; display: block; flex: none; }

.lang-list,
.nav-list {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 190px;
    background: var(--paper);
    border: 1px solid var(--line);
    display: none;
    z-index: 45;
}

/* Mirrored: it hangs off the left edge instead of the right. */
.nav-list { right: auto; left: 0; }

.lang-list.open,
.nav-list.open { display: block; }

.lang-list button,
.nav-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: var(--paper);
    color: var(--ink);
    font-family: inherit;
    font-size: 0.93rem;
    text-align: left;
    cursor: pointer;
}

.lang-list button:hover,
.nav-list a:hover { background: var(--hover); }
.lang-list button[aria-current="true"],
.nav-list a[aria-current="true"] { font-weight: 600; color: var(--blue-deep); }

/* MASTHEAD, on every page */
.masthead {
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    padding: 28px 0 30px;
    text-align: center;
}

.masthead h1 {
    /* 65px flat, matching the live old site; the min() only kicks in below ~765px so it never overflows a phone */
    font-size: min(65px, 8.5vw);
    font-weight: 700;
    letter-spacing: normal;
    line-height: 1.05;
}
/* 12.8px flat; the min() only bites below ~500px, where it shrinks the line
   just enough to keep the longest translation on one row. The divisor is the
   Dutch string's width in ems, tracking included. */
.masthead .kicker { color: var(--blue-deep); margin-top: 14px; font-size: min(0.8rem, calc((100vw - 32px) / 40)); }

/* SECTIONS */
.section { padding: 48px 0; }
.section + .section { padding-top: 0; }
.section:first-child { padding-top: 30px; }
.section:last-child { padding-bottom: 10px; }

/* The heading sits centred against the whole section, so the "more" link gets
   its own track instead of pushing the heading off centre. */
.section-head {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: baseline;
    justify-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.section-head h2 { grid-column: 2; font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
.section-head .more { grid-column: 3; justify-self: end; color: var(--blue-deep); font-size: 0.92rem; font-weight: 600; }

/* CARDS
   auto-fit so a two card row still fills the width. */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); gap: 18px; }

/* Three across, as flex so a short last row centres under the full ones. The
   cards never grow, so a two card row keeps the width of a three card row. */
.grid.three-up { display: flex; flex-wrap: wrap; justify-content: center; }
.grid.three-up > * { flex: 0 1 calc((100% - 36px) / 3); }

/* Drops to two, then one, rather than letting the fixed basis go narrow. */
@media (max-width: 900px) {
    .grid.three-up > * { flex-basis: calc((100% - 18px) / 2); }
}

@media (max-width: 600px) {
    .grid.three-up > * { flex-basis: 100%; }
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: border-color 0.16s;
}

.card:hover { border-color: var(--blue); }

.card-art {
    position: relative;
    aspect-ratio: 16 / 9;
    max-height: 240px;
    background: var(--paper);
    border-bottom: 1px solid var(--line-soft);
    overflow: hidden;
    display: grid;
    place-items: center;
    color: var(--ink-3);
    font-family: projectFont, sans-serif;
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card-art.empty { border-bottom: 1px dashed var(--line); }
.card-art img, .card-art video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* the poster paints immediately, the motion layer fades in once decoded */
.card-art .motion {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.card-art .motion.ready { opacity: 1; }

.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body .yr { font-family: projectFont, sans-serif; font-size: 0.7rem; letter-spacing: 0.1em; color: var(--blue-deep); }
.card-body h3 { font-size: 1.14rem; }
.card-body .desc { color: var(--ink-2); font-size: 0.92rem; flex: 1; }

/* MUSIC */
.track-btn {
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 50%;
    border: 1px solid var(--blue);
    background: var(--paper);
    color: var(--blue-deep);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 10px;
    transition: background 0.16s, color 0.16s;
}

.track-btn:hover:not([disabled]) { background: var(--blue); color: var(--on-blue); }
.track-btn[disabled] { opacity: 0.4; cursor: not-allowed; border-color: var(--line); color: var(--ink-3); }

/* Pause, on every button that has one. Sized in em so it keeps following the
   button's font-size the way the play triangle beside it does. */
.pause-icon { width: 1em; height: 1em; fill: currentColor; }

/* One progress line, shared by the piece cards and the bundle tracklist. */
.track-bar { display: block; height: 5px; background: #dde7ee; overflow: hidden; }
.track-bar[data-src] { cursor: pointer; }
.track-bar .fill { display: block; height: 100%; width: 0%; background: var(--blue); }

.cv { border-top: 1px solid var(--line); width: max-content; max-width: 100%; margin-inline: auto; }

.cv-row {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    gap: 24px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line-soft);
    align-items: center;
}

.cv-when { font-family: projectFont, sans-serif; font-size: 0.9rem; color: var(--blue-deep); font-variant-numeric: tabular-nums; }
.cv-what { font-weight: 600; }

/* TABLES */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); background: var(--paper); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 640px; }

table.data th {
    text-align: left;
    font-family: projectFont, sans-serif;
    font-size: 0.63rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-3);
    font-weight: 400;
    padding: 11px 16px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

table.data td { padding: 11px 16px; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover td { background: var(--hover); }
table.data tbody tr.clickable { cursor: pointer; }
table.data td.name { color: var(--ink); font-weight: 600; }
table.data tbody tr.clickable:hover td.name { color: var(--blue-deep); }

td.when {
    font-family: projectFont, sans-serif;
    font-size: 0.78rem;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    width: 1%;
}

.with-icon { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.with-icon img { width: 18px; height: 18px; flex: none; }

.icon-fallback {
    width: 18px;
    height: 18px;
    flex: none;
    border: 1px solid var(--line);
    color: var(--blue-deep);
    display: grid;
    place-items: center;
    font-family: projectFont, sans-serif;
    font-size: 0.58rem;
}

/* DEVBLOG INTRO */
.devblog-intro { text-align: center; margin-bottom: 34px; }
.devblog-intro p { color: var(--ink-2); max-width: 620px; margin: 0 auto; }
.devblog-intro p + p { margin-top: 10px; }
/* Tighter than the link-buttons default, which expects a row of them under a heading. */
.devblog-intro .link-buttons { margin-top: 18px; }

/* FILTER */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-bar label { color: var(--ink-2); font-size: 0.92rem; }

.filter-bar select {
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 8px 12px;
    min-width: 230px;
    cursor: pointer;
}

.filter-bar select:hover { border-color: var(--blue); }
.filter-bar .showing { color: var(--ink-3); font-size: 0.86rem; font-family: projectFont, sans-serif; font-variant-numeric: tabular-nums; }

/* DETAIL PAGES */
.back-link { display: inline-block; color: var(--blue-deep); font-weight: 600; font-size: 0.92rem; margin-bottom: 12px; }

/* no overflow:hidden here, it would create a scroll container and kill the
   sticky author card */
.thread { background: var(--paper); }

.thread-head { padding: 30px 0 26px; background: var(--paper); text-align: center; }
.thread-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.thread-head .deck { color: var(--ink-2); margin-top: 10px; margin-inline: auto; max-width: 62ch; }

.thread-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.thread-meta .stamp { font-family: projectFont, sans-serif; font-size: 0.76rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.thread-meta .proj {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--paper);
    padding: 4px 0;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--blue-deep);
}

.thread-meta .proj img { width: 18px; height: 18px; }

.thread-body { display: grid; grid-template-columns: 216px minmax(0, 1fr); }

.author { background: var(--paper); padding: 26px 24px 26px 0; text-align: center; }

.author-inner { position: sticky; top: 78px; }

.author-avatar {
    width: 96px;
    height: 96px;
    margin: 0 auto 14px;
    background: var(--paper);
    padding: 10px;
    object-fit: contain;
}

.author-name { font-family: headerFont, sans-serif; font-weight: 700; font-size: 1.12rem; color: var(--ink); }
.author-handle { color: var(--ink-3); font-size: 0.84rem; margin-top: 2px; }
.author-links { margin-top: 18px; display: flex; justify-content: center; gap: 12px; }
.author-links a { width: 28px; height: 28px; display: grid; place-items: center; opacity: 0.75; transition: opacity 0.15s; }
.author-links a:hover { opacity: 1; }
.author-links img { width: 22px; height: 22px; }

/* PROSE */
.prose { padding: 24px 0 30px 34px; min-width: 0; }
.project-prose { padding: 26px 0 0; }
.prose > * + * { margin-top: 16px; }
.prose p { max-width: 68ch; color: var(--ink-2); }
.project-prose p { max-width: 78ch; }

/* a single newline in the source is a real line break again */
.prose .ln { display: block; }
.prose .ln + .ln { margin-top: 0.8em; }

.prose h2 { font-size: 1.35rem; color: var(--ink); margin-top: 34px; }
.prose ul, .prose ol { max-width: 68ch; color: var(--ink-2); padding-left: 22px; margin-top: 12px; }
.prose li { margin: 5px 0; }
.prose li::marker { color: var(--blue); }
.prose strong { color: var(--ink); }
.prose a { color: var(--blue-deep); font-weight: 600; overflow-wrap: anywhere; }
.prose a:hover { text-decoration: underline; }

.prose .mention {
    display: inline-block;
    color: var(--blue-deep);
    border: 1px solid var(--line);
    padding: 0 5px;
    font-weight: 600;
    font-size: 0.94em;
}

.prose img, .prose video { margin: 22px 0; max-width: min(100%, 760px); }

/* an attachment that only ever lived on someone else's server */
.prose figure {
    margin: 22px 0;
    border: 1px dashed var(--line);
    background: var(--paper);
    aspect-ratio: 16 / 8;
    display: grid;
    place-items: center;
    color: var(--ink-3);
    font-family: projectFont, sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    padding: 20px;
}

.thread-foot {
    padding: 24px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    background: var(--paper);
}

.thread-foot a { color: var(--blue-deep); font-weight: 600; font-size: 0.9rem; }

.link-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin-top: 26px; }
.link-button { display: grid; justify-items: center; gap: 8px; width: 96px; }

.link-button .disc {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--paper);
    box-shadow: 0 8px 24px rgba(15, 35, 55, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.link-button:hover .disc { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(0, 122, 185, 0.2); }
.link-button img { width: 44px; height: 44px; object-fit: contain; }
.link-button .cap { font-size: 0.82rem; color: var(--ink-2); font-weight: 600; text-align: center; }
.link-button:hover .cap { color: var(--blue-deep); }

/* PROJECT BODY, Steam store shape: the video alone on the first row, the
   description beside the "what I did" list under it. The thin column is kept
   even on a project with no list, so the video is the same size on every one. */
.project-body { display: grid; grid-template-columns: minmax(0, 1fr) clamp(230px, 26%, 300px); gap: 0 44px; align-items: start; }
.project-body > .media { grid-column: 1; grid-row: 1; }
.project-body > .project-prose { grid-column: 1; grid-row: 2; }
.project-body > .project-facts { grid-column: 2; grid-row: 2; }

.project-facts { padding: 30px 0 0 28px; border-left: 1px solid var(--line); font-size: 0.9rem; min-width: 0; }

/* the same small label the thumbnails and the trailer slot already wear */
.project-facts h2 {
    font-family: projectFont, sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
    margin-top: 0;
}

.project-facts * + h2 { margin-top: 26px; }
.project-facts ul { max-width: none; padding-left: 18px; margin-top: 10px; }
.project-facts li { margin: 4px 0; }

/* MEDIA SLIDER, Steam store shape: one stage, thumbnails under it, no arrows */
.media { margin: 18px 0 0; }

.stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--paper);
    overflow: hidden;
}

/* The slide is pinned to the stage box rather than centred inside it. Centring made
   the stage size to the shot, so a square or portrait one grew past the 16/9 frame
   and got clipped instead of letterboxed. */
.stage .slide { display: none; position: absolute; inset: 0; }
.stage .slide.on { display: block; }
.stage img, .stage video { width: 100%; height: 100%; object-fit: contain; }
.stage .slide.on img { cursor: zoom-in; }

.stage .trailer {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    gap: 10px;
    align-content: center;
    color: var(--ink-3);
    text-align: center;
    padding: 24px;
}

.stage .trailer .play-disc {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--blue);
    color: var(--on-blue);
    display: grid;
    place-items: center;
    font-size: 18px;
}

.stage .trailer .cap { font-family: projectFont, sans-serif; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }

.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; padding-bottom: 4px; justify-content: center; flex-wrap: nowrap; }

.thumb {
    position: relative;
    flex: 1 1 0;
    min-width: 44px;
    max-width: 160px;
    aspect-ratio: 7 / 4;
    border: 1px solid var(--line);
    background: var(--paper);
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    opacity: 0.55;
    transition: opacity 0.15s, border-color 0.15s;
}

.thumb img { width: 100%; height: 100%; object-fit: cover; }

.thumb .tcap {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-family: projectFont, sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue-deep);
}

/* Play badge marking a thumbnail whose slide is a video */
.thumb .tplay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--blue);
    color: var(--on-blue);
    display: grid;
    place-items: center;
    font-size: 9px;
    line-height: 1;
    pointer-events: none;
}

.thumb:hover { opacity: 0.85; }
.thumb.on { opacity: 1; border-color: var(--blue); }

/* BUNDLE PAGE */
.bundle-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }

.bundle-head .meta {
    font-family: projectFont, sans-serif;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue-deep);
    margin-bottom: 10px;
}

/* Borrows .prose for its paragraph and link styling, without the left
   indent and vertical padding the project page needs. */
.bundle-head .about { color: var(--ink-2); margin-top: 12px; padding: 0; }

.tracklist { margin-top: 28px; }

.tracklist-row {
    display: grid;
    grid-template-columns: 34px minmax(120px, 200px) minmax(0, 1fr) 48px;
    gap: 16px;
    align-items: center;
    padding: 12px 0;
}

.tracklist-row + .tracklist-row { border-top: 1px solid var(--line-soft); }
.tracklist-row .t { font-weight: 600; }
.tracklist-row.playing .t { color: var(--blue-deep); }

.tracklist-row .len {
    font-family: projectFont, sans-serif;
    font-size: 0.76rem;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.bundle-nav { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 36px; }
.bundle-nav a { color: var(--blue-deep); font-weight: 600; font-size: 0.92rem; }
.bundle-nav a:hover { text-decoration: underline; }

/* CONTACT */
.social-grid { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px; }

.social-link {
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: var(--paper);
    box-shadow: 0 8px 24px rgba(15, 35, 55, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.social-link:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(0, 122, 185, 0.2); }
.social-link img { width: 60px; height: 60px; object-fit: contain; }

/* LIGHTBOX */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.97);
    display: none;
    place-items: center;
}

.lightbox.open { display: grid; }
.lightbox img { max-width: 94vw; max-height: 86vh; object-fit: contain; }

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper);
    color: var(--ink);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: border-color 0.15s, color 0.15s;
}

.lightbox-close:hover { border-color: var(--blue); color: var(--blue-deep); }

.lightbox-count {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    font-family: projectFont, sans-serif;
    font-size: 0.74rem;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
}

.lightbox-step {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 60px;
    border: none;
    background: transparent;
    color: var(--ink-3);
    font-size: 26px;
    cursor: pointer;
    transition: color 0.15s;
}

.lightbox-step:hover { color: var(--blue); }
.lightbox-step.prev { left: 10px; }
.lightbox-step.next { right: 10px; }
.lightbox-step[hidden] { display: none; }

/* FOOTER */
.site-footer {
    border-top: 1px solid var(--line-soft);
    margin-top: 40px;
    padding: 18px 0;
}

/* Under the strip the bottom is short by the 11px the body reserves beyond
   the player's own height, so the line reads as evenly spaced against it. */
body.playing .site-footer { padding-bottom: 7px; }

.site-footer p {
    margin: 0;
    text-align: center;
    font-family: projectFont, sans-serif;
    font-size: 0.72rem;
    color: var(--ink-3);
}

/* PLAYER */
.player {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
}

.player-inner { display: flex; align-items: center; gap: 18px; height: 66px; }

.play-big {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 50%;
    border: none;
    background: var(--blue);
    color: var(--on-blue);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 11px;
    transition: background 0.16s;
}

.play-big:hover { background: var(--blue-deep); }
.play-big[disabled] { background: #c9d5de; cursor: default; }

.player .now { min-width: 0; width: 210px; }
.player .now .t { font-size: 0.92rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .now .s { color: var(--ink-3); font-size: 0.76rem; }

.scrub { flex: 1; min-width: 60px; height: 5px; background: #dde7ee; cursor: pointer; overflow: hidden; }
.scrub .fill { height: 100%; width: 0%; background: var(--blue); }
.clock { font-family: projectFont, sans-serif; font-size: 0.76rem; color: var(--ink-3); font-variant-numeric: tabular-nums; flex: none; }

.volume { display: flex; align-items: center; gap: 8px; flex: none; }
.volume-icon { width: 15px; height: 15px; flex: none; fill: var(--ink-3); color: var(--ink-3); transition: fill 0.16s, color 0.16s; }
/* The wave only says "sound is coming out", so it goes when nothing is. */
.volume.silent .wave { display: none; }
.volume-bar { width: 74px; height: 5px; background: #dde7ee; cursor: pointer; overflow: hidden; flex: none; }
.volume-bar .fill { height: 100%; width: 50%; background: var(--ink-3); }
.volume-bar:hover .fill, .volume-bar:focus-visible .fill { background: var(--blue); }

/* RADIO */
/* Only where the radio closes a page of listings, like the music page. On the
   radio page itself it is the first section and keeps the normal spacing. */
.section + .section.radio-section { padding-top: 40px; }

.radio-panel { text-align: center; }
.radio-blurb { color: var(--ink-2); max-width: 620px; margin: 0 auto; }
.radio-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 26px; }
.radio-controls .track-btn { font-size: 8px; }

.radio-now {
    margin-top: 20px;
    min-height: 40px;
    font-family: projectFont, sans-serif;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.radio-now a { color: var(--blue-deep); font-weight: 600; }
.radio-now a:hover { text-decoration: underline; }
.radio-work { display: block; font-size: 0.66rem; letter-spacing: 0.1em; margin-top: 3px; }

.radio-queue {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    max-width: 620px;
    margin: 26px auto 0;
    border-top: 1px solid var(--line-soft);
    padding-top: 22px;
}

.radio-queue-item { display: grid; gap: 3px; }

.radio-queue-label {
    font-family: projectFont, sans-serif;
    font-size: 0.61rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue-deep);
}

.radio-queue-title { font-size: 0.95rem; }
.radio-queue-work { font-size: 0.8rem; color: var(--ink-3); }

/* Alone on its own page the panel is the only content, so main takes whatever
   room the masthead and the docked player leave and the panel centres in it. */
body[data-nav="radio"] { min-height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; }
body[data-nav="radio"] main { flex: 1; display: flex; }
.radio-page { margin-block: auto; }

.radio-dock {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.radio-step {
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 50%;
    border: 1px solid var(--blue);
    background: var(--paper);
    color: var(--blue-deep);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 7px;
    transition: background 0.16s, color 0.16s;
}

.radio-step:hover { background: var(--blue); color: var(--on-blue); }

/* The switch. Lit while the radio is on, an outline in the header's own grey
   while it is off. */
.radio-flag {
    font-family: projectFont, sans-serif;
    font-size: 0.61rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue-deep);
    background: var(--paper);
    border: 1px solid var(--blue);
    padding: 4px 8px;
    flex: none;
    cursor: pointer;
    transition: background 0.16s, color 0.16s, border-color 0.16s;
}

.radio-flag:hover { background: var(--blue); color: var(--on-blue); }
.radio-flag.off { color: var(--ink-3); border-color: var(--line); }
.radio-flag.off:hover { background: var(--hover); color: var(--ink); border-color: var(--line); }

/* STATUS */
.status { color: var(--ink-3); font-family: projectFont, sans-serif; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 20px 0; }

/* RESPONSIVE */
@media (max-width: 860px) {
    .thread-body { grid-template-columns: 1fr; }

    .author {
        display: flex;
        align-items: center;
        gap: 16px;
        text-align: left;
        padding: 18px 0;
    }

    .author-inner { position: static; display: flex; align-items: center; gap: 16px; width: 100%; }
    .author-avatar { width: 62px; height: 62px; margin: 0; padding: 7px; flex: none; }
    .prose { padding: 6px 0 22px; }
    .project-body { grid-template-columns: minmax(0, 1fr); }

    /* the explicit placement has to go too, or the thin column survives here */
    .project-body > .media,
    .project-body > .project-prose,
    .project-body > .project-facts { grid-column: 1; grid-row: auto; }

    .project-facts { border-left: 0; padding: 14px 0 0; }
}

@media (max-width: 760px) {
    .site-nav { display: none; }
    .nav-select { display: block; }
    /* The dropdown takes the left edge here, so the strip crosses over and
       parks next to the language button instead. */
    .radio-dock { left: auto; right: 68px; }

    /* The word does not fit between the two of them, so the switch shrinks to
       a radio the size of the step buttons. The label stays in the markup for
       anyone listening to the page, which is why the icon is centred by
       absolute position: laid out in flow it would have to share the button
       with that text. */
    .radio-flag {
        position: relative;
        width: 26px;
        height: 26px;
        padding: 0;
        border-radius: 50%;
        font-size: 0;
    }

    /* The icon is a white shape on nothing, so it is worn as a mask and takes
       the button's own colour. */
    .radio-flag::before {
        content: "";
        position: absolute;
        inset: 0;
        margin: auto;
        width: 14px;
        height: 14px;
        background-color: currentColor;
        -webkit-mask: url(images/projects/radio.webp) center / contain no-repeat;
        mask: url(images/projects/radio.webp) center / contain no-repeat;
    }

    /* Off is the outline alone here; the radio itself stays the site's blue
       rather than turning to ink. */
    .radio-flag.off { color: var(--blue-deep); }
    .radio-flag.off:hover { color: var(--blue-deep); }
    .section-head { grid-template-columns: 1fr; gap: 6px; }
    .section-head h2, .section-head .more { grid-column: 1; justify-self: center; }
    .cv-row { grid-template-columns: 1fr; gap: 4px; }
    /* iOS ignores a page setting its own volume, so the bar leaves with the
       track title once the strip gets tight. */
    .player .now, .volume { display: none; }
    .wrap { width: min(1180px, 100% - 32px); }
    .masthead { padding: 30px 0 32px; }
    .section { padding: 36px 0; }
    .social-link { width: 84px; height: 84px; }
    .social-link img { width: 44px; height: 44px; }
    .social-grid { gap: 18px; }
    .thread-head { padding: 20px 0 18px; }
}

@media (max-width: 620px) {
    .tracklist-row { grid-template-columns: 34px minmax(0, 1fr) 48px; }
    /* The bar drops to a row of its own. Both are placed by hand, otherwise
       the length is pushed past it onto a third row in the button's column. */
    .tracklist-row .track-bar { grid-column: 1 / -1; grid-row: 2; }
    .tracklist-row .len { grid-column: 3; grid-row: 1; }
    .radio-queue { grid-template-columns: 1fr; gap: 14px; }
    .player-inner { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition-duration: 0.001ms !important; }
}
