/* v2 "Ordered" — site styles. Palette + type from docs/NIRNOR_STUDY.md (binding).
   White ground, near-black ink, greys for hierarchy. No accent colour in the UI;
   colour comes only from the cube photo textures. */

:root {
  --bg: #ffffff;
  --ink: #1a1a1a;
  --grey2: #3c3c3c;   /* secondary text */
  --label: #6b6b6b;   /* small labels (>=4.5:1 on white) */
  --hair: #eaeaea;    /* hairlines */
  --dot: #d9d9d9;     /* particle dots */
  --col-max: 1248px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* White lives on the root so the z-index:-1 particle canvas can show above it.
   A solid body background would paint over that negative-z canvas and hide it. */
html { background: var(--bg); }
body { background: transparent; overflow-x: hidden; }

/* Two fixed WebGL canvases, created by JS. Particles behind everything (-1),
   cubes above particles but below DOM text (0). */
#particles-canvas {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; display: block;
}
#cubes-canvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; display: block;
  transition: opacity .5s ease;   /* used by reduced-motion to hide cubes past the hero */
}

/* Content sits above the cube canvas. */
.page { position: relative; z-index: 1; }

/* ---- Nav ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 28px 40px; pointer-events: none;
}
.wordmark {
  font-weight: 300; font-size: 18px; letter-spacing: .01em; color: var(--ink);
  pointer-events: auto; text-decoration: none;
}
.nav-links { display: flex; flex-wrap:wrap; justify-content:flex-end; gap: 12px 22px; pointer-events: auto; min-width:0; }
.nav-links a {
  font-size: 12px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ink); text-decoration: none; font-weight: 400;
  transition: opacity .3s ease;
}
.nav-links a:hover { opacity: .5; }

/* ---- Column ---- */
.col {
  max-width: var(--col-max); margin: 0 auto; padding: 0 40px; width: 100%;
}

/* ---- Hero ----
   Two columns: the intro text sits left, the full-body portrait stands full height on the
   right. The text is width-capped so it never runs under the photo. */
#hero { position: relative; min-height: 175vh; }
/* The portrait is a tall 3:4 standing photo (1536x2048). It stands full height on the right,
   head to feet with no bottom crop (object-fit: contain, height-driven, width auto). It is
   fixed to the viewport so its on-screen rect stays stable for the JS that places the dust on
   it; the JS drives its opacity inline on scroll. */
.hero-photo {
  position: fixed; top: 50%; right: 4vw; left: auto; transform: translateY(-50%);
  height: min(84vh, 53vw); width: auto; object-fit: contain;   /* 53vw height caps width near 40vw at 3:4 */
  pointer-events: none; z-index: 0; opacity: 1; will-change: opacity;
}
.hero-inner {
  position: sticky; top: 0; height: 100vh; left: 0; right: 0;
  display: flex; align-items: center;
}
.hero-text { max-width: min(48vw, 560px); }

.display {
  font-weight: 300; line-height: 1.04; letter-spacing: -0.02em;
  font-size: min(120px, 8.2vw); color: var(--ink); margin: 0;
  max-width: 64vw;
  text-wrap: balance;               /* balance lines; never break inside a word */
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
}
.display .word { display: inline-block; white-space: nowrap; }
.display .glyph { display: inline-block; }

/* Hero name: the display face, sized down to a readable name rather than a headline. */
.hero-name { font-size: min(64px, 6vw); max-width: 100%; }
.hero-role { margin: 16px 0 0; font-size: 18px; line-height: 1.5; color: var(--ink); font-weight: 400; }
.hero-loc { margin: 6px 0 0; font-size: 15px; color: var(--label); }
.hero-bio {
  margin: 22px 0 0; font-size: 16px; line-height: 1.75; color: var(--grey2);
  font-weight: 400; max-width: 52ch;
}

/* Blink reveal: each glyph strobes in like a signal locking on, then settles to 1.
   Verbatim stops from the nirnor study. Fires once on load after fonts are ready. */
