/* ==========================================================================
   grisco — site styles
   One stylesheet for grisco.eu, portfolio.grisco.eu and tools.grisco.eu.
   ========================================================================== */

/* ---------- Fonts (self-hosted Montserrat, OFL — no third-party requests) */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("../fonts/montserrat-latin-300-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("../fonts/montserrat-latin-ext-300-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/montserrat-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/montserrat-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/montserrat-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/montserrat-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens */
:root {
  --bg: #F4F1EC;
  --surface: #ECE7DF;
  --ink: #1B1A18;
  --muted: #66625C;
  --line: #D9D3CA;
  --ph1: #E4DED5;
  --ph2: #D8D1C6;
  --ph3: #CBC3B6;
  --ph-line: #BDB4A6;
  --ph-ink: #56524C;
  --phm1: #D5CEC3;
  --phm2: #C9C1B4;
  --phm3: #BCB3A5;
  --scrim: rgba(244, 241, 236, 0.82);
  --shadow: 0 24px 80px rgba(27, 26, 24, 0.18);

  --font: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gut: clamp(20px, 4vw, 64px);
  --maxw: 1360px;
  --gap: 24px;
  --section: clamp(80px, 9vw, 140px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #141311;
  --surface: #1C1A17;
  --ink: #ECE8E2;
  --muted: #A29D95;
  --line: #2F2C28;
  --ph1: #23201D;
  --ph2: #2A2723;
  --ph3: #332F2A;
  --ph-line: #433E37;
  --ph-ink: #A29D95;
  --phm1: #36322D;
  --phm2: #3D3831;
  --phm3: #463F38;
  --scrim: rgba(20, 19, 17, 0.84);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141311;
    --surface: #1C1A17;
    --ink: #ECE8E2;
    --muted: #A29D95;
    --line: #2F2C28;
    --ph1: #23201D;
    --ph2: #2A2723;
    --ph3: #332F2A;
    --ph-line: #433E37;
    --ph-ink: #A29D95;
    --phm1: #36322D;
    --phm2: #3D3831;
    --phm3: #463F38;
    --scrim: rgba(20, 19, 17, 0.84);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

/* ---------- Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
img, svg, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.62; }
a, button { transition: opacity 0.2s var(--ease); }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }
ul[role="list"] { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
kbd { font-family: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }
::selection { background: var(--ink); color: var(--bg); }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; }
.skip:focus { top: 12px; }
html:not(.js) .js-only { display: none !important; }
.muted { color: var(--muted); }

/* ---------- Layout */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }
.section { padding-top: var(--section); display: flex; flex-direction: column; gap: 40px; }
.section--tight { padding-top: clamp(56px, 6vw, 96px); }
.section__intro { max-width: 60ch; margin-top: -16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px var(--gap); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.split__text { display: flex; flex-direction: column; gap: 32px; max-width: 620px; }
@media (min-width: 1101px) {
  .grid-3--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }   /* four Hobbies tiles on Home: one row, no orphan */
}
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .grid-3 { grid-template-columns: minmax(0, 1fr); gap: 48px; }
}

/* ---------- Type */
.eyebrow { font-size: 11px; line-height: 1.5; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; color: var(--muted); margin: 0; }
.display { font-weight: 300; font-size: clamp(38px, 5.6vw, 84px); line-height: 1.04; letter-spacing: -0.025em; max-width: 15ch; text-wrap: balance; }
.display--m { font-size: clamp(34px, 4.4vw, 64px); max-width: 20ch; }
.display--xl { font-size: clamp(42px, 6.4vw, 96px); line-height: 1; letter-spacing: -0.03em; }
.lede { font-weight: 300; font-size: clamp(20px, 1.9vw, 27px); line-height: 1.45; max-width: 46ch; text-wrap: pretty; }
.prose { display: flex; flex-direction: column; gap: 1.1em; max-width: 64ch; }
.prose--l { font-size: 17px; line-height: 1.7; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.icon { width: 16px; height: 16px; flex: none; }

/* ---------- Buttons */
.btn {
  min-height: 44px; min-width: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500;
  padding: 0 18px; cursor: pointer; white-space: nowrap;
}
.btn:hover { opacity: 1; border-color: var(--ink); }
.btn--icon { padding: 0; width: 44px; }
.btn--icon .icon { width: 18px; height: 18px; }
.btn--solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--solid:hover { opacity: 0.85; }
.btn kbd { font-size: 10px; border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; color: var(--muted); letter-spacing: 0; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Header */
.hdr { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); transition: background-color 0.3s var(--ease); }
.hdr__in { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); padding-top: 12px; padding-bottom: 12px; min-height: 72px; }
.hdr__logo { display: flex; color: var(--ink); }
.logo--word { height: 30px; width: auto; }
.hdr__nav { display: flex; gap: 32px; flex: 1; }
.hdr__link { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; padding: 14px 0; display: inline-flex; align-items: center; gap: 8px; }
.hdr__link[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--ink); }
.hdr__tools { display: flex; align-items: center; gap: 12px; }
.hdr__menu { display: none; }

