/* Irving Artero: portfolio, v5.5.
   Layout language: a Swiss-style portfolio (big section titles, hairlines) on a pulse matrix: a node grid that sweeps
   left to right. The matrix sits behind the hero and carries the Projects map and the Past / Present / Future map.
   Colours: sand, black and blue, taken from his portrait (tan blazer, black shirt, blue-teal backdrop).
     Light mode = sand ground, black ink, blue accent.  Dark mode = sandy black ground, sand ink, blue accent.
   Type: Bricolage Grotesque (variable) + Space Mono for labels.
   Theme: follows the visitor's system setting; the header button overrides it via [data-theme]. */
:root {
  color-scheme: light;
  --bg: #ebe3d5;
  --bg-alt: #f6f1e7;
  --fg: #15130f;
  --muted: #4f4638;
  --dim: #6f6554;
  --line: #d9cfbc;
  --line-strong: #bfb39d;

  --accent: #1f86b0;
  --accent-text: #0b5f82;
  --on-accent: #ffffff;
  --dot: #c9bda4;
  /* path: one colour per role. v5: a cool, analogous set around the site's blue (slate, teal, steel, indigo) instead of
     the warm sand and brown tones, so the timeline reads as part of the blue family rather than the ground */
  --bar-s1: #4a5a6b;       --on-s1: #f6f1e7;
  --bar-finalwav: #d3dbe2; --on-finalwav: #15130f;
  --bar-lacma1: #1c2a3a;   --on-lacma1: #f6f1e7;
  --bar-rondor: #1f7a7a;   --on-rondor: #f6f1e7;
  --bar-lacma2: #3d5a73;   --on-lacma2: #f6f1e7;
  --bar-aww: #5a5f9e;      --on-aww: #f6f1e7;
  /* node maps: 0 hides the grid lattice on the Projects and About maps (light mode); the hero keeps its grid */
  --map-grid: 0;
  --shadow: 0 6px 24px rgba(21, 19, 15, .10);
  --accent-rgb: 31, 134, 176;

  --f-display: "Bricolage Grotesque", system-ui, sans-serif;
  --f-mono: "Space Mono", ui-monospace, monospace;

  --gut: clamp(20px, 4.5vw, 64px);
  --max: 1600px;
  --sec: clamp(80px, 11vw, 150px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #131210;
    --bg-alt: #1b1915;
    --fg: #efe6d6;
    --muted: #b3a893;
    --dim: #8c8170;
    --line: #26221c;
    --line-strong: #433b2f;
    --accent: #4db4e0;
    --accent-text: #4db4e0;
    --on-accent: #0b1822;
    --dot: #4a4335;
    --bar-s1: #2f3b47;       --on-s1: #efe6d6;
    --bar-finalwav: #1e2730; --on-finalwav: #efe6d6;
    --bar-lacma1: #7fa6c4;   --on-lacma1: #131210;
    --bar-rondor: #3a9b9b;   --on-rondor: #0b1822;
    --bar-lacma2: #5b8ab0;   --on-lacma2: #131210;
    --bar-aww: #8a8ed6;      --on-aww: #131210;
    --map-grid: 1;
    --shadow: 0 8px 28px rgba(0, 0, 0, .5);
    --accent-rgb: 77, 180, 224;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131210;
  --bg-alt: #1b1915;
  --fg: #efe6d6;
  --muted: #b3a893;
  --dim: #8c8170;
  --line: #26221c;
  --line-strong: #433b2f;
  --accent: #4db4e0;
  --accent-text: #4db4e0;
  --on-accent: #0b1822;
  --dot: #4a4335;
  --bar-s1: #2f3b47;       --on-s1: #efe6d6;
  --bar-finalwav: #1e2730; --on-finalwav: #efe6d6;
  --bar-lacma1: #7fa6c4;   --on-lacma1: #131210;
  --bar-rondor: #3a9b9b;   --on-rondor: #0b1822;
  --bar-lacma2: #5b8ab0;   --on-lacma2: #131210;
  --bar-aww: #8a8ed6;      --on-aww: #131210;
  --map-grid: 1;
  --shadow: 0 8px 28px rgba(0, 0, 0, .5);
  --accent-rgb: 77, 180, 224;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-display);
  font-size: 1rem;
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
ul, ol, dl, dd, p, h1, h2, h3, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gut)); margin-inline: auto; padding-inline: var(--gut); }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.needs-input { color: var(--accent-text); font-weight: 600; }

:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 12px; top: -64px; z-index: 100; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 10px; transition: top .15s; }
.skip:focus { top: 12px; }