@keyframes blink {
  0%   { opacity: 0; }
  10%  { opacity: .5; }
  20%  { opacity: .2; }
  30%  { opacity: .7; }
  40%  { opacity: 0; }
  100% { opacity: 1; }
}
.display .glyph { opacity: 0; }
.reveal .display .glyph { animation: blink .3s step-end both; }

/* ---- Chapters (2 to 5): pinned hero moment + evidence-strip tail ---- */
.ch { position: relative; }
.ch-pin { position: relative; min-height: 100vh; display: flex; align-items: center; }
.ch-inner { max-width: 33rem; }
/* cube parks on data-side; the text column sits on the opposite side */
.ch[data-side="right"] .ch-inner { margin-left: 0; margin-right: auto; text-align: left; }
.ch[data-side="left"]  .ch-inner { margin-left: auto; margin-right: 0; text-align: right; }
.ch[data-side="left"] .ch-list,
.ch[data-side="left"] .ch-facts { align-items: flex-end; }
.ch[data-side="left"] .ch-open { margin-left: auto; }

.ch-label {
  display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--label); font-weight: 500;
}
.ch-word {
  font-weight: 300; font-size: min(96px, 6.6vw); line-height: 1; margin: 14px 0 0;
  text-transform: lowercase; color: var(--ink); letter-spacing: -0.01em;
}
.ch-word .glyph { display: inline-block; opacity: 0; }
.ch-word.reveal .glyph { animation: blink .3s step-end both; }

.ch-list, .ch-facts {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.ch-list li, .ch-facts li {
  font-size: 16px; color: var(--grey2); line-height: 1.5;
  opacity: 0; transform: translateY(8px);
}
.ch-facts li { font-size: 15px; color: var(--label); letter-spacing: .01em; }
.ch.in .ch-list li, .ch.in .ch-facts li { opacity: 1; transform: none;
  transition: opacity .6s ease, transform .6s ease; }
.ch.in .ch-list li:nth-child(2), .ch.in .ch-facts li:nth-child(2) { transition-delay: .06s; }
.ch.in .ch-list li:nth-child(3), .ch.in .ch-facts li:nth-child(3) { transition-delay: .12s; }
.ch.in .ch-list li:nth-child(4) { transition-delay: .18s; }

.ch-story {
  margin: 26px 0 0; font-size: 18px; line-height: 1.7; color: var(--ink);
  max-width: 46ch; opacity: 0; transform: translateY(24px);
}
.ch[data-side="left"] .ch-story { margin-left: auto; }
.ch.in .ch-story { opacity: 1; transform: none; transition: opacity .9s ease .1s, transform .9s ease .1s; }

.ch-key {
  margin: 22px 0 0; font-size: 22px; font-weight: 700; line-height: 1.3;
  color: var(--ink); max-width: 40ch;
  opacity: 0; transform: translateY(16px);
}
.ch[data-side="left"] .ch-key { margin-left: auto; }
.ch.in .ch-key { opacity: 1; transform: none; transition: opacity .9s ease .25s, transform .9s ease .25s; }

.ch-open {
  margin: 30px 0 0; padding: 0; background: none; border: 0; cursor: pointer;
  font-family: inherit; font-size: 12px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ink); display: inline-block; position: relative;
}
.ch-open::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 1px; width: 100%;
  background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.ch-open:hover::after { transform: scaleX(1); }

/* ---- Evidence strip (unpinned tail) ---- */
.ch-tail { min-height: 60vh; display: flex; align-items: center; padding: 6vh 0; }
.evidence { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.ev-col { display: flex; flex-direction: column; border-top: 1px solid var(--ink); padding-top: 14px; }
.ev-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink);
  font-weight: 500; font-variant: small-caps;
}
.ev-col img { width: 100%; height: 150px; object-fit: cover; margin: 12px 0 0; display: block; }
.ev-col p { margin: 12px 0 0; font-size: 13px; line-height: 1.55; color: var(--grey2); }
.ev-gap .ev-none {
  width: 100%; height: 150px; margin: 12px 0 0; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--hair); color: var(--label); font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
}

