/* ==========================================================================
   eldouma.dev · Rev 2 · "The room is the menu"
   A live video of Moe's room. Objects in the room are annotated in hand-drawn
   ink; the marks are motion-tracked to the footage. Clicking one dives the
   camera into the object and opens its section through an iris.
   Palette taken from the room: walnut dark, warm lamp amber, harbour cyan.
   ========================================================================== */
:root {
  --bg: #0c0a08;
  --surface: #16120f;
  --surface-2: #1d1814;
  --paper: #f3ece1;
  --ink: #f4efe8;
  --ink-2: #c8bfb3;
  --muted: #8d8378;
  --line: rgba(244, 239, 232, 0.1);
  --line-2: rgba(244, 239, 232, 0.2);
  --amber: #ffb547;
  --amber-2: #e8952a;
  --cyan: #6fd6ee;
  --green: #5fdc9e;
  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --f-hand: "Caveat", "Segoe Print", cursive;
  --pad: clamp(16px, 2.6vw, 40px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dive: cubic-bezier(.7, 0, .25, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body { font: 400 15px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; overflow: hidden; }
a { color: inherit; }
kbd { font: 500 11px/1 var(--f-mono); padding: 3px 5px; border-radius: 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; color: var(--ink-2); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; border-radius: 6px; }
.hand { font-family: var(--f-hand); }

/* ================= the room ================= */
.room { position: fixed; inset: 0; overflow: hidden; overflow: clip; background: #000; }
.stage { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.stage.diving { transition: transform 0.75s var(--dive), filter 0.75s var(--dive); }
.stage.pushing { transition: transform 1.5s cubic-bezier(.25, .6, .2, 1); }
#room-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--vx, 50%) 50%; display: block; }
.shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 5, 4, 0.72) 0%, rgba(6, 5, 4, 0.2) 26%, rgba(6, 5, 4, 0) 45%),
    linear-gradient(0deg, rgba(6, 5, 4, 0.78) 0%, rgba(6, 5, 4, 0.18) 30%, rgba(6, 5, 4, 0) 50%),
    linear-gradient(90deg, rgba(6, 5, 4, 0.35) 0%, rgba(6, 5, 4, 0) 30%, rgba(6, 5, 4, 0) 62%, rgba(6, 5, 4, 0.55) 100%),
    radial-gradient(120% 95% at 45% 50%, rgba(6, 5, 4, 0.12) 50%, rgba(0, 0, 0, 0.6) 100%),
    radial-gradient(ellipse 48% 62% at 100% 18%, rgba(6, 5, 4, 0.78) 0%, rgba(6, 5, 4, 0.45) 45%, rgba(6, 5, 4, 0) 100%),
    radial-gradient(ellipse 40% 45% at 100% 72%, rgba(6, 5, 4, 0.55) 0%, rgba(6, 5, 4, 0) 100%);
}
/* a spotlight on the hovered object */
.spot {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.65s var(--ease);
  background: radial-gradient(circle var(--sr, 190px) at var(--sx, 50%) var(--sy, 50%), transparent 0%, transparent 55%, rgba(4, 3, 2, 0.62) 100%);
}
.room.focus .spot { opacity: 1; }

/* ink marks: crisp anti-aliased strokes over a soft shadow */
.marks { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; shape-rendering: geometricPrecision; }
.marks path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.marks .shadow { stroke: rgba(0, 0, 0, 0.55); stroke-width: 5; }
.marks .line { stroke: #fff; stroke-width: 1.7; }
.marks .head { fill: #fff; stroke: rgba(0, 0, 0, 0.45); stroke-width: 1; paint-order: stroke; }
.marks .ring { fill: rgba(255, 181, 71, 0.12); stroke: var(--amber); stroke-width: 1.5; }
.marks .dot { fill: var(--amber); filter: drop-shadow(0 0 6px rgba(255, 181, 71, 0.9)); }
.marks .pulse { fill: none; stroke: var(--amber); stroke-width: 1.2; animation: ring 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ring { from { transform: scale(0.8); opacity: 0.8; } to { transform: scale(2.6); opacity: 0; } }
.marks g { transition: opacity 0.45s var(--ease); }
.marks g.on .line { stroke: var(--amber); }
.marks g.on .head { fill: var(--amber); }
.room.focus .marks g:not(.on) { opacity: 0.2; }

.labels { position: absolute; inset: 0; pointer-events: none; }
.mark {
  position: absolute; left: 0; top: 0; pointer-events: auto; text-decoration: none; display: grid; gap: 0;
  will-change: transform; padding: 6px 8px; margin: -6px -8px;

}
.mark.right { justify-items: end; text-align: right; }
.mark { isolation: isolate; }
.mark::before { content: ""; position: absolute; inset: -22px -34px -16px; z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(6, 5, 4, 0.62), rgba(6, 5, 4, 0.32) 60%, rgba(6, 5, 4, 0)); }
@keyframes mark-in { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: blur(0); } }
.mark .note { font: 700 clamp(18px, 1.6vw, 26px)/1 var(--f-hand); color: var(--amber); transform: rotate(-3deg); transform-origin: left bottom; margin-bottom: 2px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6); }
.mark.right .note { transform-origin: right bottom; }
.mark .name { display: inline-flex; align-items: baseline; gap: 8px; font: 850 clamp(17px, 1.55vw, 24px)/1 var(--f-display); font-stretch: 62%; text-transform: uppercase; letter-spacing: 0.02em; color: var(--ink); text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7); }
.mark .name i { font: 600 11px/1 var(--f-mono); font-style: normal; color: var(--ink-2); letter-spacing: 0.08em; }
.mark:hover .name, .mark:focus-visible .name, .mark.on .name { color: var(--amber); }
.mark > span { transition: opacity 0.45s var(--ease), color 0.3s; }
.room.focus .mark:not(.on) > span { opacity: 0.28; }
.mark .name::after { content: "↗"; font: 500 14px/1 var(--f-body); opacity: 0; transform: translate(-4px, 2px); transition: opacity 0.2s, transform 0.2s; }
.mark:hover .name::after, .mark.on .name::after { opacity: 1; transform: translate(0, 0); }

.wordmark { position: absolute; left: var(--pad); top: var(--pad); z-index: 5; font: 850 18px/1 var(--f-display); font-stretch: 68%; letter-spacing: 0.12em; text-decoration: none; }
.identity { position: absolute; right: var(--pad); top: calc(var(--pad) - 4px); z-index: 5; text-align: right; max-width: min(520px, 44vw); }
@keyframes id-in { from { opacity: 0; transform: translateY(-10px); } }
.id-kicker { margin: 0 0 8px; font: 500 12px/1.3 var(--f-mono); letter-spacing: 0.08em; color: var(--ink-2); display: inline-flex; gap: 8px; align-items: center; }
.id-kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.identity h1 { margin: 0; font: 900 clamp(46px, 6.4vw, 110px)/0.84 var(--f-display); font-stretch: 62%; text-transform: uppercase; letter-spacing: -0.01em; text-shadow: 0 6px 40px rgba(0, 0, 0, 0.5); }
.id-spec-k { margin: 14px 0 6px; font: 700 20px/1 var(--f-hand); color: var(--amber); }
.id-spec { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; justify-items: end; }
.id-spec li { display: inline-flex; gap: 10px; align-items: baseline; padding: 6px 10px; border-radius: 8px; background: rgba(12, 10, 8, 0.55); backdrop-filter: blur(6px); border: 1px solid var(--line); font: 500 13.5px/1.25 var(--f-body); }
.id-spec b { font: 600 11px/1 var(--f-mono); color: var(--amber); }
.hint { position: absolute; right: var(--pad); bottom: var(--pad); margin: 0; z-index: 5; display: flex; align-items: center; gap: 6px; color: var(--ink-2); font: 500 12px/1 var(--f-mono); }
.hint .hand { font-size: 22px; color: var(--ink); margin-right: 8px; }

/* mobile: the room becomes a backdrop; sections are a list */
.m-menu { display: none; }

/* ================= sections ================= */
.views { position: fixed; inset: 0; pointer-events: none; z-index: 20; }
.view {
  position: absolute; inset: 0; pointer-events: auto; overflow: hidden;
  background: var(--bg); color: var(--ink);
  clip-path: circle(0px at var(--ox, 50%) var(--oy, 50%));
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
}
.view.opening { transition: clip-path 0.85s var(--dive); }
.view.shown { clip-path: circle(150vmax at var(--ox, 50%) var(--oy, 50%)); }
.view.closing { transition: clip-path 0.7s var(--dive); clip-path: circle(0px at var(--ox, 50%) var(--oy, 50%)); }
.view .grain { position: absolute; inset: 0; pointer-events: none; opacity: 0.07; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

.v-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: var(--pad) var(--pad) 0; position: relative; z-index: 2; }
.v-top .wm { font: 850 18px/1 var(--f-display); font-stretch: 68%; letter-spacing: 0.12em; text-decoration: none; }
.v-idx { font: 500 12px/1 var(--f-mono); color: var(--muted); letter-spacing: 0.1em; }
.v-idx b { color: var(--ink); font-weight: 600; }
.v-back { justify-self: end; display: inline-flex; gap: 10px; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; background: none; color: var(--ink); padding: 8px 14px; cursor: pointer; font: 500 13px/1 var(--f-body); }
.v-back:hover { border-color: var(--amber); }
.bk-short { display: none; }

.v-main { position: relative; z-index: 1; min-height: 0; padding: clamp(10px, 2.5vh, 30px) var(--pad) 0; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr); gap: clamp(20px, 4vw, 64px); align-items: center; }
.v-head .v-note { margin: 0 0 6px; font: 700 clamp(24px, 2.2vw, 34px)/1 var(--f-hand); color: var(--amber); transform: rotate(-2deg); transform-origin: left; }
.v-head h2 { margin: 0 0 16px; font: 900 clamp(50px, 6.6vw, 118px)/0.84 var(--f-display); font-stretch: 62%; text-transform: uppercase; letter-spacing: -0.01em; }
.v-head p { margin: 0 0 12px; color: var(--ink-2); font-size: clamp(15px, 1.15vw, 17.5px); max-width: 30em; }
.v-head .small { font: 400 12.5px/1.5 var(--f-mono); color: var(--muted); }

