/* Layout: a topographic map sheet as the scene. Name, sentence and sections in a column on the left,
   the head on the right standing on a summit, chat under the head, readings top right. */
:root{
  /* interface scale: 1 up to 1440 px wide, set in layout() for larger monitors */
  --ui:1;
  --paper:#e8ebe3;
  --ink:#18211f;
  --ink-soft:#586661;
  --line:rgba(24,33,31,.30);
  --contour:rgba(134,94,52,.26);
  --contour-index:rgba(134,94,52,.50);
  --accent:#0c6142;
  --head:#f5f6f0;
  /* section sheets: millimetre paper, dot raster, ruled sheet */
  --paper-2:#dfe3d9;
  --display:"Chakra Petch","Helvetica Neue",Arial,sans-serif;
  --mono:"JetBrains Mono",ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;
  /* large headings: weight, tracking and width tuned for the display face */
  --h-weight:700;
  --h-track:-.03em;
  --h-stretch:normal;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --paper:#0f1619;
    --ink:#dde5e0;
    --ink-soft:#8b9b96;
    --line:rgba(221,229,224,.28);
    --contour:rgba(201,164,120,.17);
    --contour-index:rgba(201,164,120,.36);
    --accent:#2fb079;
    --head:#1c282c;
    --paper-2:#141d21;
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --paper:#0f1619;
  --ink:#dde5e0;
  --ink-soft:#8b9b96;
  --line:rgba(221,229,224,.28);
  --contour:rgba(201,164,120,.17);
  --contour-index:rgba(201,164,120,.36);
  --accent:#2fb079;
  --head:#1c282c;
  --paper-2:#141d21;
  color-scheme:dark;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-padding-top:24px}
@media (prefers-reduced-motion:no-preference){ html{scroll-behavior:smooth} }
body{
  position:relative;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--display);
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
button,input{font:inherit;color:inherit}
a{color:inherit}
[hidden]{display:none !important}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

/* the map stays behind the whole page; it fades as the page scrolls (opacity set in the loop) */
#terrain{position:fixed;inset:0;width:100%;height:100%;display:block}
#lens{position:fixed;inset:0;width:100%;height:100%;display:block;pointer-events:none}

/* first screen: its height is locked in layout(), everything in it is placed in page coordinates */
.hero{position:relative;height:100vh;height:100svh}
#head{position:absolute;left:0;top:0;display:block;pointer-events:none}

/* agent trail: the route a question takes across the map to the head */
#trail{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;transition:opacity .9s ease;overflow:visible}
#trail .route{fill:none;stroke:var(--accent);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
#trail .stop{fill:var(--paper);stroke:var(--accent);stroke-width:1.5}
#trail g{transition:opacity .6s ease}
#trail text{font:400 10.5px var(--mono);fill:var(--ink);stroke:var(--paper);stroke-width:4px;paint-order:stroke;stroke-linejoin:round}
#trail text .k{fill:var(--accent)}

/* map-label halo keeps text readable over the contours */
.col,.hud,.chat .out,.links{text-shadow:0 0 3px var(--paper),0 0 7px var(--paper),0 0 12px var(--paper)}

/* left column */
.col{
  position:absolute;left:0;top:0;bottom:0;z-index:2;
  width:min(36vw,calc(520px * var(--ui)));
  padding:40px 0 92px 44px;
  display:flex;flex-direction:column;align-items:flex-start;
  /* the column box spans the full height; only its text takes the pointer, the map shows through elsewhere */
  pointer-events:none;
}
.col h1,.lede,.nav a{pointer-events:auto}
.col h1{font-weight:var(--h-weight);font-stretch:var(--h-stretch);font-size:clamp(56px,7.4vw,calc(120px * var(--ui)));line-height:.86;letter-spacing:var(--h-track)}
.lede{margin-top:24px;font-size:clamp(18px,1.6vw,calc(22px * var(--ui)));line-height:1.3;max-width:20ch}
/* titles under the name: stacked in one grid cell, so the line never changes height; one shows at a time.
   During a change the slices of the scan (main.js) stand in for the titles. */
