/* ============================================================
   Jason Lai — personal site
   Editorial / warm off-white / one accent per identity lens
   ============================================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;1,6..72,300;1,6..72,400;1,6..72,500&family=Geist+Mono:wght@400;500&display=swap');

/* ---------- Tokens ---------- */
:root {
  /* surfaces — clean neutral black & white */
  --bg: #f5f5f3;
  --bg-2: #ececea;
  --surface: #fcfcfb;
  --ink: #161614;
  --ink-soft: #3b3b39;
  --muted: #8a8985;
  --faint: #b9b8b3;
  --hair: #e6e5e1;
  --hair-strong: #d8d7d2;

  /* accent — swapped per lens (the only colour on the page) */
  --accent: #1f1e1c;          /* default: near-black (monochrome) */
  --accent-soft: #e8e7e3;
  --accent-ink: #1f1e1c;

  /* type */
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, 'Roboto', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', monospace;

  /* rhythm */
  --pad: clamp(1.25rem, 5vw, 4rem);
  --maxw: 1180px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.65s;
}

/* mode accent overrides (applied on <html data-mode="…">) */
html[data-mode="professional"] {
  --accent: #2f6080; --accent-soft: #e0eaf0; --accent-ink: #244b64;
}
html[data-mode="creative"] {
  --accent: #a23e5c; --accent-soft: #f3e2e7; --accent-ink: #842f49;
}
html[data-mode="builds"] {
  --accent: #3c7355; --accent-soft: #e0ece4; --accent-ink: #2f5b43;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.6s var(--ease), color 0.6s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(4.5rem, 11vw, 9rem); }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.accent-text { color: var(--accent); transition: color 0.5s var(--ease); }
.serif { font-family: var(--serif); }

/* ---------- Skip link & focus ---------- */
.skip {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 0.6rem 1rem; border-radius: 6px;
}
.skip:focus { left: 1rem; top: 1rem; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: transparent;
  transition: background 0.5s var(--ease);
}
/* seamless dissolve: content fades out under the nav, no hard line */
.nav::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 200%;
  background: linear-gradient(180deg,
    var(--bg) 0%,
    color-mix(in srgb, var(--bg) 80%, transparent) 42%,
    transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 50%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 50%, transparent 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s var(--ease);
  z-index: -1;
}
.nav.scrolled::after { opacity: 1; }
.nav__inner {
  max-width: var(--maxw); margin-inline: auto; padding: 0.95rem var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 1.55rem; line-height: 1; letter-spacing: -0.01em; color: var(--ink);
  display: inline-flex; align-items: baseline;
  transition: color 0.3s var(--ease);
}
.brand:hover { color: var(--accent); }
.brand__slash { color: var(--accent); transition: color 0.5s var(--ease); padding: 0 0.01em; }
.brand em { font-style: italic; }
.nav__links { display: flex; gap: 0.4rem; align-items: baseline; }
.nav__links a {
  font-size: 1.02rem; color: var(--ink-soft);
  padding: 0.3rem 0.2rem 0.5rem; border-radius: 0;
  position: relative; display: inline-flex; align-items: baseline; gap: 0.32rem;
  transition: color 0.25s var(--ease);
}
.nav__links a .navnum {
  font-family: var(--mono); font-size: 0.62rem; font-weight: 400;
  color: var(--faint); position: relative; top: -0.55em; letter-spacing: 0.02em;
  transition: color 0.3s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1.5px; background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__links a[aria-current="page"] { color: var(--ink); }
.nav__links a[aria-current="page"] .navnum { color: var(--accent); }
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }

.nav__toggle { display: none; }

@media (max-width: 720px) {
  .nav__links {
    position: fixed; inset: 0 0 0 auto; width: min(76vw, 320px);
    flex-direction: column; align-items: flex-start; gap: 0.2rem;
    background: var(--surface); padding: 5rem 1.6rem 2rem;
    border-left: 1px solid var(--hair);
    transform: translateX(100%); transition: transform 0.5s var(--ease);
    box-shadow: -20px 0 60px -30px rgba(22,21,18,0.2);
  }
  .nav__links.open { transform: translateX(0); }
  .nav__links a { font-size: 1.1rem; padding: 0.7rem 0.4rem; width: 100%; }
  .nav__links a::after { display: none; }
  .nav__toggle {
    display: inline-flex; flex-direction: column; gap: 5px; padding: 0.5rem; z-index: 110;
  }
  .nav__toggle span {
    width: 22px; height: 1.6px; background: var(--ink); display: block;
    transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
  }
  .nav__toggle.open span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
  .nav__toggle.open span:nth-child(2) { opacity: 0; }
  .nav__toggle.open span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }
}

