/* One page, one centred column: the key, a line about Jake, the clients, and
   how to reach him. Buttons follow dmcg's language, a word with an outline that
   fades in, one ease, a quiet tick, on badtabs' own paper ground. The synth is
   ours; their settings only. */
:root{
  --paper:#ffffff;
  --ink:#0b0b0c;
  --mute:#5e5e61;
  --rule:#dcdcd8;
  --tile:#e7e7e4;
  --ring:rgba(0,0,0,.08);
  /* the ratio bar's track. The reference runs #e7e7e7 on a #f8f8f8 page, a
     7% step; this is the same step taken from white. */
  --track:#ececed;
  color-scheme:light;   /* the page is light only, by Jake's call */
  --glass:rgba(243,243,242,.72);
  --ease:cubic-bezier(.22,1,.36,1);
  /* Two durations for the whole site: things that change in place, and
     things that arrive. Nine different ones is what made it feel loose. */
  --t1:.18s; --t2:.42s;
  /* an ease-out-expo is right for something moving and wrong for something
     fading -- it spends the change in the first hundred milliseconds, which
     is what read as abrupt. Opacity gets an even curve of its own. */
  --fade:cubic-bezier(.4,0,.2,1);
  /* The baseline. 12px type on an 18px line, so the unit is 6 and every
     vertical space on the site is a multiple of it. */
  --u:6px;
  --mono:ui-monospace,SFMono-Regular,Menlo,monospace;
  --font:"Unica77 LL","Unica77","Helvetica Neue",Helvetica,Arial,sans-serif;
}

*{box-sizing:border-box}
/* iOS paints a blue square over any tapped control by default */
a,button,input,label,.tile,.ic{-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--font);
  font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased;
  -webkit-text-size-adjust:100%;text-size-adjust:100%;
  transition:background var(--t2) var(--ease),color var(--t2) var(--ease)}

/* Built one to one with the reference Jake sent (danieljordanpompa.com):
   a centred row of small words at the top, one block of small type in the
   middle, a line at the foot. One type size everywhere, hierarchy carried by
   grey, nothing boxed. The views swap in place; nothing loads. */
#shell{min-height:100%;display:flex;flex-direction:column;align-items:center;
  text-align:center;
  padding:calc(var(--u)*5) max(calc(var(--u)*3),env(safe-area-inset-left,0px)) calc(var(--u)*4)}

/* the nav: wordmark, then the three words. The one you are on goes grey. */
#nav{display:flex;align-items:baseline;justify-content:center;
  gap:calc(var(--u)*2);flex-wrap:wrap;font-size:14px;line-height:calc(var(--u)*4);letter-spacing:-.002em}
#nav .word{font-weight:400;margin-right:var(--u);color:var(--ink);text-decoration:none;
  transition:color var(--t1) var(--ease)}
#nav .word[aria-current="true"]{color:var(--mute);cursor:default}
@media (hover:hover){ #nav .word:not([aria-current]):hover{color:var(--mute)} }
/* the nav items became links when Projects got its own page; without this
   they fall back to the browser's blue and underline */
#nav a{font:inherit;background:none;border:0;padding:0;cursor:pointer;
  color:var(--ink);text-decoration:none;transition:color var(--t1) var(--ease)}
#nav a[aria-current="true"]{color:var(--mute);cursor:default}

@media (hover:hover){ #nav a:not([aria-current]):hover{color:var(--mute)} }
#nav a:focus-visible{outline:none;color:var(--mute);text-decoration:underline;
  text-underline-offset:3px}

/* the middle holds whichever view is on, centred in what is left */
#stage{flex:1;display:flex;align-items:center;justify-content:center;width:100%}
.view{flex-direction:column;align-items:center;width:100%}
/* The views stack in one grid cell instead of taking turns in the flow.
   Before this the outgoing one was removed and the incoming one faded up from
   nothing, which left a frame with the page empty -- measured, one blank
   frame every time. Stacked, they cross over each other and the ink never
   drops. The cell is as tall as the tallest view, so nothing below it moves
   when the page changes either. */
/* Projects and Swaggy are their own documents. A cross-document view
   transition was tried first and Chromium skipped it every time -- measured,
   three navigations, three "Transition was skipped". So the fade is ours:
   out over --t1 on the way out, in over --t2 on arrival, which happens
   whatever the browser supports. The nav prefetches on hover so the next
   document is usually already in cache by the time the fade finishes. */
