/* jefford.me
   Everything under "html.js" only applies once the script has switched the game-style layout on.
   Without it, the projects are a plain list and the story is a plain timeline. */

@font-face{font-family:'Red Hat Display';src:url('../fonts/red-hat-display.woff2') format('woff2');font-weight:300 900;font-style:normal;font-display:swap}
@font-face{font-family:'Red Hat Text';src:url('../fonts/red-hat-text.woff2') format('woff2');font-weight:300 700;font-style:normal;font-display:swap}

:root{
  --bg:#030712; --ink:#EEF3FF; --mist:#93A4CB; --gold:#FFC53D; --tile:#0A1330; --line:#14224d; --ring:#7F93C6;
  --pad:48px;
  --display:'Red Hat Display',system-ui,-apple-system,'Segoe UI',sans-serif;
  --text:'Red Hat Text',system-ui,-apple-system,'Segoe UI',sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html{background:var(--bg);scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:400 18px/1.5 var(--text)}
h1,h2,h3,p,ul,ol,figure{margin:0}
ul,ol{padding:0;list-style:none}
a{color:inherit}
img{max-width:100%}
:focus-visible{outline:2px solid var(--gold);outline-offset:3px;border-radius:4px}
.skip{position:absolute;left:12px;top:-80px;z-index:50;background:var(--ink);color:var(--bg);padding:10px 14px;border-radius:8px}
.skip:focus{top:12px}
kbd{display:inline-grid;place-items:center;min-width:26px;height:26px;padding:0 6px;border:1.5px solid currentColor;border-radius:6px;font:600 13px/1 var(--text);margin-right:4px}
.only-js,.pill.only-js{display:none}

/* ---------- top bar ---------- */
.bar{position:fixed;inset:0 0 auto 0;z-index:20;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:22px var(--pad) 26px;background:linear-gradient(180deg,rgba(3,7,18,.97) 50%,rgba(3,7,18,0))}
.tabs{display:flex;gap:30px;overflow-x:auto;scrollbar-width:none;white-space:nowrap;min-width:0;padding:6px;margin:-6px}
.tabs a{font:500 17px/1 var(--display);color:var(--mist);text-decoration:none;padding-bottom:8px;border-bottom:2px solid transparent}
.tabs a:hover{color:var(--ink)}
.tabs a[aria-current="true"]{color:var(--ink);border-bottom-color:var(--ink)}
.me{display:flex;align-items:center;gap:12px;font-size:14px;line-height:1.3;text-align:right;flex:none}
.me b{display:block;font-weight:600;font-size:15px}
.me .who span{color:var(--mist)}
.me img{width:42px;height:42px;border-radius:50%;display:block}

/* ---------- shared ---------- */
.scr{position:relative;min-height:100vh;min-height:100svh;padding:112px var(--pad) 72px}
.sec{font:500 17px/1.2 var(--display);color:var(--mist)}
.pill{display:inline-block;background:var(--ink);color:var(--bg);border:0;border-radius:999px;padding:14px 26px;font:700 17px/1 var(--display);text-decoration:none;cursor:pointer}
.pill:hover{background:#fff}
html.js .hints{display:flex;align-items:center;gap:18px;font-size:14px;color:var(--mist)}
.hints a{color:inherit;text-decoration:none}
.hints a:hover{color:var(--ink)}
.hints span,.hints a{display:inline-flex;align-items:center;gap:4px}

/* ---------- 1. start ---------- */
.intro{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);gap:72px;align-items:center;overflow:hidden}
.intro .glow{position:absolute;inset:0;background:
  radial-gradient(900px 640px at 80% 50%,rgba(46,88,255,.34),rgba(46,88,255,0) 62%),
  radial-gradient(760px 520px at 6% 104%,rgba(34,64,190,.20),rgba(34,64,190,0) 60%)}
.intro .words,.intro figure{position:relative;z-index:1}
.intro h1{font:900 clamp(56px,7.6vw,124px)/.96 var(--display);letter-spacing:-.03em;margin-bottom:28px;text-wrap:balance}
.intro .bio{font-size:20px;line-height:1.55;max-width:31em}
.intro .what{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:30px;margin-top:34px;max-width:720px}
.intro .what b{display:block;font:700 19px/1.25 var(--display);margin-bottom:5px}
.intro .what span{display:block;color:var(--mist);font-size:15.5px;line-height:1.4}
.intro .acts{display:flex;align-items:center;flex-wrap:wrap;gap:16px 26px;font-size:17px;margin-top:34px}
.intro .acts .txt{text-underline-offset:5px}
.intro figure{justify-self:end;width:min(100%,440px)}
@media (min-width:721px){
  /* keep the photo inside short laptop windows */
  .intro figure{width:min(100%,440px,max(180px,calc((100vh - 200px) * .8)));width:min(100%,440px,max(180px,calc((100svh - 200px) * .8)))}
}
.intro figure .f{aspect-ratio:4/5;border-radius:28px;overflow:hidden;box-shadow:0 40px 150px rgba(46,88,255,.42);transform:perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));transition:transform .25s ease-out}
.intro figure img{width:100%;height:100%;object-fit:cover;display:block}
html.js .intro .sky{display:block;position:absolute;inset:0;width:100%;height:100%}
html.js .intro .down{position:absolute;left:var(--pad);bottom:26px;z-index:2;animation:pulse 2.2s ease-in-out infinite}
html.js .intro .glow{animation:breathe 9s ease-in-out infinite}
html.js .intro .in{opacity:0;transform:translateY(20px);animation:rise .75s cubic-bezier(.2,.7,.2,1) .05s forwards}
html.js .intro figure.in{animation-delay:.12s}
html.js .intro .bio.in{animation-delay:.16s}
html.js .intro .what.in{animation-delay:.26s}
html.js .intro .acts.in{animation-delay:.36s}

