/* The sky is the page. One fixed WebGL canvas rendered at 1 CSS px with no anti-aliasing;
   one text column on the left (a line of page links, bio, ledger, contact links) and body labels are the only HTML.
   The writings and projects pages share the column's first line and have no sky. White paper, black ink, Times. */
:root{
  color-scheme:light;
  --bg:#fff;
  --fg:#000;
  --mute:#5a5a5a;
  --dim:#8c8c8c;
  --font:"Times New Roman",Times,"Nimbus Roman",serif;
}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--fg);font:15px/1.45 var(--font);overflow:hidden}
#sky{position:fixed;inset:0;width:100%;height:100%;display:block;touch-action:none;cursor:crosshair;background:var(--bg);image-rendering:pixelated;image-rendering:crisp-edges}
.top{position:fixed;left:0;right:0;top:env(safe-area-inset-top,0px);
  padding-block:22px;padding-left:max(24px,env(safe-area-inset-left,0px));padding-right:max(24px,env(safe-area-inset-right,0px));pointer-events:none;z-index:3}
.top a{pointer-events:auto}
.who{min-width:0;max-width:420px}
h1{font:inherit;margin:0}
/* the column: a line of page links, the bio, the ledger, the contact links, one blank line apart.
   The page being read is the one word in the first line that is not a link. Slashes are grey. */
.nav,.links{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 6px}
.nav .s,.links .s{color:var(--mute)}
.bio{margin:1.45em 0 0}
/* a two-column ledger: grey key, black entries, the second entry hung under the first */
.ledger{display:grid;grid-template-columns:auto 1fr;column-gap:12px;margin-top:1.45em}
.ledger .k{color:var(--mute)}
.links{margin-top:1.45em}
/* a plain list of links, for the writings page */
.list{margin:1.45em 0 0;padding:0;list-style:none}
/* the clock sits in the bottom-left corner, on the same gutter as the column */
.clock{position:fixed;left:max(24px,env(safe-area-inset-left,0px));bottom:max(22px,env(safe-area-inset-bottom,0px));margin:0;
  color:var(--mute);font-size:15px;line-height:1.45;font-variant-numeric:tabular-nums;max-width:34ch;pointer-events:none;z-index:3}
/* the thickness is spelled out: left to the font it comes to a fraction of a pixel, and lines round it differently */
.top a{color:var(--fg);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}
.top a:hover,.top a:focus-visible{color:var(--mute);outline:none}
/* pages without a sky: the header takes input like any text. The writings page scrolls; the projects page is a fixed desk of windows. */
.plain .top,.desk .top{pointer-events:auto}
.plain{overflow:auto}
.plain .top{position:static}
#layer{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:2}
.lbl{position:absolute;left:0;top:0;transform:translate(-1000px,-1000px);background:none;border:0;padding:2px 4px;margin:0;color:var(--mute);
  font:15px var(--font);cursor:pointer;pointer-events:auto;will-change:transform;white-space:nowrap;line-height:1;text-transform:lowercase}
.lbl.moon{color:var(--dim)}
.lbl:hover,.lbl.on{color:var(--fg)}
.lbl:focus-visible{outline:1px solid var(--mute);outline-offset:2px}
/* windows: thin black box above the sky, moved by dragging anywhere on it, resized from any corner.
   Every corner resizes and none is marked while the window is open. Dragged to zero width or height the box becomes a line
   ending in a small L caret; to both, only a short diagonal remains, the handle to pull it open again. */
.win{position:fixed;left:0;top:0;z-index:10;box-sizing:border-box;border:1px solid var(--fg);background:var(--bg);cursor:move;touch-action:none;user-select:none;will-change:transform}
.win-body{position:absolute;inset:0;overflow:hidden}
/* a porthole's page: viewport-sized, counter-translated by win.js so it never moves; it takes no input */
.win-view{position:absolute;left:0;top:0;width:100vw;height:100vh;border:0;background:var(--bg);pointer-events:none}
.win-tag{position:absolute;left:-1px;bottom:100%;margin-bottom:3px;color:var(--mute);font:15px var(--font);line-height:1;white-space:nowrap;
  text-transform:lowercase;text-decoration:none;cursor:pointer;z-index:2}
.win-tag:hover,.win-tag:focus-visible{color:var(--fg);outline:none}
/* a label's note: real text, kept off screen (but readable by screen readers and find-in-page) until the label is hovered or focused,
   then it runs on after the label in grey italics, keeping its own capitals */
.win-note{margin-left:8px;color:var(--mute);text-transform:none;font-style:italic}
/* only where there is hover to reveal it; on touch screens the note simply stays out */
@media (hover:hover){.win-tag:not(:hover):not(:focus-visible) .win-note{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}}
/* four corner handles, 16px square, centred a little outside each corner. Only the bottom-right one is drawn. */
.win-grab{position:absolute;width:16px;height:16px;z-index:1}
.win-grab.nw{left:-7px;top:-7px;cursor:nwse-resize}      .win-grab.ne{right:-7px;top:-7px;cursor:nesw-resize}
.win-grab.se{right:-7px;bottom:-7px;cursor:nwse-resize}  .win-grab.sw{left:-7px;bottom:-7px;cursor:nesw-resize}
.win-grab.se::after{content:"";position:absolute;right:3px;bottom:3px;width:5px;height:5px;border-right:1px solid var(--fg);border-bottom:1px solid var(--fg)}
/* the caret is drawn only once the window has collapsed; an open window's corners carry no mark */
.win:not(.flat-x):not(.flat-y) .win-grab.se::after{display:none}
.win.flat-x{border-right:0}   .win.flat-y{border-bottom:0}
.win.flat-x .win-body,.win.flat-y .win-body{display:none}
/* collapsed, only the caret's handle remains */
.win.flat-x .win-grab:not(.se),.win.flat-y .win-grab:not(.se){display:none}
/* on a line the caret's corner is the line's last pixel. The offsets differ by one because the flat axis has lost
   its far border while the other axis still has it. */
.win.flat-x .win-grab.se::after{right:7px;bottom:6px}
.win.flat-y .win-grab.se::after{right:6px;bottom:7px}
/* fully closed: a short diagonal whose first pixel is the point the window collapsed to, running down and to the
   right, the way the caret's corner sits. One rect per pixel so it stays a hard staircase at any pixel density. */
.win.flat-x.flat-y{border:0;background:none}
.win.flat-x.flat-y .win-grab.se::after{left:9px;top:9px;right:auto;bottom:auto;width:7px;height:7px;border:0;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 7' shape-rendering='crispEdges'%3E%3Crect x='0' y='0' width='1' height='1'/%3E%3Crect x='1' y='1' width='1' height='1'/%3E%3Crect x='2' y='2' width='1' height='1'/%3E%3Crect x='3' y='3' width='1' height='1'/%3E%3Crect x='4' y='4' width='1' height='1'/%3E%3Crect x='5' y='5' width='1' height='1'/%3E%3Crect x='6' y='6' width='1' height='1'/%3E%3C/svg%3E") no-repeat}
[hidden]{display:none!important}
@media (max-width:520px){.top{padding-block:16px}.clock{bottom:max(16px,env(safe-area-inset-bottom,0px))}}
