/* Juangarcia(mx): the site's styles, moved out of index.html so every page shares one cached file (2026-10-26) */
  /* type: Brulia Display (Harbor Bickmore, licensed Oct 2026) for everything, body text included (Juan's call; only Display was bought). --f-text stays as a name so the styles read as before */
  @font-face{font-family:"Brulia Display";src:url("fonts/brulia/BruliaVariable-Display.woff2") format("woff2"),url("fonts/brulia/BruliaVariable-Display.woff") format("woff");font-display:swap}   /* licensed (That That Type, commercial): on the web only as WOFF2 / WOFF, and the files can't be altered or redistributed, so they stay out of git */
  :root{--f-display:"Brulia Display","Helvetica Neue",Helvetica,Arial,sans-serif;--f-text:var(--f-display)}
  :root{ --ink:#fff; --mute:rgba(255,255,255,.82); --acc:#fff; }
  *{box-sizing:border-box;margin:0;padding:0}
  html,body{background:#3a6fb5;color:var(--ink);
    font-family:var(--f-text);font-synthesis:none;-webkit-font-smoothing:antialiased}
  body.night{background:#05060a} body.ocean{background:#8a7398}
  html:has(body.night){background:#05060a} html:has(body.ocean){background:#8a7398}   /* Safari tints its bars from the page colour */
  canvas{position:fixed;top:0;left:0;width:100%;height:100vh;height:100lvh;display:block;opacity:0;transition:opacity 2s ease;touch-action:pan-y;cursor:grab}
  canvas:active{cursor:grabbing}
  body.ready canvas{opacity:1}
  .ui{position:fixed;inset:0;pointer-events:none;padding:calc(28px + env(safe-area-inset-top)) calc(32px + env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) calc(32px + env(safe-area-inset-left));display:grid;
    grid-template-columns:1fr auto 1fr;grid-template-rows:auto 1fr auto;gap:12px;text-shadow:0 1px 12px rgba(10,30,60,.28)}
  .ui{z-index:16}   /* the menu sits over everything on the page (the Hello text, the titles, the footer, the project page); only the loader is higher */
  .ui > *{pointer-events:auto}
  .brand{grid-column:1;grid-row:1;align-self:start}
  .brand .name{font-size:22px;font-weight:600;letter-spacing:-.025em;line-height:1.05}
  .brand .paren{font-size:22px;font-weight:300;line-height:1.05;color:rgba(255,255,255,.72);margin-left:3px}
  .brand .home{all:unset;cursor:pointer;display:inline-block;border-radius:6px;transition:opacity .25s} .brand .home:hover{opacity:.8} .brand .home:focus-visible{outline:1.5px solid #fff;outline-offset:4px}
  body.bright .brand .name,body.bright .brand .paren{color:#111316}   /* dark while the scene is white */
  .brand p{margin-top:12px;font-size:13px;line-height:1.45;color:var(--mute);max-width:260px}
  .right{grid-column:3;grid-row:1;justify-self:end;display:flex;flex-direction:column;align-items:flex-end;gap:14px}
  .meta{text-align:right;font-size:12px;line-height:1.6;color:var(--mute)}
  .glass{background:transparent;border-radius:999px}
  .mode{display:flex;padding:4px;gap:2px;text-shadow:none}
  .mode button{all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:8px 11px;border-radius:999px;font-size:12px;color:rgba(255,255,255,.75);transition:all .35s}
  .mode button svg{width:16px;height:16px}
  .mode button[aria-pressed="true"]{background:rgba(255,255,255,.9);color:#16212e}
  body.night .mode button[aria-pressed="true"]{background:rgba(255,255,255,.9);color:#16212e}
  .mode button:focus-visible{outline:1px solid #fff}
  /* hero line: big, bottom left beside the menu (on phones, full width above it); fades out after the field like the rest of the header */
  .hero{position:absolute;left:calc(32px + env(safe-area-inset-left));top:calc(104px + env(safe-area-inset-top));margin:0;max-width:min(14ch,60vw);font-size:clamp(42px,5.6vw,84px);font-weight:600;letter-spacing:-.035em;line-height:1.16;color:#fff;pointer-events:auto;cursor:text;text-wrap:balance}   /* selectable: a drag that starts on the words selects them instead of panning the field */
  .nav{grid-column:2;grid-row:3;display:flex;gap:6px;justify-self:center;padding:6px;text-shadow:none}
  .nav button{all:unset;cursor:pointer;font-size:14px;padding:10px 16px;border-radius:999px;color:#fff;transition:background .3s,color .3s}
  .nav button:hover,.nav button:focus-visible{background:rgba(255,255,255,.2)}
  body.night .nav button:hover,body.night .nav button:focus-visible{background:rgba(255,255,255,.16);color:var(--acc)}
  .nav button:focus-visible{outline:1px solid #fff}
  .proto{grid-column:3;grid-row:3;align-self:end;justify-self:end;font-size:11px;color:rgba(255,255,255,.6);text-align:right}
  .toast{position:fixed;left:50%;bottom:92px;transform:translate(-50%,8px);font-size:12px;color:#fff;opacity:0;transition:all .4s;pointer-events:none;text-shadow:0 1px 10px rgba(0,0,0,.4)}
  .toast.on{opacity:1;transform:translate(-50%,0)}
  #about{position:fixed;inset:0;display:grid;align-items:center;justify-items:end;padding:6vh 7vw;opacity:0;pointer-events:none;transition:opacity .45s ease}
  #about.on{opacity:1;pointer-events:auto;transition:opacity .8s ease .9s}
  .ui{transition:opacity .6s ease} body.about .ui{opacity:0;pointer-events:none}
  @media (max-aspect-ratio:4/5){#about{align-items:start;justify-items:center;padding:7vh 5vw}}
  .panel{max-width:440px;width:100%;padding:34px 34px 28px;border-radius:26px;background:transparent;color:#171a14;
    transform:translateY(14px);transition:transform .7s cubic-bezier(.2,.8,.2,1)}
  body.night .panel{color:#ECE6DA}
  #about.on .panel{transform:none;transition:transform 1s cubic-bezier(.2,.8,.2,1) .9s}
  .panel .lbl{font-size:12px;color:#2E5E1A;margin-bottom:18px} body.night .panel .lbl{color:var(--acc)}
  .panel h2{font-size:34px;font-weight:500;letter-spacing:-.02em;line-height:1.15;margin-bottom:18px}
  .panel p{font-size:15px;line-height:1.6;opacity:.84;margin-bottom:14px}
  .panel .caps{font-size:12px;opacity:.6;line-height:1.8;margin-top:18px}
  .panel .row{display:flex;justify-content:space-between;align-items:center;margin-top:22px}
  .panel a{color:#2E5E1A;text-decoration:none;font-size:14px} body.night .panel a{color:var(--acc)}
  .panel .close{all:unset;cursor:pointer;font-size:13px;opacity:.6} .panel .close:hover{opacity:1}
  /* text: white with a soft shadow over the scene and the light glass; the frosted About panel takes dark text by sun and ocean */
  .nav button,.mode button{text-shadow:0 1px 8px rgba(0,0,0,.45)}
  .mode button[aria-pressed="true"]{text-shadow:none}
  .panel,.panel .lbl,.panel a,body.night .panel,body.night .panel .lbl,body.night .panel a{color:#fff;text-shadow:none}   /* white on the dimmed glass in every mode */
  /* menu microinteraction: the brand brackets appear on hover/focus, sliding out from the word into the padding (no reflow) */
  .nav .w{position:relative;display:inline-block}   /* inline-block at the button's line height: the brackets (absolute, so they take that line height too) sit on the word's exact line; a plain inline box is shorter and left them 1 px low */
  .nav button{line-height:1.4}   /* fixed, not 'normal', so the pills keep their height */
  .nav .p{position:absolute;top:0;opacity:0;pointer-events:none;transition:opacity .22s ease,transform .38s cubic-bezier(.2,.8,.2,1)}
  /* top: Helvetica's ( ) run 0.73em above the baseline to 0.20em below, Brulia's capitals 0.80em to 0: lifted 0.13em so both share a centre */
  .nav .p.l{right:100%;transform:translateX(5px)} .nav .p.r{left:100%;transform:translateX(-5px)}
  .nav button:hover .p,.nav button:focus-visible .p{opacity:1;transform:none}
  @media (prefers-reduced-motion:reduce){.nav .p{transition:opacity .2s ease;transform:none!important}}
  /* hover on every unselected option of both menus */
  .nav button:hover,.mode button:not([aria-pressed="true"]):hover{background:rgba(255,255,255,.22);color:#fff}
  body.night .nav button:hover,body.night .mode button:not([aria-pressed="true"]):hover{background:rgba(255,255,255,.14);color:#fff}
  /* microinteractions: a white thumb springs between modes, a soft pill glides along the menu, presses, icon nudges, About reveal */
  .mode,.nav{position:relative;isolation:isolate}
  .mode button[aria-pressed="true"],body.night .mode button[aria-pressed="true"]{background:transparent;color:#111316;text-shadow:none}
  .mode button:not([aria-pressed="true"]):hover,body.night .mode button:not([aria-pressed="true"]):hover,.nav button:hover,.nav button:focus-visible,body.night .nav button:hover,body.night .nav button:focus-visible{background:transparent}
  .mode button,.nav button{transition:transform .2s cubic-bezier(.3,1.6,.5,1),color .3s}
  .mode button:active,.nav button:active{transform:scale(.94)}
  .mode button svg{transition:transform .5s cubic-bezier(.3,1.5,.5,1)}
  #mWater{display:none}   /* two modes: moon (default) and sun */
  #mDay:hover svg{transform:rotate(45deg)} #mNight:hover svg{transform:rotate(-18deg)} #mWater:hover svg{transform:translateX(2px)}
  .thumb,.hov{position:absolute;left:0;z-index:-1;border-radius:999px;pointer-events:none;transition:transform .5s cubic-bezier(.3,1.25,.4,1),width .5s cubic-bezier(.3,1.25,.4,1),opacity .25s}
  .thumb{background:rgba(255,255,255,.92)} .hov{background:rgba(255,255,255,.14);opacity:0}
  .nav:hover .hov{opacity:1}
  .nav .cur{opacity:0} .nav button[aria-current]{color:#111316}   /* the section you're in: the same white pill as the mode switch */
  body .nav button[aria-current]:hover,body .nav button[aria-current]:focus-visible,body.night .nav button[aria-current]:hover,body.night .nav button[aria-current]:focus-visible{color:#111316}   /* and its text stays dark on hover (the hover rules above turned it white on the white pill) */
  .mode button:focus-visible,.nav button:focus-visible{outline:1.5px solid #fff;outline-offset:2px}
  .panel a{display:inline-block;transition:transform .3s cubic-bezier(.3,1.5,.5,1)} .panel a:hover{transform:translateX(4px)}
  .panel>*{opacity:0;transform:translateY(10px);transition:opacity .5s ease,transform .7s cubic-bezier(.2,.8,.2,1)}
  #about.on .panel>*,.chap.on .panel>*{opacity:1;transform:none}
  /* scroll story: quick stagger as each chapter arrives */
  #about.chap,#about.chap.on{transition:none} #about.chap.on{pointer-events:none} #about.chap.on .panel{transition:none} #about.chap.on .panel>:nth-child(1){transition-delay:0s}
  #about.chap.on .panel>:nth-child(2){transition-delay:.07s} #about.chap.on .panel>:nth-child(3){transition-delay:.14s} #about.chap.on .panel>:nth-child(4){transition-delay:.21s} #about.chap.on .panel>:nth-child(5){transition-delay:.28s} #about.chap.on .panel>:nth-child(6){transition-delay:.35s}
  .chap.on .panel>:nth-child(2){transition-delay:.07s} .chap.on .panel>:nth-child(3){transition-delay:.14s} .chap.on .panel>:nth-child(4){transition-delay:.21s} .chap.on .panel>:nth-child(5){transition-delay:.28s} .chap.on .panel>:nth-child(6){transition-delay:.35s}
  #about.on .panel>:nth-child(1){transition-delay:1s} #about.on .panel>:nth-child(2){transition-delay:1.07s} #about.on .panel>:nth-child(3){transition-delay:1.14s}
  #about.on .panel>:nth-child(4){transition-delay:1.21s} #about.on .panel>:nth-child(5){transition-delay:1.28s} #about.on .panel>:nth-child(6){transition-delay:1.35s}
  @media (prefers-reduced-motion:reduce){.thumb,.hov{transition:opacity .2s ease!important} .panel>*,.mode button svg{transition:opacity .2s ease!important;transform:none!important}}   /* the pills keep their transform: it's where they sit (hover still works); they just jump instead of sliding */
  /* ---- scroll story: the page scrolls through invisible stops; the camera and the chapter panels follow the scroll position */
  html{scrollbar-width:none;overscroll-behavior:none}   /* no rubber-band, and a sideways trackpad swipe never triggers browser back/forward */
  html::-webkit-scrollbar{display:none}
  #story{position:relative;pointer-events:none}
  /* free scroll: each chapter is 1.7 screens of scrolling apart, so the camera drifts slowly; the last stop is one screen */
  .stop{height:170vh;height:170lvh} .stop:last-child{height:100vh;height:100lvh}
  .ui{transition:none}
  .chap{position:fixed;inset:0;display:grid;align-items:center;padding:6vh 7vw;opacity:0;visibility:hidden;pointer-events:none;transition:none}
  .chap .panel{pointer-events:auto;transition:none;transform:none}
  #about{justify-items:end} #mind{justify-items:start} #index{align-items:end;justify-items:center;padding-bottom:9vh}
  #index .panel{max-width:760px}
  .links{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:4px -12px 0}
  .links button{all:unset;cursor:pointer;display:block;padding:12px;border-radius:16px;transition:background .3s}
  .links button:hover,.links button:focus-visible{background:rgba(255,255,255,.22)} body.night .links button:hover,body.night .links button:focus-visible{background:rgba(255,255,255,.12)}
  .links button:focus-visible{outline:1px solid currentColor}
  .links b{display:block;font-size:32px;font-weight:500;letter-spacing:-.02em;margin-bottom:6px}
  .links span{display:block;font-size:13px;line-height:1.5;opacity:.75}
  .panel .top{all:unset;cursor:pointer;font-size:13px;opacity:.6} .panel .top:hover,.panel .top:focus-visible{opacity:1}
  .cue{all:unset;pointer-events:auto;cursor:pointer;position:absolute;right:calc(32px + env(safe-area-inset-right));bottom:calc(36px + env(safe-area-inset-bottom));font-size:14px;line-height:1.4;color:#fff;display:flex;align-items:center;gap:7px}
  /* arrows next to text are Brulia's own (↓ ↑ ↗), each followed by U+FE0E so phones show the font's glyph, never an emoji */
  .ar{display:inline-block;font-family:var(--f-display);font-style:normal;font-weight:400;line-height:1;font-variant-emoji:text}   /* arrows are Brulia's own glyphs; U+FE0E after each one, and font-variant-emoji, keep phones from swapping them for emoji */
  .cue .b{position:relative}
  .cue .ar{display:block;font-size:17px}   /* a little larger than the text */
  #proj .lk .ar,#foot .lk .ar,#crawl .lk .ar{font-size:1.3em;position:relative;top:.12em;color:inherit}   /* Brulia draws its diagonal arrows small and high: a size up, nudged onto the line, so ↗ matches the words; always the text colour, flipping with it on hover */
  .cue:hover,.cue:focus-visible{color:#fff} .cue:focus-visible{outline:1px solid #fff;outline-offset:4px;border-radius:4px}
  .cue i{font-style:normal;display:block;animation:cue 1.8s cubic-bezier(.45,0,.55,1) infinite}
  @keyframes cue{0%,100%{transform:translateY(-2px);opacity:.7}50%{transform:translateY(3px);opacity:1}}
  @media (prefers-reduced-motion:reduce){.cue i{animation:none}}
  @media (max-aspect-ratio:4/5){#about,#mind{align-items:start;justify-items:center;padding:7vh 5vw}#index{padding:0 5vw 6vh}}
  /* who I am, on the hero: bottom left, opposite (Scroll down); on phones the two share the row above the menu */
  .role{position:absolute;left:calc(32px + env(safe-area-inset-left));bottom:calc(36px + env(safe-area-inset-bottom));margin:0;font-size:14px;line-height:1.4;color:#fff;pointer-events:none}
  .role.two span{display:block}   /* breaks after the comma as soon as it would come within 24 px of the menu (set in script) */
  @media (max-width:700px){.cue{right:calc(20px + env(safe-area-inset-right));bottom:calc(92px + env(safe-area-inset-bottom))}
    .role{left:calc(20px + env(safe-area-inset-left));bottom:calc(92px + env(safe-area-inset-bottom))} .role span{display:block}   /* phones: two lines, broken after the comma; 12 px above the menu */
    .links{grid-template-columns:1fr;gap:2px}.links b{font-size:24px;margin-bottom:2px}#index .panel{padding:24px 24px 20px}}
  /* ---- v3 grey-box: About text out of the head, world titles, footer */
  .unit{height:100vh;height:100lvh}
  #crawl{position:fixed;inset:0;pointer-events:none;overflow:hidden;visibility:hidden}
  #crawl .flycv{position:absolute;inset:0;width:100%;height:100%}
  .fly .w{display:inline-block;white-space:nowrap} .fly .ch{display:inline-block;opacity:0;transform-origin:50% 60%}
  #crawl .plane{position:absolute;inset:0}
  #crawl .txt{position:absolute;left:var(--x,50%);top:0;pointer-events:auto;cursor:text;width:min(620px,86vw);text-align:left;text-shadow:0 1px 3px rgba(0,20,50,.45),0 2px 26px rgba(0,20,50,.6);will-change:transform}
  @media (min-aspect-ratio:4/5){#crawl .txt:first-child{width:min(520px,40vw)}}
  @media (max-width:700px){#crawl .txt{width:calc(100vw - 40px - env(safe-area-inset-left) - env(safe-area-inset-right))}}   /* phones: About spans the same 20 px gutters as the hero title */   /* Hello sits beside the sculpture: a narrower column on the right */
  #crawl .lbl{font-size:14px;color:var(--mute);margin-bottom:18px}
  #crawl h2{font-size:clamp(34px,4.4vw,56px);font-weight:500;letter-spacing:-.02em;line-height:1.12;margin-bottom:24px}
  #crawl p{font-size:clamp(17px,1.55vw,20px);line-height:1.55;margin-bottom:18px;color:rgba(255,255,255,.94)}
  #crawl .chunk p:last-child{margin-bottom:0}
  /* (Read more) under My approach: the design system's link pill, dark version (white outline, fills white on hover); out to the About page.
     It fades in once the text has landed (the frame loop sets its opacity) */
  #crawl .more{margin-top:28px;opacity:0;text-shadow:none}
  @media (hover:hover){#crawl .lk:hover{background:#fff;color:#111316;border-color:#fff} #crawl .lk:hover i{transform:translateX(3px)}}   /* → nudges right, toward where it goes */
  #crawl .lk:active{transform:scale(.96)}
  #crawl .caps{font-size:14px;line-height:1.8;color:var(--mute);margin-top:22px}
  .wt{position:fixed;left:0;top:0;pointer-events:none;font:900 120px/0.9 var(--f-display);color:#fff;white-space:nowrap;transform-origin:0 100%;visibility:hidden}
  /* project name and year above each card, placed in 3D like the section titles */
  .cl{position:fixed;left:0;top:0;pointer-events:none;transform-origin:0 100%;visibility:hidden;white-space:nowrap;color:#fff}
  .cl b{display:block;font:500 40px/1.1 var(--f-display);letter-spacing:-.02em}
  #foot{position:fixed;inset:0;background:#fff;color:#111316;padding:clamp(24px,4vw,56px);display:flex;flex-direction:column;gap:clamp(28px,5vh,56px);justify-content:space-between;transform:translateY(110%);visibility:hidden;text-shadow:none;z-index:5}
  #foot .lbl{font-size:13px;color:#5b5f66;margin-bottom:18px}
  #foot h2{font-size:clamp(40px,min(9vw,13vh),168px);font-weight:500;letter-spacing:-.04em;line-height:.95;max-width:13ch}
  #foot .ways{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px 24px;margin-top:clamp(28px,6vh,72px)}
  #foot .mail{font-size:clamp(22px,3.4vw,48px);color:#111316;border:0;background:linear-gradient(currentColor,currentColor) 0 100%/0 1.5px no-repeat;padding-bottom:4px;transition:background-size .5s cubic-bezier(.2,.8,.2,1)}
  #foot .mail:hover,#foot .mail:focus-visible{background-size:100% 1.5px}
  #foot .soc{display:flex;flex-wrap:wrap;gap:10px;margin:0;font-size:14px}
  #foot ul{list-style:none}
  #foot a{color:#111316;text-decoration:none}
  #foot .bot{display:flex;justify-content:space-between;align-items:end;font-size:13px;color:#5b5f66;gap:16px;flex-wrap:wrap;padding-top:18px;border-top:1px solid rgba(17,19,22,.12)}
  #foot .bot .end{display:flex;gap:clamp(16px,3vw,40px);align-items:end}   /* the middle stays clear: the floating menu sits there */
  #foot button{all:unset;cursor:pointer;color:#111316} #foot button:focus-visible,#foot a:focus-visible{outline:1.5px solid #111316;outline-offset:3px}
  .right{transition:opacity .4s ease} body.atfoot .right{opacity:0;pointer-events:none}   /* over the footer only the name stays at the top (the scene switch and settings step aside) */
  /* the white footer covers the scene, so the renderer's glass can't show behind the menu there: it takes the frosted CSS pill it wears inside a project, with the ink pill on (Let's talk) */
  body.atfoot .nav,body.atfoot .mbar,body.atfoot .mb-mode{background:rgba(255,255,255,.62);-webkit-backdrop-filter:blur(16px) saturate(1.8);backdrop-filter:blur(16px) saturate(1.8);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.95),inset 0 0 0 1px rgba(17,19,22,.07),0 12px 32px -10px rgba(17,19,22,.28);transition:background .4s ease,box-shadow .4s ease}
  body.atfoot .nav .cur{background:#111316;opacity:1} body.atfoot .hov{background:rgba(17,19,22,.07)}
  body.atfoot .nav button[aria-current],body.atfoot .nav button[aria-current]:hover,body.atfoot .nav button[aria-current]:focus-visible{color:#fff}
  body.atfoot .nav button:focus-visible{outline-color:#111316}
  body.atfoot .nav button:not([aria-current]):hover,body.atfoot .nav button:not([aria-current]):focus-visible,
  body.inproj .nav button:not([aria-current]):hover,body.inproj .nav button:not([aria-current]):focus-visible{color:#111316}   /* the menu on white (the footer, a project page): hover stays dark; the night sky's white hover (body.night .nav button:hover) used to win here
  #foot{overflow-y:auto;padding:max(96px,11vh) calc(32px + env(safe-area-inset-right)) calc(var(--navH,72px) + 20px) calc(32px + env(safe-area-inset-left))}   /* full screen; top: room for the name above (Contact); sides: in line with the name and the menu */   /* the bottom line sits above the floating menu (--navH: the menu's height off the bottom, measured); a short window scrolls inside */
  @media (max-width:700px){#foot{padding:calc(32px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right)) calc(var(--navH,100px) + 16px) calc(20px + env(safe-area-inset-left))} #foot .ways{flex-direction:column;align-items:flex-start} #foot .bot{flex-direction:column;align-items:flex-start;gap:8px}}   /* phones: stacked */
  body.bright .nav button,body.bright .mode button:not([aria-pressed="true"]){color:#111316}   /* dark menu text while the scene is white */
  /* section progress (desktop): small dots on a hairline down the right edge, one per stop of the story. The line fills as you scroll, the stop you're at
     grows, and hovering the column shows the names. Clicking a dot goes there by the usual rule for jumps. Dark while the scene is white, gone in a project */
  .prog{--c:255,255,255;position:fixed;right:calc(26px + env(safe-area-inset-right));top:50%;transform:translateY(-50%);z-index:5;transition:opacity .45s ease}
  .prog ol{list-style:none;position:relative;display:flex;flex-direction:column;gap:6px}
  .prog ol::before,.prog .fill{content:'';position:absolute;right:11.5px;top:12px;bottom:12px;width:1px;background:rgba(var(--c),.3);pointer-events:none}
  .prog .fill{background:rgb(var(--c));transform-origin:50% 0;transform:scaleY(0)}
  .prog button{all:unset;cursor:pointer;position:relative;display:block;width:24px;height:24px;border-radius:999px}
  .prog i{position:absolute;right:9.5px;top:9.5px;width:5px;height:5px;border-radius:50%;background:rgba(var(--c),.5);z-index:1;transition:transform .45s cubic-bezier(.3,1.6,.5,1),background .3s ease}
  .prog .on i{background:rgb(var(--c))} .prog button[aria-current] i{transform:scale(1.8)} .prog button:hover i{transform:scale(1.8)}
  .prog .lb{position:absolute;right:30px;top:50%;font-size:13px;line-height:1;white-space:nowrap;color:rgb(var(--c));opacity:0;transform:translate(6px,-50%);pointer-events:none;transition:opacity .25s ease,transform .4s cubic-bezier(.2,.8,.2,1)}
  .prog:hover .lb,.prog:focus-within .lb{opacity:.55;transform:translate(0,-50%)} .prog button:hover .lb,.prog button:focus-visible .lb,.prog button[aria-current] .lb{transform:translate(0,-50%)}
  .prog:hover button:hover .lb,.prog button:focus-visible .lb,.prog:hover button[aria-current] .lb,.prog:focus-within button[aria-current] .lb{opacity:1}
  .prog button:focus-visible{outline:1.5px solid rgb(var(--c));outline-offset:0}
  /* at rest the rail is quieter: smaller dots and a fainter line; hovering (or tabbing into) it brings back the full size. The click area stays 24 px */
  .prog i{transform:scale(.6)} .prog button[aria-current] i{transform:scale(1.1)}
  .prog:hover i,.prog:focus-within i{transform:scale(1)} .prog:hover button[aria-current] i,.prog:focus-within button[aria-current] i,.prog button:hover i{transform:scale(1.8)}
  .prog ol::before,.prog .fill{transition:opacity .3s ease} .prog ol::before{opacity:.55} .prog .fill{opacity:.6}
  .prog:hover ol::before,.prog:focus-within ol::before,.prog:hover .fill,.prog:focus-within .fill{opacity:1}
  body.bright .prog{--c:17,19,22}
  body.opening .prog{opacity:0;pointer-events:none}
  html.intro .prog{opacity:0} html.intro-run .prog{transition:opacity .8s ease 2.1s}
  @media (prefers-reduced-motion:reduce){.prog i,.prog .lb{transition:opacity .2s ease}}
  /* phones: no dots, the same progress as a hairline bar filling across the very top of the screen */
  .pbar{--c:255,255,255;display:none;position:fixed;left:0;right:0;top:env(safe-area-inset-top,0px);height:2px;z-index:5;background:rgba(var(--c),.22);pointer-events:none;transition:opacity .45s ease}
  .pbar i{position:absolute;inset:0;background:rgb(var(--c));transform-origin:0 50%;transform:scaleX(0)}
  body.bright .pbar{--c:17,19,22} body.opening .pbar{opacity:0}
  html.intro .pbar{opacity:0} html.intro-run .pbar{transition:opacity .8s ease 2.1s}
  @media (max-width:700px){.prog{display:none}.pbar{display:block}}   /* phones keep the bottom menu */
  .sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  *{text-shadow:none!important}   /* no text shadows anywhere: the scene is graded so white text reads on it in every mode */
  /* project page: one template for every project, white like the case studies on juangarcia.mx; it fades in from the white glow of the card or bubble you clicked.
     Top to bottom: kind, title and details; the main media (the project's video when there is one); overview; story blocks and gallery; a dark contact panel;
     then the next project, which loads when you keep scrolling and its bar fills, so you can go through every project without leaving */
  #proj{--g:clamp(16px,4vw,56px);position:fixed;inset:0;z-index:15;background:#fff;color:#111316;overflow-y:auto;overscroll-behavior:contain;opacity:0;visibility:hidden;scrollbar-width:none;display:none}   /* out of the page while closed: Safari tints its bars from full-screen layers even when they're invisible (as it did with the loader) */
  #proj::-webkit-scrollbar{display:none}
  #proj .pg{transition:opacity .35s ease,transform .5s cubic-bezier(.2,.8,.2,1)} #proj .pg.out{opacity:0;transform:translateY(-28px)}
  #proj .head{padding:calc(clamp(96px,16vh,150px) + env(safe-area-inset-top)) var(--g) clamp(32px,6vh,64px)}
  #proj .kind{display:flex;justify-content:space-between;font-size:14px;color:#5b5f66;margin-bottom:clamp(14px,2vh,22px);font-variant-numeric:tabular-nums}
  #proj h1{font-family:var(--f-display);font-size:clamp(56px,11vw,168px);font-weight:500;letter-spacing:-.04em;line-height:.95;max-width:12ch}
  #proj .facts{display:flex;flex-wrap:wrap;align-items:start;gap:20px clamp(28px,4vw,64px);margin-top:clamp(32px,6vh,64px);font-size:15px;line-height:1.45}
  #proj .facts span{display:block;font-size:13px;color:#5b5f66;margin-bottom:6px}
  #proj .facts .lkw{margin-left:auto;display:flex;flex-wrap:wrap;gap:10px}   /* the link pills, pushed to the right end of the facts */
  #proj .lbl{font-size:14px;color:#5b5f66}
  /* link pills: outlined, fill on hover, the arrow nudges toward where it goes */
  #proj .lk,#foot .lk,#crawl .lk{display:inline-flex;align-items:center;gap:8px;padding:12px 20px;border-radius:999px;border:1.5px solid currentColor;color:inherit;text-decoration:none;font-size:14px;line-height:1.2;
    transition:background .3s ease,color .3s ease,transform .2s cubic-bezier(.3,1.6,.5,1)}
  #proj .lk i,#foot .lk i,#crawl .lk i{font-style:normal;display:inline-block;transition:transform .4s cubic-bezier(.3,1.5,.5,1)}
  #proj .lk:hover{background:#111316;color:#fff;border-color:#111316} #proj .lk:hover i{transform:translate(2px,-2px)} #proj .lk:active{transform:scale(.96)}
  #proj .lk:focus-visible,#crawl .lk:focus-visible{outline:1.5px solid currentColor;outline-offset:3px}
  #foot .lk:hover{background:#111316;color:#fff;border-color:#111316} #foot .lk:hover i{transform:translate(2px,-2px)} #foot .lk:active{transform:scale(.96)}
  #proj .media{position:relative;margin:0 var(--g);border-radius:28px;overflow:hidden;aspect-ratio:16/9;background:#f1f1f0;display:grid;place-items:center;color:#5b5f66;font-size:14px}
  #proj .media video,#proj .media img{width:100%;height:100%;object-fit:cover;display:block}
  /* a vertical video: on desktop it stands in a tall frame at its own shape (9:16, at most 86% of the screen's height) on the left, with the overview
     beside it, held in view while the video scrolls past; on phones it runs the full width at its own shape, the overview under it */
  #proj .duo{display:grid;grid-template-columns:auto minmax(0,1fr);gap:clamp(32px,5vw,96px);align-items:start;padding:0 var(--g);margin-bottom:clamp(48px,9vh,110px)}   /* the same space a regular overview leaves before the images */
  #proj .duo .media{margin:0;aspect-ratio:9/16;width:min(calc(min(86vh,1100px) * 9 / 16),40vw);height:auto}   /* as tall as before, but never wider than 40% of the screen: on tall, narrow windows it used to push the text off the page */
  #proj .duo .intro{grid-template-columns:1fr;gap:20px;padding:clamp(24px,6vh,72px) 0 0;position:sticky;top:calc(96px + env(safe-area-inset-top))}
  @media (max-width:700px){#proj .duo{grid-template-columns:1fr;gap:0;padding:0;margin-bottom:0}#proj .duo .media{margin:0 var(--g);height:auto;width:auto}#proj .duo .intro{position:static;padding:clamp(64px,12vh,140px) var(--g) clamp(48px,9vh,110px)}}
  #proj .intro,#proj .blk{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:24px;padding:clamp(64px,12vh,140px) var(--g) clamp(48px,9vh,110px)}
  #proj .blk{padding-top:clamp(40px,8vh,96px)}
  #proj .intro h2{font-family:var(--f-display);font-size:clamp(32px,4.4vw,64px);font-weight:500;letter-spacing:-.025em;line-height:1.08;max-width:18ch;margin-bottom:28px}
  #proj .intro p,#proj .blk p{font-size:clamp(17px,1.55vw,20px);line-height:1.55;max-width:60ch;color:#2b2f36}
  #proj .blk .lbl{display:flex;gap:14px} #proj .blk .lbl b{font-weight:400;color:#111316;font-variant-numeric:tabular-nums}
  #proj .intro p+p{margin-top:1em} #proj .intro p.poem{white-space:pre-line;font-family:var(--f-display);font-size:clamp(20px,2vw,28px);line-height:1.4;letter-spacing:-.01em;color:#111316}
  #proj .lks{list-style:none;display:flex;flex-wrap:wrap;gap:10px;align-content:start}
  #proj .gal{display:grid;grid-template-columns:repeat(var(--n,1),minmax(0,1fr));gap:clamp(12px,1.6vw,24px);padding:0 var(--g)} #proj .gal+.gal{margin-top:clamp(12px,1.6vw,24px)}
  #proj .gal figure{border-radius:28px;overflow:hidden;background:#f1f1f0}
  /* a video's box while nothing is in yet: the grey breathes, so it reads as loading, not as an empty frame */
  #proj .ld{animation:ldPulse 1.1s ease-in-out infinite alternate} @keyframes ldPulse{to{background-color:#e2e2e0}}
  @media (prefers-reduced-motion:reduce){#proj .ld{animation:none}}
  #proj .gal img{height:100%;object-fit:cover}   /* images sharing a row take the tallest one's height, cropping a sliver off the others' sides */
  #proj .gal video{width:100%;height:100%;object-fit:cover;display:block}   /* gallery videos (names starting video-): silent loops, played while on screen */
  #proj .gal img{width:100%;display:block;transform:scale(1.06);transition:transform 1.6s cubic-bezier(.2,.7,.2,1)} #proj .gal figure.seen img{transform:none}
  /* scroll reveals: each block rises into place the first time it comes into view */
  #proj .rv{opacity:0;transform:translateY(36px);transition:opacity .8s ease,transform 1.1s cubic-bezier(.2,.7,.2,1)} #proj .rv.seen{opacity:1;transform:none}
  /* contact: the footer of every project, a dark panel */
  /* the end of every project: one screen that holds still, the contact panel on the top half and the next project on the bottom half; while it holds,
     55% of a screen of scrolling fills the next project's bar (like the loader), and at 100 the next project loads in place */
  #proj .end{position:relative;height:155vh;height:155lvh;margin-top:clamp(72px,14vh,160px)}
  #proj .end .st{position:sticky;top:0;height:100vh;height:100svh;display:grid;grid-template-rows:minmax(0,1fr) minmax(0,1fr);gap:clamp(12px,1.6vw,24px);
    padding:calc(76px + env(safe-area-inset-top)) var(--g) calc(84px + env(safe-area-inset-bottom))}   /* clear of the name and close button on top, the menu below */
  #proj .talk{border-radius:28px;background:#111316;color:#fff;padding:clamp(24px,4vw,56px);display:flex;flex-direction:column;justify-content:space-between;gap:20px;min-height:0;overflow:hidden}
  #proj .talk h2{font-family:var(--f-display);font-size:clamp(32px,min(5.6vw,8vh),96px);font-weight:500;letter-spacing:-.035em;line-height:.98;max-width:14ch}
  #proj .talk .ways{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px 24px}
  #proj .talk .mail{display:inline-block;font-size:clamp(20px,2.4vw,32px);color:#fff;text-decoration:none;background:linear-gradient(currentColor,currentColor) 0 100%/0 1.5px no-repeat;padding-bottom:4px;transition:background-size .5s cubic-bezier(.2,.8,.2,1)}
  #proj .talk .mail:hover,#proj .talk .mail:focus-visible{background-size:100% 1.5px} #proj .talk .mail:focus-visible{outline:1.5px solid #fff;outline-offset:4px}
  #proj .talk ul{list-style:none;display:flex;flex-wrap:wrap;gap:10px}
  #proj .talk .lk:hover{background:#fff;color:#111316;border-color:#fff}
  #proj .next{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:clamp(24px,4vw,64px);min-height:0}   /* text and preview share the width, so the preview shrinks with the screen instead of running into the name */
  #proj .next .cue{all:unset;display:flex;gap:7px;align-items:center;white-space:nowrap;font-size:13px;color:#5b5f66}   /* all:unset: not the landing's (Scroll down) cue */
  #proj .next .cue i{font-style:normal;display:block;animation:cue 1.8s cubic-bezier(.45,0,.55,1) infinite} #proj .next .cue .ar{display:block;font-size:15px}
  #proj .next .go{all:unset;cursor:pointer;display:block}
  #proj .next .go b{display:block;font:500 clamp(40px,min(7.5vw,11vh),120px)/.95 var(--f-display);letter-spacing:-.04em;margin:10px 0 8px;overflow-wrap:break-word;transition:transform .5s cubic-bezier(.2,.8,.2,1)}
  #proj .next .go:hover b,#proj .next:has(.pv:hover) .go b{transform:translateX(10px)}
  #proj .next .pv{cursor:pointer} #proj .next .pv video,#proj .next .pv img{transition:transform .6s cubic-bezier(.2,.8,.2,1)} #proj .next .pv:hover video,#proj .next .pv:hover img{transform:scale(1.03)}   /* the preview is a way in too: it leans in, and the title answers */ #proj .next .go:focus-visible{outline:1.5px solid #111316;outline-offset:8px;border-radius:6px}
  #proj .next .bar{position:relative;height:2px;margin-top:clamp(16px,3.5vh,36px);background:rgba(17,19,22,.12);overflow:hidden}
  #proj .next .bar i{position:absolute;inset:0;background:#111316;transform:scaleX(0);transform-origin:0 50%}
  #proj .next .n{display:flex;justify-content:space-between;align-items:center;margin-top:12px;font-size:13px;color:#5b5f66;font-variant-numeric:tabular-nums}
  #proj .next .pv{width:100%;max-height:100%;aspect-ratio:1.6;justify-self:end;border-radius:28px;overflow:hidden;background:#f1f1f0;transform-origin:50% 60%;will-change:transform}
  #proj .next .pv video,#proj .next .pv img{width:100%;height:100%;object-fit:cover;display:block}
  @media (max-width:700px){#proj .intro,#proj .blk{grid-template-columns:1fr}#proj .gal{grid-template-columns:1fr}#proj .gal[data-n="4"]{grid-template-columns:1fr 1fr}#proj .gal figure,#proj .media,#proj .talk,#proj .next .pv{border-radius:20px}
    #proj .facts{display:grid;grid-template-columns:1fr 1fr}#proj .facts .lkw{margin-left:0;justify-self:start;grid-column:1/-1}
    #proj .head{padding-top:calc(80px + env(safe-area-inset-top))}   /* the name lives in the bottom bar on phones: only clear the close button */
    /* phones: the contact panel takes its own height and the next project the rest, stacked: name, then the bar, then the preview filling what's left */
    #proj .end .st{grid-template-rows:auto minmax(0,1fr)}
    #proj .next{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);align-items:stretch;gap:20px}#proj .next .pv{max-height:none;height:100%;aspect-ratio:auto;justify-self:stretch}
  }
  @media (max-width:700px) and (max-height:620px){#proj .next .pv{display:none}}   /* short phones: no room left for the preview */
  #proj:focus{outline:none}   /* focus goes to the page after a tap (see focusClose) */
  #proj .rise{opacity:0;transform:translateY(28px);filter:blur(6px);transition:opacity .5s ease,transform .9s cubic-bezier(.2,.7,.2,1),filter .7s ease}
  #proj.in .rise{opacity:1;transform:none;filter:none;transition-delay:var(--d,0s)}
  @media (prefers-reduced-motion:reduce){#proj .rise,#proj .rv,#proj .gal img,#proj .pg{transform:none!important;filter:none}#proj .next .cue i{animation:none}#proj .next .go b,#proj .lk i{transition:none}}
  /* inside a project the menu comes back over the white page, and the mode switch becomes a close button. The renderer's glass needs the scene behind it,
     so here the same pill is frosted in CSS: milky white, blurred, a bright top rim and a soft drop shadow, with dark text */
  .ui .x{display:none}
  body.opening.inproj .ui{opacity:1!important;z-index:16;transition:opacity .45s ease}
  body.inproj .ui>*{pointer-events:none} body.inproj .brand,body.inproj .nav,body.inproj .right{pointer-events:auto}
  body.inproj .mode,body.inproj .hero,body.inproj .cue,body.inproj .role,body.inproj .proto{display:none}
  body.inproj .brand .name,body.inproj .brand .paren{color:#111316}
  body.inproj .nav,body.inproj .x{background:rgba(255,255,255,.62);-webkit-backdrop-filter:blur(16px) saturate(1.8);backdrop-filter:blur(16px) saturate(1.8);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.95),inset 0 0 0 1px rgba(17,19,22,.07),0 12px 32px -10px rgba(17,19,22,.28)}
  body.inproj .nav button{color:#111316} body.inproj .nav button[aria-current],body.inproj .nav button[aria-current]:hover,body.inproj .nav button[aria-current]:focus-visible{color:#fff} body.inproj .nav .cur{background:#111316} body.inproj .hov{background:rgba(17,19,22,.07)}
  body.inproj .nav button:focus-visible{outline-color:#111316}
  body.inproj .nav{animation:navIn .7s cubic-bezier(.2,.8,.2,1) both}
  body.inproj .x{all:unset;cursor:pointer;display:grid;place-items:center;width:44px;height:44px;border-radius:999px;color:#111316;animation:xIn .6s cubic-bezier(.3,1.5,.5,1) .12s both;
    background:rgba(255,255,255,.62);-webkit-backdrop-filter:blur(16px) saturate(1.8);backdrop-filter:blur(16px) saturate(1.8);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.95),inset 0 0 0 1px rgba(17,19,22,.07),0 12px 32px -10px rgba(17,19,22,.28)}
  body.inproj .x svg{width:18px;height:18px;transition:transform .5s cubic-bezier(.3,1.5,.5,1)} body.inproj .x:hover svg{transform:rotate(90deg)} body.inproj .x:active{transform:scale(.92)}
  body.inproj .x:focus-visible{outline:1.5px solid #111316;outline-offset:3px}
  @keyframes navIn{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
  @keyframes xIn{from{opacity:0;transform:scale(.6) rotate(-90deg)}to{opacity:1;transform:none}}
  @media (prefers-reduced-motion:reduce){body.inproj .nav,body.inproj .x{animation:none}body.inproj .x svg{transition:none}}
  /* the logo and the close button share one line: the name stays where it sits on the landing, the empty tools row no longer pushes the X down,
     and the X rises 10px so its 44px centres on the name (24px tall) */
  body.inproj .tools{display:none}
  @media (min-width:701px){body.inproj .x{margin-top:-10px}}
  /* the top bar (name, X, blur strip) slides up while scrolling down and comes back on any scroll up */
  body.inproj .brand,body.inproj .right{transition:transform .45s cubic-bezier(.2,.8,.2,1),opacity .3s ease}
  body.inproj.xhide .brand:not(:focus-within),body.inproj.xhide .right:not(:focus-within){transform:translateY(calc(-100% - 40px - env(safe-area-inset-top)));opacity:0;pointer-events:none}
  /* as on the Atelier West site: a blur-only strip behind the top bar, no tint, fading out downward, so the page's text never runs sharp under the logo */
  .ui::before{content:"";position:fixed;left:0;right:0;top:0;height:calc(124px + env(safe-area-inset-top));z-index:-1;pointer-events:none;opacity:0;visibility:hidden;
    -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
    -webkit-mask-image:linear-gradient(to bottom,#000 0%,#000 40%,transparent 100%);mask-image:linear-gradient(to bottom,#000 0%,#000 40%,transparent 100%);
    transition:opacity .45s ease,visibility 0s .45s}
  body.inproj .ui::before{opacity:1;visibility:visible;transition:opacity .45s ease}
  body.inproj.xhide .ui::before{opacity:0}   /* the strip leaves with the bar */
  @media (max-width:700px){.ui::before{height:calc(104px + env(safe-area-inset-top))}}
  /* while a project opens, the scene's own labels and menu step aside */
  body.opening .ui,body.opening #cardLabels,body.opening .wt,body.opening .toast{opacity:0!important;pointer-events:none!important;transition:opacity .35s ease}
  #dbg{position:fixed;left:12px;bottom:12px;font:12px/1.4 ui-monospace,Menlo,monospace;color:#fff;background:rgba(0,0,0,.55);padding:6px 9px;border-radius:8px;display:none;z-index:9}
  #err{position:fixed;left:20px;top:80px;right:20px;font:12px/1.4 monospace;color:#f66;white-space:pre-wrap}
  /* no WebGL2: the poster fills the screen, the scroll story is off, and the note sits at the bottom */
  html.nogl{background:#0d1a33 url(../og/home.png) center/cover no-repeat fixed;min-height:100%;overflow:hidden} html.nogl body{background:transparent}
  html.nogl #c,html.nogl .ui,html.nogl .mb,html.nogl #crawl,html.nogl #foot,html.nogl #story{display:none}   /* the menus need the script that stopped, and the poster carries the name and the hero line */
  html.nogl #err{top:auto;bottom:calc(24px + env(safe-area-inset-bottom));font:400 16px/1.5 var(--f-display);color:#fff;white-space:normal}
  html.nogl #err a{color:#fff;margin-left:8px}
  @media (max-width:700px){
    .ui{padding:calc(20px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left));grid-template-columns:1fr 1fr;grid-template-rows:auto 1fr auto auto}
    .right{grid-column:2} .hero{left:calc(20px + env(safe-area-inset-left));right:calc(20px + env(safe-area-inset-right));top:calc(88px + env(safe-area-inset-top));max-width:none;font-size:clamp(40px,12vw,56px)} .nav{grid-column:1 / span 2;grid-row:3} .nav button{padding:9px 12px;font-size:13px}
    .brand p{display:none} .brand .name,.brand .paren{font-size:20px}
  }
  /* ---- phone menu: the name and the menu move into one glass bar at the bottom, the name in its centre; the two-line icon opens the bar
     upward into the full menu. The day/night switch is a round button beside the bar, one tap flips it */
  .mb,.mb-mode{display:none}
  @media (max-width:700px){
    .brand,.nav,.mode{display:none}
    .mb{display:flex;position:fixed;left:calc(20px + env(safe-area-inset-left));right:calc(20px + env(safe-area-inset-right));bottom:calc(20px + env(safe-area-inset-bottom));gap:10px;align-items:flex-end}
    .mbar{flex:1;min-width:0;border-radius:28px;display:grid;grid-template-rows:0fr 56px;align-content:end;transition:grid-template-rows .55s cubic-bezier(.2,.8,.2,1)}
    .mbar.open{grid-template-rows:1fr 56px}   /* rows packed at the bottom (align-content:end): while it opens, the bar grows ahead of its rows, and that space used to collect under the name and the icon, lifting them and dropping them back */
    .role,.cue{transition:opacity .3s ease} body.mbopen .role,body.mbopen .cue{opacity:0!important;pointer-events:none;transition:opacity .2s ease!important}   /* !important transition: beats the first load's delayed fade-in, so they step aside right away */
    .mb{z-index:3} .mbar.open{-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}   /* the open menu sits over the page and blurs whatever is behind it */   /* the lines above the bar step aside while it's open */
    .mb-menu{overflow:hidden;min-height:0}
    .mb-menu ul{list-style:none;padding:22px 26px 4px}
    .mb-menu button{all:unset;cursor:pointer;display:block;padding:5px 0;font:500 36px/1.12 var(--f-display);letter-spacing:-.025em;color:#fff;opacity:0;transform:translateY(14px);
      transition:opacity .2s ease,transform .2s ease}
    .mbar.open .mb-menu button{opacity:1;transform:none;transition:opacity .4s ease,transform .6s cubic-bezier(.2,.8,.2,1)}
    .mbar.open .mb-menu li:nth-child(1) button{transition-delay:.08s} .mbar.open .mb-menu li:nth-child(2) button{transition-delay:.13s}
    .mbar.open .mb-menu li:nth-child(3) button{transition-delay:.18s} .mbar.open .mb-menu li:nth-child(4) button{transition-delay:.23s}
    .mb-menu .w{position:relative;display:inline-block}
    .mb-menu .p{display:none;opacity:.72}   /* the section you're in wears the brand brackets, set in the line (not hung outside it), so every item starts on the same left edge */
    .mb-menu button[aria-current] .p{display:inline;animation:mbP .3s ease both}
    @keyframes mbP{from{opacity:0}}
    .mb-menu button:focus-visible{outline:1.5px solid #fff;outline-offset:4px;border-radius:6px}
    .mb-row{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;height:56px;padding:0 6px}
    .mb-burger,.mb-mode{all:unset;cursor:pointer;place-items:center;border-radius:999px;color:#fff;transition:transform .2s cubic-bezier(.3,1.6,.5,1)}
    .mb-burger{display:grid;width:44px;height:44px} .mb-mode{display:none} .mb-burger:active,.mb-mode:active{transform:scale(.92)}
    .mb-burger svg{width:22px;height:22px;overflow:visible}
    .mb-burger path{transform-box:view-box;transform-origin:12px 12px;transition:transform .5s cubic-bezier(.3,1.3,.5,1)}
    .mbar.open .mb-burger .l1{transform:rotate(45deg) translateY(3px)} .mbar.open .mb-burger .l2{transform:rotate(-45deg) translateY(-3px)}   /* each line moves to the centre, then turns: they cross exactly at the middle */
    .mb-logo{all:unset;cursor:pointer;justify-self:center;white-space:nowrap;font-family:var(--f-display);font-size:18px;letter-spacing:-.025em;line-height:1;color:#fff}
    .mb-logo .paren{font-weight:300;color:rgba(255,255,255,.72);margin-left:2px}
    .mb-burger:focus-visible,.mb-mode:focus-visible,.mb-logo:focus-visible{outline:1.5px solid #fff;outline-offset:2px} .mb-logo:focus-visible{border-radius:6px;outline-offset:6px}
    /* the round switch shows the scene you're in, and a tap turns the sun into the moon and back */
    .mb-mode{display:grid;flex:none;width:56px;height:56px;position:relative}
    .mb-mode svg{position:absolute;width:20px;height:20px;transition:transform .6s cubic-bezier(.3,1.4,.5,1),opacity .3s ease}
    .mb-mode .sun{transform:rotate(-90deg) scale(.4);opacity:0} .mb-mode.day .sun{transform:none;opacity:1} .mb-mode.day .moon{transform:rotate(60deg) scale(.4);opacity:0}
    /* the white scene, the white project page and the first load, as for the menu it replaces */
    body.bright .mb-logo,body.bright .mb-logo .paren,body.bright .mb-burger,body.bright .mb-mode,body.bright .mb-menu button{color:#111316}
    body.inproj .ui .mb{pointer-events:auto} body.inproj .mb-mode{display:none!important}
    body.inproj .mbar{background:rgba(255,255,255,.62);-webkit-backdrop-filter:blur(16px) saturate(1.8);backdrop-filter:blur(16px) saturate(1.8);
      box-shadow:inset 0 1px 0 rgba(255,255,255,.95),inset 0 0 0 1px rgba(17,19,22,.07),0 12px 32px -10px rgba(17,19,22,.28);animation:navIn .7s cubic-bezier(.2,.8,.2,1) both}
    body.inproj .mb-logo,body.inproj .mb-logo .paren,body.inproj .mb-burger,body.inproj .mb-menu button{color:#111316}
    body.inproj .mb-burger:focus-visible,body.inproj .mb-logo:focus-visible,body.inproj .mb-menu button:focus-visible{outline-color:#111316}
    html.intro .mb{transform:translateY(calc(100% + 40px + env(safe-area-inset-bottom)))} html.intro-run .mb{transition:transform 1.1s cubic-bezier(.16,1,.3,1) 1.95s}
  }
  @media (max-width:700px) and (prefers-reduced-motion:reduce){
    .mbar,.mb,.mb-burger path,.mb-mode svg{transition:none!important} .mb-menu button{transform:none!important}
    html.intro .mb{transform:none;opacity:0} html.intro-run .mb{transition:opacity .4s ease 1.3s} body.inproj .mbar{animation:none}
  }
  .hero,.brand .name,.brand .paren,.panel h2,#crawl h2,#foot h2,.links b,#cardInfo .ci-t{font-family:var(--f-display)}   /* Brulia has one weight: no faux bold (body sets font-synthesis:none) */
  /* ---- first load: a white loader (huge count + bar) fades over the scene's own white void, which then opens from the centre with the cloudy edge of the grass-to-water vignette; then the name and the hero line fly in, the menu rises, the mode switch drops */
  #loader{position:fixed;inset:0;z-index:20;background:#fff;color:#111316}
  #loader .n{position:absolute;left:calc(32px + env(safe-area-inset-left));bottom:calc(60px + env(safe-area-inset-bottom));font:400 clamp(160px,34vw,560px)/.78 var(--f-display);letter-spacing:-.025em;font-variant-numeric:tabular-nums;transition:opacity .45s ease,transform .8s cubic-bezier(.5,0,.75,0)}
  #loader .bar{position:absolute;left:calc(32px + env(safe-area-inset-left));right:calc(32px + env(safe-area-inset-right));bottom:calc(32px + env(safe-area-inset-bottom));height:2px;background:rgba(17,19,22,.12);overflow:hidden;transition:opacity .45s ease}
  #loader .bar i{position:absolute;inset:0;background:#111316;transform:scaleX(0);transform-origin:0 50%}
  #loader .n b{font-weight:inherit} #loader .n i{display:inline-block;width:0;height:0;vertical-align:baseline}   /* i: marks the baseline for the film canvas */
  #loader .msg{position:absolute;z-index:1;right:calc(32px + env(safe-area-inset-right));bottom:calc(48px + env(safe-area-inset-bottom));font-size:14px;line-height:1;color:#111316;transition:opacity .3s ease}   /* first visit only: on the canvas, above the bar's right end */
  #loader.quiet .msg,#loader.out .msg{opacity:0}
  #loader .lcv{position:absolute;inset:0;width:100%;height:100%;opacity:1;transition:none;cursor:default}
  #loader.gl .n,#loader.gl .bar{visibility:hidden}
  #loader.quiet .n,#loader.quiet .bar{opacity:0} #loader .n,#loader .bar{transition:opacity .3s ease}   /* plain HTML fallback of the returning visit */   /* drawn under the grain on the canvas instead */
  #loader.out{opacity:0;pointer-events:none;transition:opacity .5s ease .15s} #loader.out .n{opacity:0;transform:translateY(8%)} #loader.out .bar{opacity:0}
  @media (max-width:700px){#loader .n{left:calc(20px + env(safe-area-inset-left));bottom:calc(52px + env(safe-area-inset-bottom))}#loader .bar{left:calc(20px + env(safe-area-inset-left));right:calc(20px + env(safe-area-inset-right));bottom:calc(28px + env(safe-area-inset-bottom))}#loader .msg{right:calc(20px + env(safe-area-inset-right));bottom:calc(42px + env(safe-area-inset-bottom))}}
  html.intro canvas{transition:opacity .6s ease}   /* the scene is fully in before the white opens */
  html.intro .mode{transform:translateY(calc(-100% - 40px - env(safe-area-inset-top)))} html.intro .nav{transform:translateY(calc(100% + 40px + env(safe-area-inset-bottom)))}
  html.intro .cue,html.intro .role{opacity:0!important}
  html.intro-run .mode{transition:transform 1.1s cubic-bezier(.16,1,.3,1) 1.8s} html.intro-run .nav{transition:transform 1.1s cubic-bezier(.16,1,.3,1) 1.95s} html.intro-run .cue,html.intro-run .role{transition:opacity .8s ease 2.9s}
  #loader.out.fast{transition:opacity .45s ease} html.intro-run.intro-fast .mode{transition-delay:.3s} html.intro-run.intro-fast .nav{transition-delay:.45s} html.intro-run.intro-fast .cue,html.intro-run.intro-fast .role{transition-delay:.9s}   /* returning visit, scene quick from the cache: no void to open, the white loader just fades straight onto the field */   /* s after the loader starts fading; the vignette is fully open at 2.2 s and the UI overlaps its last 0.4 s (was 3 / 3.15 / 4.4 with it open at 2.9) */
  @media (prefers-reduced-motion:reduce){html.intro .mode,html.intro .nav{transform:none} html.intro .right,html.intro .nav{opacity:0} html.intro-run .right,html.intro-run .nav{transition:opacity .4s ease 1.3s} html.intro-run .cue,html.intro-run .role{transition:opacity .4s ease 1.5s}}   /* reduced motion: the void clears in 0.6 s after the 0.7 s hold, then a plain fade */
  /* ---- settings: a round glass button beside the scene switch opens a small glass menu under it; for now it holds the language.
     The glass is drawn by the scene (GLASS), so these stay transparent */
  .tools{display:flex;align-items:flex-start;gap:8px}
  .set{position:relative;text-shadow:none}
  .set-b{all:unset;cursor:pointer;display:grid;place-items:center;width:40px;height:40px;border-radius:999px;color:#fff;transition:transform .2s cubic-bezier(.3,1.6,.5,1),color .3s}
  .set-b svg{width:18px;height:18px;overflow:visible;filter:drop-shadow(0 1px 6px rgba(0,0,0,.35))}
  .set-b circle{transition:transform .5s cubic-bezier(.3,1.4,.5,1)}
  @media (hover:hover){.set-b:hover .k1{transform:translateX(-3px)} .set-b:hover .k2{transform:translateX(3px)}}
  .set-b[aria-expanded="true"] .k1{transform:translateX(-6px)} .set-b[aria-expanded="true"] .k2{transform:translateX(6px)}   /* opening slides the two knobs past each other */
  .set-b:active{transform:scale(.94)} .set-b:focus-visible{outline:1.5px solid #fff;outline-offset:2px}
  .set-pop{position:absolute;top:calc(100% + 10px);right:0;min-width:176px;padding:14px 6px 6px;border-radius:22px;opacity:0;visibility:hidden;transform:translateY(-6px) scale(.97);transform-origin:top right;
    transition:opacity .25s ease,transform .45s cubic-bezier(.2,.8,.2,1),visibility 0s .45s}
  .set-pop{-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}   /* the scene's glass only blurs the 3D; this also blurs page text under the menu (the Hello text) */
  .set.open .set-pop{opacity:1;visibility:visible;transform:none;transition:opacity .25s ease,transform .45s cubic-bezier(.2,.8,.2,1)}
  .set-pop .langs+.lbl{margin-top:12px;padding-top:12px;border-top:1px solid rgba(255,255,255,.18)} body.bright .set-pop .langs+.lbl{border-color:rgba(17,19,22,.14)}
  .set-pop .lbl{padding:0 12px 8px;font-size:12px;color:rgba(255,255,255,.72);text-shadow:0 1px 8px rgba(0,0,0,.45)}
  .langs{display:flex;flex-direction:column;gap:2px}
  .langs button{all:unset;cursor:pointer;padding:9px 12px;border-radius:999px;font-size:13px;line-height:1.2;color:#fff;text-shadow:0 1px 8px rgba(0,0,0,.45);transition:background .25s,color .25s}
  .langs button:hover{background:rgba(255,255,255,.18)}
  .langs button[aria-checked="true"]{background:rgba(255,255,255,.9);color:#111316;text-shadow:none}
  .langs button:focus-visible{outline:1.5px solid #fff;outline-offset:-1.5px}
  body.bright .set-b,body.bright .set-pop .lbl,body.bright .langs button:not([aria-checked="true"]){color:#111316;text-shadow:none}
  body.bright .set-b svg{filter:none} body.bright .langs button[aria-checked="true"]{background:#111316;color:#fff}
  body.inproj .set{display:none}
  html.intro .set{transform:translateY(calc(-100% - 40px - env(safe-area-inset-top)))} html.intro-run .set{transition:transform 1.1s cubic-bezier(.16,1,.3,1) 1.85s}
  @media (prefers-reduced-motion:reduce){html.intro .set{transform:none} .set-pop,.set.open .set-pop{transform:none;transition:opacity .2s ease,visibility 0s .2s} .set.open .set-pop{transition:opacity .2s ease} .set-b circle{transition:none}}
  /* phones: the language sits in the open menu, under the sections; the one you're in wears the brand brackets */
  .mb-lang{display:none}
  @media (max-width:700px){
    .set{display:none}
    /* settings: a quiet group well below the sections. Three sizes: the title (17), its options (15) and each setting's name (12, muted); the names
       sit above their options, which share columns so they line up; the one in use wears the brand brackets, the others are dimmed */
    body.inproj .mb-set{display:none}
    .mb-set{margin:64px 26px 0;padding:20px 0 12px;border-top:1px solid rgba(255,255,255,.16)}
    .mb-set-t{font-size:17px;letter-spacing:-.01em;color:#fff;margin-bottom:8px;opacity:0;transition:opacity .2s ease} .mbar.open .mb-set-t{opacity:1;transition:opacity .4s ease .26s}
    .mb-menu .mb-lang{display:grid;grid-template-columns:104px auto;justify-content:start;align-items:baseline;padding:8px 0}   /* the name on its own line, the two options in shared columns under it (the bar is too narrow for one row) */
    .mb-lang .lbl{grid-column:1/-1;margin-bottom:2px}
    .mb-lang .lbl{font-size:12px;color:rgba(255,255,255,.5)}
    .mb-menu .mb-lang button{font:400 15px/1.3 var(--f-text);letter-spacing:0;padding:4px 0}
    .mbar.open .mb-menu .mb-lang button{opacity:.6;transition-delay:.28s} .mbar.open .mb-menu .mb-lang button[aria-checked="true"]{opacity:1}
    .mb-lang button[aria-checked="true"]::before{content:"("} .mb-lang button[aria-checked="true"]::after{content:")"}
    .mb-lang button:focus-visible{outline:1.5px solid currentColor;outline-offset:4px;border-radius:4px}
    body.bright .mb-set{border-color:rgba(17,19,22,.14)} body.bright .mb-set-t{color:#111316} body.bright .mb-lang .lbl{color:rgba(17,19,22,.5)}
  }
