/* sethkherman.com: AntiPositron blue (Seth, 2026-11-15). Cool black, cool white, ElectricBlue #00C2FF. */
:root {
    --ground: #07090c;
    --ground-2: #0d1117;
    --surface: #0f1217;
    --surface-2: #161a21;
    --line: #252b35;
    --text: #f2f6fa;
    --dim: #9aa7b4;
    --faint: #5d6875;
    --accent: #00c2ff;
    --accent-glow: rgba(0, 194, 255, .45);
    --err: #ff5a5a;
    --glow: #7fe3ff;
    --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
    --sans: "IBM Plex Sans", system-ui, "Segoe UI", sans-serif;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --orb: 58px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
    background: var(--ground);
    color: var(--text);
    font: 15px/1.5 var(--mono);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
a { color: var(--glow); }
::selection { background: var(--accent); color: #00131c; }

/* ---------- stage: the 3D room and the device, left up as the frame the screen sits in ---------- */
#stage {
    position: fixed; inset: 0; z-index: 0;
    background: #030407;
}
#stage canvas { display: block; width: 100%; height: 100%; }
/* No WebGL: a plain device drawn in CSS. */
body.flat #stage { background: radial-gradient(120% 90% at 50% 40%, #11151b, #030407); }
body.flat #screen { box-shadow: 0 0 0 1px #2a313b, 0 0 0 14px #14171c, 0 30px 80px rgba(0,0,0,.6); }

#skip {
    position: fixed; right: 18px; bottom: 18px; z-index: 60;
    background: rgba(9, 11, 15, .7); border: 1px solid var(--line);
    color: var(--dim); padding: 8px 14px; border-radius: 999px;
    cursor: pointer; letter-spacing: .04em; font-size: 13px;
    backdrop-filter: blur(6px);
}
#skip:hover { color: var(--text); border-color: var(--dim); }

/* ---------- the screen: placed by script exactly over the device's own (js/device3d.js) ---------- */
#screen {
    position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; z-index: 2;
    background: radial-gradient(120% 90% at 50% 40%, var(--ground-2), var(--ground) 70%);
    overflow: hidden;
    container-type: size;    /* everything inside sizes itself to the screen, not the browser window */
}
body.booting #screen { opacity: 0; }
body.on-screen #screen { opacity: 1; transition: opacity .35s ease; }

.crt {
    pointer-events: none; position: absolute; inset: 0; z-index: 15;  /* under the windows and photos: they display clean (Seth) */
    background:
        repeating-linear-gradient(0deg, rgba(0,0,0,.16) 0 1px, transparent 1px 3px),
        radial-gradient(130% 100% at 50% 50%, transparent 62%, rgba(0,0,0,.55));
    mix-blend-mode: multiply;
}

/* ---------- boot logo ---------- */
#boot {
    position: absolute; inset: 0; z-index: 30;
    display: grid; place-items: center; pointer-events: none;
}
#boot .logo {
    position: relative;
    width: min(54cqw, 54cqh, 360px); aspect-ratio: 1;
}
#boot .logo i {
    position: absolute; background: var(--accent);
    box-shadow: 0 0 18px var(--accent-glow);
}

/* ---------- terminal ---------- */
#term {
    position: absolute; inset: 0; z-index: 10;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 18px clamp(12px, 3cqw, 40px) 16px;
}
#out {
    overflow-y: auto; overflow-x: hidden;
    scrollbar-width: thin; scrollbar-color: var(--line) transparent;
    white-space: pre-wrap; word-break: break-word;
    max-width: 980px; width: 100%;
}
#out .l { min-height: 1.5em; }
#out .cmd .p { color: var(--accent); }
#out .cmd .d { color: var(--glow); }
#out .dim { color: var(--dim); }
#out .faint { color: var(--faint); }
#out .hi { color: var(--glow); }
#out .err { color: var(--err); }
#out .ok { color: var(--text); }
#out .ok::before { content: "✓ "; color: var(--accent); }
#out .net { color: var(--dim); }
#out .net b { color: var(--text); font-weight: 500; }
#out .art { color: var(--accent); line-height: 1.1; }
#out a { color: var(--glow); }
#out .go { color: var(--glow); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }

#line {
    display: flex; gap: .6ch; max-width: 980px; width: 100%;
    opacity: 0; transition: opacity .3s;
}
body.ready #line { opacity: 1; }
#prompt { color: var(--accent); white-space: nowrap; }
#prompt .d { color: var(--glow); }
#cmd {
    flex: 1; min-width: 0; background: none; border: 0; outline: 0;
    color: var(--text); font: inherit; caret-color: var(--accent); padding: 0;
}
#line.busy #cmd { caret-color: transparent; }

/* ---------- windows ---------- */
#win {
    position: absolute; z-index: 20;
    left: 50%; top: clamp(8px, 4cqh, 48px);
    width: min(920px, calc(100cqw - 20px));
    max-height: calc(100cqh - 110px);
    transform: translateX(-50%);
    transition: max-height .3s var(--ease), width .3s var(--ease), top .3s var(--ease);
    display: flex; flex-direction: column;
    background: rgba(13, 16, 21, .94);
    border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.02) inset;
    backdrop-filter: blur(10px);
}
#win[hidden] { display: none; }
#win.open { animation: winIn .32s var(--ease); }
@keyframes winIn {
    from { opacity: 0; transform: translateX(-50%) translateY(14px) scale(.985); }
}
/* Minimized: only the bar shows, tucked at the bottom of the screen; a tap brings it back.
   Maximized: the window takes the whole screen. */
#win.min { top: auto; bottom: 10px; max-height: 46px; overflow: hidden; cursor: pointer; }
#win.min #win-body { display: none; }
#win.max { top: 0; width: 100cqw; max-height: 100cqh; height: 100cqh; border-radius: 0; }

.win-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 14px 8px 12px; border-bottom: 1px solid var(--line);
    font-size: 13px; color: var(--dim);
}
/* The three dots are real: close, minimize, maximize. Each shows its symbol on hover. */
.win-dots { display: flex; gap: 7px; }
.win-dots button {
    position: relative; width: 13px; height: 13px; padding: 0; border-radius: 50%; cursor: pointer;
    border: 0; background: var(--line); transition: background .15s, box-shadow .15s;
}
.win-dots button::after {
    position: absolute; inset: 0; display: grid; place-items: center;
    font: 700 10px/1 var(--sans); color: #00131c; opacity: 0; transition: opacity .15s;
}
.win-dots .dot-close { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.win-dots .dot-close::after { content: "×"; font-size: 12px; }
.win-dots .dot-min::after { content: "–"; }
.win-dots .dot-max::after { content: "+"; }
.win-dots:hover button { background: var(--glow); }
.win-dots:hover .dot-close { background: var(--accent); }
.win-dots:hover button::after, .win-dots button:focus-visible::after { opacity: 1; }
.win-back {
    font: 13px/1 var(--mono); color: var(--text); white-space: nowrap;
    padding: 7px 10px; border-radius: 8px; cursor: pointer;
    background: var(--surface-2); border: 1px solid var(--line); transition: border-color .2s, color .2s;
}
.win-back:hover { border-color: var(--accent); color: var(--glow); }
#win-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }

/* The bottom of every window: ‹ previous, the page's own buttons centred, next ›. */
.win-nav {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
    margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line);
}
.win-nav .prev { justify-self: start; }
.win-nav .next { justify-self: end; }
.win-own { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.win-nav .prev, .win-nav .next { font-weight: 600; border-color: rgba(0,194,255,.45); color: var(--glow); }
.win-nav .prev:hover, .win-nav .next:hover { border-color: var(--accent); }

#win-body {
    overflow-y: auto; padding: clamp(18px, 3vw, 34px);
    font-family: var(--sans); font-size: 16px; line-height: 1.6;
    scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
#win-body > * { animation: rise .45s var(--ease) both; }
#win-body > *:nth-child(2) { animation-delay: .04s; }
#win-body > *:nth-child(3) { animation-delay: .08s; }
#win-body > *:nth-child(4) { animation-delay: .12s; }
#win-body > *:nth-child(n+5) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

#win-body h2 {
    font-family: var(--sans); font-weight: 600; font-size: clamp(26px, 4vw, 38px);
    line-height: 1.12; margin: 0 0 6px; letter-spacing: -.01em;
}
#win-body p { margin: 0 0 14px; max-width: 68ch; }
.eyebrow { font: 12px/1.4 var(--mono); color: var(--accent); letter-spacing: .06em; margin-bottom: 10px !important; }
.lede { font-size: 19px; color: var(--glow); }
.note { color: var(--dim); font-size: 14px; border-left: 2px solid var(--line); padding-left: 12px; }

