/* ════════════════════════════════════════════════════
   naVid/// haJIallakbar — Portfolio
   ════════════════════════════════════════════════════ */

/* ─── Reset ──────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  /* scroll-behavior handled by Lenis */
}

/* Custom cursor only on devices with a precise pointer (mouse/trackpad).
   Touch and keyboard-only users keep the native cursor for accessibility. */
@media (pointer: fine) {
  * , *::before, *::after { cursor: none !important; }
  .cursor { display: block; }
}
@media not all and (pointer: fine) {
  .cursor { display: none; }
}

/* ─── Variables ──────────────────────────────────────── */
:root {
  --bg: #f6f4f0;
  --ink: #2a2825;
  --ink-mid: #706c67;
  --ink-faint: #b8b3ac;
  --red: #c73232;
  --teal: #163b3c;          /* deep accent — logo tile, dark surfaces, selection */
  --teal-mid: #2c5a5b;      /* lighter teal for hover/borders */
  --panel-bg: #f6f4f0;
  --line: #d8d4cc;
  --font: "Work Sans", sans-serif;
  --font-title: "Crimson Pro", Georgia, serif;
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --panel-w: 360px;
}

/* Teal text selection — ties the logo-tile accent into the rest of the site */
::selection { background: var(--teal); color: var(--bg); }

/* (No background grid on DOM pages — the drawing grid lives only on the
   field and the project sheets, registered to the cells in WebGL.) */

/* Keyboard focus — the native cursor is hidden (custom cursor), so keyboard
   position must be unmistakable. Teal = the active accent, same as nav. */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.project-row:focus-visible {
  outline-offset: -2px;
  border-left-color: var(--ink);
  padding-left: 14px;
}

/* ─── Custom cursor ──────────────────────────────────── */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: #fff;
  pointer-events: none;
  z-index: 99999;
  mix-blend-mode: difference;
  will-change: transform;
  transition: width 0.2s var(--ease-out), height 0.2s var(--ease-out), background 0.15s ease, border 0.15s ease, mix-blend-mode 0s;
}
.cursor.is-hovering {
  width: 16px;
  height: 16px;
  background: #fff;
  border: 4px solid var(--ink);
  mix-blend-mode: normal;
}

/* ─── Base ───────────────────────────────────────────── */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  max-width: 100%;
  display: block;
}
button {
  font-family: var(--font);
  cursor: pointer;
}

/* ════════════════════════════════════════════════════
   INTRO ANIMATION OVERLAY
   ════════════════════════════════════════════════════ */
.intro {
  position: fixed;
  inset: 0;
  background: transparent;                     /* the curtain below is the cover */
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.55s ease;
}
.intro.fading { opacity: 0; pointer-events: none; }
.home-curtain {                                /* page → home: teal sweep in, then back out */
  position: fixed;
  inset: 0;
  z-index: 950;
  background: #012d30;                         /* the teal the WebGL logo tile actually renders —
                                                  matched so the hand-off underneath is invisible */
  pointer-events: none;
  will-change: clip-path;
}
.home-curtain.with-shot {                      /* carries a still of the home view: */
  background: var(--bg);                       /* canvas over paper, exactly like the live page */
  z-index: 590;                                /* under the topbar + buttons, so they never pop */
}
.intro-curtain {                               /* drawn back diagonally on handoff */
  position: absolute;
  inset: 0;
  background: var(--bg);
  will-change: clip-path;
}

/* Lottie wordmark animation — fills the overlay, comp centered. On finish the
   whole container shrinks + translates so its final-frame "//" lands on the
   menu button (handled in runIntro) — hence will-change/origin set in JS. */
.intro-lottie {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform, opacity;
}
.intro-lottie svg { display: block; }

/* ── Brand slash — the exact vector from the intro animation, reused for every
   "/" in the chrome so the intro→menu hand-off is one continuous shape.
   viewBox 0 0 31.04 57.2 matches the Lottie slash path. Sized by height per
   context; width follows the intrinsic ratio. */
.vslash,
.vword {
  display: inline-block;
  height: 1em;
  width: auto;
  fill: currentColor;
  flex: none;
  overflow: visible;
}

/* Z-index hierarchy */
.menu-btn,
.menu-scrim,
.menu-panel,
#app,
.hover-img-wrap {
  position: relative;
  z-index: 1;
}
.menu-btn    { z-index: 900; }
.menu-scrim  { z-index: 800; }
.menu-panel  { z-index: 850; }
#app         { z-index: auto; }
.hover-img-wrap { z-index: 700; }
.home-btn    { z-index: 900; }

/* ════════════════════════════════════════════════════
   TOP RIBBON  — spans the page; home + nav + menu sit on it
   ════════════════════════════════════════════════════ */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 30px;
  z-index: 600;
  display: flex;
  align-items: center;
  background: rgba(246, 244, 240, 0.9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;                       /* revealed after the intro, with the buttons */
  transition: opacity 0.4s ease, background 0.35s ease;
}
.topbar.ready { opacity: 1; }
.topbar.scrolled:not(.teal) {                  /* a defined edge once content runs under it */
  background: rgba(246, 244, 240, 0.94);
  box-shadow: 0 1px 0 var(--line);
}
.menu-open .topbar { opacity: 0.35; }   /* recede behind the menu, like the page */

/* Zoomed out onto the field, the bar turns dark teal with light buttons;
   the colour follows the hero's base tile (set via --bar-teal from JS) */
.topbar.teal { background: var(--bar-teal, rgba(22, 59, 60, 0.92)); }
/* home + menu buttons sit ON the bar but outside it in the DOM — follow along */
.home-btn, .menu-btn { transition: color 0.35s ease; }
body.hero-teal .home-btn,
body.hero-teal .menu-btn { color: var(--bg); }
body.hero-teal .home-btn .mb-chevron,
body.hero-teal .menu-btn .mb-chevron,
body.hero-teal .home-btn .mb-s,
body.hero-teal .menu-btn .mb-s { color: var(--bg); }
.mb-s, .mb-chevron { transition: color 0.35s ease; }

/* ── Hero focus arrows — prev/next project image at full zoom ── */
.hero-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  font-family: var(--font);
  font-size: 1.7rem;
  font-weight: 300;
  color: var(--ink);
  background: none;
  border: none;
  padding: 14px 10px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  user-select: none;
}
.hero-arrow:hover { color: var(--teal); }
.hero-arrow-l { left: 22px; }
.hero-arrow-r { right: 22px; }

/* ── Landing scroll hint — after idling on the deep logo stage, the actual
   cursor performs its stretch (GSAP loop in main.js) and this prompt
   trails just beneath it ── */
.cursor-hint {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99998;
  font-family: var(--font);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(246, 244, 240, 0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  white-space: nowrap;
}
.cursor-hint.on { opacity: 1; }

/* ── Chrono index text — the list page's legibility, on the sheet ── */
.chrono-index {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 3;
}
.ci-item {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  pointer-events: auto;
  padding-right: 16px;
  will-change: transform;
}
.ci-year {
  display: block;
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--ink-mid);
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}
.ci-title {
  font-family: var(--font-title);
  font-size: clamp(1.05rem, 1.8vw, 1.5rem);   /* row title — matches .pr-title */
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  transition: color 0.18s;
}
.ci-item:hover .ci-title { color: var(--teal); }
.ci-meta {
  display: block;
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-top: 7px;
}
.ci-sub {
  font-family: var(--font-title);
  font-style: italic;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--ink-mid);
  line-height: 1.5;
  margin-top: 8px;
}