/* header: a wordmark and a few links, nothing else */
.bar { position: relative; z-index: 5; }
.bar__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { text-decoration: none; font-weight: 700; letter-spacing: -0.02em; font-size: 1.05rem; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); }
.nav a:not(.cta) { text-decoration: none; font-size: .95rem; font-weight: 600; color: var(--dim); padding: 12px 2px; transition: color .18s ease; }
.nav a:not(.cta):hover, .nav a[aria-current="true"] { color: var(--fg); }

.theme-toggle { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 999px; border: 1.5px solid var(--line-strong); background: transparent; color: var(--fg); cursor: pointer; transition: border-color .18s ease; }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { border-color: var(--fg); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
}
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }

/* the call-to-action pill: a status dot and a short line */
.cta { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 20px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line-strong); color: var(--fg); font-size: .92rem; font-weight: 600; text-decoration: none; white-space: nowrap; box-shadow: var(--shadow); transition: transform .18s ease; }
.cta::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.cta:hover { transform: translateY(-2px); }
.cta:active { transform: translateY(0) scale(.98); }

/* hero: his name across the full width, the line under it, then the bio and portrait close by; the pulse matrix sits behind it all */
.hero { position: relative; overflow: hidden; }
.hero__art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.6) 40%, #000 72%, rgba(0,0,0,0) 100%); mask-image: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.6) 40%, #000 72%, rgba(0,0,0,0) 100%); }
.hero__in { position: relative; z-index: 1; display: flex; flex-direction: column; gap: clamp(16px, 2.2vw, 30px); padding-bottom: clamp(48px, 6vw, 88px); }
.name { line-height: 0; }
.wordmark { width: 100%; height: auto; }
.wordmark text { fill: var(--fg); font-family: var(--f-display); font-weight: 700; font-size: 188px; letter-spacing: 0; }
.wordmark--hero text { fill: url(#nameGrad); }   /* the pulse runs through the name via this gradient */
.equation { font-weight: 700; font-size: clamp(2.3rem, 6.4vw, 6.4rem); line-height: 1; letter-spacing: -0.035em; font-variation-settings: "wdth" 96; }
.ln { --ln: var(--fg); color: var(--ln); }
.ln.dim { --ln: var(--dim); }
/* the pulse tints the line where it crosses; hero-matrix.js sets --px on each .ln */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero.pulse-on .ln {
    background-image: linear-gradient(90deg, var(--ln) 0, var(--ln) calc(var(--px, -999px) - 110px), var(--accent) var(--px, -999px), var(--ln) calc(var(--px, -999px) + 110px), var(--ln) 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  }
}
.hero__body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: end; margin-top: clamp(8px, 2vw, 28px); }
/* the quick bio: full ink, a touch heavier and larger than body copy, so it reads over the grid */
.lede { grid-column: 1 / span 7; color: var(--fg); font-weight: 500; max-width: 34em; font-size: 1.15rem; line-height: 1.5; margin: 0 0 -14px -16px; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.portrait { grid-column: 10 / -1; justify-self: end; }
.portrait img { width: clamp(150px, 15vw, 220px); height: auto; aspect-ratio: 1; object-fit: cover; object-position: 55% 0; border-radius: 50%; box-shadow: 0 0 0 6px var(--bg), 0 0 0 8px var(--accent); }

/* photo slots: a labelled placeholder until the file exists. Drop the named file into /images and it covers the placeholder. */
.shot { position: relative; display: block; margin: 0; aspect-ratio: var(--ar, 3 / 2); border-radius: 10px; overflow: hidden; background-color: var(--shot-bg, var(--bg-alt));
  background-image: radial-gradient(circle, var(--dot) 1.2px, transparent 1.6px); background-size: 20px 20px; }
.shot img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.shot__ph { position: absolute; inset: 10px; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 12px; text-align: center; color: var(--muted); font-size: .88rem; line-height: 1.3; border: 1.5px dashed var(--line-strong); border-radius: 7px; }
.shot__ph svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.shot__ph code { font: 400 .72rem var(--f-mono); opacity: .8; }

/* section titles: big and plain, so it is obvious what each part of the portfolio is */
.sec { padding-block: var(--sec) 0; }
.sec--after-map { padding-top: clamp(20px, 3vw, 40px); }   /* v5: the Projects grid fades out straight into this section */
.shead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 48px; padding-bottom: clamp(16px, 2vw, 26px); margin-bottom: clamp(28px, 4vw, 56px); border-bottom: 2px solid var(--fg); }
.shead h2 { font-size: clamp(3rem, 9vw, 8rem); line-height: .86; letter-spacing: -0.05em; font-weight: 700; font-variation-settings: "wdth" 96; }
.shead__meta { color: var(--muted); max-width: 28em; text-align: right; }
.body { color: var(--muted); font-size: 1.1rem; max-width: 34em; }

/* ---- zoom maps: a pulse matrix with nodes you zoom into (Projects, and Past / Present / Future in About) ----
   (zoommap.js) The world is the window's size at the overview; it is moved by a transform, and each node is
   counter-scaled by --s so dots, labels and cards keep their screen size while the grid and the distances grow.
   No frame: the matrix fades at its four edges at the overview; zoomed in, the fades lift so cards read clean.
   v5: light mode draws no grid lattice (--map-grid: 0, read by matrix.js). The Projects grid fades out over its
   bottom third into the Path section; its legend sits on the map. */
.nodemap { position: relative; --s: 1; }
.nodemap__frame { position: relative; }
.nodemap__frame::before, .nodemap__frame::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; transition: opacity .4s ease; }
.nodemap__frame::before { background: linear-gradient(180deg, var(--bg) 0%, transparent 16%, transparent 84%, var(--bg) 100%); }
.nodemap__frame::after { background: linear-gradient(90deg, var(--bg) 0%, transparent 12%, transparent 88%, var(--bg) 100%); }
.nodemap--projects .nodemap__frame::before { background: linear-gradient(180deg, var(--bg) 0%, transparent 12%, transparent 66%, var(--bg) 100%); }
.is-zoomed .nodemap__frame::before, .is-zoomed .nodemap__frame::after { opacity: 0; }
.nodemap__view { position: relative; overflow: hidden; height: var(--h, 600px); cursor: grab; touch-action: pan-y; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.nodemap__view:focus-visible { outline: 3px solid var(--fg); outline-offset: -3px; border-radius: 8px; }
.is-dragging .nodemap__view, .is-dragging .nodemap__view * { cursor: grabbing !important; }
.nodemap__art { --matrix-grid: var(--map-grid, 1); position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.nodemap__world { position: absolute; left: 0; top: 0; z-index: 1; transform-origin: 0 0; will-change: transform; }
.nodemap__links { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: visible; }
.nodemap__line { fill: none; stroke: var(--line-strong); stroke-width: 1.25; stroke-dasharray: 3 7; stroke-linecap: round; }

/* a node: its origin is the grid crossing. The dot sits on it, the label hangs under the dot, and the card hangs under
   the label. The whole node is scaled by 1 / --s so it keeps its screen size at any zoom.
   --g (0..1) is set by the pulse as it passes. The dot glows at rest and breathes, so it reads as something to press. */
.node { --g: 0; --d: 16px; --pt: 8px; position: absolute; z-index: 2; width: 0; height: 0; transform: scale(calc(1 / var(--s, 1))); transform-origin: 0 0; }
.node:not([data-level="0"]) { z-index: 4; }
.node__hit { position: absolute; left: 0; top: 0; transform: translate(-50%, calc(-1 * (var(--pt) + var(--d) / 2))); display: grid; justify-items: center; gap: 10px; padding: var(--pt) 10px 6px; margin: 0; border: 0; background: none; color: inherit; cursor: zoom-in; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.node[data-level="2"] .node__hit { cursor: zoom-out; }
.node__dot { position: relative; width: var(--d); height: var(--d); border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5.5px color-mix(in srgb, var(--accent) 70%, transparent), 0 0 calc(22px + 26px * var(--g)) calc(5px + 6px * var(--g)) rgba(var(--accent-rgb), calc(.55 + .4 * var(--g)));
  transition: transform .2s ease; }
.node__dot::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb), .55) 0%, rgba(var(--accent-rgb), 0) 70%); animation: breathe 2.8s ease-in-out infinite; }
.node__dot::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1.5px solid rgba(var(--accent-rgb), .6); animation: ring 2.8s ease-out infinite; }
@keyframes ring { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(1.3); opacity: 0; } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .7; } 50% { transform: scale(1.5); opacity: 1; } }
.node__label { font: 400 .74rem/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; color: var(--fg); padding: 7px 11px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 88%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line-strong)); box-shadow: var(--shadow), 0 0 14px rgba(var(--accent-rgb), calc(.12 + .3 * var(--g))); transition: border-color .18s ease, background-color .18s ease, color .18s ease; }
.node__hit:hover .node__dot, .node__hit:focus-visible .node__dot, .node:not([data-level="0"]) .node__dot { transform: scale(1.3); }
.node__hit:hover .node__label, .node__hit:focus-visible .node__label { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.node:not([data-level="0"]) .node__label { display: none; }
.node__hit:focus-visible { outline: none; }
.node__hit:focus-visible .node__dot { box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--fg), 0 0 28px 6px rgba(var(--accent-rgb), .6); }
.node--lacma .node__dot { background: var(--fg); box-shadow: 0 0 0 4px var(--bg), 0 0 0 5.5px color-mix(in srgb, var(--fg) 55%, transparent), 0 0 calc(22px + 26px * var(--g)) calc(5px + 6px * var(--g)) rgba(var(--accent-rgb), calc(.4 + .5 * var(--g))); }
.node--lacma .node__dot::after { border-color: color-mix(in srgb, var(--fg) 55%, transparent); }
.node:nth-child(2n) .node__dot::before, .node:nth-child(2n) .node__dot::after { animation-delay: -1.1s; }
.node:nth-child(3n) .node__dot::before, .node:nth-child(3n) .node__dot::after { animation-delay: -2s; }
.node--ppf { --d: 22px; }
.node--ppf .node__hit { gap: 12px; }
.node--ppf .node__label { font-size: .84rem; padding: 9px 14px; }

