/* =====================================================================
   jv-maric.com
   Desktop: every section is one 1920x1000 "calling card". 1rem = 10 design
   px on that canvas, and the root size scales the whole canvas to fit the
   viewport, so a block placed at --x:6;--y:8 sits there on every screen.
   Phone / portrait: the canvas dissolves into one scrolling column.
   ===================================================================== */

/* ---------- fonts (self-hosted on purpose: no Google CDN calls, GDPR) */
@font-face { font-family: "Archivo JM"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(../fonts/archivo-latin-ext-standard-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: "Archivo JM"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(../fonts/archivo-latin-standard-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; }

/* the text face: Azeret Mono */
@font-face { font-family: "Azeret Mono JM"; font-display: swap; font-weight: 100 900; src: url(../fonts/azeret-mono-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Azeret Mono JM"; font-display: swap; font-weight: 100 900; src: url(../fonts/azeret-mono-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* ---------- tokens (all colour lives here; the light theme redefines them just below) */
:root {
  --bg: #0a0a0a;
  --ink: #c9c9c4;          /* very light grey: type and elements */
  --ink-2: #8e8e89;        /* secondary */
  --ink-3: #4b4b47;        /* tertiary, empty dots */
  --line: rgba(201, 201, 196, .30);
  --line-2: rgba(201, 201, 196, .13);
  --accent: #ffffff;       /* accents only: the name, bold words, hovers (near-black in the light theme) */
  --on-accent: #000;       /* type on an accent fill */
  --white: #ffffff;        /* white in both themes: type on the red, the CV sheet on hover */
  --paper: #ecece8;        /* the CV sheets */
  --fold: #b9b9b3;         /* their folded corner */
  --signal: #e1261c;       /* the only colour on the page: PDF red */
  --dim: .42;              /* resting opacity of the rail, the theme switch and the hand-drawn circle */
  --grain-o: .09;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1.6 0 0 0 -.62'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  --f-wide: "Archivo JM", "Arial Black", Arial, sans-serif;
  --f-text: "Archivo JM", Arial, sans-serif;
  --stretch: 125%;
  --big-track: -.02em;

  /* Azeret Mono is the text face; it sets a little wide, so mono sizes are multiplied by --mk */
  --f-mono: "Azeret Mono JM", ui-monospace, Consolas, monospace;
  --mk: .92; --m-light: 300; --m-bold: 700;

  /* small type never drops below a readable pixel size, whatever the scale */
  --fs-xs: max(1.15rem, 9px);
  --fs-s: max(1.35rem, 10px);
  --fs-m: max(1.6rem, 12px);

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* light theme (the switch top right; site.js sets html[data-theme], saved as jm-theme).
   Not a straight inversion: warm drawing paper and a soft near-black, so the contrast steps
   mirror the dark page's. The red stays; the white hand drawings and the halftone are
   inverted to the same near-black (filter below). */
:root[data-theme="light"] {
  --bg: #ebeae5;
  --ink: #3b3b37;
  --ink-2: #63635e;
  --ink-3: #aaa9a2;
  --line: rgba(59, 59, 55, .30);
  --line-2: rgba(59, 59, 55, .13);
  --accent: #121211;
  --on-accent: #ebeae5;
  --paper: #fbfbf9;
  --fold: #d0cfc8;
  --grain-o: .1;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.6 0 0 0 -.62'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="light"] :is(.hand img, .intro__circle, .next img, .smiley img, .halftone) { filter: invert(.93); }

/* ---------- base */
*, *::before, *::after { box-sizing: border-box; }
html {
  font-size: min(calc(100vw / 192), calc(100vh / 100));
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
@supports (height: 100dvh) { html { font-size: min(calc(100vw / 192), calc(100dvh / 100)); } }
body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
  font-family: var(--f-text);
  font-size: var(--fs-m);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: .4rem; }
b, strong { font-weight: 800; }

.stage {
  position: fixed;
  left: 50%; top: 50%;
  width: 192rem; height: 100rem;
  transform: translate(-50%, -50%);
}
.abs {
  position: absolute;
  left: calc(var(--x) * 1rem);
  top: calc(var(--y) * 1rem);
  width: calc(var(--w) * 1rem);
  height: calc(var(--h) * 1rem);
}

/* ---------- film grain over everything */
body::after {
  content: ""; position: fixed; inset: -50%; pointer-events: none; z-index: 5; opacity: var(--grain-o);
  background-image: var(--grain);
  animation: grain .9s steps(6, end) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); } 60% { transform: translate(-1%, 3%); } 80% { transform: translate(4%, 1%); } 100% { transform: translate(0, 0); } }

/* ---------- frame: hairlines that overshoot the corners, like the sketch.
   Clipped to the card, so the rings end at its edge on wide windows too. */
.frame { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.frame > span { position: absolute; background: var(--line); }
.frame__t { top: 3rem; left: 1.4rem; right: 0; height: 1px; }
.frame__b { bottom: 3rem; left: 0; right: 1.6rem; height: 1px; }
.frame__l { left: 3rem; top: 1.8rem; bottom: 0; width: 1px; }
.frame__r1 { right: 3rem; top: 0; height: 25rem; width: 1px; }
.frame__r2 { right: 3rem; top: 29rem; bottom: 1.2rem; width: 1px; }
/* two rings centred on the gap in the right edge; diameters in design px */
.frame__ring {
  position: absolute; left: calc(100% - 3rem - .5px); top: 27rem;
  width: calc(var(--d) * .1rem); height: calc(var(--d) * .1rem);
  border: 1px solid var(--line); border-radius: 50%; transform: translate(-50%, -50%);
}
.frame__ring--in { --d: var(--ring-in, 50); }
.frame__ring--out { --d: var(--ring-out, 80); }

/* =====================================================================
   MOTION — on load only the name moves: "Jovan" from the left, "Marić"
   from the right, both out of a blur; everything else is just there.
   Switching sections fades the old one out and the new blocks in.
   site.js sets --i (block order) and removes html.name-in afterwards.
   (Not html.intro: .intro is the intro paragraph's class.)
   ===================================================================== */
.section { position: absolute; inset: 0; visibility: hidden; }
.section.is-active { visibility: visible; }
.section.is-out { visibility: visible; animation: fade-out .18s ease both; }
.section.is-in .abs { animation: block-in .28s var(--ease) both; animation-delay: calc(.04s + var(--i, 0) * 21ms); }

html.name-in .name__l1 { animation: name-left .8s var(--ease) .05s both !important; }
html.name-in .name__l2 { animation: name-right .8s var(--ease) .15s both !important; }

@keyframes name-left  { from { opacity: 0; transform: translateX(-10rem); filter: blur(1.6rem); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes name-right { from { opacity: 0; transform: translateX(10rem);  filter: blur(1.6rem); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes block-in { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

/* ---------- halftone background (section 04, About): assets/js/halftone.js draws the canvas */
.halftone { display: block; pointer-events: none; }

/* ---------- shared small type: block titles are the mono, set wide */
.block-title {
  display: flex; align-items: center; gap: 1rem;
  margin: 0 0 1.1rem;
  font-family: var(--f-mono); font-size: var(--fs-xs); font-weight: 400;
  letter-spacing: .24em; text-transform: uppercase; color: var(--ink-2);
}
.block-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- paragraphs: the intro, the section ledes and the About text, in the mono */
.intro, .lede, .prose {
  margin: 0;
  font-family: var(--f-mono); font-weight: var(--m-light);
  font-size: calc(var(--p-size) * var(--mk));
  line-height: 1.5; color: var(--ink);
}
.intro { --p-size: 2.05rem; }
.lede { --p-size: 2.1rem; }
/* About: 2.4 (a touch larger than the ledes) until the copy grew to three paragraphs; Jovan had it
   taken well down so the block keeps close to its old size (2026-11-19). The floor holds 1280 at 9 lines. */
.prose { --p-size: 1.7rem; font-size: calc(max(var(--p-size), 11px) * var(--mk)); }
.prose p { margin: 0; }
.prose p + p { margin-top: .75em; }
.intro b, .lede b { color: var(--accent); font-weight: var(--m-bold); }
.lede i { color: var(--accent); }   /* the brand names in Music: italic, not bold */

/* =====================================================================
   01 · AV TECHNICIAN
   ===================================================================== */
.name { margin: 0; font-size: inherit; font-weight: inherit; }
.name__line {
  display: block;
  font-family: var(--f-wide); font-stretch: var(--stretch); font-weight: 900;
  font-size: 16rem; line-height: .8; letter-spacing: -.035em;
  text-transform: uppercase; color: var(--accent); white-space: nowrap;
}

.role { margin: 0; display: grid; gap: .8rem; }
.role span {
  display: flex; align-items: center; gap: 1.2rem;
  font-family: var(--f-mono); font-size: calc(max(1.7rem, 12px) * var(--mk));
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink); white-space: nowrap;
}
.role span::before { content: ""; width: .85rem; height: .85rem; background: var(--accent); flex: none; }

/* portrait: plain B/W, contrast lifted at build time (tools/process_assets.py) */
.portrait { margin: 0; background: #000; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* intro: set like the Kalmykov <ORTA> paragraph - a stepped second block,
   a tiny tag parked in the indent, the address circled by hand */
.intro { display: grid; grid-template-columns: 12rem 1fr; }
.intro p { margin: 0; }
.intro__a { grid-column: 1 / -1; }
.intro__tag {
  grid-column: 1; align-self: end;
  font-family: var(--f-wide); font-stretch: var(--stretch); font-weight: 300; text-transform: uppercase;
  font-size: max(.95rem, 8.5px); line-height: 1.5; letter-spacing: .02em;
  padding: 0 1.2rem .35em 0; color: var(--ink);
}
.intro__b { grid-column: 2; }
.intro__mailrow { grid-column: 1 / -1; margin-top: 3.4rem !important; padding-left: 3.4rem; }
.intro__mail {
  position: relative; display: inline-block;
  font-family: var(--f-mono); font-weight: var(--m-bold); font-size: calc(2.2rem * var(--mk));
  line-height: 1.2; white-space: nowrap; color: var(--accent); text-decoration: none;
}
.intro__circle {
  /* top: 50% + a width-based margin keeps the ellipse centred on the address whatever the font */
  position: absolute; left: -10.5%; top: 50%; margin-top: -21%; width: 122%; max-width: none; height: auto;
  opacity: var(--dim-c, var(--dim)); transform-origin: 50% 50%;
  transform: translate(var(--c-x, .5rem), var(--c-y, .8rem)) rotate(var(--c-r, 5.5deg)) scale(var(--c-s, .99));
  transition: opacity .15s ease; pointer-events: none;
}
.intro__mail:hover .intro__circle, .intro__mail:focus-visible .intro__circle, .intro__circle.is-lit { opacity: 1; }

/* ---------- CV: the fully technical element */
.cvs { display: flex; gap: 4rem; }
.cv {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  width: 34rem; height: 48rem;
  padding: 2.4rem 2.4rem 0;
  background: var(--paper);
  color: #0d0d0d;
  text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 5rem) 0, 100% 5rem, 100% 100%, 0 100%);
  transition: transform .2s steps(3, end), background-color .1s;
}
.cv:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--accent); }
.cv__fold { position: absolute; top: 0; right: 0; width: 5rem; height: 5rem; background: var(--fold); clip-path: polygon(0 0, 0 100%, 100% 100%); }
.cv__head {
  display: flex; align-items: center; gap: 1.2rem;
  font-family: var(--f-mono); font-size: var(--fs-xs);
  letter-spacing: .16em; text-transform: uppercase; color: #474744;
}
.cv__head .i-pdf { order: -1; width: 4.4rem; height: 5.3rem; flex: none; }
.cv__label {
  align-self: center;
  display: flex; flex-direction: column;
  font-family: var(--f-wide); font-stretch: var(--stretch); font-weight: 900;
  text-transform: uppercase; line-height: .82; letter-spacing: var(--big-track);
}
.cv__cv { font-size: 5.2rem; color: #6a6a66; }
.cv__lang { font-size: 10.6rem; color: #0a0a0a; }
.cv__meta {
  display: flex; flex-direction: column; gap: .35rem;
  padding: 1.4rem 0 1.6rem; border-top: 1px solid rgba(0, 0, 0, .22);
  font-family: var(--f-mono); font-size: max(calc(1.15rem * var(--mk)), 8.5px); color: #3a3a37;
}
.cv__langname { font-family: var(--f-wide); font-stretch: var(--stretch); font-weight: 700; font-size: 1.7rem; text-transform: uppercase; color: #0a0a0a; margin-bottom: .3rem; }
.cv__action {
  display: flex; align-items: center; gap: 1.4rem;
  height: 7.4rem; margin: 0 -2.4rem; padding: 0 2.4rem;
  background: var(--signal); color: var(--white);
  font-family: var(--f-wide); font-stretch: var(--stretch); font-weight: 800;
  font-size: 1.9rem; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap;
}
.i-dl { width: 2.8rem; height: 2.8rem; flex: none; }
.cv:hover { transform: translateY(-.8rem); background: var(--white); }
.cv:hover .cv__action { background: #b3170f; }
.cv:hover .i-dl { animation: nudge .7s steps(2, end) infinite; }
@keyframes nudge { 50% { transform: translateY(.4rem); } }

/* ---------- skills: a running laundry list, as in the CV */
.skills__list { display: grid; gap: 1rem; }
.skills__list p { margin: 0; font-family: var(--f-mono); font-weight: 400; font-size: max(calc(1.32rem * var(--mk)), 10px); line-height: 1.6; color: var(--ink); }
.skills__list b { margin-right: .9em; font-size: var(--fs-xs); font-weight: var(--m-bold); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }

/* ---------- languages: one compact line each */
/* the rows share the list's columns (subgrid), so the name column grows to the widest name
   when small screens hold the type at its pixel floor, instead of names running into notes */
.langs__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(6.8rem, max-content) 1fr auto; gap: .45rem 1rem; }
.langs__list li { display: grid; grid-column: 1 / -1; grid-template-columns: 6.8rem 1fr auto; grid-template-columns: subgrid; align-items: center; font-family: var(--f-mono); }
.langs__name { font-weight: var(--m-bold); font-size: max(calc(1.2rem * var(--mk)), 9.5px); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); line-height: 1.3; }
.langs__note { font-size: max(calc(1.15rem * var(--mk)), 9px); letter-spacing: .02em; color: var(--ink-2); white-space: nowrap; }
.dots { display: flex; gap: .4rem; }
.dots i { width: 1.05rem; height: 1.05rem; border-radius: 50%; border: 1px solid var(--ink-3); }
.dots i.on { background: var(--ink); border-color: var(--ink); }
.dots i.half { background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); border-color: var(--ink); }

/* ---------- contact: plain links */
.contact__mail {
  display: inline-block;
  font-family: var(--f-mono); font-weight: 400; font-size: calc(max(1.55rem, 11.5px) * var(--mk));
  color: var(--accent); white-space: nowrap;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em;
}
.contact__mail:hover { text-decoration-thickness: 2px; }
.contact__actions { display: flex; gap: 2.8rem; margin-top: 1.5rem; }
.copy, .contact__li {
  display: inline-flex; align-items: center; gap: .7rem;
  padding: 0; background: none; border: 0; cursor: pointer; text-decoration: none;
  font-family: var(--f-mono); font-size: var(--fs-s); letter-spacing: .16em; text-transform: uppercase; color: var(--ink);
  transition: color .2s ease;
}
.copy svg, .contact__li svg { width: 1.35rem; height: 1.35rem; flex: none; }
.copy:hover, .contact__li:hover { color: var(--accent); }
.contact--end .contact__mail { font-size: max(calc(2.1rem * var(--mk)), 13px); }

/* =====================================================================
   02-04 · shared blocks
   ===================================================================== */
.hand { margin: 0; }
.hand img { display: block; width: 100%; height: auto; }

.sq { display: flex; flex-direction: column; padding: 2.2rem; border: 1px solid var(--line); background: var(--bg); }
.sq--link { color: var(--ink); text-decoration: none; transition: background-color .2s ease, color .2s ease; }
.sq--link:hover { background: var(--accent); color: var(--on-accent); }
.sq__logo { display: block; flex: none; color: var(--accent); transition: color .2s ease; }
.sq__logo--sc { width: 22rem; height: auto; aspect-ratio: 24 / 11; }
.sq__logo--imdb { width: 15rem; height: 15rem; }
.sq__big {
  margin-top: auto;
  font-family: var(--f-mono); font-weight: var(--m-bold);
  font-size: calc(4.4rem * var(--mk)); line-height: 1; letter-spacing: -.02em;
  text-transform: uppercase; color: var(--accent); transition: color .2s ease;
}
.sq--link:hover :is(.sq__big, .sq__logo) { color: var(--on-accent); }
.sq__foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2rem; padding-top: 1.1rem; border-top: 1px solid currentColor; font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.sq__foot svg { width: 1.5rem; height: 1.5rem; flex: none; }

.sq--small { padding: 1.3rem; }
.sq--small .sq__big { margin-top: 0; font-size: calc(2rem * var(--mk)); }
.sq--small .sq__foot { margin-top: auto; padding-top: .7rem; }
/* small squares with a logo (02 music): logo on top, name and link at the foot */
.sq--small .sq__logo + .sq__big { margin-top: auto; }
.sq--small .sq__logo ~ .sq__foot { margin-top: 1rem; }
.sq--small .sq__logo--sc { width: 11rem; }
.sq--small .sq__logo--imdb { width: 6.4rem; height: 6.4rem; }
/* the bottom-right quarter starts on its neighbour's border, so the two squares' edges run on
   as one line through the corner; one border larger keeps it flush with the player.
   --hair is the drawn border width (site.js), 1px except at scalings like 125% */
.sq--corner { --o: var(--hair, 1px); margin: calc(-1 * var(--o)) 0 0 calc(-1 * var(--o));
              width: calc(var(--w) * 1rem + var(--o)); height: calc(var(--h) * 1rem + var(--o)); }

/* ---------- 02 music player */
.player { padding: 2.2rem; }
.player > * { flex: none; }
.player .block-title { margin-bottom: 1.4rem; }
.player__now { display: grid; grid-template-columns: 4.8rem 1fr auto; gap: 1.4rem; align-items: center; }
/* volume knob: a 270-degree arc lit up to the level (like the waveform), a knob with a tick */
.vol { position: relative; width: 4.8rem; height: 4.8rem; cursor: ns-resize; touch-action: none; }
.vol[hidden] { display: none; }
.player__now:has(.vol[hidden]) { grid-template-columns: 4.8rem 1fr; }
.vol__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.vol__dial { display: block; width: 100%; height: 100%; overflow: visible; fill: none; }
.vol__dial * { transition: stroke .15s ease; }   /* viewBox units = design px */
.vol__track { stroke: var(--ink-3); stroke-width: 2; }
.vol__level { stroke: var(--accent); stroke-width: 2; stroke-dasharray: var(--vol, 80) 100; }
.vol__body { stroke: var(--ink-2); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.vol__tick { stroke: var(--ink); stroke-width: 2; stroke-linecap: square; transform-origin: 24px 24px; transform: rotate(calc(var(--vol, 80) * 2.7deg - 135deg)); }
.vol:hover .vol__body, .vol.is-dragging .vol__body { stroke: var(--accent); }
.vol:hover .vol__tick, .vol.is-dragging .vol__tick { stroke: var(--accent); }
.vol__input:focus-visible + .vol__dial { outline: 2px solid var(--accent); outline-offset: .3rem; border-radius: 50%; }
.player__btn { width: 4.8rem; height: 4.8rem; display: grid; place-items: center; padding: 0; border: 1px solid var(--accent); background: none; color: var(--accent); cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.player__btn svg { width: 2rem; height: 2rem; }
.player__btn:hover { background: var(--accent); color: var(--on-accent); }
.player__meta { min-width: 0; display: grid; gap: .3rem; }
.player__title {
  font-family: var(--f-mono); font-weight: var(--m-bold); font-size: max(calc(1.35rem * var(--mk)), 10px); line-height: 1.25; color: var(--accent);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.player__time { font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .1em; color: var(--ink-2); white-space: nowrap; }
.player__wave { display: flex; align-items: center; gap: .2rem; height: 3.2rem; margin-top: 1.2rem; cursor: pointer; }
.player__wave i { flex: 1; background: var(--ink-3); min-height: 1px; transition: background-color .15s ease; }
.player__wave i.played { background: var(--accent); }
.player__list { list-style: none; margin: 1.2rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.player__list button {
  width: 100%; display: grid; grid-template-columns: 2.2rem 1fr auto; align-items: baseline; gap: .7rem;
  padding: .45rem 0; background: none; border: 0; border-bottom: 1px solid var(--line-2);
  text-align: left; cursor: pointer; color: var(--ink); transition: color .15s ease;
  font-family: var(--f-mono);
}
.player__list .n, .player__list .d { font-size: var(--fs-xs); color: var(--ink-2); letter-spacing: .06em; }
.player__list .t { font-size: max(calc(1.15rem * var(--mk)), 9px); line-height: 1.3; }
.player__list button:hover, .player__list .is-current button { color: var(--accent); }
.player__list .is-current .n { color: var(--accent); }

/* ---------- 03 visuals: the JVtools card (hero screenshot, copy on hover) */
.jv { display: block; overflow: hidden; border: 1px solid var(--line); background: #222; color: var(--accent); text-decoration: none; }
.jv__shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: filter .3s ease, transform .5s var(--ease); }
.jv__title {
  position: absolute; left: 0; bottom: 0; display: inline-flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.8rem; background: var(--bg);
  font-family: var(--f-mono); font-weight: var(--m-bold); font-size: calc(2.2rem * var(--mk)); letter-spacing: -.01em;
  transition: background-color .2s ease, color .2s ease;
}
.jv__title svg { width: 1.8rem; height: 1.8rem; }
.jv__copy {
  position: absolute; left: 4rem; right: 4rem; top: 50%; transform: translateY(-40%);
  font-family: var(--f-mono); font-weight: 400; font-size: calc(2.2rem * var(--mk)); line-height: 1.45; color: var(--white);
  opacity: 0; transition: opacity .1s ease, transform .1s var(--ease);
}
.jv:hover .jv__shot, .jv:focus-visible .jv__shot { filter: blur(1rem) brightness(.65); transform: scale(1.05); }
.jv:hover .jv__copy, .jv:focus-visible .jv__copy { opacity: 1; transform: translateY(-58%); }
.jv:hover .jv__title, .jv:focus-visible .jv__title { background: var(--accent); color: var(--on-accent); }

/* ---------- 03 visuals: loop placeholders (replace with MP4/WebM loops) */
.loop { padding: 0; overflow: hidden; }
.loop__ph { position: absolute; inset: 0; }
.loop__ph[data-anim="a"] { background: repeating-linear-gradient(90deg, var(--ink-3) 0 .2rem, transparent .2rem 1.6rem); animation: bars 1.6s linear infinite; }
@keyframes bars { to { background-position: 1.6rem 0; } }
.loop__ph[data-anim="b"] { background: radial-gradient(circle, var(--ink-3) .16rem, transparent .2rem) 0 0 / 1.6rem 1.6rem; }
.loop__ph[data-anim="b"]::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); box-shadow: 0 0 1.4rem color-mix(in srgb, var(--accent) 60%, transparent); animation: scan 3s steps(30, end) infinite; }
@keyframes scan { to { transform: translateY(15rem); } }
.loop__ph[data-anim="c"]::before { content: ""; position: absolute; left: 50%; top: 50%; width: 6rem; height: 1px; background: var(--accent); transform-origin: 0 50%; animation: sweep 4s linear infinite; }
.loop__ph[data-anim="c"]::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12rem; height: 12rem; margin: -6rem 0 0 -6rem; border: 1px solid var(--ink-3); border-radius: 50%; }
@keyframes sweep { to { transform: rotate(360deg); } }

/* ---------- 03 visuals: video loop squares (tools/process_loops.py). The still and its title
   until hovered; site.js then plays the loop on from where it stopped and, once it runs, adds
   .is-playing: a 1 s crossfade into the video (Jovan's call; LOOP_FADE in site.js matches).
   Leaving fades back and pauses. The title is white over the photo in both themes. */
.loop__still, .loop__video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity 1s ease; }
.loop__video { opacity: 0; }
.loop__still { filter: brightness(.8); }
.loop__title {
  position: relative; padding: 1.3rem;
  font-family: var(--f-mono); font-weight: var(--m-bold); font-size: calc(max(1.9rem, 11px) * var(--mk));
  line-height: 1.1; letter-spacing: -.02em; color: var(--white); transition: opacity 1s ease;
}
.loop--video.is-playing .loop__video { opacity: 1; }
.loop--video.is-playing :is(.loop__still, .loop__title) { opacity: 0; }

/* the FX reel square: a loop square that is also the button to the full reel. Its plate (like
   the JVtools card's) says what a click does and stays over the loop; it inverts on hover */
.reel-btn { cursor: pointer; text-align: left; }
.reel-btn:focus-visible { outline-offset: .3rem; }
.loop__cta {
  position: absolute; left: 0; bottom: 0; display: inline-flex; align-items: center; gap: .7rem;
  padding: .55rem .9rem; background: var(--bg); color: var(--accent);
  font-family: var(--f-mono); font-weight: var(--m-bold); font-size: calc(max(1.15rem, 9px) * var(--mk)); white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}
.loop__cta svg { width: 1.1rem; height: 1.1rem; flex: none; }
.reel-btn:hover .loop__cta, .reel-btn:focus-visible .loop__cta { background: var(--accent); color: var(--on-accent); }

/* ---------- 04 about (the paragraph is set with the intro and ledes above)
   photo bouquet: site.js packs the photos around one point and sets the box (--x/--y/--w/--h)
   and each photo's place in em, so the phone layout can shrink the whole thing via font-size */
.bouquet { font-size: 1rem; }
.bouquet:not(.is-laid) { visibility: hidden; }
.bouquet img { position: absolute; display: block; object-fit: cover; background: #111; }

/* the smiley in the next arrow's spot: still until clicked; site.js moves it (a kick per click) */
.smiley { padding: 0; border: 0; background: none; cursor: pointer; }
.smiley img { display: block; width: 100%; height: 100%; }
.legal { margin: 0; font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.legal a { color: var(--ink-2); }
.legal a[aria-disabled="true"] { text-decoration: none; cursor: default; }

/* =====================================================================
   rail + next arrow
   ===================================================================== */
.rail { position: absolute; left: 158rem; top: 36rem; width: 24rem; height: 40rem; opacity: var(--dim); transition: opacity .15s ease; pointer-events: none; }
.rail__item { pointer-events: auto; white-space: nowrap; }
.rail:hover, .rail:focus-within { opacity: 1; }
.rail__list { position: relative; list-style: none; margin: 0; padding: 0; height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
/* the line: drawn 1px wide in the middle of a 2.4rem strip (the ticks' width) that takes the
   hover, so pointing at the line lights the rail too */
.rail__list::before { content: ""; position: absolute; right: .8rem; top: -3rem; bottom: -3.5rem; width: 2.4rem; background: linear-gradient(var(--ink), var(--ink)) 50% 0 / 1px 100% no-repeat; pointer-events: auto; transform-origin: 50% 0; }
.rail__item {
  position: relative; display: flex; align-items: center; justify-content: flex-end; gap: .9rem;
  height: 3rem; padding-right: 4.6rem;
  font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; transition: color .15s ease;
}
.rail__item::after { content: ""; position: absolute; top: -.25rem; bottom: -.25rem; left: 0; right: -.5rem; } /* ~20% larger click area, layout unchanged */
.rail__num { color: var(--ink-2); transition: color .15s ease; }
.rail__tick { position: absolute; right: .8rem; top: 50%; width: 2.4rem; height: 2px; margin-top: -1px; background: var(--ink); transition: height .18s ease, margin-top .18s ease, background-color .18s ease; }
.rail__item:hover { color: var(--accent); }
.rail__item.is-active { color: var(--accent); }
.rail__item.is-active .rail__num { color: var(--accent); }
.rail__item.is-active .rail__tick { height: 1rem; margin-top: -.5rem; background: var(--accent); }

.next { position: absolute; left: 172.6rem; top: 80.5rem; width: 9.6rem; height: 8.2rem; padding: 0; border: 0; background: none; cursor: pointer; transition: opacity .2s ease; }
.next img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .2s ease; }
.next__filled { opacity: 0; }
.next:hover .next__dotted, .next:focus-visible .next__dotted { opacity: 0; }
.next:hover .next__filled, .next:focus-visible .next__filled { opacity: 1; }
.next.is-hidden { opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s .2s; }
/* the hint beside the arrow (note -> music, square -> tech art, motorcycle -> about), tucked
   under the end of the rail line. Each is centred on the same point (9.6, 1.7 from the arrow's
   corner) and sized by the average of its ink height and overall size, so the three read as
   one set; the motorcycle stays the widest. */
.next .next__hint { inset: auto; opacity: 0; }
.next[data-to="music"] .next__hint[data-for="music"],
.next[data-to="visuals"] .next__hint[data-for="visuals"],
.next[data-to="about"] .next__hint[data-for="about"] { opacity: 1; }
.next .next__hint--note   { left: 8.23rem; top: -.4rem;  width: 2.73rem; height: 4.2rem; }
.next .next__hint--square { left: 7.85rem; top: -.14rem; width: 3.5rem;  height: 3.67rem; }
.next .next__hint--moto   { left: 7.16rem; top: .13rem;  width: 4.88rem; height: 3.14rem; }

/* ---------- light / dark switch, in the margin above the frame's top line, centred over the rail line.
   The knob slides left (dark) or right (light) and carries the current mode's icon, cut out of
   it; dimmed like the rail until pointed at. Drawn in em: font-size sets the size (.625rem =
   4 x 2 units), and each knob sits centred on its half. */
.theme {
  position: absolute; left: calc(var(--x) * 1rem); top: calc(var(--y) * 1rem);
  font-size: .625rem; width: 6.4em; height: 3.2em; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; place-items: center;
  border: 1px solid var(--ink); border-radius: 1.6em; background: none; color: var(--ink);
  cursor: pointer; opacity: var(--dim); transition: opacity .15s ease;
}
.theme:hover, .theme:focus-visible { opacity: 1; }
.theme::after { content: ""; position: absolute; inset: -.6em; }   /* a larger click area, layout unchanged */
.theme__knob { position: absolute; left: calc(1.6em - .5px - 1.2em); top: 50%; width: 2.4em; height: 2.4em; margin-top: -1.2em; border-radius: 50%; background: var(--accent); transition: transform .2s var(--ease); }
.theme svg { position: relative; width: 1.5em; height: 1.5em; }
.theme__moon { color: var(--bg); }
:root[data-theme="light"] .theme__knob { transform: translateX(calc(3.2em - 1px)); }
:root[data-theme="light"] .theme__moon { color: var(--ink); }
:root[data-theme="light"] .theme__sun { color: var(--bg); }

/* =====================================================================
   FX reel player: a <dialog> over the page (site.js, "reel player"). The video is the largest
   16:9 that fits the window, never wider than its own 1920 px; it grows out of the reel square
   in .3 s and shrinks back into it (reduced motion: fades only). The page behind is the page
   colour at 94%; the frame is a hairline like the squares. The control bar sits over the
   picture, so it is dark in both themes: white controls, mono type, square marks.
   ===================================================================== */
html.reel-open, html.reel-open body { overflow: hidden; }
.reel {
  --m: clamp(12px, 4vmin, 48px);        /* margin around the box */
  --row: clamp(36px, 4.4rem, 52px);     /* the close button's row above the picture */
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; overflow: hidden; overscroll-behavior: contain;
  background: color-mix(in srgb, var(--bg) 94%, transparent); color: var(--accent);
}
.reel[open] { display: grid; place-items: center; }
.reel::backdrop { background: transparent; }
.reel__box { width: min(1920px, 100vw - 2 * var(--m), (100vh - 2 * var(--m) - var(--row)) * 16 / 9); }
@supports (height: 100dvh) { .reel__box { width: min(1920px, 100vw - 2 * var(--m), (100dvh - 2 * var(--m) - var(--row)) * 16 / 9); } }
.reel__close {
  display: grid; place-items: center; width: var(--row); height: var(--row); margin: 0 -.6em 0 auto; padding: 0;
  border: 0; background: none; color: var(--accent); cursor: pointer; opacity: .75; transition: opacity .15s ease;
}
.reel__close svg { width: 45%; height: 45%; }
.reel__close:hover, .reel__close:focus-visible { opacity: 1; }
.reel__frame { position: relative; aspect-ratio: 16 / 9; background: #000; outline: 1px solid var(--line); overflow: hidden; }
.reel__video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.reel__frame:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; outline: 0; }
.reel.is-idle .reel__frame { cursor: none; }

/* loading: a ring while the video waits for data */
.reel__wait { position: absolute; left: 50%; top: 50%; width: 4.4rem; height: 4.4rem; margin: -2.2rem 0 0 -2.2rem;
  border: 1px solid rgba(255, 255, 255, .25); border-top-color: var(--white); border-radius: 50%;
  opacity: 0; transition: opacity .2s ease; pointer-events: none; animation: reel-spin .8s linear infinite; }
.reel.is-waiting .reel__wait { opacity: 1; }
@keyframes reel-spin { to { transform: rotate(360deg); } }

.reel__bar {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: .9em;
  padding: 0 .7em; height: 3.4em; font-size: clamp(11px, 1.3rem, 15px);
  background: rgba(10, 10, 10, .78); border-top: 1px solid rgba(255, 255, 255, .14); color: var(--white);
  transition: opacity .2s ease;
}
.reel.is-idle .reel__bar:not(:has(:focus-visible)) { opacity: 0; pointer-events: none; }
.reel__btn { flex: none; display: grid; place-items: center; width: 2.6em; height: 2.6em; padding: 0; border: 0; background: none; color: var(--white); cursor: pointer; opacity: .85; transition: opacity .15s ease; }
.reel__btn:hover, .reel__btn:focus-visible { opacity: 1; }
.reel__btn svg { width: 1.45em; height: 1.45em; }
.reel__time { flex: none; font-family: var(--f-mono); font-size: .92em; letter-spacing: .06em; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .85); }

/* seek: a hairline that thickens under the pointer; buffered in grey, played in white, a square head */
.reel__seek { position: relative; flex: 1; align-self: stretch; display: flex; align-items: center; cursor: pointer; touch-action: none; outline-offset: -.4em; }
.reel__rail { position: relative; flex: 1; height: 2px; background: rgba(255, 255, 255, .22); transition: height .12s ease; }
.reel__seek:hover .reel__rail, .reel__seek.is-dragging .reel__rail { height: 4px; }
.reel__buf, .reel__done { position: absolute; left: 0; top: 0; bottom: 0; width: 0; }
.reel__buf { background: rgba(255, 255, 255, .4); }
.reel__done { background: var(--white); }
.reel__head { position: absolute; top: 50%; left: 0; width: .8em; height: .8em; margin: -.4em 0 0 -.4em; background: var(--white); pointer-events: none; }
.reel__tip {
  position: absolute; bottom: calc(100% - .4em); left: 0; transform: translateX(-50%); padding: .3em .55em;
  background: var(--white); color: #000; font-family: var(--f-mono); font-size: .85em; font-variant-numeric: tabular-nums;
  opacity: 0; transition: opacity .12s ease; pointer-events: none; white-space: nowrap;
}
.reel__seek:hover .reel__tip, .reel__seek.is-dragging .reel__tip { opacity: 1; }

/* volume: the same hairline, filled to the level (--v), with a square head */
.reel__vol { flex: none; width: 6em; height: 2.6em; margin: 0; background: none; cursor: pointer; -webkit-appearance: none; appearance: none; --v: 100%; }
.reel__vol::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--white) var(--v), rgba(255, 255, 255, .22) var(--v)); }
.reel__vol::-moz-range-track { height: 2px; background: linear-gradient(90deg, var(--white) var(--v), rgba(255, 255, 255, .22) var(--v)); }
.reel__vol::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: .8em; height: .8em; margin-top: calc(1px - .4em); border: 0; border-radius: 0; background: var(--white); }
.reel__vol::-moz-range-thumb { width: .8em; height: .8em; border: 0; border-radius: 0; background: var(--white); }
.reel__vol[hidden] { display: none; }
@media (hover: none) { .reel__vol { display: none; } }   /* touch: the device's own volume keys */

/* =====================================================================
   text pages (Datenschutz, later the Impressum): normal scrolling document
   ===================================================================== */
html.doc { font-size: 10px; }
html.doc body { height: auto; overflow: auto; }
.doc-main { max-width: 74rem; margin: 0 auto; padding: 8rem 2.4rem 12rem; font-size: 1.7rem; line-height: 1.6; color: var(--ink); }
.doc-main h1 { margin: 2rem 0 1rem; font-family: var(--f-wide); font-stretch: var(--stretch); font-weight: 900; font-size: min(4rem, 6.4vw); line-height: 1; text-transform: uppercase; color: var(--accent); hyphens: auto; overflow-wrap: anywhere; }
.doc-main h2 { margin: 3.6rem 0 .8rem; font-family: var(--f-mono); font-size: 1.3rem; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); }
.doc-main p { margin: 0 0 1.2rem; }
.doc-main a { color: var(--accent); }
.doc-main hr { margin: 7rem 0 5rem; border: 0; border-top: 1px solid var(--line); }
.doc-meta, .doc-back { font-family: var(--f-mono); font-size: 1.2rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.doc-back a { color: var(--ink); text-decoration: none; }

/* =====================================================================
   dev: ?grid paintover canvas and ?shot (tools/grid-shots.mjs, phone-shots.mjs, wheel-check.mjs)
   ===================================================================== */

.grid-overlay { display: none; }
html.grid-mode body::after, html.shot-mode body::after { display: none; }
html.grid-mode .grid-overlay {
  display: block; position: absolute; inset: 0; z-index: 40; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(64, 156, 255, .42) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(64, 156, 255, .42) 1px, transparent 1px),
    linear-gradient(to right, rgba(64, 156, 255, .14) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(64, 156, 255, .14) 1px, transparent 1px);
  background-size: 10rem 10rem, 10rem 10rem, 2rem 2rem, 2rem 2rem;
}
.grid-overlay span { position: absolute; font: 600 1.1rem/1 var(--f-mono); color: rgb(96, 176, 255); }
html.grid-mode.grid-boxes :is(.section.is-active .abs, .theme) { outline: 1px dashed rgba(255, 170, 40, .85); outline-offset: 0; }
.grid-tag { position: absolute; z-index: 41; padding: .2rem .4rem; background: rgba(255, 170, 40, .9); color: #000; font: 600 1rem/1 var(--f-mono); white-space: nowrap; pointer-events: none; }

/* =====================================================================
   small desktop canvases (1rem under ~8.2px: 1366/1440/1536 laptops,
   125% Windows scaling). Small type hits its pixel floor here, so the
   dense blocks get tighter to stay inside the card.
   ===================================================================== */
@media (min-width: 901px) and (max-width: 1599px) and (min-aspect-ratio: 4/5),
       (min-width: 901px) and (max-height: 819px) and (min-aspect-ratio: 4/5) {
  .skills__list { gap: .6rem; }
  .skills__list p { line-height: 1.4; }
  .langs__list { grid-template-columns: minmax(6.4rem, max-content) 1fr auto; gap: .2rem .8rem; }
  .langs__name { letter-spacing: .06em; }
  .langs__note { letter-spacing: 0; }
  .dots { gap: .3rem; }
  .dots i { width: .95rem; height: .95rem; }
  .player__list button { padding: .2rem 0; }
  .player__list .t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .player__wave { height: 2.6rem; margin-top: 1rem; }
  .player__list { margin-top: 1rem; }
  .player .block-title { margin-bottom: 1rem; }
  .contact__actions { gap: 2rem; }
  .sq--small .sq__foot { gap: .5rem; letter-spacing: 0; }   /* "soundcloud.com" at the 9px floor */
  .loop__title { padding: 1rem; font-size: calc(max(1.75rem, 10px) * var(--mk)); }   /* three lines, not four */
}

/* =====================================================================
   phone / portrait: the canvas becomes one scrolling column
   ===================================================================== */
@media (max-width: 900px), (max-aspect-ratio: 4/5) {
  html { font-size: calc(100vw / 44); }
  body { height: auto; overflow: auto; }
  .stage { position: relative; left: auto; top: auto; width: auto; height: auto; transform: none; padding: 0 6.4rem 0 2.4rem; }
  .frame, .next, .grid-overlay, .halftone { display: none; }
  .abs { position: static; left: auto; top: auto; width: auto; height: auto; }
  .section, .section.is-active { position: relative; inset: auto; visibility: visible; display: flex; flex-direction: column; gap: 3.6rem; padding: 7rem 0 7rem; border-bottom: 1px solid var(--line); }
  .section.is-in .abs, .section.is-out { animation: none; }

  /* 01: the name and the portrait share the first row; the rest runs full width under them */
  .section.s-av { display: grid; grid-template-columns: auto 1fr; column-gap: 1.6rem; }   /* .section: beats .section.is-active */
  .s-av > * { grid-column: 1 / -1; }
  .s-av .name { grid-row: 1; grid-column: 1; }
  .s-av .portrait { grid-row: 1; grid-column: 2; justify-self: end; align-self: start; width: var(--pf); height: var(--pf); margin-top: calc(var(--nf) * .022); }
  /* the name's size and line gap (the gap keeps the Ć's accent off the N above it); the portrait runs
     from the top of "JOVAN" to the baseline of "MARIĆ" (Archivo's ink, measured) */
  .s-av { --nf: 5.3rem; --ng: 1rem; --pf: calc(var(--nf) * 1.506 + var(--ng)); }
  .name__line { font-size: var(--nf); }
  .name__l2 { margin-top: var(--ng); padding-left: 2rem; }
  .role span { font-size: 1.4rem; white-space: normal; }
  .intro { --p-size: 1.8rem; grid-template-columns: 1fr; }
  .intro__b { grid-column: 1; }
  .intro__tag { grid-row: 3; font-size: 1.15rem; padding-top: 1.2rem; }
  .intro__mailrow { grid-row: 4; padding-left: 2rem; margin-top: 4.8rem !important; }   /* the circle's ink clears the tag above */
  .intro__mail { font-size: calc(1.85rem * var(--mk)); }

  .cvs { flex-direction: column; gap: 1.2rem; order: -1; }
  .s-av .name { order: -4; }
  .s-av .portrait { order: -3; }
  .s-av .role { order: -2; }
  /* a third of the stacked card's old height (21.7rem): one strip, the red download square at its end */
  .cv {
    width: 100%; height: 7.2rem; padding: 0; clip-path: none;
    grid-template-columns: 6rem minmax(0, 1fr) 7.2rem; grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas: "icon . action" "icon label action" "icon meta action" "icon . action";
  }
  .cv__fold { display: none; }
  .cv__head { grid-area: icon; justify-content: center; }
  .cv__head > span { display: none; }
  .cv__head .i-pdf { width: 2.9rem; height: 3.5rem; }
  .cv__label { grid-area: label; flex-direction: row; align-items: baseline; gap: .9rem; }
  .cv__cv { font-size: 2rem; }
  .cv__lang { font-size: 3.6rem; }
  .cv__meta { grid-area: meta; border-top: 0; padding: .6rem 0 0; font-size: 1.1rem; }
  .cv__meta > :not(:last-child) { display: none; }   /* the label names the language; the file keeps its name on download */
  .cv__action { grid-area: action; height: auto; margin: 0; padding: 0; justify-content: center; }
  .cv__action > span { display: none; }               /* the link's aria-label says it */
  .cv__action .i-dl { width: 2.6rem; height: 2.6rem; }
  .cv:hover { transform: none; }

  .skills__list p { font-size: 1.45rem; }
  .langs__list { grid-template-columns: minmax(9rem, max-content) 1fr auto; }
  .langs__name { font-size: 1.3rem; }
  .dots i { width: 1.2rem; height: 1.2rem; }
  .contact__mail { font-size: calc(1.75rem * var(--mk)); }

  .lede { --p-size: 1.85rem; }
  .prose { --p-size: 2.05rem; }
  .hand { max-width: 82%; }
  .smiley { align-self: flex-end; width: 5.3rem; height: 6.2rem; }
  .bouquet { position: relative; font-size: min(1rem, calc((100vw - 8.8rem) / var(--w, 40)));
             width: calc(var(--w, 40) * 1em); height: calc(var(--h, 30) * 1em); }
  .sq--link { min-height: 24rem; }
  .sq__big { font-size: calc(3.6rem * var(--mk)); }
  .player .player__list .t { font-size: 1.3rem; }

  .section.s-visual, .section.s-music { flex-direction: row; flex-wrap: wrap; column-gap: 2rem; }   /* .section: beats .section.is-active after a resize */
  .s-visual > *, .s-music > * { flex: 1 1 100%; }
  .s-visual > .sq, .s-music > .sq--small { flex: 0 0 calc(50% - 1rem); aspect-ratio: 1; min-height: 0; position: relative; }
  .sq--corner { margin: 0; }
  .sq--small .sq__foot { gap: .5rem; letter-spacing: 0; }
  .jv { position: relative; display: flex; flex-direction: column; }
  .jv__shot { position: relative; display: block; height: auto; aspect-ratio: 1080 / 900; }
  .jv__title { order: 1; }
  .jv__copy { order: 2; }
  .jv__title { position: static; display: flex; font-size: calc(2rem * var(--mk)); }
  .jv__copy { position: static; transform: none; opacity: 1; padding: 0 1.8rem 1.8rem; font-size: calc(1.6rem * var(--mk)); background: var(--bg); color: var(--ink); }
  .jv:hover .jv__shot { filter: none; transform: none; }
  .jv:hover .jv__copy { transform: none; }

  .rail { position: fixed; left: auto; right: .6rem; top: 50%; width: 4.6rem; height: 40vh; transform: translateY(-50%); opacity: .7; z-index: 20; }
  .rail__item { padding-right: 0; }
  .rail__num { display: none; }
  /* the section names, tiny, running down the line left of each tick */
  .rail__label { position: absolute; right: 3.9rem; top: 50%; transform: translateY(-50%); writing-mode: vertical-rl;
                 font-size: calc(max(1rem, 8px) * var(--mk)); letter-spacing: .14em; line-height: 1; color: var(--ink-2); }
  .rail__item.is-active .rail__label { color: var(--accent); }
  .rail__list::before { right: 1rem; }
  .rail__tick { right: 1rem; }
  .theme { left: auto; right: 1.6rem; top: 2rem; font-size: .8rem; }   /* top right of the page, above the name; scrolls away */
}

/* touch screens have no hover: show the JVtools copy over a darkened shot */
@media (hover: none) and (min-width: 901px) and (min-aspect-ratio: 4/5) {
  .jv__shot { filter: brightness(.35); }
  .jv__copy { opacity: 1; }
}

/* reduced motion (Windows "Animation effects" off, macOS "Reduce motion"), the way jvtools.dev
   does it: only travel goes. Fades, blur-to-sharp, colour changes and hovers all stay, with
   the same timing. The keyframes are redefined here rather than overridden per element, so
   the phone layout's "animation: none" still wins. */
@media (prefers-reduced-motion: reduce) {
  @keyframes name-left  { from { opacity: 0; filter: blur(1.6rem); } to { opacity: 1; filter: blur(0); } }
  @keyframes name-right { from { opacity: 0; filter: blur(1.6rem); } to { opacity: 1; filter: blur(0); } }
  @keyframes block-in   { from { opacity: 0; } }
  body::after { animation: none; }                                   /* grain holds still */
  .loop__ph[data-anim], .loop__ph[data-anim]::before, .loop__ph[data-anim]::after { animation: none; }
  .cv:hover { transform: none; }
  .cv:hover .i-dl { animation: none; }
  .jv:hover .jv__shot, .jv:focus-visible .jv__shot { transform: none; }
  .theme__knob { transition: none; }                                 /* the knob jumps */
}
@media (prefers-reduced-motion: reduce) and (min-width: 901px) and (min-aspect-ratio: 4/5) {
  .jv__copy, .jv:hover .jv__copy, .jv:focus-visible .jv__copy { transform: translateY(-50%); }
}