#shell.leaving{opacity:0;transition:opacity var(--t1) var(--fade)}

#stage{display:grid;align-items:center;justify-items:center}
.view{grid-area:1/1;display:flex;opacity:0;visibility:hidden;
  transition:opacity var(--t2) var(--fade),visibility 0s linear var(--t2)}
.view.on{opacity:1;visibility:visible;transition-delay:0s,0s}
/* backwards, not both. With both, the arrival animation keeps its end state
   applied to opacity forever, and an animation beats a transition on the same
   property -- so the leaving fade silently did nothing. backwards still holds
   the from-state before it starts, and lets go afterwards. */
#shell{animation:rise var(--t2) var(--fade) backwards}
@keyframes rise{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){
  .view,#shell,#frame,.thumb{transition:none;animation:none}
}

/* every word on the page is this size; only the colour changes */
.lab{margin:0;font-size:14px;line-height:calc(var(--u)*4);color:var(--mute)}
.txt{margin:0;font-size:14px;line-height:calc(var(--u)*4);letter-spacing:-.002em;
  color:var(--ink);max-width:46ch;text-wrap:balance}
.gap{height:calc(var(--u)*3)}
/* the time beside each city: the same size, a step back in grey. Not tabular
   -- it only changes once a minute, and the even figures read spaced out at
   this size, which is worse than the twitch it would prevent. */
.tz{font-style:normal;color:var(--mute)}
.h1{font-size:14px;font-weight:400}
/* a <p> carries a 1em margin of its own, which grew with the type and fell
   off the unit; the shell's padding is what holds it off the floor */
#foot{margin:0;font-size:14px;line-height:calc(var(--u)*4);color:var(--mute)}
#foot a{color:inherit;text-decoration:none}
@media (hover:hover){ #foot a:hover{color:var(--ink)} }

/* a word that does something: underline on hover, nothing boxed */
.lnk{font:inherit;font-size:14px;line-height:calc(var(--u)*4);letter-spacing:-.002em;
  color:var(--ink);background:none;border:0;padding:0;cursor:pointer;
  text-decoration:none;transition:color var(--t1) var(--ease)}
@media (hover:hover){ .lnk:hover{color:var(--mute)} }
.lnk:focus-visible{outline:none;color:var(--mute);text-decoration:underline;
  text-underline-offset:3px}
.lnk.sw{opacity:0}
.said{min-height:0;margin:calc(var(--u)*2) 0 0;font-size:14px;line-height:calc(var(--u)*4);
  color:var(--mute);opacity:0;transition:opacity var(--t1) var(--ease)}
.said.on{opacity:1}

#mark{width:150px;height:150px;cursor:pointer;background:none;border:0;padding:0}
/* The key is built after the first paint, so for about a second there is a
   reserved hole where it will be. The box never moves -- nothing reflows --
   but a mark that pops into an empty space reads as broken. It fades up on
   its first drawn frame instead, which is the whole of the answer to whether
   this page needs a loading screen: it does not, it needs the one late thing
   to arrive rather than appear. */
#mark canvas{display:block;width:100%;height:100%;
  opacity:0;transition:opacity var(--t2) var(--fade)}
#mark.up canvas{opacity:1}
#mark:focus-visible{outline:2px solid var(--ink);outline-offset:6px}

.rowwrap{position:relative;width:100%;margin:30px 0 42px}
/* the bar: the marks in a light trough. dmcg hang a close and a tail divider
   off theirs, but their dock floats over work you want back and scrolls past
   a fixed element; ours does neither, so both were shape without a job. */
.dock{display:flex;align-items:center;justify-content:center;max-width:100%}
.bar{display:flex;align-items:center;background:var(--tile);border-radius:24px;
  padding:13px;overflow:hidden;max-width:100%;
  transition:padding var(--t2) var(--ease)}
/* Six marks, all six in view. The window is six tiles wide but never wider
   than the column, so a phone too narrow for all six scrolls instead of
   pushing the page sideways. A tile lifts 3px on hover and draws its focus ring outside itself,
   so the scroller carries vertical padding and hands it straight back as
   negative margin -- without that its own overflow would clip both. An edge
   fade was tried and cut: at any width that reads, it eats the fifth mark,
   and five clean marks is the whole look. A row of app icons in a trough is
   already a thing people swipe. */
