:root {
  color-scheme: dark;
  --bg: #0a0c10;
  --ink: #e8eaed;
  --muted: #98a2ad;
  --line: rgba(255, 255, 255, 0.1);
  --panel: rgba(12, 14, 19, 0.84);
  --accent: #e11d48;
  /* the accent as TEXT on the dark background: a little lighter, so small labels pass WCAG AA (4.5:1);
     it follows the Lights switch because it's mixed from --accent */
  --accent-text: color-mix(in srgb, var(--accent) 78%, #fff);
  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ============ 3D VERSION ============ */
#app { position: fixed; inset: 0; overflow: hidden; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: default; }
#gl.hovering { cursor: pointer; }
#gl.dragging { cursor: grabbing; } /* press and drag to look around (18 Nov) */
#gl { touch-action: none; }        /* a finger drag turns the view instead of scrolling the page */

.topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 24px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(5, 6, 9, 0.6), transparent);
}
.topbar > * { pointer-events: auto; }
.brand {
  font: 700 18px/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; display: flex; align-items: center; gap: 10px;
}
.brand::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
}
#nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
#nav button {
  border: 1px solid transparent; background: none; cursor: pointer;
  padding: 7px 12px; border-radius: 999px;
  font: 500 13px/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase;
  color: rgba(232, 234, 237, 0.78);
  transition: color .2s, background .2s, border-color .2s;
}
#nav button:hover { color: var(--ink); border-color: var(--line); }
#nav button.active { background: var(--ink); color: #0a0c10; }
#nav button kbd { font: inherit; opacity: .5; margin-right: 6px; }

/* left edge = just past the summary card (.idcard: left 20px, max-width min(360px, 42vw)), so on small
   laptop windows the hint wraps onto its own row instead of running under the card (fixed 18 Nov) */
.hud {
  position: absolute; right: 20px; bottom: 18px; z-index: 5; left: calc(36px + min(360px, 42vw));
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end;
}
#hint { font: 400 12px var(--mono); color: rgba(232, 234, 237, 0.6); margin-right: 6px; text-align: right; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  background: rgba(14, 16, 21, 0.72); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font: 500 12px/1 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none;
  transition: border-color .2s;
}
.pill:hover { border-color: rgba(255, 255, 255, 0.3); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
/* Sound pill: three little bars that move while the sound is on */
.pill.sound .state { color: var(--muted); margin-left: -2px; }
.pill.sound[aria-pressed="true"] .state { color: var(--accent-text); }
.pill .eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
.pill .eq i { width: 2px; height: 3px; border-radius: 1px; background: var(--muted); }
.pill.sound[aria-pressed="true"] .eq i { background: var(--accent); animation: eq 0.9s ease-in-out infinite alternate; }
.pill.sound[aria-pressed="true"] .eq i:nth-child(2) { animation-delay: -0.3s; }
.pill.sound[aria-pressed="true"] .eq i:nth-child(3) { animation-delay: -0.6s; }
@keyframes eq { from { height: 3px; } to { height: 10px; } }
/* Mood pill: a moon (Night), a setting sun (Evening) or a sun (Day) next to the mood's name */
.pill.mood .mood-icon { display: inline-flex; width: 12px; height: 12px; color: var(--muted); }
.pill.mood .mood-icon svg { width: 12px; height: 12px; display: none; }
.pill.mood[data-mood="night"] .i-night { display: block; color: #c4d2ff; }
.pill.mood[data-mood="evening"] .i-evening { display: block; color: #ffb27a; }
.pill.mood[data-mood="day"] .i-day { display: block; color: #ffe08a; }
@media (prefers-reduced-motion: reduce) { .pill.sound[aria-pressed="true"] .eq i { animation: none; height: 8px; } }

/* Floating labels in the overview */
#pins { position: absolute; inset: 0; pointer-events: none; z-index: 3; transition: opacity .4s; }
#pins.off { opacity: 0; }
.pin {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -100%);
  pointer-events: auto; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px 5px 5px; border-radius: 999px;
  background: rgba(10, 12, 16, 0.72); border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font: 500 12px/1 var(--mono); white-space: nowrap;
  transition: border-color .2s, background .2s;
}
.pin b {
  display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #05080c; font-weight: 600; font-size: 11px;
}
.pin:hover { border-color: var(--accent); background: rgba(10, 12, 16, 0.9); }

#tooltip {
  position: absolute; z-index: 6; pointer-events: none; opacity: 0;
  padding: 6px 10px; border-radius: 8px; background: rgba(10, 12, 16, 0.9); border: 1px solid var(--line);
  font: 500 12px var(--mono); transform: translate(14px, 14px); transition: opacity .15s;
}
#tooltip.show { opacity: 1; }
#tooltip small { color: var(--muted); margin-left: 6px; }

/* ---------- Overlay panels ---------- */
#overlay { position: absolute; z-index: 4; opacity: 0; pointer-events: none; transition: opacity .35s; }
#overlay.show { opacity: 1; pointer-events: auto; }

/* Panels fitted onto a 3D screen: JS sets left/top/width/height */
#overlay.screen { container-type: size; border-radius: 6px; overflow: hidden; }
#overlay.screen > .inner { position: absolute; inset: 0; overflow: auto; scrollbar-width: thin; }

/* Side card next to a physical object */
#overlay.side {
  right: max(20px, 4vw); top: 50%; transform: translateY(-50%);
  width: min(460px, 44vw); max-height: 74vh; overflow: auto; scrollbar-width: thin;
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  padding: 26px 26px 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.back {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 11px; font: 500 0.72em/1 var(--mono); color: var(--muted);
}
.back:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.3); }

.eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.side h2 { font: 700 28px/1.1 var(--display); margin: 10px 0 18px; }
.side .row { padding: 14px 0; border-top: 1px solid var(--line); }
.side .row h3 { font: 600 16px/1.3 var(--sans); margin: 0; display: flex; justify-content: space-between; gap: 12px; }
.side .row h3 span { font: 400 12px var(--mono); color: var(--muted); white-space: nowrap; }
.side .row p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tags span { font: 500 11px/1 var(--mono); padding: 5px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
.side .row a.more { display: inline-block; margin-top: 8px; font: 500 12px var(--mono); color: var(--accent-text); text-decoration: none; }
.side .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }

/* Monitor: About me home screen */
.home { position: absolute; inset: 0; color: #f4f5f7; display: flex; flex-direction: column; font-size: clamp(9px, 2.45cqh, 17px);
  background: radial-gradient(70% 90% at 85% 25%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%), #08090c; }
.home-bar { display: flex; align-items: center; gap: .7em; padding: 1em 1.6em; font: 600 .85em var(--mono); letter-spacing: .06em; }
.home-bar .back { margin-left: auto; }
.moon { width: 1.2em; height: 1.2em; border-radius: 50%; box-shadow: inset -.32em .18em 0 0 var(--accent); transform: rotate(-20deg); }
.home-body { flex: 1; overflow: auto; padding: .4em 2.4em 1.6em; scrollbar-width: thin; }
.home .hello { font: 500 1.15em var(--mono); color: var(--accent-text); margin: .6em 0 .1em; }
.home h1 { font: 700 4.2em/1 var(--display); margin: 0; letter-spacing: -.01em; }
.home .role { color: #aab2bd; font-size: 1.15em; margin: .5em 0 1em; }
.home .bio { max-width: 46em; color: #c3c9d1; }
.home .bio p { margin: 0 0 .6em; }
.home .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1em; margin: 1.2em 0; }
.home .stats b { display: block; font: 700 2.2em/1 var(--display); }
.home .stats span { display: block; color: #7d8590; font-size: .85em; margin-top: .3em; }
.home .btns { display: flex; gap: .7em; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: .4em; padding: .7em 1.2em; border-radius: 999px; cursor: pointer; text-decoration: none;
  font: 600 .9em var(--sans); background: transparent; color: var(--ink); border: 1px solid rgba(255,255,255,.22); }
.btn:hover { border-color: rgba(255,255,255,.5); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-family: var(--mono); letter-spacing: .03em; }

/* ---------- Monitor: desk-os, a small Windows-style desktop ---------- */
/* layers: wallpaper 0 · icons 1 · app window 2 · taskbar 3 · start menu 4 */
/* clip, not hidden: the oversized wallpaper must never make the desktop scrollable (focus inside the game scrolled it) */
.os { position: absolute; inset: 0; overflow: hidden; overflow: clip; color: #e8eaed; font: 400 clamp(8px, 2.3cqh, 16px)/1.4 var(--sans); }
.os svg { width: 100%; height: 100%; display: block; }
/* the torii wallpaper: a canvas that scene.js fills with the same picture as the 3D monitor (screens.js) */
.os-wall { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; background: #0b1020; }
/* big clock + date, top right (sized like the 3D monitor's: 112px and 28px on a 720px-high screen) */
/* desk-os desktop tile that invites a game of Pinball (opens it like the icon) */
.os-promo { position: absolute; z-index: 1; right: 4.4%; bottom: calc(3.6em + 4.5cqh); display: flex; align-items: center; gap: .7em; padding: .7em .9em .7em .7em;
  border-radius: .8em; border: 1px solid rgba(255,170,80,.45); background: linear-gradient(135deg, rgba(40,22,10,.82), rgba(16,18,32,.82)); color: #fff;
  font: inherit; text-align: left; cursor: pointer; box-shadow: 0 .6em 1.6em rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.06); backdrop-filter: blur(6px); }
.os-promo i { display: grid; place-items: center; width: 2.6em; height: 2.6em; border-radius: .6em; background: radial-gradient(circle at 50% 35%, #ffb45a, #c2410c); color: #fff; }
.os-promo i svg { width: 1.6em; height: 1.6em; }
.os-promo span { display: flex; flex-direction: column; line-height: 1.25; }
.os-promo b { font-weight: 700; letter-spacing: .02em; }
.os-promo small { color: rgba(255,255,255,.72); }
.os-promo em { font-style: normal; font-weight: 700; color: #ffb45a; margin-left: .4em; }
.os-promo:hover, .os-promo:focus-visible { border-color: #ffb45a; transform: translateY(-1px); }
.os-bigclock {
  position: absolute; z-index: 1; top: 6.5%; right: 4.4%; text-align: right; color: #fff; pointer-events: none;
  text-shadow: 0 .1em .6em rgba(0, 0, 0, .45);
}
.os-bigclock b { display: block; font: 700 15.5cqh/1 var(--display); letter-spacing: -.01em; }
.os-bigclock b small { margin-left: .12em; font: 600 .32em/1 var(--display); } /* the "PM" after the time */
.os-bigclock span { display: block; margin-top: 1.6cqh; font: 500 3.9cqh/1.2 var(--sans); }

.os-icons { position: absolute; z-index: 1; top: 1em; left: .8em; bottom: 4.4em; display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; gap: .4em; }
.os-icon {
  width: 6.6em; padding: .55em .3em .45em; display: flex; flex-direction: column; align-items: center; gap: .4em;
  border-radius: .45em; border: 1px solid transparent; background: none; color: #fff; cursor: pointer; text-decoration: none;
  font: 500 .82em/1.2 var(--sans); text-align: center; text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}
.os-icon:hover, .os-icon:focus-visible { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .16); outline: none; }
.os-icon i {
  width: 3.3em; height: 3.3em; padding: .75em; border-radius: .8em; color: #fff;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tint) 85%, #fff), color-mix(in srgb, var(--tint) 70%, #000));
  box-shadow: 0 .3em .9em rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .25);
}

.os-win { position: absolute; z-index: 2; left: 0; right: 0; top: 0; bottom: 3.6em; display: flex; flex-direction: column; background: #0b0c10; animation: os-open .16s ease-out; }
@keyframes os-open { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.os-title { flex-shrink: 0; height: 2.5em; display: flex; align-items: center; gap: .6em; padding-left: .8em; font-size: .82em; background: #121419; border-bottom: 1px solid #1e2129; }
.os-title > i { width: 1.25em; height: 1.25em; }
.os-title > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-title button { width: 3.5em; height: 100%; border: 0; background: none; color: #aab2bd; cursor: pointer; font: inherit; }
.os-title button:hover:not(:disabled) { background: rgba(255, 255, 255, .08); color: #fff; }
.os-title button:disabled { opacity: .45; cursor: default; }
.os-title button.x:hover { background: #c42b1c; color: #fff; }
.os-body { position: relative; flex: 1; min-height: 0; overflow: hidden; overflow: clip; container-type: size; }

.os-bar {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 3.6em; display: flex; align-items: center; gap: .25em; padding: 0 .6em;
  background: rgba(14, 15, 20, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid rgba(255, 255, 255, .08);
}
.os-start, .os-task { position: relative; height: 2.8em; width: 2.8em; padding: .65em; display: grid; place-items: center; border: 0; border-radius: .4em; background: none; color: #e8eaed; cursor: pointer; }
.os-start:hover, .os-task:hover, .os.start-open .os-start { background: rgba(255, 255, 255, .1); }
.os-start .moon { width: 1.35em; height: 1.35em; }
.os-task.on { background: rgba(255, 255, 255, .07); }
.os-task.on::after { content: ''; position: absolute; left: 32%; right: 32%; bottom: .2em; height: .2em; border-radius: 1em; background: var(--accent); }
.os-tray { margin-left: auto; display: flex; align-items: center; gap: .7em; font-size: .78em; color: #d5dae1; }
.os-tray .os-wifi, .os-tray .os-snd { width: 1.35em; height: 1.35em; }
.os-snd { padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.os-snd[aria-pressed="false"] { color: #7d8590; }
.os-clock { text-align: right; line-height: 1.25; font-variant-numeric: tabular-nums; }
.os-tray .back { font-size: .95em; }

.os-menu {
  position: absolute; z-index: 4; left: .5em; bottom: 4.1em; width: 18em; padding: .7em; display: none; flex-direction: column; gap: .15em;
  border-radius: .7em; background: rgba(22, 24, 31, .95); border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 1em 3em rgba(0, 0, 0, .55);
}
.os.start-open .os-menu { display: flex; animation: os-open .14s ease-out; }
.os-me { display: grid; grid-template-columns: auto 1fr; column-gap: .7em; align-items: center; padding: .3em .4em .7em; margin-bottom: .3em; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.os-me .avatar { grid-row: span 2; width: 2.6em; height: 2.6em; font-size: .9em; }
.os-me small { color: #8b9097; font-size: .78em; }
.os-menu > button, .os-menu > a {
  display: flex; align-items: center; gap: .7em; padding: .55em .6em; border: 0; border-radius: .4em; background: none;
  color: #e8eaed; font: 500 .88em var(--sans); text-align: left; text-decoration: none; cursor: pointer;
}
.os-menu > button:hover, .os-menu > a:hover { background: rgba(255, 255, 255, .08); }
.os-menu i { width: 1.3em; height: 1.3em; flex-shrink: 0; }
.os-menu .os-off { margin-top: .3em; border-top: 1px solid rgba(255, 255, 255, .08); border-radius: 0 0 .4em .4em; color: #aab2bd; }

/* the About app inside its window */
.os-body .home { background: radial-gradient(70% 90% at 85% 25%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), #0b0c10; font-size: clamp(8px, 2.7cqh, 17px); }
.os-body .home-body { padding-top: 1.2em; }

@media (prefers-reduced-motion: reduce) { .os-win, .os.start-open .os-menu { animation: none; } }

/* System Monitor app (Task Manager-style) */
.sm { position: absolute; inset: 0; display: flex; flex-direction: column; gap: .8em; padding: 1em 1.2em; overflow: auto; font-size: clamp(8px, 2.8cqh, 16px); background: #0b0c10; }
.sm-head { display: flex; align-items: baseline; gap: 1em; flex-wrap: wrap; }
.sm-head b { font: 600 1.25em var(--sans); }
.sm-note { font: 400 .78em var(--mono); color: #7d8590; }
.sm-grid { flex: 1; min-height: 9em; display: grid; grid-template-columns: 1fr 1fr; gap: .8em; }
.sm-card { display: flex; flex-direction: column; min-height: 0; padding: .7em .8em; border-radius: .5em; background: #111318; border: 1px solid #1e2129; }
.sm-top { display: flex; align-items: baseline; gap: .6em; }
.sm-name { font: 600 1em var(--sans); }
.sm-model { flex: 1; min-width: 0; color: #8b9097; font-size: .8em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-val { font: 700 1.5em var(--display); font-variant-numeric: tabular-nums; }
.sm-card canvas { flex: 1; min-height: 3em; width: 100%; margin: .5em 0; border: 1px solid #1e2129; border-radius: .25em; background: #0c0e12; }
.sm-sub { display: flex; justify-content: space-between; gap: .8em; color: #8b9097; font-size: .8em; }
.sm-sub b { color: #e8eaed; font-weight: 600; font-variant-numeric: tabular-nums; }
.sm-thermal { padding: .7em .8em; border-radius: .5em; background: #111318; border: 1px solid #1e2129; }
.sm-thermal h3 { margin: 0 0 .6em; font: 600 .95em var(--sans); }
.sm-thermal h3 small { color: #8b9097; font-weight: 400; margin-left: .5em; }
.sm-gauges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8em; }
.sm-gauge { display: grid; grid-template-columns: 1fr auto; row-gap: .35em; font-size: .82em; color: #8b9097; }
.sm-gauge b { color: #e8eaed; font-weight: 600; }
.sm-gauge b i { font-style: normal; font-variant-numeric: tabular-nums; }
.sm-gauge em { grid-column: 1 / -1; height: .35em; border-radius: 1em; background: #1e2129; overflow: hidden; }
.sm-gauge u { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #22d3ee, var(--accent)); transition: width .45s; }

/* Tablet: Career (Experience / Skills) */
.tablet { position: absolute; inset: 0; background: #0c0d11; color: #e8eaed; display: flex; flex-direction: column; font-size: clamp(9px, 3.9cqw, 16px); }
.tab-top { display: flex; align-items: center; justify-content: space-between; padding: 1.2em 1.2em .6em; }
.tab-top h2 { margin: 0; font: 700 1.7em var(--display); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 0 1.2em; padding: .25em; border-radius: 999px; background: #1a1c22; }
.tabs button { border: 0; border-radius: 999px; padding: .55em; cursor: pointer; background: none; color: #9aa3ad; font: 600 .9em var(--sans); }
.tabs button.on { background: var(--accent); color: #fff; }
.tab-body { flex: 1; overflow: auto; padding: 1em 1.2em 1.4em; scrollbar-width: thin; }
.tl { position: relative; padding: 0 0 1.1em 1.4em; border-left: 2px solid #2a2d35; margin-left: .4em; }
.tl::before { content: ""; position: absolute; left: -.45em; top: .2em; width: .8em; height: .8em; border-radius: 50%; background: #3a3e48; }
.tl.now::before { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.tl .when { font: .75em var(--mono); color: #7d8590; }
.tl h3 { margin: .2em 0 0; font: 600 1.05em/1.25 var(--display); }
.tl .co { color: var(--accent-text); font-size: .85em; }
.tl ul { margin: .4em 0 0; padding-left: 1.1em; color: #aab2bd; font-size: .82em; }
.tl li { margin: .2em 0; }
.sk { margin-bottom: 1.2em; }
.sk h3 { display: flex; align-items: center; gap: .5em; margin: 0 0 .5em; font: 600 1em var(--display); }
.sk h3 i { width: .6em; height: .6em; border-radius: 50%; }
.chips { display: flex; flex-wrap: wrap; gap: .4em; }
.chips span { font: 500 .8em var(--sans); padding: .4em .7em; border-radius: .5em; background: #1a1c22; border: 1px solid #262931; }

/* Camera: Projects viewfinder */
#overlay.side.s-projects { background: rgba(6, 7, 9, .9); }
.vf-top { display: flex; justify-content: space-between; font: 600 12px var(--mono); letter-spacing: .1em; color: #c9ced6; margin-bottom: 12px; }
.vf-top .rec { color: #ef4444; animation: blink 1.4s steps(1) infinite; }
.vf-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #111318; margin-bottom: 16px; }
.vf-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vf-ph { position: absolute; inset: 0; display: grid; place-items: center;
  background: radial-gradient(60% 80% at 30% 30%, color-mix(in srgb, var(--accent) 45%, transparent), transparent), linear-gradient(135deg, #15171c, #0b0c10); }
.vf-ph span { font: 700 26px var(--display); color: rgba(255,255,255,.85); }
.vf-frame .c { position: absolute; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.8); }
.vf-frame .tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.vf-frame .tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.vf-frame .bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.vf-frame .br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.vf h2 { font: 700 22px/1.2 var(--display); margin: 0; }
.vf .yr { font: 400 12px var(--mono); color: var(--muted); margin: 4px 0 8px; }
.vf p { color: #b9c0c9; font-size: 14px; margin: 0; }
.vf .more { display: inline-block; margin-top: 10px; font: 500 12px var(--mono); color: var(--accent-text); text-decoration: none; }
.vf-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.vf-nav button[data-shot] { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.04); cursor: pointer; }
.vf-nav button[data-shot]:hover { border-color: var(--accent); }

#tooltip.pc { padding: 10px 12px; line-height: 1.5; }
#tooltip.pc b { display: block; color: var(--accent-text); margin-bottom: 2px; }
#tooltip.pc span { color: #c9ced6; }
.toast { position: absolute; left: 50%; bottom: 70px; transform: translate(-50%, 10px); z-index: 8; opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 999px; background: rgba(14,16,21,.92); border: 1px solid var(--line); font: 500 13px var(--mono); transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Helpdesk tickets (js/tickets.js): a Windows-style notification at the bottom right when a ticket closes */
.tk-stack { position: absolute; right: 20px; bottom: calc(var(--tk-bottom, 66px) + 58px); z-index: 30; display: flex; flex-direction: column; gap: 10px;
  width: min(340px, calc(100vw - 32px)); pointer-events: none; }
.tk-toast { background: rgba(20, 23, 30, .94); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; transform: translateX(24px); transition: opacity .3s, transform .35s cubic-bezier(.2,.8,.2,1); }
.tk-toast.show { opacity: 1; transform: none; }
.tk-head { display: flex; justify-content: space-between; font: 500 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.tk-head span:first-child { color: var(--accent-text); }
.tk-main { display: flex; gap: 11px; align-items: flex-start; }
.tk-main svg { flex: none; width: 26px; height: 26px; margin-top: 1px; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tk-main svg circle { fill: #16a34a; stroke: none; }
.tk-main svg path { stroke: #fff; }
.tk-main b { display: block; font: 600 14px/1.25 var(--sans); }
.tk-main p { margin: 2px 0 0; font-size: 13px; line-height: 1.35; color: var(--ink); }
.tk-main small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.35; color: var(--muted); font-style: italic; }
.tk-prog { margin-top: 10px; display: flex; align-items: center; gap: 12px; }
.tk-bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.08); overflow: hidden; }
.tk-bar i { display: block; height: 100%; border-radius: 2px; background: var(--accent); }
.tk-prog > span:last-child { font: 500 11px var(--mono); color: var(--muted); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .tk-toast { transform: none; transition: opacity .2s; } }
/* the floating Helpdesk badge (always there, above the bottom buttons): red counter = open tickets */
.tk-badge { position: absolute; right: 20px; bottom: var(--tk-bottom, 66px); z-index: 6; width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: rgba(14, 16, 21, .8); border: 1px solid var(--line); color: var(--ink);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 6px 18px rgba(0,0,0,.35); transition: border-color .2s, transform .2s; }
.tk-badge:hover, .tk-badge[aria-expanded="true"] { border-color: rgba(255,255,255,.35); transform: translateY(-1px); }
.tk-badge svg { width: 21px; height: 21px; }
.tk-badge b { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font: 700 11px/1 var(--sans); box-shadow: 0 0 0 2px #0a0c10; }
.tk-badge b.all { background: #16a34a; }
/* the ticket queue: a panel from the right */
.tk-panel { position: absolute; top: 0; right: 0; bottom: 0; z-index: 25; width: min(380px, 100vw); display: flex; flex-direction: column;
  background: rgba(14, 16, 21, .96); border-left: 1px solid var(--line); box-shadow: -18px 0 40px rgba(0,0,0,.45);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transform: translateX(104%); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.tk-panel.open { transform: none; }
.tk-panel header { display: flex; align-items: center; gap: 12px; padding: 18px 18px 6px; }
.tk-panel header > i { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent-text); }
.tk-panel header > i svg { width: 20px; height: 20px; }
.tk-panel header b { display: block; font: 700 17px/1.2 var(--display); }
.tk-panel header small { font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tk-x { margin-left: auto; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: none; cursor: pointer; }
.tk-x:hover { border-color: rgba(255,255,255,.3); }
.tk-panel > .tk-prog { padding: 6px 18px 12px; border-bottom: 1px solid var(--line); margin: 0; }
.tk-list { flex: 1; overflow: auto; padding: 4px 18px 24px; }
.tk-list h3 { margin: 16px 0 6px; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tk-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tk-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 9px;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.05); }
.tk-no { font: 500 11px/1.6 var(--mono); color: var(--accent-text); }
.tk-list li b { display: block; font: 600 13.5px/1.3 var(--sans); }
.tk-list li small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.35; color: var(--muted); font-style: italic; }
.tk-state { font: 500 10.5px/1.6 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.tk-list li.done { background: none; border-color: transparent; }
.tk-list li.done b { color: var(--muted); }
.tk-list li.done .tk-no { color: var(--muted); }
.tk-list li.done .tk-state { color: #4ade80; }
.tk-list li.done .tk-state i { font-style: normal; margin-right: 4px; }
.tk-zero { margin: 18px 0; color: #4ade80; font-weight: 600; }
/* rewards: LED colours for the Lights button (tickets.js REWARDS) */
.tk-sw { flex: none; display: inline-block; width: 22px; height: 22px; border-radius: 50%; background: var(--c, #888);
  box-shadow: 0 0 10px color-mix(in srgb, var(--c, #888) 70%, transparent), inset 0 0 0 1px rgba(255,255,255,.18); }
.tk-sw.rgb, #btn-lights.rgb .dot { background: conic-gradient(#ff3b3b, #ffb21f, #f5ff3b, #3bff6a, #3bd8ff, #4a5bff, #c43bff, #ff3b3b); box-shadow: 0 0 10px rgba(255,255,255,.25); }
.tk-rewards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 12px 18px 14px; border-bottom: 1px solid var(--line); }
.tk-rewards span { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.tk-rewards small { font: 500 10px/1.25 var(--mono); letter-spacing: .03em; color: var(--muted); }
.tk-rewards span:not(.on) .tk-sw { background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.tk-rewards span:not(.on) .tk-sw::after { content: ""; display: block; width: 8px; height: 6px; margin: 9px auto 0; border-radius: 1.5px; background: rgba(255,255,255,.35); }
.tk-rewards span.on small { color: var(--ink); }
.tk-reward .tk-main .tk-sw { width: 26px; height: 26px; margin-top: 1px; }
/* phones: only the newest notification; badge and toasts sit above the two rows of bottom buttons */
@media (max-width: 600px) {
  .tk-stack { right: 16px; } .tk-toast:not(:last-child) { display: none; }
  .tk-badge { right: 16px; }
}

/* Phone: Contact */
.phone { position: absolute; inset: 0; color: #fff; font-size: clamp(9px, 6.5cqw, 17px); padding: 1.6em 1.1em 1em; display: flex; flex-direction: column; gap: .7em; overflow: auto;
  background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--accent) 55%, #0a0c10) 0%, #0a0c10 70%); }
.phone .back { align-self: flex-start; color: rgba(255,255,255,.75); border-color: rgba(255,255,255,.25); font-size: .7em; }
.phone .who { text-align: center; margin: .4em 0 .6em; }
.phone .who .avatar { margin: 0 auto .5em; width: 3.4em; height: 3.4em; font-size: 1.3em; background: rgba(255,255,255,.12); }
/* profile photo: fills the circle, a bit bigger, thin accent ring; the initials stay underneath as a fallback */
.phone .who .avatar.has-photo { position: relative; width: 4.2em; height: 4.2em; font-size: 1.1em; overflow: hidden; box-shadow: 0 0 0 2px var(--accent), 0 .4em 1.2em rgba(0,0,0,.4); }
.phone .who .avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.phone .who h2 { font: 700 1.2em/1.1 var(--display); margin: 0; }
.phone .who p { margin: .2em 0 0; font-size: .72em; color: rgba(255,255,255,.7); }
.phone a.app { display: flex; align-items: center; gap: .7em; padding: .65em .8em; border-radius: .9em; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.08); text-decoration: none; font-size: .78em; }
.phone a.app:hover { background: rgba(255,255,255,.16); }
.phone a.app i { width: 2em; height: 2em; border-radius: .55em; display: grid; place-items: center; font-style: normal; font-weight: 700; background: var(--accent); color: #05080c; flex: none; }
.phone a.app span { display: flex; flex-direction: column; min-width: 0; }
.phone a.app small { color: rgba(255,255,255,.6); font-size: .85em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Boot screen ---------- */
#boot {
  position: absolute; inset: 0; z-index: 10; background: #05070a;
  display: grid; place-items: center; transition: opacity .4s;
}
/* js/boot-gate.js: show the boot screen at the first paint, before main.js un-hides #app (2 Dec) */
html.boot-early #app[hidden] { display: block !important; }
#boot.done { opacity: 0; pointer-events: none; }
.boot-inner { width: min(640px, 88vw); }
#boot-log { font: 400 13px/1.7 var(--mono); color: #8b949e; margin: 0 0 22px; min-height: 6em; white-space: pre-wrap; }
#boot-log .ok { color: #34d399; }
#boot-log .ac { color: var(--accent-text); }
#boot-enter {
  font: 500 13px var(--mono); letter-spacing: .06em; text-transform: uppercase;
  padding: 12px 20px; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: #05080c; border: none;
  box-shadow: 0 0 30px color-mix(in srgb, var(--accent) 50%, transparent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 6px color-mix(in srgb, var(--accent) 30%, transparent); } }

@media (max-width: 760px) {
  #hint { display: none; }
  #nav button { padding: 6px 8px; font-size: 11px; }
  #nav button kbd { display: none; }
  #overlay.side { width: auto; left: 16px; right: 16px; top: auto; bottom: 70px; transform: none; max-height: 60vh; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============ LITE VERSION ============ */
#lite { max-width: 760px; margin: 0 auto; padding: 0 20px 80px; }
.l-top {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 0; background: rgba(10, 12, 16, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.l-top nav { display: flex; gap: 14px; flex-wrap: wrap; font: 500 12px var(--mono); }
.l-top nav a { text-decoration: none; color: var(--muted); }
.l-top nav a:hover { color: var(--ink); }
.l-note { margin: 18px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; color: var(--muted); }
.l-hero { padding: 56px 0 36px; border-bottom: 1px solid var(--line); }
.l-hero h1 { font: 700 clamp(36px, 7vw, 56px)/1.02 var(--display); margin: 14px 0 12px; letter-spacing: -0.01em; }
.l-hero .lead { font-size: 19px; color: #c7cdd4; margin: 0 0 14px; }
.l-hero p { color: var(--muted); }
.l-hero .btns .btn { background: var(--ink); color: var(--bg); border-color: var(--ink); font-size: 13px; }
.l-hero .btns .btn.ghost { background: none; color: var(--ink); border-color: var(--line); }
#lite section { padding: 44px 0 8px; }
#lite h2 { font: 700 24px var(--display); margin: 8px 0 18px; }
.l-item { padding: 16px 0; border-top: 1px solid var(--line); }
.l-item .hd { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.l-item h3 { margin: 0; font: 600 18px/1.3 var(--display); }
.l-item .yr { font: 400 12px var(--mono); color: var(--muted); white-space: nowrap; }
.l-item .co { color: var(--accent-text); font-size: 14px; }
.l-item p, .l-item ul { color: var(--muted); font-size: 15px; margin: 6px 0 0; }
.l-item ul { padding-left: 18px; }
.l-skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.l-skill { border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.l-skill h3 { margin: 0 0 10px; font: 600 15px var(--display); }
.l-skill .s { display: flex; justify-content: space-between; font-size: 13px; color: #c7cdd4; margin-top: 8px; }
.l-skill .s span { font: 400 11px var(--mono); color: var(--muted); }
.l-skill .bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,.07); margin-top: 4px; overflow: hidden; }
.l-skill .bar i { display: block; height: 100%; background: var(--accent); }
.l-contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.l-contact a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
.l-contact a small { display: block; font: 400 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.l-contact a:hover { border-color: var(--accent); }
.l-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin: 22px 0 6px; }
.l-stats b { display: block; font: 700 30px/1 var(--display); }
.l-stats span { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.l-skill h3 { display: flex; align-items: center; gap: 8px; }
.l-skill h3 i { width: 8px; height: 8px; border-radius: 50%; }
.l-hero .btns { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }

.avatar { width: 3.4em; height: 3.4em; border-radius: 50%; display: grid; place-items: center; font: 700 1.2em var(--display); background: rgba(255,255,255,.12); color: #fff; }
#tooltip.flip { transform: translate(calc(-100% - 14px), 14px); }

/* ============ HELPDESK QUIZ (game on the monitor) ============ */
/* .hr-* is the shared game frame (top bar, tool dock, modal cards); .hq-* is the quiz itself */
.hq-prog { flex: 1; height: .5em; border-radius: 1em; background: #1a1d24; overflow: hidden; }
.hq-prog i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 1em; transition: width .35s; }
.hq-count { font: 700 1em var(--mono); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hq-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 1em 1.2em; overflow: auto; }
.hq-ticket {
  width: min(40em, 100%); padding: 1.1em 1.3em; border-radius: .8em; background: #131720; border: 1px solid #252b36;
  box-shadow: 0 .6em 1.8em rgba(0,0,0,.35); animation: hr-in .25s ease-out;
}
.hq-ticket .hr-tk-top { gap: 1em; }
.hq-ticket > p { margin: .55em 0 0; font: 600 1.35em/1.3 var(--sans); }
.hq-tier { padding: .05em .55em; border-radius: 1em; font-weight: 600; }
.hq-tier.easy { color: #22c55e; background: rgba(34,197,94,.12); }
.hq-tier.medium { color: #f59e0b; background: rgba(245,158,11,.12); }
.hq-tier.hard { color: #ef4444; background: rgba(239,68,68,.12); }
.hq-ticket.ok { border-color: #22c55e; }
.hq-ticket.bad { border-color: #ef4444; animation: hr-shake .4s; }
.hq-fb:empty { display: none; }
.hq-fb { margin-top: .9em; padding-top: .9em; border-top: 1px solid #252b36; }
.hq-verdict { display: block; font: 700 1em var(--sans); }
.hq-ticket.ok .hq-verdict { color: #22c55e; }
.hq-ticket.bad .hq-verdict { color: #ef4444; }
.hq-verdict u { text-decoration: none; color: #e8eaed; }
.hq-fb p { margin: .45em 0 .9em; color: #c3c9d1; }
.hq-fb p span { color: var(--accent-text); font: 600 .85em var(--mono); margin-right: .3em; }
.hq-fb .btn { font-size: .85em; }
/* .hr prefix: these must beat the .hr-tool:hover style further down */
.hr .hr-tool:disabled { cursor: default; opacity: .55; transform: none; border-color: #252b36; background: #12151c; }
.hr .hr-tool.right { opacity: 1; border-color: #22c55e; background: rgba(34,197,94,.16); }
.hr .hr-tool.wrong { opacity: 1; border-color: #ef4444; background: rgba(239,68,68,.14); }
.hq .hr-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hq-missed { margin: 0 0 .9em; padding: .6em .8em; border-radius: .5em; background: rgba(255,255,255,.03); border: 1px solid #252b36; }
.hq-missed span { display: block; font: 600 .7em var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #7d8590; margin-bottom: .35em; }
.hq-missed p { margin: .25em 0 !important; font-size: .82em !important; }
.hq-missed b { color: #e8eaed; white-space: nowrap; }
#overlay.gaming > .inner { overflow: hidden; }
/* Pinball (and the CV on phones): the desk-os window grows out of the monitor to fill the browser (scene.js appFull) */
#overlay.pb-anim { transition: opacity .35s, left .45s cubic-bezier(.2, .7, .2, 1), top .45s cubic-bezier(.2, .7, .2, 1),
  width .45s cubic-bezier(.2, .7, .2, 1), height .45s cubic-bezier(.2, .7, .2, 1), border-radius .45s; }
#overlay.screen.pb-full { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; z-index: 20; border-radius: 0; }
#overlay.pb-full .os-win { animation: none; }
#overlay.pb-full .os-title { font-size: 13px; }
#overlay.pb-full .os-bar { font-size: 12px; }
#overlay.pb-full .os-win { bottom: 44px; }
@media (prefers-reduced-motion: reduce) { #overlay.pb-anim { transition: opacity .35s; } }
.hr {
  position: absolute; inset: 0; display: flex; flex-direction: column; color: #e8eaed; user-select: none;
  font-size: clamp(8px, 2.5cqh, 17px); background: #0a0c10;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 2.4em 2.4em;
}
.hr kbd { font: 600 .8em var(--mono); padding: .1em .4em; border-radius: .3em; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); }
.hr-top { display: flex; align-items: center; gap: 1em; padding: .7em 1.2em; border-bottom: 1px solid #1c2028; background: #0d1015; }
.hr-title { font: 700 .95em var(--mono); letter-spacing: .1em; color: var(--accent-text); white-space: nowrap; }
.hr-timer { flex: 1; height: .5em; border-radius: 1em; background: #1a1d24; overflow: hidden; }
.hr-timer i { display: block; height: 100%; width: 100%; background: var(--accent); border-radius: 1em; }
.hr-clock { font: 700 1.3em var(--mono); min-width: 2ch; text-align: right; }
.hr-stat { font: 500 .8em var(--mono); color: #8b949e; white-space: nowrap; }
.hr-stat b { color: #e8eaed; font-size: 1.15em; margin-left: .2em; }
.hr-top .back { font-size: .8em; }

.hr-queue { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: 1fr; gap: .9em; padding: 1.1em 1.2em; align-items: center; }
.hr-queue > .hr-ticket { grid-row: 1; }
.hr-queue:empty::before { content: "Queue is clear. Next ticket incoming…"; grid-column: 1 / -1; text-align: center; color: #5b6470; font: 500 .9em var(--mono); }
.hr-ticket {
  position: relative; background: #141820; border: 1px solid #262b35; border-radius: .7em; padding: .8em .9em .9em;
  cursor: grab; touch-action: none; outline: none; animation: hr-in .25s ease-out;
  box-shadow: 0 .4em 1.2em rgba(0,0,0,.35);
}
.hr-ticket.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 .4em 1.2em rgba(0,0,0,.35); }
.hr-ticket.drag { cursor: grabbing; z-index: 5; box-shadow: 0 1em 2.4em rgba(0,0,0,.6); transition: none; }
.hr-tk-top { display: flex; justify-content: space-between; font: 500 .72em var(--mono); color: #7d8590; }
.hr-ticket p { margin: .5em 0 .8em; font: 500 1.12em/1.35 var(--sans); min-height: 5.4em; }
.hr-sla { height: .35em; border-radius: 1em; background: #1f242d; overflow: hidden; }
.hr-sla i { display: block; height: 100%; width: 100%; border-radius: 1em; background: #22c55e; }
.hr-ticket.ok { animation: hr-ok .32s ease-in forwards; pointer-events: none; }
.hr-ticket.breach { animation: hr-breach .32s ease-in forwards; pointer-events: none; }
.hr-ticket.bad, .hr-tool.bad { animation: hr-shake .4s; border-color: #ef4444; }
@keyframes hr-in { from { opacity: 0; transform: translateY(-.8em); } }
@keyframes hr-ok { to { opacity: 0; transform: scale(.85); border-color: #22c55e; } }
@keyframes hr-breach { to { opacity: 0; transform: translateY(1.2em); border-color: #ef4444; } }
@keyframes hr-shake { 20% { transform: translateX(-.4em); } 40% { transform: translateX(.4em); } 60% { transform: translateX(-.25em); } 80% { transform: translateX(.25em); } }

.hr-dock { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: .6em; padding: .9em 1.2em 1.1em; border-top: 1px solid #1c2028; background: #0d1015; }
.hr-tool {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: .35em; padding: .8em .3em .7em;
  border-radius: .7em; border: 1px solid #262b35; background: #141820; color: inherit; cursor: pointer; font: inherit;
  transition: transform .12s, border-color .12s, background .12s;
}
.hr-tool kbd { position: absolute; top: .4em; left: .4em; font-size: .62em; }
.hr-tool i { font: 700 1.25em var(--mono); font-style: normal; color: var(--accent-text); }
.hr-tool span { font: 500 .72em var(--sans); color: #aab2bd; text-align: center; line-height: 1.2; }
.hr-tool:hover, .hr-tool.over { border-color: var(--accent); background: #1a1f29; transform: translateY(-.2em); }
.hr-tool.good { animation: hr-good .45s; }
@keyframes hr-good { 30% { border-color: #22c55e; background: rgba(34,197,94,.22); transform: scale(1.06); } }

.hr-modal { position: absolute; inset: 0; display: none; place-items: center; background: rgba(6,7,10,.82); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); padding: 1em; }
.hr[data-state="intro"] .hr-modal, .hr[data-state="report"] .hr-modal { display: grid; }
.hr-card { width: min(34em, 92%); max-height: 100%; overflow: auto; background: #10131a; border: 1px solid #262b35; border-radius: 1em; padding: 1.5em 1.7em; box-shadow: 0 1.5em 4em rgba(0,0,0,.6); }
.hr-card .eyebrow { font-size: .72em; }
.hr-card h2 { font: 700 1.9em/1.1 var(--display); margin: .35em 0 .5em; }
.hr-card p { margin: 0 0 .7em; color: #c3c9d1; font-size: .95em; }
.hr-card .hr-dim { color: #7d8590; font-size: .8em; }
.hr-card .btns { display: flex; flex-wrap: wrap; gap: .6em; margin: 1em 0 .8em; }
.hr-card .btn { font-size: .85em; }
.hr-card.report { width: min(40em, 94%); }
.hr-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8em; margin: .6em 0 1em; }
.hr-stats b { display: block; font: 700 1.9em/1 var(--display); }
.hr-stats span { display: block; font-size: .72em; color: #7d8590; margin-top: .35em; }
.hr-hire { font-size: 1.05em !important; color: #e8eaed !important; padding: .7em .9em; border-left: 3px solid var(--accent); background: rgba(255,255,255,.04); border-radius: 0 .5em .5em 0; }

/* ============ PHISHING OR NOT? (app on the monitor) ============ */
/* shares .hr-top / .hr-card / .hr-stats with the Helpdesk Quiz; the reading pane is light, like a mail app */
.ph { position: absolute; inset: 0; display: flex; flex-direction: column; color: #e8eaed; font-size: clamp(8px, 2.5cqh, 17px); background: #0a0c10; }
.ph kbd { font: 600 .8em var(--mono); padding: .1em .4em; border-radius: .3em; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); }
.ph[data-state="intro"] .hr-modal, .ph[data-state="report"] .hr-modal { display: grid; }
.ph[data-state="intro"] .ph-main, .ph[data-state="report"] .ph-main { visibility: hidden; }
.ph-main { flex: 1; min-height: 0; display: flex; gap: .9em; padding: .9em 1.1em; }
.ph-mail { flex: 1; min-width: 0; overflow: auto; padding: 1em 1.3em; border-radius: .6em; background: #f6f6f3; color: #1d1f24; box-shadow: 0 .5em 1.6em rgba(0,0,0,.35); animation: hr-in .25s ease-out; scrollbar-width: thin; }
.ph-head { display: flex; align-items: center; gap: .7em; }
.ph-avatar { flex: none; width: 2.4em; height: 2.4em; border-radius: 50%; display: grid; place-items: center; font: 700 .85em var(--sans); color: #fff; background: #5b6b8c; }
.ph-who { min-width: 0; line-height: 1.35; }
.ph-who b { font-size: .95em; }
.ph-addr { font: 400 .78em var(--mono); color: #5d636c; padding: .05em .2em; border-radius: .25em; word-break: break-all; }
.ph-who small { display: block; font-size: .72em; color: #7c828b; }
.ph-subject { font: 700 1.2em/1.25 var(--sans); margin: .7em 0 .5em; padding: .05em .2em; border-radius: .25em; color: #15171b; }
.ph-body { font-size: .9em; line-height: 1.5; color: #2b2f36; }
.ph-body p { margin: 0 0 .65em; }
.ph-body mark { background: none; color: inherit; padding: 0 .1em; border-radius: .2em; }
.ph-link { color: #1f5fbf; text-decoration: underline; cursor: pointer; padding: .05em .15em; border-radius: .2em; font-weight: 600; }
.ph-attach { display: inline-flex; align-items: center; gap: .5em; margin-top: .2em; padding: .45em .7em; border-radius: .45em; border: 1px solid #d7d9dd; background: #fff; font: 500 .82em var(--mono); color: #2b2f36; }
.ph-attach i { font-style: normal; }
/* after the answer: clues light up, red for phishing, green for the signs that it's safe */
.ph-mail.is-phish .hit, .ph-mail.is-phish .ph-body mark { background: rgba(239,68,68,.18); outline: 2px solid #ef4444; outline-offset: 1px; }
.ph-mail.is-safe .hit, .ph-mail.is-safe .ph-body mark { background: rgba(34,197,94,.16); outline: 2px solid #22c55e; outline-offset: 1px; }
.ph-side { flex: none; width: 13.5em; display: flex; flex-direction: column; gap: .8em; min-height: 0; overflow: auto; }
.ph-actions { display: grid; gap: .55em; }
.ph-btn { display: flex; align-items: center; justify-content: space-between; gap: .5em; padding: .8em .9em; border-radius: .6em; cursor: pointer; font: 600 1em var(--sans); color: #e8eaed; background: #151820; border: 1px solid #262b35; transition: border-color .15s, background .15s, transform .15s; }
.ph-btn.safe:hover:not(:disabled) { border-color: #22c55e; background: rgba(34,197,94,.12); transform: translateY(-.1em); }
.ph-btn.phish:hover:not(:disabled) { border-color: #ef4444; background: rgba(239,68,68,.12); transform: translateY(-.1em); }
.ph-btn:disabled { cursor: default; opacity: .45; }
.ph-btn.chosen { opacity: 1; border-color: #e8eaed; }
.ph-fb:empty { display: none; }
.ph-fb { padding: .8em .9em; border-radius: .6em; background: #12151c; border: 1px solid #262b35; font-size: .85em; }
.ph-verdict { display: block; font-size: 1.05em; }
.ph-verdict.ok { color: #22c55e; } .ph-verdict.bad { color: #ef4444; }
.ph-verdict u { text-decoration: none; color: #e8eaed; }
.ph-fb p { margin: .45em 0 .8em; color: #c3c9d1; line-height: 1.45; }
.ph-fb .btn { font-size: .9em; }
.ph-status { flex: none; padding: .45em 1.1em; border-top: 1px solid #1c2028; background: #0d1015; font: 400 .72em var(--mono); color: #8b949e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-status b { color: #f2c230; font-weight: 600; }
@container (max-width: 520px) { .ph-main { flex-direction: column; } .ph-side { width: auto; } .ph-actions { grid-template-columns: 1fr 1fr; } }

/* ============ CV ESSENTIALS (17 Nov audit fixes) ============ */
/* Boot screen: name, role and the CV/contact buttons first; the desk opens by itself */
.boot-inner { width: min(680px, 88vw); }
.boot-id { margin-bottom: 26px; }
.boot-id .eyebrow { font-size: 12px; }
.boot-id h1 { font: 700 clamp(34px, 6vw, 52px)/1.05 var(--display); margin: 10px 0 8px; letter-spacing: -0.01em; color: var(--ink); }
.boot-role { font: 500 clamp(15px, 2.2vw, 18px)/1.45 var(--sans); color: #c7cdd4; margin: 0 0 18px; }
.boot-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.boot-cta .btn { font-size: 14px; padding: 10px 16px; }
.boot-cta .btn.quiet { border-color: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
/* the three log rows and the button are in the HTML from the first paint, so the card never moves (2 Dec) */
#boot-log { min-height: 0; margin: 0 0 16px; font-size: 12px; opacity: .8; }
#boot-log span { display: block; color: #5c636c; }
#boot-log span.ok { color: #34d399; }
#boot-enter {
  position: relative; overflow: hidden; animation: none;
  background: rgba(255, 255, 255, 0.06); color: var(--ink); border: 1px solid var(--line); box-shadow: none;
  padding: 10px 18px; font-size: 12px;
}
/* the right words per device: "tap" on touch-only screens, "press Enter" with a mouse/trackpad + keyboard */
#boot-enter span::after { content: " · tap to open"; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { #boot-enter span::after { content: " · press Enter"; } }
#boot-enter.paused span::after { content: " · paused while you read"; }
#boot-enter.waiting span::after { content: " · preparing the 3D…"; }
/* the bar fills with the real start-up steps (--done on #boot, set by js/boot.js) */
#boot-enter i, .boot-back i { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--accent);
  width: calc(var(--done, 0) * 100%); transition: width .3s ease-out; }
#boot-enter:hover { border-color: rgba(255, 255, 255, 0.3); }
/* returning visitors (js/boot-gate.js): a small "Welcome back" in a corner instead of the full card */
.boot-back { display: none; }
html.boot-return .boot-inner { display: none; }
html.boot-return .boot-back {
  display: block; position: absolute; left: 20px; bottom: 18px; margin: 0; padding: 9px 14px 11px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.04);
  font: 500 13px var(--sans); color: var(--ink);
}
.boot-back span { color: var(--muted); }

/* Top bar: Download CV and Email always in view */
.topbar #nav { margin-left: auto; }
.cta { display: flex; gap: 8px; flex: none; }
.cta .pill { padding: 8px 14px; }
.cta .cta-cv { background: var(--accent); border-color: var(--accent); color: #fff; }
.cta .cta-cv:hover { filter: brightness(1.1); border-color: var(--accent); }

/* Summary card on the desk view: who I am, readable without clicking */
.idcard {
  position: absolute; left: 20px; bottom: 18px; z-index: 5; max-width: min(360px, 42vw);
  padding: 14px 16px; border-radius: 14px; background: rgba(10, 12, 16, 0.78); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; flex-direction: column; gap: 3px; transition: opacity .35s, transform .35s;
}
.idcard.off { opacity: 0; transform: translateY(8px); pointer-events: none; }
.idcard > b { font: 700 17px/1.2 var(--display); color: var(--ink); }
.idcard .role { font: 500 13.5px/1.35 var(--sans); color: #d6dbe1; }
.idcard .meta { font: 400 12px var(--mono); color: #aab2bd; }
.idcard .meta i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; margin-right: 6px; vertical-align: 1px; }
.idcard ul { list-style: none; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); display: grid; gap: 3px; }
.idcard li { font: 400 12.5px/1.35 var(--sans); color: #c7cdd4; }
.idcard li b { color: var(--ink); font-family: var(--display); margin-right: 3px; }

/* Projects as case studies (viewfinder and Lite) */
.cs { margin: 8px 0 0; display: grid; gap: 8px; }
.cs-row { display: grid; grid-template-columns: 6.2em 1fr; gap: 10px; }
.cs dt { font: 600 11px/1.6 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); }
.cs dd { margin: 0; font-size: 14px; line-height: 1.5; color: #c3c9d1; }
#lite .cs dd { font-size: 15px; color: var(--muted); }
/* Result first, highlighted (18 Nov) */
.cs-row.cs-result { padding: 8px 10px; margin: 0 -10px; border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, transparent); border-left: 2px solid var(--accent); }
.cs .cs-result dd, #lite .cs .cs-result dd { color: var(--ink); font-weight: 500; }
/* project picture on the Lite page (loaded only when scrolled to) */
.l-shot { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 12px; margin: 10px 0 4px;
  border: 1px solid var(--line); background: #111318; }

@media (max-width: 760px) {
  .cta .pill:not(.cta-cv) { display: none; }
  /* bottom: clears the two rows the bottom bar wraps into on a phone since the mood pill was added */
  .idcard { left: 12px; right: 12px; bottom: 106px; max-width: none; }
  .hud { left: 12px; }
  .idcard ul { display: none; }
  .cs-row { grid-template-columns: 1fr; gap: 2px; }
}
/* no project photo yet: a slim strip, so the case study (and its Result) fits without scrolling */
.vf-frame.no-img { aspect-ratio: 16 / 3.2; }
.vf-frame.no-img .vf-ph span { font-size: 18px; }
/* System Monitor: the real parts list (17 Nov) */
.sm-build { padding: .7em .8em; border-radius: .5em; background: #111318; border: 1px solid #1e2129; }
.sm-build h3 { margin: 0 0 .5em; font: 600 .95em var(--sans); }
.sm-build h3 small { color: #22c55e; font-weight: 500; margin-left: .5em; }
.sm-build dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35em 1em; }
.sm-build dl div { display: flex; gap: .6em; min-width: 0; }
.sm-build dt { color: #8b9097; font-size: .8em; flex: none; width: 5.2em; }
.sm-build dd { margin: 0; font-size: .85em; color: #e2e6ea; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ ZOOM + PC CLOSE-UP (17 Nov) ============ */
/* "Keep scrolling to open …": a small progress bar in the tooltip */
#tooltip .push { display: block; height: 3px; margin-top: 6px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
#tooltip .push u { display: block; height: 100%; background: var(--accent); transition: width .12s; }
#tooltip .pc-more { display: block; margin: 6px 0 0; color: var(--accent-text); font-size: 11px; }

/* PC part labels: a dot on the part, the part type; hover or focus shows the exact model */
#parts { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .35s; }
#parts.on { opacity: 1; }
#parts.on .plabel { pointer-events: auto; }
.plabel {
  position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 7px; cursor: default; outline: none;
  padding: 4px 10px 4px 4px; border-radius: 999px; white-space: nowrap; margin: -12px 0 0 -6px;
  background: rgba(8, 10, 14, 0.78); border: 1px solid var(--line); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font: 500 12px/1 var(--mono); color: var(--ink); transition: border-color .2s, background .2s;
}
.plabel i { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.plabel span { display: none; color: #c7cdd4; font-family: var(--sans); font-size: 12.5px; }
.plabel:hover, .plabel:focus-visible { border-color: var(--accent); background: rgba(8, 10, 14, 0.94); z-index: 2; }
.plabel:hover span, .plabel:focus-visible span { display: inline; }
.plabel:hover b, .plabel:focus-visible b { color: var(--accent-text); }

/* ---------- desk-os: CV.pdf, the CV read inside the monitor (js/cv-app.js, 23 Nov) ---------- */
.cvapp { position: absolute; inset: 0; display: flex; flex-direction: column; background: #1a1c21; }
.cvapp-bar { flex-shrink: 0; display: flex; align-items: center; gap: .6em; padding: .45em .8em; background: #121419; border-bottom: 1px solid #1e2129; }
.cvapp-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 600 .9em var(--sans); }
.cvapp-title small { color: #8b9097; font-weight: 400; }
.cvapp-zoom { display: flex; align-items: center; border: 1px solid #2a2e37; border-radius: 999px; }
.cvapp-zoom button { width: 2em; height: 1.9em; border: 0; background: none; color: #c3c9d1; cursor: pointer; font: 600 1em/1 var(--sans); border-radius: 999px; }
.cvapp-zoom button:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.cvapp-zoom output { min-width: 3.2em; text-align: center; font: 500 .78em var(--mono); color: #aab2bd; }
.cvapp-bar .btn { font-size: .78em; padding: .55em 1em; white-space: nowrap; }
.cvapp-bar .btn svg { width: 1.15em; height: 1.15em; }
.cvapp-scroll { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; overscroll-behavior: contain; }
.cvapp-scroll:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -2px; }
.cvapp-pages { display: flex; flex-direction: column; align-items: center; gap: 1em; padding: 1em; width: max-content; min-width: 100%; }
.cvapp-sheet { position: relative; flex: none; width: min(100%, 900px); aspect-ratio: 210 / 297; background: #fff; border-radius: 2px; box-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .5); overflow: hidden; }
.cvapp-sheet canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cvapp-sheet.loading { width: min(70cqw, 900px); opacity: .1; }
.cvapp-note { color: #aab2bd; text-align: center; max-width: 30em; font-size: .9em; }
.cvapp-note a { color: var(--accent-text); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* a small monitor (phones, small windows): only the essentials in the bar */
@container (max-width: 520px) {
  .cvapp-desk, .cvapp-title small { display: none; }
  .cvapp-bar { gap: .4em; padding: .4em .5em; }
  .cvapp-pages { padding: .5em; gap: .5em; }
}