.topbar.teal .topbar-link { color: rgba(246, 244, 240, 0.72); }
.topbar.teal .topbar-link:hover,
.topbar.teal .topbar-link.active { color: var(--bg); }

/* ── Field filters — on the landed field (.filters, set with .teal by the
   hero) the nav links transition into the filter tokens. Personal/CV use
   .teal WITHOUT .filters: dark bar, normal navigation. ── */
.topbar-nav {
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0s;
}
.topbar.filters .topbar-nav {
  opacity: 0;
  transform: translate(-50%, -6px);
  pointer-events: none;
  visibility: hidden;                 /* off the tab order while filters own the bar */
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}
.topbar-filters {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 6px));
  display: flex;
  gap: 34px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;                 /* off the tab order until the field lands */
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}
.topbar.filters .topbar-filters {
  opacity: 1;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  visibility: visible;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0s;
}
.tf-btn {
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246, 244, 240, 0.6);
  padding: 2px 0;
  transition: color 0.18s, border-color 0.18s;
}
.tf-btn:hover { color: var(--bg); }
.tf-btn.active { color: var(--bg); border-bottom-color: rgba(246, 244, 240, 0.85); }
.topbar.teal .topbar-cta { color: var(--bg); border-color: rgba(246, 244, 240, 0.85); }
.topbar.teal .topbar-cta:hover { background: var(--bg); color: var(--teal); border-color: var(--bg); }

.topbar-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);    /* centered in the bar */
  display: flex;
  gap: 42px;
}
.topbar-link {
  font-family: var(--font);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mid);
  transition: color 0.18s;
}
.topbar-link:hover { color: var(--ink); }
.topbar-link.active { color: var(--teal); font-weight: 500; }

/* CTA — orthogonal bordered button (no pill radius; on-system) */
.topbar-cta {
  position: absolute;
  top: 50%;
  right: 72px;                     /* clear the menu button on the far right */
  transform: translateY(-50%);
  font-family: var(--font);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 5px 13px;
  transition: background 0.2s, color 0.2s;
}
.topbar-cta:hover { background: var(--teal); color: var(--bg); border-color: var(--teal); }

/* ════════════════════════════════════════════════════
   HOME BUTTON  — top-left mini logo
   ════════════════════════════════════════════════════ */
.home-btn {
  position: fixed;
  top: 15px;                /* ribbon centre (height 30) */
  left: 28px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 1px;
  text-decoration: none;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.home-btn.ready { opacity: 1; }
.home-btn:hover { opacity: 0.5; }
.menu-open .home-btn { opacity: 0; pointer-events: none; }

/* ════════════════════════════════════════════════════
   MENU BUTTON  >//
   ════════════════════════════════════════════════════ */
.menu-btn {
  position: fixed;
  top: 15px;                /* ribbon centre (height 30) */
  right: 28px;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 1px;
  opacity: 0;                /* hidden until intro finishes */
  transition: opacity 0.3s ease;
  cursor: pointer;
}
.menu-btn.ready { opacity: 1; }
.menu-btn:hover { opacity: .5; }
.menu-open .menu-btn { opacity: 0 !important; pointer-events: none; }

/* The > chevron */
.mb-chevron {
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 700;
  font-style: normal;
  color: var(--ink);
  line-height: 1;
  display: inline-block;
  user-select: none;
}

/* The slashes (menu "//", home "///") — the exact intro-animation vector.
   Sized by height; the negative margin overlaps them into the tight "//"
   spacing of the animation so the intro hand-off lands as one continuous mark. */
.mb-s {
  height: 0.98rem;
  color: var(--ink);
}
.mb-s + .mb-s { margin-left: -0.32rem; }

/* ════════════════════════════════════════════════════
   MENU SCRIM
   ════════════════════════════════════════════════════ */
.menu-scrim {
  position: fixed;
  inset: 0;
  background: rgba(22, 59, 60, 0.16);          /* a teal veil, like the field's */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
  backdrop-filter: blur(3px) saturate(0.85);
  -webkit-backdrop-filter: blur(3px) saturate(0.85);
}
.menu-open .menu-scrim {
  opacity: 1;
  pointer-events: all;
}

/* ════════════════════════════════════════════════════
   MENU PANEL  (right side)
   ════════════════════════════════════════════════════ */
.menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--panel-w);
  max-width: 90vw;
  height: 100vh;
  background: var(--panel-bg);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 22px 32px 28px 32px;
  transform: translateX(100%);
  /* visibility keeps the off-screen panel out of the tab order when closed */
  visibility: hidden;
  transition: transform 0.52s var(--ease), visibility 0s linear 0.52s;
  overflow-y: auto;
}
.menu-open .menu-panel {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.52s var(--ease);
}

/* < close indicator at very top of panel */
.menu-close-indicator {
  background: none;                            /* a <button> now — the way out */
  border: none;
  padding: 0;
  align-self: flex-start;
  position: relative;
  cursor: pointer;
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 700;
  font-style: normal;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: 0;
  line-height: 1;
  -webkit-text-stroke: 0.4px var(--ink);
}

/* Logo block */
/* The menu wordmark sits on the same dark teal tile as the hero logo cell */
.menu-logo-block {
  margin-bottom: 18px;
  background: var(--teal);
  padding: 16px 18px 13px;
}
.menu-logo-lines {
  display: flex;
  flex-direction: column;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--bg);
  overflow: hidden;
  width: 100%;
}
.mlogo-line1,
.mlogo-line2 {
  display: flex;
  align-items: flex-end;
  gap: 0.04em;
}
.mlogo-line2 {
  padding-left: 1.2rem;
}
/* Text parts — start off-screen, slide in via JS (no opacity, pure translate) */
.mlogo-den,
.mlogo-ahv {
  display: inline-block;
}
.mlogo-den {
  transform: translateX(-110%);
  transition: none;
}
.mlogo-den.vis {
  transform: translateX(0);
  transition: transform 0.42s cubic-bezier(0.76,0,0.24,1);
}
.mlogo-ahv {
  transform: translateX(110%);
  transition: none;
}
.mlogo-ahv.vis {
  transform: translateX(0);
  transition: transform 0.42s cubic-bezier(0.76,0,0.24,1);
}
/* Logo slashes — same brand vector, sized to the 2.4rem wordmark */
.mlogo-s1,
.mlogo-s2 {
  height: 2.31rem;
  color: var(--bg);
}
.mlogo-den .vword,
.mlogo-ahv .vword {
  height: 1.83rem;
  position: relative;
  top: 0.08rem;   /* drop slightly so the letters sit lower against the // */
}
.mlogo-full {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(246, 244, 240, 0.6);
  margin-top: 6px;
  opacity: 0;
  transition: opacity 0.12s ease;
}

