/* Layout: one fixed 3D stage; a seated overlay on top; the laptop's desktop takes over the viewport when you "sit closer". */
:root {
  /* colour: a desk at night, lit by an orange anglepoise */
  --night: #08090c;
  --panel: #121419;
  --raised: #1b1e25;
  --line: rgba(236, 232, 225, .09);
  --text: #ece8e1;
  --muted: #8d8880;
  --lamp: #4f7cff;
  --lamp-soft: rgba(79, 124, 255, .18);
  --brand-blue: #0001ff;
  --sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --mb: 37px; /* macOS menu bar on a notched MacBook */
  --brand-yellow: #fbfd00;
  /* type */
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Geist", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist", -apple-system, "Helvetica Neue", Arial, sans-serif;  /* no monospace on this site */
  --hand: "Caveat", "Bradley Hand", cursive;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body { margin: 0; background: var(--night); color: var(--text); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
img { max-width: 100%; }

/* the desk: a Cycles render with a few live layers on top */
.stage { position: fixed; inset: 0; overflow: hidden; background: #020203; }
.stage-frame { position: absolute; inset: 0; will-change: transform; transition: filter 2.4s cubic-bezier(.2,.8,.2,1), opacity 1.6s ease; }
.stage-frame.intro { filter: blur(14px) brightness(.55); opacity: 0; }
.stage-img, .stage-video { position: absolute; max-width: none; user-select: none; -webkit-user-drag: none; }
.stage-video { opacity: 0; transition: opacity .15s; }
.stage-video.on { opacity: 1; }
.stage-glow { position: absolute; inset: 0; background: rgba(210, 225, 255, .1); mix-blend-mode: screen; opacity: 0; transition: opacity .35s; pointer-events: none; }
.stage-frame.hover .stage-glow { opacity: 1; }
.stage-steam { position: absolute; pointer-events: none; mix-blend-mode: screen; }
.hero-canvas { position: absolute; inset: 0; display: block; animation: hero-in 2.2s cubic-bezier(.2,.8,.2,1) both; }
@keyframes hero-in { from { filter: blur(14px) brightness(.5); opacity: 0; } }
.stage-hot { position: absolute; background: none; border: 0; padding: 0; cursor: pointer; border-radius: 12px; }
.stage-hot:focus-visible { outline: 2px solid var(--lamp); outline-offset: 6px; }

/* ---------- seat overlay ---------- */
.seat { position: fixed; inset: 0; pointer-events: none; z-index: 5; transition: opacity .6s var(--ease); }
.seat.away { opacity: 0; }
.seat-top {
  position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) 24px 0; pointer-events: none;
}
.seat-top > * { pointer-events: auto; }
/* a soft shade in the two top corners keeps the logo and buttons legible over the posters, and leaves the shelf clear */
.seat::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 120px; pointer-events: none;
  background: radial-gradient(40% 120% at 0 0, rgba(4, 4, 10, .55), transparent 70%), radial-gradient(30% 120% at 100% 0, rgba(4, 4, 10, .5), transparent 70%); }
.sig { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #ffffff; }
.sig-logo { display: block; height: 34px; width: auto; filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .55)); }
.seat-nav { display: flex; gap: 8px; align-items: center; }
.bar-btn { border: 0; border-radius: 999px; padding: 10px 18px; font: 600 13.5px/1 var(--body); transition: transform .15s var(--ease), background .15s, box-shadow .15s; }
.bar-btn:hover { transform: translateY(-1px); }
.bar-btn:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
.bar-btn-yellow { background: var(--brand-yellow); color: var(--brand-blue); box-shadow: 0 6px 24px rgba(251, 253, 0, .18); }
.bar-btn-yellow:hover { box-shadow: 0 8px 28px rgba(251, 253, 0, .32); }