/* the card a node opens: a summary at the first level, the full story with its photos at the second */
.node__card { --cx: 0px; position: absolute; left: 0; top: calc(var(--d) / 2 + 12px); transform: translateX(calc(-50% + var(--cx))); width: var(--cw, 320px); text-align: left; padding: 16px 18px 18px; border-radius: 16px; background: var(--bg-alt); border: 1px solid var(--line-strong); box-shadow: var(--shadow); color: var(--fg); cursor: zoom-in; }
/* v6: the summary card is one big control (zoom-in everywhere, lifts on hover); the full card is held and dragged */
.node[data-level="1"] .node__card:hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .18), var(--shadow); }
.node[data-level="2"] .node__card { cursor: grab; }
.node__card[hidden] { display: none; }
.node__card.is-in { animation: card-in .5s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes card-in { from { opacity: 0; transform: translate(calc(-50% + var(--cx)), 10px) scale(.96); } to { opacity: 1; transform: translateX(calc(-50% + var(--cx))); } }
.node[data-level="1"] .node__card { --cw: min(320px, calc(var(--vw, 600) * 1px - 24px)); }
.node[data-level="2"] .node__card { --cw: min(620px, calc(var(--vw, 600) * 1px - 24px)); padding: 20px 22px 24px; }
.node__card a, .node__card button, .node__card summary { cursor: pointer; }
.node__sum { display: grid; gap: 8px; }
.node__sum[hidden], .node__full[hidden] { display: none; }
.node__title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variation-settings: "wdth" 96; }
.node__blurb { color: var(--muted); font-size: .95rem; }
.node__more { display: inline-flex; align-items: center; gap: 7px; font: 400 .72rem/1.4 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--accent-text); }
.node__more svg, .node__back svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.node__full { display: grid; gap: 18px; justify-items: start; }
.node__card .node__back { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--fg); font-family: inherit; font-size: .9rem; font-weight: 500; line-height: 1; cursor: zoom-out; }
.node__back:hover, .node__back:focus-visible { border-color: var(--accent); color: var(--accent-text); }
.node__full .detail { grid-template-columns: 1fr; gap: 18px; }
.node__full .detail__text { gap: 14px; }
.node__full .detail h3 { font-size: clamp(1.4rem, 2vw, 1.9rem); }
.node__full .body { font-size: 1rem; }
.node__full .shot--detail { --ar: 16 / 9; }