.ticks { list-style: none; padding: 0; margin: 0 0 18px; max-width: 72ch; }
.ticks li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 4px 0 20px; }
.facts dt { font: 13px/1.6 var(--mono); color: var(--dim); }
.facts dd { margin: 0; }

.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px !important; }
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    font: 14px/1 var(--mono); color: var(--text); text-decoration: none;
    padding: 11px 15px; border-radius: 10px; cursor: pointer;
    background: var(--surface-2); border: 1px solid var(--line);
    transition: border-color .2s, background .2s, transform .15s;
}
.btn:hover { border-color: var(--dim); }
.btn:active { transform: translateY(1px); }
.btn.hot { background: var(--accent); border-color: var(--accent); color: #00131c; font-weight: 600; box-shadow: 0 0 18px var(--accent-glow); }
.btn.hot:hover { background: #33ceff; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 18px; }
.card {
    display: flex; flex-direction: column; gap: 4px; padding: 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s var(--ease);
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-path { font: 12px var(--mono); color: var(--accent); }
.card strong { font-size: 17px; font-weight: 600; }
.card span:last-child { color: var(--dim); font-size: 14px; }

.covers { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 10px; }
.cover {
    position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden;
    border: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.cover img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.85) brightness(.7); transition: filter .5s, transform .6s var(--ease); }
.cover:hover img { filter: none; transform: scale(1.04); }
.cover span { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px; font: 12px var(--mono); color: var(--dim); background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.cover strong { display: block; font: 600 18px var(--sans); color: var(--text); }

/* Every photo shown whole in the preview, portraits included: each tile takes its photo's own shape,
   in balanced columns (Seth: "the portrait photos can't be seen in full on the preview page"). */
.grid { columns: 3 190px; column-gap: 8px; margin: 14px 0 6px; }
.shot {
    display: block; width: 100%; margin: 0 0 8px; padding: 0; border: 0; border-radius: 8px; overflow: hidden;
    cursor: zoom-in; background: var(--surface); aspect-ratio: var(--ar); break-inside: avoid;
}
.shot img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .5s var(--ease); }
.shot:hover img { transform: scale(1.03); }
.shot-static { width: 100%; border-radius: 10px; border: 1px solid var(--line); }

.timeline { display: grid; gap: 2px; margin: 10px 0 18px; }
.timeline div { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline span { font: 13px/1.7 var(--mono); color: var(--accent); }
.timeline strong { font-weight: 500; }

.contact { display: grid; gap: 10px; margin: 6px 0; }
.contact a, .contact div {
    display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: baseline;
    padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
    color: var(--text); text-decoration: none; font-size: 18px; word-break: break-all;
}
.contact a:hover { border-color: var(--accent); }
.contact span { font: 12px var(--mono); color: var(--dim); }

/* signal-flow diagram */
.flow { position: relative; margin: 14px 0 6px; }
.flow svg { display: block; width: 100%; height: auto; overflow: visible; }
.flow .edge { fill: none; stroke: var(--line); stroke-width: 2; }
.flow .edge.live { stroke: var(--accent); stroke-dasharray: 6 8; animation: flowDash .9s linear infinite; filter: drop-shadow(0 0 4px var(--accent-glow)); }
@keyframes flowDash { to { stroke-dashoffset: -14; } }
.flow .node { cursor: pointer; }
.flow .node rect { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; transition: stroke .2s, fill .2s; }
.flow .node text { fill: var(--text); font: 13px var(--mono); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.flow .node .sub { fill: var(--dim); font-size: 10.5px; }
.flow .node:hover rect, .flow .node.on rect { stroke: var(--accent); fill: #0b2633; }
.flow .node:focus-visible rect { stroke: var(--glow); }
.flow .node:focus { outline: none; }
.flow-read { min-height: 3.2em; color: var(--glow); font-size: 15px; }

/* ---------- orb + tree ---------- */
/* The nav button sits on the device itself, on the chin between the screen and the bottom edge
   (Seth, 2026-11-15). Its centre is placed by script; --orb is its size there. */
#orb {
    position: fixed; z-index: 40; left: 50%; top: calc(100vh - 40px);
    width: var(--orb); height: var(--orb); margin: calc(var(--orb) / -2) 0 0 calc(var(--orb) / -2);
    border-radius: 50%; border: 0; padding: 0; cursor: pointer;
    background: radial-gradient(circle at 35% 30%, #9becff, var(--accent) 45%, #00577a 100%);
    box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 0 24px var(--accent-glow), 0 0 70px rgba(0,194,255,.18);
    opacity: 0; transform: scale(.6);
    transition: opacity .4s, transform .4s var(--ease), box-shadow .3s;
}
body.ready #orb { opacity: 1; transform: none; }
#orb::before {
    content: ""; position: absolute; inset: calc(var(--orb) * -.14); border-radius: 50%;
    border: 1px solid rgba(0,194,255,.5); animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
#orb span {
    position: absolute; inset: 0; display: grid; place-items: center;
    font: 600 calc(var(--orb) * .2) var(--mono); letter-spacing: .1em; color: #00131c; text-transform: uppercase;
}
#orb span::after { content: "nav"; }
#orb[aria-expanded="true"] { transform: scale(1.08); box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset, 0 0 40px var(--accent-glow), 0 0 120px rgba(0,194,255,.3); }
#orb[aria-expanded="true"] span::after { content: "home"; letter-spacing: .04em; }
#orb[aria-expanded="true"]::before { animation: none; opacity: 0; }

#tree { position: absolute; inset: 0; z-index: 34; }
#tree[hidden] { display: none; }
#tree::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(90% 80% at 50% 100%, rgba(4,6,9,.82), rgba(4,6,9,.62));
    backdrop-filter: blur(3px); animation: fade .25s ease;
}
@keyframes fade { from { opacity: 0; } }
#tree-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* Branches: thick and sturdy at the trunk, tapering toward the leaves (Seth, 2026-11-15). Each path carries
   its own width in --w; a soft glow sits under the stroke so the tree reads as one lit structure. */
#tree-lines path {
    fill: none; stroke: rgba(0,194,255,.55); stroke-width: var(--w, 3); stroke-linecap: round;
    stroke-dasharray: var(--len); stroke-dashoffset: var(--len);
    filter: drop-shadow(0 0 3px rgba(0,194,255,.35));
    animation: draw .45s var(--ease) forwards; animation-delay: var(--d, 0s);
    transition: stroke .2s;
}
#tree-lines path.lit { stroke: var(--accent); filter: drop-shadow(0 0 6px var(--accent-glow)); }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* A node is anchored by its DOT: the button is a zero-size point at (x, y), the dot is centered on it, and
   the label hangs off the dot. So every line ends exactly in the middle of its circle. */
.tnode {
    position: absolute; left: 0; top: 0; width: 0; height: 0; padding: 0;
    transform: translate(var(--x), var(--y));
    background: none; border: 0; cursor: pointer; color: var(--text);
    font: 13px/1.1 var(--mono); white-space: nowrap;
    opacity: 0; animation: pop .35s var(--ease) forwards; animation-delay: var(--d, 0s);
}
@keyframes pop { from { opacity: 0; transform: translate(var(--x0), var(--y0)) scale(.4); } to { opacity: 1; } }
.tnode .dot {
    position: absolute; left: 0; top: 0; translate: -50% -50%;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--surface-2); border: 3px solid var(--accent);
    box-shadow: 0 0 14px var(--accent-glow); transition: transform .2s var(--ease), background .2s;
}
.tnode .dot::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; } /* a bigger target to tap */
.tnode.leaf .dot { width: 14px; height: 14px; border-width: 2.5px; }
.tnode .lbl {
    position: absolute; left: 0; top: 16px; translate: -50% 0;
    padding: 3px 7px; border-radius: 6px; background: rgba(9,11,15,.8);
}
.tnode.leaf .lbl { top: 13px; }
.tnode.side-l .lbl { left: auto; right: 16px; top: 0; translate: 0 -50%; }
.tnode.side-r .lbl { left: 16px; top: 0; translate: 0 -50%; }
.tnode.has-kids .lbl::after { content: "/"; color: var(--accent); }
.tnode:hover .dot, .tnode:focus-visible .dot, .tnode.open .dot { transform: scale(1.35); background: var(--accent); }
.tnode:hover .lbl, .tnode:focus-visible .lbl { color: var(--glow); }
.tnode.here .dot { background: var(--glow); border-color: var(--glow); box-shadow: 0 0 14px rgba(127,227,255,.55); }
.tnode.here .lbl::before { content: "● "; color: var(--glow); font-size: 9px; vertical-align: 2px; }
.tnode:focus { outline: none; }

