/* Glass icons — the figures beside each section, their layout, and the two
   movements they carry. Shared by index.html and career-timeline-references.html.

   This lives in its own file rather than inline because both pages need it and
   it is edited often; two inline copies would have drifted apart within a day.
   It expects the page to define --accent and the rest of the palette on :root,
   which both pages already do.

   The companion script is js/glass-icons.js. Neither is required for the page
   to work: with the CSS missing the figures simply lay out as plain images, and
   with the script missing they render without drift or reveal. */

/* ---- glass icons ------------------------------------------------------------
   One rendered icon per section, sitting beside that section's own text. All of
   them are decoration — aria-hidden, no alt text — because the heading next to
   each one already says what the section is. A screen reader should not have to
   hear "clipboard with magnifying glass" before "Quality control".

   Three movements, each of which the page works without:
     drift — the pair closes in and opens out as it passes, through --gi-x
             and --gi-y from the scroll handler
     lift  — scale on hover
     tint  — the glass takes the accent blue on hover
   The first two are dropped under prefers-reduced-motion. The tint stays: it
   is a colour change, not motion. */
.gi{
  margin:0;flex-shrink:0;line-height:0;
  --gi-y:0px;             /* written by the scroll handler, never by CSS */
  transform:translate3d(var(--gi-x,0px),var(--gi-y),0);

  /* Icon tint, resting and hovered. Four filters, and only one number moves
     between the two states:

       grayscale(1)      normalises the source. The renders are near-neutral
                         but not identical — hero-engineer.webp averages RGB
                         170/174/181 — and without this each icon's own cast
                         would steer its tint somewhere slightly different.
       sepia(.85)        puts chroma in. hue-rotate cannot act on a neutral
                         pixel, so something has to give it a hue to rotate.
                         Held CONSTANT across both states, which is what pins
                         the hue (see below).
       saturate(var)     scales that chroma. This is the only thing that
                         changes on hover.
       hue-rotate(145deg) carries it to the accent blue.

     Holding sepia constant is the point. Measured on a neutral background, hue
     reads 192.0 at every saturation from .08 to .86 — it does not move. So the
     resting icons and the hovered ones are the same colour, at different
     strengths, and the transition is a pure chroma ramp with no hue travel.
     An earlier version varied sepia between the states instead, which made the
     hue depend on the saturation and had to be retuned whenever either moved.

     Chroma is exactly linear in the multiplier: measured 3.08 / 4.63 / 6.93 /
     16.57 / 33.19 at .08 / .12 / .18 / .43 / .86, a constant 38.5 per unit. So
     halving the number halves how colourful it reads, no remeasuring needed.

     Resting is .12 rather than 0. A truly neutral grey reads WARM against this
     page, because the background is cool — simultaneous contrast, not a cast in
     the file. A trace of the same blue takes that away.

     145deg is measured, not derived: CSS hue-rotate is a linear matrix
     approximation rather than a true rotation in HSL, so subtracting sepia's
     ~39 from the target overshoots. This lands 192.0 against 193.4 for
     #45b4d4.

     Every icon takes the same blue. An earlier pass colour-coded them to each
     section's own button, orange for the timeline and green for live work;
     with nine icons down the page that read as decoration rather than as
     meaning, so it went. */
  --gi-hue:145deg;        /* -> #45b4d4, the accent blue */
  --gi-sat-rest:.12;      /* chroma  4.6 — a trace, so it does not read warm */
  --gi-sat:.43;           /* chroma 16.6 — hover tint, CURRENTLY UNUSED: the
                             rule that reads it is commented out below. Kept
                             tuned so switching it back on needs no remeasure. */
  --gi-shadow:drop-shadow(0 9px 16px rgba(0,0,0,.42));
}
/* The art layer carries the reveal and the hover lift. It exists so that an
   icon made of more than one image (see .gi-stack) scales as one group rather
   than each piece scaling about its own centre and pulling apart. */