.roles{list-style:none;padding:0;display:grid;max-width:none;white-space:nowrap}
.roles li{grid-area:1/1}
.roles:not(.ready) li + li{display:none}
.roles.ready li{opacity:0}
.roles.ready li.on,.roles.ready li.fx{opacity:1}
.roles.fx-on li:not(.fx){visibility:hidden}
.roles .fx{position:relative}
.roles .fx span{position:absolute;left:0;top:0;height:100%;display:block}
.nav{margin-top:auto;display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.nav a{
  padding:2px 0;text-decoration:none;
  display:inline-flex;align-items:baseline;gap:14px;
  font-size:clamp(22px,2.1vw,calc(30px * var(--ui)));font-weight:600;letter-spacing:-.015em;
}
.nav a span{font:400 11px var(--mono);color:var(--accent)}
.nav a:hover{color:var(--accent)}

.links{position:absolute;left:44px;bottom:40px;z-index:2;display:flex;gap:20px;font-size:calc(15px * var(--ui));font-weight:600}
.links a{text-decoration:none}
.links a:hover{color:var(--accent)}

/* readings, top right; they stay with the reader */
.hud{position:absolute;top:40px;right:40px;z-index:3;transition:color .3s;text-align:right;font:400 calc(11px * var(--ui))/1.9 var(--mono);color:var(--ink-soft)}
.hud-row{display:flex;gap:22px;align-items:baseline;justify-content:flex-end}
.hud b{font-weight:400;color:var(--ink);font-variant-numeric:tabular-nums}
.toggle{background:none;border:0;cursor:pointer;padding:0;font:600 calc(14px * var(--ui)) var(--display);color:var(--ink);text-shadow:inherit}
.toggle:hover{color:var(--accent)}
.metrics{margin-top:8px}

/* chat under the head; position and width are set in layout() */
.chat{position:absolute;z-index:2;display:grid;gap:10px}
/* fixed height so a long answer never pushes the layout; it scrolls instead */
.chat .out{
  height:calc(66px * var(--ui));overflow-y:auto;
  display:flex;flex-direction:column;
  font-size:calc(16px * var(--ui));line-height:1.4;
}
.chat .out p{margin-top:auto}
.chat form{
  display:flex;align-items:center;gap:12px;
  border-bottom:1px solid var(--ink);
  background:color-mix(in srgb,var(--paper) 86%,transparent);
}
.chat form:focus-within{border-color:var(--accent);box-shadow:0 1px 0 var(--accent)}
.chat input{flex:1;min-width:0;background:none;border:0;outline:0;padding:11px 0;font:400 calc(13px * var(--ui)) var(--mono)}
.chat input::placeholder{color:var(--ink-soft)}
.chat form button{background:none;border:0;cursor:pointer;padding:0;font-size:calc(15px * var(--ui));font-weight:600;white-space:nowrap}
.chat form button:hover{color:var(--accent)}

/* ---------- scrollbar: a map scale bar drawn over the page, no background ----------
   A native scrollbar always paints its own gutter in the page colour, which glows next to the inverted
   contact sheet. With a fine pointer it is hidden and .ruler (main.js) takes its place; touch devices
   keep the native one. Mid tones, so ticks and slider read on light and dark sheets alike. */
:root{--ruler-tick:rgba(128,128,118,.55);--ruler-thumb:#9a7a55}
.ruler{display:none}
@media (hover:hover) and (pointer:fine){
  html{scrollbar-width:none}
  html::-webkit-scrollbar{display:none}
  .ruler{
    display:block;position:fixed;z-index:60;top:0;right:0;bottom:0;width:16px;cursor:default;
    background:
      linear-gradient(var(--ruler-tick),var(--ruler-tick)) center / 1px 100% no-repeat,
      repeating-linear-gradient(to bottom,transparent 0 39px,var(--ruler-tick) 39px 40px) center / 9px 100% no-repeat;
  }
  .ruler-thumb{position:absolute;left:5px;width:6px;top:0;height:40px;background:var(--ruler-thumb);transition:background-color .25s}
  .ruler:hover .ruler-thumb,.ruler.drag .ruler-thumb{background:var(--accent)}
  .ruler.drag{cursor:grabbing}
  html.ruler-drag{user-select:none}
}
/* the chat's own scroll area keeps a small native scrollbar */
.chat .out{scrollbar-width:thin;scrollbar-color:var(--contour-index) transparent}

/* ---------- sections below the first screen ---------- */
/* large monitors: the sections scale as one drawing, so proportions stay as designed at 1440 px */
.sections{position:relative;z-index:2;zoom:var(--ui)}
/* each section is a full-width sheet of its own; content keeps a readable width */
.sec{padding:16vh 44px 14vh;color:var(--ink);padding-inline:max(44px, calc((100% - 1180px) / 2))}
.sec > *{max-width:1180px}
.sec-head{display:flex;align-items:baseline;gap:22px;margin-bottom:56px}
.sec-head .num{font:400 12px var(--mono);color:var(--accent)}
.sec h2{font-weight:var(--h-weight);font-stretch:var(--h-stretch);font-size:clamp(48px,7vw,104px);line-height:.9;letter-spacing:var(--h-track)}
.sec p,.sec li,.sec dd{font-size:18px;line-height:1.5}
.sec a{color:var(--accent);text-underline-offset:3px}

/* 01: text and the skills radar */
.about{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:64px;align-items:center}
.sec .big-lede{font-size:clamp(24px,2.4vw,34px);line-height:1.2;letter-spacing:-.015em;margin-bottom:22px}
.about-text p:not(.big-lede){max-width:44ch}
.also{margin-top:36px;display:grid;gap:10px;max-width:52ch}
.also div{display:grid;grid-template-columns:90px minmax(0,1fr);gap:16px;align-items:baseline;padding-top:10px;border-top:1px solid var(--line)}
.also dt{font:400 11px var(--mono);color:var(--ink-soft)}
.sec .also dd{font-size:15px;color:var(--ink-soft)}

/* ---------- drawing sheets laid on top of each other ----------
   Static: each sheet lies over the bottom of the one before, its top edge cut at its own angle, with a
   soft shadow only where it rests on the sheet below. The paper and its pattern live in ::before, which
   carries the angled clip; the section itself carries the shadow, so the shadow follows the cut edge
   (a clip on the same element would cut the shadow away). Text sits on opaque paper, so it casts none. */
/* depth in two layers, like a thick sheet lying on another: a short dark contact shadow right at the edge
   and a wide soft one further out; both follow the angled cut and fade out, no line anywhere */
:root{--sheet-contact:rgba(24,33,31,.22);--sheet-shadow:rgba(24,33,31,.11)}
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]){--sheet-contact:rgba(0,0,0,.6);--sheet-shadow:rgba(0,0,0,.42)} }
:root[data-theme="dark"]{--sheet-contact:rgba(0,0,0,.6);--sheet-shadow:rgba(0,0,0,.42)}
.sec{
  position:relative;isolation:isolate;
  margin-top:calc(-1 * var(--lap));
  /* the sections are zoomed by --ui, so viewport units are divided back to keep the same air */
  padding-top:calc(16vh / var(--ui) + var(--lap));
  /* room for the next sheet, whose angled edge lies over this one */
  padding-bottom:calc(14vh / var(--ui) + var(--next-lap, 0px));
  filter:drop-shadow(0 -2px 2.5px var(--sheet-contact)) drop-shadow(0 -10px 30px var(--sheet-shadow));
}
.sec{--sheet:var(--paper)}
.sec::before{
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background-color:var(--sheet);
  clip-path:polygon(0 var(--edge-l),100% var(--edge-r),100% 100%,0 100%);
}
/* the first sheet lies on the map: its cut shows the terrain, it does not cover the chat */
#o-mne{--lap:0px;--edge-l:0px;--edge-r:110px;--next-lap:110px}
#projekty{--lap:110px;--edge-l:110px;--edge-r:10px;--next-lap:90px}
#skusenosti{--lap:90px;--edge-l:10px;--edge-r:90px;--next-lap:120px}
#kontakt{--lap:120px;--edge-l:120px;--edge-r:12px}
/* 01 millimetre paper like an architect's drawing sheet, the other sheets plain; 02 a shade darker */
#o-mne{--grid:color-mix(in srgb,var(--accent) 4%,transparent);--grid-major:color-mix(in srgb,var(--accent) 9%,transparent)}
#o-mne::before{
  background-image:
    linear-gradient(var(--grid-major) 1px,transparent 1px),
    linear-gradient(90deg,var(--grid-major) 1px,transparent 1px),
    linear-gradient(var(--grid) 1px,transparent 1px),
    linear-gradient(90deg,var(--grid) 1px,transparent 1px);
  background-size:40px 40px,40px 40px,8px 8px,8px 8px;
  background-position:-1px -1px;
}
#projekty{--sheet:var(--paper-2)}
/* 04 and the footer: the sheet turns over, light on dark by day and dark on light at night */
#kontakt,.foot{--paper:#18211f;--ink:#e8ebe3;--ink-soft:#8b9b96;--line:rgba(221,229,224,.28);--accent:#2fb079}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) #kontakt,:root:not([data-theme="light"]) .foot{--paper:#dde5e0;--ink:#0f1619;--ink-soft:#586661;--line:rgba(24,33,31,.30);--accent:#0c6142}
}
:root[data-theme="dark"] #kontakt,:root[data-theme="dark"] .foot{--paper:#dde5e0;--ink:#0f1619;--ink-soft:#586661;--line:rgba(24,33,31,.30);--accent:#0c6142}
.foot{position:relative;background:var(--paper)}
@media (max-width:719px){
  .sec{padding-top:calc(12vh + var(--lap))}
  #projekty{--lap:56px;--edge-l:56px;--edge-r:6px;--next-lap:46px}
  #skusenosti{--lap:46px;--edge-l:6px;--edge-r:46px;--next-lap:60px}
  #kontakt{--lap:60px;--edge-l:60px;--edge-r:8px}
  #o-mne{--edge-r:56px;--next-lap:56px}
  .sec{padding-bottom:calc(10vh + var(--next-lap, 0px))}
}