/* ============================================================
   LENS PILL — fixed, top-center, liquid glass (home only)
   ============================================================ */
.lensbar {
  position: fixed; top: 4.9rem; left: 50%; transform: translateX(-50%);
  z-index: 130;            /* above the nav + its mask so the pill stays crisp */
  opacity: 0; pointer-events: auto;
  animation: lensIn 0.45s var(--ease) 0.05s forwards;
}
@keyframes lensIn {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.modebar {
  display: inline-flex; position: relative;
  border-radius: 999px; padding: 5px; gap: 2px;
  /* liquid glass */
  background: color-mix(in srgb, var(--surface) 52%, transparent);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 1px rgba(0, 0, 0, 0.04),
    0 12px 34px -14px rgba(22, 21, 18, 0.3);
}
.modebar__pill {
  position: absolute; top: 5px; bottom: 5px; left: 5px;
  border-radius: 999px; background: var(--accent);
  box-shadow: 0 2px 8px -2px color-mix(in srgb, var(--accent) 55%, transparent);
  transition: transform 0.55s var(--ease), width 0.55s var(--ease), background 0.5s var(--ease);
  z-index: 0;
}
.modebar button {
  position: relative; z-index: 1;
  font-size: 0.82rem; font-weight: 500;
  padding: 0.5rem 1.05rem; border-radius: 999px;
  color: var(--ink-soft); white-space: nowrap;
  transition: color 0.4s var(--ease), transform 0.2s var(--ease);
}
.modebar button:active { transform: scale(0.96); }
.modebar button[aria-pressed="true"] { color: #fff; }
.nav-open .lensbar { opacity: 0; pointer-events: none; transition: opacity 0.25s var(--ease); }
@media (max-width: 560px) {
  .lensbar { top: 4rem; width: calc(100% - 2rem); }
  .modebar { width: 100%; justify-content: space-between; }
  .modebar button { flex: 1; padding: 0.5rem 0.3rem; font-size: 0.72rem; letter-spacing: -0.01em; }
}
@media (prefers-reduced-motion: reduce) {
  .lensbar { animation: none; opacity: 1; pointer-events: auto; transform: translateX(-50%); }
}

/* ============================================================
   HOME — the statement
   ============================================================ */
.hero {
  min-height: min(calc(88dvh - 60px), 720px);
  display: flex; flex-direction: column; justify-content: center;
  padding-block: clamp(3rem, 8vw, 5rem) clamp(1rem, 3vw, 2rem);
  position: relative;
}
/* tighten the gap between hero and the first section */
.hero + .section { padding-top: clamp(1.75rem, 4.5vw, 3rem); }
.hero__top {
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  margin-bottom: clamp(2rem, 6vw, 3.5rem);
}
.hero__statement {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 8vw, 6.2rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 16ch;
  margin: 0;
}
.hero__statement em { font-style: italic; color: var(--accent); transition: color 0.5s var(--ease); }
.hero__greeting { display: block; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.hero__line-wrap { display: block; overflow: hidden; transition: height 0.55s var(--ease); will-change: height; }
.hero__line { display: block; }

/* swipe stage: active region eases out (up), new content eases in (from below) */
.swap {
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  will-change: opacity, transform;
  backface-visibility: hidden;
}
.swap.is-out {
  opacity: 0;
  transform: none;             /* fade out in place — no upward jerk */
  transition-duration: 0.26s;
}
.swap.is-in-start {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition: none;            /* snap to start, then animate to rest */
}

.hero__sub {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--ink-soft); max-width: 46ch; margin-top: 1.6rem; line-height: 1.5;
}
.hero__cue {
  margin-top: clamp(2.5rem, 7vw, 4rem);
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
  display: inline-flex; align-items: center; gap: 0.6rem;
}

/* word-by-word load reveal */
.reveal-words span {
  display: inline-block;
  opacity: 0; transform: translateY(0.5em);
  animation: wordUp 0.8s var(--ease) forwards;
  animation-delay: calc(var(--i) * 70ms + 120ms);
}
@keyframes wordUp { to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   NOW STRIP
   ============================================================ */
.now {
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
}
.now__grid {
  display: grid; gap: 0; grid-template-columns: repeat(3, 1fr);
}
.now__cell {
  padding: clamp(1.6rem, 4vw, 2.6rem) clamp(1rem, 3vw, 2rem);
  border-left: 1px solid var(--hair);
}
.now__cell:first-child { border-left: none; }
.now__label {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.7rem;
}
.now__val { font-size: 1.02rem; color: var(--ink); line-height: 1.4; }
.now__val .blink { color: var(--accent); }
@media (max-width: 640px) {
  .now__grid { grid-template-columns: 1fr; }
  .now__cell { border-left: none; border-top: 1px solid var(--hair); }
  .now__cell:first-child { border-top: none; }
}

/* ============================================================
   SELECTED WORK PREVIEW
   ============================================================ */
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: clamp(2rem, 5vw, 3.2rem); flex-wrap: wrap;
}
.sec-head h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: -0.02em; margin: 0;
}
.sec-head h2 em { font-style: italic; color: var(--accent); }
.linkmore {
  font-size: 0.85rem; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 0.4rem;
}
.linkmore .arw { transition: transform 0.3s var(--ease); }
.linkmore:hover .arw { transform: translateX(4px); }
.linkmore:hover { color: var(--accent); }

/* numbered editorial work blocks */
.swork { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3rem); }
.swork__item {
  display: block; padding-top: 1.05rem; border-top: 1.5px solid var(--ink);
  position: relative;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.swork__item:hover { border-top-color: var(--accent); transform: translateY(-3px); }
.swork__item:active { transform: translateY(-1px); }
.swork__item:hover .swork__num { letter-spacing: 0.08em; }
.swork__title {
  font-size: clamp(1.12rem, 2.1vw, 1.35rem); font-weight: 500; letter-spacing: -0.02em;
  margin: 0 0 0.85rem; line-height: 1.18;
  display: flex; align-items: baseline; gap: 0.55rem;
}
.swork__num {
  font-family: var(--mono); font-size: 0.78rem; font-weight: 400; color: var(--accent);
  letter-spacing: 0.02em; flex: none; transition: color 0.5s var(--ease);
}
.swork__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.swork__list li {
  color: var(--ink-soft); font-size: 0.93rem; line-height: 1.4;
  padding-left: 1.1rem; position: relative;
}
.swork__list li::before {
  content: ""; position: absolute; left: 0; top: 0.52em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); transition: background 0.5s var(--ease);
}
@media (max-width: 720px) {
  .swork { grid-template-columns: 1fr; gap: 2rem; }
}