.gi-art{display:block;position:relative;
  transition:transform .38s cubic-bezier(.2,.7,.3,1),opacity .6s ease}
/* One tint, applied always. The hover variant is written and tuned but switched
   off further down, so this is currently the only filter the icons ever carry.

   When it is on, the two states differ in exactly one value, --gi-sat-rest vs
   --gi-sat: same five functions, same order, same everything else, so the
   browser interpolates the transition instead of swapping at the end of it, and
   because sepia is equal on both sides the ramp carries no hue travel at all.

   grayscale(1) leads and is not redundant — it is the one line here most likely
   to be deleted as dead weight. The renders are near-neutral but not neutral:
   hero-engineer.webp averages RGB 170/174/181, a mean chroma of 11/255 biased
   blue. Without it each icon's own cast steers its tint somewhere slightly
   different, and an earlier build that rotated that cast directly sent the
   resting icons to hue 14-20 — red — where the untouched files sit at 214. */
.gi img{display:block;width:100%;height:auto;
  filter:grayscale(1) var(--gi-shadow) sepia(.85) saturate(var(--gi-sat-rest)) hue-rotate(var(--gi-hue));
  transition:filter .4s ease}

/* The hidden start state is applied only once the script has run. With no JS
   the icons simply render, rather than sitting at opacity 0 forever. */
.gi-js .gi-art{opacity:0;transform:scale(.94)}
.gi-js .gi-in .gi-art{opacity:1;transform:scale(1)}

.gi:hover .gi-art{transform:scale(1.055)}

/* ---- hover tint — OFF ---------------------------------------------------
   Deactivated, not deleted. Hover currently does the lift above and nothing
   else; the icons hold their resting tint throughout.

   To switch it back on, uncomment the rule below. Nothing else needs to
   change: --gi-sat is still defined and still tuned (.43, chroma 16.6, half
   of the .86 it started at), the resting rule already carries the matching
   four filters in the same order so the transition interpolates, and the
   transition:filter on .gi img is still there — dormant only because nothing
   currently changes the filter.

.gi:hover img{
  filter:grayscale(1) var(--gi-shadow) sepia(.85) saturate(var(--gi-sat)) hue-rotate(var(--gi-hue));
}
   ------------------------------------------------------------------------ */



/* Tool 01 draws the one schedule panel twice, offset, so it reads as a stack of
   sheets instead of a single page. Both copies sit inside the art layer, so the
   box still contains them and the pair lifts together on hover. */
/* Tool 01 leads its card: order puts the figure ahead of the tool number and
   the copy, so the row reads icon, TOOL 01, text. order rather than an offset,
   because this is a change of place in the row and not a nudge within it. */
.gi-stack{width:201px;order:-1}
.gi-stack .gi-art{aspect-ratio:201 / 191}
/* The two sheets are .gi-layer like any pair, so they take drift and pointer
   tilt independently. Their rates are gentler than a pair's: these are two
   copies of one image sitting almost on top of each other, and at the pair's
   24px they would fan apart far enough to stop reading as a stack. */
.gi-stack .gi-back {--l:5.03%;  --t:0%; --w:95.02%}
.gi-stack .gi-front{--l:-23.33%;--t:4%; --w:95.02%}

/* ---- paired icons ----------------------------------------------------------
   Two different subjects in one figure, at two depths. The stack above repeats
   one image to fake thickness; this puts two separate icons on separate planes.

   Depth is carried by how far each layer travels, not by size alone. Each one
   moves along the line between the middle of the figure and its own, by
   data-drift pixels at the extremes of the pass: inward as the page scrolls
   down, outward as it scrolls back up. The two therefore draw together and
   part again rather than both sliding down the page, and the figure sits
   exactly as composed while it is square in front of the reader. The back
   layer takes the larger number, so it is the one that travels. */
/* Box shape and layer placement are variables, because two of the five pairs
   are hand-composed from the owner's overlay rather than following the default
   arrangement below. */