/* Double horizontal rule */
.menu-hr-double {
  height: 0;
  border: none;
  border-top: 1px solid var(--line);
  box-shadow: 0 4px 0 0 var(--line);
  margin-bottom: 5px;
}

/* single HR */
.menu-hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* Nav list — display-size Crimson with drafting index numerals */
.menu-nav {
  list-style: none;
  padding: 22px 0 22px;
  counter-reset: mi;
}
.menu-nav li {
  padding: 3px 0;
  counter-increment: mi;
}
.menu-nav .menu-link {
  position: relative;
  font-family: var(--font-title);
  font-size: clamp(1.7rem, 2.4vw, 2.15rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  padding-left: 2.1rem;
}
.menu-nav .menu-link::before {                 /* 01 · 02 · 03 · 04 */
  content: counter(mi, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.55em;
  font-family: var(--font);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  transition: color 0.18s;
}
.menu-nav .menu-link::after {                  /* hairline drawn on hover */
  content: '';
  position: absolute;
  left: 2.1rem;
  right: 0;
  bottom: 0.08em;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.38s var(--ease);
}
.menu-nav .menu-link:hover { padding-left: 2.1rem; color: var(--teal); }
.menu-nav .menu-link:hover::before,
.menu-nav .menu-link.active::before { color: var(--teal); }
.menu-nav .menu-link:hover::after,
.menu-nav .menu-link.active::after { transform: scaleX(1); transform-origin: left center; }

.menu-link {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--ink-mid);
  display: inline-block;
  letter-spacing: 0.005em;
  transition: color 0.18s, padding-left 0.18s;
}
.menu-link:hover {
  color: var(--ink);
  padding-left: 5px;
}
.menu-link.active {
  color: var(--teal);
}

/* Social list — quiet UI type under the display links */
.menu-social {
  list-style: none;
  padding: 16px 0 14px;
}
.menu-social .menu-link {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.menu-social li {
  padding: 2px 0;
}

/* Copyright */
.menu-copy {
  font-size: 0.62rem;
  color: var(--ink-faint);
  margin-top: auto;
  padding-top: 14px;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.menu-copy strong {
  font-weight: 700;
  color: var(--ink-mid);
}

/* ════════════════════════════════════════════════════
   APP / VIEW CONTAINER
   ════════════════════════════════════════════════════ */
#app {
  min-height: 100vh;
  position: relative;
}

/* ─── View transitions ────────────────────────────── */
.view-enter {
  animation: viewIn 0.42s var(--ease-out) both;
}
.view-exit {
  animation: viewOut 0.26s ease both;
}

@keyframes viewIn {                            /* fade only — the content itself rises/draws */
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes viewOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* ─── Scroll reveals — animated by GSAP ScrollTrigger ── */
.char {
  display: inline-block;
  will-change: transform;
}

/* ════════════════════════════════════════════════════
   LANDING VIEW — mirrors screenshot exactly
   Left: content  |  content fills full width if nav closed
   ════════════════════════════════════════════════════ */
.view-home {
  min-height: 100vh;
  padding: 0;
  position: relative;   /* anchor the full-page PIP host */
}

/* Hero — large name, bottom-left */
.hero {
  height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 0 12vw 8vh;
  position: relative;
  overflow: hidden;
}

/* WebGL hero canvas (L2 glass + L3 polaroid field) sits behind the DOM logo */
.hero-gl {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero-gl canvas {
  display: block;
  width: 100%;
  height: 100%;
}



.hero-logo {
  line-height: 1;
  position: relative;
  z-index: 50;
  color: var(--ink);
  transform: scale(1.25);
  transform-origin: bottom left;
  pointer-events: none;   /* never block the polaroids beneath, esp. when zoomed */
}


.hero-prefix {
  font-size: clamp(0.8rem, 1.3vw, 1rem);
  font-weight: 400;
  color: var(--ink-mid);
  margin-bottom: 2px;
}

.hero-name-line1,
.hero-name-line2 {
  display: flex;
  align-items: flex-end;
  gap: 0.04em;
  color: var(--ink);
  line-height: 1;
  overflow: hidden;
}
.hero-name-line2 {
  padding-left: clamp(2rem, 6vw, 5rem);   /* mirrors the old 0.5em offset */
}
/* Vector wordmark + slashes, sized to roughly the old clamp(4.5rem,12vw,10rem) */
.hero-name .vword  { height: clamp(4.4rem, 11.6vw, 9.7rem); }
.hero-name .vslash { height: clamp(3.6rem, 9.5vw, 7.9rem); }

.hero-full-name {
  font-size: clamp(0.62rem, 1vw, 0.85rem);
  font-weight: 300;
  color: var(--ink-mid);
  letter-spacing: 0.08em;
  margin-top: 12px;
}

/* discipline tag — sits below the full name inside .hero-logo */
.hero-discipline {
  display: block;
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 16px;
}

/* Hero keyframes removed — GSAP handles all hero animations */

/* ── Hero field fallback (touch / reduced motion) ──
   The cover pool as a scrollable justified gallery below the wordmark:
   true aspects, no crop, rows flush both edges. Stands in for the WebGL
   plane where wheel + fine pointer aren't available. */
.hero-scroll-cue {
  position: absolute;
  right: 6vw;
  bottom: 4.5vh;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mid);
}
.hero-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4vh 6vw 12vh;
}
.hf-row {
  display: flex;
  gap: 8px;
}
.hf-tile {
  display: block;
  flex: none;
}
.hf-tile img {
  width: 100%;
  height: 100%;
  display: block;
  /* rests nearly grayscale like the WebGL field; hue returns on touch/focus */
  filter: grayscale(0.88);
  transition: filter 0.35s ease;
}
.hf-tile:hover img,
.hf-tile:focus-visible img,
.hf-tile:active img {
  filter: grayscale(0);
}
.hf-logo {
  background: var(--teal);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hf-logo-lines {
  display: flex;
  flex-direction: column;
  width: 64%;
}
.hf-l1,
.hf-l2 {
  display: flex;
  align-items: flex-end;
  gap: 2%;
}
.hf-l2 {
  margin-top: 5%;
  padding-left: 15%;
}
/* sized by width here (tile-relative), unlike the 1em chrome slashes */
.hf-logo .vword  { height: auto; width: 74%; }
.hf-logo .vslash { height: auto; width: 10%; }

/* ── The index sheet as a page (touch / reduced motion) ─────────────
   Twin of the WebGL chrono sheet. The drawing grid is a quiet BACKGROUND,
   but registered: its columns divide the content width exactly (12, or 6
   when stacked), so the outer lines run along the text and image edges and
   the corner nodes sit on grid intersections of the rules. */
.view-index {
  padding: 13vh 6vw 14vh;
  min-height: 100vh;
}
.ix-list {
  --cols: 6;                                   /* larger cells: 6 across (3 when stacked) */
  --grid: rgba(22, 59, 60, 0.035);             /* barely there — paper, not a frame */
  position: relative;
  container-type: inline-size;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px),
    linear-gradient(to left, var(--grid) 1px, transparent 1px);   /* the closing right edge */
  background-size:
    calc(100cqw / var(--cols)) calc(100cqw / var(--cols)),
    calc(100cqw / var(--cols)) calc(100cqw / var(--cols)),
    100% 100%;
  background-repeat: repeat, repeat, no-repeat;
}
.ix-stack .ix-list { --cols: 3; }
.ix-group { position: relative; }
.ix-group::before,
.ix-group::after {                             /* nodes where the rule meets the edge lines */
  content: '';
  position: absolute;
  top: -3px;
  width: 5px;
  height: 5px;
  background: var(--teal);
  opacity: 0.55;
}
.ix-group::before { left: -2px; }
.ix-group::after  { right: -2px; }
/* phones: closer — narrower margins, bigger type, one or two covers a row */
@media (max-width: 600px) {
  .view-index { padding: 11vh 4.5vw 12vh; }
  .ix-stack .ci-title { font-size: 1.5rem; }
  .ix-stack .ci-year  { font-size: 0.8rem; }
  .ix-stack .ci-meta  { font-size: 0.8125rem; }
  .ix-stack .ci-sub   { font-size: 1.0625rem; }
  .ix-row, .ix-covers { gap: 6px; }
}
.ix-filters {
  display: flex;
  gap: 26px;
  margin-bottom: 6vh;
}
.ix-list { display: flex; flex-direction: column; }
.ix-group {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4vw;
  padding: 4.5vh 0;
  border-top: 1px solid var(--line);
}
.ix-stack .ix-group { grid-template-columns: 1fr; gap: 18px; }
.ix-text { display: block; color: inherit; text-decoration: none; }
.ix-text:hover .ci-title,
.ix-text:active .ci-title { color: var(--teal); }
.ix-covers { display: flex; flex-direction: column; gap: 8px; }
.ix-row { display: flex; gap: 8px; align-items: flex-start; }
.ix-tile, .ix-fill { flex: 1 1 0%; min-width: 0; display: block; }
.ix-tile img {
  width: 100%;
  height: auto;
  display: block;
  /* rests nearly grayscale like the field; hue returns on touch/hover */
  filter: grayscale(0.88);
  transition: filter 0.35s ease;
}
.ix-tile:hover img, .ix-tile:active img, .ix-group:focus-within .ix-tile img { filter: grayscale(0); }
.hf-sentinel { height: 1px; }

/* ── MENU — TEAL LIQUID GLASS (Navid, Oct 2026) ─────────────────────
   Every version: the whole panel is translucent teal glass (~10% of the
   page breathing through), the wordmark sits straight on it — no tile.
   Over the teal home stage it inverts: paper glass, ink wordmark. */
.menu-panel {
  background: rgba(22, 59, 60, 0.9);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  backdrop-filter: blur(28px) saturate(1.4);
  border-left: 1px solid rgba(246, 244, 240, 0.14);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.06), -24px 0 60px rgba(8, 28, 29, 0.18);
  --m-ink: var(--bg);
  --m-mid: rgba(246, 244, 240, 0.72);
  --m-faint: rgba(246, 244, 240, 0.42);
  --m-line: rgba(246, 244, 240, 0.16);
  --m-accent: rgba(246, 244, 240, 0.62);
}
body.menu-on-teal .menu-panel {
  background: rgba(246, 244, 240, 0.9);
  border-left-color: rgba(42, 40, 37, 0.1);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.5), -24px 0 60px rgba(8, 28, 29, 0.12);
  --m-ink: var(--ink);
  --m-mid: var(--ink-mid);
  --m-faint: var(--ink-faint);
  --m-line: var(--line);
  --m-accent: var(--teal);
}
.menu-logo-block { background: transparent; padding: 4px 0 0; }
.menu-logo-lines,
.mlogo-s1, .mlogo-s2 { color: var(--m-ink); }
.mlogo-full { color: var(--m-faint); }
.menu-close-indicator { color: var(--m-ink); -webkit-text-stroke-color: var(--m-ink); }
.menu-hr-double, .menu-hr { border-top-color: var(--m-line); }
.menu-hr-double { box-shadow: 0 4px 0 0 var(--m-line); }
.menu-nav .menu-link { color: var(--m-ink); }
.menu-nav .menu-link::before { color: var(--m-faint); }
.menu-nav .menu-link:hover,
.menu-nav .menu-link.active { color: var(--m-accent); }
.menu-nav .menu-link:hover::before,
.menu-nav .menu-link.active::before { color: var(--m-accent); }
.menu-social .menu-link { color: var(--m-mid); }
.menu-social .menu-link:hover { color: var(--m-ink); }
.menu-copy { color: var(--m-faint); }
.menu-copy strong { color: var(--m-mid); }