/* ---------- 2. projects: a plain list first ---------- */
.plist{display:grid;gap:14px;margin-top:22px;max-width:760px}
.plist li{display:grid;grid-template-columns:64px minmax(0,1fr);column-gap:18px;align-items:start;padding:18px;border-radius:18px;background:var(--tile)}
.plist .ic{grid-row:1 / span 3;width:64px;height:64px;border-radius:14px;display:block}
.plist h3{font:900 26px/1.1 var(--display);letter-spacing:-.02em}
.plist p{color:var(--mist);margin-top:4px}
.plist .links{display:flex;flex-wrap:wrap;align-items:center;gap:12px 22px;margin-top:14px;color:var(--ink)}
.plist .more{text-underline-offset:5px}

/* ...then the console home screen */
html.js .lib{display:grid;grid-template-rows:auto auto 1fr auto;padding:104px 0 26px;overflow:hidden}
html.js .lib > .sec,html.js .lib > .row,html.js .lib > .plist,html.js .lib > .hints{position:relative}
html.js .lib .art{position:absolute;inset:0 0 0 52%;background-size:cover;background-position:left top;opacity:0;transition:opacity .45s ease;mix-blend-mode:luminosity}
html.js .lib .art.on{opacity:.78}
html.js .lib .shade{position:absolute;inset:0;background:
  linear-gradient(90deg,var(--bg) 52%,rgba(3,7,18,.62) 68%,rgba(3,7,18,.18) 100%),
  linear-gradient(0deg,var(--bg) 2%,rgba(3,7,18,0) 40%),
  linear-gradient(180deg,var(--bg) 10%,rgba(3,7,18,0) 34%)}