.gi-pair{--pa:1.18;--pw:440px;--pscale:1}
/* Each pair's box is sized to hug the art inside it. Left at the generic 1.18
   the box stood taller than its two layers — 65px of empty box on 01, 61 on 05,
   37 on 03 — and because the box is what the flex row measures, that dead
   height became dead space in the section. 02 and 04 are deliberately absent:
   their art spills past the box rather than falling short, so hugging those
   would make the two sections taller, not shorter. */
.gi-pair .gi-art{aspect-ratio:var(--pa)}
/* Two sources of movement land on the same element, so they are kept in separate
   custom properties and summed here rather than fighting over `transform`:
     --gi-x / --gi-y   from the scroll handler, carrying each layer out along
                       the line from the figure's middle to its own. The angle
                       is not declared anywhere: it falls out of where the two
                       layers were placed.
     --gi-mx / --gi-my from the pointer, while it is over the figure
   The transition is deliberately short. Long enough that pointer tracking reads
   as damped rather than twitchy, short enough that it does not visibly trail a
   fast scroll. */
.gi-layer{position:absolute;display:block;line-height:0;
  left:var(--l,0%);top:var(--t,0%);width:var(--w,70%);
  transform:translate3d(calc(var(--gi-x,0px) + var(--gi-mx,0px)),
                        calc(var(--gi-y,0px) + var(--gi-my,0px)),0);
  transition:transform .13s cubic-bezier(.2,.7,.3,1)}
.gi-layer img{width:100%}
/* back sits upper-right and smaller. Depth is carried by size, overlap and
   drift rate; the glass is never dimmed, so every icon renders at full
   strength whichever plane it is on. */
.gi-pair .gi-back {--l:42%;--t:2%; --w:58%}
.gi-pair .gi-front{--l:0%;  --t:14%;--w:70%}

/* 10px of clear air between the engineer and the screen. The measurement is
   of the visible art, not the layer boxes: these are square assets whose
   subject fills about 72% of the width, so the boxes overlap by 123px while
   the art overlaps by a fraction of that.

   It is read from offsetLeft, never getBoundingClientRect. A rect includes the
   drift transform, so it reports the composition plus whatever drift phase the
   page is in at that moment: measured that way the gap here read 18.4px when it
   was really 20.25, and closing it by "10" moved it 12. The box is rebuilt
   around the result so the art still ends on the content edge. */
.gi-hero{--pw:413px;--pa:1.262}
.gi-hero .gi-back {--l:47.22%; --t:-3.12%;--w:61.75%}
.gi-hero .gi-front{--l:-10.46%;--t:9.72%; --w:74.58%}
/* --pscale shrinks a whole pair without disturbing it: every layer size and
   offset is a percentage of this box, so both icons scale together and their
   ratio to each other is untouched. The narrow-screen rules below change --pw
   rather than width, so a section's own scale still applies there. */
.gi-pair{width:min(calc(var(--pw) * var(--pscale)),38vw)}
/* Mirrored horizontally. On the img, not the layer, so it cannot collide with
   the parallax transform the layer carries. */
.gi-flip img{transform:scaleX(-1)}

/* --- hand-placed pairs, measured off the owner's overlay -------------------
   03 the checklist is the large element across the top, with the lens small and
      low-left, its glass overlapping the pad's corner. The lens is flipped so
      its handle runs down-left, away from the pad, as drawn.
   04 the open codebook is the large element low-left, with the generation
      cluster small and high-right above it.
   Both use tight-trimmed assets, so these numbers place the visible subject
   itself rather than however much padding a square version would have left. */
/* --pscale sets the overall size of each composition; the large icon in each
   is then pinned to exactly 308px wide, matching what the other sections' front
   layer renders at. 03 shrinks to it with its bottom edge held, 04 grows to it
   with its top edge held, so neither moves where it sits.

   The companion icon in each is left alone, so the within-pair ratio is no
   longer what it was: 03 goes 1.83 to 1.72, 04 goes 1.72 to 1.80. */