/* ── Impressum · Datenschutz ─────────────────────── */
.view-legal { padding: 20vh 12vw 14vh; }
.legal-body { max-width: 62ch; margin: 2vh 0 7vh; }
.legal-body h3 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin: 3.2vh 0 8px;
}
.legal-body p {
  font-family: var(--font-title);
  font-size: clamp(0.92rem, 1.2vw, 1.05rem);
  line-height: 1.65;
  color: var(--ink);
}
.legal-body a { border-bottom: 1px solid var(--line); }
.legal-updated { margin-top: 3vh; color: var(--ink-faint) !important; font-size: 0.85rem !important; }
.legal-link {
  display: inline-block;
  margin-top: 8vh;
  padding: 12px 0;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.legal-link:hover { color: var(--teal); }
.menu-legal { display: inline-block; margin-top: 6px; padding: 6px 0; color: var(--m-faint); }
.menu-legal:hover { color: var(--m-ink); }
@media (max-width: 600px) {
  .view-legal { padding: 15vh 4.5vw 12vh; }
  .legal-body p { font-size: 1.0625rem; line-height: 1.62; }
  .legal-body h3, .legal-link { font-size: 0.75rem; }
  .menu-legal { padding: 13px 0; }
}

/* ── Touch home: teal landing → slot-machine rows ⇄ sphere ─────────
   (the DOM home used on touch / reduced motion) */
.touch-home .hero {
  background: var(--teal);
  min-height: 100vh;
  min-height: 100svh;
}
.touch-home .hero-logo,
.touch-home .hero-name-line1,
.touch-home .hero-name-line2 { color: var(--bg); }
.touch-home .hero-prefix,
.touch-home .hero-full-name { color: rgba(246, 244, 240, 0.62); }
.touch-home .hero-discipline,
.touch-home .hero-scroll-cue { color: rgba(246, 244, 240, 0.48); }
.touch-home .hero-field { padding-top: 12vh; padding-bottom: 40vh; gap: 10px; }
.touch-home .hf-row {
  --slot: 0;
  transform-origin: center center;
  will-change: transform;
}
.touch-home .hf-tile img {
  filter: grayscale(calc(0.88 * (1 - var(--slot))));
  opacity: calc(0.72 + 0.28 * var(--slot));
  transition: filter 0.18s linear, opacity 0.18s linear;   /* smooths the grey steps */
}

.home-mode {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 700;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(22, 59, 60, 0.9);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 8px 30px rgba(8, 28, 29, 0.22);
  transform: translate(-50%, 140%);
  opacity: 0;
  transition: transform 0.45s var(--ease-out), opacity 0.3s ease;
  pointer-events: none;
}
.home-mode.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
body.menu-open .home-mode { opacity: 0; pointer-events: none; }
.home-mode button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  min-width: 96px;
  justify-content: center;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(246, 244, 240, 0.72);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.25s ease, color 0.25s ease;
}
.home-mode button.active { background: var(--bg); color: var(--teal); }
.home-mode button:disabled { opacity: 0.35; }
.home-mode svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; }