.tiles{--tw:56px;--tg:12px;
  display:flex;gap:var(--tg);align-items:center;
  width:calc(6*var(--tw) + 5*var(--tg));max-width:100%;
  padding:7px 0;margin:-7px 0;
  overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;
  scrollbar-width:none}
.tiles::-webkit-scrollbar{display:none}
.tile{width:var(--tw);height:var(--tw);flex:0 0 auto;border-radius:13px;border:0;padding:0;cursor:pointer;
  overflow:hidden;background:var(--tile);display:grid;place-items:center;
  position:relative;transition:transform var(--t1) var(--ease)}
.tile img{width:100%;height:100%;object-fit:cover;display:block}
.tile span{font-size:15px;letter-spacing:-.01em;color:var(--mute)}
.tile::after{content:"";position:absolute;inset:0;border-radius:13px;
  box-shadow:inset 0 0 0 1px var(--ring);pointer-events:none}
/* iOS keeps :hover latched after a tap, so a tapped tile stayed lifted 3px
   until you touched something else -- that is the "they just slide". Hover
   belongs to pointers that can actually hover; touch gets a press instead. */
@media (hover:hover){ .tile:hover{transform:translateY(-3px)} }
.tile:active{transform:scale(.95)}
.tile:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
/* the label pill sits under the mark you are pointing at, not under the row,
   and slides along as you move. It measures the next label on an offscreen
   twin first, so the slide and the width change are one movement. */
.pill{position:absolute;top:100%;left:0;margin-top:8px;pointer-events:none;
  text-decoration:none;
  display:inline-flex;align-items:center;gap:7px;overflow:hidden;
  background:var(--tile);border-radius:999px;padding:7px 13px;
  font-size:13.5px;line-height:1.2;white-space:nowrap;opacity:0;
  transition:width var(--t2) var(--ease),transform var(--t2) var(--ease),
             opacity var(--t1) var(--ease)}
.pill.on{opacity:1}
/* no hover on a phone, so the pill is the thing you press to leave */
.pill.tap{pointer-events:auto;cursor:pointer}
.pill.nt{transition:none}
.pill b{font-weight:400;color:var(--ink)}
.pill i{font-style:normal;color:var(--mute)}
.pill b,.pill i{transition:opacity var(--t1) var(--ease)}
.pill.sw b,.pill.sw i{opacity:0}
.pill i:empty{display:none}
.clients a{color:var(--ink);text-decoration:none;position:relative;white-space:nowrap}
.clients a::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;
  background:currentColor;transform:scaleX(0);transform-origin:left;
  transition:transform var(--t2) var(--ease)}
.clients a:hover::after,.clients a:focus-visible::after{transform:scaleX(1)}
.clients a:focus-visible{outline:none}
/* The tick alone never said what it did, and with the hover card gone the
   address is nowhere on the page. One reserved line under the row says it and
   shows what landed on the clipboard; the height is held so nothing reflows. */
.said{width:100%;min-height:20px;margin:13px 0 0;font-size:13.5px;
  letter-spacing:-.004em;color:var(--mute);opacity:0;
  transition:opacity var(--t1) var(--ease)}
.said.on{opacity:1}
.fallback{display:block;width:100%;margin-top:12px;font-size:14px;color:var(--mute)}

/* The grey pill that used to sit behind a hovered word is gone. It was a
   component from the old page and the nav wordmark still carried its class,
   so Swaggy alone grew a pill on hover while the other three simply went
   grey -- two languages for one row, and the odd one out was a leftover
   rather than a decision. */
/* Contact is three bare glyphs: a tile fades in behind whichever one you are
   on, so a press reads the same whether it copies or leaves the page. Colour
   was tried and dropped. The hover cards are gone for good -- the card
   repeated the very glyph it sat under. */
.ic{width:40px;height:40px;border-radius:11px;border:0;padding:0;cursor:pointer;
  background:none;color:var(--ink);display:grid;place-items:center;
  transition:background var(--t1) var(--ease),transform var(--t1) var(--ease)}
