/* EXPERIENCE AND PROJECTS (v15): "The record", made clearer. One pinned stage, live.js is its playhead.
   A year ruler runs across the screen and is the camera track of the chapter. All line work (the ruler, its ticks,
   the bars over each job's dates, the rules of the project list, the white dot) is drawn on one 2D canvas behind
   the type. The type is real HTML laid out here at its resting place; live.js only moves it with transforms.
   The order the eye takes on a job: company, role, numbers, then the ruler. The current job says so in plain
   words over its name, and its first sentence (what he sells) has the screen to itself before the numbers.
   Reduced motion (the end of this file): nothing is pinned and the same HTML reads as a plain, complete page. */

#live {
  --lv-top: clamp(30px, 6.4vh, 62px);                       /* the title line, the same slot for every title; the line over it holds "Current role" */
  --lv-n: clamp(56px, min(7.4vw, 13vh), 132px);             /* a number at rest */
  --lv-ry: 54%;                                             /* where the ruler crosses the stage */
  --lv-under: clamp(48px, 7vh, 66px);                       /* room under the ruler for its ticks and labels */
  --lv-say: clamp(20px, min(1.9vw, 3.5vh), 30px);           /* the line about what he sells, at rest over its paragraph */
  --lv-sb: clamp(44px, min(6.4vw, 11.4vh), 104px);          /* and while it has the screen */
  --lv-lab: rgba(243, 245, 248, .86);                       /* a label under a number: plain words, close to white */
  --lv-pg: clamp(14px, 2.2vh, 22px);                        /* the air between a description and the photograph under it */
}
html:not(.is-ready):not(.is-reduced) #live .mg-safe { visibility: hidden; }
#live .mg-art { pointer-events: none; }

/* ---------- titles: the chapter title, each company and the projects title share one line and roll through it */
#live .lv-t { position: absolute; left: 0; top: var(--lv-top); white-space: nowrap; }
#live .lv-t .mg-mask, #live .lv-co .mg-mask { padding-bottom: .2em; margin-bottom: -.2em; padding-right: .06em; }

