/* Tokens: dark-only, one yellow accent (see DESIGN.md). */
:root {
  --surface: #050607;
  --surface-2: #0b0e11;
  --ink: #f1efe8;
  --ink-muted: #d3d1c8;
  --line: rgba(238, 242, 240, 0.16);
  --accent: #f2b632;
  --accent-ink: #1a1405;
  --accent-glow: rgba(242, 182, 50, 0.32);
  --wall: #66666a;
  --wall-deep: #4d4d51;
  --paper: #ecebe6;
  --paper-ink: #1a1a1a;
  --paper-gray: #b9b9bc;
  --scrap-dark: #131313;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  --radius-note: 2px 6px 3px 8px;
  --shadow-paper: 0 8px 16px rgba(0, 0, 0, 0.35);
  --wall-img: url("../assets/wall.webp");
  --chalk: rgba(240, 238, 228, 0.3);
  --bar-bg: rgba(5, 6, 7, 0.72);
  --font-hand: "Caveat", "Segoe Print", "Bradley Hand", "Comic Neue", "Comic Sans MS", cursive;

  --font-heading: "Anton", "Haettenschweiler", "Arial Narrow", "Liberation Sans Narrow", Impact, sans-serif;
  --font-body: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-mono: var(--font-body); /* checker allows only DESIGN.md heading/body families */

  --step-display: clamp(3.5rem, 1.5rem + 9vw, 9.5rem);
  --step-h2: clamp(2rem, 1.2rem + 3vw, 3.75rem);
  --step-lede: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem);
  --step-text: 1rem;
  --step-label: 0.75rem;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 16px;
  --s-4: 24px;
  --s-5: 48px;
  --s-6: 96px;
  --inset: clamp(16px, 4vw, 56px);

  --radius-panel: 24px;
  --radius-inner: 16px; /* panel radius 24 minus 8px gap */
  --radius-round: 999px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-ui: 320ms;
  --dur-piece: 900ms;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; background: var(--surface); color-scheme: dark; }