/* staggered entrance */
.view .rise { opacity: 0; transform: translateY(26px); }
.view.shown .rise { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.8s var(--ease); transition-delay: calc(0.35s + var(--d, 0) * 0.07s); }
.view.shown h2 .ln { display: block; overflow: hidden; }
.view h2 .ln > span { display: inline-block; transform: translateY(105%); }
.view.shown h2 .ln > span { transform: none; transition: transform 0.9s var(--ease); transition-delay: calc(0.3s + var(--d, 0) * 0.09s); }

/* bottom rail */
.v-rail { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 14px var(--pad) var(--pad); }
.v-rail .arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--ink); cursor: pointer; font-size: 18px; flex: none; transition: border-color 0.2s, background 0.2s; }
.v-rail .arrow:hover { border-color: var(--amber); background: rgba(255, 181, 71, 0.08); }
.v-tabs { flex: 1; display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.v-tabs a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font: 500 12.5px/1 var(--f-body); color: var(--muted); transition: color 0.2s, background 0.2s; }
.v-tabs a i { font: 500 10.5px/1 var(--f-mono); font-style: normal; margin-right: 6px; opacity: 0.7; }
.v-tabs a:hover { color: var(--ink); }
.v-tabs a.on { color: var(--bg); background: var(--amber); }