/* 02: side projects, screenshots pinned to the sheet with a strip of tape */
.sec .side-intro{font-size:clamp(20px,2vw,26px);line-height:1.35;max-width:36ch;margin-bottom:88px}
.project{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:64px;align-items:center;margin-bottom:120px}
/* crop marks at each project's corners, like a printed sheet before trimming: short hairlines on the
   extension of each edge, kept --crop-gap away from the corner itself */
.project{position:relative;--crop:30px;--crop-gap:8px;--crop-len:calc(var(--crop) - var(--crop-gap));--mark:color-mix(in srgb,var(--ink) 40%,transparent)}
.project::before{
  content:"";position:absolute;inset:calc(-1 * var(--crop));pointer-events:none;
  background-image:
    linear-gradient(var(--mark),var(--mark)),linear-gradient(var(--mark),var(--mark)),
    linear-gradient(var(--mark),var(--mark)),linear-gradient(var(--mark),var(--mark)),
    linear-gradient(var(--mark),var(--mark)),linear-gradient(var(--mark),var(--mark)),
    linear-gradient(var(--mark),var(--mark)),linear-gradient(var(--mark),var(--mark));
  background-repeat:no-repeat;
  background-size:
    var(--crop-len) 1px,1px var(--crop-len),var(--crop-len) 1px,1px var(--crop-len),
    var(--crop-len) 1px,1px var(--crop-len),var(--crop-len) 1px,1px var(--crop-len);
  background-position:
    left 0 top var(--crop),left var(--crop) top 0,
    right 0 top var(--crop),right var(--crop) top 0,
    left 0 bottom var(--crop),left var(--crop) bottom 0,
    right 0 bottom var(--crop),right var(--crop) bottom 0;
}
.project-flip .shots{order:2}
/* devices: the browser capture sits in a monitor, the phone capture in a phone */
.shots{position:relative;padding:0 9% 0 0}
.device{position:relative;transition:transform .5s ease}
.project:hover .device{transform:translateY(-6px)}
.device .screen{position:relative;overflow:hidden;background:#000}
.device img{display:block;width:100%;height:auto}
.monitor{padding:2.2% 2.2% 0;background:#151a19;border-radius:10px 10px 0 0;border:1px solid #2c3432;border-bottom:0}
.monitor .screen{aspect-ratio:16/10;border-radius:2px}
.monitor .screen img{height:100%;object-fit:cover;object-position:top left}
/* chin and stand, drawn under the bezel */
.monitor::after{content:"";position:absolute;left:-1px;right:-1px;top:100%;height:22px;background:#1e2423;border:1px solid #2c3432;border-top:0;border-radius:0 0 10px 10px}
.monitor::before{content:"";position:absolute;left:50%;top:calc(100% + 22px);width:16%;height:46px;transform:translateX(-50%);
  background:linear-gradient(#232a29,#2e3735);clip-path:polygon(18% 0,82% 0,100% 82%,100% 100%,0 100%,0 82%)}
.shots:has(.monitor){padding-bottom:76px}
.phone{position:absolute;right:0;bottom:24px;width:23%;padding:2.4% 1.6%;background:#151a19;border-radius:22px;border:1px solid #2c3432}
.phone .screen{aspect-ratio:1/2;border-radius:15px}
/* the phone capture is 420x800 with a 390x780 phone in its top-left corner; the screen shows only the phone */
.phone .screen img{width:110%}
/* camera cut-out */
.phone .screen::before{content:"";position:absolute;z-index:1;top:8px;left:50%;width:28%;height:10px;transform:translateX(-50%);background:#151a19;border-radius:6px}
.project-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;font:400 11px var(--mono);color:var(--ink-soft);margin-bottom:14px}
.project-meta .tag{color:var(--accent);border:1px solid var(--accent);padding:2px 8px}
.project h3{font-weight:var(--h-weight);font-stretch:var(--h-stretch);font-size:clamp(32px,3.6vw,52px);line-height:1;letter-spacing:var(--h-track)}
.sec .project h3 a{color:var(--ink);text-decoration:none}
.sec .project h3 a:hover{color:var(--accent)}
.project h3 span{font-weight:400;font-size:.6em;color:var(--accent)}
.sec .project-sub{margin:10px 0 18px;color:var(--ink-soft)}
.project ul,.job ul{padding-left:1.1em;display:grid;gap:6px}
.sec .project li{font-size:16px}
.sec .more{color:var(--ink-soft)}

/* 03: career profile and the list of jobs */
.profile{margin:0 0 64px}
#profile-svg{display:block;width:100%;height:auto;aspect-ratio:1180/360;overflow:visible;cursor:crosshair}
.profile figcaption{margin-top:10px;font:400 11px var(--mono);color:var(--ink-soft)}
#profile-svg .ground{fill:none;stroke:var(--contour-index);stroke-width:1.5}
#profile-svg .hatch{stroke:var(--contour);stroke-width:1}
#profile-svg .axis{stroke:var(--line);stroke-width:1}
#profile-svg .tick{font:400 10.5px var(--mono);fill:var(--ink-soft)}
#profile-svg .station{fill:var(--paper);stroke:var(--accent);stroke-width:1.5}
#profile-svg .stem{stroke:var(--accent);stroke-width:1;stroke-dasharray:2 3}
#profile-svg .name{font:600 14px var(--display);fill:var(--ink)}
#profile-svg .org{font:400 10.5px var(--mono);fill:var(--ink-soft)}
#profile-svg .study{stroke:var(--ink-soft);stroke-width:1.5;stroke-dasharray:5 4}
#profile-svg .study-label{font:400 10.5px var(--mono);fill:var(--ink-soft)}
#profile-svg text{paint-order:stroke;stroke:var(--paper);stroke-width:4px;stroke-linejoin:round}
#profile-svg .station,#profile-svg .name{transition:fill .25s,r .25s}
#profile-svg .station.on{fill:var(--accent);r:6.5px}
#profile-svg .name.on{fill:var(--accent)}
#profile-svg .scan{transition:opacity .2s;pointer-events:none}
#profile-svg .scan line{stroke:var(--ink);stroke-width:1;stroke-dasharray:3 3}
#profile-svg .scan circle{fill:var(--ink)}
#profile-svg .scan text{font:400 11px var(--mono);fill:var(--ink)}

/* skills radar: the drawing in the middle, each direction labelled in plain HTML around it */
.radar{margin:0}
.radar-grid{display:grid;grid-template-columns:minmax(0,1fr) 230px minmax(0,1fr);grid-template-areas:". n ." "nw svg ne" "sw svg se";gap:14px 18px}
#radar-svg{grid-area:2/2/4/3;align-self:start;display:block;width:100%;height:auto;overflow:visible}
.dir{transition:opacity .35s}
.dir.n{grid-area:n;text-align:center;align-self:end;justify-self:center;width:min(100%,340px)}
.dir.ne{grid-area:ne;align-self:start}
.dir.se{grid-area:se;align-self:end}
.dir.nw{grid-area:nw;text-align:right;align-self:start}
.dir.sw{grid-area:sw;text-align:right;align-self:end}
.dir h3{font-weight:600;font-size:16px;transition:color .3s}
.dir .yrs{display:block;font:400 11px var(--mono);color:var(--accent);margin-top:2px}
.dir.past .yrs{color:var(--ink-soft)}
.sec .dir p{font-size:13.5px;line-height:1.45;color:var(--ink-soft);margin-top:3px}
.radar.focus .dir:not(.on){opacity:.35}
.dir.on h3{color:var(--accent)}
#radar-svg .ring{fill:none;stroke:var(--contour);stroke-width:1}
#radar-svg .ring.outer{stroke:var(--contour-index)}
#radar-svg .ring-label{font:400 9.5px var(--mono);fill:var(--ink-soft)}
#radar-svg .axis{stroke:var(--line);stroke-width:1;transition:stroke .3s}
#radar-svg .axis.on{stroke:var(--accent)}
#radar-svg .shape{transform-box:view-box;transform:scale(0);transition:transform 1.6s cubic-bezier(.2,.7,.2,1) .2s}
.radar.in #radar-svg .shape{transform:none}
#radar-svg .area{fill:color-mix(in srgb,var(--accent) 20%,transparent);stroke:var(--accent);stroke-width:1.5;stroke-linejoin:round}
#radar-svg .vertex{fill:var(--paper);stroke:var(--accent);stroke-width:1.5;transition:fill .25s,r .25s}
#radar-svg .vertex.past{stroke:var(--ink-soft)}
#radar-svg .vertex.on{fill:var(--accent);r:5.5px}
#radar-svg .hit{stroke:transparent;stroke-width:28;cursor:pointer}
.radar figcaption{margin-top:22px;font:400 11px/1.5 var(--mono);color:var(--ink-soft);text-align:center}
/* below ~1200 px the column beside the text is too narrow for the side labels: stack text and radar */
@media (max-width:1199px){ .about{grid-template-columns:minmax(0,1fr);gap:56px} .radar{max-width:760px} }
/* the job under the reading line in the profile */
.job{transition:background-color .3s}
.job.hl{background-color:color-mix(in srgb,var(--accent) 8%,transparent)}
.job.hl h3{color:var(--accent)}
.jobs{list-style:none;display:grid}
.job{display:grid;grid-template-columns:200px minmax(0,1fr);gap:24px;padding:24px 0;border-top:1px solid var(--line)}
.job .when{font:400 12px var(--mono);color:var(--ink-soft);padding-top:6px}
.job h3{font-weight:600;font-size:24px;letter-spacing:-.01em}
.job .org{color:var(--ink-soft);margin:2px 0 12px;font-size:16px}
.job.study h3{font-weight:400}
.job li{max-width:70ch}

/* 04: contact */
.sec .mail{display:inline-block;font-weight:var(--h-weight);font-stretch:var(--h-stretch);font-size:clamp(28px,5.4vw,80px);letter-spacing:var(--h-track);line-height:1;color:var(--ink);text-decoration:none;overflow-wrap:anywhere}
.sec .mail:hover{color:var(--accent)}
.contact{display:grid;gap:12px;margin-top:40px;max-width:640px}
.contact div{display:grid;grid-template-columns:120px minmax(0,1fr);gap:16px;align-items:baseline;padding-top:12px;border-top:1px solid var(--line)}
.contact dt{font:400 11px var(--mono);color:var(--ink-soft)}
.coord{display:block;font:400 12px var(--mono);color:var(--ink-soft);margin-top:4px}
.foot{padding:4vh 44px 40px;font:400 11px var(--mono);color:var(--ink-soft)}

/* sections appear once, slowly, as they come into view */
.reveal{opacity:0;transform:translateY(18px);transition:opacity .9s ease,transform .9s ease}
.reveal.in{opacity:1;transform:none}

.boot>*{animation:boot .7s ease both}
.boot>:nth-child(2){animation-delay:.12s}
.boot>:nth-child(3){animation-delay:.24s}
/* with the loader the column waits under the sheet and comes in as the sheet lifts past it */
.js:not(.ready) .boot>*{animation:none;opacity:0}
.js.ready .boot>*{animation-delay:.55s}
.js.ready .boot>:nth-child(2){animation-delay:.67s}
.js.ready .boot>:nth-child(3){animation-delay:.79s}
@keyframes boot{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* ---------- loader: a sheet over the page that lists what is really loading, then lifts off ----------
   Only with JavaScript (.js on <html>); without it the page shows as it is. The sheet is taller than the
   window and its bottom edge is cut at an angle, so it leaves like the section sheets, with their shadow. */
.loader{display:none}
.js .loader{
  display:block;position:fixed;z-index:100;left:0;right:0;top:0;height:calc(100vh + 120px);
  filter:drop-shadow(0 2px 2.5px var(--sheet-contact)) drop-shadow(0 10px 30px var(--sheet-shadow));
  transition:transform 1.1s cubic-bezier(.7,0,.25,1);
}
.loader.lift{transform:translateY(calc(-100% - 60px));pointer-events:none}
.loader-sheet{position:absolute;inset:0;background:var(--paper);clip-path:polygon(0 0,100% 0,100% calc(100% - 120px),0 100%)}
.loader-box{
  position:absolute;left:50%;top:50vh;transform:translate(-50%,-50%);width:min(320px,calc(100vw - 40px));
  font:400 11px/1.9 var(--mono);color:var(--ink-soft);
}
.loader-head{display:flex;justify-content:space-between;margin-bottom:4px}
.loader-head b{font-weight:400;color:var(--ink);font-variant-numeric:tabular-nums}
/* the progress runs along a scale bar, the same ruler as the scrollbar, laid flat */
.loader-scale{
  position:relative;height:13px;margin-bottom:14px;
  background:
    linear-gradient(var(--ruler-tick),var(--ruler-tick)) 0 50% / 100% 1px no-repeat,
    repeating-linear-gradient(90deg,var(--ruler-tick) 0 1px,transparent 1px 8px) 0 50% / 100% 5px no-repeat,
    repeating-linear-gradient(90deg,var(--ruler-tick) 0 1px,transparent 1px 40px) 0 50% / 100% 13px no-repeat;
}
.loader-scale i{position:absolute;left:0;top:50%;width:0;height:3px;margin-top:-1.5px;background:var(--accent);transition:width .45s ease}
.loader-rows div{display:flex;justify-content:space-between;gap:16px}
.loader-rows dd{font-variant-numeric:tabular-nums;white-space:nowrap}
.loader-rows .ok dt,.loader-rows .ok dd{color:var(--ink)}
/* no scrolling underneath while the sheet is down */
html.js:not(.ready){overflow:hidden}

/* phones: the first screen is name, head, chat and links; the sections follow below */
@media (max-width:719px){
  .col{right:0;bottom:auto;width:auto;padding:24px 20px 0}
  .col h1{font-size:34px;line-height:1;letter-spacing:var(--h-track)}
  .col h1 br{display:none}
  .lede{margin-top:8px;font-size:16px;max-width:24ch}
  .nav,.metrics{display:none}
  .hud{position:absolute;top:30px;right:20px}
  .hud-row{gap:16px}
  .chat .out{font-size:15px}
  /* iOS zooms into inputs with text smaller than 16px */
  .chat input{font-size:16px}
  .links{left:20px;right:20px;bottom:18px;justify-content:space-between}
  .sec{padding-left:20px;padding-right:20px}
  .foot{padding:4vh 20px 32px}
  .project{grid-template-columns:minmax(0,1fr);gap:28px;margin-bottom:80px;--crop:14px;--crop-gap:5px}
  .project-flip .shots{order:0}
  .sec .side-intro{margin-bottom:56px}
  .sec-head{margin-bottom:32px;gap:14px}
  .sec p,.sec li,.sec dd{font-size:16px}
  .about{grid-template-columns:minmax(0,1fr);gap:56px}
  .also div{grid-template-columns:minmax(0,1fr);gap:2px}
  .radar-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:"svg svg" "n ne" "nw se" "sw .";gap:20px 18px}
  #radar-svg{grid-area:svg;max-width:230px;justify-self:center;margin-bottom:8px}
  .dir.n,.dir.ne,.dir.se,.dir.nw,.dir.sw{text-align:left;justify-self:stretch;align-self:start;width:auto}
  .radar figcaption{text-align:left}
  .job{grid-template-columns:minmax(0,1fr);gap:6px}
  .contact div{grid-template-columns:minmax(0,1fr);gap:2px}
  #profile-svg{aspect-ratio:auto;height:300px}
}
@media (max-width:380px){
  .col h1{font-size:30px}
}
@media (prefers-reduced-motion:reduce){
  .boot>*,.js.ready .boot>*{animation:none;opacity:1}
  .js .loader{transition:opacity .4s ease}
  .loader.lift{transform:none;opacity:0}
  .reveal{opacity:1;transform:none;transition:none}
  .roles.ready li{transition:opacity .6s ease}
  .roles.ready li.on{transition-delay:.6s}
  #radar-svg .shape{transform:none;transition:none}
}