/* ---------- lightbox ("darkroom") ---------- */
#lightbox {
    position: absolute; inset: 0; z-index: 50;
    display: grid; place-items: center; background: rgba(3,5,8,.95);
}
#lightbox[hidden] { display: none; }
/* The photo, with its arrows right against its sides (Seth). The figure is exactly the photo's size, so
   the arrows ride its edges whatever its shape. */
#lightbox figure { position: relative; margin: 0; line-height: 0; }
#lightbox img {
    display: block; max-width: calc(100cqw - 132px); max-height: calc(100cqh - 90px);
    border-radius: 4px; box-shadow: 0 30px 90px rgba(0,0,0,.7);
    animation: fade .25s ease;
}
#lightbox button {
    position: absolute; width: 46px; height: 46px; border-radius: 50%;
    border: 1px solid var(--line); background: rgba(9,11,15,.8); color: var(--text);
    font-size: 26px; line-height: 1; cursor: pointer;
}
#lightbox button:hover { border-color: var(--accent); color: var(--accent); }
.lb-prev { right: calc(100% + 8px); top: 50%; transform: translateY(-50%); }
.lb-next { left: calc(100% + 8px); top: 50%; transform: translateY(-50%); }
.lb-close { right: 12px; top: 12px; }

.noscript { padding: 40px 20px; font-family: var(--sans); }