html.js .lib .sec{padding:0 var(--pad)}
html.js .lib .row{display:flex;align-items:center;gap:14px;padding:0 var(--pad);height:142px;overflow-x:auto;scrollbar-width:none}
html.js .lib .row button{appearance:none;border:0;padding:0;margin:0;cursor:pointer;width:80px;height:80px;border-radius:18px;overflow:hidden;background:var(--tile);box-shadow:0 0 0 1px #1D2C5C;transition:width .16s ease,height .16s ease;flex:none}
html.js .lib .row button img{width:100%;height:100%;object-fit:cover;display:block}
html.js .lib .row button[aria-pressed="true"]{width:108px;height:108px;border-radius:24px;box-shadow:0 0 0 4px var(--bg),0 0 0 6px var(--ring)}
html.js .plist{display:block;align-self:end;margin:0;max-width:820px;padding:24px var(--pad) 34px}
html.js .plist li{display:none;padding:0;background:none;border-radius:0}
html.js .plist li.on{display:block}
html.js .plist .ic{display:none}
html.js .plist .shot{display:none}
html.js .plist h3{font:900 clamp(56px,7.4vw,112px)/.95 var(--display);letter-spacing:-.03em;margin-bottom:14px;overflow-wrap:anywhere}
html.js .plist li > p:not(.links){font:500 22px/1.35 var(--display);color:var(--ink);max-width:26em;margin:0}
html.js .plist .links{margin-top:26px}
html.js .plist button.only-js{display:inline-block}
html.js .lib .hints{padding:0 var(--pad)}

/* ---------- 3. what I do ---------- */
.skills{display:grid;align-content:center}
.skills .cols{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:56px;margin-top:30px;max-width:1240px}
.skills h3{font:900 clamp(34px,3.6vw,54px)/1 var(--display);letter-spacing:-.03em;margin-bottom:22px}
.skills li{padding:13px 0;border-top:1px solid var(--line);font-size:20px;line-height:1.35}
html.js .skills .down{position:absolute;left:var(--pad);bottom:26px}

/* ---------- 4. story: a plain timeline first ---------- */
.story .top{display:flex;justify-content:space-between;align-items:flex-end;flex-wrap:wrap;gap:12px 24px}
.legend{display:flex;gap:22px;font-size:14px;color:var(--mist)}
.legend i{display:inline-block;width:26px;border-top:2.5px solid var(--ink);vertical-align:middle;margin-right:8px}
.legend i.s{border-color:var(--gold)}
.stops{position:relative;margin-top:28px;max-width:640px}
.stops::before{content:'';position:absolute;left:9px;top:8px;bottom:30px;width:2.5px;background:var(--ink);border-radius:2px}
.stops li{position:relative;padding:0 0 24px 40px}
.stops b{display:block;font:700 18px/1.25 var(--display)}
.stops span{display:block;color:var(--mist);font-size:15px;line-height:1.4;margin-top:3px}
.stops li::before{content:'';position:absolute;left:2px;top:4px;width:16px;height:16px;border-radius:50%;background:var(--bg);border:2.5px solid var(--ink)}
.stops li[data-t="side"]{padding-left:66px}
.stops li[data-t="side"]::before{left:28px;border-color:var(--gold)}
.stops li[data-t="side"]::after{content:'';position:absolute;left:10px;top:-16px;width:18px;height:27px;border-left:2px solid var(--gold);border-bottom:2px solid var(--gold);border-bottom-left-radius:16px}

/* ...then the map, on screens wide enough for it */
html.js .story .map,html.js .story .detail{display:none}
html.js .story .hints{margin-top:8px}
html.js .story .mapkeys{display:none}
.map .nd{cursor:pointer}
.map text{font-family:var(--display);fill:var(--ink);font-size:16px;font-weight:700}
.map text.y{font-family:var(--text);fill:var(--mist);font-size:13px;font-weight:400}
html.js .map .dot,html.js .map .ring{transform-box:fill-box;transform-origin:center;transition:transform .2s ease,opacity .2s ease}
html.js .map .ring{opacity:0}
html.js .map .sel .ring{opacity:1;transform:scale(1.25)}
html.js .map .sel .dot{transform:scale(1.5)}
html.js .map .main.sel .dot{fill:var(--ink)}
html.js .map .side.sel .dot{fill:var(--gold)}
.detail h3{font:900 clamp(40px,4.6vw,68px)/1 var(--display);letter-spacing:-.03em;margin-bottom:10px}
.detail .meta{font-size:16px;color:var(--mist);margin-bottom:8px}
.detail .meta b{color:var(--gold);font-weight:500}
.detail .d{font-size:18px;max-width:38em}
@media (min-width:1000px){
  html.js .story{display:grid;grid-template-rows:auto minmax(240px,1fr) auto auto;padding:104px 0 26px}
  html.js .story .top{padding:0 var(--pad)}
  html.js .story .stops{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  html.js .story .map{display:block;width:100%;height:0;min-height:100%}
  html.js .story .detail{display:block;padding:0 var(--pad);min-height:168px}
  html.js .story .hints{padding:0 var(--pad);justify-content:flex-end;margin-top:0}
  html.js .story .mapkeys{display:inline-flex}
}

/* short laptop windows: keep each screen to one window */
@media (min-width:721px) and (max-height:760px){
  html.js .plist h3{font-size:clamp(44px,5.6vw,76px)}
  html.js .lib .row{height:124px}
}
@media (min-width:1000px) and (max-height:760px){
  html.js .story .detail{min-height:128px}
  .detail h3{font-size:40px}
}

/* ---------- 5. contact ---------- */
.contact{display:grid;align-content:center}
.contact .big{margin-top:22px}
.contact .big a{font:900 clamp(30px,6vw,92px)/1.05 var(--display);letter-spacing:-.03em;text-decoration:none;overflow-wrap:anywhere}
.contact .big a:hover{text-decoration:underline;text-underline-offset:.12em;text-decoration-thickness:.06em}
.elsewhere{display:flex;flex-wrap:wrap;gap:12px 28px;margin-top:30px;font:500 22px/1.2 var(--display)}
.elsewhere a{text-underline-offset:6px}
.where{color:var(--mist);font-size:14px;margin-top:44px}
.counted{color:var(--mist);font-size:13px;margin-top:6px}

/* ---------- project write-ups ---------- */
.article{max-width:44rem;margin:0 auto;padding:128px 24px 96px}
.article .back{color:var(--mist);font-size:15px;text-underline-offset:4px}
.article h1{font:900 clamp(44px,7vw,84px)/1 var(--display);letter-spacing:-.03em;margin:18px 0 14px}
.article .lede{font:500 22px/1.4 var(--display);margin-bottom:8px}
.article h2{font:700 24px/1.2 var(--display);margin:40px 0 10px}
.article p{line-height:1.65;margin-bottom:14px}
.article ul{list-style:disc;padding-left:1.2em;margin-bottom:14px}
.article li{line-height:1.6;margin-bottom:6px}
.article figure{margin:30px 0 0}
.article figure img{display:block;width:100%;height:auto;border-radius:16px;border:1px solid var(--line)}
.article .acts{display:flex;flex-wrap:wrap;align-items:center;gap:16px 26px;margin-top:36px}
.article .acts .txt{text-underline-offset:5px}

/* ---------- the hidden extra ---------- */
.heat{position:absolute;left:0;top:0;z-index:60;cursor:pointer}
.heat-note{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);z-index:61;display:flex;align-items:center;gap:14px;max-width:calc(100% - 32px);background:var(--ink);color:var(--bg);border-radius:999px;padding:10px 12px 10px 20px;font:600 15px/1.25 var(--text)}
.heat-note button{appearance:none;border:0;border-radius:999px;background:var(--bg);color:var(--ink);padding:9px 14px;font:600 14px/1 var(--text);cursor:pointer;flex:none}

/* ---------- movement ---------- */
@keyframes breathe{50%{opacity:.7}}
@keyframes rise{to{opacity:1;transform:none}}
@keyframes pulse{50%{opacity:.4}}
@media (min-width:721px){
  html.js{scroll-snap-type:y proximity}
  html.js .scr{scroll-snap-align:start}
}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  html.js .intro .in{animation:none;opacity:1;transform:none}
  html.js .intro .glow,html.js .intro .down{animation:none}
  .intro figure .f{transition:none;transform:none}
  html.js .lib .art,html.js .lib .row button,html.js .map .dot,html.js .map .ring{transition:none}
}