/* photo galleries: a grid of thumbnails; a thumbnail opens the lightbox (gallery.js) */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gallery[data-count="1"] { grid-template-columns: 1fr; }
.gallery[data-count="2"], .gallery[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery__item { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: var(--bg); border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; cursor: pointer; }
.gallery[data-count="1"] .gallery__item { aspect-ratio: 16 / 10; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery__item:hover img, .gallery__item:focus-visible img { transform: scale(1.04); }
.gallery__item:focus-visible { outline: 3px solid var(--fg); outline-offset: 2px; }

/* zoom buttons, the hint pill, the note about the wheel, and the Projects legend */
.nodemap__ctl { position: absolute; right: 12px; bottom: 12px; z-index: 5; display: grid; gap: 6px; }
.nodemap__ctl[hidden] { display: none; }
.nodemap__ctl button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg-alt); color: var(--fg); cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow); transition: border-color .18s ease, opacity .18s ease; }
.nodemap__ctl button:hover { border-color: var(--fg); }
.nodemap__ctl svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.at-max [data-zoom="in"], .at-min [data-zoom="out"], .at-min [data-zoom="fit"] { opacity: .35; pointer-events: none; }
.nodemap__hint { position: absolute; left: 50%; bottom: 16px; z-index: 5; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; min-height: 36px; border-radius: 999px; background: var(--fg); color: var(--bg); font-size: .8rem; font-weight: 600; white-space: nowrap; transform: translateX(-50%); pointer-events: none; transition: opacity .4s ease; }
.nodemap__hint svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.has-zoomed .nodemap__hint { opacity: 0; }
.nodemap__coop { position: absolute; left: 50%; top: 50%; z-index: 6; transform: translate(-50%, -50%); margin: 0; padding: 12px 18px; border-radius: 12px; background: var(--fg); color: var(--bg); font-size: .9rem; font-weight: 600; text-align: center; max-width: min(380px, 90%); pointer-events: none; opacity: 0; transition: opacity .25s ease; }
.nodemap__coop[hidden] { display: none; }
.nodemap__coop.is-in { opacity: 1; }
.nodemap__legend { position: absolute; top: 0; right: 0; z-index: 4; display: flex; gap: 20px; margin: 0; padding: 8px 12px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 82%, transparent); font: 400 .74rem/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.nodemap__legend span { display: inline-flex; align-items: center; gap: 8px; }
.nodemap__legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.nodemap__legend .node--lacma i { background: var(--fg); }

