/* Page additions on top of the kit's style.css (which stays unchanged). */

/* Contrast fixes. Each colour is the nearest shade of the kit's own (same hue and saturation, lightness only) that
   reaches WCAG AA 4.5:1 for small text. Found by Lighthouse. */

/* credit + copyright: #8B91A0 on white was 3.16:1 */
.credit,.pjfoot{color:#6F7688}

/* loading screen, "Portfolio": #71717A on #09090B was 4.12:1 */
.ldr{color:#787881}

/* Inline icons in the intro (the orange after "with my girlfriend"). Each is one typed letter (.c), about a capital's
   height, sitting on the baseline like the text around it. */
.tp .gl{margin-left:.25em;vertical-align:-.18em}
.tp .gl svg{display:block;width:1.15em;height:1.15em}

/* Menu item tooltip (blog: "Coming soon"). The intro's name tooltip (.tip) turned to point up: same bubble, type and
   pop-in, opening downward under the item with its arrow on top. */
.mi li{position:relative}
.mtip{position:absolute;left:50%;top:calc(100% + 12px);z-index:2;pointer-events:none;width:max-content;padding:7px 10px 8px;
  border-radius:14px;background:#09090B;color:#E5E7EB;text-align:center;letter-spacing:.02em;
  font:500 10.5px/1 'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  opacity:0;translate:-50% -6px;scale:.97;transform-origin:50% 0;
  transition:opacity .18s ease,translate .24s var(--out),scale .24s var(--out)}
.mtip.on{opacity:1;translate:-50% 0;scale:1}
.mtip::before{content:"";position:absolute;left:50%;top:-4px;width:9px;height:9px;background:#09090B;rotate:45deg;translate:-50% 0;border-radius:2px}
@media (prefers-reduced-motion:reduce){.mtip{transition:none}}

/* Stamps: a dashed frame just inside the perforations, around everything on the stamp, like a real stamp's printed frame.
   The selected stamp's frame takes the same violet as its border. */
.stm::after,.pjc.xc::after{content:"";position:absolute;border:1px dashed rgba(21,25,34,.24);border-radius:1px;pointer-events:none;
  transition:border-color .35s ease}
.stm::after{inset:6% 8.5% 5%}
.pjc.xc::after{inset:5% 6.5%}
@container (min-width:150px){.xc .stx{left:9%;right:9%}}
@container (min-width:121px) and (max-width:149px){.xc .stx{left:6.5%;right:6.5%}.pjc.xc::after{inset:3.5% 4%}}
@container (max-width:120px){.pjc.xc::after{display:none}}
.xi.xsel .pjc.xc::after{border-color:rgba(124,58,237,.55)}
@media (prefers-reduced-motion:reduce){.stm::after,.pjc.xc::after{transition:none}}

/* phones: a swipe rests on the next stop, one at a time, so each project and experience can be read. ScrollEngine sets the
   anchors' tops; the last one stays at the end of the page, for the footer. */
@media (max-width:760px){
  html{scroll-snap-type:y mandatory}
  .pjsn{scroll-snap-align:start;scroll-snap-stop:always}
  .pjsn:last-of-type{top:auto;bottom:0;scroll-snap-align:end}
}

/* a stamp in the experiences row jumps the timeline to its entry; on phones the row ignores the pointer (a swipe
   scrolls the page), so the stamps take taps again while a vertical swipe still scrolls */
.pjc.xc{cursor:pointer}
@media (max-width:760px){.pjroll #ex-view .pjrow .xi{pointer-events:auto;touch-action:pan-y}}

/* project scenes: buttons that press in turn, a toast stack that fans out, ranking bars that grow, a browser window that lifts */
.pa-btn .bt{transform-box:fill-box;transform-origin:50% 50%}
.pjc:hover .pa-btn .bt,.pjc:focus-visible .pa-btn .bt{animation:pjpress 1.4s var(--out) infinite;animation-delay:calc(var(--n) * 160ms)}
.pa-btn .tp{transition:translate .25s var(--out)}
.pjc:hover .pa-btn .tp,.pjc:focus-visible .pa-btn .tp{translate:0 6px}
@keyframes pjpress{0%,40%,100%{scale:1}15%{scale:.93}}
.pa-toast .sk{filter:drop-shadow(0 10px 14px rgba(21,25,34,.09))}
.pa-toast .t1,.pa-toast .t2{transition:translate .7s var(--spring)}
.pjc:hover .pa-toast .t1,.pjc:focus-visible .pa-toast .t1{translate:0 -71px}
.pjc:hover .pa-toast .t2,.pjc:focus-visible .pa-toast .t2{translate:0 -142px}
.pa-verse{font-family:'JetBrains Mono',ui-monospace,monospace}
.pa-verse .rk{--v:var(--a)}
.pjc:hover .pa-verse .rk,.pjc:focus-visible .pa-verse .rk{--v:var(--b)}
.pa-verse .bf{transform-box:fill-box;transform-origin:0 50%;scale:var(--v) 1;transition:scale .8s var(--out)}
.pa-verse .ln{stroke-dasharray:1}
.pjc:hover .pa-verse .ln,.pjc:focus-visible .pa-verse .ln{animation:pjdraw 1.1s var(--out)}
@keyframes pjdraw{from{stroke-dashoffset:1}}
.pa-folio .win{filter:drop-shadow(0 10px 14px rgba(21,25,34,.09));transition:translate .6s var(--spring)}
.pjc:hover .pa-folio .win,.pjc:focus-visible .pa-folio .win{translate:0 -8px}

/* the project's GitHub stars, at the end of the name's line */
.pjcap{position:relative}
.pjcap b{padding-right:46px}
.pjstar{position:absolute;right:0;top:0;display:flex;align-items:center;gap:4px;font-style:normal;font-variant-numeric:tabular-nums;color:#6B7280}
.pjstar svg{display:block;width:13px;height:13px}

/* the top notch: 6px taller than the kit's, closed and open */
.notch{height:40px}
.notch.is-open{height:46px}

/* ---------- theme switch: the toggle in the notch, the circle reveal and the dark theme ---------- */
/* the toggle stays at the notch's right end; the open menu makes room for it: wider, and the close button one toggle further in */
.thbtn{position:absolute;top:0;bottom:0;right:10px;width:32px;margin:0;padding:0;border:0;background:none;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;outline:none}
.thbtn:focus-visible{outline:2px solid #2F6BFF;outline-offset:-3px}
/* blueprint: at the notch's left end, next to the theme toggle once the menu is open */
.bpbtn{position:absolute;top:0;bottom:0;left:10px;width:32px;margin:0;padding:0;border:0;background:none;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;outline:none;transition:left .6s var(--out),color .2s}
.bpbtn:focus-visible{outline:2px solid #2F6BFF;outline-offset:-3px}
.bpbtn svg{display:block;width:18px;height:18px}
.bpbtn[aria-pressed=true]{color:#A78BFA}
.is-open .bpbtn{left:calc(100% - 74px)}
.thbtn svg{display:block;width:18px;height:18px;overflow:visible}
.thsun,.thmoon{transform-box:view-box;transform-origin:50% 50%;transition:rotate .5s var(--spring),scale .4s var(--out),opacity .25s ease}
.thmoon,.thbtn[aria-pressed=true] .thsun{opacity:0;scale:.5;rotate:-60deg}
.thbtn[aria-pressed=true] .thmoon{opacity:1;scale:1;rotate:0deg}
.thbtn:hover .thsun{rotate:30deg}
.thbtn[aria-pressed=true]:hover .thmoon{rotate:-14deg}
.notch.is-open{width:min(418px,calc(100vw - 20px))}
.is-open .mbtn{left:calc(100% - 118px)}
.mi{right:122px}
@media (prefers-reduced-motion:reduce){.thsun,.thmoon{transition:none}}

/*
  Segue: Circle Pop (circle: origin: pointer, mode: grow)

  Any view transition on the page uses it: the theme switch (ThemeEngine.reveal, document.startViewTransition).
  Page changes are not opted in (no @view-transition rule): going between the home page and the blog, and back and
  forward, is a plain navigation. Reduced motion falls back to the default crossfade.
*/

@property --segue-lead {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}
@property --segue-trail {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}
@property --segue-page {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}
@keyframes segue-lead {
  to { --segue-lead: 1; }
}
@keyframes segue-trail {
  to { --segue-trail: 1; }
}
@keyframes segue-page {
  to { --segue-page: 1; }
}

:root {
  --segue-lead-color: #A78BFA;
  --segue-trail-color: #7C3AED;
  --segue-duration: 0.8s;
  --segue-lead-duration: 0.6s;
  --segue-gap: 0.08s;
  --segue-ease: cubic-bezier(0.65, 0, 0.35, 1);
  /* the pointer origin; set these from JS to grow from a click */
  --segue-x: 50vw;
  --segue-y: 50vh;
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-group(root) {
    animation: none;
    background: var(--segue-lead-color);
  }
  ::view-transition-image-pair(root) {
    background: var(--segue-trail-color);
    animation: segue-lead var(--segue-lead-duration) var(--segue-ease) 0s both,
      segue-trail var(--segue-duration) var(--segue-ease) var(--segue-gap) both;
    clip-path: shape(evenodd from -1% -1%, hline to 101%, vline to 101%, hline to -1%, close, move to calc(var(--segue-x) - var(--segue-lead) * (hypot(max(var(--segue-x), 100vw - var(--segue-x)), max(var(--segue-y), 100vh - var(--segue-y))) + 1px)) var(--segue-y), arc by calc(var(--segue-lead) * (hypot(max(var(--segue-x), 100vw - var(--segue-x)), max(var(--segue-y), 100vh - var(--segue-y))) + 1px) * 2) 0 of calc(var(--segue-lead) * (hypot(max(var(--segue-x), 100vw - var(--segue-x)), max(var(--segue-y), 100vh - var(--segue-y))) + 1px)), arc by calc(var(--segue-lead) * (hypot(max(var(--segue-x), 100vw - var(--segue-x)), max(var(--segue-y), 100vh - var(--segue-y))) + 1px) * -2) 0 of calc(var(--segue-lead) * (hypot(max(var(--segue-x), 100vw - var(--segue-x)), max(var(--segue-y), 100vh - var(--segue-y))) + 1px)), close, move to calc(var(--segue-x) - var(--segue-trail) * (hypot(max(var(--segue-x), 100vw - var(--segue-x)), max(var(--segue-y), 100vh - var(--segue-y))) + 1px)) var(--segue-y), arc by calc(var(--segue-trail) * (hypot(max(var(--segue-x), 100vw - var(--segue-x)), max(var(--segue-y), 100vh - var(--segue-y))) + 1px) * 2) 0 of calc(var(--segue-trail) * (hypot(max(var(--segue-x), 100vw - var(--segue-x)), max(var(--segue-y), 100vh - var(--segue-y))) + 1px)), arc by calc(var(--segue-trail) * (hypot(max(var(--segue-x), 100vw - var(--segue-x)), max(var(--segue-y), 100vh - var(--segue-y))) + 1px) * -2) 0 of calc(var(--segue-trail) * (hypot(max(var(--segue-x), 100vw - var(--segue-x)), max(var(--segue-y), 100vh - var(--segue-y))) + 1px)), close);
  }
  ::view-transition-old(root) {
    mix-blend-mode: normal;
    animation: segue-trail var(--segue-duration) var(--segue-ease) var(--segue-gap) both;
    clip-path: shape(evenodd from -1% -1%, hline to 101%, vline to 101%, hline to -1%, close, move to calc(var(--segue-x) - var(--segue-trail) * (hypot(max(var(--segue-x), 100vw - var(--segue-x)), max(var(--segue-y), 100vh - var(--segue-y))) + 1px)) var(--segue-y), arc by calc(var(--segue-trail) * (hypot(max(var(--segue-x), 100vw - var(--segue-x)), max(var(--segue-y), 100vh - var(--segue-y))) + 1px) * 2) 0 of calc(var(--segue-trail) * (hypot(max(var(--segue-x), 100vw - var(--segue-x)), max(var(--segue-y), 100vh - var(--segue-y))) + 1px)), arc by calc(var(--segue-trail) * (hypot(max(var(--segue-x), 100vw - var(--segue-x)), max(var(--segue-y), 100vh - var(--segue-y))) + 1px) * -2) 0 of calc(var(--segue-trail) * (hypot(max(var(--segue-x), 100vw - var(--segue-x)), max(var(--segue-y), 100vh - var(--segue-y))) + 1px)), close);
  }
  ::view-transition-new(root) {
    mix-blend-mode: normal;
    animation: segue-page var(--segue-duration) var(--segue-ease) calc(var(--segue-gap) * 2) both;
    clip-path: shape(evenodd from calc(var(--segue-x) - var(--segue-page) * (hypot(max(var(--segue-x), 100vw - var(--segue-x)), max(var(--segue-y), 100vh - var(--segue-y))) + 1px)) var(--segue-y), arc by calc(var(--segue-page) * (hypot(max(var(--segue-x), 100vw - var(--segue-x)), max(var(--segue-y), 100vh - var(--segue-y))) + 1px) * 2) 0 of calc(var(--segue-page) * (hypot(max(var(--segue-x), 100vw - var(--segue-x)), max(var(--segue-y), 100vh - var(--segue-y))) + 1px)), arc by calc(var(--segue-page) * (hypot(max(var(--segue-x), 100vw - var(--segue-x)), max(var(--segue-y), 100vh - var(--segue-y))) + 1px) * -2) 0 of calc(var(--segue-page) * (hypot(max(var(--segue-x), 100vw - var(--segue-x)), max(var(--segue-y), 100vh - var(--segue-y))) + 1px)), close);
  }
}


/* no loading screen for a visitor who has already been on the site (data-noload, from the head script in index.html) */
html[data-noload] .ld{display:none}

/* a menu item that is a link (the blog), set like the buttons beside it */
a.mlink{display:inline-flex;align-items:center;text-decoration:none}

/* this page's reveal starts at the notch, not the pointer */
:root{--segue-x:50vw;--segue-y:0px}

/* ---------- dark theme: html[data-theme=dark]. The light theme above is untouched; the photo card, stickers, project cards and
   postage stamps stay paper, like things pinned to a dark wall ---------- */
html[data-theme=dark]{color-scheme:dark;--paper:#12151B}
html[data-theme=dark],html[data-theme=dark] body{background:#12151B}
html[data-theme=dark] .wall{--ink:#ECEFF5;background:#12151B}
html[data-theme=dark] canvas.mesh,html[data-theme=dark] canvas.dots{filter:invert(1) hue-rotate(180deg)}
/* intro text */
html[data-theme=dark] .term{color:#C5CBD8}
html[data-theme=dark] .tp.th{color:#ECEFF5}
html[data-theme=dark] .k{--hv:rgba(255,255,255,.1)}
html[data-theme=dark] .k.nm{color:#A78BFA;--hv:rgba(167,139,250,.18)}
html[data-theme=dark] .k.pl{color:#ECEFF5}
html[data-theme=dark] .tip{background:#F1F3F8;color:#12151B}
html[data-theme=dark] .tip::after{background:#F1F3F8}
html[data-theme=dark] .tp a{color:#8AB0FF}
html[data-theme=dark] .tp a .c{text-decoration-color:rgba(138,176,255,.45)}
html[data-theme=dark] .tp a:hover{background:rgba(138,176,255,.13)}
html[data-theme=dark] .tdash{background:repeating-linear-gradient(90deg,rgba(255,255,255,.2) 0,rgba(255,255,255,.2) 3px,transparent 3px,transparent 9px)}
html[data-theme=dark] .cur{background:#ECEFF5}
html[data-theme=dark] .tbody .say{background:#F1F3F8;color:#12151B}
html[data-theme=dark] .tbody .say:hover{background:#FFFFFF}
html[data-theme=dark] .tbody .say:focus-visible{box-shadow:0 0 0 2px #12151B,0 0 0 4px #A78BFA}
/* notch and menu: a light tab on the dark page */
html[data-theme=dark] .notch{background:#F1F3F8;color:#12151B}
html[data-theme=dark] .notch::before{background:radial-gradient(circle at 0 100%,transparent 11.5px,#F1F3F8 12px)}
html[data-theme=dark] .notch::after{background:radial-gradient(circle at 100% 100%,transparent 11.5px,#F1F3F8 12px)}
html[data-theme=dark] .mbtn,html[data-theme=dark] .thbtn,html[data-theme=dark] .bpbtn{color:#12151B}
html[data-theme=dark] .bpbtn[aria-pressed=true]{color:#7C3AED}
html[data-theme=dark] .mb i{background:#12151B}
html[data-theme=dark] .mlink{color:#6B7280}
html[data-theme=dark] .mlink::before{background:rgba(9,9,11,.08)}
html[data-theme=dark] .mlink:hover,html[data-theme=dark] .mlink[aria-current="page"]{color:#09090B}
/* status chip stays a dark pill (its mood colours are made for dark), with a hairline so it reads on the dark page */
html[data-theme=dark] .chip{box-shadow:0 0 0 1px rgba(255,255,255,.14)}
/* the bot's dark eyes turn light once the page is up. While the loader runs the bot is drawn through invert + difference
   (light on the black lids, its own colour over the page), so it is drawn near-black there: that comes out white on the lids
   and light over the dark page. */
html[data-theme=dark] .wall:not([data-boot=load]):not([data-boot=open]):not([data-boot=live]) .look [fill="#151922" i]{fill:#E9EDF5}
html[data-theme=dark] .wall:not([data-boot=load]):not([data-boot=open]):not([data-boot=live]) .look [stroke="#151922" i]{stroke:#E9EDF5}
html[data-theme=dark] .wall:not([data-boot=load]):not([data-boot=open]):not([data-boot=live]) .look [fill="#243049" i]{fill:#D8E0F2}
html[data-theme=dark] .wall:not([data-boot=load]):not([data-boot=open]):not([data-boot=live]) .look [stroke="#243049" i]{stroke:#D8E0F2}
html[data-theme=dark] .wall:not([data-boot=load]):not([data-boot=open]):not([data-boot=live]) .look [fill="#2B3050" i]{fill:#D6DAF3}
html[data-theme=dark] .wall:not([data-boot=load]):not([data-boot=open]):not([data-boot=live]) .look [stroke="#2B3050" i]{stroke:#D6DAF3}
html[data-theme=dark] .wall:not([data-boot=load]):not([data-boot=open]):not([data-boot=live]) .look [fill="#1C2B4A" i]{fill:#D2E0F5}
html[data-theme=dark] .wall:not([data-boot=load]):not([data-boot=open]):not([data-boot=live]) .look [stroke="#1C2B4A" i]{stroke:#D2E0F5}
html[data-theme=dark] .wall:not([data-boot=load]):not([data-boot=open]):not([data-boot=live]) .look [fill="#3A4252" i]{fill:#CDD3E0}
html[data-theme=dark] .wall:not([data-boot=load]):not([data-boot=open]):not([data-boot=live]) .look [fill="#3D4455" i]{fill:#C9CFDC}
html[data-theme=dark] .wall:is([data-boot=load],[data-boot=open],[data-boot=live]) .look [fill="#151922" i]{fill:#040000}
html[data-theme=dark] .wall:is([data-boot=load],[data-boot=open],[data-boot=live]) .look [stroke="#151922" i]{stroke:#040000}
/* hint, find me, credit */
html[data-theme=dark] .hta{stroke:#8C93A5}
html[data-theme=dark] .htl{color:#9AA2B3}
html[data-theme=dark] .fl{color:#AEB5C4;text-shadow:0 0 3px #12151B,0 0 6px #12151B,0 0 10px #12151B}
html[data-theme=dark] .fb{color:#12151B}
html[data-theme=dark] .fg g{fill:#F1F3F8}
html[data-theme=dark] .fb:focus-visible::after{box-shadow:0 0 0 2px #12151B,0 0 0 4px #A78BFA}
html[data-theme=dark] .credit,html[data-theme=dark] .pjfoot{color:#7A8294}
html[data-theme=dark] .credit a,html[data-theme=dark] .pjfoot a{color:#C5CBD8;border-bottom-color:rgba(255,255,255,.3)}
html[data-theme=dark] .credit a:hover,html[data-theme=dark] .pjfoot a:hover{color:#FFFFFF;border-bottom-color:#FFFFFF}
html[data-theme=dark] .credit a:focus-visible,html[data-theme=dark] .pjfoot a:focus-visible{outline-color:#A78BFA}
html[data-theme=dark] .credit i,html[data-theme=dark] .pjfoot i{color:#555D6E}
/* cup: a whitish mug */
html[data-theme=dark] .cupbtn svg [fill="#09090B"]{fill:#F1F3F8}
html[data-theme=dark] .cupbtn svg [stroke="#09090B"]{stroke:#F1F3F8}
html[data-theme=dark] .cupbtn svg [fill="#2B2F3A"]{fill:#C9CED9}
html[data-theme=dark] .cupbtn svg [fill="#D9DCE3"]{fill:#2A2F3A}
html[data-theme=dark] .cupbtn svg [stroke="#fff"]{stroke:#09090B}
html[data-theme=dark] .cup .sw{stroke:#7A8294}
html[data-theme=dark] .cupbtn:focus-visible::after{box-shadow:0 0 0 2px #12151B,0 0 0 4px #A78BFA}
html[data-theme=dark] .cuppop{background:#1B1F27;color:#E5E7EB;box-shadow:0 0 0 1px rgba(255,255,255,.12),0 14px 30px -12px rgba(0,0,0,.7)}
html[data-theme=dark] .cuppop::before{background:#1B1F27}
html[data-theme=dark] .cpx{background:#2B3039;color:#D1D5DB}
html[data-theme=dark] .cpx:hover{background:#363C47;color:#fff}
html[data-theme=dark] .cpgo:focus-visible,html[data-theme=dark] .cpx:focus-visible{box-shadow:0 0 0 2px #1B1F27,0 0 0 4px #A78BFA}
/* projects and experiences */
html[data-theme=dark] .pjstk .pjm{box-shadow:0 0 0 1px rgba(255,255,255,.06),0 6px 10px -6px rgba(0,0,0,.6)}
html[data-theme=dark] .pjl,html[data-theme=dark] .stl{color:#AEB5C4}
html[data-theme=dark] .pjl em,html[data-theme=dark] .stl em{color:#9AA2B3;background:rgba(255,255,255,.09)}
html[data-theme=dark] .pjs:focus-visible .pjl,html[data-theme=dark] .sts:focus-visible .stl{box-shadow:0 0 0 2px #12151B,0 0 0 4px #A78BFA}
html[data-theme=dark] .pjveil{background:#12151B}
html[data-theme=dark] .pjback{border-color:rgba(255,255,255,.16);background:#1A1E26;color:#ECEFF5}
html[data-theme=dark] .pjback:hover{background:#242934;border-color:rgba(255,255,255,.26)}
html[data-theme=dark] .pjback:focus-visible{box-shadow:0 0 0 2px #12151B,0 0 0 4px #A78BFA}
html[data-theme=dark] .pjcol{color:#ECEFF5}
html[data-theme=dark] .pjtt{background:repeating-linear-gradient(90deg,rgba(255,255,255,.2) 0,rgba(255,255,255,.2) 3px,transparent 3px,transparent 9px) left bottom/100% 1px no-repeat}
html[data-theme=dark] .pjtag{color:#6D7587}
html[data-theme=dark] .pjh{color:#A78BFA}
html[data-theme=dark] .pjn{color:#7A8294}
html[data-theme=dark] .pjd{color:#C5CBD8}
html[data-theme=dark] .pjc{box-shadow:0 0 0 1px rgba(255,255,255,.07)}
html[data-theme=dark] .pjc:focus-visible{box-shadow:0 0 0 3px #12151B,0 0 0 5px #A78BFA}
html[data-theme=dark] .pjcap{color:#7A8294}
html[data-theme=dark] .pjcap b{color:#C5CBD8}
html[data-theme=dark] .pjstar{color:#9AA2B3}
html[data-theme=dark] .xi.xsel .xc .stpaper path{stroke:#A78BFA}
html[data-theme=dark] .extl::before{background:rgba(255,255,255,.14)}
html[data-theme=dark] .tlf{background:#8B5CF6}
html[data-theme=dark] .tlk{border-color:rgba(255,255,255,.28);background:#12151B}
html[data-theme=dark] .tlk.on{background:#8B5CF6;border-color:#8B5CF6}
html[data-theme=dark] .tlk.cur{box-shadow:0 0 0 3px rgba(167,139,250,.28)}
html[data-theme=dark] .tlk:focus-visible{box-shadow:0 0 0 2px #12151B,0 0 0 4px #A78BFA}
html[data-theme=dark] .tlt{background:rgba(255,255,255,.09);color:#9AA2B3}
html[data-theme=dark] .tlk.on .tlt{background:#7C3AED;color:#fff}
html[data-theme=dark] .exlist{color:#C5CBD8}
html[data-theme=dark] .exl li>span::before{background:#555D6E}
html[data-theme=dark] .exh i{color:#A78BFA}
html[data-theme=dark] .exh b{color:#ECEFF5}
html[data-theme=dark] .exh u{border-bottom-color:#555D6E}

/* ---------- phones: a "scroll down" ring that turns slowly round a down arrow, bottom right; it stops under the pointer,
   a tap scrolls to the projects, and it fades out as the projects come in ---------- */
.scue{display:none}
@media (max-width:760px){
  .scue{display:block;position:absolute;z-index:4;right:12px;bottom:clamp(10px,2.4vh,22px);width:76px;height:76px;margin:0;padding:0;border:0;border-radius:50%;
    background:none;color:#151922;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;outline:none;
    opacity:max(0,calc(1 - var(--sp,0) * 6));animation:settle .9s var(--out) 1.6s backwards}
  .pjroll:not([data-sc=off]) .scue{pointer-events:none}
  .scue svg{display:block;width:100%;height:100%;overflow:visible}
  .scue text{fill:currentColor;font-family:'JetBrains Mono',ui-monospace,monospace;font-weight:700}
  .scring{transform-box:view-box;transform-origin:50px 50px;animation:scspin 16s linear infinite}
  .scue:hover .scring,.scue:focus-visible .scring{animation-play-state:paused}
  .scue:focus-visible{box-shadow:0 0 0 2px var(--paper,#fff),0 0 0 4px #7C3AED}
}
/* small phones: the intro text reaches lower, so the cue is smaller and sits beside the "Say hi" row */
@media (max-width:760px) and (max-height:600px),(max-width:340px){.scue{right:8px;bottom:8px;width:58px;height:58px}}
@keyframes scspin{to{rotate:360deg}}
@media (prefers-reduced-motion:reduce){.scring{animation:none}}
html[data-theme=dark] .scue{color:#ECEFF5}
html[data-theme=dark] .scue:focus-visible{box-shadow:0 0 0 2px #12151B,0 0 0 4px #A78BFA}

/* phones: the timeline runs edge to edge. The first and last dates move inwards just as far as they need to stay 4px
   inside the screen (--tle: the gap between the end knob and the screen edge), their arrows staying on the knob; and the
   short dates ("Nov 23") take over up to 540px wide, where the full ones no longer fit side by side */
@media (max-width:760px){
  .extl{--tle:var(--pl)}
  .extl .tlk:first-of-type .tlt{translate:max(-50%,calc(4px - var(--tle))) 0}
  .extl .tlk:first-of-type .tlt::after{left:min(50%,calc(var(--tle) - 4px))}
  .extl .tlk:last-of-type .tlt{translate:min(-50%,calc(var(--tle) - 4px - 100%)) 0}
  .extl .tlk:last-of-type .tlt::after{left:max(50%,calc(100% - var(--tle) + 4px))}
}
@media (max-width:540px){.tlv{display:none}.tlw{display:inline}.tlt{padding:5px 6px;font-size:10px}}
@media (max-width:420px){.extl .tlk:last-of-type .tlt,.extl .tlk:last-of-type .tlt::after{--tle:calc(var(--pl) + 10px)}}

/* The phone scroll variables, written by ScrollEngine straight onto the elements that read them. Not inherited, so a
   scroll frame restyles those few elements rather than everything below .pjroll. */
@property --sp{syntax:'<number>';inherits:false;initial-value:0}
@property --ep{syntax:'<number>';inherits:false;initial-value:0}
@property --pf{syntax:'<number>';inherits:false;initial-value:1}
@property --ef{syntax:'<number>';inherits:false;initial-value:0}

/* Larger intro text: the kit's 11-13px (10px in short windows) was hard to read, most of all on phones. */
.term{width:min(440px,calc(100vw - 36px));font-size:15px;line-height:2}
.tp.th{font-size:1.4em}
@media (max-height:700px){.term{font-size:13px;line-height:1.75}}
@media (max-height:520px) and (min-width:761px){.term{width:calc(50vw - 200px);line-height:1.7}}
@media (max-width:760px){
  .term{font-size:clamp(13px,3.55vw,15px);line-height:1.75}
  .tp.th{font-size:1.3em}
  .tp{padding-right:0}
  /* the larger heading reaches the hand-drawn hint */
  sticker-ring .skr-hint{display:none}
}
@media (max-width:760px) and (min-height:701px) and (max-height:820px){.term{line-height:1.65}}
@media (max-width:760px) and (max-height:700px){.term{line-height:1.55}}
@media (max-width:760px) and (max-height:600px){.term{font-size:11.5px;line-height:1.5}}
@media (max-width:760px){.scue{width:62px;height:62px}}
/* phones: the open menu has no room for blueprint too, so that button waits until the menu closes */
@media (max-width:440px){
  .is-open .bpbtn{visibility:hidden}
  .is-open .mbtn{left:calc(100% - 86px)}
  .mi{right:90px}
}
/* narrow phones: the open notch has less room than its four links, the close button and the toggle need */
@media (max-width:400px){
  .bpbtn{left:5px;width:30px}
  .thbtn{right:5px;width:30px}
  .is-open .mbtn{left:calc(100% - 71px);width:36px}
  .mi{right:72px;padding-left:4px}
  .mlink{padding:0 6px}
}
@media (max-width:340px){.mlink{padding:0 4px;font-size:11px}}

/* ---------- blueprint: the page turns white on blue, and a canvas (BlueprintEngine) draws the grid, boxes, rulers and lines over it.
   Greyscale makes the page one tone, with dark on light flipped so ink is white; the screen layer then turns black into blueprint blue and leaves white alone. ---------- */
.blueprint{position:fixed;inset:0;width:100vw;height:100vh;z-index:9999;pointer-events:none}
html[data-blueprint]{background:#0B3B8C}
html[data-blueprint] .pjroll{filter:grayscale(1) invert(1) contrast(1.15)}
html[data-blueprint][data-theme=dark] .pjroll{filter:grayscale(1) contrast(1.15)}
html[data-blueprint]::after{content:"";position:fixed;inset:0;z-index:9998;background:#0B3B8C;mix-blend-mode:screen;pointer-events:none}
html[data-blueprint] .wall *:not(svg *):not(.notch,.notch *){box-shadow:none !important;text-shadow:none !important}
html[data-blueprint] canvas.mesh,html[data-blueprint] canvas.dots{visibility:hidden}