/* ---------- phones ---------- */
@media (max-width:720px){
  :root{--pad:18px}
  .bar{padding:14px var(--pad) 22px}
  .tabs{gap:18px}
  .tabs a{font-size:15px}
  .me .who{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .me img{width:34px;height:34px}
  .scr{padding:92px var(--pad) 48px}
  html.js .hints{display:none}
  .intro{grid-template-columns:minmax(0,1fr);align-items:start;align-content:start;gap:24px}
  .intro .glow{background:radial-gradient(520px 430px at 30% 26%,rgba(46,88,255,.42),rgba(46,88,255,0) 64%)}
  .intro h1{font-size:56px;margin-bottom:18px}
  .intro .bio{font-size:18px}
  .intro .what{grid-template-columns:minmax(0,1fr);gap:16px;margin-top:26px}
  .intro .acts{margin-top:28px}
  .intro figure{order:-1;justify-self:start;width:52%}
  .intro figure .f{border-radius:22px;transform:none}
  html.js .lib{padding:84px 0 0;min-height:0}
  html.js .lib .art,html.js .lib .shade{display:none}
  html.js .plist .shot{display:block;width:100%;aspect-ratio:16/10;object-fit:cover;object-position:left top;border-radius:16px;border:1px solid var(--line);margin-bottom:20px}
  html.js .lib .row{gap:10px;height:112px}
  html.js .lib .row button{width:60px;height:60px;border-radius:14px}
  html.js .lib .row button[aria-pressed="true"]{width:84px;height:84px;border-radius:20px}
  html.js .lib .art{inset:0}
  html.js .lib .art.on{opacity:.36}
  html.js .lib .shade{background:linear-gradient(0deg,var(--bg) 26%,rgba(3,7,18,.15) 72%),linear-gradient(180deg,var(--bg) 12%,rgba(3,7,18,0) 40%)}
  html.js .plist{align-self:start;padding:14px var(--pad) 44px}
  html.js .plist h3{font-size:clamp(40px,14vw,52px)}
  html.js .plist li > p:not(.links){font-size:19px}
  html.js .plist button.only-js{display:none}
  .skills .cols{grid-template-columns:minmax(0,1fr);gap:34px}
  .skills h3{font-size:36px;margin-bottom:12px}
  .skills li{font-size:18px}
  .elsewhere{font-size:20px}
  .article{padding:104px var(--pad) 64px}
}