/* the case studies and the Past / Present / Future notes: hidden once scripts run, shown in full without them */
.details { display: grid; gap: 40px; margin-top: 40px; }
.js .details, html:not(.no-js) .details { display: none; }
.no-js .details { display: grid; }
.no-js .detail[hidden] { display: grid; }
.no-js .nodemap { display: none; }
.detail { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: start; }
.detail__text { display: grid; gap: 18px; justify-items: start; }
.detail__meta { color: var(--dim); font: 400 .78rem/1.5 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; }
.detail h3 { font-size: clamp(1.5rem, 2.3vw, 2.2rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; font-variation-settings: "wdth" 96; }
.case { display: grid; gap: 12px; width: 100%; }
.case > div { display: grid; grid-template-columns: 6.4em minmax(0, 1fr); gap: 12px; }
.case dt { font: 400 .76rem/1.7 var(--f-mono); color: var(--dim); padding-top: .12em; }
.case dd { color: var(--muted); }
.detail__tools { font-size: .92rem; font-weight: 600; }
.shot--detail { --ar: 4 / 3; --shot-bg: var(--bg); width: 100%; }

/* the lightbox: a gallery picture at full size, with previous / next (gallery.js) */
.lightbox { border: 0; padding: 0; background: transparent; width: min(1200px, 96vw); max-width: none; max-height: 96vh; }
.lightbox::backdrop { background: rgba(12, 10, 7, .9); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lightbox figure { display: grid; gap: 12px; justify-items: center; margin: 0; }
.lightbox img { max-width: 100%; max-height: 80vh; width: auto; height: auto; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lightbox figcaption { color: #efe6d6; font-size: .95rem; text-align: center; max-width: 60ch; padding: 0 56px; }
.lightbox__count { color: #b3a893; font: 400 .74rem/1 var(--f-mono); letter-spacing: .06em; }
.lightbox__close, .lightbox__nav { position: fixed; z-index: 2; width: 48px; height: 48px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(20, 18, 14, .7); color: #efe6d6; cursor: pointer; display: grid; place-items: center; }
.lightbox__close:hover, .lightbox__nav:hover { border-color: #efe6d6; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav[data-dir="-1"] { left: 12px; }
.lightbox__nav[data-dir="1"] { right: 12px; }
.lightbox.is-single .lightbox__nav { display: none; }
.lightbox svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: pop .3s ease-out; }
  @keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
}

/* ---- path: a horizontal timeline (timeline.js) ---- */
.tl { margin: 0; position: relative; --ppy: 150px; }
.tl__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.tl__hint { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); font: 400 .76rem/1 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; transition: opacity .3s ease; }
.tl__hint svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.has-scrolled .tl__hint { opacity: .5; }
.tl__ctl { display: flex; gap: 6px; }
.tl__ctl[hidden] { display: none; }
.tl__ctl button { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-alt); cursor: pointer; display: grid; place-items: center; transition: border-color .18s ease; }
.tl__ctl button:hover { border-color: var(--fg); }
.tl__ctl svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tl__scroll { position: relative; overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg-alt); cursor: grab; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.is-dragging .tl__scroll { cursor: grabbing; user-select: none; }
.tl__inner { position: relative; width: calc(var(--years) * var(--ppy)); min-width: 100%; padding: 46px 0 56px;
  background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: calc(var(--ppy) / 2) 100%; background-position: calc(var(--ppy) * -0.5) 0; }
.tl__axis { position: absolute; left: 0; right: 0; top: 0; height: 40px; border-bottom: 1px solid var(--line-strong); }
.tl__year { position: absolute; top: 14px; transform: translateX(-50%); font: 400 .76rem/1 var(--f-mono); color: var(--dim); }
.tl__year::after { content: ""; position: absolute; left: 50%; top: 18px; height: 8px; border-left: 1px solid var(--line-strong); }
.tl__era { position: absolute; top: 0; bottom: 0; right: 0; background: repeating-linear-gradient(-45deg, transparent 0 9px, color-mix(in srgb, var(--accent) 14%, transparent) 9px 10px); border-left: 1.5px dashed var(--accent); opacity: 0; transition: opacity .6s ease; }
.tl__era.is-in { opacity: 1; }
.tl__era-label { position: absolute; left: 14px; top: 54px; font: 700 .95rem/1.1 var(--f-display); letter-spacing: -0.02em; color: var(--accent-text); white-space: nowrap; writing-mode: horizontal-tb; }
.tl__era-label::before { content: "2027 →"; display: block; font: 400 .72rem/1.6 var(--f-mono); letter-spacing: .04em; color: var(--dim); }
.tl__now { position: absolute; top: 40px; bottom: 0; border-left: 1.5px solid var(--fg); opacity: 0; transition: opacity .6s ease .2s; }
.tl__now.is-in { opacity: 1; }
.tl__now span { position: absolute; left: -1px; bottom: 8px; transform: translateX(-50%); font: 400 .7rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; padding: 4px 7px; border-radius: 999px; background: var(--fg); color: var(--bg); }
.tl__lanes { position: relative; display: grid; gap: 12px; margin-top: 30px; }
.tl__lane { position: relative; height: 92px; }
.tl__bar { position: absolute; top: 0; height: 92px; padding: 10px 14px; border-radius: 10px; overflow: hidden; display: grid; align-content: center; gap: 2px; background: var(--bar-finalwav); color: var(--fg);
  transform-origin: left center; opacity: 0; transform: scaleX(.6); transition: opacity .5s ease calc(var(--i, 0) * .08s), transform .6s cubic-bezier(.2, .7, .2, 1) calc(var(--i, 0) * .08s); }
.tl__bar.is-in { opacity: 1; transform: none; }
.tl__bar > * { opacity: 0; transition: opacity .4s ease calc(.35s + var(--i, 0) * .08s); }
.tl__bar.is-in > * { opacity: 1; }
.tl__title { font-size: .9rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.tl__co { font-size: .84rem; font-weight: 500; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl__dates { font: 400 .68rem/1.4 var(--f-mono); letter-spacing: .03em; opacity: .75; white-space: nowrap; }
.tl__bar--s1 { background: var(--bar-s1); color: var(--on-s1); }
.tl__bar--finalwav { background: var(--bar-finalwav); color: var(--on-finalwav); border: 1px solid color-mix(in srgb, var(--bar-s1) 45%, transparent); }
.tl__bar--lacma1 { background: var(--bar-lacma1); color: var(--on-lacma1); }
.tl__bar--rondor { background: var(--bar-rondor); color: var(--on-rondor); }
.tl__bar--lacma2 { background: var(--bar-lacma2); color: var(--on-lacma2); }
.tl__bar--aww { background: var(--bar-aww); color: var(--on-aww); }
.tl__bar--sjva { background: var(--accent); color: var(--on-accent); }
.tl__bar--present { border-radius: 10px 0 0 10px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), rgba(0,0,0,.35)); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), rgba(0,0,0,.35)); }
.tl__mark { position: absolute; bottom: 22px; z-index: 2; width: 16px; height: 16px; transform: translateX(-50%); opacity: 0; transition: opacity .5s ease .3s; }
.tl__mark.is-in { opacity: 1; }
.tl__mark i { position: absolute; inset: 0; background: var(--fg); border: 2px solid var(--bg-alt); transform: rotate(45deg); }
.tl__mark-label { position: absolute; left: 22px; top: -2px; font-size: .74rem; font-weight: 600; white-space: nowrap; color: var(--fg); }
.tl__plain { display: grid; gap: 8px; padding: 20px; border: 1px solid var(--line-strong); border-radius: 14px; }

/* ---- about: the chapters open inside the map now (see the zoom maps above) ---- */
.detail--ppf .body { font-size: 1.05rem; }

/* titles accordion: one open at a time */
.titles { margin-top: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line-strong); }
.title { border-bottom: 1px solid var(--line-strong); }
.title summary { display: grid; grid-template-columns: minmax(0, 1fr) 24px; align-items: center; gap: 16px; padding-block: 18px; list-style: none; cursor: pointer; font-weight: 600; color: var(--dim); transition: color .18s ease; }
.title summary::-webkit-details-marker { display: none; }
.title summary:hover, .title[open] summary { color: var(--fg); }
.title summary svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
.title[open] summary svg { transform: rotate(180deg); }
.title__body { display: grid; gap: 6px; padding: 0 0 20px; font-weight: 500; max-width: 40em; }
@media (prefers-reduced-motion: no-preference) {
  .title[open] .title__body { animation: fade .25s ease; }
  @keyframes fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
}