.hf-sphere {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  top: 56px;                                   /* under the touch top bar */
  z-index: 550;
  background: var(--bg);
  opacity: 0;
  transition: opacity 0.14s linear;            /* the first frame IS the rows, so this is invisible */
}
.hf-sphere.on { opacity: 1; }
.hf-sphere canvas { display: block; width: 100%; height: 100%; }
.hs-cap {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 76px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: max-content;
  max-width: calc(100% - 12vw);
  margin: 0 auto;
  padding: 10px 18px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(246, 244, 240, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}
.hs-cap.on { opacity: 1; transform: none; }
.hs-title { font-family: var(--font-title, 'Crimson Pro', serif); font-size: 1.35rem; color: var(--ink); line-height: 1.15; }
.hs-meta { font-family: var(--font); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mid); }
.hs-cap.open .hs-meta::after { content: ' · tap to open'; color: var(--teal); }
body.sphere-mode { overflow: hidden; }

/* ════════════════════════════════════════════════════
   PROJECT LIST
   ════════════════════════════════════════════════════ */
.view-projects {
  padding: 20vh 8vw 14vh 12vw;
}

.pl-header {
  margin-bottom: 7vh;
}

.pl-title {
  font-family: var(--font-title);
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);   /* tier-2 page title (shared) */
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.95;
  color: var(--ink);
}
.pl-title .t-line1 {
  display: block;
}
.pl-title .t-line2 {
  display: block;
  padding-left: 0.3em;
  font-weight: 300;
  color: var(--ink-mid);
}
.pl-title .t-colon {
  color: var(--teal);
}

.pl-filters {
  display: flex;
  gap: 22px;
  margin-top: 3.5vh;
}
.pl-filter-btn {
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  font-family: var(--font);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mid);   /* interactive: must clear WCAG AA on the ground */
  padding: 4px 0;
  transition: color 0.2s, border-color 0.2s;
  cursor: pointer;
}
.pl-filter-btn:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.pl-filter-btn.active {
  color: var(--teal);
  border-color: var(--teal);
}

.project-list {
  margin-top: 5vh;
}

.project-row {
  display: grid;
  grid-template-columns: 85px 1fr auto;
  align-items: baseline;
  gap: 22px;
  padding: 22px 0;
  padding-left: 0;
  border-bottom: 1px solid var(--line);
  border-left: 2px solid transparent;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.18s, padding-left 0.22s var(--ease-out), color 0.18s;
  position: relative;
}
.project-row:first-child {
  border-top: 1px solid var(--line);
}
.project-row:hover {
  border-left-color: var(--ink);
  padding-left: 14px;
}
.project-row:hover .pr-title {
  color: var(--ink);
}

.pr-year {
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--ink-mid);   /* data, not decoration — readable contrast */
  font-variant-numeric: tabular-nums;
}
.pr-title {
  font-family: var(--font-title);
  font-size: clamp(1.05rem, 1.8vw, 1.5rem);   /* row title — matches .ci-title */
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  transition: color 0.2s;
}
.pr-title-sfx {
  font-weight: 300;
  color: var(--ink-mid);
  font-size: 0.9em;
  margin-left: 4px;
}
.pr-meta {
  text-align: right;
  font-size: 0.62rem;                          /* matches .ci-meta */
  font-weight: 300;
  color: var(--ink-mid);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.65;
}
.pr-cat {
  display: block;
}
.pr-loc {
  display: block;
  color: var(--ink-mid);
}

.wip-badge {
  display: inline-block;
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--red);
  color: var(--red);
  padding: 2px 5px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ─── Baby track — hover shadow ─────────────────────── */
img.bt-active,
.project-row.bt-active {
  box-shadow: 0 3px 12px rgba(22,59,60,0.17), 0 1px 4px rgba(22,59,60,0.10);   /* teal-leaning */
  transition: box-shadow 0.25s ease;
}
img.bt-active {
  position: relative;
  z-index: 2;
}

/* ─── Floating hover image — positioned by GSAP ─────── */
.hover-img-wrap {
  position: fixed;
  pointer-events: none;
  width: 220px;
  height: 275px;
  overflow: hidden;
  opacity: 0;
  z-index: 800;
  will-change: transform;
}
.hover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ════════════════════════════════════════════════════
   PROJECT DETAIL
   ════════════════════════════════════════════════════ */
.view-project {
  padding-bottom: 15vh;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mid);
  padding: 4vh 12vw;
  transition: color 0.2s;
}
.back-btn:hover {
  color: var(--ink);
}
.back-arrow {
  transition: transform 0.2s;
}
.back-btn:hover .back-arrow {
  transform: translateX(-4px);
}

.project-header {
  padding: 7vh 12vw 6vh;
  position: relative;
}
.project-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12vw;
  right: 12vw;
  height: 1px;
  background: var(--line);
}
.project-cat-tag {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);                          /* the eyebrow spec, sitewide */
  margin-bottom: 14px;
  display: block;
}
.project-title {
  font-family: var(--font-title);
  font-size: clamp(2.8rem, 8vw, 8.5rem);      /* tier-1: the project headline */
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}
.project-subtitle {
  font-size: clamp(0.72rem, 1.1vw, 0.95rem);
  font-weight: 600;
  color: var(--ink-mid);
  margin-top: 8px;
}
.project-meta-row {
  display: flex;
  gap: 2.5rem;
  margin-top: 16px;
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--ink-mid);
  letter-spacing: 0.05em;
}

/* the cover LEADS (the drawing before the essay), then the intro text */
.project-intro-wrap {
  display: block;
  padding: 5vh 12vw 8vh;
  position: relative;
}
.project-intro-cover {
  width: 100%;
  margin-bottom: 8vh;
}
.project-intro-cover .project-cover-img {
  width: auto;                                 /* uncropped: capped by width */
  max-width: 100%;                             /* AND height, aspect intact */
  max-height: 82vh;
}
.project-intro-text {
  width: 50%;
}
.project-intro-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12vw;
  right: 12vw;
  height: 1px;
  background: var(--line);
}
/* drafting motion: GSAP tweens --draw 0→1 (default 1 = drawn) */
.project-header::after,
.project-intro-wrap::after,
.project-nav::before,
.cv-entry::after {
  transform: scaleX(var(--draw, 1));
  transform-origin: left center;
}
.img-fade { transition: opacity 0.5s var(--ease-out); }
.img-fade.img-pending { opacity: 0; }
.project-cover-img {
  width: 100%;
  height: auto;
  display: block;
}

.project-body {
  padding: 1.75vh 12vw 0;
}

.project-intro {
  font-family: var(--font-title);
  font-size: clamp(0.9rem, 1.45vw, 1.15rem);
  font-weight: 400;
  line-height: 1.75;                           /* unified prose leading */
  margin-bottom: 1.1em;                        /* paragraph rhythm, not a section break */
  text-align: justify;
  hyphens: auto;
}
.project-intro:last-child { margin-bottom: 0; }