/* ============================================================
   PERSONAL READ
   ============================================================ */
.read { background: var(--bg-2); border-top: 1px solid var(--hair); }
.read__copy {
  max-width: 36ch; margin-inline: auto; text-align: center;
}
.read__copy p {
  font-family: var(--serif); font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  line-height: 1.5; color: var(--ink); margin: 0 auto;
}
.read__sig { font-family: var(--serif); font-style: italic; font-size: 1.35rem; margin-top: 1.6rem; color: var(--faint); transition: color 0.5s var(--ease); }
.read__sig.lit { color: var(--ink-soft); }
/* scroll-driven word fill */
.read__fill .rw { color: var(--faint); transition: color 0.45s var(--ease); }
.read__fill .rw.lit { color: var(--ink); }

/* ============================================================
   FLOATING FOOTER — sits on top while scrolling (benarata-style)
   ============================================================ */
.sitefoot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 88;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 var(--pad) 1.1rem; pointer-events: none;
}
.sitefoot__credit, .sitefoot__time { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.01em; }
.sitefoot__credit a { pointer-events: auto; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--faint); }
.sitefoot__credit a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.sitefoot__time { font-family: var(--mono); font-size: 0.7rem; text-align: right; }
.sitefoot__time .clock { color: var(--ink-soft); }
.sitefoot__mark {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 0.7rem;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 1.45rem; line-height: 1; color: var(--ink); pointer-events: auto;
  letter-spacing: -0.01em;
}
.sitefoot__mark:hover { color: var(--accent); }
@media (max-width: 560px) {
  .sitefoot__mark { display: none; }
  .sitefoot { padding-bottom: 0.9rem; }
  .sitefoot__credit, .sitefoot__time { font-size: 0.66rem; }
}
/* keep page content clear of the floating footer */
.has-floatfoot { padding-bottom: 4.5rem; }

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .reveal-words span { opacity: 1 !important; transform: none !important; animation: none !important; }
  .swap__layer { transition: opacity 0.2s linear !important; }
  *, *::before, *::after { animation-duration: 0.001ms !important; }
}

/* ============================================================
   PAGE HEADER (sub-pages)
   ============================================================ */
.phead { padding-top: clamp(3.5rem, 8vw, 6rem); padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.phead h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 4.6rem); letter-spacing: -0.025em; line-height: 1.02; margin: 0.4rem 0 0;
}
.phead h1 em { font-style: italic; color: var(--accent); }
.phead p { color: var(--ink-soft); font-size: clamp(1.02rem, 2vw, 1.18rem); max-width: 50ch; margin-top: 1.2rem; }

/* ============================================================
   ABOUT — journey (shared between variant A & B)
   ============================================================ */