/* ---- Reading panel ---- */
#panels { position: static; }
.panel {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  opacity: 0; visibility: hidden; transition: opacity .35s ease;
  /* the panel itself is the scroll container: content taller than the viewport
     scrolls inside it, Lenis leaves it alone (data-lenis-prevent on each panel). */
  overflow-y: auto; max-height: 100vh;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.panel.open { opacity: 1; visibility: visible; }
/* panel-scroll is a content wrapper; chapters.js resets the outer panel's scrollTop. */
.panel-scroll { position: static; overflow: visible; }
.panel-col { max-width: 900px; margin: 0 auto; padding: 84px 40px 120px; }
.panel-close {
  position: sticky; top: 0; float: right; margin: -20px -8px 0 0;
  background: var(--bg); border: 1px solid var(--ink); border-radius: 999px;
  font-family: inherit; font-size: 12px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ink); padding: 8px 16px; cursor: pointer;
}
.panel-kicker { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--label); }
.panel h2 { font-weight: 300; font-size: min(56px, 6vw); line-height: 1.05; margin: 10px 0 0; }
.panel-ctx { margin: 10px 0 0; font-size: 15px; color: var(--label); }
.panel-step { margin: 48px 0 0; }
.panel-step h3 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink);
  font-weight: 500; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--hair);
}
.panel-step p { margin: 0; font-size: 18px; line-height: 1.7; color: var(--ink); max-width: 62ch; }
.panel-step p + p { margin-top: 16px; }
.panel-step video { display: block; width: 100%; max-width: 820px; max-height: 72vh; margin-top: 20px; background: #f4f3ef; object-fit: contain; }
.panel-step pre { overflow: auto; padding: 20px; border: 1px solid var(--hair); background: #f7f6f2; font-size: 14px; line-height: 1.6; }
.panel-step figure { margin: 20px 0 0; }
.panel-step img { width: 100%; max-width: 720px; height: auto; display: block; border-radius: 2px; }
.panel-step figcaption { margin: 8px 0 0; font-size: 13px; color: var(--label); }
.case-overview { margin: 24px 0; }
.case-overview img { display: block; width: 100%; height: auto; }
.case-media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 24px; align-items: start; }
.case-media-grid figure { margin: 0; }
@media (max-width: 600px) { .case-media-grid { grid-template-columns: 1fr; } }

/* ---- Cube labels (DOM, positioned by cubes.js) ---- */
#cube-labels {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
}
.cube-label {
  position: absolute; left: 0; top: 0; will-change: transform, opacity;
  font-size: 12px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--label); transform: translate(-50%, 0);
  white-space: nowrap;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .display .glyph, .ch-word .glyph { opacity: 1 !important; animation: none !important; }
  .ch-list li, .ch-facts li, .ch-story, .ch-key { opacity: 1 !important; transform: none !important; }
  .ray-sys .ray-open { opacity: 1 !important; transform: none !important; }
  /* cubes: the sorted grid at the hero only, hidden past it */
  body.past-hero #cubes-canvas { opacity: 0 !important; }
  .hero-photo { display: none; }   /* the scroll-driven photo-to-dust is motion; hide it here */
}