.project-sec {
  display: block;
  margin-bottom: 2.25vh;
}
.sec-left {
  width: 50%;
  margin-bottom: 8vh;
}
.sec-right {
  width: 75%;
  margin-left: auto;
}

.sec-label {
  grid-column: 1 / -1;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
  display: block;
}

.sec-right {
  min-width: 0;
}

.sec-subtitle {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-bottom: 10px;
  display: block;
}
.sec-caption {                                 /* the section's descriptor, under its title */
  display: block;
  font-family: var(--font-title);
  font-style: italic;
  font-size: clamp(0.85rem, 1.25vw, 1rem);
  color: var(--ink-mid);
  margin: -4px 0 14px;
}
.sec-text {
  font-family: var(--font-title);
  font-size: clamp(0.85rem, 1.34vw, 1.07rem);
  font-weight: 400;
  line-height: 1.68;
  margin-bottom: 3vh;
  text-align: justify;
  hyphens: auto;
}

.img-single {
  margin: 3vh 0;
}
.img-single img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
}

/* ─── Sequential image layout — henn.com style ─── */
.img-seq {
  margin: 3vh 0;
}
.img-seq-block {
  margin-bottom: 8px;
}
.img-seq-block:last-of-type {
  margin-bottom: 0;
}
.img-seq-block--single img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
}
.img-seq-block--pair {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.img-seq-block--pair img {
  display: block;
  cursor: pointer;
  flex: 1 1 0%;                                /* grow = aspect ratio (inline) */
  min-width: 0;
  height: auto;
}
/* (img-seq-caption removed — sequences never render captions) */


.img-gif-wrap {
  margin: 3vh 0;
  max-width: 580px;
}
.img-gif-wrap img {
  width: 100%;
  height: auto;
}

.img-mixed {
  margin: 3vh 0;
}
.img-mixed .gif-row {
  margin-bottom: 3px;
}
.img-mixed .gif-row img {
  width: 100%;
  height: auto;
  display: block;
}
.img-mixed .small-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  align-items: start;
}
.img-mixed .small-row img {
  width: 100%;
  height: auto;
  display: block;
}

/* WIP player */
.wip-player-wrap {
  margin: 4vh 0;
}
.wip-stage {
  position: relative;
  background: #e8e5de;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.wip-frame-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wip-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 11px;
}
.wip-play-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-mid);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 16px;
  transition: border-color 0.2s, color 0.2s;
}
.wip-play-btn:hover,
.wip-play-btn.playing {
  border-color: var(--ink);
  color: var(--ink);
}
.wip-counter {
  font-size: 0.6rem;
  color: var(--ink-mid);
  font-variant-numeric: tabular-nums;
}
.wip-scrubber {
  flex: 1;
  height: 1px;
  background: var(--line);
  position: relative;
  cursor: pointer;
}
.wip-scrubber-fill {
  height: 100%;
  background: var(--ink-mid);
  transition: width 0.12s linear;
}
.wip-source-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  margin: 3vh 0;
}
.wip-source-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

/* Project prev/next nav */
.project-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  margin-top: 10vh;
}
.project-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12vw;
  right: 12vw;
  height: 1px;
  background: var(--line);
}
.pnav-link {
  display: block;
  padding: 4vh 12vw;
  text-decoration: none;
  color: inherit;
  transition: background 0.22s;
}
.pnav-link:first-child {
  border-right: 1px solid var(--line);
}
.pnav-link:hover .pnav-title { color: var(--teal); }
.pnav-label {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 7px;
  display: block;
}
.pnav-title {                                 /* the next project, as an invitation */
  position: relative;
  display: inline-block;
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 2.5vw, 2.3rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}
.pnav-title::after {                           /* hairline drawn on hover, like the menu */
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0.04em;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.4s var(--ease);
}
.pnav-link:hover .pnav-title::after { transform: scaleX(1); transform-origin: left center; }
.pnav-link.next .pnav-title::after { transform-origin: left center; }
.pnav-link.next:hover .pnav-title::after { transform-origin: right center; }
.pnav-link.next {
  text-align: right;
}

/* ════════════════════════════════════════════════════
   PERSONAL
   ════════════════════════════════════════════════════ */
.view-personal {
  padding: 20vh 12vw 14vh;
  max-width: 1240px;
}
.personal-eyebrow {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 3vh;
}

/* portrait left, text right; stacks on small screens */
.personal-layout {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 5vw;
  align-items: start;
}
.personal-photo {
  margin: 0;
  position: relative;
}
.personal-photo img {
  width: 100%;
  height: auto;
  display: block;
  /* the field's language: rests nearly grayscale, hue returns on approach */
  filter: grayscale(0.88);
  transition: filter 0.45s ease;
}
.personal-photo:hover img { filter: grayscale(0); }
.personal-photo-cap {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-top: 10px;
}
.personal-facts {
  border-top: 1px solid var(--line);
  max-width: 580px;
  margin-bottom: 6vh;
}
.pf-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.pf-key {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}
.pf-val {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--ink);
}
.pf-val a {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s;
}
.pf-val a:hover { border-color: var(--teal); }

@media (max-width: 900px) {
  .personal-layout { grid-template-columns: 1fr; gap: 5vh; }
  .personal-photo { max-width: 420px; }
}
.personal-name {
  font-family: var(--font-title);
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);   /* tier-2 page title (shared) */
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.04;                          /* two-line name needs the air */
  margin-bottom: 5vh;
}
.personal-bio {
  font-family: var(--font-title);
  font-size: clamp(0.9rem, 1.45vw, 1.15rem);   /* matches .project-intro */
  font-weight: 400;
  line-height: 1.75;                           /* unified prose leading */
  max-width: 580px;
  margin-bottom: 7vh;
  text-align: justify;
  hyphens: auto;
}
.personal-disciplines {
  border-top: 1px solid var(--line);
  padding-top: 3vh;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.disc-tag {
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  color: var(--ink-mid);
  padding: 5px 13px;
  transition: border-color 0.2s, color 0.2s;
}
.disc-tag:hover {
  border-color: var(--ink-mid);
  color: var(--ink);
}

/* ════════════════════════════════════════════════════
   CONTACT
   ════════════════════════════════════════════════════ */
.view-contact {
  padding: 20vh 12vw 14vh;
}

.contact-eyebrow {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 3vh;
}

.contact-title {
  font-family: var(--font-title);
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);   /* tier-2 page title (shared) */
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.95;
  margin-bottom: 7vh;
}
.contact-title-a,
.contact-title-b {
  display: block;
}
.contact-title-b {
  font-weight: 300;
}
.contact-title-c {
  color: var(--teal);
}