.journey {
  position: relative;
  padding-block: clamp(2rem, 6vw, 4rem) clamp(4rem, 10vw, 8rem);
}
.journey__svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; overflow: visible;
}
.journey__line {
  fill: none; stroke: var(--hair-strong); stroke-width: 2; stroke-linecap: round;
}
.journey__draw {
  fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round;
  transition: stroke 0.5s var(--ease);
}
.journey__node {
  fill: var(--bg); stroke: var(--accent); stroke-width: 2.5;
  transition: stroke 0.5s var(--ease);
}
.journey__node.lit { fill: var(--accent); }
.journey__traveler {
  fill: var(--accent); stroke: var(--bg); stroke-width: 3;
  filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--accent) 40%, transparent));
  transition: fill 0.5s var(--ease);
}

.milestone {
  position: absolute; width: min(40%, 360px);
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.milestone.in { opacity: 1; transform: none; }
.milestone__card {
  background: var(--surface); border: 1px solid var(--hair);
  border-radius: 12px; padding: 1.3rem 1.4rem;
}
.milestone__year {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em;
  color: var(--accent); transition: color 0.5s var(--ease);
}
.milestone__role { font-size: 1.08rem; font-weight: 500; margin: 0.35rem 0 0.1rem; }
.milestone__place { font-family: var(--serif); font-style: italic; color: var(--ink-soft); font-size: 1.02rem; }
.milestone__desc { color: var(--muted); font-size: 0.9rem; margin-top: 0.6rem; line-height: 1.5; }
.milestone.side-left { text-align: right; }
.milestone.side-left .milestone__card { text-align: left; }

/* the thread label (content creator running throughout) */
.journey__thread {
  position: absolute; left: 50%; transform: translateX(-50%) rotate(-90deg);
  transform-origin: center; top: 38%;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--faint); white-space: nowrap;
}

@media (max-width: 760px) {
  .milestone { width: calc(100% - 56px); left: 44px !important; text-align: left !important; }
  .milestone.side-left { text-align: left; }
  .milestone.side-left .milestone__card { text-align: left; }
  .journey__thread { display: none; }
}

/* dev pill */
.devpill {
  position: fixed; right: 14px; bottom: 3.4rem; z-index: 120;
  display: inline-flex; align-items: center; gap: 0; padding: 4px;
  background: #1b1916; border: 1px dashed #5b574e; border-radius: 8px;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.04em;
}
.devpill__label { color: #b6b2a8; padding: 0 0.5rem 0 0.4rem; text-transform: uppercase; }
.devpill button {
  color: #b6b2a8; padding: 0.3rem 0.6rem; border-radius: 5px; font-family: var(--mono); font-size: 0.66rem;
}
.devpill button[aria-pressed="true"] { background: #f6f4ef; color: #1b1916; }

/* about intro lead + prose */
.about-lead {
  font-size: clamp(1.5rem, 3.2vw, 2.3rem); line-height: 1.32;
  max-width: 30ch; color: var(--ink); margin: 0; letter-spacing: -0.015em;
  font-family: var(--serif);
}
.about-lead em { font-style: italic; color: var(--accent); }
.about-prose {
  margin-top: clamp(1.6rem, 4vw, 2.4rem);
  max-width: 68ch;
}
.about-prose p {
  color: var(--ink-soft); font-size: clamp(1.08rem, 1.5vw, 1.22rem); line-height: 1.7; margin: 0 0 1.2rem;
}
.about-prose p:last-child { margin-bottom: 0; }
.about-prose em { font-style: italic; color: var(--accent); }
.about-prose p:last-child { margin-bottom: 0; }

/* ============================================================
   WORK
   ============================================================ */
.filterbar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.filterbar button {
  font-size: 0.86rem; font-weight: 500; padding: 0.55rem 1.1rem;
  border: 1px solid var(--hair-strong); border-radius: 999px; color: var(--ink-soft);
  background: var(--surface); transition: all 0.3s var(--ease);
}
.filterbar button:hover { border-color: var(--accent); color: var(--ink); }
.filterbar button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.work-group { display: none; }
.work-group.active { display: block; animation: fadeUp 0.6s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* experience entries (professional) */
.xp { display: grid; gap: 0; }
.xp__item {
  display: grid; grid-template-columns: 180px 1fr; gap: clamp(1rem, 4vw, 3rem);
  padding-block: clamp(1.8rem, 4vw, 2.6rem); border-top: 1px solid var(--hair);
}
.xp__item:last-child { border-bottom: 1px solid var(--hair); }
.xp__meta .when { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); letter-spacing: 0.04em; }
.xp__meta .org { font-family: var(--serif); font-size: 1.25rem; margin-top: 0.4rem; }
.xp__role { font-size: 0.84rem; color: var(--accent); font-weight: 500; margin-bottom: 0.7rem; transition: color 0.5s var(--ease); }
.xp__desc { color: var(--ink-soft); max-width: 60ch; }
.xp__highlight {
  margin-top: 1rem; padding-left: 1rem; border-left: 2px solid var(--accent);
  font-family: var(--serif); font-size: 1.08rem; font-style: italic; color: var(--ink);
  transition: border-color 0.5s var(--ease);
}
@media (max-width: 640px) { .xp__item { grid-template-columns: 1fr; gap: 0.8rem; } }

/* creative services */
.svc-grid { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--hair); border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; }
@media (min-width: 720px) { .svc-grid { grid-template-columns: 1fr 1fr; } .svc-grid > :first-child { grid-column: 1 / -1; } }
.svc {
  background: var(--surface); padding: clamp(1.6rem, 4vw, 2.4rem);
  transition: background 0.3s var(--ease); position: relative; overflow: hidden;
}
.svc:hover { background: var(--bg-2); }
.svc__num { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); }
.svc h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.3rem, 3vw, 1.8rem); margin: 0.6rem 0 0.5rem; }
.svc p { color: var(--muted); margin: 0; max-width: 46ch; }
.svc__tags { margin-top: 1rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.svc__tags span {
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent-soft); padding: 0.25rem 0.55rem; border-radius: 999px;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}