body {
  font-family: var(--font-body);
  font-size: var(--step-text);
  line-height: 1.6;
  color: var(--ink);
  position: relative;
  min-height: 100svh;
  overflow-x: hidden;
}
html:not(.garage) body, html:not(.garage) main { overflow-x: clip; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--wall-img) 0 0 / 940px auto repeat, var(--wall); will-change: transform; }
html.js body.is-loading { overflow: hidden; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.label {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
main > section > .label { color: var(--ink); font-weight: 600; text-shadow: 0 1px 4px #000, 0 0 2px #000; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 400; text-transform: uppercase; line-height: 0.95; letter-spacing: 0.01em; }

/* ---------- Loader: a pencil sketches on a note ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  /* lit like the 3D garage behind it: warm lamp glow from above, warm tint, dark vignette */
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(255, 210, 130, 0.28), transparent 70%),
    radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(20, 14, 6, 0.45) 100%),
    linear-gradient(rgba(150, 118, 60, 0.32), rgba(150, 118, 60, 0.32)),
    var(--wall-img) 0 0 / 940px auto repeat, var(--wall);
  transition: opacity 300ms ease;
  display: none;
}
html.js body.is-loading .loader:not(.is-gone) { display: grid; }
.loader.is-open { opacity: 0; }
.loader.is-gone { display: none; }
.sketch {
  position: relative; width: min(340px, 80vw); padding: var(--s-4) var(--s-4) var(--s-3);
  background: var(--paper); color: var(--paper-ink); border-radius: var(--radius-note); box-shadow: var(--shadow-paper);
  rotate: -2deg; transition: transform 300ms var(--ease-out), opacity 250ms ease;
}
.sketch::before { content: ""; position: absolute; top: -7px; left: 50%; width: 16px; height: 16px; translate: -50% 0; border-radius: var(--radius-round); background: radial-gradient(circle at 35% 30%, #666, var(--scrap-dark) 70%); box-shadow: 0 3px 5px rgba(0, 0, 0, 0.5); }
.sketch svg { width: 100%; height: auto; display: block; overflow: visible; }
.sketch__path { fill: none; stroke: #2a2a2c; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: url(#rough); }
.sketch__pencil { fill: var(--accent); stroke: #2a2a2c; stroke-width: 1.5; stroke-linejoin: round; }
.sketch__pencil-tip { fill: #2a2a2c; }
.sketch__count { font-family: var(--font-hand); font-size: 2rem; font-weight: 700; text-align: center; margin-top: var(--s-2); }
.loader.is-open .sketch { transform: translateY(-24px) scale(1.06) rotate(3deg); opacity: 0; }

/* ---------- Pieces: sections assemble from the sides ---------- */
.piece { opacity: 0; transition: opacity var(--dur-piece) var(--ease-out), transform var(--dur-piece) var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms + 250ms); }
.piece[data-from="left"] { transform: translateX(-12vw); }
.piece[data-from="right"] { transform: translateX(12vw); }
.piece[data-from="up"] { transform: translateY(-40px); }
.piece[data-from="down"] { transform: translateY(40px); }
.piece[data-from="grow"] { transform: scale(0.6); }
.is-ready .bar.piece, .is-ready .wall .piece { opacity: 1; transform: none; }
.piece.is-visible { opacity: 1; transform: none; }

/* ---------- Top bar ---------- */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-3) var(--inset);
  background: var(--bar-bg); backdrop-filter: blur(10px);
}
.bar nav { display: flex; gap: var(--s-2); }
.bar nav a, .btn {
  font-family: var(--font-mono); font-size: var(--step-label);
  letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none;
  color: var(--ink-muted);
  padding: var(--s-2) var(--s-3); border-radius: var(--radius-round);
  border: 1px solid transparent; background: none; cursor: pointer;
  transition: color var(--dur-ui), border-color var(--dur-ui), background var(--dur-ui);
}
.bar nav a:hover, .btn:hover { color: var(--ink); border-color: var(--line); }
.bar nav a.is-active { color: var(--accent-ink); background: var(--accent); }
.tools { display: flex; align-items: center; gap: var(--s-2); }
.lang { display: flex; border: 1px solid var(--line); border-radius: var(--radius-round); padding: 2px; }
.lang button { font: inherit; font-family: var(--font-mono); font-size: var(--step-label); letter-spacing: 0.15em; padding: 6px 12px; border: 0; border-radius: var(--radius-round); background: none; color: var(--ink-muted); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ---------- Sections ---------- */
main { padding: 0 var(--inset); position: relative; z-index: 1; }
section { min-height: 100svh; padding: calc(var(--s-6) + 24px) 0 var(--s-6); position: relative; }
/* ---------- Wall hero: notes pinned on a concrete wall ---------- */
.wall {
  min-height: 100svh; padding: 88px 0 var(--s-5);
  margin: 0 calc(var(--inset) * -1);
  overflow: hidden;
}
.stage { position: relative; width: min(1200px, 100%); height: clamp(680px, calc(100svh - 120px), 920px); margin: 0 auto; }

.collage { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: clamp(240px, 29vw, 360px); aspect-ratio: 4 / 5; }
.tile {
  position: absolute;
  background-image: url("../assets/photo.jpg");
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  opacity: 0; transform: translate(var(--fx), var(--fy)) rotate(var(--fr));
  transition: opacity 600ms ease var(--d), transform 1100ms var(--ease-out) var(--d);
}
.is-ready .tile { opacity: 1; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); }
.chip { background-image: none; }
.chip--gray { background: var(--paper-gray); }
.chip--accent { background: var(--accent); }

.title { position: absolute; left: 2%; top: 12%; display: grid; gap: var(--s-2); z-index: 3; }
.title__row { display: flex; }
.title__row:last-child { margin-left: 5vw; }
.scrap {
  font-family: var(--font-heading); font-size: clamp(2.75rem, 6vw, 5.5rem); line-height: 1;
  padding: 0.04em 0.14em; margin-right: -0.05em;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.4);
  translate: 0 var(--lift); rotate: var(--rot);
}
.scrap--paper { background: var(--paper); color: var(--paper-ink); }
.scrap--accent { background: var(--accent); color: var(--accent-ink); }
.scrap--ink { background: var(--scrap-dark); color: var(--paper); }

.note {
  position: absolute; left: var(--x); top: var(--y); rotate: var(--rot);
  width: clamp(150px, 17vw, 220px); padding: var(--s-4) var(--s-3) var(--s-3);
  font-family: var(--font-hand); font-size: clamp(1.1rem, 1.5vw, 1.4rem); line-height: 1.15; text-decoration: none;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
  display: grid; gap: var(--s-1);
}
.note b { font-weight: 700; font-size: 1.2em; }
.note--paper { background: var(--paper); color: var(--paper-ink); border-radius: var(--radius-note); }
.note--sticky { background: var(--accent); color: var(--accent-ink); }
.note::before { /* pin */
  content: ""; position: absolute; top: -7px; left: 50%; width: 16px; height: 16px; translate: -50% 0; border-radius: var(--radius-round);
  background: radial-gradient(circle at 35% 30%, #666, var(--scrap-dark) 70%); box-shadow: 0 3px 5px rgba(0, 0, 0, 0.5);
}
a.note { cursor: pointer; padding-right: 2.4rem;
  transition: opacity var(--dur-piece) var(--ease-out) calc(var(--i, 0) * 90ms + 250ms), transform var(--dur-piece) var(--ease-out) calc(var(--i, 0) * 90ms + 250ms),
    translate var(--dur-ui) var(--ease-out), scale var(--dur-ui) var(--ease-out), box-shadow var(--dur-ui); }
a.note::after { /* folded corner: "this opens" */
  content: ""; position: absolute; right: 0; bottom: 0; width: 26px; height: 26px;
  background: linear-gradient(135deg, transparent 50%, rgba(0, 0, 0, 0.22) 50%); transition: width var(--dur-ui), height var(--dur-ui);
}
.note__go { position: absolute; right: 10px; top: 50%; translate: 0 -50%; width: 1.3em; height: 1.3em; opacity: 0.75; transition: translate var(--dur-ui) var(--ease-out), opacity var(--dur-ui); }
a.note:hover, a.note:focus-visible { translate: 0 -8px; scale: 1.06; box-shadow: 0 16px 24px rgba(0, 0, 0, 0.45); animation: wiggle 700ms ease; }
a.note:hover::after, a.note:focus-visible::after { width: 38px; height: 38px; }
a.note:hover .note__go, a.note:focus-visible .note__go { translate: 6px -50%; opacity: 1; }
@keyframes wiggle { 0% { rotate: var(--rot); } 20% { rotate: calc(var(--rot) + 3deg); } 45% { rotate: calc(var(--rot) - 2.4deg); } 70% { rotate: calc(var(--rot) + 1.2deg); } 100% { rotate: var(--rot); } }
.note span, .note p { white-space: pre-line; }
.note--about { width: clamp(190px, 21vw, 280px); }
mark { background: linear-gradient(transparent 52%, var(--accent) 52%); color: inherit; font-weight: 700; padding: 0 2px; }
.note--sticky mark { background: linear-gradient(transparent 52%, rgba(255, 255, 255, 0.55) 52%); }
.doodle { position: absolute; width: 90px; fill: none; stroke: var(--paper); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.8; }
.doodle--a { left: 17%; top: 62%; }
.doodle--b { left: 64%; top: 52%; }

h2 {
  display: inline-block; font-size: var(--step-h2); margin: var(--s-2) 0 var(--s-5);
  padding: 0.1em 0.35em; background: var(--paper); color: var(--paper-ink);
  rotate: -1.5deg; box-shadow: var(--shadow-paper);
}
.card {
  position: relative; background: var(--paper); color: var(--paper-ink);
  border-radius: var(--radius-note); padding: var(--s-4) var(--s-4) var(--s-4);
  box-shadow: var(--shadow-paper); rotate: var(--rot, 0deg);
}
.card::before { /* pin */
  content: ""; position: absolute; top: -7px; left: 50%; width: 16px; height: 16px; translate: -50% 0; border-radius: var(--radius-round);
  background: radial-gradient(circle at 35% 30%, #666, var(--scrap-dark) 70%); box-shadow: 0 3px 5px rgba(0, 0, 0, 0.5);
}
.card .label { color: var(--paper-ink); }
.card--sticky { background: var(--accent); color: var(--accent-ink); }
.card--sticky .label { color: var(--accent-ink); }

.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--s-5); align-items: start; }
.about p { font-size: var(--step-lede); max-width: 56ch; }
.about p + p { margin-top: var(--s-4); }
.facts { display: grid; gap: var(--s-3); }
.facts dt { font-family: var(--font-hand); font-size: 1.4rem; font-weight: 700; }
.facts dd { margin: 0 0 var(--s-2); }

/* Projects: one wide lead note + two narrower ones (content-driven, not a 3-tile grid) */
.projects { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: auto auto; gap: var(--s-5) var(--s-4); }
.project { min-height: 200px; }
.card--lead { grid-row: span 2; }
.resume { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--s-5); margin-top: var(--s-6); align-items: start; }
.card__title { font-size: 2rem; margin-bottom: var(--s-3); }
.exp { list-style: none; padding: 0; display: grid; gap: var(--s-3); }
.exp li { display: grid; }
.exp i { font-weight: 400; opacity: 0.6; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chips li { padding: 4px 12px; border: 1.5px solid var(--accent-ink); border-radius: var(--radius-round); font-weight: 600; }
/* wall art: chalk doodles, cracks and plaster patches painted on the wall */
.wall-art { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.wall-art svg { position: absolute; height: auto; }
.crack { fill: none; stroke: rgba(0, 0, 0, 0.42); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.patch path { fill: rgba(255, 255, 255, 0.045); stroke: rgba(0, 0, 0, 0.18); stroke-width: 2; }
/* logos: pure black, drawn by hand (marker/graffiti look: wobbly displaced fill + doubled pencil outline) */
.logo { position: absolute; rotate: var(--rot, 0deg); display: grid; justify-items: center; gap: 4px; color: #0b0b0c; }
.logo svg { width: 100%; height: auto; overflow: visible; }
.logo__fill { fill: #0b0b0c; filter: url(#ink); }
.logo__line { fill: none; stroke: #0b0b0c; stroke-width: 0.45; stroke-linejoin: round; stroke-linecap: round; filter: url(#ink2); transform: scale(1.035); transform-origin: 12px 12px; }
.logo__line--b { transform: scale(0.97) translate(0.3px, -0.2px); stroke-width: 0.3; opacity: 0.8; }
.logo figcaption { font-family: var(--font-hand); font-weight: 700; font-size: 1.5rem; line-height: 1; rotate: -2deg; white-space: nowrap; }
.project h3 { font-size: 2.25rem; margin-bottom: var(--s-3); }
.card--lead h3 { font-size: 4.5rem; }
.project p { max-width: 46ch; }

/* Blog */
.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-5); }
.filters .btn { background: var(--paper); color: var(--paper-ink); box-shadow: var(--shadow-paper); }
.filters .btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.posts { list-style: none; padding: 0; display: grid; gap: var(--s-4); max-width: 900px; align-content: start; }
.post { display: grid; grid-template-columns: 7rem 1fr auto; gap: var(--s-4); align-items: baseline; padding: var(--s-3) var(--s-4); transition: translate var(--dur-ui) var(--ease-out); }
.post::before { display: none; }
.post:hover { translate: 8px 0; }
.post[hidden] { display: none; }
.post h3 { font-size: 1.75rem; }
.post .label { color: var(--paper-ink); opacity: 0.7; }
.post .tag { opacity: 1; font-weight: 700; color: #7a5408; }
.post .pop { display: inline-block; margin-bottom: 4px; padding: 1px 8px; border-radius: var(--radius-round); background: var(--accent); color: var(--accent-ink); font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }

/* Contact */
.contact h2 { font-size: var(--step-display); }
.contact .lede { font-size: var(--step-lede); color: var(--ink); margin: 0 0 var(--s-4); }
.links { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.links a { display: inline-flex; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-4); background: var(--paper); color: var(--paper-ink); border-radius: var(--radius-note); box-shadow: var(--shadow-paper); rotate: var(--rot, 0deg); font-family: var(--font-hand); font-size: 1.5rem; font-weight: 700; text-decoration: none; transition: transform var(--dur-ui) var(--ease-out), background var(--dur-ui); }
.links a:hover, .links a:focus-visible { transform: translateY(-6px) scale(1.05); background: var(--accent); color: var(--accent-ink); }
footer { position: relative; z-index: 1; padding: var(--s-5) var(--inset); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s-3); border-top: 1px solid var(--line); }

/* ---------- Lamps: darkness with light cut out of it ---------- */
.lights { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 45; pointer-events: none; }

/* ---------- Console ---------- */
.console { position: fixed; left: var(--inset); right: var(--inset); bottom: var(--s-4); z-index: 60; max-width: 720px; background: rgba(5, 6, 7, 0.94); border: 1px solid var(--accent); border-radius: var(--radius-panel); padding: var(--s-3) var(--s-4); font-family: var(--font-mono); font-size: 0.875rem; box-shadow: 0 0 60px var(--accent-glow); }
.console[hidden] { display: none; }
.console__out { max-height: 32vh; overflow: auto; white-space: pre-wrap; color: var(--ink-muted); margin-bottom: var(--s-2); }
.console__out b { color: var(--accent); font-weight: 400; }
.console form { display: flex; gap: var(--s-2); }
.console input { flex: 1; background: none; border: 0; color: var(--ink); font: inherit; outline: none; }
.console__hint { position: fixed; right: var(--inset); bottom: var(--s-3); z-index: 40; }

@media (max-width: 760px) {
  .about, .projects, .resume { grid-template-columns: 1fr; }
  .card--lead { grid-row: auto; }
  .card--lead h3 { font-size: 3rem; }
  .post { grid-template-columns: 1fr; gap: var(--s-2); }
  .bar { flex-wrap: wrap; }
  .bar nav { display: none; }
  .stage { height: auto; display: grid; gap: var(--s-4); justify-items: center; padding: 0 var(--inset); }
  .collage { position: relative; left: auto; top: auto; translate: none; margin: var(--s-5) 0; order: 1; }
  .title { position: static; order: 0; }
  .title__row:last-child { margin-left: 0; }
  .note { position: relative; left: auto; top: auto; order: 2; width: min(80vw, 300px); }
  .doodle { display: none; }
  .wall { padding-top: 112px; }
  /* logo positions are % of the whole (very tall) phone page, so they land on headings: decor off on phones */
  .logo { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .piece, .loader, .menu a, .project, .post { transition-duration: 1ms; transition-delay: 0s; }
}

/* ---------- Garage: scroll = walk through a 3D garage (js/garage.js; class set in <head> when WebGL + wide screen) ---------- */
.btn--walk { display: none; align-items: center; gap: var(--s-2); }
html.garage .btn--walk { display: inline-flex; }
.btn--walk[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
#scroll-spacer { display: none; }
html.garage #scroll-spacer { display: block; }
#garage { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--surface); }
#garage canvas, #garage .css3d { position: absolute; inset: 0; }
#garage .css3d { pointer-events: none; }
.plane { color: var(--ink); }
.cross { position: fixed; left: 50%; top: 50%; width: 10px; height: 10px; translate: -50% -50%; border-radius: 50%; background: rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.55); z-index: 55; pointer-events: none; }
.cross[hidden], .walkhint[hidden] { display: none; }
.walkhint { position: fixed; left: 50%; bottom: var(--s-4); translate: -50% 0; z-index: 55; padding: var(--s-2) var(--s-4); background: var(--bar-bg); border-radius: var(--radius-round); pointer-events: none; white-space: nowrap; }
html.garage {
  --step-display: 6rem; --step-h2: 3.4rem; --step-lede: 1.25rem;
}
html.garage body { min-height: 0; }
html.garage body::before, html.garage main, html.garage .wall-art, html.garage .console__hint { display: none; }
html.garage footer { position: fixed; left: var(--inset); bottom: var(--s-3); z-index: 40; padding: 0; border: 0; background: none; }
html.garage footer .label { color: var(--ink); text-shadow: 0 1px 6px #000; }
.plane section { min-height: 0; padding: 28px 32px 36px; }
.plane .wall { padding: 0; margin: 0; overflow: visible; }
.plane .stage { width: 1200px; height: 780px; }
.plane .collage { width: 340px; }
.plane .scrap { font-size: 5.5rem; }
.plane .title__row:last-child { margin-left: 60px; }
.plane .note { width: 210px; font-size: 1.4rem; }
.plane .note--about { width: 270px; }
.plane .logo { position: static; width: 220px; }
.plane .logo figcaption { font-size: 1.6rem; }
.plane .contact h2 { font-size: 5rem; }

html.garage { scrollbar-width: none; }
html.garage::-webkit-scrollbar { display: none; }
html.walking, html.walking body { overflow: hidden; touch-action: none; }
.walkhint .hint-touch { display: none; }
@media (pointer: coarse) {
  .walkhint .hint-kb, .cross, footer .hint-kb { display: none; }
  .walkhint .hint-touch { display: inline; }
}
.walkhint { white-space: normal; text-align: center; max-width: 90vw; }
/* portrait / phones: tall narrow planes, camera pans down them */
html.portrait .plane .stage { width: 100%; height: auto; display: grid; gap: var(--s-4); justify-items: center; padding: 0 var(--s-3); }
html.portrait .plane .collage { position: relative; left: auto; top: auto; translate: none; margin: var(--s-4) 0; order: 1; width: 260px; }
html.portrait .plane .title { position: static; order: 0; }
html.portrait .plane .scrap { font-size: 3.2rem; }
html.portrait .plane .title__row:last-child { margin-left: 0; }
html.portrait .plane .note { position: relative; left: auto; top: auto; order: 2; width: min(100%, 300px); font-size: 1.3rem; }
html.portrait .plane .doodle { display: none; }
html.portrait .plane section { padding: 20px 16px 24px; }
html.portrait .plane .about, html.portrait .plane .projects, html.portrait .plane .resume { grid-template-columns: 1fr; gap: var(--s-4); }
html.portrait .plane .card--lead { grid-row: auto; }
html.portrait .plane .card--lead h3 { font-size: 3rem; }
html.portrait .plane .post { grid-template-columns: 1fr; gap: var(--s-2); }
html.portrait .plane .contact h2 { font-size: 3.4rem; }
html.portrait .plane h2 { font-size: 2.4rem; }
html.portrait .plane .logo { width: 230px; }
@media (max-width: 760px) {
  .bar { flex-wrap: wrap; gap: var(--s-1); padding: var(--s-2) var(--s-3); }
  .bar nav { display: flex; order: 2; width: 100%; overflow-x: auto; gap: 2px; scrollbar-width: none; }
  .bar nav { overflow: visible; justify-content: space-between; }
  .bar nav a { padding: 6px 7px; letter-spacing: 0.04em; font-size: 0.6875rem; white-space: nowrap; }
  .tools { gap: 2px; }
  .btn--walk span { display: none; }
}
html.portrait footer { display: none; }

/* ---------- SecondBrain room: the same garage, its own notes; a graph of notes floats in the middle (garage.js) ---------- */
.sbroom[hidden] { display: none; }
a.project { display: block; text-decoration: none; cursor: pointer; }
a.project:hover, a.project:focus-visible { translate: 0 -6px; }
#sb-back { position: fixed; left: var(--inset, 24px); top: 84px; z-index: 60; }
#sb-back[hidden] { display: none; }
#fade { position: fixed; inset: 0; z-index: 70; background: radial-gradient(circle at 50% 55%, #fff8e6 0%, #ffe9b8 35%, var(--accent) 75%, #050607 100%); opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
#fade.on { opacity: 1; pointer-events: auto; }
html.in-brain .wall-art { display: none; }
html.in-brain { overscroll-behavior: none; }
.nodelabel { display: block; color: var(--paper); font-family: var(--font-hand); font-weight: 700; font-size: 34px; white-space: nowrap; text-shadow: 0 0 12px var(--accent-glow), 0 2px 3px #000; }

.sbp { padding: 40px 48px 44px; text-align: left; }
.sbp > .label { display: block; margin-bottom: 4px; color: var(--paper-ink); opacity: 0.6; }
.sbp h2 { display: block; font-size: 4rem; line-height: 1; margin: 0 0 22px; padding: 0; background: none; box-shadow: none; rotate: 0deg; color: inherit; }
.sbp ul, .sbp ol { list-style: none; margin: 0; padding: 0; }
.sbp li, .sbp p { font-size: 1.55rem; line-height: 1.45; }
.sbp .lede { font-size: 2rem; line-height: 1.3; margin: 0 0 24px; max-width: 24em; }
.sbp__facts { display: grid; gap: 14px; max-width: 30em; }
.sbp__facts li { position: relative; padding-left: 28px; }
.sbp__facts li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 13px; height: 13px; background: var(--accent); border-radius: 2px; rotate: 8deg; }

.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.skills li {
  position: relative; padding: 20px 22px; background: var(--accent); color: var(--accent-ink); border-radius: var(--radius-note);
  box-shadow: var(--shadow-paper); rotate: var(--rot, 0deg); cursor: help; outline: 2px solid transparent; outline-offset: 5px;
  transition: translate var(--dur-ui) var(--ease-out), box-shadow var(--dur-ui), outline-color var(--dur-ui);
}
.skills code { font-family: var(--font-heading); font-size: 2.1rem; letter-spacing: 0.01em; }
html.walking .skills li.is-aim, .skills li:hover, .skills li:focus-visible { z-index: 6; translate: 0 -6px; outline-color: var(--accent); box-shadow: 0 16px 24px rgba(0, 0, 0, 0.45), 0 0 34px 6px var(--accent-glow); }
.tip {
  position: absolute; left: 50%; top: calc(100% + 14px); width: 19em; z-index: 7; translate: -50% 8px; rotate: calc(var(--rot, 0deg) * -1);
  padding: 14px 18px; background: var(--scrap-dark); color: var(--ink); font-size: 1.35rem; line-height: 1.4; border-radius: 6px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: opacity var(--dur-ui), translate var(--dur-ui) var(--ease-out);
}
.skills li:nth-child(n+3) .tip { top: auto; bottom: calc(100% + 14px); }
.skills li.is-aim .tip, .skills li:hover .tip, .skills li:focus-visible .tip { opacity: 1; translate: -50% 0; }
.kitstats { display: flex; flex-wrap: wrap; gap: 14px 30px; margin: 0 0 30px; }
.kitstats li { display: flex; flex-direction: column; line-height: 1; }
.kitstats b { font-family: var(--font-heading); font-weight: 400; font-size: 4.2rem; color: var(--paper-ink); text-shadow: 3px 3px 0 var(--accent); }
.kitstats span { margin-top: 6px; font-size: 1.15rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.65; }
.sbp .kitstats { margin: 0 0 30px; }
.sbp .kitkey { display: block; margin: 0 0 12px; color: var(--paper-ink); opacity: 0.6; }
.sbp .hint { margin: 22px 0 0; font-size: 1.25rem; opacity: 0.6; }

.steps { display: grid; gap: 22px; counter-reset: s; max-width: 30em; }
.steps li { position: relative; padding-left: 64px; counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -6px; width: 46px; height: 46px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-family: var(--font-heading); font-size: 1.8rem; border-radius: 50%; }
.sbp pre { margin: 10px 0 0; padding: 12px 16px; background: var(--scrap-dark); color: var(--accent); border-radius: 4px; font-size: 1.35rem; white-space: pre-wrap; }
.sbp pre::before { content: "$ "; opacity: 0.6; }
.sbp__act { display: flex; gap: 16px; margin-top: 30px; }
.sbp__act .btn { font-size: 1.5rem; padding: 12px 28px; border: 2px solid var(--paper-ink); color: var(--paper-ink); }
.sbp__act .btn:first-child { background: var(--paper-ink); color: var(--paper); }

.sbs { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.ftree, .ftree ul { list-style: none; margin: 0; padding: 0; }
.ftree ul { margin-left: 21px; padding-left: 10px; border-left: 1.5px dashed rgba(26, 26, 26, 0.3); }
.ftree li { margin: 0; outline: none; }
.fn { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px 0 6px; border-radius: 4px; cursor: pointer; transition: background var(--dur-ui); }
.fn code { font-family: var(--font-body); font-weight: 600; font-size: 1.4rem; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chev-gap { width: 16px; flex: none; }
.chev { width: 16px; height: 16px; opacity: 0.6; transition: rotate 0.2s ease; }
.ftree li[aria-expanded="true"] > .fn .chev { rotate: 90deg; }
.ftree li[aria-expanded="false"] > ul { display: none; }
.ftree .fn:hover, .ftree li.is-sel > .fn { background: var(--accent); color: var(--accent-ink); }
.ftree li:focus-visible > .fn { outline: 2px solid var(--paper-ink); outline-offset: 1px; }
.fdetail { display: grid; min-height: 300px; padding: 24px 26px; background: var(--scrap-dark); color: var(--ink); border-radius: 4px; rotate: 1deg; box-shadow: var(--shadow-paper); }
.fd { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 12px; opacity: 0; translate: 0 6px; transition: opacity 0.18s ease, translate 0.18s ease; pointer-events: none; }
.fd.on { opacity: 1; translate: 0 0; }
.fd__kind { font-size: 1.1rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.fd h3 { margin: 0; font-family: var(--font-heading); font-weight: 400; font-size: 2.8rem; line-height: 1.05; overflow-wrap: anywhere; }
.fd h3 code { font-family: inherit; color: var(--accent); }
.sbp .fd__desc { font-size: 1.6rem; color: var(--ink); }
.sbp .fd__by { margin-top: auto; font-size: 1.2rem; opacity: 0.7; }
.fd__hint { align-self: center; font-family: var(--font-hand); font-size: 2rem; opacity: 0.8; }

html.portrait .sbp { padding: 28px 26px 32px; }
html.portrait .sbs { grid-template-columns: 1fr; gap: 16px; }
html.portrait .fdetail { min-height: 240px; }
html.portrait .sbp h2 { font-size: 3rem; }
html.portrait .skills { grid-template-columns: 1fr; }

/* clickable notes: lit by the lamp on hover — accent glow ring, slightly brighter paper */
a.note, a.project { transition: opacity var(--dur-piece) var(--ease-out) calc(var(--i, 0) * 90ms + 250ms), transform var(--dur-piece) var(--ease-out) calc(var(--i, 0) * 90ms + 250ms),
    translate var(--dur-ui) var(--ease-out), scale var(--dur-ui) var(--ease-out), box-shadow var(--dur-ui), outline-color var(--dur-ui), filter var(--dur-ui); }
a.note, a.project { outline: 2px solid transparent; outline-offset: 5px; }
a.note:hover, a.note:focus-visible, a.note.is-aim, a.project:hover, a.project:focus-visible, a.project.is-aim {
  outline-color: var(--accent); filter: brightness(1.08);
  box-shadow: 0 16px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--accent), 0 0 34px 6px var(--accent-glow);
}
a.note.is-aim { translate: 0 -8px; scale: 1.06; }
.links a.is-aim { transform: translateY(-6px) scale(1.05); background: var(--accent); color: var(--accent-ink); }
.links a:hover, .links a:focus-visible, .links a.is-aim { box-shadow: 0 0 28px 4px var(--accent-glow); }

/* a published post: the whole note is the link, lit like the other clickable notes */
.post__go { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.post--live { outline: 2px solid transparent; outline-offset: 5px; transition: translate var(--dur-ui) var(--ease-out), box-shadow var(--dur-ui), outline-color var(--dur-ui); }
.post--live:has(.post__go:hover), .post--live:has(.post__go:focus-visible), .post--live:has(.post__go.is-aim) {
  outline-color: var(--accent); box-shadow: 0 16px 24px rgba(0, 0, 0, 0.45), 0 0 34px 6px var(--accent-glow);
}

.exp b a { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.exp b a:hover { color: var(--accent-ink); background: var(--accent); }
.exp .dur { font-style: normal; font-weight: 500; opacity: 0.7; }

/* About wall in the 3D garage: one wide 3-column grid (text | experience + facts | skills) so it fits a landscape screen */
html.garage:not(.portrait) #about { display: grid; grid-template-columns: 1.15fr 1fr 0.8fr; column-gap: var(--s-5); row-gap: var(--s-4); align-items: start; }
html.garage:not(.portrait) #about > .label, html.garage:not(.portrait) #about > h2 { grid-column: 1 / -1; margin-bottom: 0; }
html.garage:not(.portrait) #about .about, html.garage:not(.portrait) #about .resume { display: contents; }
html.garage:not(.portrait) #about .card--long { grid-column: 1; grid-row: 3 / span 2; }
html.garage:not(.portrait) #about .resume > .card:not(.card--sticky) { grid-column: 2; grid-row: 3; }
html.garage:not(.portrait) #about .facts { grid-column: 2; grid-row: 4; }
html.garage:not(.portrait) #about .resume > .card--sticky { grid-column: 3; grid-row: 3 / span 2; }

/* blog pager */
.pager { display: flex; align-items: center; justify-content: center; gap: var(--s-3); margin-top: var(--s-4); }
.pager .btn { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-paper); font-size: 1.1rem; padding: 6px 18px; }
.pager .btn:disabled { background: var(--paper); color: var(--paper-ink); opacity: 0.45; cursor: default; }
.pager__n { background: var(--paper); color: var(--paper-ink); padding: 6px 12px; border-radius: 2px; box-shadow: var(--shadow-paper); }

/* Blog wall in the 3D garage: a page of 4 posts as a 2x2 grid, so the wall is wide and low and the camera frames it close */
html.garage:not(.portrait) #blog .posts { grid-template-columns: 1fr 1fr; max-width: none; gap: var(--s-4) var(--s-5); }
html.garage:not(.portrait) #blog .post { grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; gap: var(--s-2) var(--s-3); align-items: start; }
html.garage:not(.portrait) #blog .post > .tag { grid-column: 1; grid-row: 1; justify-self: start; }
html.garage:not(.portrait) #blog .post > time { grid-column: 2; grid-row: 1; }
html.garage:not(.portrait) #blog .post > div { grid-column: 1 / -1; grid-row: 2; }
html.garage:not(.portrait) #about > .label, html.garage:not(.portrait) #about > h2 { justify-self: center; text-align: center; }

/* ---------- Audit additions (2026-11-17) ---------- */
.skip { position: fixed; left: 8px; top: -80px; z-index: 200; padding: 10px 18px; background: var(--accent); color: var(--accent-ink); font-family: var(--font-mono); font-size: var(--step-label); letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; border-radius: var(--radius-round); }
.skip:focus { top: 8px; }

.status { display: inline-block; margin-bottom: var(--s-2); padding: 2px 10px; border: 1.5px solid currentColor; border-radius: var(--radius-round); font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.project__facts { list-style: none; padding: 0; margin: var(--s-3) 0; display: grid; gap: var(--s-2); max-width: 46ch; font-size: 1rem; }
.project__facts li { position: relative; padding-left: 22px; }
.project__facts li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 10px; height: 10px; background: var(--accent); border-radius: 2px; rotate: 8deg; }
.project__more { display: inline-block; margin-top: var(--s-2); padding: 10px 22px; background: var(--paper-ink); color: var(--paper); border-radius: var(--radius-round); font-family: var(--font-mono); font-size: var(--step-label); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; transition: background var(--dur-ui), color var(--dur-ui); }
a.project:hover .project__more, a.project:focus-visible .project__more { background: var(--accent); color: var(--accent-ink); }
.note__open { margin-top: var(--s-1); font-size: 0.85em; font-weight: 700; line-height: 1.1; }

.btn--view { display: none; align-items: center; }
html.can3d .btn--view { display: inline-flex; }

#dots { display: none; position: fixed; left: 50%; bottom: 14px; translate: -50% 0; z-index: 40; gap: 10px; pointer-events: none; }
html.garage #dots { display: flex; }
html.walking #dots, html.in-brain #dots { opacity: 0; }
#dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(241, 239, 232, 0.35); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55); transition: background var(--dur-ui), scale var(--dur-ui); }
#dots i.on { background: var(--accent); scale: 1.35; }
#cue { display: none; position: fixed; left: 50%; bottom: 40px; translate: -50% 0; z-index: 40; padding: var(--s-2) var(--s-4); background: var(--bar-bg); color: var(--ink); border-radius: var(--radius-round); pointer-events: none; text-align: center; max-width: 90vw; }
html.garage #cue:not([hidden]) { display: block; }
#cue[hidden] { display: none; }