.contact-email {
  display: inline-block;
  font-size: clamp(1.1rem, 2.2vw, 1.8rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  margin-bottom: 10vh;
  text-decoration: none;
  transition: color 0.22s, border-color 0.22s;
}
.contact-email:hover {
  color: var(--ink-mid);
  border-color: var(--ink-mid);
}

.contact-grid {
  border-top: 1px solid var(--line);
  max-width: 640px;
}
.contact-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 22px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.contact-key {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.contact-val {
  font-size: 0.85rem;                          /* matches .pf-val */
  font-weight: 300;
  line-height: 1.2;
  color: var(--ink);
}
.contact-val a {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: border-color 0.2s;
}
.contact-val a:hover {
  border-color: var(--ink);
}

@media (max-width: 600px) {
  .contact-row {
    grid-template-columns: 100px 1fr;
    gap: 14px;
  }
}

/* ════════════════════════════════════════════════════
   CV
   ════════════════════════════════════════════════════ */
.view-cv {
  padding: 20vh 12vw 14vh;
}
.cv-title {
  font-family: var(--font-title);
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);   /* tier-2 page title (shared) */
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.95;
  margin-bottom: 8vh;
}
.cv-title-a,
.cv-title-b {
  display: block;
}
.cv-title-c {
  display: block;
  font-weight: 300;
  color: var(--teal);
}

.cv-list {
  display: flex;
  flex-direction: column;
}
.cv-entry {
  display: grid;
  grid-template-columns: 190px 165px 1fr;
  gap: 26px;
  padding: 24px 0;
  position: relative;
  align-items: start;
}
.cv-entry::after {                             /* the rule — drawn, not bordered */
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--line);
}
.cv-entry:first-child {
  border-top: 1px solid var(--line);
}
.cv-dates {
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.5;
  padding-top: 2px;
}
.cv-company {
  font-size: 0.9rem;
  font-weight: 700;
  display: block;
  letter-spacing: -0.01em;
}
.cv-location {
  font-size: 0.66rem;
  font-weight: 300;
  color: var(--ink-mid);
  display: block;
  margin-top: 3px;
}
.cv-role {
  font-size: 0.66rem;
  font-weight: 400;
  color: var(--ink-mid);
  display: block;
  margin-top: 6px;
  font-style: italic;
}
.cv-tasks-wrap {
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.75;
  text-align: justify;
  hyphens: auto;
}
.cv-task-hi {
  font-weight: 500;
  display: block;
  margin-bottom: 3px;
}

/* CV sections — numbered drawing-set headers, teal like the sheet tags */
.cv-sechead {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 9vh 0 2.5vh;
}
.cv-sechead:first-of-type { margin-top: 0; }
.cv-now { color: var(--teal); font-weight: 500; }

.cv-awards { border-top: 1px solid var(--line); }
.cv-award {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 26px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.cv-award-year {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}
.cv-award-text {
  font-family: var(--font-title);
  font-size: 0.8rem;                           /* matches .cv-tasks-wrap */
  font-weight: 400;
  line-height: 1.75;
  max-width: 640px;
}

.cv-soft { border-top: 1px solid var(--line); max-width: 720px; }
.cv-soft-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 26px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.cv-soft-key {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mid);
}
.cv-soft-val {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.6;
}

@media (max-width: 600px) {
  .cv-award, .cv-soft-row { grid-template-columns: 1fr; gap: 6px; }
}

/* ════════════════════════════════════════════════════
   PROFESSIONAL / ACADEMIC / EXPERIMENTS
   ════════════════════════════════════════════════════ */
/* (view-experiments removed — #experiments routes to the project index) */

/* ════════════════════════════════════════════════════
   PIP ZONE  (project list two-column layout)
   ════════════════════════════════════════════════════ */
.pl-layout {
  display: flex;
  align-items: stretch;
}
.pl-col-list {
  flex: 2;
  min-width: 0;
}
.pl-col-pip {
  flex: 1;
  min-width: 0;
  padding: 0 0 0 5vw;
  position: relative;
  pointer-events: none;
  overflow: visible;
}
#plPipZone {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

/* Windows-style PIP window */
.pip-window {
  position: absolute;
  border: 2px solid var(--ink);
  background: var(--bg);
  pointer-events: all;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.14s ease, transform 0.14s ease;
}
.pip-titlebar {
  background: var(--ink);
  color: var(--bg);
  padding: 4px 6px 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
  cursor: default;
}
.pip-title-text {
  font-family: var(--font);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.pip-controls {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.pip-btn {
  font-family: var(--font);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--bg);
  padding: 1px 4px;
  border: 1px solid rgba(255,255,255,0.3);
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.1s;
}
.pip-btn:hover {
  background: rgba(255,255,255,0.2);
}
.pip-img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
}


/* (filter-eyebrow/-title removed with the experiments view) */

/* ════════════════════════════════════════════════════
   LIGHTBOX
   ════════════════════════════════════════════════════ */