/* ---------- 01 who ---------- */
.who-lens { position: relative; aspect-ratio: 1; width: min(100%, 56vh); justify-self: center; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px var(--line-2), 0 0 0 14px rgba(255, 181, 71, 0.06), 0 40px 90px -30px rgba(0, 0, 0, 0.8); }
.who-lens video { position: absolute; width: 330%; left: -84%; top: -17%; }
.who-lens .ring { position: absolute; inset: -1px; border-radius: 50%; border: 2px dashed rgba(255, 181, 71, 0.5); animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.fact { padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.fact b { display: block; font: 850 28px/1 var(--f-display); font-stretch: 68%; color: var(--ink); margin-bottom: 6px; }
.fact span { font-size: 13px; color: var(--ink-2); }
.who-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(20px, 3vw, 48px); align-items: center; }

/* ---------- 02 passion ---------- */
.v-passion .v-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.v-passion .v-main { position: static; }
.v-passion .v-main > :not(.v-bg) { position: relative; z-index: 1; }
.v-passion .v-bg video { position: absolute; height: 190%; left: -95%; top: -18%; filter: blur(3px) saturate(1.1) brightness(0.55); }
.v-passion .v-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12, 10, 8, 0.96) 0%, rgba(12, 10, 8, 0.75) 45%, rgba(12, 10, 8, 0.35) 100%); }
.beliefs { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(10px, 2vh, 22px); counter-reset: b; }
.beliefs li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: start; padding-bottom: clamp(10px, 2vh, 20px); border-bottom: 1px solid var(--line); }
.beliefs li:last-child { border: 0; }
.beliefs li::before { counter-increment: b; content: "0" counter(b); font: 600 13px/1.9 var(--f-mono); color: var(--amber); }
.beliefs h3 { margin: 0 0 4px; font: 850 clamp(26px, 2.6vw, 42px)/0.95 var(--f-display); font-stretch: 64%; text-transform: uppercase; }
.beliefs p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ---------- 03 skills: keycaps ---------- */
.keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 22px); }
.key {
  --lift: 0px; position: relative; display: flex; flex-direction: column; text-align: left; cursor: pointer;
  padding: 18px 18px 20px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, #2a231d 0%, #1b1612 100%); color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 calc(10px - var(--lift)) 0 #0a0806, 0 calc(22px - var(--lift)) 40px -10px rgba(0, 0, 0, 0.7);
  transform: translateY(var(--lift)); transition: transform 0.12s, box-shadow 0.12s;
  font: inherit;
}
.key:hover { --lift: -3px; }
.key:active, .key.pressed { --lift: 7px; }
.key .legend { display: flex; justify-content: space-between; font: 600 11px/1 var(--f-mono); color: var(--muted); letter-spacing: 0.08em; margin-bottom: 14px; }
.key .legend b { color: var(--amber); }
.key h3 { margin: 0 0 10px; font: 850 clamp(22px, 2vw, 32px)/0.95 var(--f-display); font-stretch: 64%; text-transform: uppercase; }
.key ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.key li { position: relative; padding-left: 16px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.key li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; border-radius: 2px; background: var(--amber); }
.key li.next::before { background: var(--cyan); }
.key .stack { margin-top: auto; padding-top: 14px; font: 500 11.5px/1.5 var(--f-mono); color: var(--cyan); }
.minikeys { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.minikeys span { padding: 7px 10px; border-radius: 8px; background: linear-gradient(180deg, #2a231d, #1b1612); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset, 0 3px 0 #0a0806; font: 500 12px/1 var(--f-mono); color: var(--ink-2); }

/* ---------- 04 projects: a desktop inside the monitor ---------- */
.monitor { position: relative; height: min(64vh, 620px); border-radius: 22px; padding: 14px; background: linear-gradient(180deg, #1c1a19, #0f0e0d); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 50px 100px -40px rgba(0, 0, 0, 0.9); }
.screen { position: relative; height: 100%; border-radius: 10px; overflow: hidden; background: radial-gradient(120% 90% at 70% 20%, #1f3a4a 0%, #0f1b24 45%, #0a0f14 100%); }
.screen::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 3px); pointer-events: none; }
.win { position: absolute; left: 6%; right: 6%; top: 7%; bottom: 20%; border-radius: 12px; overflow: hidden; background: rgba(18, 16, 14, 0.92); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8); display: flex; flex-direction: column; transform-origin: var(--gx, 50%) 110%; }
.win.genie-out { animation: genie-out 0.28s var(--dive) forwards; }
.win.genie-in { animation: genie-in 0.5s var(--ease); }
@keyframes genie-out { to { transform: scale(0.1) translateY(40%); opacity: 0; filter: blur(4px); } }
@keyframes genie-in { from { transform: scale(0.1) translateY(40%); opacity: 0; filter: blur(4px); } }
.win-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font: 500 12px/1 var(--f-mono); color: var(--muted); }
.win-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3530; }
.win-bar i:nth-child(1) { background: #ff5f57; } .win-bar i:nth-child(2) { background: #febc2e; } .win-bar i:nth-child(3) { background: #28c840; }
.win-bar span { margin-left: 8px; }
.win-body { flex: 1; min-height: 0; overflow: auto; padding: clamp(14px, 2vw, 26px); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; }
.win-body h3 { margin: 0 0 6px; font: 850 clamp(26px, 2.6vw, 42px)/0.92 var(--f-display); font-stretch: 64%; text-transform: uppercase; }
.win-body .org { margin: 0 0 12px; font: 500 12px/1.3 var(--f-mono); color: var(--cyan); }
.win-body p { margin: 0 0 10px; color: var(--ink-2); font-size: 14.5px; }
.win-body ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; }
.win-body li { margin-bottom: 6px; }
.win-metric { padding: 16px; border-radius: 12px; background: rgba(255, 181, 71, 0.08); border: 1px solid rgba(255, 181, 71, 0.25); align-self: start; }
.win-metric b { display: block; font: 900 clamp(30px, 3vw, 48px)/0.95 var(--f-display); font-stretch: 64%; color: var(--amber); margin-bottom: 6px; }
.win-metric span { font-size: 13px; color: var(--ink-2); }
.win-metric .stack { margin-top: 12px; font: 500 11.5px/1.5 var(--f-mono); color: var(--cyan); }
.win-metric a { color: var(--cyan); }
.dock { position: absolute; left: 50%; bottom: 3.5%; transform: translateX(-50%); display: flex; gap: 8px; padding: 8px; border-radius: 18px; background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.1); }
.dock button { position: relative; width: clamp(40px, 3.6vw, 54px); height: clamp(40px, 3.6vw, 54px); border-radius: 12px; border: 0; cursor: pointer; font: 800 13px/1 var(--f-mono); color: #fff; transition: transform 0.18s var(--ease); background: var(--c, #444); }
.dock button:hover { transform: translateY(-8px) scale(1.18); }
.dock button.on::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #fff; }
.dock button span { position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translateX(-50%); white-space: nowrap; padding: 5px 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.75); font: 500 11px/1 var(--f-body); opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.dock button:hover span { opacity: 1; }

/* ---------- 05 experience: a bookshelf ---------- */
.shelf-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(16px, 2.4vw, 36px); align-items: end; }
.shelf { position: relative; display: flex; align-items: flex-end; gap: 6px; height: min(52vh, 460px); padding: 0 18px; }
.shelf::after { content: ""; position: absolute; left: -10px; right: -10px; bottom: -16px; height: 16px; border-radius: 3px; background: linear-gradient(180deg, #6b4526, #3e2714); box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.8), 0 0 60px rgba(255, 181, 71, 0.12); }
.book {
  position: relative; flex: 1; max-width: 88px; height: var(--h); border: 0; cursor: pointer; border-radius: 4px 4px 2px 2px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0.08) 18%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.3)), var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3); color: #f6efe4; transform-origin: bottom center;
  transition: transform 0.35s var(--ease), filter 0.3s;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 14px 0 12px;
}
.book:hover { transform: translateY(-10px); }
.book.on { transform: translateY(-26px) rotate(-3deg); filter: brightness(1.15); box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.book .t { writing-mode: vertical-rl; transform: rotate(180deg); font: 850 clamp(15px, 1.4vw, 21px)/1 var(--f-display); font-stretch: 64%; text-transform: uppercase; letter-spacing: 0.04em; }
.book .y { font: 600 10.5px/1.2 var(--f-mono); text-align: center; opacity: 0.8; }
.book .band { position: absolute; left: 0; right: 0; height: 6px; top: 22%; background: rgba(255, 216, 150, 0.4); }
.pages { position: relative; display: grid; grid-template-columns: 1fr 1fr; min-height: min(46vh, 420px); border-radius: 6px; background: linear-gradient(90deg, #efe6d6 0%, #f7f0e4 48%, #dcd0bd 50%, #f7f0e4 52%, #efe6d6 100%); color: #2a2218; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8); transform-origin: left center; }
.pages.flip { animation: flip 0.6s var(--ease); }
@keyframes flip { from { transform: perspective(1400px) rotateY(-24deg) translateX(-20px); opacity: 0; } }
.page { padding: clamp(18px, 2.2vw, 32px); min-width: 0; }
.page .role { margin: 0 0 6px; font: 850 clamp(26px, 2.4vw, 40px)/0.92 var(--f-display); font-stretch: 64%; text-transform: uppercase; color: #1c150e; }
.page .org { margin: 0 0 14px; font: 700 22px/1 var(--f-hand); color: #a25f0a; }
.page .when { font: 600 12px/1.3 var(--f-mono); color: #6d5d49; letter-spacing: 0.06em; }
.page ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.5; color: #3a2f22; }
.page li { margin-bottom: 8px; }
.page .pno { position: absolute; bottom: 12px; font: 500 11px/1 var(--f-mono); color: #8b7a63; }

/* ---------- 06 qualifications: a gallery wall of certificates ---------- */
.wall { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(10px, 1.1vw, 16px); align-items: center; }
.lamp { position: absolute; left: 50%; top: -170px; width: 120%; height: 380px; transform: translateX(-50%); pointer-events: none; z-index: 0; filter: blur(18px);
  background: radial-gradient(ellipse 46% 42% at 50% 50%, rgba(255, 200, 125, 0.16) 0%, rgba(255, 190, 110, 0.07) 45%, rgba(255, 190, 110, 0) 100%); }
.wall .frame { z-index: 1; }
.frame {
  position: relative; display: block; border: 0; cursor: pointer; color: inherit; font: inherit; text-align: inherit;
  padding: 7px; border-radius: 2px; transform: rotate(var(--r, 0deg));
  box-shadow: 0 18px 28px -14px rgba(0, 0, 0, 0.9), 0 2px 4px rgba(0, 0, 0, 0.5);
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.frame.big { grid-column: span 2; grid-row: span 2; padding: 14px; }
.frame.gallery { background: linear-gradient(135deg, #2a2724, #111); }
.frame.wood { background: linear-gradient(135deg, #7a4b28, #4a2c15 60%, #6b4122); }
.frame.gilt { background: linear-gradient(135deg, #f3d58a 0%, #b8862f 25%, #f6dd9a 50%, #9c6b1f 75%, #e9c46f 100%); box-shadow: 0 24px 40px -16px rgba(0, 0, 0, 0.95), inset 0 0 0 2px rgba(90, 55, 10, 0.5), inset 0 0 0 5px rgba(255, 240, 200, 0.35); }
.frame:hover, .frame:focus-visible { transform: rotate(0deg) translateY(-4px) scale(1.035); box-shadow: 0 30px 50px -16px rgba(0, 0, 0, 0.95), 0 0 50px rgba(255, 190, 110, 0.14); z-index: 2; }
.frame .mat { position: relative; display: block; padding: 7%; background: #f3eee4; box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.35); }
.frame.big .mat { padding: 5%; }
.frame .face { display: block; transition: opacity 0.2s; }
.frame .loan { position: absolute; inset: 0; display: grid; place-items: center; font: 700 clamp(13px, 1.1vw, 18px)/1 var(--f-hand); color: #8a6a3e; opacity: 0; transition: opacity 0.3s 0.5s; }
.frame.taken .face { opacity: 0; }
.frame.taken .loan { opacity: 1; }

/* the certificate itself scales with its container */
.cert { position: relative; aspect-ratio: 1.414; container-type: inline-size; overflow: hidden; color: #2b2116; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.c-illus { position: absolute; left: 0; right: 0; bottom: 1.1cqw; margin: 0; text-align: center; font: 500 1.15cqw/1 var(--f-mono); letter-spacing: 0.08em; color: rgba(70, 50, 25, 0.42); }
.c-in { position: absolute; inset: 8cqw 10cqw 9cqw; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 0.5cqw; }
.c-in p { margin: 0; }
.c-certify { font: italic 500 2.2cqw/1.1 "Cormorant Garamond", serif; color: #5a4630; }
.c-name { font: 400 6.4cqw/1.1 "Pinyon Script", cursive; color: #22170b; margin: 0.4cqw 0 !important; }
.c-foot { display: flex; justify-content: space-between; align-items: flex-end; width: 84%; margin-top: 2.4cqw !important; }
.c-sig { display: grid; justify-items: center; font: 600 1.35cqw/1 "Cormorant Garamond", serif; letter-spacing: 0.12em; text-transform: uppercase; color: #6b5438; }
.c-sig i { display: block; width: 19cqw; border-top: 0.16cqw solid #7a6040; margin-bottom: 0.7cqw; }

/* degree: parchment, guilloche border, crest, wax seal */
.cert-degree { background: radial-gradient(120% 90% at 50% 40%, #fdf8ea 0%, #f3e7c8 70%, #e7d5a8 100%); }
.cert-degree::before { content: ""; position: absolute; inset: 0; opacity: 0.35; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.35  0 0 0 0 0.2  0 0 0 0.18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.c-guil { position: absolute; inset: 2.6cqw; border: 1.5cqw solid transparent;
  border-image: repeating-linear-gradient(45deg, #8b6a2e 0 0.35cqw, #efe0b8 0.35cqw 0.7cqw, #b08a45 0.7cqw 1.05cqw, #efe0b8 1.05cqw 1.4cqw) 12;
  box-shadow: inset 0 0 0 0.25cqw #8b6a2e, inset 0 0 0 0.6cqw #f6ecd2, inset 0 0 0 0.75cqw #8b6a2e; }
.c-crest { width: 6.5cqw; color: #7a5a24; margin-bottom: 0.6cqw; }
.c-inst { font: 700 3.5cqw/1 "Cormorant Garamond", serif; letter-spacing: 0.14em; text-transform: uppercase; color: #3b2a12; margin-bottom: 1.4cqw !important; }
.c-text { font: italic 500 1.75cqw/1.25 "Cormorant Garamond", serif; color: #5a4630; max-width: 68%; }
.c-award { font: 700 3.1cqw/1.05 "Cormorant Garamond", serif; letter-spacing: 0.06em; text-transform: uppercase; color: #2a1d0c; margin-top: 0.8cqw !important; }
.c-field { font: italic 600 2.3cqw/1.1 "Cormorant Garamond", serif; color: #3b2a12; }
.c-seal { position: relative; display: grid; place-items: center; align-content: center; width: 9.5cqw; aspect-ratio: 1; border-radius: 50%; color: #f7dccf;
  background: radial-gradient(circle at 34% 30%, #e0684f 0%, #a8261a 45%, #74140c 100%);
  box-shadow: 0 0.5cqw 1cqw rgba(60, 10, 5, 0.45), inset 0 0 0 0.5cqw rgba(255, 255, 255, 0.1), inset 0 0 0 0.9cqw rgba(0, 0, 0, 0.12); }
.c-seal::before { content: ""; position: absolute; inset: -0.9cqw; border-radius: 50%; background: repeating-conic-gradient(#8f1d12 0 6deg, transparent 6deg 12deg); -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%); mask: radial-gradient(circle, transparent 58%, #000 60%); }
.c-seal b { font: 700 1.9cqw/1 "Cormorant Garamond", serif; letter-spacing: 0.04em; }
.c-seal small { font: 600 1.1cqw/1.2 "Cormorant Garamond", serif; letter-spacing: 0.2em; }

/* classic: professional body / diploma */
.cert-classic { --tone: #1e3a5f; --gold: #b8913b; background: linear-gradient(180deg, #fdfbf6, #f4efe3); }
.cert-classic.tone-green { --tone: #1f5a3d; --gold: #b58d3a; }
.k-border { position: absolute; inset: 3cqw; border: 0.9cqw double var(--tone); box-shadow: inset 0 0 0 1.4cqw #fdfbf6, inset 0 0 0 1.6cqw var(--gold); }
.k-border::before { content: ""; position: absolute; inset: 2.4cqw; border: 0.15cqw solid var(--gold); opacity: 0.7; }
.k-issuer { font: 700 2.7cqw/1 "Cormorant Garamond", serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--tone); }
.k-kind { font: 700 6.6cqw/1 "Cormorant Garamond", serif; font-variant: small-caps; letter-spacing: 0.04em; color: var(--gold); margin: 0.6cqw 0 1cqw !important; }
.k-title { font: 700 3cqw/1.1 "Cormorant Garamond", serif; letter-spacing: 0.05em; text-transform: uppercase; color: var(--tone); max-width: 80%; }
.k-seal { width: 8cqw; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fbe7a8, #c9972f 55%, #8a6315); box-shadow: 0 0.4cqw 0.8cqw rgba(0, 0, 0, 0.3), inset 0 0 0 0.6cqw rgba(255, 255, 255, 0.25); }

/* tech: modern certificate in the issuer's colours */
.cert-tech { background: #fff; }
.t-band { position: absolute; left: 0; top: 0; bottom: 0; width: 23cqw; background: var(--c2); overflow: hidden; }
.t-band i { position: absolute; width: 20cqw; aspect-ratio: 1; background: var(--c); transform: rotate(45deg); opacity: 0.9; }
.t-band i:nth-child(1) { left: -10cqw; top: -8cqw; }
.t-band i:nth-child(2) { left: 9cqw; top: 22cqw; opacity: 0.55; width: 14cqw; }
.t-band i:nth-child(3) { left: -6cqw; bottom: -10cqw; opacity: 0.75; }
.t-in { position: absolute; left: 29cqw; right: 6cqw; top: 7cqw; bottom: 7cqw; display: flex; flex-direction: column; font-family: var(--f-body); }
.t-in p { margin: 0; }
.t-issuer { font: 800 2.6cqw/1 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--c); }
.t-kind { font: 600 1.8cqw/1 var(--f-body); letter-spacing: 0.22em; text-transform: uppercase; color: #6b7280; margin: 1.4cqw 0 3.4cqw !important; }
.t-certify, .t-text { font: 400 1.9cqw/1.3 var(--f-body); color: #4b5563; }
.t-name { font: 700 5.4cqw/1.1 var(--f-body); color: #111827; margin: 0.6cqw 0 1.6cqw !important; letter-spacing: -0.01em; }
.t-course { font: 800 4.2cqw/1.05 var(--f-display); font-stretch: 72%; text-transform: uppercase; color: var(--c2); margin-top: 0.6cqw !important; }
.t-foot { display: flex; align-items: center; gap: 2.4cqw; margin-top: auto; }
.t-badge { display: grid; place-items: center; width: 9cqw; aspect-ratio: 1; border-radius: 50%; background: var(--c); color: #fff; font: 800 2.7cqw/1 var(--f-body); box-shadow: 0 0 0 0.6cqw rgba(0, 0, 0, 0.06), 0 0.5cqw 1cqw rgba(0, 0, 0, 0.2); }
.t-line { display: grid; font: 500 1.5cqw/1.2 var(--f-body); color: #6b7280; }
.t-line i { display: block; width: 24cqw; border-top: 0.16cqw solid #9ca3af; margin-bottom: 0.7cqw; }
.cert-original { background: #fff; }
.cert-original img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

/* hidden UV security layer, revealed by the torch */
.uv { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.25s;
  background: rgba(22, 0, 48, 0.72);
  -webkit-mask: radial-gradient(circle 26cqw at var(--ux, 50%) var(--uy, 50%), #000 55%, transparent 100%);
  mask: radial-gradient(circle 26cqw at var(--ux, 50%) var(--uy, 50%), #000 55%, transparent 100%); }
.uv-micro { position: absolute; inset: -20%; transform: rotate(-14deg); font: 600 1.35cqw/1.7 var(--f-mono); letter-spacing: 0.12em; color: #c49bff; text-shadow: 0 0 0.6cqw #9b5cff; word-break: break-all; opacity: 0.85; }
.uv-mark { position: absolute; inset: 0; display: grid; place-items: center; font: 400 34cqw/1 var(--f-body); color: rgba(120, 255, 220, 0.5); text-shadow: 0 0 3cqw rgba(120, 255, 220, 0.9); }
.uv-note { position: absolute; left: 0; right: 0; bottom: 8cqw; text-align: center; font: 700 4cqw/1 var(--f-hand); color: #d9fff1; text-shadow: 0 0 1.5cqw #57ffcf; }
.reading.uv-on .uv { opacity: 1; }

/* the reading room */
.reading { position: absolute; inset: 0; z-index: 5; }
.r-backdrop { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s, background 0.4s; backdrop-filter: blur(10px) saturate(0.8);
  background: radial-gradient(120% 100% at 30% 50%, rgba(10, 8, 6, 0.62) 0%, rgba(6, 5, 4, 0.8) 70%); }
.reading.on .r-backdrop { opacity: 1; }
.reading.uv-on .r-backdrop { background: rgba(10, 2, 22, 0.94); }
.r-big { position: fixed; transform-origin: 0 0; perspective: 1400px; z-index: 2; }
.r-big.flying .r-tilt { animation: lift 0.85s var(--ease); }
@keyframes lift { 0% { transform: rotateZ(var(--r0, 0deg)); } 45% { transform: rotateY(-14deg) rotateX(6deg) translateZ(80px); } 100% { transform: none; } }
.r-big.thud { animation: thud 0.26s ease-out; }
@keyframes thud { 30% { transform: translate(1px, 2px) scale(0.995); } 60% { transform: translate(-1px, -1px); } }
.r-tilt { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.18s ease-out; box-shadow: 0 60px 120px -40px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.r-face, .r-face .cert { width: 100%; height: 100%; }
.r-glare { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(circle at var(--gx, 30%) var(--gy, 20%), rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 45%), linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.08) 50%, transparent 60%); }
.reading.ready .r-glare { opacity: 1; }
.reading.uv-on .r-glare { opacity: 0; }
.r-torch { position: fixed; left: 0; top: 0; z-index: 3; width: 240px; height: 240px; margin: -120px 0 0 -120px; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity 0.25s;
  background: radial-gradient(circle, rgba(150, 90, 255, 0.28), rgba(110, 40, 255, 0.08) 45%, transparent 70%); mix-blend-mode: screen; }
.reading.uv-on .r-torch { opacity: 1; }
.reading.uv-on { cursor: none; }
.r-info { position: absolute; z-index: 2; right: var(--pad); top: 50%; transform: translateY(-50%); width: min(440px, 34vw); max-height: 88vh; overflow: auto; pointer-events: auto;
  padding: clamp(18px, 2vw, 28px); border-radius: 18px; background: linear-gradient(180deg, rgba(22, 18, 15, 0.78), rgba(14, 11, 9, 0.86)); backdrop-filter: blur(14px); border: 1px solid rgba(244, 239, 232, 0.1); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9);
  /* the panel arrives with its content, never before it */
  opacity: 0; visibility: hidden; margin-right: -24px; transition: opacity 0.4s var(--ease), margin 0.55s var(--ease), visibility 0s 0.4s; }
.reading.ready .r-info { opacity: 1; visibility: visible; margin-right: 0; transition: opacity 0.45s var(--ease), margin 0.6s var(--ease), visibility 0s; }
.r-info > * { opacity: 0; transform: translateX(24px); transition: opacity 0.5s var(--ease), transform 0.6s var(--ease); }
.reading.ready .r-info > * { opacity: 1; transform: none; }
.reading.ready .r-info > :nth-child(2) { transition-delay: 0.06s; } .reading.ready .r-info > :nth-child(3) { transition-delay: 0.12s; }
.reading.ready .r-info > :nth-child(4) { transition-delay: 0.18s; } .reading.ready .r-info > :nth-child(5) { transition-delay: 0.24s; }
.reading.ready .r-info > :nth-child(6) { transition-delay: 0.3s; } .reading.ready .r-info > :nth-child(n+7) { transition-delay: 0.36s; }
.r-tier { margin: 0 0 8px; font: 600 11px/1 var(--f-mono); letter-spacing: 0.16em; color: var(--amber); }
.r-title { margin: 0 0 6px; font: 900 clamp(30px, 3vw, 50px)/0.9 var(--f-display); font-stretch: 62%; text-transform: uppercase; }
.r-field { margin: 0 0 16px; font: 700 22px/1 var(--f-hand); color: var(--ink-2); }
.r-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0 0 18px; padding: 14px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.r-meta div:first-child { grid-column: 1 / -1; }
.r-meta dt { font: 600 10.5px/1 var(--f-mono); letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; margin-bottom: 4px; }
.r-meta dd { margin: 0; font-size: 14.5px; }
.r-k { margin: 0 0 8px; font: 600 10.5px/1 var(--f-mono); letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
.r-skills { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.r-skills li { padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(255, 181, 71, 0.35); background: rgba(255, 181, 71, 0.07); font-size: 13px; opacity: 0; transform: scale(0.8); }
.reading.ready .r-skills li { opacity: 1; transform: none; transition: opacity 0.35s, transform 0.45s var(--ease); transition-delay: calc(0.35s + var(--k) * 0.06s); }
.r-why { margin: 0 0 10px; color: var(--ink-2); font-size: 14.5px; }
.r-links { display: flex; gap: 14px; margin-bottom: 16px; }
.r-links a { color: var(--amber); font: 600 13px/1 var(--f-body); text-decoration: none; }
.r-orig { margin: 0 0 16px; font: 500 12px/1.4 var(--f-mono); color: var(--muted); }
.r-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.r-actions button { display: inline-flex; gap: 8px; align-items: center; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: none; color: var(--ink); cursor: pointer; font: 500 13px/1 var(--f-body); }
.r-uv[aria-pressed="true"] { border-color: #a57bff; color: #d5bfff; box-shadow: 0 0 20px rgba(150, 90, 255, 0.4); }
.r-stamp { position: fixed; z-index: 3; left: 0; top: 0; padding: 0.3em 0.55em 0.25em; border: 4px double #b3261e; border-radius: 8px; color: #b3261e; font: 900 clamp(20px, 2vw, 32px)/1 var(--f-display); font-stretch: 70%; letter-spacing: 0.08em; text-transform: uppercase; background: rgba(179, 38, 30, 0.05); mix-blend-mode: multiply; opacity: 0; transform: translate(-100%, -100%) rotate(-11deg) scale(2.6); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='90' height='90'><filter id='g'><feTurbulence baseFrequency='0.9' numOctaves='2'/><feComponentTransfer><feFuncA type='table' tableValues='0 0 1 1'/></feComponentTransfer></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>"); }
.reading.stamped .r-stamp { animation: stamp 0.34s cubic-bezier(.3, 1.5, .5, 1) forwards; }
@keyframes stamp { to { opacity: 0.88; transform: translate(-100%, -100%) rotate(-11deg) scale(1); } }
@media (max-width: 900px) {
  .r-info { left: var(--pad); right: var(--pad); top: auto; bottom: var(--pad); transform: none; width: auto; max-height: 46vh; margin-right: 0; }
}

/* ---------- 07 contact ---------- */
.mug { position: relative; width: min(260px, 60%); aspect-ratio: 1; justify-self: center; }
.mug .cup { position: absolute; left: 10%; right: 22%; top: 30%; bottom: 6%; border-radius: 8px 8px 28px 28px; background: linear-gradient(90deg, #121110, #2b2724 45%, #121110); box-shadow: 0 30px 50px -20px rgba(0, 0, 0, 0.9); }
.mug .handle { position: absolute; right: 6%; top: 42%; width: 22%; height: 30%; border: 12px solid #1d1a18; border-left: 0; border-radius: 0 40px 40px 0; }
.mug .steam { position: absolute; top: 2%; width: 10px; height: 34%; border-radius: 10px; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.28), transparent); filter: blur(4px); animation: steam 3.2s ease-in-out infinite; }
.mug .steam:nth-child(1) { left: 30%; } .mug .steam:nth-child(2) { left: 45%; animation-delay: 1s; } .mug .steam:nth-child(3) { left: 60%; animation-delay: 2s; }
@keyframes steam { 0% { transform: translateY(20px) scaleX(1); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(-30px) scaleX(2.2) skewX(10deg); opacity: 0; } }
.contact-big { display: inline-block; margin: 6px 0 16px; font: 900 clamp(34px, 4.4vw, 72px)/0.9 var(--f-display); font-stretch: 62%; text-transform: uppercase; color: var(--amber); text-decoration: none; border-bottom: 3px solid currentColor; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink); text-decoration: none; font: 500 13.5px/1 var(--f-body); transition: border-color 0.2s; }
.btn:hover { border-color: var(--amber); }

/* ================= responsive ================= */
@media (max-width: 1100px), (max-height: 680px) {
  .view { overflow-y: auto; grid-template-rows: auto auto auto; }
  .v-main { grid-template-columns: 1fr; align-items: start; padding-bottom: 20px; min-height: auto; }
  .view { align-content: start; }
  .keys { grid-template-columns: 1fr; }
  .monitor { height: 560px; }
}
@media (max-width: 760px) {
  .labels, .marks, .spot { display: none; }
  .identity { left: var(--pad); right: var(--pad); top: 64px; text-align: left; max-width: none; }
  .id-spec { justify-items: start; }
  .hint { display: none; }
  .m-menu { display: grid; position: absolute; left: var(--pad); right: var(--pad); bottom: var(--pad); z-index: 6; gap: 6px; }
  .m-menu a { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: 12px; background: rgba(12, 10, 8, 0.62); backdrop-filter: blur(8px); border: 1px solid var(--line); text-decoration: none; font: 850 18px/1 var(--f-display); font-stretch: 64%; text-transform: uppercase; }
  .m-menu a .hand { font-size: 17px; color: var(--amber); text-transform: none; font-weight: 700; }
  #room-video { --vx: 32%; }
  .who-grid, .shelf-wrap { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .shelf { height: 280px; }
  .pages { grid-template-columns: 1fr; }
  .win-body { grid-template-columns: 1fr; }
  .v-tabs { display: none; }
  .v-top { grid-template-columns: 1fr auto; }
  .v-idx, .v-back kbd, .bk-full { display: none; }
  .bk-short { display: inline; }
  .v-rail { justify-content: space-between; }
  .wall { grid-template-columns: 1fr 1fr; }
  .frame.big { grid-column: span 2; grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; animation-delay: 0s !important; transition-delay: 0s !important; }
}

/* ================= the opening sequence ================= */
.intro { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; align-content: center; gap: 22px; background: #070605;
  clip-path: inset(0 0 0 0); transition: clip-path 0.95s cubic-bezier(.76, 0, .24, 1); }
.intro.out { clip-path: inset(0 0 100% 0); }
.intro-name { margin: 0; display: flex; gap: 0.28em; font: 900 clamp(44px, 7.5vw, 124px)/0.9 var(--f-display); font-stretch: 62%; letter-spacing: 0.03em; transition: transform 0.8s cubic-bezier(.76, 0, .24, 1), opacity 0.5s; }
.intro-name > span { display: inline-flex; overflow: hidden; padding-bottom: 0.06em; }
.intro-name > span:last-child { color: var(--amber); }
.intro-name .ch { display: inline-block; transform: translateY(110%); animation: ch-in 0.9s cubic-bezier(.16, .84, .2, 1) forwards; animation-delay: calc(0.1s + var(--k) * 0.045s); }
@keyframes ch-in { to { transform: none; } }
.intro.out .intro-name { transform: translateY(-40px); opacity: 0; }
.intro-bar { width: min(280px, 60vw); height: 1px; background: rgba(244, 239, 232, 0.14); overflow: hidden; }
.intro-bar i { display: block; height: 100%; background: var(--amber); transform-origin: left; transform: scaleX(0); transition: transform 0.4s var(--ease); box-shadow: 0 0 12px var(--amber); }
.intro-role { margin: 0; font: 500 12px/1 var(--f-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); opacity: 0; animation: fade-in 0.8s 0.7s forwards; }
@keyframes fade-in { to { opacity: 1; } }

/* the room focuses in like a camera */
#room-video { transform: scale(1.14); filter: blur(18px) brightness(0.3) saturate(0.6); transition: transform 2.4s cubic-bezier(.16, .84, .2, 1), filter 1.9s var(--ease); }
.room.play #room-video { transform: none; filter: none; }
.wordmark { opacity: 0; transition: opacity 0.8s 0.5s; }
.room.play .wordmark { opacity: 1; }
.id-kicker { opacity: 0; transform: translateY(-8px); transition: opacity 0.6s 0.55s, transform 0.8s var(--ease) 0.55s; }
.identity h1 .ln { display: block; overflow: hidden; padding-bottom: 0.05em; }
.identity h1 .ln > span { display: inline-block; transform: translateY(108%); transition: transform 1.1s cubic-bezier(.16, .84, .2, 1) calc(0.65s + var(--k) * 0.13s); }
.id-spec-k { opacity: 0; transition: opacity 0.6s 1.15s; }
.id-spec li { opacity: 0; transform: translateX(22px); transition: opacity 0.5s calc(1.2s + var(--k) * 0.09s), transform 0.7s var(--ease) calc(1.2s + var(--k) * 0.09s); }
.room.play .id-kicker, .room.play .id-spec-k { opacity: 1; transform: none; }
.room.play .identity h1 .ln > span, .room.play .id-spec li { transform: none; opacity: 1; }
.hint { opacity: 0; transition: opacity 0.9s 3.6s; }
.room.play .hint { opacity: 1; }

/* each annotation: dot pops → arrowhead → line traces out to the label → the note writes itself */
.marks g, .mark { --d0: calc(1.6s + var(--o, 0) * 0.17s); }
.marks .dot, .marks .ring { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform 0.55s cubic-bezier(.3, 1.7, .5, 1) var(--d0); }
.room.play .marks .dot, .room.play .marks .ring { transform: none; }
.room:not(.play) .marks .pulse { display: none; }
.room.play .marks .pulse { animation: pulse-in 2.4s ease-out infinite; animation-delay: var(--d0); animation-fill-mode: backwards; }
@keyframes pulse-in { 0% { transform: scale(0.8); opacity: 0; } 6% { opacity: 0.85; } 100% { transform: scale(2.6); opacity: 0; } }
.marks .head { opacity: 0; transition: opacity 0.3s calc(var(--d0) + 0.3s), fill 0.25s; }
.room.play .marks .head { opacity: 1; }
.marks .line, .marks .shadow { stroke-dasharray: 1 1; stroke-dashoffset: -1; transition: stroke-dashoffset 1s cubic-bezier(.55, 0, .2, 1) calc(var(--d0) + 0.3s), stroke 0.25s; }
.room.play .marks .line, .room.play .marks .shadow { stroke-dashoffset: 0; }
.room.settled .marks .line, .room.settled .marks .shadow { stroke-dasharray: none; transition: stroke 0.25s; }
.mark::before { opacity: 0; transition: opacity 0.7s calc(var(--d0) + 0.9s); }
.room.play .mark::before { opacity: 1; }
.mark .note { clip-path: inset(-30% 100% -30% -5%); transition: clip-path 0.75s cubic-bezier(.6, 0, .3, 1) calc(var(--d0) + 1.05s); }
.room.play .mark .note { clip-path: inset(-30% -8% -30% -5%); }
.mark .name { opacity: 0; transform: translateY(10px); transition: opacity 0.5s calc(var(--d0) + 0.95s), transform 0.7s var(--ease) calc(var(--d0) + 0.95s), color 0.3s; }
.room.play .mark .name { opacity: 1; transform: none; }
.room.settled .mark > span { transition: opacity 0.45s var(--ease), color 0.3s, transform 0.3s; }
.room:not(.settled) .mark { pointer-events: none; }
@media (max-width: 760px) {
  .m-menu a { opacity: 0; transform: translateY(14px); transition: opacity 0.5s calc(1.1s + var(--k) * 0.07s), transform 0.7s var(--ease) calc(1.1s + var(--k) * 0.07s); }
  .room.play .m-menu a { opacity: 1; transform: none; }
}

/* ---------- loader: the name writes itself in pen, a pen line draws underneath ---------- */
.intro-name { font: 700 clamp(64px, 9.5vw, 156px)/1 var(--f-hand); font-stretch: normal; letter-spacing: 0; gap: 0.24em; transform: rotate(-3deg);
  clip-path: inset(-30% 100% -30% -5%); animation: write 1.4s cubic-bezier(.55, .1, .35, 1) 0.15s forwards; text-shadow: 0 2px 22px rgba(255, 181, 71, 0.16); }
.intro-name > span { overflow: visible; padding: 0; }
.intro-name .n1 { color: var(--ink); }
.intro-name .n2 { color: var(--amber); }
@keyframes write { to { clip-path: inset(-30% -5% -30% -5%); } }
.intro.out .intro-name { transform: rotate(-3deg) translateY(-40px); opacity: 0; }
.intro-line { width: min(360px, 66vw); height: auto; overflow: visible; margin-top: -14px; transform: rotate(-2deg); }
.intro-line path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.intro-line .guide { stroke: rgba(244, 239, 232, 0.07); stroke-width: 2; }
#intro-fill { stroke: var(--amber); stroke-width: 3.2; stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.55s var(--ease); filter: drop-shadow(0 0 6px rgba(255, 181, 71, 0.5)); }
.intro.out .intro-line { opacity: 0; transition: opacity 0.4s; }

/* ---------- 05 experience: rolled papers tied with twine; one unrolls into a sheet ---------- */
.paper-blue { --pc: #2f64a8; --pcd: #173a68; --sink: #f2f7ff; --sink2: rgba(232, 242, 255, 0.86); --sacc: #ffd28a; }
.paper-kraft { --pc: #c7a071; --pcd: #7f5d37; --sink: #26180a; --sink2: #3f2b16; --sacc: #7a2e0c; }
.paper-white { --pc: #f3f0e9; --pcd: #b3ab9b; --sink: #1b1b1b; --sink2: #3a3a3a; --sacc: #b3261e; }
.paper-parch { --pc: #e8d6ae; --pcd: #a98f5c; --sink: #2a1d0e; --sink2: #45341f; --sacc: #8a4b0f; }
.paper-cream { --pc: #eee2c8; --pcd: #b09c74; --sink: #1f1a12; --sink2: #3e3526; --sacc: #1f4d7a; }
.scroll-wrap { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr); gap: clamp(20px, 3vw, 52px); align-items: center; }
.rack { display: grid; gap: clamp(14px, 2.6vh, 26px); padding: 8px 0; }
.scroll { position: relative; display: block; width: 100%; height: clamp(40px, 6vh, 56px); padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
  transform: rotate(var(--tilt)); transition: transform 0.5s var(--ease), filter 0.3s; }
.scroll:hover { transform: rotate(var(--tilt)) translateX(8px); }
.scroll.on { transform: rotate(0deg) translateX(18px); }
.scroll .roll { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--len) * 0.66); filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.6)); }
.scroll .body { position: absolute; inset: 0 10px 0 0; border-radius: 10px 0 0 10px / 50% 0 0 50%;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.08) 16%, rgba(255, 255, 255, 0.4) 31%, rgba(255, 255, 255, 0) 48%, rgba(0, 0, 0, 0.06) 64%, rgba(0, 0, 0, 0.38) 88%, rgba(0, 0, 0, 0.6) 100%),
    linear-gradient(98deg, transparent 18%, rgba(0, 0, 0, 0.2) 18.6%, rgba(255, 255, 255, 0.15) 19.3%, transparent 20%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/><feColorMatrix values='0 0 0 0 0.3  0 0 0 0 0.25  0 0 0 0 0.18  0 0 0 0.22 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    var(--pc); }
.paper-blue .body { background-blend-mode: normal, normal, overlay, normal; }
.scroll .cap { position: absolute; right: 0; top: 0; bottom: 0; width: 22px; border-radius: 50%;
  background:
    radial-gradient(ellipse 22% 16% at 50% 50%, #120d09 0 55%, transparent 62%),
    repeating-radial-gradient(ellipse at 50% 50%, var(--pc) 0 2.4px, var(--pcd) 2.4px 3.3px);
  box-shadow: inset -2px 0 4px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.25); }
.scroll .twine { position: absolute; left: 30%; top: -3px; bottom: -3px; width: 13px; border-radius: 3px;
  background: repeating-linear-gradient(162deg, #8b6a41 0 2px, #cdac7b 2px 4px, #6c5030 4px 5px);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), 0 2px 3px rgba(0, 0, 0, 0.45); transition: transform 0.55s var(--ease), opacity 0.4s; }
.scroll .twine::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 14px; height: 10px; margin-left: -7px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #d5b584, #7b5b35); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.45); }
.scroll.on .twine { transform: translate(-6px, -130%) rotate(-28deg); opacity: 0; }
.scroll .tag { position: absolute; top: 50%; left: calc(var(--len) * 0.66 + 26px); display: grid; gap: 1px; padding: 6px 14px 6px 22px; text-align: left; white-space: nowrap;
  transform: translateY(-50%) rotate(3deg); transform-origin: left center; transition: transform 0.45s var(--ease), box-shadow 0.3s;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
  background:
    radial-gradient(circle 4px at 12px 50%, #0c0a08 0 3px, transparent 3.5px),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='90' height='90'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.3  0 0 0 0 0.2  0 0 0 0 0.1  0 0 0 0.25 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    #d9c29a; }
.scroll .tag b { font: 700 clamp(17px, 1.5vw, 23px)/1 var(--f-hand); color: #2a1d10; }
.scroll .tag small { font: 600 10.5px/1.2 var(--f-mono); color: #5c4630; letter-spacing: 0.06em; }
.scroll .string { display: none; }
/* the string from the roll's end to the tag's hole */
.scroll::after { content: ""; position: absolute; top: 50%; left: calc(var(--len) * 0.66 - 6px); width: 44px; height: 16px; margin-top: -12px; pointer-events: none;
  border-top: 1.5px solid #b89668; border-radius: 50% 50% 0 0 / 100% 100% 0 0; transform: rotate(4deg); }
@media (max-width: 760px) { .scroll::after { left: calc(var(--len) * 0.5 - 6px); width: 40px; } }
.scroll:hover .tag, .scroll.on .tag { transform: translateY(-50%) rotate(-2deg); }
.scroll.on .tag { background-color: #f0c77e; box-shadow: 0 0 0 2px rgba(255, 181, 71, 0.4); }
.scroll .tag { overflow: visible; }

@property --u { syntax: "<number>"; inherits: true; initial-value: 1; }
.sheet-stage { position: relative; height: min(60vh, 540px); display: grid; justify-items: center; align-items: start; }
.sheet { --u: 0.03; position: relative; width: min(100%, 640px); height: 100%; filter: drop-shadow(0 34px 40px rgba(0, 0, 0, 0.65)); }
.sheet.unroll { animation: unroll 1.25s cubic-bezier(.5, 0, .15, 1) forwards; }
.sheet.done { --u: 1; }
@keyframes unroll { from { --u: 0.03; } to { --u: 1; } }
.sheet .paper { position: absolute; left: 0; right: 0; top: 14px; bottom: 14px; overflow: hidden;
  clip-path: inset(0 0 calc((1 - var(--u)) * 100%) 0);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 6%, rgba(0, 0, 0, 0) 93%, rgba(0, 0, 0, 0.32)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0) 5%, rgba(0, 0, 0, 0) 95%, rgba(0, 0, 0, 0.14)),
    linear-gradient(180deg, transparent 49.6%, rgba(0, 0, 0, 0.07) 50%, rgba(255, 255, 255, 0.1) 50.4%, transparent 51%),
    radial-gradient(120% 90% at 45% 40%, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.14) 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3'/><feColorMatrix values='0 0 0 0 0.3  0 0 0 0 0.25  0 0 0 0 0.18  0 0 0 0.2 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    var(--pc); }
.sheet.paper-blue .paper { background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0) 6%, rgba(0, 0, 0, 0) 93%, rgba(0, 0, 0, 0.38)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 24px),
    radial-gradient(120% 90% at 45% 40%, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.22) 100%),
    var(--pc); }
.sheet.paper-blue .paper::after { content: "DWG · ROLE-01 · REV C"; position: absolute; right: 18px; bottom: 16px; padding: 8px 12px; border: 1px solid rgba(255, 255, 255, 0.5); font: 600 10px/1 var(--f-mono); letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.75); }
.sheet .rod { position: absolute; left: -16px; right: -16px; height: 28px; border-radius: 14px; z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.05) 22%, rgba(255, 255, 255, 0.42) 38%, rgba(255, 255, 255, 0) 56%, rgba(0, 0, 0, 0.45) 100%), var(--pc); }
.sheet .rod.top { top: 0; }
.sheet .rod.bottom { top: calc(var(--u) * (100% - 28px)); transform: scaleY(calc(1 + (1 - var(--u)) * 0.55)); }
.sheet .rod::before, .sheet .rod::after { content: ""; position: absolute; top: 0; bottom: 0; width: 14px; border-radius: 50%;
  background: radial-gradient(ellipse 24% 18% at 50% 50%, #120d09 0 55%, transparent 62%), repeating-radial-gradient(ellipse at 50% 50%, var(--pc) 0 2px, var(--pcd) 2px 2.8px); }
.sheet .rod::before { left: 0; } .sheet .rod::after { right: 0; }
.sheet .rod .cap { display: none; }
.p-in { position: absolute; inset: 0; padding: clamp(30px, 4.6vh, 44px) clamp(26px, 3vw, 48px); color: var(--sink); overflow: auto; }
.p-in p { margin: 0; }
.p-in .when { font: 600 12px/1.3 var(--f-mono); letter-spacing: 0.14em; color: var(--sink2); }
.p-in .role { margin: 10px 0 6px; font: 850 clamp(26px, 2.5vw, 42px)/0.92 var(--f-display); font-stretch: 64%; text-transform: uppercase; color: var(--sink); }
.p-in .org { margin: 0 0 18px; font: 700 clamp(20px, 1.8vw, 26px)/1 var(--f-hand); color: var(--sacc); transform: rotate(-1.5deg); transform-origin: left; }
.p-in ul { margin: 0; padding-left: 18px; color: var(--sink2); font-size: 14.5px; line-height: 1.55; }
.p-in li { margin-bottom: 8px; }
.p-in li::marker { color: var(--sacc); }
.sheet.unroll .p-in > *, .sheet.unroll .p-in li { animation: ink 0.7s var(--ease) both; }
.sheet.unroll .p-in .when { animation-delay: 0.25s; } .sheet.unroll .p-in .role { animation-delay: 0.35s; } .sheet.unroll .p-in .org { animation-delay: 0.45s; }
.sheet.unroll .p-in ul { animation: none; }
.sheet.unroll .p-in li { animation-delay: calc(0.55s + var(--k) * 0.12s); }
@keyframes ink { from { opacity: 0; filter: blur(3px); transform: translateY(4px); } }
@media (max-width: 1100px), (max-height: 680px) {
  .scroll-wrap { grid-template-columns: 1fr; }
  .sheet-stage { height: 520px; }
}
@media (max-width: 760px) {
  .scroll .roll { width: calc(var(--len) * 0.5); }
  .scroll .tag { left: calc(var(--len) * 0.5 + 22px); }
}

/* =====================================================================
   Phones & tablets
   ===================================================================== */
.only-touch { display: none; }
.v-cur { display: none; }
@media (hover: none) {
  .only-hover { display: none !important; }
  .only-touch { display: revert; }
  .r-actions kbd, .v-back kbd { display: none; }
}
.view { overflow-x: hidden; }

/* portrait tablets: the room's annotations get squeezed, so it becomes a designed menu like the phone */
@media (orientation: portrait) and (max-width: 1100px) and (min-width: 761px) {
  .labels, .marks, .spot { display: none; }
  #room-video { --vx: 34%; }
  .identity { left: var(--pad); right: var(--pad); top: 88px; text-align: left; max-width: none; }
  .identity h1 { font-size: clamp(84px, 13vw, 132px); }
  .id-spec { justify-items: start; }
  .id-spec li { font-size: 15px; }
  .hint { display: none; }
  .m-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: absolute; left: var(--pad); right: var(--pad); bottom: var(--pad); z-index: 6; }
  .m-menu a { display: grid; gap: 6px; padding: 16px 18px; border-radius: 16px; background: rgba(12, 10, 8, 0.6); backdrop-filter: blur(10px); border: 1px solid var(--line); text-decoration: none; font: 850 24px/1 var(--f-display); font-stretch: 64%; text-transform: uppercase; }
  .m-menu a:last-child { grid-column: 1 / -1; }
  .m-menu a .hand { font-size: 20px; color: var(--amber); text-transform: none; font-weight: 700; }
  .m-menu a { opacity: 0; transform: translateY(14px); transition: opacity 0.5s calc(1.1s + var(--k) * 0.07s), transform 0.7s var(--ease) calc(1.1s + var(--k) * 0.07s); }
  .room.play .m-menu a { opacity: 1; transform: none; }
  .shade { background: linear-gradient(180deg, rgba(6, 5, 4, 0.78) 0%, rgba(6, 5, 4, 0.2) 34%, rgba(6, 5, 4, 0.35) 55%, rgba(6, 5, 4, 0.9) 100%) !important; }
}

/* compact section navigation (phones + portrait tablets): a sticky header and a sticky bottom bar */
@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
  .v-top { position: sticky; top: 0; z-index: 5; padding-bottom: 12px; background: linear-gradient(180deg, rgba(12, 10, 8, 0.96) 60%, rgba(12, 10, 8, 0)); }
  .v-rail { position: sticky; bottom: 0; z-index: 5; justify-content: space-between; padding-top: 16px;
    background: linear-gradient(0deg, rgba(12, 10, 8, 0.97) 60%, rgba(12, 10, 8, 0)); }
  .v-tabs { display: none; }
  .v-cur { display: block; font: 500 12.5px/1 var(--f-mono); letter-spacing: 0.06em; color: var(--ink-2); }
  .v-cur b { color: var(--amber); font-weight: 600; }
  .v-main { padding-bottom: 8px; }
}

/* phones */
@media (max-width: 760px) {
  :root { --pad: 18px; }
  .identity h1 { font-size: clamp(54px, 17vw, 76px); }
  .v-head h2 { font-size: clamp(50px, 15vw, 70px); }
  .v-head .v-note { font-size: 24px; }
  .v-main { gap: 22px; padding-top: 6px; }
  /* who */
  .who-lens { width: min(72vw, 300px); }
  .facts { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .fact { padding: 10px; }
  .fact b { font-size: 20px; }
  .fact span { font-size: 11.5px; }
  /* passion */
  .beliefs li { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
  .beliefs h3 { font-size: 26px; }
  /* skills: keycaps side-scroll like a real keyboard row */
  .keys { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin: 0 calc(var(--pad) * -1); padding: 4px var(--pad) 20px; scrollbar-width: none; }
  .keys::-webkit-scrollbar { display: none; }
  .key { flex: 0 0 82%; scroll-snap-align: center; }
  /* projects: the desktop becomes a phone-sized window with the dock on top */
  .monitor { height: auto; padding: 8px; border-radius: 18px; }
  .screen { height: auto; display: flex; flex-direction: column-reverse; gap: 10px; padding: 10px; }
  .win { position: relative; inset: auto; }
  .win-body { overflow: visible; padding: 16px; }
  .dock { position: relative; left: auto; bottom: auto; transform: none; align-self: stretch; justify-content: space-between; overflow-x: auto; }
  .dock button { flex: 1 1 0; width: auto; min-width: 40px; height: 44px; }
  .dock button:hover { transform: none; }
  .dock button span { display: none; }
  /* experience */
  .rack { gap: 18px; }
  .scroll.on { transform: rotate(0deg) translateX(8px); }
  .sheet-stage { height: 560px; }
  .sheet { width: calc(100% - 16px); }
  .sheet .rod { left: -8px; right: -8px; }
  .p-in { padding: 28px 20px; }
  .p-in ul { font-size: 13.5px; }
  /* qualifications */
  .wall { gap: 12px; }
  .r-info { max-height: 50vh; }
  /* contact */
  .mug { width: 150px; }
  .contact-big { font-size: clamp(30px, 10vw, 44px); word-break: break-all; }
  /* room */
  .identity { top: 58px; }
  .m-menu { gap: 7px; }
}
@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
  .view { grid-template-rows: auto 1fr auto; }
  .v-main { min-height: auto; align-content: center; }
}
@media (max-width: 760px) {
  .facts { grid-template-columns: 1fr; gap: 6px; }
  .fact { display: flex; align-items: baseline; gap: 12px; padding: 10px 14px; }
  .fact b { margin: 0; flex: none; font-size: 20px; }
  .fact span { font-size: 12.5px; }
}
@media (orientation: portrait) and (min-width: 761px) and (max-width: 1100px) {
  .v-head h2 { font-size: clamp(76px, 10.5vw, 116px); }
  .v-head .v-note { font-size: 30px; }
  .v-head p { font-size: 17px; max-width: 40em; }
  .beliefs h3 { font-size: 34px; }
  .beliefs p { font-size: 16px; }
  .v-cur { font-size: 14px; }
}

/* =====================================================================
   Skills: keycap tabs + a terminal display (all screen sizes)
   ===================================================================== */
.minikeys .tkey { font: 500 12px/1 var(--f-mono); color: var(--ink-2); cursor: pointer; padding: 8px 10px; border-radius: 8px; border: 0;
  background: linear-gradient(180deg, #2a231d, #1b1612); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset, 0 3px 0 #0a0806;
  transition: transform 0.1s, box-shadow 0.1s, color 0.2s; }
.minikeys .tkey:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset, 0 0 0 #0a0806; }
.minikeys .tkey.lit { color: var(--amber); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset, 0 3px 0 #0a0806, 0 0 14px rgba(255, 181, 71, 0.35); }
.deck { display: grid; gap: clamp(14px, 2vh, 22px); }
.oled { border-radius: 16px; overflow: hidden; background: radial-gradient(120% 100% at 30% 0%, #16130f, #0a0908 70%); border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.7), 0 30px 60px -30px rgba(0, 0, 0, 0.9); position: relative; }
.oled::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px); }
.o-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font: 500 12px/1 var(--f-mono); color: var(--muted); }
.o-bar > i { width: 10px; height: 10px; border-radius: 50%; background: #3a322a; box-shadow: 14px 0 0 #3a322a, 28px 0 0 #3a322a; margin-right: 28px; }
.o-led { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.o-body { padding: clamp(16px, 2vw, 24px); min-height: clamp(250px, 34vh, 330px); font: 400 14px/1.55 var(--f-mono); color: #e9dfcf; }
.o-body p, .o-body h3 { margin: 0; }
.o-cmd { color: var(--muted); font-size: 13px; margin-bottom: 10px !important; }
.o-p { color: var(--green); }
.o-title { font: 850 clamp(22px, 2.1vw, 32px)/1 var(--f-display) !important; font-stretch: 64% !important; text-transform: uppercase; color: var(--amber); margin-bottom: 12px !important; text-shadow: 0 0 18px rgba(255, 181, 71, 0.35); }
.o-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.o-list li { position: relative; padding-left: 18px; font-size: 13.5px; }
.o-list li::before { content: "›"; position: absolute; left: 0; color: var(--amber); }
.o-list li.next::before { color: var(--cyan); }
.o-t.typing::after { content: "▌"; margin-left: 1px; color: var(--amber); animation: blink 0.7s steps(1) infinite; }
.o-stack { font-size: 12px; color: var(--cyan); opacity: 0; transition: opacity 0.4s; }
.o-body.done .o-stack { opacity: 1; }
.skeys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 16px); }
.skey { --lift: 0px; position: relative; display: grid; gap: 6px; text-align: left; cursor: pointer; color: var(--ink); font: inherit;
  padding: 14px 14px 16px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, #2c241d 0%, #1b1612 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 calc(9px - var(--lift)) 0 #0a0806, 0 calc(20px - var(--lift)) 34px -10px rgba(0, 0, 0, 0.7);
  transform: translateY(var(--lift)); transition: transform 0.12s, box-shadow 0.12s, background 0.3s; }
.skey:hover { --lift: -2px; }
.skey.on { --lift: 5px; background: linear-gradient(180deg, #3a2c1d 0%, #231a12 100%); }
.skey.pressed { --lift: 8px; }
.s-top { display: flex; justify-content: space-between; align-items: center; font: 600 11px/1 var(--f-mono); color: var(--muted); }
.s-top b { color: var(--amber); }
.s-led { width: 8px; height: 8px; border-radius: 50%; background: #3a322a; transition: background 0.2s, box-shadow 0.2s; }
.skey.on .s-led { background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.s-name { font: 850 clamp(20px, 1.9vw, 28px)/0.95 var(--f-display); font-stretch: 64%; text-transform: uppercase; }
.s-sub { font: 500 11px/1.3 var(--f-mono); color: var(--muted); }

/* =====================================================================
   Phones & portrait tablets: the room tour
   ===================================================================== */
.tour-dock, .tour-scrim { display: none; }
.room.tour .labels, .room.tour .marks, .room.tour .spot { display: block; }
.room.tour { touch-action: none; }
.room.tour .marks g, .room.tour .mark { --o: 0 !important; }
.room.tour .mark:not(.on), .room.tour .marks g:not(.on) { opacity: 0 !important; pointer-events: none; }
.room.tour .mark .note { font-size: clamp(21px, 5.6vw, 28px); }
.room.tour .mark .name { font-size: clamp(22px, 6vw, 30px); }
.room.tour { --sr: 150px; }
.room.tour .hint, .room.tour .m-menu { display: none; }
.room.tour .shade { background:
    radial-gradient(130% 55% at 0% 0%, rgba(6, 5, 4, 0.88) 0%, rgba(6, 5, 4, 0.55) 45%, rgba(6, 5, 4, 0) 75%),
    linear-gradient(0deg, rgba(6, 5, 4, 0.95) 0%, rgba(6, 5, 4, 0.6) 20%, rgba(6, 5, 4, 0) 42%),
    radial-gradient(140% 95% at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.55) 100%) !important; }
.room.tour .identity { top: 58px; }
.room.tour .identity h1 { font-size: clamp(50px, 14.5vw, 104px); }
.room.tour .id-spec-k { margin: 10px 0 6px; font-size: 18px; }
.room.tour .id-spec { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-start; }
.room.tour .id-spec li { padding: 5px 9px; font-size: 12px; }
/* the moving spotlight follows the object the tour is on */
.room.tour.focus .spot { opacity: 1; }
/* redraw the annotation each time the tour arrives at an object */
.room.tour.settled .marks g.on .line, .room.tour.settled .marks g.on .shadow { stroke-dasharray: 1 1; animation: tour-draw 0.9s cubic-bezier(.55, 0, .2, 1) 0.2s both; }
@keyframes tour-draw { from { stroke-dashoffset: -1; } to { stroke-dashoffset: 0; } }
.room.tour.settled .marks g.on .head { animation: tour-fade 0.3s 0.2s both; }
.room.tour.settled .marks g.on .dot, .room.tour.settled .marks g.on .ring { animation: tour-pop 0.55s cubic-bezier(.3, 1.7, .5, 1) both; }
@keyframes tour-pop { from { transform: scale(0); } }
.room.tour.settled .mark.on .note { animation: tour-write 0.75s cubic-bezier(.6, 0, .3, 1) 0.85s both; }
@keyframes tour-write { from { clip-path: inset(-30% 100% -30% -5%); } to { clip-path: inset(-30% -8% -30% -5%); } }
.room.tour.settled .mark.on .name { animation: tour-rise 0.6s var(--ease) 0.7s both; }
@keyframes tour-rise { from { opacity: 0; transform: translateY(10px); } }
.room.tour.settled .mark.on::before { animation: tour-fade 0.6s 0.6s both; }
@keyframes tour-fade { from { opacity: 0; } }

.room.tour .tour-dock { display: grid; gap: 10px; position: absolute; left: var(--pad); right: var(--pad); bottom: max(var(--pad), env(safe-area-inset-bottom)); z-index: 7;
  opacity: 0; transform: translateY(16px); transition: opacity 0.6s 2.2s, transform 0.8s var(--ease) 2.2s; }
.room.tour.play .tour-dock { opacity: 1; transform: none; }
.tour-hint { margin: 0; text-align: center; }
.tour-hint .hand { font-size: 20px; color: var(--ink-2); }
.tour-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; gap: 8px; }
.t-nav { height: 56px; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(12, 10, 8, 0.55); backdrop-filter: blur(10px); color: var(--ink); font-size: 20px; cursor: pointer; }
.t-nav:active { transform: scale(0.95); }
.t-open { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 56px; border-radius: 16px; text-decoration: none; color: #1a1204;
  background: linear-gradient(180deg, #ffc56a, var(--amber)); box-shadow: 0 10px 30px -10px rgba(255, 181, 71, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.t-n { font: 700 12px/1 var(--f-mono); opacity: 0.7; }
.t-name { flex: 1; min-width: 0; font: 850 22px/1 var(--f-display); font-stretch: 64%; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-go { font: 600 12px/1 var(--f-mono); }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.t-dots { display: flex; gap: 6px; }
.t-dots button { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.t-dots i { display: block; width: 7px; height: 7px; border-radius: 4px; background: rgba(244, 239, 232, 0.3); transition: width 0.35s var(--ease), background 0.3s; }
.t-dots button.on i { width: 20px; background: var(--amber); }
.t-all { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(12, 10, 8, 0.55); backdrop-filter: blur(10px); color: var(--ink); font: 500 12.5px/1 var(--f-body); cursor: pointer; }
/* "All sections" slides up as a sheet */
.room.tour.sheet-open .tour-scrim { display: block; position: absolute; inset: 0; z-index: 8; background: rgba(4, 3, 2, 0.6); backdrop-filter: blur(3px); animation: tour-fade 0.3s; }
.room.tour.sheet-open .m-menu { display: grid; grid-template-columns: 1fr; gap: 7px; position: absolute; left: 0; right: 0; bottom: 0; top: auto; z-index: 9;
  padding: 22px var(--pad) max(22px, env(safe-area-inset-bottom)); background: rgba(16, 13, 10, 0.96); border-top: 1px solid var(--line-2); border-radius: 24px 24px 0 0;
  animation: sheet-up 0.45s var(--ease); }
.room.tour.sheet-open .m-menu a { opacity: 1; transform: none; }
@keyframes sheet-up { from { transform: translateY(100%); } }
@media (min-width: 600px) { .room.tour.sheet-open .m-menu { grid-template-columns: 1fr 1fr; } }

/* =====================================================================
   Phones & portrait tablets: skills, experience, qualifications
   ===================================================================== */
@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
  .skeys { gap: 8px; }
  .skey { padding: 12px 10px 14px; border-radius: 14px; }
  .s-sub { display: none; }
  .o-body { min-height: 300px; font-size: 13px; }
  /* experience: rolls only, paper opens over the screen */
  .sheet-stage { height: auto; }
  .roll-hint { margin: 4px 0 0; text-align: center; }
  .roll-hint .hand { font-size: 22px; color: var(--amber); }
}
.unroll-layer { position: fixed; inset: 0; z-index: 30; }
.u-scrim { position: absolute; inset: 0; background: rgba(4, 3, 2, 0.72); backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.35s; }
.unroll-layer.on .u-scrim { opacity: 1; }
.sheet.u-sheet { position: absolute; left: 14px; right: 14px; top: max(64px, 7vh); bottom: 98px; width: auto; height: auto; max-width: 680px; margin: 0 auto; }
.u-sheet .rod.bottom { cursor: grab; touch-action: none; }
.u-sheet .rod.bottom::after { content: ""; position: absolute; inset: -16px -8px; }
.u-grip { display: none; }
.u-sheet .u-grip { display: block; position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); white-space: nowrap; font: 700 17px/1 var(--f-hand); color: var(--amber); opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.u-sheet.inked .u-grip { opacity: 1; }
.u-sheet .p-in > * { opacity: 0; }
.u-sheet.inked .p-in > * { opacity: 1; animation: ink 0.6s var(--ease) both; }
.u-sheet.inked .p-in .role { animation-delay: 0.08s; } .u-sheet.inked .p-in .org { animation-delay: 0.16s; } .u-sheet.inked .p-in ul { animation-delay: 0.24s; }
.u-close { position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; transition: opacity 0.35s 0.6s, transform 0.5s var(--ease) 0.6s;
  padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(22, 18, 15, 0.9); color: var(--ink); font: 600 14px/1 var(--f-body); cursor: pointer; }
.unroll-layer.on .u-close { opacity: 1; transform: translate(-50%, 0); }
.unroll-layer.closing .u-close { opacity: 0; transition-delay: 0s; }

.r-float, .r-handle { display: none; }
@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
  .reading .r-info { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 78vh; margin: 0 !important; overflow: hidden;
    padding: 4px 20px max(22px, env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; border-bottom: 0;
    opacity: 1; visibility: hidden; transform: translateY(100%); transition: transform 0.55s var(--ease), visibility 0s 0.55s; }
  .reading.ready .r-info { visibility: visible; transform: translateY(calc(100% - 158px)); transition: transform 0.55s var(--ease), visibility 0s; }
  .reading.ready .r-info.open { transform: none; overflow-y: auto; }
  .r-handle { display: grid; justify-items: center; gap: 4px; width: 100%; padding: 8px 0 12px; border: 0; background: none; color: var(--muted); cursor: pointer; touch-action: none; font: 500 11px/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; }
  .r-handle i { display: block; width: 44px; height: 5px; border-radius: 3px; background: rgba(244, 239, 232, 0.35); }
  .r-info.open .r-handle span { visibility: hidden; }
  .r-title { font-size: clamp(28px, 8vw, 44px); }
  .r-actions { display: none; }
  .r-float { display: flex; gap: 10px; position: absolute; right: 14px; top: 14px; z-index: 4; opacity: 0; transition: opacity 0.4s 0.5s; }
  .reading.on .r-float { opacity: 1; }
  .r-float button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(22, 18, 15, 0.85); backdrop-filter: blur(8px); color: var(--ink); font: 700 13px/1 var(--f-mono); cursor: pointer; }
  .r-float .r-uv2[aria-pressed="true"] { border-color: #a57bff; color: #d5bfff; box-shadow: 0 0 20px rgba(150, 90, 255, 0.5); }
  .r-torch { width: 180px; height: 180px; margin: -90px 0 0 -90px; }
}

@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) { .reading .r-info { z-index: 3; } }
.room.tour .stage { background: #000; }