/* ---- contact: big rows, like a table of ways to reach him; blurred until the human check passes ---- */
.bigrows { border-top: 1px solid var(--line-strong); }
.bigrow { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px 24px; padding-block: clamp(18px, 2.4vw, 30px); border-bottom: 1px solid var(--line-strong); align-items: baseline; }
.bigrow > span:first-child { grid-column: 1 / span 6; font-size: clamp(1.5rem, 3vw, 2.6rem); font-weight: 600; letter-spacing: -0.03em; color: var(--dim); }
.bigrow > a, .bigrow > .veil { grid-column: 7 / -1; font-size: clamp(1.5rem, 3vw, 2.6rem); font-weight: 600; letter-spacing: -0.03em; text-decoration: none; overflow-wrap: anywhere; }
.bigrow > a { transition: color .18s ease; }
.bigrow > a:hover { color: var(--accent-text); }
.veil { filter: blur(7px); user-select: none; -webkit-user-select: none; pointer-events: none; opacity: .7; }
.reach__link { animation: unblur .6s ease; }
@keyframes unblur { from { filter: blur(7px); opacity: .7; } to { filter: none; opacity: 1; } }

.gate { display: grid; gap: 12px; justify-items: start; margin-top: 28px; padding: clamp(18px, 2.6vw, 28px); border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg-alt); max-width: 640px; }
.gate[hidden] { display: none; }
.gate__lead { font-weight: 600; }
.gate__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.gate__q { flex-basis: 100%; font-weight: 600; }
.gate__in { font: 400 clamp(1.3rem, 2.4vw, 1.8rem)/1 var(--f-mono); width: 7ch; min-height: 48px; padding: 0 12px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--fg); }
.gate__in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
#gate-years { width: 9ch; }
.gate__go { min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--fg); background: var(--fg); color: var(--bg); font-weight: 600; cursor: pointer; transition: transform .18s ease; }
.gate__go:hover { transform: translateY(-2px); }
.gate__msg { color: var(--accent-text); font-weight: 600; min-height: 1.5em; }
.gate__msg:empty { display: none; }
.gate.is-wrong { animation: nudge .35s ease; }
@keyframes nudge { 20% { transform: translateX(-5px); } 60% { transform: translateX(4px); } 100% { transform: none; } }
.gate__done { margin-top: 20px; font-weight: 600; color: var(--accent-text); }
.gate__done[hidden] { display: none; }
.mailpick { display: grid; gap: 10px; margin-top: 22px; }
.mailpick[hidden] { display: none; }
.mailpick__lead { font-weight: 600; color: var(--dim); font-size: .95rem; }
.mailpick__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.mailpick__btns a, .mailpick__btns button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--bg-alt); color: var(--fg); font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; transition: border-color .18s ease, background-color .18s ease, color .18s ease; }
.mailpick__btns a:hover, .mailpick__btns button:hover { border-color: var(--fg); }
.mailpick__btns [aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.mailpick__btns svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mailpick__msg { color: var(--accent-text); font-weight: 600; min-height: 1.5em; overflow-wrap: anywhere; }
.mailpick__msg:empty { display: none; }
/* v6: "Let's talk" merged with the old Contact intro, as its own band above Contact */
.talk { display: grid; gap: 14px; justify-items: start; }
.talk__p { font-size: clamp(1.15rem, 1.9vw, 1.55rem); line-height: 1.4; letter-spacing: -0.01em; max-width: 30em; text-wrap: pretty; }
.talk__h { font-weight: 700; font-size: clamp(1.6rem, 2.9vw, 2.7rem); line-height: 1.1; letter-spacing: -0.03em; font-variation-settings: "wdth" 96; }
.talk .muted { max-width: 26em; }

/* footer: a short note and two link columns */
.foot { padding-block: clamp(64px, 8vw, 112px) clamp(88px, 10vw, 140px); }
.foot__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px 24px; }
.foot__note { grid-column: 1 / span 5; display: grid; gap: 14px; align-content: start; }
.foot__note .muted { max-width: 30em; }
.foot__col { display: grid; gap: 8px; align-content: start; }
.foot__col:nth-of-type(1) { grid-column: 7 / span 3; }
.foot__col:nth-of-type(2) { grid-column: 10 / -1; }
.foot__col h2 { font-size: 1rem; font-weight: 600; letter-spacing: 0; margin-bottom: 4px; }
.foot__col a { color: var(--dim); text-decoration: none; transition: color .18s ease; }
.foot__col a:hover { color: var(--fg); }
.privacy summary { cursor: pointer; font-weight: 600; color: var(--dim); list-style: none; }
.privacy summary::-webkit-details-marker { display: none; }
.privacy summary::before { content: "+ "; }
.privacy[open] summary::before { content: "– "; }
.privacy summary:hover { color: var(--fg); }
.privacy p { margin-top: 8px; font-size: .92rem; }