.gi-qc  {--pa:1.610;--pscale:.846}
.gi-qc   .gi-back {--l:0%; --t:0%;    --w:82.74%}  /* checklist, 308px wide, bottom edge pinned */
.gi-qc   .gi-front{--l:20%;--t:44.59%;--w:48%}    /* magnifier  */

/* 01 the lone figure is shifted clear of the group, by two arrows on the
   owner's markup in turn: +51px right and +38px down, then -41px left and
   +19px down. The net effect is a figure that has dropped 57px and moved only
   10px right of where it started, which is why --l ends up close to the 42%
   default while --t is well below its 2%. */
/* The lone figure moves out until the two crates meet rather than overlapping
   — 39px right, measured on the visible art as above. */
.gi-team{--pw:414px;--pa:1.462}
.gi-team .gi-back {--l:46.52%;--t:8.71%; --w:61.55%}
.gi-team .gi-front{--l:-9.96%;--t:-4.35%;--w:74.34%}

/* 02 the arm overlays the sheet, so it holds the front layer and the sheet the
   back one. Each keeps the place and size it already had, which is why both
   are overridden here rather than inheriting the pair defaults: the front is
   now the SMALLER of the two, as in 03. Moving the arm forward rather than
   just raising its z-index keeps the depth cues agreeing — it drifts least and
   tilts most, rather than being painted on top while still behaving like the
   far plane.

   The pair is also mirrored from its first arrangement — each left is
   100 - left - width of what it was — which puts the arm on the left of the
   sheet. The arm carries .gi-flip with it, so its pen still reaches toward the
   sheet; without the flip the mirrored arm would be reaching off the page.

   The arm is then lifted by the arrow on the owner's markup: +26px right and
   81px up in CSS pixels, from a 34x-106 arrow on a screenshot measuring 1.3075
   to 1 against a 1:1 capture. The negative top is deliberate — the arm reaches
   above its own figure box, which nothing clips.

   This is the one pair whose data-tilt inverts the usual ranking. Everywhere
   else the near layer moves most under the pointer, because displacement reads
   as proximity. Here the arm is a machine bolted to a base: holding it almost
   still at 0.2 while the sheet swings at 1 reads as the sheet being moved
   under a fixed head, which is what the thing actually does. Scroll already
   agreed — the arm drifts 6 against the sheet's 30 — so both axes now say the
   same thing about which of the two is anchored. */
.gi-auto .gi-back {--l:15.43%;--t:19.1%;--w:88.00%} /* sheet, behind */
.gi-auto .gi-front{--l:0%;--t:-19.7%;--w:72.86%}  /* arm, in front, left of the sheet */
/* The whole pair then sits 50px lower in its row. position/top rather than a
   margin, so it shifts visually without re-centring the flex item, and rather
   than --gi-y, which belongs to the scroll handler. */
/* The right-hand pairs all finish on the content's right edge, and the
   left-hand ones start on its left edge, so the figures line up down the page
   instead of each sitting at its own inset. Measured before: 0 on the hero,
   52 on 02 and 04, 31 on 05. */
/* The right-hand pairs all finish on the content's right edge and the
   left-hand ones start on its left edge, so the figures line up down the page
   rather than each sitting at its own inset. Measured before: 0 on the hero,
   52 on 02 and 04, 31 on 05.

   Done by shrinking each box to its art, not by nudging the figure across. A
   fixed left:52px here aligned it at 1500px and then pushed the page 12px wide
   at 1280 and 1100, because the offset stays put while the content box
   narrows. With the box ending where the art ends, the figure is flush at
   every width and needs no offset. --pa follows so the height is unchanged. */
.gi-auto{position:relative;top:50px;--pw:350px;--pa:0.938}
/* Pulled 52px off the content edge so it lines up with 02, which sits that far
   in; 04 was flush against it and the two read as misaligned. */
.gi-know{--pa:0.99;--pscale:.734}

/* The two AI notes carry the lettering behind an android head. Smaller box
   than a section pair — these sit in a note bar and a strip, not beside a
   heading — so --pw rather than --pscale, which keeps the layer percentages
   reading the same as everywhere else. */