/* ---- Narrow screens (phone + tablet) ---- */
@media (max-width: 819px) {
  .nav { padding: 18px 22px; }
  .col { padding: 0 22px; }
  /* hero: the sorted grid sits in the top 34vh (JS); the intro text flows below it and the
     section grows with its content instead of being pinned. */
  #hero { min-height: auto; padding: 40vh 0 8vh; }
  .hero-inner { position: static; top: auto; bottom: auto; left: 0; right: 0; display: block; }
  .hero-text { max-width: 100%; }
  .hero-photo { display: none; }   /* mobile uses the cube grid, not the portrait */
  /* chapters: the parked cube sits in this reserved band above the category word */
  .m-cube-anchor { height: 112px; width: 100%; pointer-events: none; }
  .ch-pin { min-height: auto; padding: 4vh 0; }
  .ch-inner, .ch[data-side="left"] .ch-inner, .ch[data-side="right"] .ch-inner {
    max-width: 100%; margin: 0; text-align: left;
  }
  .ch[data-side="left"] .ch-list, .ch[data-side="left"] .ch-facts { align-items: flex-start; }
  .ch[data-side="left"] .ch-story, .ch[data-side="left"] .ch-key, .ch[data-side="left"] .ch-open { margin-left: 0; }
  .ch-tail { min-height: auto; padding: 2vh 0 8vh; }
  .evidence { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .panel-col { padding: 72px 22px 100px; }
  .ch-contact { min-height: auto; align-items: flex-start; padding-top: 14vh; padding-bottom: 10vh; }
  /* tap targets >= 44px */
  .nav-links { gap:4px 10px; }
  .nav-links a { padding: 9px 4px; font-size:11px; }
  .ch-open, .ray-open, .panel-close, .contact-list a, .web-tile { min-height: 44px; }
  .ray-open { padding: 20px 0; }
  .ch-open.sm { padding: 12px 0; margin-right: 18px; display: inline-block; }
  .panel-close { padding: 12px 18px; }
  .oth-anchor { display: none; }   /* no floating cubes on mobile */
}

/* ============================ PHASE 3 ============================ */

/* Flat (unpinned) chapters */
/* opaque white so the fixed dark veil (behind the particles) never tints these bands
   during the stripe crossfade */
.ch-flat { position: relative; padding: 14vh 0; background: var(--bg); }
.flat-head {
  font-weight: 300; font-size: min(48px, 5.4vw); line-height: 1.02; margin: 14px 0 0;
  text-transform: lowercase; color: var(--ink); letter-spacing: -0.01em;
}
.flat-head.sm-head { font-size: min(40px, 4.6vw); }

/* ---- Raymond: cube left, deploy word + systems list on the right ---- */
.ray-inner { max-width: 40rem; }
.ray-systems { list-style: none; margin: 34px 0 0; padding: 0; text-align: left; }
.ray-sys { border-top: 1px solid var(--hair); }
.ray-sys:last-child { border-bottom: 1px solid var(--hair); }
.ray-open {
  width: 100%; display: block; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: inherit; padding: 16px 0; position: relative;
  opacity: 0; transform: translateY(10px);
}
.ray-sys.shown .ray-open { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }
.rs-title { display: block; font-size: 22px; font-weight: 300; color: var(--ink); }
.rs-key { display: block; margin-top: 4px; font-size: 12px; color: var(--label); letter-spacing: .02em; }
.ray-open::after {
  content: ""; position: absolute; left: 0; bottom: 8px; height: 1px; width: 100%;
  background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.ray-open:hover::after { transform: scaleX(1); }

/* ---- Experience ---- */
.exp-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; margin-top: 40px; }
.exp-row:nth-child(3) { grid-template-columns: 1.3fr 1fr; }
.exp-title { font-size: 24px; font-weight: 400; margin: 0 0 12px; }
.exp-title span { font-size: 14px; color: var(--label); font-weight: 400; margin-left: 8px; }
.exp-text p { font-size: 17px; line-height: 1.7; color: var(--ink); margin: 0 0 12px; max-width: 48ch; }
.exp-key { font-weight: 700; }
.exp-visual { display: flex; justify-content: center; }

/* VCT loop, thin strokes, amber oil, ADVANCE/RETARD swap */
.vct { width: min(300px, 78%); height: auto; display: block; margin: 0 auto; }

/* ---- Other work ---- */
.others-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 6vh; }
.oth-anchor { height: 330px; }
.oth-title { font-size: 22px; font-weight: 400; margin: 0 0 12px; }
.oth-col p { font-size: 15px; line-height: 1.6; color: var(--grey2); margin: 0 0 10px; }
.oth-key { color: var(--ink) !important; font-weight: 500; }
.ch-open.sm { font-size: 11px; margin: 8px 14px 0 0; }
.rit-row { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 48px; border-top: 1px solid var(--hair); padding-top: 24px; }
.rit-row h4 { font-size: 16px; font-weight: 500; margin: 0 0 8px; }
.rit-row p { font-size: 14px; color: var(--grey2); margin: 0 0 6px; }
.rit-row .slot { font-size: 12px; color: var(--label); font-style: italic; }