/* builds grid */
.builds-grid { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
@media (min-width: 640px) { .builds-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .builds-grid { grid-template-columns: 1fr 1fr 1fr; } }
.build {
  display: block; background: var(--surface); border: 1px solid var(--hair);
  border-radius: 14px; overflow: hidden; transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.build:hover { transform: translateY(-4px); border-color: var(--hair-strong); box-shadow: 0 18px 40px -24px rgba(22, 21, 18, 0.22); }
.build:active { transform: translateY(-1px); }
.build__thumb {
  aspect-ratio: 16/10; position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--accent-soft), var(--bg-2));
  display: grid; place-items: center;
}
.build__thumb span {
  font-family: var(--serif); font-style: italic; font-size: 2.4rem; color: var(--accent);
  opacity: 0.55; transition: transform 0.5s var(--ease), color 0.5s var(--ease);
}
.build:hover .build__thumb span { transform: scale(1.08); }
.build__body { padding: 1.2rem 1.3rem 1.4rem; }
.build__body h3 { margin: 0 0 0.3rem; font-size: 1.06rem; font-weight: 500; display: flex; align-items: center; gap: 0.5rem; }
.build__body h3 .arw { color: var(--accent); transition: transform 0.3s var(--ease); }
.build:hover h3 .arw { transform: translate(3px, -3px); }
.build__body p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.build__stack { margin-top: 0.9rem; font-family: var(--mono); font-size: 0.68rem; color: var(--faint); letter-spacing: 0.03em; }
.build__soon {
  position: absolute; top: 0.7rem; right: 0.7rem; font-family: var(--mono); font-size: 0.6rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft);
  background: color-mix(in srgb, var(--bg) 80%, transparent); border: 1px solid var(--hair);
  padding: 0.25rem 0.5rem; border-radius: 999px;
}

.build__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s var(--ease); }
.build:hover .build__img { transform: scale(1.04); }
.proj-media__img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* card tag (work grid) — override the big serif .build__thumb span */
.build__thumb span.build__tag {
  position: absolute; top: 0.7rem; left: 0.7rem;
  font-family: var(--mono); font-style: normal; font-size: 0.6rem; letter-spacing: 0.08em;
  text-transform: uppercase; opacity: 1;
  color: var(--ink-soft); background: color-mix(in srgb, var(--bg) 82%, transparent);
  border: 1px solid var(--hair); padding: 0.25rem 0.5rem; border-radius: 999px;
}
.build:hover .build__thumb span.build__tag { transform: none; }

/* ============================================================
   PROJECT DETAIL (sub-page)
   ============================================================ */