/* Pulled left off the note's right edge, by the arrow on the owner's markup:
   135px on a screenshot measuring 1.287 to 1 against the note's own width. */
.gi-ai{--pw:176px;--pa:1.431;position:relative;left:-105px}
.gi-ai .gi-back {--t:4.88%}
.gi-ai .gi-front{--t:0%}

/* Tool 02: the landscape sheet in front, pinned to 308px wide, with the
   portrait tablet set back into the top-left corner. Both assets are tight, so
   --w places the drawing itself: 85.6% of a 360px box is exactly 308. Rates
   stay gentle, as on the stack opposite — two views of one drawing should not
   fan as far apart as two different subjects. */
/* The overlaid sheet slides down-right along the arrow on the owner's markup,
   81px across and 27px down, so the two read as a stack fanned open rather
   than one sheet with an edge showing. */
.gi-sld{--pw:379px;--pa:1.446}
.gi-sld .gi-back {--l:0%;     --t:0%;    --w:81.28%} /* the sheet, set back up-left */
.gi-sld .gi-front{--l:18.72%; --t:14.50%;--w:81.28%} /* the same sheet, fanned down-right */
.gi-know .gi-back {--l:0%; --t:39%;--w:95.37%} /* codebook, 308px wide, top edge pinned */
.gi-know .gi-front{--l:47%;--t:0%; --w:53%}    /* generation cluster, now in front */

/* section intro — text on the left, icon on the right. Only the heading and the
   lede sit in this row; whatever follows (card grid, tool list, column grid)
   still runs the full width below it. */
.sec-intro{display:flex;align-items:center;gap:44px;margin-bottom:48px}
.sec-intro-t{flex:1 1 0;min-width:0}
/* Alternates a section: icon on the left, text on the right, so the figures do
   not all stack down one edge of the page. row-reverse swaps the two columns
   without touching anything inside them, so the text stays left-aligned in its
   own box. Declared above the narrow-screen block on purpose — that block sets
   flex-direction:column for every .sec-intro, and being later it still wins, so
   a flipped section stacks text-then-icon like all the others. */
.sec-intro-flip{flex-direction:row-reverse}
/* :last-of-type rather than :last-child — section 01 now ends its text column
   with a link, so the paragraph is no longer the last child but is still the
   last <p>, and should still drop its 48px tail. */
.sec-intro .sec-lede:last-of-type{margin-bottom:0}
/* a call to action closing the text column, under the paragraph */
.sec-intro-t .btn-sm{margin-top:28px}
.hero-body{display:flex;align-items:center;gap:50px}
.hero-main{flex:1 1 0;min-width:0}
.tool .gi{align-self:center}
.build-note,.certs-row{display:flex;align-items:center;gap:30px;justify-content:space-between}
.build-note-t,.certs-t{flex:1 1 0;min-width:0}
.contact-row .gi{margin-left:auto}
/* The contact row already carries the photo and three buttons, so its pair runs
   smaller than a section head's — at full width it squeezes the buttons onto
   two lines. */
.gi-contact{--pw:235px;--pa:1.184}

/* Career timeline header: a flight of stairs with a figure climbing it. Both
   two separate along the line between them, which here runs up the flight of
   stairs because that is how the pair is composed. */
/* Header row, used by the career and sample-projects pages: the page's text on
   the left, its figure on the right, with whatever follows (a legend, a tab
   strip) running full width below. */
.hd-row{display:flex;align-items:flex-start;gap:44px}
.hd-t{flex:1 1 0;min-width:0}
@media(max-width:900px){
  .hd-row{flex-direction:column;gap:26px}
  .hd-t{width:100%}
  .hd-row .gi{align-self:center}
}

/* Fitted to the owner's reference screenshot rather than composed here. The
   staircase is identical in both versions, so 370 image px of stairs against
   the 300 this rule draws them at gives the scale between the two pictures.
   The climber's feet are lost among the treads, so his size and position come
   from fitting his own alpha silhouette to the 91 rows above them, where he is
   unobstructed — rms 0.77px. He lands 41% larger than before with the stairs
   36px lower, striding above the flight instead of level with it. --pscale
   then takes the pair as a whole to 90%. */