.lang { display: flex; align-items: center; font-size: 11px; font-weight: 500; letter-spacing: 0.14em; }
.lang__item { padding: 14px 6px; min-width: 32px; text-align: center; color: var(--muted); }
.lang__item.is-current { color: var(--ink); }
.lang__sep { color: var(--line); }

.hdr--sub .hdr__brand { display: flex; align-items: center; gap: 14px; color: var(--ink); }
.logo--mark { width: 34px; height: 34px; }
.hdr__brandtext { display: flex; align-items: flex-end; gap: 10px; }
/* Sit the label on the letters' baseline, not under the descender of the g (28.6% of the logo height). */
.hdr__brandtext .eyebrow { line-height: 1; margin-bottom: calc(30px * 0.286 - 2px); }
.hdr__brandtext .logo--word { height: 30px; }
.hdr__mid { flex: 1; display: flex; }
.hdr__back .icon { width: 14px; height: 14px; }

@media (max-width: 900px) {
  .kind-site .hdr__in { flex-wrap: wrap; }
  .kind-site .hdr__logo { flex: 1; }
  html.js.kind-site .hdr__nav { display: none; }
  html.js.kind-site .hdr__menu { display: inline-flex; }
  html.js.kind-site .hdr.is-open .hdr__nav {
    display: flex; order: 3; flex-basis: 100%; flex-direction: column; gap: 0;
    border-top: 1px solid var(--line); padding: 8px 0 16px;
  }
  html.js.kind-site .hdr.is-open .hdr__link { font-size: 22px; font-weight: 300; letter-spacing: 0; text-transform: none; padding: 12px 0; }
  html:not(.js).kind-site .hdr__nav { flex-wrap: wrap; gap: 4px 20px; order: 3; flex-basis: 100%; }
  .hdr__home { display: none; }
  .hdr__brandtext .eyebrow { display: none; }
}
@media (max-width: 600px) {
  .hdr__tools { gap: 4px; }
  .hdr__tools [data-index-open] { display: none !important; }
  .hdr__back { font-size: 11px; }
}

/* ---------- Hero / page heads */
.hero { padding-top: clamp(56px, 9vw, 150px); padding-bottom: clamp(40px, 5vw, 80px); display: flex; flex-direction: column; gap: 40px; }
.hero__intro { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 16px; }
.hero__media { display: block; }
.hero__media:hover { opacity: 1; }
.page-head { padding-top: clamp(56px, 7vw, 110px); padding-bottom: 48px; display: flex; flex-direction: column; gap: 24px; }
.page-head .eyebrow a { color: var(--ink); }
.page-head--error { min-height: 50vh; justify-content: center; }

/* ---------- Section heads */
.shead { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 24px; }
.shead__title { font-weight: 300; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.1; letter-spacing: -0.015em; }
.shead--small { padding-top: 20px; margin-bottom: 32px; }

/* ---------- Media & placeholders */
.media { margin: 0; position: relative; overflow: hidden; background: var(--ph2); }
.media picture, .media img { width: 100%; height: 100%; }
.media img { object-fit: cover; }
.media--wide   { aspect-ratio: 4 / 3; }
.media--tall   { aspect-ratio: 4 / 5; }
.media--full   { aspect-ratio: 21 / 9; }
.media--hero   { aspect-ratio: 16 / 9; }
.media--banner { aspect-ratio: 16 / 7; }
.media--photo  { aspect-ratio: 3 / 2; }
.media--square { aspect-ratio: 1; }
.media__caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px; font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.45)); }
.ph--1 { background: var(--ph1); --mark: var(--phm1); }
.ph--2 { background: var(--ph2); --mark: var(--phm2); }
.ph--3 { background: var(--ph3); --mark: var(--phm3); }
/* the muted logo in a placeholder: one step off the tone, wordmark in wide frames, round mark in tall and square ones; shown only while the figure is a placeholder */
.ph__logo { display: none; position: absolute; left: 50%; top: 50%; height: auto; transform: translate(-50%, -50%); fill: var(--mark, currentColor); fill-rule: evenodd; pointer-events: none; }
.ph--1 > .ph__logo, .ph--2 > .ph__logo, .ph--3 > .ph__logo { display: block; }
.ph__logo--word { width: 34%; }
.ph__logo--mark { width: 42%; }
.ph-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
@media (max-width: 600px) { .ph__logo--word { width: 46%; } }
.ph__label { position: absolute; left: 16px; bottom: 14px; right: 16px; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500; color: var(--ph-ink); }
@media (max-width: 600px) {
  .media--full, .media--banner { aspect-ratio: 4 / 5; }
}