/* floating pill: quick links and the call to action, pinned to the bottom */
.float { position: fixed; z-index: 30; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  transform: translate(-50%, 18px); opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.is-scrolled .float { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.float a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: .92rem; font-weight: 600; text-decoration: none; white-space: nowrap; color: var(--muted); }
.float a:hover { color: var(--fg); }
.float a[aria-current="true"] { color: var(--fg); background: var(--line); }
.float .cta { color: var(--bg); background: var(--fg); border-color: var(--fg); box-shadow: none; margin-left: 4px; }
.float .cta:hover { color: var(--bg); }

/* cookie consent: a strip at the bottom; Accept and Decline carry equal weight. It animates in but never depends on
   the animation to be seen. */
.consent { position: fixed; z-index: 40; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); width: min(680px, calc(100vw - 32px)); display: grid; gap: 14px; padding: 18px 20px; border-radius: 16px; background: var(--bg-alt); border: 1px solid var(--line-strong); box-shadow: var(--shadow); transform: translateX(-50%); }
.consent[hidden] { display: none; }
.consent.is-in { animation: consent-in .35s ease; }
@keyframes consent-in { from { transform: translate(-50%, 16px); } to { transform: translateX(-50%); } }
.consent.is-out { opacity: 0; transition: opacity .25s ease; }
.consent__text { font-size: .95rem; }
.consent__btns { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.consent__btns button { min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--fg); background: transparent; color: var(--fg); font-weight: 600; cursor: pointer; transition: background-color .18s ease, color .18s ease; }
.consent__btns button:hover { background: var(--fg); color: var(--bg); }
.consent__more { margin-left: auto; color: var(--dim); font-size: .92rem; font-weight: 600; }
.consent__more:hover { color: var(--fg); }
.is-scrolled .consent { bottom: max(86px, calc(env(safe-area-inset-bottom) + 86px)); }   /* clear the floating pill */
@media (max-width: 640px) { .consent { bottom: max(86px, calc(env(safe-area-inset-bottom) + 86px)); } }