.gi-career{--pw:300px;--pa:0.815;--pscale:.9}
.gi-career .gi-back {--l:0%;    --t:20.67%;--w:100%}    /* stairs */
.gi-career .gi-front{--l:6.76%; --t:0%;    --w:56.58%}  /* the climber */
/* Set out as the owner's reference render has them: the back bubble at the top
   left, the front one offset about a third of the width right and a sixth of
   the height down, overlapping across roughly half. The box aspect is derived
   rather than chosen — the back bubble is the taller of the two at 0.728, so
   at 70% of a 330px box it stands 317px, and that sets the height. */
.gi-contact .gi-back {--l:0%;     --t:0%;    --w:62.74%}
/* 34% + 66% lands the front layer exactly on the box's right edge, and the
   box is already flush to the row, so the art finishes on the content edge on
   every page without a per-page pixel nudge. One was tried: +31px suited index
   and pushed the other two 34 and 38px past their edge, because their contact
   rows are not the same width. */
.gi-contact .gi-front{--l:40.58%;--t:12.34%;--w:59.42%}

@media (max-width:1100px){
  .gi-stack{width:162px}
  .gi-pair{--pw:340px}
}
@media (max-width:900px){
  .hero-body,.sec-intro,.build-note,.certs-row{flex-direction:column;align-items:flex-start;gap:28px}
  /* Once the row turns into a column the text block is sized on the cross axis,
     where flex-basis no longer applies and align-items:flex-start leaves it
     shrink-to-fit. Measured at 760px that costs .certs-t 85px and .sec-intro-t
     36px, which stops the rule under each cap-h short of the column edge. */
  .hero-main,.sec-intro-t,.build-note-t,.certs-t{width:100%}
  .sec-intro{margin-bottom:36px}
  .gi{align-self:center}
  /* Every fixed offset on a figure was measured against the desktop
     composition — the AI note's -105px, 02's 50px drop. Once the rows become
     columns and the figures centre, those only drag them off centre: the AI
     pair sat 209px left of where it belonged. left and top apply solely to
     positioned elements, so zeroing them here is harmless for the rest and
     catches any offset added later without it having to be listed. */
  .gi{left:0;top:0}
  .gi-stack{width:178px}
  .gi-pair{--pw:290px}
  /* After .gi-pair, not before: both are one class, so order decides. */
  .gi-contact{--pw:238px}
  /* The contact row wraps rather than stacking, so its figure lands on a line
     of its own and align-self, which works the cross axis, cannot centre it. */
  .contact-row .gi{margin:0 auto}
}
@media (prefers-reduced-motion:reduce){
  .gi,.gi-layer{transform:none}
  .gi-js .gi-art,.gi-js .gi-in .gi-art,.gi:hover .gi-art{
    opacity:1;transform:none;transition:none}
}
@media print{.gi{display:none}}

/* Sample projects header: the array in front and to the left, the transformer
   and transmission tower set back to its right. They do not overlap at all, so
   unlike every other pair the depth here is carried by drift alone, and the
   clear air between them is the composition. That air was 3px, close enough to
   read as one object; it is 24px now, with both subjects the size they were.

   The box grows by the same 21px to hold it, and its height is deliberately
   left alone: --t is a percentage of the box height, so changing --pa to match
   the new width would have slid the array down as a side effect. 405/224 keeps
   it exactly where it was. The box is narrower than the art it carries — the
   array hangs 9px below it — which is why --pa is not the art's aspect. */
.gi-samples{--pw:405px;--pa:1.808}
.gi-samples .gi-front{--l:0%;     --t:12.9%;--w:50.37%}  /* array */
.gi-samples .gi-back {--l:56.30%; --t:0%;   --w:43.70%}  /* transformer and tower */