.lightbox {                                    /* a gallery wall in the site's paper */
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
  cursor: pointer;
}
.lightbox::before {                            /* the backdrop fades on its own layer, */
  content: '';                                 /* so the flying image never dims */
  position: absolute;
  inset: 0;
  background: rgba(246, 244, 240, 0.96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.lightbox.lb-open { visibility: visible; pointer-events: all; }
.lightbox.lb-open::before { opacity: 1; }
.lightbox.lb-closing::before { opacity: 0; transition-duration: 0.55s; }
.lightbox-img {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  display: block;
  cursor: default;
  box-shadow: 0 18px 60px rgba(8, 28, 29, 0.18); /* soft teal-black, on paper */
  will-change: transform;
}
.lightbox-close,
.lightbox-nav {
  position: fixed;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--ink-mid);
  cursor: pointer;
  line-height: 1;
  z-index: 9001;
  opacity: 0;
  transition: color 0.18s ease, transform 0.18s ease, opacity 0.3s ease;
}
.lightbox.lb-open .lightbox-close,
.lightbox.lb-open .lightbox-nav { opacity: 1; transition-delay: 0s, 0s, 0.35s; }
.lightbox.lb-closing .lightbox-close,
.lightbox.lb-closing .lightbox-nav { opacity: 0; transition-delay: 0s; }
.lightbox-close { top: 22px; right: 28px; padding: 4px; }
.lightbox-close:hover { color: var(--ink); transform: scale(1.15); }
.lightbox-nav { top: 50%; transform: translateY(-50%); padding: 16px 20px; }
.lightbox-nav:hover { color: var(--teal); }
.lightbox.lb-open .lightbox-nav:disabled { opacity: 0.15; cursor: default; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-nav:hover:not(:disabled) { transform: translateY(-50%) scale(1.15); }

/* ════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  /* the PIP desk is a mouse-hover feature — free its column for the rows */
  .pl-col-pip { display: none; }
  .project-sec {
    grid-template-columns: 1fr;
  }
  .sec-left,
  .sec-right,
  .project-intro-text,
  .project-intro-cover {
    width: 100%;
    margin-left: 0;
  }
  .sec-label {
    grid-column: 1;
  }
  .cv-entry {
    grid-template-columns: 1fr 1fr;
  }
  .cv-tasks-wrap { text-align: left; }         /* a half-width column is too short to justify */
  .project-nav {
    grid-template-columns: 1fr;
  }
  .pnav-link:first-child {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .pnav-link.next {
    text-align: left;
  }
}
@media (max-width: 600px) {
  .img-seq-block--pair {
    flex-direction: column;
  }
  .img-seq-block--pair img {
    flex: none !important;
    width: 100% !important;
    height: auto !important;
  }
  .cv-entry {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  /* a phone-width measure is too short to justify without rivers */
  .project-intro,
  .sec-text,
  .personal-bio {
    text-align: left;
  }
  .project-row {
    grid-template-columns: 65px 1fr;
  }
  .pr-meta {
    display: none;
  }
  .wip-source-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Topbar + hero on small screens ─────────────────── */
@media (max-width: 860px) {
  .topbar-nav { gap: 22px; }
  .topbar-link { letter-spacing: 0.1em; }
}
@media (max-width: 640px) {
  /* the menu button carries navigation; the bar keeps home · contact · menu */
  .topbar-nav { display: none; }
  .topbar-filters { display: none; }
  .topbar-cta { right: 60px; }
  .home-btn { left: 16px; }
  .menu-btn { right: 12px; }
  .hero { padding: 0 8vw 7vh; }
  .hero-logo { transform: scale(1); }
  .hero-scroll-cue { right: 8vw; }
}

/* ── TOUCH CHROME (Navid, Oct 2026: thumbs, not cursors) ────────────
   On EVERY touch device the bar carries only home + menu (the menu holds
   Projects / Personal / CV / Contact). Sized to the cross-checked
   standards: a 56px bar (Material phone app bar) and 56×56 targets —
   above Apple's 44pt, Material's 48dp and WCAG 2.5.5's 44px, and at the
   ~9.5mm one-handed-thumb size from the touch studies. */
@media (pointer: coarse) {
  .topbar { height: 56px; }
  .topbar-nav,
  .topbar-filters,
  .topbar-cta { display: none !important; }
  .home-btn,
  .menu-btn {
    top: 28px;
    min-width: 56px;
    min-height: 56px;
    padding: 0 12px;
    justify-content: center;
  }
  .home-btn { left: 4px; }
  .menu-btn { right: 4px; }
  .mb-s { height: 1.38rem; }
  .mb-chevron { font-size: 1.5rem; }
  .back-btn { padding-top: calc(56px + 3vh); }

  .menu-close-indicator { font-size: 1.5rem; margin-bottom: 16px; }
  .menu-close-indicator::after {                /* a 56px thumb target around the glyph */
    content: '';
    position: absolute;
    left: -18px; top: -16px;
    width: 56px; height: 56px;
  }
  .menu-nav li { padding: 6px 0; }
  .menu-social .menu-link { padding: 8px 0; }
}
/* narrow touch screens (phones, folded foldables): the menu covers it all */
@media (pointer: coarse) and (max-width: 700px) {
  .menu-panel {
    width: 100vw;
    max-width: 100vw;
    border-left: none;
    box-shadow: none;
    padding: 26px 6vw 30px;
  }
  .menu-scrim { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .menu-nav { padding: 28px 0 26px; }
  .menu-nav .menu-link { font-size: 2.6rem; padding-left: 2.6rem; }
  .menu-nav .menu-link:hover { padding-left: 2.6rem; }
  .menu-nav .menu-link::after { left: 2.6rem; }
  .menu-nav .menu-link::before { font-size: 0.7rem; top: 0.7em; }
  .menu-social .menu-link { font-size: 0.95rem; }
}

@media (max-width: 600px) {
  .back-btn { padding-left: 4.5vw; padding-right: 4.5vw; padding-bottom: 3vh; }
  /* home, closer */
  .hero { padding: 0 4.5vw 8vh; }
  .hero-logo { transform: none; }
  .hero-name .vword  { height: 21vw; }
  .hero-name .vslash { height: 17vw; }
  .hero-name-line2 { padding-left: 11vw; }
  .hero-full-name { font-size: 0.8rem; margin-top: 14px; }
  .hero-scroll-cue { right: 4.5vw; }
  .hero-field { padding: 3vh 4.5vw 12vh; gap: 6px; }
  .hf-row { gap: 6px; }

  /* READABILITY (cross-checked: ~16px+ body on mobile web, Apple 17pt
     default body, nothing under ~11–12px; 30–50 ch lines, 1.4–1.6
     leading). Crimson's small x-height reads under its size, so prose
     sits at 17px; labels never under 12px. */
  .project-intro,
  .sec-text,
  .personal-bio,
  .cv-award-text      { font-size: 1.0625rem; line-height: 1.62; }
  .cv-tasks-wrap,
  .cv-task-hi,
  .cv-soft-val        { font-size: 1rem; line-height: 1.6; }
  .ci-sub,
  .sec-caption        { font-size: 1rem; }
  .cv-company         { font-size: 1.0625rem; }
  .pf-val, .contact-val, .contact-val a,
  .personal-layout a  { font-size: 1rem; }
  .ci-year, .ci-meta, .cv-dates, .cv-now, .cv-location, .cv-role,
  .cv-award-year, .project-subtitle, .sec-subtitle,
  .project-meta-row, .hero-full-name  { font-size: 0.8125rem; }
  .project-cat-tag, .sec-label, .back-btn, .pnav-label,
  .cv-sechead, .cv-soft-key, .pf-key, .contact-key,
  .personal-eyebrow, .personal-photo-cap, .contact-eyebrow, .disc-tag,
  .pl-filter-btn, .hero-discipline, .hero-scroll-cue,
  .menu-copy, .menu-copy strong { font-size: 0.75rem; }
  .project-title      { font-size: 2.6rem; }

  /* thumb-sized links (≥44px tall) where text links stood alone */
  .contact-email      { display: inline-block; padding: 12px 0; }
  .contact-val a,
  .pf-val a,
  .personal-layout a  { display: inline-block; padding: 12px 0; }
  .menu-social .menu-link { padding: 13px 0; }

  /* every page shares the phone's closer margin */
  .project-header      { padding: 3vh 4.5vw 5vh; }
  .project-intro-wrap  { padding: 4vh 4.5vw 7vh; }
  .project-body        { padding: 1.75vh 4.5vw 0; }
  .pnav-link           { padding: 4vh 4.5vw; }
  .project-header::after,
  .project-intro-wrap::after,
  .project-nav::before { left: 4.5vw; right: 4.5vw; }
  .view-personal,
  .view-contact,
  .view-cv             { padding: 15vh 4.5vw 12vh; }
}

/* Comfortable touch targets without changing the visual scale */
@media (pointer: coarse) {
  .menu-social li { padding: 6px 0; }
  .pl-filter-btn { padding: 10px 0; }
  .hero-arrow { padding: 18px 14px; }
  /* thumb-sized hit areas (≥44px) without changing how they look */
  .pl-filter-btn { position: relative; }      /* (.topbar-cta is already absolute) */
  .pl-filter-btn::after { content: ''; position: absolute; inset: -6px -10px; }
}

/* ════════════════════════════════════════════════════
   REDUCED MOTION  — WCAG AA (PRODUCT.md)
   Entrances degrade to their final state; nothing moves.
   JS also reads this query to skip GSAP timelines and the intro.
   ════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  /* Reveal targets must not stay invisible if their JS animation is skipped */
  .reveal,
  .char,
  .hero-prefix,
  .hero-full-name,
  .hero-discipline {
    opacity: 1 !important;
    transform: none !important;
  }
  .view-enter,
  .view-exit { animation: none !important; }
  /* The intro overlay is skipped entirely from JS under reduced motion */
}