/* ---- Websites: the right lane stays open for the white particle cube. ---- */
.darkstripe.websites-stripe { min-height: 110vh; padding: 14vh 8vw; align-items: center; }
.websites-inner { position: relative; z-index: 1; width: min(52vw, 760px); }
.web-kicker { margin: 0 0 14px; color: rgba(255,255,255,.58); font-size: 11px; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; }
.websites-inner h2 { margin: 0; color: #fff; font-size: clamp(48px, 6vw, 88px); font-weight: 300; letter-spacing: -.035em; line-height: .94; }
.web-lead { max-width: 38ch; margin: 20px 0 34px; color: rgba(255,255,255,.72); font-size: 17px; line-height: 1.6; }
.web-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
.web-tile { display: block; color: #fff; text-decoration: none; }
.web-tile img { display: block; width: 100%; height: 148px; object-fit: cover; filter: saturate(.85); transition: filter .25s ease, transform .25s ease; }
.web-tile-text { display: flex; flex-direction: column; }
.web-tile:hover img, .web-tile:focus-visible img { filter: saturate(1); transform: translateY(-3px); }
.wt-numera { display: flex; align-items: center; justify-content: center; height: 148px; border: 1px solid rgba(255,255,255,.7); color: #fff; font-size: 22px; font-weight: 700; letter-spacing: .12em; }
.wt-name { display: block; margin-top: 11px; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.wt-desc { display: block; margin-top: 5px; color: rgba(255,255,255,.58); font-size: 12px; line-height: 1.45; }

/* ---- Dark stripe: website links + particle cube outline ---- */
/* dark panel behind the particle canvas (z -1); fades in for the stripe so the white
   points read on #1a1a1a. Sits below the particles, above the white root. */
#dark-veil { position: fixed; inset: 0; z-index: -2; background: var(--ink); opacity: 0; pointer-events: none; }
.darkstripe {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: 0 8vw; background: transparent; color: #fff;
}
/* Projects retain their section clipping as Websites enters. Only nav contrast changes. */
.in-stripe .nav a { color:#fff; }

/* ---- Education ---- */
.edu-sec { background: var(--bg); position: relative; }
.edu { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.edu-col h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 14px; }
.edu-col p { font-size: 16px; line-height: 1.7; color: var(--grey2); margin: 0 0 12px; }

/* ---- Contact (no cube grid above it any more, so the block centres in the section) ---- */
.ch-contact { position: relative; min-height: 100vh; display: flex; align-items: center; padding-bottom: 12vh; }
.contact-list { list-style: none; margin: 24px 0 0; padding: 0; }
.contact-list li { margin: 6px 0; }
.contact-list a { font-size: 22px; color: var(--ink); text-decoration: none; }
.contact-list a:hover { opacity: .55; }
.contact-pill {
  display: inline-block; margin: 28px 0 0; background: var(--ink); color: #fff; text-decoration: none;
  padding: 14px 34px; border-radius: 999px; font-size: 13px; text-transform: uppercase; letter-spacing: .14em;
}
.contact-foot { margin: 34px 0 0; font-size: 13px; color: var(--label); }
.contact-foot a { color: var(--ink); }

/* ---- Progress rail ---- */
.progress { position: fixed; left: 0; top: 0; bottom: 0; width: 40px; z-index: 6; pointer-events: none; }
.progress-bar { position: absolute; left: 22px; top: 0; width: 1px; height: 0; background: var(--ink); }
.progress-num { position: absolute; left: 16px; top: 0; font-size: 12px; color: var(--label); transform: translateY(-2px); }

@media (max-width: 819px) {
  .exp-row, .others-grid, .edu, .rit-row { grid-template-columns: 1fr; gap: 24px; }
  .others-grid { margin-top: 4vh; }
  .darkstripe.websites-stripe { min-height: auto; padding: 12vh 22px; align-items: flex-start; }
  .websites-inner { width: 100%; }
  .web-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .web-tile img, .wt-numera { height: clamp(112px, 28vw, 160px); }
  .progress { display: none; }
  .ray-inner { max-width: 100%; }
  .ray-systems { margin-top: 20px; }
  .vct { width: 78%; }
}

#cubes-canvas { transition: opacity .6s ease; }

/* Lenis smooth-scroll rules (inlined to drop a render-blocking request) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ======================= ROUND 2: EXPERIENCE ======================= */
.exp2 { position: relative; }
.exp2-pin { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 12vh 0; }
.exp2-col { max-width: 48%; }   /* forklift morph occupies the right 45% */
.exp-word {
  font-weight: 300; font-size: min(96px, 6.6vw); line-height: 1; margin: 0 0 4px;
  text-transform: lowercase; color: var(--ink); letter-spacing: -0.01em;
  opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease;
}
.exp2.seen .exp-word { opacity: 1; transform: none; }
.reveal-line { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal-line.in { opacity: 1; transform: none; }
.exp2-head { list-style: none; margin: 18px 0 0; padding: 0; }
.exp2-head li { font-size: 15px; color: var(--grey2); line-height: 1.6; }
/* Experience column: heading + dates pinned to the top, achievements to the bottom, so
   the 34vh to 70vh band on the left is free for the Raymond cube to park and unfold. */
#experience .exp2-pin { padding: 4vh 0; }
#experience .exp2-col { max-width: 34vw; min-height: 92vh; display: flex; flex-direction: column; justify-content: space-between; }
#experience.net-open .exp2-col { min-height: auto; position: fixed; left: var(--net-copy-x, 4vw); top: var(--net-copy-y, 8vh); transform: scale(var(--net-copy-scale, 1)); transform-origin: top left; }
/* heading held small here so the whole top block (word + employer lines) clears 26vh, leaving
   the 26vh to 74vh band on the left free for the unfolded Raymond faces. */
#experience .exp-word { font-size: min(56px, 4.4vw); line-height: 1; }
.exp2-top { margin: 0; }
.raymond-read { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); margin: 0; padding: 8px 16px; border: 0; border-radius: 18px; background: rgba(255,255,255,.92); font-size: 14px; white-space: nowrap; }
.raymond-read[hidden] { display: none; }
.exp2-bottom { margin: 0; }
.exp2-sub { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--label); margin: 0 0 12px; font-weight: 500; }
.exp2-ach { list-style: none; margin: 0; padding: 0; }
.exp2-ach li { font-size: 15px; color: var(--grey2); line-height: 1.7; }
.exp2-prev { margin: 30px 0 0; }
.exp2-row { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; margin-top: 22px; }
.exp2-row .vct { width: 128px; }
@media (min-width: 820px) {
  .prev-band .vct { transform: scale(2); transform-origin: left center; }
}
.exp2-rowtext h4 { font-size: 18px; font-weight: 500; margin: 0 0 6px; }
.exp2-rowtext h4 span { font-size: 13px; color: var(--label); font-weight: 400; margin-left: 6px; }
.exp2-rowtext p { font-size: 14px; color: var(--grey2); line-height: 1.6; margin: 0 0 8px; max-width: 52ch; }

/* ---- Previous employers band (own section, 60vh below experience) ---- */
/* reveal-line and exp-word here are outside #experience, so main.js never animates
   them; show them by default. The forklift particle silhouette holds on the right
   through this band, so both rows stack in a single left column capped at 42vw so
   nothing crosses 46vw into the forklift. */
.prev-band { position: relative; margin-top: 60vh; padding: 8vh 0 12vh; }
.prev-band .exp-word { opacity: 1; transform: none; }
.prev-band .reveal-line { opacity: 1; transform: none; }
.prev-band .exp2-prev { display: flex; flex-direction: column; gap: 28px; max-width: 34vw; margin: 30px 0 0; }
.prev-band .exp2-row { margin-top: 0; }
@media (max-width: 819px) {
  .prev-band { margin-top: 60vh; padding: 4vh 0 8vh; }
  .prev-band .exp2-prev { max-width: 100%; gap: 28px; }
}

.slicer2 .exp2-pin { align-items: stretch; padding: 0; }
.slicer2 .col { position: relative; width: 100%; min-height: 100vh; }
.am-stage { position: absolute; z-index: 5; top: 66px; left: 50%; width: max-content; max-width: calc(100vw - 220px); transform: translateX(-50%); text-align: center; pointer-events: none; padding: 10px 24px; border: 0; border-radius: 28px; background: rgba(255,255,255,.76); box-shadow: none; }
.am-stage-label, .am-stage-copy { display: none; }
.am-stage h2 { margin: 0; font-size: clamp(28px, 3vw, 40px); font-weight: 400; line-height: 1.12; letter-spacing: -.02em; }
.am-stage-links { position: absolute; z-index: 5; bottom: 18px; left: 50%; display: flex; justify-content: center; gap: 18px; width: min(720px, 90vw); transform: translateX(-50%); }
.am-fallback { display: none; padding: 64px 0 84px; }
.am-fallback h2 { margin: 7px 0 0; font-size: clamp(38px, 8vw, 66px); line-height: 1; font-weight: 300; }
.am-fallback-intro { max-width: 58ch; margin: 18px 0 0; color: var(--grey2); line-height: 1.6; }
.am-fallback-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 28px; align-items: start; padding: 44px 0; border-top: 1px solid var(--hair); }
.am-fallback-story:first-of-type { margin-top: 42px; }
.am-fallback-story h3 { margin: 6px 0 10px; font-size: clamp(26px, 4vw, 42px); font-weight: 300; line-height: 1.05; }
.am-fallback-story p:not(.am-stage-label) { max-width: 50ch; margin: 0; color: var(--grey2); line-height: 1.65; }
.am-fallback-story .ch-open { margin-top: 16px; }
.am-fallback-story figure { margin: 0; }
.am-fallback-story img { display: block; width: 100%; max-height: 380px; object-fit: contain; background: #fff; }
.am-fallback-story figcaption { margin-top: 8px; color: var(--label); font-size: 12px; line-height: 1.4; }
/* build hairline: a thin line pinned at the current top ring's screen y while the stack grows */
.slice-hairline { position: fixed; left: 52vw; right: 4vw; top: 0; height: 0; border-top: 1px solid var(--ink);
  z-index: 3; pointer-events: none; opacity: 0; transition: opacity .25s ease; will-change: transform; }
.slice-label { position: absolute; right: 0; top: 6px; font-size: 12px; color: var(--ink); letter-spacing: .02em; }

/* ---- Projects: cube grid + unfold ---- */
.projects2 { position: relative; min-height: 120vh; padding-top: 32px; }
.projects-head { position: relative; z-index: 2; transition: left .45s ease, top .45s ease, transform .45s ease; transform-origin: top left; }
.projects-head.dim { position: fixed; left: var(--net-copy-x, 4vw); top: var(--net-copy-y, 5vh); width: min(34vw, 430px); transform: scale(var(--net-copy-scale, .4)); pointer-events: none; }
.projects-hint { font-size: 14px; color: var(--label); margin: 8px 0 0; }
.project-descriptions { position: static; }
.project-description { position: fixed; left: 0; top: 0; z-index: 5; width: clamp(180px, 22vw, 300px); margin: 0; text-align: left; font-size: 13px; line-height: 1.5; color: var(--grey2); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .22s ease, visibility .22s step-end; }
.project-description h3 { margin: 0 0 7px; font-size: 18px; line-height: 1.15; font-weight: 500; color: var(--ink); }
.project-description p { margin: 0; }
/* white scrim behind the open net (above the canvases, below the raised cube canvas +
   cards) so the busy grid/particles/text drop away and only the net + cards read */
#project-scrim { position: fixed; inset: 0; z-index: 3; background: transparent;
  opacity: 0; pointer-events: none; }
#project-scrim.on { opacity: 1; }
/* while a cube is open, lift the cube canvas (which draws the net) above the scrim */
body.cube-open #cubes-canvas { z-index: 4; }
/* Desktop unfold: the six faces are the 3D net (baked textures from the engine); the only
   DOM over them is the Close button and one Full breakdown link, centred below the net. */
.pc-link { position: fixed; right: 3vw; bottom: 3vh; z-index: 6;
  font-family: inherit; font-size: 14px; background: var(--bg); color: var(--ink);
  border: 1px solid var(--ink); border-radius: 999px; padding: 10px 24px; cursor: pointer;
  text-decoration: none; }
.pc-link:hover { background: var(--ink); color: var(--bg); }
/* inner face-content styles, reused by the mobile vertical face stack (.pms-card) */
.pc-kick { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--label); margin: 0 0 5px; }
.pc-year { display: block; font-size: 12px; color: var(--label); margin: 0 0 7px; }
.pc-key { font-weight: 600; color: var(--ink); margin-top: 6px !important; }
.pc-full { margin-top: 9px; font-size: 12px; font-family: inherit; background: none; border: 0; padding: 0;
  color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pms-card img { width: 100%; height: 140px; object-fit: cover; display: block; border-radius: 3px; margin: 0 0 9px; }
.pms-card h3 { font-size: 20px; font-weight: 500; margin: 0 0 3px; color: var(--ink); line-height: 1.2; }
.pms-card p { font-size: 15px; line-height: 1.5; color: var(--grey2); margin: 0; }
.project-close { position: fixed; top: 22px; right: 24px; z-index: 6; width: 44px; height: 44px;
  border-radius: 999px; border: 1px solid var(--ink); background: var(--bg); color: var(--ink);
  font-size: 22px; line-height: 1; cursor: pointer; }
.project-mgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 24px 0 0; }
.project-tile { font-family: inherit; font-size: 16px; text-transform: lowercase; text-align: left;
  background: none; border: 1px solid var(--hair); border-radius: 5px; padding: 22px 16px; color: var(--ink); cursor: pointer; }
.project-tile strong, .project-tile span { display: block; }
.project-tile strong { font-size: 16px; font-weight: 500; line-height: 1.2; text-transform: none; }
.project-tile span { margin-top: 7px; color: var(--grey2); font-size: 13px; line-height: 1.45; text-transform: none; }
.project-stack { position: fixed; inset: 0; z-index: 6; background: var(--bg); overflow-y: auto; padding: 64px 20px 40px; }
.pms-card { border-top: 1px solid var(--hair); padding: 16px 0; }
.pms-close { position: fixed; top: 14px; right: 16px; width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--bg); font-size: 22px; cursor: pointer; }
/* the mobile face stack and tap grid are the touch fallback for the projects cubes.
   Hide them on desktop when the full cube experience runs. Reduced-motion desktop keeps
   them, because the mgrid is that mode's only projects UI. */
@media (min-width: 820px) and (prefers-reduced-motion: no-preference) {
  .project-stack, .project-mgrid { display: none !important; }
}

@media (max-width: 819px) {
  .exp2-pin { min-height: auto; padding: 12vh 0 6vh; }
  .exp2-col { max-width: 100%; }
  .exp2-row { grid-template-columns: 1fr; }
  .exp2-row .vct { width: 60%; margin-top: 10px; }
  .slicer2 .exp2-pin, .slicer2 .col { min-height: 0; }
  .slicer2 .exp2-pin { display: none; }
  .am-fallback { display: block; }
  .am-fallback-story { grid-template-columns: 1fr; gap: 22px; }
  .slice-hairline { display: none; }
  .projects2 { min-height: auto; padding-bottom: 8vh; }
  .project-description { display: none; }
  .project-mgrid { grid-template-columns: repeat(2, 1fr); }
  .pc-link, .project-close { display: none; }
}

@media (max-width: 390px) {
  .project-mgrid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) and (min-width: 820px) {
  .slicer2 .exp2-pin { display: none; }
  .am-fallback { display: block; }
}

body.am-unavailable .slicer2 .exp2-pin { display: none; }
body.am-unavailable .am-fallback { display: block; }

@media (max-width:819px) {
  .nav { position:relative; display:grid; gap:8px; padding:18px 22px; }
  .nav-links { justify-content:flex-start; gap:0 12px; }
  .nav-links a { white-space:nowrap; }
}