/* ---------- a job */
#live .lv-job { position: absolute; inset: 0; }
#live .lv-id { position: absolute; left: 0; top: var(--lv-top); }
#live .lv-now { position: absolute; left: 0; bottom: 100%; font-size: var(--t-lead); font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; white-space: nowrap; color: var(--ink); }
#live .lv-now .mg-mask { padding-bottom: 0; margin-bottom: 0; }
#live .lv-co, #live .lv-ro, #live .lv-wh { white-space: nowrap; }
#live .lv-ro { margin-top: calc(var(--t-title) * .2 + 8px); font-size: clamp(22px, min(2.1vw, 3.8vh), 34px); letter-spacing: -0.025em; line-height: 1.24; color: var(--ink); font-weight: 700; }
#live .lv-wh { margin-top: 3px; }
#live .lv-ro .mg-mask, #live .lv-wh .mg-mask { padding-bottom: 0; margin-bottom: 0; }      /* their line height already holds the descenders, and masks must not overlap */
#live .lv-rail { position: absolute; left: 0; right: 0; top: var(--lv-ry); height: 0; }
#live .lv-rail > * { display: none; }
#live .lv-stats { list-style: none; position: absolute; left: 0; right: 0; top: calc(var(--lv-ry) + var(--lv-under)); bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: max-content; justify-content: start; align-content: center; align-items: start; column-gap: clamp(28px, 4.4vw, 84px); }
#live .lv-stat { transform-origin: 0 0; }
#live .lv-n { position: relative; display: block; font-size: var(--lv-n); line-height: 1; letter-spacing: -0.05em; white-space: nowrap; color: var(--ink); }
#live .lv-l { display: block; margin-top: clamp(8px, 1.5vh, 16px); max-width: 17.5em; text-wrap: balance; color: var(--lv-lab); }
@media (min-width: 900px) { #live .lv-l { font-size: var(--t-lead); line-height: 1.24; } }
/* what the job was, top right: for the current job its first sentence leads, set bold, one phrase to a line */
#live .lv-txt { position: absolute; right: 0; top: calc(var(--lv-top) + 8px); width: min(42%, 620px); }
#live .lv-say { font-size: var(--lv-say); font-weight: 800; letter-spacing: -0.04em; line-height: 1.12; color: var(--ink); }
#live .lv-say + .lv-p { margin-top: clamp(10px, 1.6vh, 16px); }
#live .lv-p { color: var(--lv-lab); text-wrap: pretty; }
@media (min-width: 900px) { #live .lv-p { font-size: clamp(15px, min(1.25vw, 2.4vh), 20px); } }
#live .lv-ln { will-change: transform; }
@media (min-width: 900px) { #live .lv-ph:not(.lv-ph-j):not(:first-child)::before { content: "\A"; white-space: pre; } }
/* live.js sets each word of that sentence in its own mask, and keeps an unseen copy at the size it has while it
   holds the screen, to read where every word stands then */
#live .lv-w { display: inline-block; line-height: 1; transform-origin: 0 0; clip-path: inset(-.1em -.4em -.26em -.4em); }
#live .lv-w > b { display: inline-block; font-weight: inherit; }
#live .lv-say-g { position: absolute; left: 0; top: 0; width: max-content; margin: 0; font-size: var(--lv-sb); line-height: 1.04; white-space: nowrap; visibility: hidden; pointer-events: none; }
#live .lv-say-g .lv-w { clip-path: none; }

/* ---------- the odometer live.js builds inside a number: the real text stays (unseen) to hold the place and to
   be read aloud; the visible copy is one box per character, each digit a strip that rolls behind its own mask.
   The headline number is set at display size and scaled down to its place, so it is sharp at both sizes. */
#live .lv-n-t { color: transparent; }
#live .lv-od { position: absolute; left: 0; bottom: -.26em; padding: 0 0 .26em 0; clip-path: inset(0 -.5em); white-space: nowrap; line-height: 1; letter-spacing: -0.05em; transform-origin: 0 calc(100% - .26em); color: var(--ink); pointer-events: none; user-select: none; -webkit-user-select: none; }
#live .lv-od-in { display: block; height: 1em; white-space: nowrap; }
#live .lv-ch { display: inline-block; height: 1em; line-height: 1; vertical-align: top; white-space: pre; }
#live .lv-dg { clip-path: inset(0 -.25em); }
#live .lv-st { display: block; }
#live .lv-st > i { display: block; height: 1em; font-style: normal; }

/* ---------- projects: four full width lines and the CV line. The rules between them are drawn on the canvas. */
#live .lv-proj { position: absolute; inset: 0; }
#live .lv-list { position: absolute; left: 0; right: 0; top: calc(var(--lv-top) + var(--t-title) + clamp(16px, 3.4vh, 38px)); bottom: 0; display: flex; flex-direction: column; }
#live .lv-rows { list-style: none; flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
#live .lv-row { flex: 1 1 0; min-height: 0; }
#live .lv-a { display: grid; grid-template-columns: 22% 14% minmax(0, 1fr) minmax(124px, 10%); column-gap: 2.4%; align-items: center; height: 100%; color: inherit; -webkit-tap-highlight-color: transparent; }
#live .lv-cv { flex: 0 0 clamp(58px, 9vh, 88px); height: auto; }
#live .lv-mark { padding: 10px 0; margin: -10px 0; font: inherit; }
/* a logo is uncovered from the left by a soft edge, the light that runs along its rule: live.js moves --rv */
#live .lv-lg { display: inline-flex; align-items: center; gap: .34em; transform-origin: 0 50%; vertical-align: top; transition: translate .5s var(--spring); -webkit-mask-image: linear-gradient(90deg, #000 calc(var(--rv, 140%) - 34%), transparent var(--rv, 140%)); mask-image: linear-gradient(90deg, #000 calc(var(--rv, 140%) - 34%), transparent var(--rv, 140%)); }
#live .lv-lg img { display: block; width: auto; max-width: none; }
#live .lv-wm { font-weight: 700; font-size: clamp(20px, min(2.3vw, 4vh), 46px); letter-spacing: -0.035em; line-height: 1.08; text-wrap: balance; color: var(--ink); }
#live .lv-i-sr { height: clamp(30px, min(3.5vw, 6vh), 66px); }
#live .lv-i-ju { height: clamp(56px, min(6.6vw, 11.2vh), 120px); }
#live .lv-i-cl { height: clamp(26px, min(3.4vw, 5.8vh), 62px); }
#live .lv-role { color: var(--ink); font-weight: 600; text-wrap: balance; }
#live .lv-role .mg-mask { padding-bottom: .24em; margin-bottom: -.24em; }
#live .lv-what { color: var(--soft); text-wrap: pretty; }
@media (min-width: 900px) { #live .lv-what { font-size: clamp(14px, min(1.25vw, 2.25vh), 20px); line-height: 1.42; } }
#live .lv-go { grid-column: -2 / -1; justify-self: end; display: inline-flex; align-items: center; gap: .5em; color: var(--ink); white-space: nowrap; }
#live .lv-go .mg-mask { padding-bottom: .24em; margin-bottom: -.24em; }
#live .lv-arr { width: .74em; height: .74em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; stroke-dasharray: 1; transition: translate .5s var(--spring); }
/* the photograph on the Jurova line. The line is set like the three others: the same columns, the same line lengths.
   On a wide screen the photograph has a moment of its own: while the Jurova line is the one being read, the rule under
   it slides down and the line opens; the photograph stands under the description, its left edge on the text's left
   edge, as wide as the column and as tall as the room down to the foot of the list (live.js sets --pw and --lv-ar).
   When the dot moves on, the rule comes back up over it and the four lines are the same again. It keeps its own
   colour. One white line is drawn from the words to his shoulder (live.js sets it in the frame's own pixels). The clear
   wall beside him is too narrow for the words at a readable size, so they stand just off the frame, one column gap to
   its right, where the line leaves them; on a phone they stand under its right corner and the line rises from them. */
#live .lv-pic { position: relative; margin: 0; }
#live .lv-pic-b { display: block; position: relative; width: 100%; aspect-ratio: var(--lv-ar, 16 / 9); }
#live .lv-pic-f { display: block; position: absolute; inset: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 calc(var(--rv, 140%) - 34%), transparent var(--rv, 140%)); mask-image: linear-gradient(90deg, #000 calc(var(--rv, 140%) - 34%), transparent var(--rv, 140%)); }
#live .lv-pic img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }
#live .lv-pic-a { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--ink); stroke-width: var(--mg-stroke); stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
#live .lv-pic-a path { vector-effect: non-scaling-stroke; }
#live .lv-pa-n { display: none; }
#live .lv-me { font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; color: var(--ink); white-space: nowrap; }
#live .lv-me .mg-mask { padding-bottom: .2em; margin-bottom: -.2em; }
#live .lv-me b > span { display: block; }
@media (min-width: 900px) {
  #live .lv-row-pic .lv-a { position: relative; }
  #live .lv-pic { position: absolute; left: 40.8%; top: calc(50% + var(--wh, 3em) / 2 + var(--lv-pg)); width: var(--pw, calc(56.8% - max(124px, 10%))); }     /* 40.8%: where the description column starts */
  #live .lv-me { position: absolute; left: calc(100% + var(--lv-cg, 20px)); top: var(--lv-my, calc(58% - .6em)); width: max-content; max-width: var(--lw, 142px); font-size: clamp(20px, 1.4vw, 24px); white-space: normal; }
  #live .lv-me .mg-mask, #live .lv-me b { display: block; }
}
#live a.lv-a:focus-visible { outline: 1px solid var(--ink); outline-offset: -1px; }
@media (hover: hover) {
  #live a.lv-a:hover .lv-lg { translate: 8px 0; }
  #live a.lv-a:hover .lv-arr { translate: 3px -3px; }
}

/* ---------- phones: the same record, set for a narrow page. Title, ruler, then one thing at a time in the room
   under it: for the current job the sentence about what he sells with its paragraph, then the numbers alone, each
   over its label. A project line carries its logo and link; its role and description sit under it and open in turn. */
@media (max-width: 899px) {
  /* heights here are in svh, the screen with Safari's toolbars out, so nothing depends on the toolbar's state */
  #live {
    --u: 1vh;
    --lv-top: clamp(0px, .8 * var(--u), 6px);
    --lv-eb: clamp(20px, 3.5 * var(--u), 24px);              /* the line over the company name */
    --lv-topp: clamp(3px, 2 * var(--u), 16px);               /* the projects title */
    --lv-n: clamp(36px, 8.2 * var(--u), 58px);
    --lv-under: clamp(40px, 7 * var(--u), 52px);
    --lv-sb: clamp(30px, 10.4vw, 46px);
    --lv-l1: clamp(34px, 6.2 * var(--u), 44px);              /* a project line's first row: logo and link */
    --lv-rp: clamp(8px, 1.7 * var(--u), 13px);
  }
  @supports (height: 1svh) { #live { --u: 1svh; } }
  #live .lv-t-exp { top: calc(var(--lv-top) + var(--lv-eb)); }
  #live .lv-job { display: flex; flex-direction: column; }
  #live .lv-job > * { flex: none; }
  #live .lv-id { position: relative; top: auto; padding-top: calc(var(--lv-top) + var(--lv-eb)); }
  #live .lv-now { bottom: auto; top: var(--lv-top); font-size: clamp(15px, 4.2vw, 17px); line-height: var(--lv-eb); }
  #live .lv-co { font-size: min(var(--t-title), 10.9vw); }                 /* the longest company name fits on one line */
  #live .lv-ro { margin-top: calc(var(--t-title) * .2 + 2px); font-size: clamp(19px, 5.5vw, 22px); }
  #live .lv-wh { margin-top: 1px; font-size: min(var(--t-label), 4.4vw); }   /* the narrowest phone: the date line ends before the Now marker */
  #live .lv-rail { position: relative; top: auto; flex: none; margin-top: clamp(22px, 4.6 * var(--u), 36px); height: var(--lv-under); }
  #live .lv-stats { position: relative; top: auto; bottom: auto; display: block; order: 2; margin: auto 0; padding: clamp(2px, 1 * var(--u), 10px) 0 clamp(6px, 1.6 * var(--u), 16px); }   /* the numbers sit in the middle of the room they have */
  #live .lv-stat + .lv-stat { margin-top: clamp(8px, 2.2 * var(--u), 20px); }
  #live .lv-l { margin-top: 2px; max-width: none; font-size: clamp(15px, 4.3vw, 17px); line-height: 1.28; }
  #live .lv-txt { display: contents; }
  #live .lv-p { order: 3; font-size: 16px; line-height: 1.42; }                /* 16, not body size: a taller paragraph makes live.js set the big numbers smaller (tried v19) */
  /* the current job: its sentence stands large under the ruler with the paragraph below it (live.js places both),
     and both have left before the numbers arrive */
  #live .lv-say { position: absolute; left: 0; top: var(--lv-st, 46%); font-size: var(--lv-sb); line-height: 1.04; white-space: nowrap; }
  #live .lv-ph:not(:first-child)::before { content: "\A"; white-space: pre; }
  #live.lv-s3 .lv-ph-j::before { content: none; }                           /* a short phone: three lines instead of four */
  #live .lv-cur .lv-p { position: absolute; left: 0; right: 0; top: var(--lv-pt, 70%); margin: 0; }
  #live .lv-say-g { display: none; }

  #live .lv-t-proj { top: var(--lv-topp); font-size: var(--t-beat); letter-spacing: -0.045em; }
  #live .lv-list { top: calc(var(--lv-topp) + var(--t-beat) + clamp(12px, 2.6 * var(--u), 22px)); display: block; }
  #live .lv-rows { display: block; }
  #live .lv-a { position: relative; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; height: auto; padding: var(--lv-rp) 0; }
  #live .lv-mark { height: var(--lv-l1); box-sizing: content-box; display: flex; align-items: center; padding: 8px 0; margin: -8px 0; }
  #live .lv-wm { font-size: clamp(20px, 5.8vw, 24px); white-space: nowrap; }
  #live .lv-i-sr { height: calc(var(--lv-l1) * .74); }
  #live .lv-i-ju { height: calc(var(--lv-l1) + 9px); margin-top: -7px; }     /* a tall mark: it borrows the line's top padding, not the role's room */
  #live .lv-i-cl { height: calc(var(--lv-l1) * .62); }
  #live .lv-go { grid-column: 2; }
  #live .lv-role { position: absolute; left: 0; right: 0; top: calc(var(--lv-rp) + var(--lv-l1) + 1px); white-space: nowrap; }
  #live .lv-what { position: absolute; left: 0; right: 0; top: calc(var(--lv-rp) + var(--lv-l1) + var(--t-lead) * 1.34 + 7px); }
  #live .lv-pic { position: absolute; left: 0; right: 0; top: calc(var(--lv-rp) + var(--lv-l1) + var(--t-lead) * 1.34 + 7px + var(--wh, 100px) + 10px); }
  #live .lv-pic-b { max-height: calc(30 * var(--u)); }
  #live .lv-pa-w { display: none; }
  #live .lv-pa-n { display: inline; }
  #live .lv-me { display: block; margin-top: 12px; text-align: right; font-size: 16px; }      /* "Me!" over "(Co-founder and CRO)", under the right corner, where the line rises */
  #live .lv-cv { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0; }
  #live .lv-cv .lv-mark { height: auto; }
  #live .lv-cv .lv-role { position: static; }
  #live .lv-cv .lv-go { margin-left: auto; }
}

/* ---------- reduced motion: the finished record as a plain page. Every fact, in order, nothing pinned.
   The same page serves a screen too short to hold the film (a phone on its side): live.js marks it .lv-flat. */
#live.lv-flat .mg-pin { height: auto; }
#live.lv-flat .mg { position: relative; height: auto; min-height: 100vh; min-height: 100svh; }
#live.lv-flat .mg-safe { position: relative; left: auto; right: auto; top: auto; bottom: auto; padding: calc(96px + env(safe-area-inset-top, 0px)) var(--pad-r) 64px var(--pad-l); }
:is(.is-reduced #live, #live.lv-flat) .mg-art { display: none; }
:is(.is-reduced #live, #live.lv-flat) :is(.lv-t, .lv-id, .lv-now, .lv-txt, .lv-say, .lv-p, .lv-stats, .lv-proj, .lv-list) { position: static; }
:is(.is-reduced #live, #live.lv-flat) .lv-t { white-space: normal; }
:is(.is-reduced #live, #live.lv-flat) .lv-job { position: relative; inset: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 7%; margin-top: clamp(30px, 6vh, 60px); padding-top: clamp(26px, 5vh, 48px); border-top: 1px solid var(--line); }
:is(.is-reduced #live, #live.lv-flat) .lv-co { font-size: var(--t-beat); letter-spacing: -0.045em; white-space: normal; }
:is(.is-reduced #live, #live.lv-flat) .lv-now { margin-bottom: 4px; }
:is(.is-reduced #live, #live.lv-flat) .lv-txt { display: block; grid-column: 2; grid-row: 1; width: auto; align-self: end; }
:is(.is-reduced #live, #live.lv-flat) .lv-rail { position: relative; top: auto; grid-column: 1 / -1; height: 34px; margin-top: clamp(22px, 4vh, 36px); }
:is(.is-reduced #live, #live.lv-flat) .lv-rail > * { display: block; position: absolute; }
:is(.is-reduced #live, #live.lv-flat) .lv-rail > i { left: 0; right: 0; top: 0; height: 1px; background: var(--line); }
:is(.is-reduced #live, #live.lv-flat) .lv-rail > em { left: var(--a); width: calc(var(--b) - var(--a)); top: -1px; height: 3px; border-radius: 2px; background: var(--ink); }
:is(.is-reduced #live, #live.lv-flat) .lv-rail > span { top: 10px; font-size: var(--t-label); font-weight: 600; line-height: 1.35; color: var(--soft); }
:is(.is-reduced #live, #live.lv-flat) .lv-rail > span:nth-of-type(1) { left: 0; }
:is(.is-reduced #live, #live.lv-flat) .lv-rail > span:nth-of-type(2) { left: 25%; }
:is(.is-reduced #live, #live.lv-flat) .lv-rail > span:nth-of-type(3) { left: 50%; }
:is(.is-reduced #live, #live.lv-flat) .lv-rail > span:nth-of-type(4) { left: 75%; }
:is(.is-reduced #live, #live.lv-flat) .lv-stats { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 22px clamp(28px, 5vw, 84px); margin: clamp(14px, 3vh, 28px) 0 0; padding: 0; }
:is(.is-reduced #live, #live.lv-flat) .lv-n { font-size: clamp(40px, 6vw, 92px); }
:is(.is-reduced #live, #live.lv-flat) .lv-proj { margin-top: clamp(72px, 14vh, 150px); }
:is(.is-reduced #live, #live.lv-flat) .lv-list { display: block; margin-top: clamp(22px, 4vh, 40px); }
:is(.is-reduced #live, #live.lv-flat) .lv-rows { display: block; }
:is(.is-reduced #live, #live.lv-flat) .lv-a { height: auto; padding: clamp(20px, 3.4vh, 34px) 0; border-top: 1px solid var(--line); }
:is(.is-reduced #live, #live.lv-flat) .lv-cv { border-bottom: 1px solid var(--line); }
@media (min-width: 900px) {
  /* the photograph is a second row of the Jurova line, under the description and in its column */
  :is(.is-reduced #live, #live.lv-flat) .lv-pic { position: relative; left: auto; top: auto; grid-column: 3; grid-row: 2; width: min(100%, 720px); margin-top: var(--lv-pg); }
  :is(.is-reduced #live, #live.lv-flat) .lv-row-pic .lv-go { grid-row: 1; }
}
@media (max-width: 899px) {
  :is(.is-reduced #live, #live.lv-flat) .lv-job { display: block; }
  :is(.is-reduced #live, #live.lv-flat) .lv-id { padding-top: 0; }
  :is(.is-reduced #live, #live.lv-flat) .lv-now { line-height: 1.3; }
  :is(.is-reduced #live, #live.lv-flat) .lv-say { margin-top: 18px; font-size: clamp(20px, 5.6vw, 24px); line-height: 1.14; white-space: normal; text-wrap: balance; }
  :is(.is-reduced #live, #live.lv-flat) .lv-ph::before { content: none; }
  :is(.is-reduced #live, #live.lv-flat) .lv-p { margin-top: 12px; }
  :is(.is-reduced #live, #live.lv-flat) .lv-txt:not(:has(.lv-say)) .lv-p { margin-top: 18px; }
  :is(.is-reduced #live, #live.lv-flat) .lv-stats { display: block; margin-top: 14px; }
  :is(.is-reduced #live, #live.lv-flat) .lv-n { font-size: var(--lv-n); }
  :is(.is-reduced #live, #live.lv-flat) .lv-a { row-gap: 6px; }
  :is(.is-reduced #live, #live.lv-flat) .lv-role, :is(.is-reduced #live, #live.lv-flat) .lv-what { position: static; grid-column: 1 / -1; white-space: normal; }
  :is(.is-reduced #live, #live.lv-flat) .lv-pic { position: static; grid-column: 1 / -1; width: auto; max-width: 420px; margin-top: 6px; }
  :is(.is-reduced #live, #live.lv-flat) .lv-pic-b { max-height: none; }
  :is(.is-reduced #live, #live.lv-flat) .lv-row-pic .lv-go { margin-top: 10px; }      /* the link stands clear of the words under the photograph */
  :is(.is-reduced #live, #live.lv-flat) .lv-cv { padding: 0; }
  :is(.is-reduced #live, #live.lv-flat) .lv-cv .lv-role { grid-column: auto; }
}