/* ---------- small screens ---------- */
@media (max-width: 700px) {
    body { font-size: 13px; }
    #term { padding-top: 12px; }
    #win { top: 8px; max-height: calc(100cqh - 90px); border-radius: 10px; }
    #win-body { font-size: 15px; }
    .grid { columns: 2; }
    #lightbox img { max-width: calc(100cqw - 104px); }
    #lightbox button { width: 40px; height: 40px; font-size: 22px; }
    .lb-prev { right: calc(100% + 6px); }
    .lb-next { left: calc(100% + 6px); }
    .win-back { padding: 6px 8px; font-size: 12px; }
    .win-nav { grid-template-columns: 1fr 1fr; }
    .win-own { grid-column: 1 / -1; grid-row: 1; }
    .facts { grid-template-columns: 1fr; gap: 0; }
    .facts dd { margin-bottom: 10px; }
    .timeline div { grid-template-columns: 1fr; gap: 0; }
    .tnode { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
    .crt { display: none; }
}

/* photography/: every set on one page, each under its own heading */
.set-head { font: 600 18px var(--sans); margin: 26px 0 0; display: flex; align-items: baseline; gap: 10px; }
.set-head a { color: var(--text); text-decoration: none; }
.set-head a:hover { color: var(--glow); }
.set-head span { font: 12px var(--mono); color: var(--dim); }

/* Long sibling names stay on one line in the window's bottom bar. */
.win-nav .btn { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.win-nav .next { justify-self: end; }

/* ---------- the stage: the CSS layer that carries the screen sits under the canvas ---------- */
#stage .css3d, #stage .gl { position: absolute; inset: 0; }
#stage .css3d { z-index: 0; pointer-events: none; }
#stage .gl { z-index: 1; }
body.exploring #orb { opacity: 0 !important; pointer-events: none; transition: opacity .3s; }
/* On a phone the site rides on the phone's glass while looking around; nothing else to hide. */
#explore-hint {
    position: fixed; z-index: 50; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
    margin: 0; padding: 8px 14px; border-radius: 999px; white-space: nowrap; pointer-events: none;
    font: 12px var(--mono); color: var(--dim); background: rgba(9,11,15,.7); border: 1px solid var(--line);
}
#explore-hint[hidden] { display: none; }
@media (max-width: 520px) { #explore-hint { white-space: normal; text-align: center; width: calc(100vw - 40px); border-radius: 12px; } }
#desk-card {
    position: fixed; z-index: 50; left: 50%; top: calc(18px + env(safe-area-inset-top)); transform: translateX(-50%);
    width: min(440px, calc(100vw - 32px)); padding: 14px 18px; border-radius: 12px;
    background: rgba(9,11,15,.88); border: 1px solid rgba(0,194,255,.35); backdrop-filter: blur(8px);
    font-family: var(--sans); color: var(--text); display: grid; gap: 4px;
}
#desk-card[hidden] { display: none; }
#desk-card.pop { animation: rise .35s var(--ease); }
#desk-card strong { font-size: 17px; color: var(--glow); }
#desk-card span { font-size: 15px; color: var(--text); line-height: 1.5; }

/* The resume page in its window, and full size in the viewer with its download button. */
.doc {
    display: block; width: min(100%, 560px); margin: 8px auto 0; padding: 0; border: 1px solid var(--line);
    border-radius: 6px; overflow: hidden; background: #fff; cursor: zoom-in;
    box-shadow: 0 18px 50px rgba(0,0,0,.5); transition: transform .3s var(--ease), border-color .2s;
}
.doc:hover { transform: translateY(-2px); border-color: var(--accent); }
.doc img { display: block; width: 100%; height: auto; }
#lightbox.doc .lb-prev, #lightbox.doc .lb-next { display: none; }
#lightbox.doc { overflow-y: auto; place-items: start center; padding: 16px 0 80px; }
#lightbox.doc img { max-width: min(calc(100cqw - 32px), 900px); max-height: none; border-radius: 3px; }
.lb-download {
    position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 2;
    font: 600 14px var(--mono); color: #00131c; background: var(--accent); text-decoration: none;
    padding: 12px 20px; border-radius: 999px; box-shadow: 0 0 24px var(--accent-glow);
}
#lightbox.doc .lb-download { position: sticky; bottom: 16px; left: auto; transform: none; margin-top: 14px; }
.lb-download[hidden] { display: none; }

/* ---------- pass of 2026-11-15, evening ---------- */
/* Windows: a faint accent edge, so their bounds read against the terminal. */
#win { border-color: rgba(0,194,255,.32); box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(0,194,255,.08), 0 0 24px rgba(0,194,255,.08); }
/* The three dots say how deep you are: home one, a section two, a page in a section three. */
.win-dots i { display: block; width: 11px; height: 11px; border-radius: 50%; background: var(--line); transition: background .2s, box-shadow .2s; }
.win-dots i.on { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
#win-close {
    flex: 0 0 auto; width: 32px; height: 32px; padding: 0; border-radius: 8px; cursor: pointer;
    display: grid; place-items: center; background: none; border: 1px solid transparent; color: var(--dim);
}
#win-close:hover { border-color: var(--line); color: var(--text); }
#win-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.win-back[hidden] { display: none; }
#win-title { text-align: right; }

/* The viewer's buttons: icons drawn centred in their circles. */
#lightbox button { display: grid; place-items: center; padding: 0; line-height: 0; font-size: 0; }
#lightbox button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Photo sets: every tile in a set has the same shape, each photo whole inside it. */
.grid { columns: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--min, 200px), 1fr)); gap: 8px; }
.grid .shot { aspect-ratio: var(--tile, 3 / 2); margin: 0; background: #05070a; }
.grid .shot img { object-fit: contain; }
@media (max-width: 700px) { .grid { grid-template-columns: repeat(2, 1fr); columns: auto; } }

/* The resume, large in its window. */
.doc { width: 100%; max-width: 820px; cursor: default; }
.doc:hover { transform: none; border-color: var(--line); }

/* A branch that grows on a phone leaves the rest of the tree still. */
.tnode.steady { animation: none; opacity: 1; }
#tree-lines path.steady { animation: none; stroke-dashoffset: 0; }