.seat-nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pill {
  border: 1px solid var(--line); background: rgba(18, 20, 25, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 8px 14px; border-radius: 999px; font-size: 13px; color: var(--text); transition: background .2s, border-color .2s;
}
.pill:hover { border-color: rgba(236, 232, 225, .3); }
.pill-solid { background: var(--lamp); border-color: var(--lamp); color: #ffffff; font-weight: 600; }
.pill-solid:hover { background: #6b91ff; }
.seat-hint {
  position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 26px); transform: translateX(-50%);
  margin: 0; font: 400 12.5px/1 var(--mono); color: rgba(236, 232, 225, .85); white-space: nowrap;
  padding: 9px 14px; border-radius: 999px; background: rgba(10, 11, 14, .6); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.kbd { border: 1px solid var(--line); border-radius: 5px; padding: 3px 6px; margin-right: 6px; color: var(--text); }
.hover-tag {
  position: fixed; left: 0; top: 0; padding: 10px 14px 11px; border-radius: 12px; background: rgba(12, 13, 16, .84);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line);
  opacity: 0; transform: translate(-9999px, 0); transition: opacity .18s; pointer-events: none;
  max-width: min(300px, 80vw); text-align: center; box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}
.hover-tag::after { content: ""; position: absolute; left: var(--arrow-x, 50%); bottom: -6px; width: 10px; height: 10px; margin-left: -5px; transform: rotate(45deg);
  background: rgba(12, 13, 16, .84); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hover-tag.below::after { bottom: auto; top: -6px; border: 0; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.hover-tag.on { opacity: 1; }
.hover-tag b { display: block; font: 700 16px/1.15 var(--display); font-stretch: 108%; margin-bottom: 3px; }
.hover-tag span { display: block; font: 400 12.5px/1.4 var(--body); color: rgba(236, 232, 225, .78); }
.hover-tag.go span::after { content: " ↗"; color: var(--lamp); }

/* ---------- popups ---------- */
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px; background: rgba(4, 4, 8, .62);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity .26s var(--ease); }
.modal[hidden] { display: none; }
.modal.on { opacity: 1; }
.modal-card { position: relative; max-width: min(860px, 100%); max-height: calc(100dvh - 48px); display: flex; border-radius: 16px; overflow: hidden;
  background: #16171b; border: 1px solid var(--line); box-shadow: 0 40px 100px rgba(0, 0, 0, .6); transform: translateY(14px) scale(.98); transition: transform .32s var(--ease); }
.modal.on .modal-card { transform: none; }
.modal-body { overflow: auto; }
.modal[data-kind="poster"] .modal-card { max-width: min(1100px, 100%); background: #000; }
.modal[data-kind="poster"] .modal-body img { display: block; max-width: 100%; max-height: calc(100dvh - 48px); object-fit: contain; }
.modal-close { position: absolute; top: 10px; right: 10px; z-index: 1; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(12, 13, 16, .7); font-size: 22px; line-height: 1; display: grid; place-items: center; }
.modal-close:hover { background: rgba(40, 42, 50, .9); }

/* ---------- loader: the app icon over a blurred copy of the desk; the blur clears into the live scene ---------- */
.loader { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; color: #ffffff; overflow: hidden; background: #05060c; transition: opacity .9s var(--ease); }
.loader-bg { position: absolute; inset: -40px; background: url(../assets/scene/blur.jpg) center / cover; filter: blur(26px) saturate(1.2) brightness(.62); transform: scale(1.06); }
.loader.done { opacity: 0; pointer-events: none; }
.loader-inner { position: relative; display: grid; gap: 18px; justify-items: center; transition: opacity .4s, transform .6s var(--ease); }
.loader.done .loader-inner { opacity: 0; transform: scale(.92); }
.loader-mark { width: 84px; height: auto; overflow: visible; fill: var(--brand-yellow); filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .5)); animation: lm-pop .6s cubic-bezier(.3, 1.5, .5, 1) both; }
.loader-mark path { transform-box: fill-box; }
.lm-c1, .lm-c2 { transform-origin: 50% 100%; animation: lm-drop .7s .2s cubic-bezier(.3, 1.6, .5, 1) both, lm-blink 3.2s 1.6s ease-in-out infinite; }
.lm-c2 { animation-delay: .32s, 1.6s; }
.lm-smile { transform-origin: 50% 0; animation: lm-smile .7s .5s cubic-bezier(.3, 1.7, .5, 1) both; }
@keyframes lm-pop { from { transform: scale(.6); opacity: 0; } }
@keyframes lm-drop { from { transform: translateY(-60%) scaleY(1.2); opacity: 0; } }
@keyframes lm-smile { from { transform: translateY(40%) scaleX(.2); opacity: 0; } }
@keyframes lm-blink { 0%, 92%, 100% { transform: none; } 96% { transform: scaleY(.12); } }
.loader-bar { width: 180px; height: 3px; background: rgba(255, 255, 255, .2); overflow: hidden; border-radius: 3px; animation: lm-fade .6s .6s both; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--brand-yellow); transition: width .3s; }
@keyframes lm-fade { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .loader-mark, .loader-mark path, .loader-bar { animation: none; } }
.noscript { padding: 40px 20px; }

/* ================= Desktop OS ================= */
.os {
  position: fixed; inset: 0; z-index: 10; overflow: hidden; user-select: none; -webkit-user-select: none;
  opacity: 0; transition: opacity .5s var(--ease);
}
.os.on { opacity: 1; }
.screen-bg { position: fixed; left: 0; top: 0; z-index: 3; pointer-events: none; transform-origin: 0 0; background: url(../assets/img/wallpaper.jpg) center / cover; }
.os.docked { z-index: 4; pointer-events: none; transition: none; transform-origin: 0 0; will-change: transform; }
.os-wall { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.menubar {
  position: absolute; top: 0; left: 0; right: 0; height: calc(var(--mb) + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 14px 0;
  display: flex; align-items: center; gap: 20px; font: 400 13.5px/1 var(--sys); letter-spacing: -.005em; z-index: 900;
  background: rgba(10, 11, 14, .5); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.menubar .mark { display: block; height: 17px; width: auto; }
.menubar .app { font-weight: 600; }
.menubar .menu { color: rgba(255, 255, 255, .88); }
.menubar .spacer { flex: 1; }
.menubar .clock { font: 500 13.5px/1 var(--sys); color: #ffffff; font-variant-numeric: tabular-nums; }
.menubar button { background: none; border: 0; padding: 5px 8px; border-radius: 6px; font: 500 13.5px/1 var(--sys); color: #ffffff; }
.menubar button:hover { background: rgba(255, 255, 255, .08); }
.menubar .back { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.menubar .back b { font-weight: 500; }
.menubar .back-short { display: none; }

/* desktop icons */
.icons {
  position: absolute; top: calc(48px + env(safe-area-inset-top, 0px)); right: 22px; bottom: 110px;
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(auto-fill, 104px); grid-auto-columns: 96px; gap: 4px 6px; direction: rtl;
}
.icon { direction: ltr; display: grid; justify-items: center; align-content: start; gap: 6px; padding: 6px 4px; border-radius: 8px; background: none; border: 0; text-align: center; }
.icon:hover .icon-label, .icon:focus-visible .icon-label { background: var(--lamp); color: #ffffff; }
.icon-img { width: 58px; height: 58px; display: grid; place-items: center; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.icon-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 13px; }
.icon-label { font-size: 12px; line-height: 1.25; padding: 1px 6px; border-radius: 4px; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); max-width: 92px; }
.folder { width: 62px; height: 50px; position: relative; }
.folder::before { content: ""; position: absolute; left: 0; top: 0; width: 24px; height: 10px; border-radius: 4px 4px 0 0; background: var(--fc); filter: brightness(.8); }
.folder::after { content: ""; position: absolute; inset: 6px 0 0; border-radius: 4px 6px 6px 6px; background: linear-gradient(180deg, color-mix(in srgb, var(--fc) 100%, white 18%), var(--fc)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.folder img { position: absolute; z-index: 1; left: 9px; right: 9px; top: 12px; height: 30px; width: calc(100% - 18px); object-fit: cover; border-radius: 2px; transform: rotate(-3deg); box-shadow: 0 2px 4px rgba(0, 0, 0, .3); }
.doc-ico { width: 44px; height: 56px; background: #f4f1ea; border-radius: 3px 12px 3px 3px; position: relative; color: #222; font: 600 8px var(--mono); display: grid; align-content: end; padding: 6px; }
.doc-ico::before { content: ""; position: absolute; left: 7px; right: 7px; top: 9px; height: 26px; background: repeating-linear-gradient(#bbb 0 1px, transparent 1px 5px); }

/* desktop sticky note */
.sticky {
  position: absolute; left: 34px; top: calc(66px + env(safe-area-inset-top, 0px)); width: 220px; height: 220px; padding: 20px; background: #ffd66b; color: #2a2108;
  display: flex; flex-direction: column; cursor: pointer;
  transform: rotate(-2.5deg); box-shadow: 0 18px 30px rgba(0, 0, 0, .35); font: 600 23px/1.08 var(--hand);
}
.sticky b { display: block; font: 700 38px/1 var(--hand); margin: 4px 0 12px; }
.sticky small { display: block; margin-top: auto; font: 600 19px/1 var(--hand); color: rgba(42, 33, 8, .62); }

/* dock */
.dock {
  position: absolute; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 800;
  display: flex; align-items: flex-end; gap: 6px; padding: 7px; border-radius: 20px;
  background: rgba(24, 26, 32, .45); border: 1px solid rgba(255, 255, 255, .1); backdrop-filter: blur(26px) saturate(1.5); -webkit-backdrop-filter: blur(26px) saturate(1.5);
}
.dock-item { position: relative; width: 54px; height: 54px; border: 0; padding: 0; background: none; transition: transform .18s var(--ease), margin .18s var(--ease); transform-origin: 50% 100%; }
.dock-item:hover { transform: scale(1.32) translateY(-4px); margin: 0 9px; }
.dock-item .app-ico { width: 100%; height: 100%; border-radius: 13px; overflow: hidden; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(0, 0, 0, .35); }
.dock-item .app-ico img { width: 100%; height: 100%; object-fit: cover; }
.dock-item .tip {
  position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%) scale(.76); transform-origin: 50% 100%; white-space: nowrap; pointer-events: none;
  background: rgba(20, 22, 27, .9); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-size: 12px; opacity: 0; transition: opacity .12s;
}
.dock-item:hover .tip { opacity: 1; }
.dock-item.running::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: rgba(236, 232, 225, .8); }
.dock-sep { width: 1px; align-self: stretch; margin: 4px 3px; background: rgba(255, 255, 255, .14); }

/* generated app icons */
.ai { width: 100%; height: 100%; display: grid; place-items: center; font: 900 22px/1 var(--display); font-stretch: 125%; letter-spacing: -.04em; }
.ai-work { background: var(--brand-blue); position: relative; }
.ai-work img, .icon-img .ai-work img, .dock-item .app-ico .ai-work img { position: absolute; left: 21%; top: 19%; width: 58%; height: 62%; object-fit: contain; border-radius: 0; }
.ai-photos { background: conic-gradient(from 30deg, #0e7a3a, #19c37d, #f29a1f, #d8261d, #5b4bd6, #1f4fd1, #0e7a3a); }
.ai-photos::after { content: ""; width: 18px; height: 18px; border-radius: 50%; background: #f4f1ea; }
.ai-notes { background: linear-gradient(#ffd66b 0 26%, #fbf7ee 26%); color: #2a2108; font: 600 24px/1 var(--hand); padding-top: 12px; }
.ai-mail { background: linear-gradient(160deg, #3c4250, #1c1f26); color: var(--lamp); font-size: 26px; }
.ai-mail::before { content: "@"; font-family: var(--body); font-weight: 600; }

/* ---------- windows ---------- */
.win {
  position: absolute; display: flex; flex-direction: column; min-width: 320px; min-height: 220px;
  background: var(--panel); border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .35);
  transform-origin: var(--ox, 50%) var(--oy, 100%);
  animation: winIn .42s var(--ease);
}
.win.closing { animation: winOut .26s ease-in forwards; }
.win.blur { box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
.win.blur .titlebar { opacity: .75; }
@keyframes winIn { from { transform: scale(.25); opacity: 0; } }
@keyframes winOut { to { transform: scale(.3); opacity: 0; } }
.titlebar {
  flex: none; height: 40px; display: flex; align-items: center; gap: 12px; padding: 0 12px; cursor: grab;
  background: var(--raised); border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 500;
}
.titlebar:active { cursor: grabbing; }
.lights { display: flex; gap: 8px; }
.lights button { width: 12px; height: 12px; border-radius: 50%; border: 0; padding: 0; background: #3a3d45; }
.win:not(.blur) .lights .l-close { background: #ff5f57; }
.win:not(.blur) .lights .l-min { background: #febc2e; }
.win:not(.blur) .lights .l-max { background: #28c840; }
.titlebar .t-title { flex: 1; text-align: center; margin-right: 52px; color: rgba(236, 232, 225, .85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.win.max { border-radius: 0; }
.resize { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; }

/* ---------- Work (finder + case study) ---------- */
.work { display: grid; grid-template-columns: 200px 1fr; height: 100%; }
.side { background: rgba(255, 255, 255, .025); border-right: 1px solid var(--line); padding: 14px 10px; overflow: auto; }
.side h6 { margin: 12px 8px 6px; font: 500 10.5px var(--mono); color: var(--muted); }
.side button { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; border: 0; background: none; padding: 6px 8px; border-radius: 6px; font-size: 13px; }
.side button:hover { background: rgba(255, 255, 255, .05); }
.side button.on { background: var(--lamp-soft); color: #a9bfff; }
.side .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.pane { overflow: auto; min-width: 0; }

.grid-view { padding: 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.card { border: 0; background: none; padding: 0; text-align: left; display: grid; gap: 10px; }
.card-img { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--raised); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-img img { transform: scale(1.05); }
.card b { font: 800 18px/1.05 var(--display); font-stretch: 112%; }
.card span { font: 400 11px var(--mono); color: var(--muted); }

.case { padding: 0 0 60px; }
.case-hero { position: relative; height: min(56vh, 520px); overflow: hidden; background: #000; }
.case-hero img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.case-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, var(--panel)); }
.case-head { position: relative; margin-top: -120px; padding: 0 clamp(20px, 4vw, 48px); z-index: 1; }
.case-kind { font: 500 11px var(--mono); color: var(--lamp); }
.case-title { margin: 6px 0 0; font: 900 clamp(46px, 8vw, 112px)/.86 var(--display); font-stretch: 125%; letter-spacing: -.035em; text-wrap: balance; }
.case-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; margin: 28px 0 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.case-meta dt { font: 500 10.5px var(--mono); color: var(--muted); }
.case-meta dd { margin: 4px 0 0; font-size: 14px; }
.case-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); padding: 30px clamp(20px, 4vw, 48px) 10px; }
.case-text .lead { font: 500 clamp(19px, 2vw, 24px)/1.35 var(--body); margin: 0; letter-spacing: -.01em; max-width: 34ch; }
.case-text p { margin: 0; color: rgba(236, 232, 225, .78); max-width: 60ch; }
.sec { padding: 34px clamp(20px, 4vw, 48px) 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.sec-head h3 { margin: 0; font: 800 22px/1 var(--display); font-stretch: 112%; letter-spacing: -.01em; }
.sec-head h3 small { margin-left: 10px; font: 500 14px var(--body); color: var(--muted); }
.sec-head span { font: 400 12px var(--mono); color: var(--muted); }
.masonry { columns: 3 260px; column-gap: 14px; }
.masonry.one { columns: 1; }
.shot { break-inside: avoid; margin: 0 0 14px; border: 0; padding: 0; background: var(--raised); display: block; width: 100%; border-radius: 6px; overflow: hidden; position: relative; cursor: zoom-in; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { position: absolute; left: 8px; bottom: 8px; font: 400 10.5px var(--mono); background: rgba(0, 0, 0, .6); padding: 3px 6px; border-radius: 4px; opacity: 0; transition: opacity .2s; }
.shot:hover figcaption { opacity: 1; }
.case-next { margin: 46px clamp(20px, 4vw, 48px) 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; border-top: 1px solid var(--line); }
.case-next button { background: none; border: 0; text-align: right; display: grid; }
.case-next small { font: 400 11px var(--mono); color: var(--muted); }
.case-next b { font: 900 clamp(26px, 4vw, 44px)/1 var(--display); font-stretch: 125%; letter-spacing: -.03em; }
.case-next button:hover b { color: var(--lamp); }

/* quick look */
.ql { position: absolute; inset: 0; z-index: 1000; background: rgba(4, 5, 7, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; grid-template-rows: auto 1fr auto; animation: fadeIn .25s; }
@keyframes fadeIn { from { opacity: 0; } }
.ql-bar { display: flex; justify-content: space-between; align-items: center; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px; font: 400 12px var(--mono); color: var(--muted); gap: 12px; }
.ql-bar b { color: var(--text); font-weight: 500; }
.ql-stage { display: grid; place-items: center; min-height: 0; padding: 0 64px; }
.ql-stage video { max-width: 100%; max-height: 100%; border-radius: 4px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.ql-stage [hidden] { display: none; }
.ql-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.ql-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(20, 22, 27, .7); font-size: 18px; }
.ql-nav.prev { left: 12px; } .ql-nav.next { right: 12px; }
.ql-close { background: rgba(255, 255, 255, .08); border: 0; border-radius: 6px; padding: 6px 10px; font-size: 12px; }
.ql-strip { display: flex; gap: 6px; overflow-x: auto; padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); justify-content: safe center; }
.ql-strip button { flex: none; width: 64px; height: 44px; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; background: none; opacity: .55; }
.ql-strip button.on { border-color: var(--lamp); opacity: 1; }
.ql-strip img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Photos ---------- */
.photos { display: grid; grid-template-rows: auto 1fr; height: 100%; }
.photos-bar { display: flex; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.photos-bar button { flex: none; border: 1px solid var(--line); background: none; border-radius: 999px; padding: 5px 12px; font-size: 12px; }
.photos-bar button.on { background: var(--text); color: var(--night); border-color: var(--text); }
.photos-grid { overflow: auto; padding: 4px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: 150px; gap: 4px; }
.photos-grid button { border: 0; padding: 0; overflow: hidden; background: var(--raised); }
.photos-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.photos-grid button:hover img { transform: scale(1.06); }

/* ---------- Notes (about) ---------- */
.notes { display: grid; grid-template-columns: 190px 1fr; height: 100%; background: #16171b; }
.notes-list { border-right: 1px solid var(--line); padding: 10px; }
.notes-list div { padding: 10px; border-radius: 8px; background: rgba(255, 214, 107, .14); }
.notes-list b { display: block; font-size: 13px; } .notes-list span { font-size: 11.5px; color: var(--muted); }
.note-doc { overflow: auto; padding: 30px clamp(20px, 4vw, 44px) 50px; user-select: text; -webkit-user-select: text; }
.note-doc .date { font: 400 11px var(--mono); color: var(--muted); text-align: center; margin-bottom: 18px; }
.note-doc h1 { font: 900 clamp(34px, 5vw, 58px)/.9 var(--display); font-stretch: 125%; letter-spacing: -.035em; margin: 0 0 18px; }
.note-doc p { max-width: 58ch; color: rgba(236, 232, 225, .82); margin: 0 0 14px; }
.note-doc .now { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 24px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; }
.note-doc .now dt { font: 500 11px var(--mono); color: var(--muted); padding-top: 2px; }
.note-doc .now dd { margin: 0; }
.note-doc .note-h2 { font: 900 22px/1 var(--display); font-stretch: 118%; letter-spacing: -.01em; margin: 30px 0 10px; }
.note-doc .likes { list-style: none; padding: 0; margin: 0 0 26px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.note-doc .likes li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: rgba(255, 255, 255, .02); }
.note-doc .likes b { display: block; font-size: 14px; }
.note-doc .likes span { font-size: 13px; color: var(--muted); }
.cv-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.cv-mark { width: 60px; height: 60px; border-radius: 14px; flex: none; }
/* in the popup the close button sits top right, so keep the name clear of it */
.modal .cv-head { padding-right: 56px; }
.note-doc.cv h1 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.04; letter-spacing: -.02em; margin: 0; }
.note-doc .cv-role { margin: 8px 0 0; font: 500 12px var(--mono); color: var(--brand-yellow); }
.cv-about p { font-size: 16px; line-height: 1.6; color: var(--text); max-width: 62ch; }
.cv-fold { border-top: 1px solid var(--line); }
.cv-fold:last-of-type { border-bottom: 1px solid var(--line); }
.cv-fold summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 16px 0; cursor: pointer; font: 700 18px/1 var(--display); font-stretch: 108%; }
.cv-fold summary::-webkit-details-marker { display: none; }
.cv-fold summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .2s var(--ease); margin-right: 4px; }
.cv-fold[open] summary::before { transform: rotate(45deg); }
.cv-fold summary small { font: 500 12px var(--body); color: var(--muted); }
.cv-fold summary:hover span { color: #ffffff; }
.cv-fold ol { list-style: none; margin: 0 0 14px; padding: 0 0 0 22px; }
.cv-fold li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.cv-fold li:first-child { border-top: 0; }
.note-doc.cv .note-h2 { text-transform: none; font-size: 20px; }
.cv-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cv-line b { font-size: 15px; }
.cv-line span { font: 500 11.5px var(--mono); color: var(--muted); }
.cv-org { margin: 2px 0 0 !important; color: var(--muted) !important; font-size: 13.5px; }
.cv-links { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.cv-links a { overflow-wrap: anywhere; color: #4c9aff; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.cv-links a:hover { color: #7ab4ff; }
.note-doc .hand { font: 600 26px/1.1 var(--hand); color: var(--lamp); transform: rotate(-1.5deg); display: inline-block; }

/* ---------- Mail (contact) ---------- */
.mail { display: grid; grid-template-rows: auto auto 1fr auto; height: 100%; }
.mail-row { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.mail-row label { color: var(--muted); font-size: 13px; }
.mail-row input { background: none; border: 0; color: var(--text); font: inherit; outline: none; min-width: 0; }
.mail-row .addr { user-select: text; -webkit-user-select: text; font-family: var(--mono); font-size: 13px; }
.mail textarea { width: 100%; height: 100%; resize: none; border: 0; background: none; color: var(--text); font: 15px/1.6 var(--body); padding: 18px; outline: none; }
.mail-foot { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.mail-foot .links { display: flex; gap: 6px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--raised); border-radius: 8px; padding: 7px 12px; font-size: 13px; text-decoration: none; color: var(--text); }
.btn:hover { border-color: rgba(236, 232, 225, .3); }
.btn-hot { background: var(--lamp); border-color: var(--lamp); color: #ffffff; font-weight: 600; }
.btn-hot:hover { background: #6b91ff; }
.toast { position: absolute; left: 50%; bottom: 110px; transform: translateX(-50%); z-index: 1200; background: rgba(20, 22, 27, .95); border: 1px solid var(--line); padding: 9px 14px; border-radius: 8px; font-size: 13px; animation: fadeIn .2s; }

/* ---------- HolyMole app ---------- */
.hm { min-height: 100%; background: radial-gradient(120% 80% at 80% 0%, #8a4cff 0%, #4b23c9 40%, #1b0f4a 100%); color: #fff; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(20px, 4vw, 50px); padding: clamp(22px, 4vw, 46px); align-items: center; }
.hm-brand { display: flex; align-items: center; gap: 12px; }
.hm-brand img { width: 52px; height: 52px; border-radius: 13px; }
.app-meta { margin: -4px 0 14px; font-size: 13px; color: var(--muted); }
.hm-brand b { font: 800 30px/1 "Baloo 2", var(--display); letter-spacing: -.01em; }
.hm h2 { font: 900 clamp(40px, 6vw, 76px)/.9 var(--display); font-stretch: 125%; letter-spacing: -.03em; margin: 22px 0 14px; }
.hm h2 em { font-style: normal; color: #d6ff4b; }
.hm p { max-width: 46ch; color: rgba(255, 255, 255, .82); margin: 0 0 18px; }
.hm ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hm li { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 12px 14px; }
.hm li b { display: block; font-size: 14px; } .hm li span { font-size: 12.5px; color: rgba(255, 255, 255, .7); }
.hm .play { display: inline-flex; gap: 8px; align-items: center; background: #d6ff4b; color: #221733; font-weight: 700; padding: 13px 22px; border-radius: 999px; text-decoration: none; }
.device { position: relative; width: clamp(210px, 22vw, 270px); aspect-ratio: 9 / 19.2; border-radius: 40px; padding: 10px; background: #0b0b0d; box-shadow: 0 40px 80px rgba(0, 0, 0, .5), inset 0 0 0 2px #2a2a2e; }
.device .scr { width: 100%; height: 100%; border-radius: 31px; overflow: hidden; position: relative; background: #000; }
.device .scr img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s; }
.device .scr img.on { opacity: 1; }
.device-dots { display: flex; gap: 6px; justify-content: center; margin-top: 14px; }
.device-dots button { width: 7px; height: 7px; border-radius: 50%; border: 0; padding: 0; background: rgba(255, 255, 255, .35); }
.device-dots button.on { background: #fff; width: 18px; border-radius: 4px; }

/* ---------- Tinkerman app ---------- */
.tk { min-height: 100%; background: #0d0d0d; color: #f2f2f2; display: grid; grid-template-columns: 210px minmax(0, 1fr) auto; }
.tk-nav { border-right: 1px solid #222; padding: 18px 12px; display: grid; align-content: start; gap: 4px; }
.tk-logo { display: flex; align-items: center; gap: 10px; font: 700 18px var(--body); padding: 0 8px 18px; }
.tk-logo img { width: 30px; height: 30px; border-radius: 8px; }
.tk-nav button { text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 10px; font-size: 14px; color: #9a9a9a; }
.tk-nav button.on { background: #ebff00; color: #0d0d0d; font-weight: 600; }
.tk-main { padding: clamp(22px, 3vw, 40px); min-width: 0; }
.tk-kicker { font: 600 11px var(--body); color: #ebff00; }
.tk h2 { font: 800 clamp(34px, 4.6vw, 58px)/.95 var(--body); letter-spacing: -.03em; margin: 8px 0 14px; }
.tk p { color: #b5b5b5; max-width: 48ch; margin: 0 0 20px; }
.tk ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; max-width: 520px; }
.tk li { border: 1px solid #262626; border-radius: 14px; padding: 12px 14px; background: #151515; }
.tk li b { display: block; font-size: 14px; } .tk li span { font-size: 13px; color: #9a9a9a; }
.tk .go { display: inline-flex; gap: 8px; background: #ebff00; color: #0d0d0d; font-weight: 700; padding: 12px 20px; border-radius: 999px; text-decoration: none; }
.tk-device { padding: clamp(22px, 3vw, 40px) clamp(22px, 3vw, 40px) clamp(22px, 3vw, 40px) 0; display: grid; align-content: center; }
.tk .device { background: #050505; }

/* ---------- small screens: the desktop behaves like a phone ---------- */
@media (max-width: 760px) {
  .sig-logo { height: 32px; }
  .bar-btn { padding: 9px 13px; font-size: 12.5px; }
  .seat-hint { font-size: 12px; }
  .icons { left: 16px; right: 16px; top: calc(44px + env(safe-area-inset-top, 0px)); bottom: auto; grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(4, 1fr); grid-auto-columns: auto; direction: ltr; }
  .sticky { display: none; }
  .win { left: 0 !important; top: calc(var(--mb) + env(safe-area-inset-top, 0px)) !important; width: 100% !important; height: calc(100% - var(--mb) - 76px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important; border-radius: 0 0 14px 14px; border: 0; min-width: 0; }
  .menubar { gap: 10px; }
  .menubar .snd { display: none; }
  .menubar .back-full { display: none; }
  .menubar .back-short { display: inline; }
  .seat-hint .kbd { display: none; }
  .titlebar { height: 46px; }
  .resize { display: none; }
  .work, .notes { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 4px; overflow-x: auto; padding: 8px; }
  .side h6 { display: none; }
  .side button { width: auto; flex: none; }
  .notes-list { display: none; }
  .case-text { grid-template-columns: 1fr; }
  .hm, .tk { grid-template-columns: 1fr; }
  .tk-nav { display: flex; border-right: 0; border-bottom: 1px solid #222; overflow-x: auto; }
  .tk-logo { padding: 0 8px 0 0; }
  .tk-device { padding: 0 22px 30px; justify-items: center; }
  .hm .device { justify-self: center; }
  .hm ul { grid-template-columns: 1fr; }
  .dock { gap: 4px; padding: 6px; }
  .dock-item { width: 46px; height: 46px; }
  .dock-item:hover { transform: none; margin: 0; }
  .ql-stage { padding: 0 8px; }
  .ql-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .win, .win.closing, .ql, .toast { animation: none; }
  * { transition-duration: .01ms !important; }
}