/* ---------- Tiles & cards */
.tile { display: flex; flex-direction: column; gap: 14px; color: var(--ink); }
.tile__head, .card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.tile__title { font-size: 22px; font-weight: 400; letter-spacing: -0.01em; }
.tile .muted { max-width: 42ch; }
.tile .media img, .card .media img, .featured .media img, .next .media img { transition: transform 0.9s var(--ease); }
a.tile:hover, a.card:hover, .featured__link:hover, .next:hover { opacity: 1; }
a.tile:hover .media img, a.card:hover .media img, .featured__link:hover .media img, .next:hover .media img { transform: scale(1.025); }
a.tile:hover .tile__title, a.card:hover .card__title { opacity: 0.62; }

.grid-pairs { display: flex; flex-wrap: wrap; gap: clamp(48px, 5vw, 80px) var(--gap); align-items: flex-start; }
.card { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.card--big { flex: 0 0 calc((100% - var(--gap)) * 7 / 12); }
.card--small { flex: 0 0 calc((100% - var(--gap)) * 5 / 12); }
@media (max-width: 700px) { .card--big, .card--small { flex-basis: 100%; } }
.card[hidden] { display: none; }
.card__title { font-size: 20px; font-weight: 400; letter-spacing: -0.01em; }
.card__summary { color: var(--muted); max-width: 52ch; }

/* ---------- Portfolio */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.chip {
  min-height: 44px; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 999px; padding: 0 18px;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500;
}
.chip:hover { opacity: 1; border-color: var(--ink); }
.chip[aria-current="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip__n { opacity: 0.6; }
.featured { padding-bottom: clamp(64px, 7vw, 110px); }
.featured__link { display: flex; flex-direction: column; gap: 20px; }
.featured__info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.featured__title { font-size: 28px; font-weight: 400; letter-spacing: -0.01em; margin-top: 6px; }
.featured__meta { justify-self: end; }
@media (max-width: 900px) {
  .featured__info { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .featured__meta { justify-self: start; }
}

/* ---------- Project page */
.facts { margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap); }
.facts__item { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.facts dd { margin: 0; }
@media (max-width: 1100px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px)  { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.text-cols { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--gap); align-items: start; }
@media (max-width: 900px) { .text-cols { grid-template-columns: minmax(0, 1fr); } }

.gallery { gap: var(--gap); }
.gallery__pair { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: flex-start; }
.gallery__pair > .media--wide { flex: 7 1 340px; min-width: 0; }
.gallery__pair > .media--tall { flex: 5 1 300px; min-width: 0; }
.gallery__pair--a > .media--tall { margin-top: clamp(0px, 8vw, 120px); }
.gallery__pair--b > .media--wide { margin-top: clamp(0px, 8vw, 120px); }
.gallery__single { max-width: 60%; }
@media (max-width: 700px) {
  .gallery__pair > .media { margin-top: 0 !important; }
  .gallery__single { max-width: none; }
}

.compare { position: relative; aspect-ratio: 16 / 9; overflow: hidden; user-select: none; touch-action: pan-y; background: var(--ph3); }
.compare__layer { position: absolute; inset: 0; }
.compare__layer .media { height: 100%; aspect-ratio: auto; }
.compare__render { clip-path: inset(0 50% 0 0); }
.compare__tag { position: absolute; top: 16px; left: 16px; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500; background: var(--bg); color: var(--ink); padding: 6px 10px; border-radius: 999px; }
.compare__tag--r { left: auto; right: 16px; }
.compare__line { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--ink); pointer-events: none; }
.compare__knob { position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%); width: 48px; height: 48px; border-radius: 50%; background: var(--bg); border: 1px solid var(--ink); display: flex; align-items: center; justify-content: center; }
.compare__knob .icon { width: 20px; height: 20px; }
.compare__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.compare:has(.compare__range:focus-visible) .compare__knob { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (max-width: 600px) { .compare { aspect-ratio: 4 / 5; } }

.next { border-top: 1px solid var(--line); padding-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; align-items: end; }
.next__text { display: flex; flex-direction: column; gap: 12px; }
.next__title { font-weight: 300; font-size: clamp(34px, 4.4vw, 64px); line-height: 1.05; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 20px; }
.next__title .icon { width: 0.6em; height: 0.6em; }
@media (max-width: 700px) { .next { grid-template-columns: minmax(0, 1fr); } }

/* ---------- CV */
.cv { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 0 var(--gap); }
.cv__group { border-top: 1px solid var(--line); padding: 16px 0; display: flex; flex-direction: column; gap: 8px; }
.cv__group ul { display: flex; flex-direction: column; gap: 10px; }
.cv__group li { display: flex; flex-direction: column; }
.cv__period { color: var(--muted); font-size: 13px; }
.cv__detail { color: var(--muted); }

/* ---------- Embeds */
.embed { position: relative; aspect-ratio: 3 / 2; background: var(--ph2); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Footer */
.ftr { border-top: 1px solid var(--line); margin-top: var(--section); }
.ftr .wrap { padding-top: clamp(48px, 6vw, 96px); padding-bottom: 40px; display: flex; flex-direction: column; gap: 64px; }
.ftr__contact { display: flex; flex-direction: column; gap: 20px; }
.ftr__email { font-weight: 300; font-size: clamp(30px, 4.4vw, 64px); line-height: 1.1; letter-spacing: -0.02em; word-break: break-word; }
.ftr__social { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; flex-wrap: wrap; }
.ftr__bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.ftr__logo { color: var(--ink); }
.logo--full { height: 56px; width: auto; }
.ftr__links { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; flex-wrap: wrap; }
.ftr__links a { color: var(--ink); }

/* ---------- Index overlay */
.idx { padding: 0; border: 0; background: transparent; color: var(--ink); max-width: none; max-height: none; width: 100%; height: 100%; }
.idx::backdrop { background: var(--scrim); backdrop-filter: blur(2px); }
.idx[open] { display: flex; justify-content: center; align-items: flex-start; }
.idx__panel {
  margin-top: min(120px, 12vh); width: min(720px, calc(100% - 32px)); max-height: calc(100% - 2 * min(120px, 12vh));
  display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden;
  animation: idx-in 0.25s var(--ease);
}
@keyframes idx-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.idx__search { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 20px; border-bottom: 1px solid var(--line); }
.idx__search .icon { width: 18px; height: 18px; }
.idx__search input { flex: 1; min-height: 52px; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: 17px; font-weight: 300; }
.idx__search input::placeholder { color: var(--muted); }
.idx__search input::-webkit-search-cancel-button { display: none; }
.idx__esc { min-height: 44px; min-width: 44px; border: 0; background: transparent; cursor: pointer; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.idx__list { padding: 12px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.idx__group { padding: 12px 16px 4px; }
.idx__row { display: flex; align-items: center; gap: 16px; padding: 10px 16px; min-height: 44px; border-radius: 8px; }
.idx__row:hover, .idx__row.is-active { background: var(--surface); opacity: 1; }
.idx__row[hidden] { display: none; }
.idx__arrow { color: var(--muted); }
.idx__title { flex: 1; font-size: 16px; }
.idx__empty { padding: 24px 16px; color: var(--muted); }
.idx__foot { display: flex; gap: 24px; padding: 14px 20px; border-top: 1px solid var(--line); }
.idx__hint { margin-left: auto; }
@media (max-width: 600px) { .idx__foot { display: none; } .idx__row .eyebrow { display: none; } }

/* ---------- Reveal on scroll (only with JS, only without reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
  html.js .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Print */
@media print {
  .hdr, .idx, .js-only, .ftr__social { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
.compare .ph__label { display: none; }
/* Long CV on the About page: experience, trainings and honours span the full width */
.cv__group--experience:not(.cv--preview *), .cv__group--training, .cv__group--award { grid-column: 1 / -1; }
.cv__group--experience ul, .cv__group--training ul, .cv__group--award ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 20px var(--gap); }
.cv--preview .cv__group--experience ul { display: flex; }
.cv__detail { margin-top: 4px; font-size: 14px; }

/* Gallery layouts: masonry, rows, grid (editorial is .gallery__pair above) */
.gal .media { min-width: 0; }
.gal > .gal__full { aspect-ratio: 21 / 9; }
.gal--masonry { column-count: 3; column-gap: var(--gap); }
.gal--masonry > .media { break-inside: avoid; margin: 0 0 var(--gap); aspect-ratio: var(--ar, 1.5); }
.gal--masonry > .gal__full { column-span: all; aspect-ratio: 21 / 9; }
.gal--rows { display: flex; flex-wrap: wrap; gap: var(--gap); --row-h: 300px; }
.gal--rows > .media { aspect-ratio: var(--ar, 1.5); flex: calc(var(--ar, 1.5) * 100) 1 calc(var(--ar, 1.5) * var(--row-h)); }
.gal--rows > .gal__full { flex: 1 1 100%; aspect-ratio: 21 / 9; }
.gal--rows::after { content: ""; flex-grow: 1000000; }
.gal--grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.gal--masonry.gal--c2 { column-count: 2; }
.gal--grid.gal--c2 { grid-template-columns: repeat(2, 1fr); }
.gal--grid > .media { aspect-ratio: 4 / 3; }
.gal--grid > .gal__full { grid-column: 1 / -1; }
@media (max-width: 1000px) { .gal--masonry, .gal--masonry.gal--c3 { column-count: 2; } .gal--grid, .gal--grid.gal--c3 { grid-template-columns: repeat(2, 1fr); } .gal--rows { --row-h: 240px; } }
@media (max-width: 560px) {
  .gal--masonry { column-gap: 12px; } .gal--masonry > .media { margin-bottom: 12px; }
  .gal--grid, .gal--grid.gal--c2, .gal--grid.gal--c3 { grid-template-columns: 1fr; } .gal--rows { --row-h: 260px; }
  .gal--rows::after { display: none; } .gal--rows > .media { flex: 1 1 100%; }
  .gal > .gal__full { aspect-ratio: 4 / 5; } .gal--masonry > .gal__full { aspect-ratio: 4 / 5; }
}
/* picture shapes in 0.05 steps (ar-N = N/20) */
.ar-8 { --ar: 0.4; }
.ar-9 { --ar: 0.45; }
.ar-10 { --ar: 0.5; }
.ar-11 { --ar: 0.55; }
.ar-12 { --ar: 0.6; }
.ar-13 { --ar: 0.65; }
.ar-14 { --ar: 0.7; }
.ar-15 { --ar: 0.75; }
.ar-16 { --ar: 0.8; }
.ar-17 { --ar: 0.85; }
.ar-18 { --ar: 0.9; }
.ar-19 { --ar: 0.95; }
.ar-20 { --ar: 1; }
.ar-21 { --ar: 1.05; }
.ar-22 { --ar: 1.1; }
.ar-23 { --ar: 1.15; }
.ar-24 { --ar: 1.2; }
.ar-25 { --ar: 1.25; }
.ar-26 { --ar: 1.3; }
.ar-27 { --ar: 1.35; }
.ar-28 { --ar: 1.4; }
.ar-29 { --ar: 1.45; }
.ar-30 { --ar: 1.5; }
.ar-31 { --ar: 1.55; }
.ar-32 { --ar: 1.6; }
.ar-33 { --ar: 1.65; }
.ar-34 { --ar: 1.7; }
.ar-35 { --ar: 1.75; }
.ar-36 { --ar: 1.8; }
.ar-37 { --ar: 1.85; }
.ar-38 { --ar: 1.9; }
.ar-39 { --ar: 1.95; }
.ar-40 { --ar: 2; }
.ar-41 { --ar: 2.05; }
.ar-42 { --ar: 2.1; }
.ar-43 { --ar: 2.15; }
.ar-44 { --ar: 2.2; }
.ar-45 { --ar: 2.25; }
.ar-46 { --ar: 2.3; }
.ar-47 { --ar: 2.35; }
.ar-48 { --ar: 2.4; }
.ar-49 { --ar: 2.45; }
.ar-50 { --ar: 2.5; }
.ar-51 { --ar: 2.55; }
.ar-52 { --ar: 2.6; }
.ar-53 { --ar: 2.65; }
.ar-54 { --ar: 2.7; }
.ar-55 { --ar: 2.75; }
.ar-56 { --ar: 2.8; }
.ar-57 { --ar: 2.85; }
.ar-58 { --ar: 2.9; }
.ar-59 { --ar: 2.95; }
.ar-60 { --ar: 3; }

/* Lightbox (project pictures) */
.media__zoom { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.media__zoom picture { display: block; }
.media__zoom:focus-visible { outline-offset: -3px; }
html.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(12, 12, 11, 0.95); color: #F4F1EC; overflow: hidden; }
.lb:not([open]) { display: none; }
.lb::backdrop { background: rgba(12, 12, 11, 0.95); }
.lb__stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 64px clamp(12px, 7vw, 110px) 72px; touch-action: none; user-select: none; -webkit-user-select: none; }
.lb__fig { margin: 0; display: grid; justify-items: center; gap: 14px; max-width: 100%; max-height: 100%; min-height: 0; }
.lb__img { display: grid; place-items: center; min-height: 0; max-width: 100%; }
.lb__img img { display: block; max-width: 100%; max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); width: auto; height: auto; object-fit: contain; }
.lb__pic { -webkit-user-drag: none; will-change: transform; }
.lb__pic.is-anim { transition: transform 0.22s var(--ease); }
.lb--zoomed .lb__stage { cursor: grab; }
.lb--zoomed .lb__stage:active { cursor: grabbing; }
.lb__cap { font-size: 13px; line-height: 1.5; color: #CFC9C0; text-align: center; max-width: 60ch; }
.lb__cap:empty { display: none; }
.lb__btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(244, 241, 236, 0.28); border-radius: 50%; background: rgba(12, 12, 11, 0.4); color: #F4F1EC; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.lb__btn:hover { background: rgba(244, 241, 236, 0.14); border-color: rgba(244, 241, 236, 0.6); }
.lb__btn:focus-visible { outline: 2px solid #F4F1EC; outline-offset: 3px; }
.lb__btn .icon { width: 22px; height: 22px; }
.lb__close { top: 16px; right: 16px; }
.lb__zoom { position: absolute; top: 16px; left: 16px; display: flex; gap: 8px; }
.lb__zoom .lb__btn { position: static; }
.lb__spin { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 2px solid rgba(244, 241, 236, 0.25); border-top-color: #F4F1EC; border-radius: 50%; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.lb--busy .lb__spin { opacity: 1; animation: lb-spin 0.8s linear infinite; }
@keyframes lb-spin { to { transform: rotate(360deg); } }
.lb__prev, .lb__next { top: 50%; margin-top: -24px; }
.lb__prev { left: 16px; } .lb__next { right: 16px; }
.lb__prev .icon { transform: scaleX(-1); }
.lb__count { position: absolute; left: 0; right: 0; bottom: 22px; margin: 0; text-align: center; color: #A9A39A; }
.lb--single .lb__prev, .lb--single .lb__next, .lb--single .lb__count { display: none; }
@media (max-width: 700px) {
  .lb__stage { padding: 60px 8px 76px; }
  .lb__prev, .lb__next { top: auto; bottom: 14px; margin-top: 0; width: 44px; height: 44px; }
  .lb__prev { left: 16px; } .lb__next { right: 16px; }
}
@media (prefers-reduced-motion: reduce) { .lb__pic.is-anim { transition: none; } .lb--busy .lb__spin { animation-duration: 2.4s; } }
@media (prefers-reduced-motion: no-preference) { .lb[open] { animation: lb-in 0.22s ease-out; } }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

/* Tool card: version line under the title + details popup */
.tile .vers { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: -6px 0 0; font-size: 13px; }
.vers__ver { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vers__date { color: var(--muted); white-space: nowrap; }
.vers__date::before { content: "·"; margin-right: 10px; }
.vers__new, .vers__more { font: inherit; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1; border-radius: 999px; }
.vers__new { padding: 4px 8px; border: 1px solid var(--ink); color: var(--ink); }
.vers__more { padding: 4px 10px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.vers__more:hover, .vers__more:focus-visible { border-color: var(--ink); color: var(--ink); }
.vdlg { border: 0; padding: 0; background: transparent; color: var(--ink); width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; overflow: visible; }
.vdlg::backdrop { background: var(--scrim); }
.vdlg__box { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 24px 26px 22px; max-height: calc(100dvh - 32px); overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
.vdlg__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.vdlg__title { font-size: 22px; font-weight: 400; letter-spacing: -0.01em; }
.vdlg__x { width: 36px; height: 36px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.vdlg__x:hover { border-color: var(--ink); }
.vdlg__x .icon { width: 16px; height: 16px; }
.vdlg__tool { display: flex; flex-direction: column; gap: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.vdlg__tool:first-of-type { border-top: 0; padding-top: 0; }
.vdlg__row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.vdlg__name { font-size: 17px; font-weight: 500; }
.vdlg__sub { font-size: 14px; }
.vdlg__label { margin-top: 6px; }
.vdlg__notes { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; line-height: 1.55; }
.vdlg__tool .link-arrow { margin-top: 6px; align-self: flex-start; }
.vdlg__foot { font-size: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.vdlg .muted { max-width: none; }

/* ---------- Music player: stage, song list and lyrics on /music; the fixed transport bar (.mpbar) is in every grisco.eu page */
.mp { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "list"; gap: clamp(56px, 7vw, 110px) clamp(32px, 6vw, 96px); align-items: start; padding-top: clamp(40px, 6vw, 96px); }
.mp__stage { grid-area: stage; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: end; }
.mp__cover { width: 100%; }
.mp__cover img[hidden], .mp__cover .ph__label[hidden] { display: none; }
.mp__now { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.mp__title { max-width: 16ch; overflow-wrap: anywhere; }
.mp__meta { margin-top: -8px; }
.mp__actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.mp__play { min-height: 52px; padding: 0 26px 0 22px; }
.mp__play .icon { width: 18px; height: 18px; }
.mp__error { color: var(--muted); font-size: 13px; }
.mp__desc { max-width: 52ch; color: var(--muted); }
.mp__nojs { margin: 0; }
.icon--pause, .icon--mute { display: none; }
html.mp-playing [data-mp-toggle] .icon--play, [data-mp-mute][aria-pressed="true"] .icon--volume { display: none; }
html.mp-playing [data-mp-toggle] .icon--pause, [data-mp-mute][aria-pressed="true"] .icon--mute { display: block; }

.mp__list { grid-area: list; min-width: 0; }
.mp__list .shead--small { margin-bottom: 16px; }
.mp__intro { max-width: 52ch; margin-bottom: 28px; }
.mp__tracks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.mp__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.mp__row { display: grid; grid-template-columns: 28px 48px minmax(0, 1fr); align-items: center; gap: 16px; min-height: 68px; padding: 10px 0; color: var(--ink); }
.mp__txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mp__lyr { font: inherit; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; color: var(--ink); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; cursor: pointer; transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
.mp__lyr:hover { border-color: var(--ink); }
.mp__lyr[hidden] { display: none; }
.mp__row:hover { opacity: 1; }
.mp__row:hover .mp__rt { opacity: 0.62; }
.mp__n { font-size: 11px; letter-spacing: 0.14em; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.mp__thumb, .mpbar__thumb { width: 48px; height: 48px; flex: none; overflow: hidden; background: var(--ph2); display: block; }
.mp__thumb img, .mpbar__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mp__rt { font-size: 17px; letter-spacing: -0.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: opacity 0.2s var(--ease); }
.mp__dur { font-variant-numeric: tabular-nums; }
.mp__row[aria-current="true"] .mp__rt { font-weight: 500; }
.mp__row[aria-current="true"] .mp__num { display: none; }
.mp__eq { display: none; align-items: flex-end; gap: 3px; height: 14px; }
.mp__row[aria-current="true"] .mp__eq { display: flex; }
.mp__eq i { width: 2px; height: 100%; background: var(--ink); transform-origin: bottom; transform: scaleY(0.35); }
.mp__eq i:nth-child(2) { transform: scaleY(0.8); }
.mp__eq i:nth-child(3) { transform: scaleY(0.55); }
html.mp-playing .mp__eq i { animation: mp-eq 0.9s var(--ease) infinite alternate; }
html.mp-playing .mp__eq i:nth-child(2) { animation-delay: -0.5s; }
html.mp-playing .mp__eq i:nth-child(3) { animation-delay: -0.25s; }
@keyframes mp-eq { from { transform: scaleY(0.2); } to { transform: scaleY(1); } }

/* Lyrics panel: slides in from the right; without JavaScript it simply sits below the list */
.mp__panel { padding: 0 clamp(20px, 4vw, 48px) 48px; max-width: var(--maxw); margin: 0 auto; }
.mp__phead { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 28px 0 24px; }
.mp__ptitle { margin: 6px 0 0; font-size: clamp(22px, 3vw, 30px); font-weight: 400; letter-spacing: -0.01em; line-height: 1.2; }
.mp__pclose { flex: none; width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); cursor: pointer; }
.mp__pclose:hover { border-color: var(--ink); }
.mp__pclose .icon { width: 18px; height: 18px; }
.mp__scrim { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, 0.4); }
.mp__scrim[hidden] { display: none; }
html.js .mp__panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 71; width: min(480px, 100%); margin: 0; background: var(--bg); border-left: 1px solid var(--line); overflow-y: auto; overscroll-behavior: contain; visibility: hidden; transform: translateX(100%); transition: transform 0.38s var(--ease), visibility 0s linear 0.38s; }
html.js .mp__panel.is-open { visibility: visible; transform: none; transition: transform 0.38s var(--ease), visibility 0s; }
html.js .mp__phead { position: sticky; top: 0; background: var(--bg); z-index: 1; }
html.mp-lyrics-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { html.js .mp__panel, html.js .mp__panel.is-open { transition: none; } }.mp__lines { display: flex; flex-direction: column; gap: 1.5em; font-weight: 300; font-size: 17px; line-height: 1.75; max-width: 44ch; }
.mp__line { display: block; }
.mp__line--tag { font-size: 11px; line-height: 1.5; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.mp__lines.is-timed .mp__line:not(.mp__line--tag) { color: var(--muted); cursor: pointer; transition: color 0.3s var(--ease); }
.mp__lines.is-timed .mp__line.is-on, .mp__lines.is-timed .mp__line:not(.mp__line--tag):hover { color: var(--ink); }

.mpbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: var(--bg); transition: background-color 0.3s var(--ease); }
.mpbar__in { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px 24px; padding-top: 14px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); min-height: 78px; }
.mpbar__now { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mpbar__now:hover { opacity: 1; }
.mpbar__thumb img[hidden] { display: none; }
.mpbar__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mpbar__title { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpbar__time { font-variant-numeric: tabular-nums; }
.mpbar__ctl, .mpbar__side, .mpbar__vol { display: flex; align-items: center; gap: 4px; }
.mpbar__side { justify-content: flex-end; }
.mpbar__btn { position: relative; width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; padding: 0; }
.mpbar__btn .icon { width: 20px; height: 20px; }
.mpbar__btn:hover { opacity: 0.62; }
.mpbar__btn--main { width: 52px; height: 52px; margin: 0 6px; background: var(--ink); color: var(--bg); }
.mpbar__btn--main:hover { opacity: 0.85; }
.mpbar__btn--opt { color: var(--muted); }
.mpbar__btn--opt[aria-pressed="true"] { color: var(--ink); }
.mpbar__btn--opt[aria-pressed="true"]::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: currentColor; }
.mpbar__one { display: none; position: absolute; top: 7px; right: 5px; font-size: 9px; font-weight: 500; line-height: 1; }
[data-mp-repeat][data-mode="one"] .mpbar__one { display: block; }
html.mp-loading .mpbar__btn--main .icon { animation: mp-wait 0.7s var(--ease) infinite alternate; }
@keyframes mp-wait { from { opacity: 1; } to { opacity: 0.25; } }

/* Thin-line sliders: the seek line is the top edge of the bar. The filled part follows --p (set by music.js). */
.mpbar__seek, .mpbar__volume { -webkit-appearance: none; appearance: none; margin: 0; padding: 0; background: transparent; cursor: pointer; --p: 0%; }
.mpbar__seek { position: absolute; left: 0; right: 0; top: -10px; width: 100%; height: 20px; }
.mpbar__volume { width: 84px; height: 44px; --p: 100%; }
.mpbar__seek::-webkit-slider-runnable-track, .mpbar__volume::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--ink) var(--p), var(--line) var(--p)); }
.mpbar__seek::-moz-range-track, .mpbar__volume::-moz-range-track { height: 2px; background: var(--line); }
.mpbar__seek::-moz-range-progress, .mpbar__volume::-moz-range-progress { height: 2px; background: var(--ink); }
.mpbar__seek::-webkit-slider-thumb, .mpbar__volume::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -5px; border: 0; border-radius: 50%; background: var(--ink); transition: transform 0.2s var(--ease); }
.mpbar__seek::-moz-range-thumb, .mpbar__volume::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--ink); transition: transform 0.2s var(--ease); }
@media (hover: hover) {
  .mpbar__seek:not(:hover):not(:focus-visible)::-webkit-slider-thumb { transform: scale(0); }
  .mpbar__seek:not(:hover):not(:focus-visible)::-moz-range-thumb { transform: scale(0); }
}
.mpbar__seek:focus-visible, .mpbar__volume:focus-visible { outline-offset: 0; }
html.js body:has(.mpbar:not([hidden])) .ftr .wrap { padding-bottom: calc(40px + 96px); }
.mpbar[hidden] { display: none; }
.mpbar__open { margin-left: 8px; }

/* In-place navigation (site.js, while the player is in use): a line runs under the header while the next page loads */
html.nav-loading .hdr::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--ink); transform-origin: left; animation: nav-load 1.1s var(--ease) infinite; }
@keyframes nav-load { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 900px) {
    .mp__stage { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .mp__cover { max-width: 520px; }
  .mpbar__in { grid-template-columns: minmax(0, 1fr) auto; }
  .mpbar__side { display: none; }
}
@media (max-width: 600px) {
  .mp__row { grid-template-columns: 22px 44px minmax(0, 1fr); gap: 12px; }
  .mp__item { gap: 10px; }
  .mp__lyr { padding: 8px 12px; }
  .mp__thumb { width: 44px; height: 44px; }
  .mpbar__btn--main { margin: 0 2px; }
  .mpbar__in { gap: 16px 8px; }
  .mpbar__now { gap: 10px; }
  .mpbar__ctl { gap: 0; }
}
@media (max-width: 420px) { .mpbar__btn--prev { display: none; } }
@media print { .mpbar { display: none !important; } }

/* Portrait with separate light and dark pictures */
.media.theme-dark { display: none; }
:root[data-theme="dark"] .media.theme-light { display: none; }
:root[data-theme="dark"] .media.theme-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .media.theme-light { display: none; }
  :root:not([data-theme="light"]) .media.theme-dark { display: block; }
}
.tile__img { display: block; }
.tile__img:hover { opacity: 1; }
.tile__img:hover .media img { transform: scale(1.025); }
.tile .media__zoom:hover img { transform: scale(1.025); }