.project { max-width: 760px; padding-top: clamp(2rem, 5vw, 3.5rem); }
.proj-back {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); transition: color 0.3s var(--ease);
}
.proj-back:hover { color: var(--accent); }
.proj-back__arw { display: inline-block; transition: transform 0.3s var(--ease); }
.proj-back:hover .proj-back__arw { transform: translateX(-4px); }
.proj-head { margin-top: clamp(1.5rem, 4vw, 2.4rem); }
.proj-title {
  font-family: var(--serif); font-weight: 400; letter-spacing: -0.025em; line-height: 1.05;
  font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0.5rem 0 0;
}
.proj-meta { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; margin-top: 0.7rem; letter-spacing: 0.02em; }
.proj-media {
  margin: clamp(2rem, 5vw, 3rem) 0; aspect-ratio: 16/9; border-radius: 14px;
  border: 1px solid var(--hair); background: linear-gradient(150deg, var(--accent-soft), var(--bg-2));
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.proj-media__mark { font-family: var(--serif); font-style: italic; font-size: clamp(3rem, 9vw, 5rem); color: var(--accent); opacity: 0.5; }
.proj-media__note { position: absolute; bottom: 0.9rem; right: 1rem; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.proj-body p { font-size: 1.08rem; line-height: 1.7; color: var(--ink-soft); margin: 0 0 1.2rem; max-width: 64ch; }
.proj-back--bottom { margin-top: 1.6rem; }

/* ============================================================
   MEDIA / INTERESTS
   ============================================================ */
.bento { display: grid; gap: 1.1rem; grid-template-columns: repeat(6, 1fr); }
.tile {
  border: 1px solid var(--hair); border-radius: 14px; background: var(--surface);
  padding: clamp(1.3rem, 3vw, 1.9rem); grid-column: span 6;
  transition: background 0.3s var(--ease), transform 0.4s var(--ease);
  position: relative; overflow: hidden;
}
.tile:hover { background: var(--bg-2); }
.tile__kicker { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.tile h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.3rem, 3vw, 1.9rem); margin: 0.5rem 0 0.9rem; }
.tile h3 em { font-style: italic; color: var(--accent); }
@media (min-width: 720px) {
  .tile.col-3 { grid-column: span 3; }
  .tile.col-2 { grid-column: span 2; }
  .tile.col-4 { grid-column: span 4; }
}
/* list of taste items */
.taste { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.taste li {
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  padding: 0.7rem 0; border-top: 1px solid var(--hair);
}
.taste li:first-child { border-top: none; }
.taste .t-name { color: var(--ink); }
.taste .t-name em { font-family: var(--serif); font-style: italic; }
.taste .t-meta { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); white-space: nowrap; }
/* poster row */
.posters { display: flex; gap: 0.8rem; overflow-x: auto; padding-bottom: 0.4rem; scrollbar-width: thin; }
.poster {
  flex: 0 0 auto; width: 120px; aspect-ratio: 2/3; border-radius: 8px; border: 1px solid var(--hair);
  background: linear-gradient(160deg, var(--accent-soft), var(--bg-2));
  display: grid; place-items: end; padding: 0.7rem; transition: transform 0.4s var(--ease);
}
.poster:hover { transform: translateY(-4px) rotate(-1deg); }
.poster span { font-family: var(--serif); font-style: italic; font-size: 0.92rem; color: var(--ink-soft); line-height: 1.2; }
/* now-playing marquee */
.marquee { overflow: hidden; white-space: nowrap; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__row { display: inline-flex; gap: 2.5rem; animation: scrollx 26s linear infinite; }
.marquee__row span { font-family: var(--serif); font-size: 1.4rem; color: var(--ink-soft); }
.marquee__row span em { font-style: italic; color: var(--accent); }
@keyframes scrollx { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__row { animation: none; } }

/* ============================================================
   FOUC GUARD — hide hero text until correct lens is rendered
   ============================================================ */
/* home hero entrance — staggered rise-in (matches the Media-page feel) */
.hin { opacity: 0; transform: translateY(20px); }
@media (prefers-reduced-motion: reduce) { .hin { opacity: 1; transform: none; } }

/* ============================================================
   LENIS smooth scroll support
   ============================================================ */
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; }

/* home lens transition — fade (must win over .reveal.in on the work grid).
   The spatial "shift" comes from the animated .hero__line-wrap height. */
.swap { transition: opacity 0.42s var(--ease), transform 0.45s var(--ease); will-change: opacity, transform; }
.swap.fade { opacity: 0; }
#statement-line.fade { transform: translateY(10px); }

/* ============================================================
   MEDIA — variant switching + modules
   ============================================================ */
.media .mediavar { display: none; }
html[data-media="A"] .mediavar[data-var="A"],
html[data-media="B"] .mediavar[data-var="B"],
html[data-media="C"] .mediavar[data-var="C"] { display: block; }

.mod-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.mod-kicker { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.mod-hint { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.03em; color: var(--faint); }
.mod-2col { display: grid; grid-template-columns: 1fr; gap: clamp(2.2rem, 5vw, 3.5rem); padding-block: clamp(2rem, 5vw, 3.5rem); }
@media (min-width: 860px) { .mod-2col { grid-template-columns: 1fr 1fr; align-items: start; } }

/* --- cover-flow --- */
.cf__stage {
  position: relative; height: clamp(230px, 38vw, 340px);
  perspective: 1200px; display: flex; align-items: center; justify-content: center;
  cursor: grab; touch-action: pan-y; outline: none;
}
.cf__stage:active { cursor: grabbing; }
.cf__card {
  position: absolute; width: clamp(170px, 24vw, 250px); aspect-ratio: 1;
  border-radius: 10px; overflow: hidden; border: 1px solid var(--hair);
  transition: transform 0.55s var(--ease), opacity 0.4s var(--ease), box-shadow 0.4s var(--ease);
  box-shadow: 0 18px 40px -22px rgba(22, 21, 18, 0.45); background: var(--bg-2);
  will-change: transform;
}
.cf__card img { width: 100%; height: 100%; object-fit: cover; }
.cf__card.is-active { box-shadow: 0 28px 60px -22px rgba(22, 21, 18, 0.55); }
.cf__meta { text-align: center; margin-top: 1.3rem; display: flex; flex-direction: column; gap: 0.15rem; }
.cf__title { font-family: var(--serif); font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
.cf__artist { color: var(--muted); font-size: 0.92rem; }
.cf__dots { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1rem; }
.cf__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hair-strong); transition: 0.3s var(--ease); }
.cf__dot[aria-current="true"] { background: var(--accent); transform: scale(1.3); }

/* --- vinyl --- */
.vinyl { display: flex; gap: clamp(1.2rem, 3vw, 2rem); align-items: center; }
.vinyl__deck { position: relative; width: clamp(150px, 32vw, 200px); aspect-ratio: 1; flex: none; }
.vinyl__disc {
  position: absolute; inset: 0; border-radius: 50%;
  background: repeating-radial-gradient(circle at center, #181715 0 2px, #232320 2px 3.5px);
  box-shadow: 0 16px 36px -16px rgba(22, 21, 18, 0.65), inset 0 0 0 1px rgba(255,255,255,0.04);
  display: grid; place-items: center;
}
.vinyl__disc.spin { animation: vspin 4s linear infinite; }
@keyframes vspin { to { transform: rotate(360deg); } }
.vinyl__label { position: relative; width: 40%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 3px solid #0c0c0b; }
.vinyl__label img { width: 100%; height: 100%; object-fit: cover; }
.vinyl__label::after { content: ""; position: absolute; inset: 0; margin: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 2px rgba(0,0,0,0.3); }
.vinyl__arm {
  position: absolute; top: 8%; right: 7%; width: 48%; height: 5px;
  background: linear-gradient(90deg, #c9c7c2, #8f8d88); border-radius: 4px;
  transform-origin: right center; transform: rotate(30deg); transition: transform 0.5s var(--ease);
  box-shadow: 0 2px 5px rgba(0,0,0,0.25);
}
.vinyl__deck.lifted .vinyl__arm { transform: rotate(19deg); }
.vinyl__arm::after { content: ""; position: absolute; right: -5px; top: -4px; width: 13px; height: 13px; border-radius: 50%; background: #b9b7b2; }
.vinyl__info { display: flex; flex-direction: column; gap: 0.22rem; }
.vinyl__np { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.vinyl__track { font-family: var(--serif); font-size: clamp(1.3rem, 3vw, 1.7rem); line-height: 1.1; }
.vinyl__artist { color: var(--ink-soft); }
.vinyl__btn { margin-top: 0.7rem; display: inline-flex; align-items: center; gap: 0.5rem; align-self: flex-start; border: 1px solid var(--hair-strong); border-radius: 999px; padding: 0.42rem 0.95rem; font-size: 0.82rem; color: var(--ink-soft); transition: 0.3s var(--ease); }
.vinyl__btn:hover { border-color: var(--accent); color: var(--ink); }
.vinyl__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.vinyl__bars i { width: 2.5px; background: var(--accent); height: 35%; border-radius: 2px; transition: background 0.5s var(--ease); }
.vinyl__bars.on i { animation: veq 0.9s ease-in-out infinite; }
.vinyl__bars.on i:nth-child(2) { animation-delay: 0.18s; }
.vinyl__bars.on i:nth-child(3) { animation-delay: 0.36s; }
.vinyl__bars.on i:nth-child(4) { animation-delay: 0.12s; }
@keyframes veq { 0%, 100% { height: 28%; } 50% { height: 100%; } }

/* --- book-spine shelf (3D) --- */
.shelf { display: flex; gap: 7px; align-items: flex-end; padding: 2.6rem 0 1rem; perspective: 1100px; min-height: 240px; }
.book { width: 38px; height: 190px; flex: none; perspective: 900px; cursor: pointer; outline: none; }
.book3d {
  position: relative; width: 140px; height: 190px; transform-style: preserve-3d;
  transition: transform 0.6s var(--ease); transform-origin: left center;
  transform: rotateY(-80deg);
}
.book:hover .book3d, .book:focus-visible .book3d { transform: rotateY(-10deg) translateY(-20px); }
.book:hover, .book:focus-visible { z-index: 6; }
.book__cover, .book__spine { position: absolute; top: 0; left: 0; height: 190px; }
.book__cover {
  width: 140px; border-radius: 2px 5px 5px 2px; backface-visibility: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--bc) 78%, #fff), var(--bc));
  padding: 1.1rem 1rem; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}
.book__ct { color: #fff; font-weight: 500; font-size: 0.92rem; line-height: 1.18; }
.book__ca { color: rgba(255,255,255,0.72); font-size: 0.7rem; }
.book__spine {
  width: 38px; border-radius: 2px; background: var(--bc); transform-origin: left center; transform: rotateY(90deg);
  display: flex; align-items: center; justify-content: center; box-shadow: inset -7px 0 12px rgba(0,0,0,0.3);
}
.book__spine span { writing-mode: vertical-rl; transform: rotate(180deg); color: #fff; font-size: 0.74rem; letter-spacing: 0.02em; white-space: nowrap; max-height: 168px; overflow: hidden; }

/* --- film drag-wall --- */
.wall { display: flex; overflow-x: auto; padding: 0.5rem 0 1.5rem; scrollbar-width: none; cursor: grab; }
.wall::-webkit-scrollbar { display: none; }
.wall.grabbing { cursor: grabbing; }
.wall__track { display: flex; gap: 1rem; }
.poster3 {
  position: relative; flex: none; width: clamp(150px, 20vw, 188px); aspect-ratio: 2/3;
  border-radius: 10px; overflow: hidden; border: 1px solid var(--hair);
  transition: transform 0.25s var(--ease), box-shadow 0.3s var(--ease);
  box-shadow: 0 14px 30px -20px rgba(22, 21, 18, 0.45); background: var(--bg-2);
}
.poster3 img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.poster3__info { position: absolute; inset: auto 0 0 0; padding: 0.85rem; background: linear-gradient(transparent, rgba(14,13,11,0.85)); color: #fff; display: flex; flex-direction: column; gap: 0.12rem; opacity: 0; transition: opacity 0.3s var(--ease); }
.poster3:hover .poster3__info { opacity: 1; }
.poster3__t { font-size: 0.9rem; font-weight: 500; }
.poster3__m { font-size: 0.72rem; color: rgba(255,255,255,0.78); font-family: var(--mono); }
.poster3__r { color: #fff; letter-spacing: 0.04em; }

/* --- variant B --- */
.spotify { border-radius: 14px; border: 1px solid var(--hair); width: 100%; min-height: 420px; }
.fcards { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2.5vw, 1.4rem); }
@media (min-width: 680px) { .fcards { grid-template-columns: repeat(4, 1fr); } }
.fcard img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 8px; border: 1px solid var(--hair); transition: transform 0.35s var(--ease); }
.fcard:hover img { transform: translateY(-4px); }
.fcard__b { display: flex; flex-direction: column; gap: 0.1rem; margin-top: 0.6rem; }
.fcard__t { font-size: 0.9rem; font-weight: 500; }
.fcard__m { font-size: 0.72rem; color: var(--muted); font-family: var(--mono); }
.fcard__r { color: var(--accent); font-size: 0.82rem; letter-spacing: 0.04em; }
.bcards { display: grid; gap: 1.1rem; }
.bcard { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 1rem; align-items: center; }
.bcard__cv { grid-row: 1 / 3; width: 48px; height: 68px; border-radius: 2px 4px 4px 2px; background: linear-gradient(135deg, color-mix(in srgb, var(--bc) 78%, #fff), var(--bc)); display: grid; place-items: center; padding: 0.3rem; box-shadow: 0 8px 18px -10px rgba(22,21,18,0.5); }
.bcard__cv span { color: #fff; font-size: 0.5rem; line-height: 1.12; text-align: center; }
.bcard__t { font-weight: 500; align-self: end; }
.bcard__a { color: var(--muted); font-size: 0.85rem; align-self: start; }

/* --- variant C --- */
.ring { width: 100%; height: clamp(320px, 46vw, 470px); touch-action: pan-y; }
.ring canvas { display: block; }
.ring__cap { text-align: center; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-top: 0.4rem; }
.strip { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip__p { flex: none; width: clamp(130px, 18vw, 158px); aspect-ratio: 2/3; border-radius: 8px; overflow: hidden; border: 1px solid var(--hair); }
.strip__p img { width: 100%; height: 100%; object-fit: cover; }

@media (prefers-reduced-motion: reduce) {
  .vinyl__disc.spin { animation: none; }
  .vinyl__bars.on i { animation: none; }
}