/* responsive */
@media (max-width: 960px) {
  /* on phones and tablets the grid sits behind the name and fades out below the line under it */
  .hero__art { height: 360px; bottom: auto; -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.6) 55%, rgba(0,0,0,0) 100%); mask-image: linear-gradient(180deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.6) 55%, rgba(0,0,0,0) 100%); }
  .hero__in { padding-top: 24px; padding-bottom: 48px; }
  .hero.pulse-on .ln { background-image: none; -webkit-text-fill-color: currentColor; }
  .hero__body { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 24px; }
  .lede { margin: 0; padding: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .shead__meta { text-align: left; }
  /* the maps: a shorter window on phones; labels near the edges tuck inward so they stay on screen */
  .nodemap__view { height: var(--h-sm, var(--h, 520px)); }
  .nodemap--projects .nodemap__frame::before { background: linear-gradient(180deg, var(--bg) 0%, transparent 12%, transparent 78%, var(--bg) 100%); }
  .node[data-side="start"] .node__label { transform: translateX(calc(50% - var(--d) / 2)); }
  .node[data-side="end"] .node__label { transform: translateX(calc(-50% + var(--d) / 2)); }
  .nodemap__ctl { right: 8px; bottom: 8px; }
  .nodemap__hint { bottom: 10px; }
  .detail { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lightbox figcaption { padding: 0 8px; }
  .tl { --ppy: 120px; }
  .tl__scroll { cursor: auto; }
  .bigrow > span:first-child, .bigrow > a, .bigrow > .veil { grid-column: 1 / -1; }
  .foot__note { grid-column: 1 / -1; }
  .foot__col:nth-of-type(1) { grid-column: 1 / span 6; }
  .foot__col:nth-of-type(2) { grid-column: 7 / -1; }
}
@media (max-width: 520px) {
  .equation { font-size: clamp(2rem, 9.6vw, 2.7rem); line-height: 1.04; }
  .case > div { grid-template-columns: 1fr; gap: 0; }
  .tl { --ppy: 110px; }
  .tl__title { font-size: .84rem; }
  .tl__lane, .tl__bar { height: 98px; }
}
@media (max-width: 640px) {
  .nav a:not(.cta), .nav .cta { display: none; }
  .float { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
  .float a { padding: 0 13px; }
  .foot { padding-bottom: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cta, .nav a, .theme-toggle, .float, .gate__go, .bigrow > a, .node__dot, .node__label, .title summary svg, .consent { transition: none; }
  .consent.is-in { animation: none; }
  .node__dot::after { animation: none; opacity: .5; transform: scale(.8); }
  .node__dot::before { animation: none; opacity: .85; }
  .node__card.is-in, .nodemap__frame::before, .nodemap__frame::after { animation: none; transition: none; }
  .tl__bar, .tl__bar > *, .tl__era, .tl__now, .tl__mark { transition: none; opacity: 1; transform: none; }
  .reach__link, .gate.is-wrong, .lightbox[open] { animation: none; }
}