@media (hover:hover){ .ic:hover{background:var(--tile)} }
.ic:focus-visible{background:var(--tile)}
.ic:active{transform:scale(.94);background:var(--tile)}
.ic:focus-visible{outline:none;box-shadow:0 0 0 2px var(--ink)}
.ic svg{width:21px;height:21px;display:block;transition:opacity var(--t1) var(--ease)}
@media (max-width:520px){
  /* the key is 200px against a 900px desktop column but half a phone screen,
     so it has to come down with everything else */
  #mark{width:124px;height:124px}
  .rowwrap{margin:24px 0 38px}
  .pill{font-size:12.5px;padding:6px 11px}
  .bar{padding:10px;border-radius:20px}
  .tiles{--tw:48px;--tg:9px}
  .tile{border-radius:11px}
  .tile::after{border-radius:11px}
}
.ic.sw svg{opacity:0}
.row{display:flex;gap:2px;flex-wrap:wrap;align-items:center;justify-content:center;margin-top:2px}

/* no WebGL: the word stands in for the key */
#nogl{display:none;font-family:var(--mono);font-size:11px;letter-spacing:.08em;
  text-transform:uppercase;color:var(--mute)}
body.nogl #nogl{display:block}
body.nogl #mark{display:none}
@media (prefers-reduced-motion:reduce){*{transition-duration:.01ms!important;animation-duration:.01ms!important}}

/* the photo behind the name. Rounded and centred, at a size that leaves the
   page as quiet as every other view -- it is a portrait, so it is held by
   width and allowed its own height. */
/* The frame carries its own envelope, and the row of ratios sits under it,
   so the control stays with the picture instead of stranding a hole of white
   under the wide crops. The whole group is centred, so a change breathes out
   from the middle rather than dropping from the top. */
#frame{overflow:hidden;border-radius:18px;corner-shape:superellipse(2);
  background:#f2f2f3;
  max-width:min(360px,74vw);max-height:min(460px,52vh);
  /* square standing before the script measures it, so the picture is never a
     zero-height box for a frame */
  width:min(360px,74vw);aspect-ratio:1;
  transition:width var(--t2) var(--ease),height var(--t2) var(--ease)}
#frame.set{aspect-ratio:auto}
#frame.snap{transition:none}
/* Held low in the frame: his head sits well down the picture, so anchoring
   near the bottom keeps him whole in the wide crops instead of cutting him
   off at the knees. */
#me{display:block;width:100%;height:100%;object-fit:cover;object-position:52% 90%}

/* The ratios. Jake sent the bar from his reference and asked for that one, so
   it is that one: a grey track, a white thumb that slides under your thumb,
   and five outlined rectangles each drawn at its own ratio. Everything here is
   measured off the recording -- track 21 CSS px tall, glyph 6 in a slot of
   22x16, icon grey #5e5e5e on a #e7e7e7 track, radius .30 of the height -- and
   scaled 1.4x to sit with this page's 14px type. */
#ratios{position:relative;display:flex;margin-top:calc(var(--u)*3);
  padding:3px;background:var(--track);
  border-radius:9px;corner-shape:superellipse(2);
  --slot:32px;--slotH:24px}
.thumb{position:absolute;left:3px;top:3px;width:var(--slot);height:var(--slotH);
  background:var(--paper);border-radius:7px;corner-shape:superellipse(2);
  box-shadow:0 1px 1px rgba(0,0,0,.05),0 2px 6px rgba(0,0,0,.08);
  transform:translateX(calc(var(--i) * var(--slot)));
  transition:transform var(--t2) var(--ease)}
.rat{position:relative;width:var(--slot);height:var(--slotH);
  display:grid;place-items:center;
  background:none;border:0;padding:0;cursor:pointer;color:var(--mute);
  transition:color var(--t1) var(--ease)}
.rat svg{display:block;width:12px;height:12px;overflow:visible}
.rat rect{fill:none;stroke:currentColor;stroke-width:1;
  transition:stroke-width var(--t2) var(--ease)}
.rat[aria-current="true"]{color:var(--ink);cursor:default}
.rat[aria-current="true"] rect{stroke-width:1.5}
@media (hover:hover){ .rat:not([aria-current]):hover{color:var(--ink)} }
.rat:focus-visible{outline:2px solid var(--ink);outline-offset:1px;
  border-radius:7px;corner-shape:superellipse(2)}
/* the slot is 24 tall, which is a small thing to hit with a thumb; the target
   is grown to 44 without moving or covering anything */
.rat::before{content:"";position:absolute;inset:-10px 0}

