/* ==========================================================================
   madebyzane.com — About (css/about.css + js/about.js)
   Loaded only by about.html, after tokens.css and style.css.
   Three full-height screens in one snapping scroller, around a figure that
   never leaves the centre.
     1  slogan banner · Skills / Focus / Education
     2  narrative · Experience · resume, on a diagonal
     3  contact
   Clicking the figure wobbles it and steps the page theme: light → dark →
   accent → light. The new ground spreads from the centre as a ripple; the
   type changes colour as the ripple passes. Each theme only re-points the
   variables below; --ground is the colour actually painted, set by the script
   when a ripple has finished.
   ========================================================================== */
/* themes: ink, ground, the pop colour for Email / Resume, and the two brand colours tuned to stay legible */
.page-about[data-theme="light"]  { --ink:#000000; --bg:#f6f6f6; --pop:#B85324; --linkedin:#0A66C2; --instagram:#E1306C; }
.page-about[data-theme="dark"]   { --ink:#f6f6f6; --bg:#333333; --pop:#e5ff79; --linkedin:#70B5F9; --instagram:#FF6FA3; }
.page-about[data-theme="accent"] { --ink:#000000; --bg:#e5ff79; --pop:#B85324; --linkedin:#0A66C2; --instagram:#C81E5B; }
.ab { --label:color-mix(in srgb, var(--ink) 62%, transparent); --hair:color-mix(in srgb, var(--ink) 30%, transparent); }

/* the page: the site's top line, then this — one screen tall, nothing scrolls but the snap inside it */
.page-about { height:100svh; overflow:hidden; display:flex; flex-direction:column; background:var(--ground); color:var(--ink);
  --display:var(--font-helvetica); --body:var(--font-din); --mono:var(--font-mono);
  --serif:var(--font-serif);
  --expo:var(--ease-out); --pad:clamp(16px,3vw,48px); --gap:clamp(10px,1.7vw,24px); --ground:#f6f6f6;
  /* what the fixed nav needs at the bottom of every screen: its row (space-8), its offset (space-5) and air (space-4) */
  --nav-clear:calc(var(--space-8) + var(--space-5) + var(--space-4)); }
/* the site's own tokens follow the page theme, so the top line, the clock and the pointer read on every ground */
.page-about[data-theme="dark"]   { --text:#f6f6f6; --text-2:#f6f6f6; --label:#b8b8b8; --background:#333333; --divider:#6a6a6a; }
.page-about[data-theme="accent"] { --text:#000000; --text-2:#161616; --label:#3d4420; --background:#e5ff79; --divider:#8c9c4a; }
.page-about > .topbar { transition:color .5s ease; }   /* the fixed top line (style.css), recoloured with the theme */ .page-about > .topbar * { transition:color .5s ease; }
.ab a { color:inherit; text-decoration:none; }
.ab button { font:inherit; color:inherit; background:none; border:0; padding:0; cursor:pointer; }
.ab h1, .ab h2, .ab h3, .ab p, .ab ul { margin:0; } .ab ul { list-style:none; padding:0; }
.ab :focus-visible { outline:2px solid var(--ink); outline-offset:3px; }
.ab-mono { font:400 11px/1.4 var(--mono); letter-spacing:.06em; text-transform:uppercase; }
.ab-ic { width:1em; height:1em; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:square; stroke-linejoin:miter; flex:none; overflow:visible; }

/* ---------- architecture ---------- */
.ab { position:relative; z-index:1; flex:1; min-height:0; overflow:hidden; color:var(--ink); font:400 16px/1.45 var(--body); letter-spacing:0;
  container-type:size; --vh:100cqh; }   /* --vh is this box's height: every screen and the figure's stage are exactly that tall */
/* the ripple: the next ground, clipped to a circle that grows from the figure — behind it, the type, the top line and the nav */
/* fixed, z-index 0: above the page ground; under the page (1), the top line (5) and the nav (50) */
.ab-ripple { position:fixed; inset:0; z-index:0; pointer-events:none; clip-path:circle(0px at 50% 50%); will-change:clip-path; }
:where(.ab, .ab *) { transition:color .5s ease, border-color .5s ease; }
.ab-snap { position:relative; z-index:1; height:100%; overflow-y:auto; overflow-x:hidden; scroll-snap-type:y mandatory; overscroll-behavior:contain; scrollbar-width:none; }
.ab-snap::-webkit-scrollbar { display:none; }
.ab-anchor { position:sticky; top:0; height:var(--vh); z-index:0; display:grid; place-items:center; padding-bottom:var(--nav-clear); }   /* centred in the room above the nav */
.ab-fig { position:relative; width:min(44vw,540px); height:min(76%,640px); }   /* of the room above the nav; the caption under the feet clears the bottom row of text */
.ab-fig canvas { position:absolute; inset:0; width:100%; height:100%; display:block; }
/* the figure's canvas never takes the pointer or the wheel: the click target above it does */
.ab-fig > canvas { pointer-events:none; }
.ab-fig__fallback { position:absolute; inset:0; display:grid; place-items:center; animation:breathe 4.6s ease-in-out infinite alternate; }
.ab-fig__fallback i { width:min(46%,200px); aspect-ratio:1; border-radius:50%; background:radial-gradient(circle at 35% 30%, #fff, #bdbdbd 35%, #4a4a4a 70%, #d8d8d8); }
@keyframes breathe { from { transform:translateY(-1.4%); } to { transform:translateY(1.4%); } }
.ab-hit { position:absolute; left:50%; top:50%; width:min(22vw,260px); height:min(56%,500px); transform:translate(-50%,-50%); z-index:1; }
/* the feet sit 79% down the figure's box (camera maths below); the caption hangs just under them, on the figure's own axis */
.ab-cap { position:absolute; left:50%; top:85%; transform:translateX(-50%); z-index:2; white-space:nowrap; text-align:center; font:400 9.5px/1 var(--mono); letter-spacing:.16em; text-transform:uppercase; pointer-events:none; }
.ab-scenes { position:relative; z-index:1; margin-top:calc(var(--vh) * -1); pointer-events:none; }
.ab-scene { height:var(--vh); scroll-snap-align:start; scroll-snap-stop:always; position:relative; display:grid; padding:var(--space-2) var(--pad) var(--nav-clear); gap:var(--gap);
  grid-template-columns:minmax(0,1fr) minmax(120px,30vw) minmax(0,1fr); grid-template-rows:auto minmax(0,1fr) auto; }
.ab-scene > * { pointer-events:auto; min-width:0; }
.ab-idx { position:absolute; z-index:3; right:clamp(4px,1vw,16px); top:calc(50% - var(--nav-clear) / 2); transform:translateY(-50%); display:flex; flex-direction:column; }
.ab-idx button { position:relative; display:grid; place-items:center; width:44px; height:44px; font:400 10.5px/1 var(--mono); letter-spacing:.06em; color:var(--label); }
.ab-idx button[aria-current="true"] { color:var(--ink); }
.ab-idx button[aria-current="true"]::before { content:""; position:absolute; right:0; width:10px; height:1px; background:currentColor; }
[data-ab-r] { opacity:0; transform:translateY(22px); transition:opacity .9s var(--expo), transform .9s var(--expo), color .5s ease; transition-delay:calc(var(--i,0) * 80ms + 120ms), calc(var(--i,0) * 80ms + 120ms), 0s; }
.ab-scene.is-in [data-ab-r] { opacity:1; transform:none; }

/* ---------- screen 1: banner, then three lists on three axes ---------- */
.ab-s1 { grid-template-areas:"t t t" ". . ." "a b c"; }
.ab-slogan { grid-area:t; font:var(--t-display-massive-font); font-size:min(var(--t-display-massive-size),8.4vh); letter-spacing:var(--t-display-massive-tracking); text-wrap:balance; padding-right:44px; }
/* Slogan typewriter (js/typewriter.js). The full sentence is always laid out — the part not yet
   typed is only invisible — so the lines never re-wrap as it types. Timings: --typewriter-* tokens. */
.tw-off { visibility:hidden; }
.tw-caret { position:relative; display:inline-block; width:0; height:1em; vertical-align:baseline; }
.tw-caret::before { content:""; position:absolute; left:.04em; bottom:-.12em; width:.07em; height:1.02em; background:currentColor; }
.tw-caret.is-under::before { bottom:-.06em; width:.52em; height:.07em; }
.tw-caret.is-blink::before { animation:tw-blink var(--typewriter-blink) steps(1, end) infinite; }
.tw-caret.is-hidden::before { visibility:hidden; animation:none; }
@keyframes tw-blink { 50% { visibility:hidden; } }
.ab-list { display:flex; flex-direction:column; align-items:flex-start; text-align:left; align-self:start; justify-self:start; }
.ab-list--a { grid-area:a; }                                              /* left edge */
.ab-list--b { grid-area:b; justify-self:center; margin:0 auto; }          /* the block is centred; its text stays left-aligned */
.ab-list--c, .ab-list--x { justify-self:end; align-items:flex-end; text-align:right; }   /* anchored to the right edge */
.ab-list--c { grid-area:c; }
.ab-list--c li span, .ab-list--x li span { margin-left:.6em; }
.ab-list h2 { font:500 clamp(18px,min(2vw,3.4vh),30px)/1.05 var(--display); letter-spacing:-.02em; margin-bottom:.5em; }
.ab-list li { padding:2px 0; font-size:clamp(13px,min(1.15vw,2.1vh),17px); }
.ab-list li span { font:400 10.5px/1.4 var(--mono); letter-spacing:.04em; color:var(--label); margin-left:.6em; white-space:nowrap; }

/* ---------- screen 2: four corners — headline top left, Experience top right, Education bottom left, resume bottom right ---------- */
.ab-s2 { grid-template-areas:"n . x" ". . ." "m . r"; }
.ab-list--x { grid-area:x; padding-right:44px; }
.ab-lead { grid-area:n; font:400 clamp(16px,min(1.7vw,3vh),26px)/1.28 var(--display); letter-spacing:-.01em; max-width:34ch; }
.ab-list--e { grid-area:m; align-self:end; }                              /* bottom left, left-aligned like Designs */
/* Laptops and tablets (760–1279px): the side columns are too narrow for a name and its detail on one
   line, so the name used to break mid-way ("EDGE Sound / Research"). The detail drops under the name instead. */
@media (min-width:760px) and (max-width:1279px) { .ab-list--x li span, .ab-list--e li span { display:block; margin-left:0; } }
.ab-resume { grid-area:r; justify-self:end; align-self:end; display:inline-flex; align-items:center; gap:.5em; font:500 clamp(18px,min(2vw,3.4vh),30px)/1.1 var(--display); letter-spacing:-.02em; padding-bottom:4px; background:linear-gradient(currentColor,currentColor) 0 100%/100% 1px no-repeat; transition:color .25s; }
.ab-resume:hover, .ab-resume:focus-visible { color:var(--pop); }

/* ---------- screen 3: contact, serif display, branded hovers ---------- */
.ab-s3 { grid-template-areas:"c1 . c2" ". . ." "c3 . c4"; }
.ab-ct { display:inline-flex; flex-direction:column; gap:clamp(6px,1.2vh,12px); --brand:var(--pop); transition:color .25s; }
.ab-ct--1 { grid-area:c1; justify-self:start; } .ab-ct--2 { grid-area:c2; justify-self:end; align-items:flex-end; text-align:right; }
.ab-ct--3 { grid-area:c3; justify-self:start; align-self:end; } .ab-ct--4 { grid-area:c4; justify-self:end; align-self:end; align-items:flex-end; text-align:right; }
.ab-ct b { font:var(--t-serif-display-font); font-size:min(var(--t-serif-display-size),10vh); letter-spacing:var(--t-serif-display-tracking); }   /* tokens.json serif-display, capped to the screen */
.ab-ct .ab-ic { font-size:clamp(26px,min(3vw,5vh),44px); stroke-width:1.25; }
.ab-ct .ab-mono { display:inline-flex; gap:.5em; align-items:center; color:var(--label); transition:color .25s; }
.ab-ct--in { --brand:var(--linkedin); } .ab-ct--ig { --brand:var(--instagram); }
.ab-ct:hover, .ab-ct:focus-visible, .ab-ct:hover .ab-mono, .ab-ct:focus-visible .ab-mono { color:var(--brand); }

/* desktop: the figure shrinks with the window's height, so it and its caption stay between the slogan and the bottom row */
@media (min-width:760px) { .ab-fig { height:max(150px, min(76%, 640px, (50% - 170px) / .35)); } }   /* keeps the caption (85% down the figure) above the ~170px bottom row at any window height */
@media (min-width:760px) and (max-height:520px) { .ab-cap { display:none; } }
@media (max-width:479px) { .page-about { --nav-clear:calc(var(--space-8) + var(--space-4) + var(--space-4)); } }
@media (max-width:759px) {
  .ab-scene { grid-template-columns:minmax(0,1fr) minmax(0,1fr); padding:var(--space-2) 14px var(--nav-clear); }
  .ab-fig { width:78vw; height:44%; } .ab-hit { width:44vw; height:38%; }
  .ab-cap { font-size:8.5px; letter-spacing:.12em; }
  .ab-s1 { grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-areas:"t t t" ". . ." "a b c"; gap:10px; }
  .ab-list h2 { font-size:15px; } .ab-list li { font-size:11.5px; line-height:1.3; } .ab-list li span { display:none; }
  .ab-s2 { grid-template-areas:"n x" ". ." "m r"; }
  .ab-list--x { padding-right:34px; } .ab-lead { font-size:13px; line-height:1.25; }
  .ab-resume { font-size:16px; } .ab-resume .ab-ic:last-child { display:none; }
  .ab-s3 { grid-template-areas:"c1 c2" ". ." "c3 c4"; }
}
@media (prefers-reduced-motion: reduce) { [data-ab-r] { opacity:1; transform:none; transition:none; } .ab-fig__fallback { animation:none; } }
