/* =========================================================
   Yuliia Panova — portfolio
   Palette: ink · paper  +  ultramarine & yellow as ACCENTS only
   ========================================================= */
:root {
  --ink: #0D0D0F;
  --ink-2: #151519;
  --ink-3: #1D1D23;
  --paper: #F3EFE7;
  --paper-2: #E8E2D6;
  --blue: #3D3BFF;
  --blue-deep: #2321C9;
  --yellow: #FFE500;
  --muted: rgba(243, 239, 231, .62);
  --muted-dark: rgba(13, 13, 15, .6);
  --line: rgba(243, 239, 231, .14);
  --line-dark: rgba(13, 13, 15, .13);

  --f-sans: 'Inter Tight', system-ui, sans-serif;
  --f-serif: 'Instrument Serif', Georgia, serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font-family: var(--f-sans); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1520px; margin: 0 auto; padding-inline: var(--gutter); }
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.label { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.4; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 10px; vertical-align: 1px; }
.dot--y { background: var(--yellow); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 229, 0, .6); } 70% { box-shadow: 0 0 0 10px rgba(255, 229, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 229, 0, 0); } }
.ulink { background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size .5s var(--ease); }
.ulink:hover { background-size: 0 1px; background-position: 100% 100%; }

/* brush trail canvas */
.brush-trail { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 65; pointer-events: none; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; isolation: isolate;
  transition: color .4s var(--ease), border-color .4s var(--ease);
}
.btn::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; transform: translateY(101%); transition: transform .5s var(--ease); }
.btn:hover::before { transform: translateY(0); }
.btn--y { background: var(--yellow); color: var(--ink); }
.btn--y::before { background: var(--paper); }
.btn--ghost { border: 1px solid var(--line); color: var(--paper); background: rgba(13,13,15,.3); backdrop-filter: blur(8px); }
.btn--ghost::before { background: var(--paper); }
.btn--ghost:hover { color: var(--ink); }
.btn--line { border: 1px solid var(--line); }
.btn--line::before { background: var(--paper); }
.btn--line:hover { color: var(--ink); }
.arr { display: inline-block; transition: transform .4s var(--ease); }
.btn:hover .arr { transform: translate(2px, -2px); }

/* ---------- Loader ---------- */

/* ---------- Grain / progress / cursor ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(4) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 80; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--blue); transform-origin: left; transform: scaleX(0); }

.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; position: fixed; top: 0; left: 0; z-index: 95; pointer-events: none; mix-blend-mode: difference; }
  .cursor__dot { position: fixed; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; }
  .cursor__ring { position: fixed; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 1px solid rgba(255,255,255,.6); display: grid; place-items: center; transition: width .4s var(--ease), height .4s var(--ease), margin .4s var(--ease), background .4s var(--ease); }
  .cursor__label { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #000; opacity: 0; transition: opacity .3s; }
  .cursor.is-link .cursor__ring { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
  .cursor.is-label .cursor__ring { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: #fff; }
  .cursor.is-label .cursor__label { opacity: 1; }
  .cursor.is-label .cursor__dot { opacity: 0; }
  .cursor.is-hidden { opacity: 0; }
}

/* ---------- Nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 70; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(24px, 2.4vw, 36px) var(--gutter) 18px; transition: transform .6s var(--ease); mix-blend-mode: difference; color: #fff; }
.nav.is-hidden { transform: translateY(-110%); }
.nav__logo { font-weight: 900; font-size: 22px; letter-spacing: -.04em; display: inline-block; }
.nav__links { display: flex; gap: 32px; font-size: 15px; font-weight: 500; }
.nav__links a { position: relative; }
.nav__links a::after { content: ''; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__status { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 9px 16px; }
.nav__status i { width: 7px; height: 7px; border-radius: 50%; background: #00ff6a; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; background: var(--ink); }
.hero__paint { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__inner { position: relative; z-index: 2; padding-top: 120px; padding-bottom: clamp(28px, 4vw, 48px); }
.hero__kicker { color: var(--muted); margin: 0 0 22px; }
.hero__title { margin: 0; font-weight: 900; font-size: clamp(54px, min(9.6vw, 17vh), 172px); line-height: .9; letter-spacing: -.055em; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero__title .line > span { display: inline-block; }
.hero__title em { font-size: 1.12em; color: var(--yellow); letter-spacing: -.02em; padding-right: .08em; }
.hero__bottom { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 48px; margin-top: clamp(24px, 3vw, 40px); }
.hero__sub { margin: 0; max-width: 560px; font-size: clamp(17px, 1.4vw, 21px); color: var(--muted); }
.hero__sub b { color: var(--paper); font-weight: 600; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__facts { list-style: none; padding: 22px 0 0; margin: clamp(28px, 4vw, 48px) 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 500; }
.hero__facts .label { display: block; color: var(--muted); margin-bottom: 6px; font-size: 11px; }
.hero__peek { position: absolute; z-index: 3; right: var(--gutter); top: 92px; width: clamp(200px, 17vw, 290px); padding: 10px; border-radius: 14px; background: rgba(21, 21, 25, .7); border: 1px solid var(--line); backdrop-filter: blur(14px); transform: rotate(4deg); }
.hero__peek .label { display: block; padding: 2px 4px 10px; color: var(--muted); font-size: 11px; }
.hero__peek img { border-radius: 8px; aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.hero__peek-cap { display: flex; justify-content: space-between; padding: 10px 4px 2px; font-size: 14px; color: var(--muted); }
.hero__peek-cap b { color: var(--paper); }
@media (max-width: 1100px), (max-height: 760px) { .hero__peek { width: 190px; top: 84px; } .hero__peek-cap { font-size: 12px; } }
@media (max-width: 760px) {
  .nav__links { display: none; }
  .hero__peek { display: none; }
  .hero__paint { opacity: .7; }
  .hero__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Marquee (quiet) ---------- */
.marquee { background: var(--ink); color: var(--muted); overflow: hidden; padding: 22px 0; border-block: 1px solid var(--line); }
.marquee__track { display: flex; gap: 36px; width: max-content; font-size: clamp(22px, 2.8vw, 40px); font-weight: 600; letter-spacing: -.02em; white-space: nowrap; align-items: center; }
.marquee__track .serif { color: var(--paper); font-size: 1.15em; }
.marquee__track b { color: var(--yellow); font-size: .6em; font-weight: 400; }

/* ---------- Placeholders ---------- */
.ph { position: relative; width: 100%; height: 100%; min-height: 160px; display: grid; place-items: center; background: repeating-linear-gradient(135deg, rgba(13,13,15,.06) 0 1px, transparent 1px 14px), var(--paper-2); color: rgba(13,13,15,.5); font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; text-align: center; }
.ph span { background: var(--paper); padding: 8px 12px; border-radius: 6px; }
.ph--dark { background: repeating-linear-gradient(135deg, rgba(243,239,231,.05) 0 1px, transparent 1px 14px), var(--ink-3); color: var(--muted); }
.ph--dark span { background: var(--ink); }

/* ---------- Section heads ---------- */
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 40px; margin-bottom: clamp(32px, 4vw, 56px); }
.sec-title { margin: 0; font-size: clamp(56px, 9vw, 150px); font-weight: 900; line-height: .88; letter-spacing: -.055em; }
.sec-title em { font-size: 1.1em; color: var(--yellow); }
.sec-note { margin: 0; max-width: 340px; color: var(--muted); font-size: 15px; }
.sec-note .label { display: block; margin-top: 10px; color: var(--paper); }
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
[data-split] .wi { display: inline-block; }

/* ---------- Work: accordion ---------- */
.work { padding: clamp(90px, 11vw, 160px) 0 clamp(80px, 10vw, 140px); background: var(--ink); }
.projects { display: grid; gap: 12px; }
.proj { border: 1px solid var(--line); border-radius: 22px; background: var(--ink-2); overflow: hidden; transition: border-color .5s var(--ease), background .5s var(--ease); }
.proj:hover { border-color: rgba(243,239,231,.3); }
.proj.is-open { background: var(--ink-2); border-color: rgba(243,239,231,.3); }
.proj__head { width: 100%; display: grid; grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1.1fr) 120px 48px; align-items: center; gap: 24px; padding: 22px 26px; text-align: left; }
.proj__num { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.proj__name { display: block; font-size: clamp(28px, 3.4vw, 52px); font-weight: 800; letter-spacing: -.045em; line-height: 1; transition: transform .6s var(--ease); }
.proj__head:hover .proj__name { transform: translateX(8px); }
.proj__kind { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.proj__kind span, .chip { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; color: var(--muted); }
.chip--soon { color: var(--yellow); border-color: rgba(255,229,0,.35); }
.proj__lead { color: var(--muted); font-size: 15px; max-width: 380px; }
.proj__thumb { width: 120px; aspect-ratio: 16/10; border-radius: 10px; overflow: hidden; background: var(--ink-3); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.proj__thumb img, .proj__thumb .ph { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.proj.is-open .proj__thumb { opacity: 0; transform: scale(.8); }
.proj__lead { transition: opacity .4s var(--ease); }
.proj.is-open .proj__lead { opacity: 0; }
.proj__toggle { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; position: relative; transition: background .4s var(--ease), border-color .4s, transform .6s var(--ease); }
.proj__toggle::before, .proj__toggle::after { content: ''; position: absolute; width: 14px; height: 1.5px; background: currentColor; transition: transform .5s var(--ease); }
.proj__toggle::after { transform: rotate(90deg); }
.proj__head:hover .proj__toggle { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.proj.is-open .proj__toggle { transform: rotate(180deg); }
.proj.is-open .proj__toggle::after { transform: rotate(0deg); }
.proj__panel { height: 0; overflow: hidden; }
.proj.is-open .proj__panel { height: auto; }
.proj__body { padding: 8px 26px 30px; }

.proj__intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(24px, 4vw, 56px); padding-top: 22px; border-top: 1px solid var(--line); }
.proj__lead-big { margin: 0 0 22px; font-size: clamp(20px, 1.8vw, 26px); line-height: 1.3; letter-spacing: -.015em; font-weight: 500; }
.ba { display: grid; gap: 0; margin: 0 0 22px; }
.ba div { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.ba dt { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-top: 3px; }
.ba dd { margin: 0; color: var(--paper); }
.ba div:last-child dt { color: var(--yellow); }
.meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 0 0 24px; }
.meta dt { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.meta dd { margin: 3px 0 0; font-weight: 600; }
.proj__links { display: flex; flex-wrap: wrap; gap: 10px; }
.proj__cover { border-radius: 14px; overflow: hidden; aspect-ratio: 16/10; background: var(--ink-3); }
.proj__cover img, .proj__cover .ph { width: 100%; height: 100%; object-fit: cover; }

/* decision tabs */
.dtabs { margin-top: clamp(32px, 4vw, 48px); }
.dtabs__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.dtabs__head .label { color: var(--muted); }
.dtabs__list { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.dtab { position: relative; padding: 14px 18px 16px; font-weight: 600; font-size: 16px; color: var(--muted); transition: color .3s; }
.dtab span { font-family: var(--f-mono); font-size: 11px; margin-right: 8px; }
.dtab::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--yellow); transform: scaleX(0); transition: transform .5s var(--ease); }
.dtab:hover { color: var(--paper); }
.dtab[aria-selected="true"] { color: var(--paper); }
.dtab[aria-selected="true"]::after { transform: scaleX(1); }
.dpanel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(24px, 4vw, 56px); padding-top: 28px; align-items: start; }
.dpanel[hidden] { display: none; }
.dpanel__title { margin: 0 0 18px; font-size: clamp(26px, 2.6vw, 38px); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; }
.psi { display: grid; margin: 0; }
.psi div { padding: 14px 0; border-top: 1px solid var(--line); }
.psi dt { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.psi dt::before { content: ''; width: 7px; height: 7px; border-radius: 2px; background: var(--muted); }
.psi .s dt::before { background: var(--blue); }
.psi .i dt::before { background: var(--yellow); }
.psi dd { margin: 0; font-size: 16px; }
.psi .i dd { font-weight: 600; color: var(--paper); }
.dvisual { margin: 0; }
.dvisual__frame { border-radius: 14px; overflow: hidden; aspect-ratio: 4/3; background: var(--ink-3); position: relative; }
.dvisual__frame > img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.dvisual__frame > .ph { position: absolute; inset: 0; }
.dvisual figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); display: flex; gap: 10px; }
.dvisual figcaption::before { content: '↳'; color: var(--yellow); }

/* Before / After */
.compare { position: absolute; inset: 0; overflow: hidden; user-select: none; touch-action: pan-y; cursor: ew-resize; background: #0b141a; }
.compare__after, .compare__before { position: absolute; inset: 0; }
.compare__after img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.compare__before { clip-path: inset(0 50% 0 0); background: #0b141a; padding: 18px; display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; font-size: 13px; }
.chat { max-width: 78%; padding: 8px 12px; border-radius: 10px; line-height: 1.35; color: #e9edef; }
.chat--in { background: #202c33; align-self: flex-start; border-top-left-radius: 2px; }
.chat--out { background: #005c4b; align-self: flex-end; border-top-right-radius: 2px; }
.chat small { display: block; font-size: 10px; opacity: .6; margin-top: 3px; text-align: right; }
.chat__head { position: absolute; top: 0; left: 0; right: 0; padding: 12px 18px; background: #202c33; color: #e9edef; font-weight: 600; font-size: 13px; display: flex; gap: 10px; align-items: center; }
.chat__head i { width: 26px; height: 26px; border-radius: 50%; background: #6a7175; }
.compare__handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--paper); transform: translateX(-1px); }
.compare__handle span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: var(--paper); color: var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.compare__tag { position: absolute; bottom: 12px; font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; padding: 5px 9px; border-radius: 999px; z-index: 2; }
.compare__tag--b { left: 12px; background: var(--ink); color: var(--paper); }
.compare__tag--a { right: 12px; background: var(--yellow); color: var(--ink); }

@media (max-width: 960px) {
  .proj__head { grid-template-columns: 32px minmax(0, 1fr) 44px; gap: 14px; padding: 18px; }
  .proj__lead, .proj__thumb { display: none; }
  .proj__toggle { width: 44px; height: 44px; }
  .proj__body { padding: 4px 18px 22px; }
  .proj__intro, .dpanel { grid-template-columns: 1fr; }
  .proj__cover { order: -1; }
  .dtab { padding: 12px 10px 14px; font-size: 14px; }
}

/* ---------- About ---------- */
.about { background: var(--paper); color: var(--ink); padding: clamp(100px, 12vw, 170px) 0; }
.about__wrap { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(36px, 6vw, 110px); align-items: start; }
.about__visual { position: sticky; top: 100px; }
.about__frame { position: relative; aspect-ratio: 4/5; border-radius: 18px; overflow: hidden; background: var(--paper-2); }
.about__slide { position: absolute; inset: 0; clip-path: inset(0 100% 0 0); }
.about__slide.is-active { clip-path: inset(0 0 0 0); }
.about__slide img { width: 100%; height: 100%; object-fit: cover; }
.about__slide .ph { position: absolute; inset: 0; }
.about__caption { margin: 14px 0 0; color: var(--muted-dark); }
.wf { position: absolute; inset: 0; background: #fbf9f5; padding: 9%; display: grid; grid-auto-rows: min-content; gap: 6%; background-image: linear-gradient(rgba(61,59,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(61,59,255,.07) 1px, transparent 1px); background-size: 24px 24px; }
.wf__bar { height: 14px; border: 1.5px solid var(--ink); border-radius: 4px; }
.wf__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.wf__h { height: 46px; width: 60%; background: var(--ink); border-radius: 4px; }
.wf__btn { height: 30px; width: 26%; border: 1.5px solid var(--blue); border-radius: 999px; }
.wf__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wf__grid i { aspect-ratio: 3/4; border: 1.5px dashed rgba(13,13,15,.5); border-radius: 6px; }
.wf__lines { display: grid; gap: 8px; }
.wf__lines i { height: 8px; background: rgba(13,13,15,.15); border-radius: 4px; }
.wf__lines i:nth-child(2) { width: 80%; } .wf__lines i:nth-child(3) { width: 55%; }
.wf__note { font-family: var(--f-serif); font-style: italic; font-size: 26px; color: var(--blue); transform: rotate(-3deg); justify-self: end; }
.about__label { color: var(--blue); margin: 0 0 22px; }
.about__hi { margin: 0; font-size: clamp(36px, 4.4vw, 72px); font-weight: 800; line-height: 1; letter-spacing: -.045em; }
.about__hi em { color: var(--blue); font-weight: 400; }
.about__bio { margin: 26px 0 0; max-width: 560px; font-size: clamp(17px, 1.3vw, 20px); color: var(--muted-dark); }
.about__list { list-style: none; margin: clamp(40px, 5vw, 64px) 0 0; padding: 0; border-top: 1px solid var(--line-dark); }
.about__list li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 22px 12px 22px 0; border-bottom: 1px solid var(--line-dark); cursor: default; position: relative; transition: padding .5s var(--ease); outline: none; }
.about__list li::before { content: ''; position: absolute; left: -16px; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); transform: translateY(-50%) scale(0); transition: transform .4s var(--ease); }
.about__list li.is-active { padding-left: 14px; }
.about__list li.is-active::before { transform: translateY(-50%) scale(1); }
.about__n { font-family: var(--f-mono); font-size: 12px; color: var(--muted-dark); padding-top: 8px; }
.about__list h3 { margin: 0 0 4px; font-size: clamp(26px, 2.4vw, 36px); font-weight: 800; letter-spacing: -.035em; transition: color .4s; }
.about__list li.is-active h3 { color: var(--blue); }
.about__list p { margin: 0; color: var(--muted-dark); max-width: 480px; }
.about__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: clamp(36px, 4vw, 56px); }
.about__stats b { display: block; font-size: clamp(44px, 5vw, 76px); font-weight: 900; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.about__stats span { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-dark); }
.about__tools { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.about__tools li { border: 1px solid var(--line-dark); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 500; }
@media (max-width: 900px) {
  .about__wrap { grid-template-columns: 1fr; }
  .about__visual { position: relative; top: 0; max-width: 420px; }
}

/* ---------- Gallery: light white-cube room ---------- */
.gallery { position: relative; height: 480vh; background: #ECE8E0; color: var(--ink); }
.gallery__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.gallery__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gallery__intro { position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%); z-index: 2; pointer-events: none; max-width: 700px; }
.gallery__intro::before { content: ''; position: absolute; inset: -30% -25% -30% -40%; z-index: -1; background: radial-gradient(closest-side, rgba(236,232,224,.92) 40%, rgba(236,232,224,0)); }
.gallery__intro .label { color: var(--blue); }
.gallery__title { margin: 12px 0 16px; font-size: clamp(64px, 11vw, 190px); font-weight: 900; letter-spacing: -.06em; line-height: .85; }
.gallery__title em { color: var(--blue); }
.gallery__hint { margin: 0; color: var(--muted-dark); max-width: 320px; }
.gallery__hud { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 28px; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; pointer-events: none; opacity: 0; }
.gallery__now b { display: block; font-size: clamp(22px, 2.2vw, 32px); letter-spacing: -.03em; margin-top: 4px; }
.gallery__now .label { color: var(--blue); }
.gallery__track { flex: 0 0 min(320px, 40vw); height: 2px; background: var(--line-dark); }
.gallery__track i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.gallery__end { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; text-align: center; opacity: 0; pointer-events: none; }
.gallery__end.is-on { pointer-events: auto; }
.gallery__end .label { color: var(--blue); }
.gallery__end-title { margin: 10px 0 0; font-size: clamp(36px, 5vw, 72px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.gallery__fallback { position: absolute; inset: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 70%; gap: 16px; overflow-x: auto; padding: 120px var(--gutter) 40px; list-style: none; margin: 0; scroll-snap-type: x mandatory; }
.gallery__fallback[hidden] { display: none; }
.gallery__fallback li { scroll-snap-align: center; }
.gallery__fallback img { border-radius: 8px; width: 100%; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 85; background: rgba(236,232,224,.96); color: var(--ink); backdrop-filter: blur(10px); display: grid; grid-template-columns: 80px 1fr 80px; align-items: center; padding: 70px 20px 30px; }
.lightbox[hidden] { display: none; }
.lightbox__fig { margin: 0; display: grid; justify-items: center; gap: 18px; height: 100%; grid-template-rows: minmax(0, 1fr) auto; }
.lightbox__img { height: 100%; width: 100%; display: grid; place-items: center; min-height: 0; }
.lightbox__img img, .lightbox__img canvas { max-height: 100%; max-width: 100%; object-fit: contain; box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.lightbox figcaption { text-align: center; display: grid; gap: 4px; }
.lightbox figcaption .label { color: var(--blue); }
.lightbox figcaption b { font-size: 24px; letter-spacing: -.02em; }
.lightbox figcaption span:last-child { color: var(--muted-dark); font-size: 14px; }
.lightbox__close { position: absolute; top: 20px; right: var(--gutter); font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; border: 1px solid var(--line-dark); border-radius: 999px; padding: 10px 16px; }
.lightbox__close:hover, .lightbox__nav:hover { background: var(--ink); color: var(--paper); }
.lightbox__nav { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line-dark); font-size: 20px; justify-self: center; transition: background .3s, color .3s; }
@media (max-width: 600px) { .lightbox { grid-template-columns: 48px 1fr 48px; padding-inline: 4px; } .lightbox__nav { width: 40px; height: 40px; } }

/* ---------- Contact (calm) ---------- */
.contact { background: var(--paper); color: var(--ink); padding: clamp(100px, 12vw, 170px) 0 0; border-top: 1px solid var(--line-dark); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 110px); align-items: end; }
.contact__label { color: var(--blue); margin: 0 0 22px; }
.contact__title { margin: 0; font-size: clamp(48px, 7vw, 116px); font-weight: 900; line-height: .92; letter-spacing: -.055em; }
.contact__title em { color: var(--blue); font-weight: 400; }
.contact__lead { margin: 28px 0 0; max-width: 560px; color: var(--muted-dark); font-size: clamp(17px, 1.3vw, 19px); }
.contact__mail { display: inline-block; font-size: clamp(24px, 2.4vw, 38px); font-weight: 700; letter-spacing: -.03em; background: linear-gradient(var(--blue), var(--blue)) 0 100% / 100% 2px no-repeat; padding-bottom: 4px; transition: color .4s, background-size .5s var(--ease); word-break: break-all; }
.contact__mail:hover { color: var(--blue); }
.contact__copy { display: block; margin-top: 12px; font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-dark); }
.contact__copy:hover { color: var(--ink); }
.contact__list { list-style: none; margin: 34px 0 0; padding: 0; border-top: 1px solid var(--line-dark); }
.contact__list a { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line-dark); font-size: 18px; font-weight: 600; transition: padding .5s var(--ease), color .3s; }
.contact__list a span { transition: transform .5s var(--ease); }
.contact__list a:hover { padding-left: 10px; color: var(--blue); }
.contact__list a:hover span { transform: translate(3px, -3px); }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 24px; padding-bottom: 28px; margin-top: clamp(80px, 10vw, 140px); border-top: 1px solid var(--line-dark); font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-dark); }
.footer a:hover { color: var(--ink); }
.footer__ua { display: inline-flex; align-items: center; gap: 10px; }
.flag { width: 16px; height: 11px; border-radius: 2px; background: linear-gradient(var(--blue-deep) 50%, var(--yellow) 50%); }
@media (max-width: 860px) { .contact__grid { grid-template-columns: 1fr; } }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 99; transform: translate(-50%, 160%); background: var(--ink); color: var(--paper); font-weight: 600; padding: 12px 20px; border-radius: 999px; transition: transform .5s var(--ease); pointer-events: none; }
.toast.is-on { transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* =========================================================
   v3 overrides — light Work section, prominent tabs, dark full-screen contact
   ========================================================= */

/* ---------- Work: light ---------- */
.work { background: var(--paper); color: var(--ink); }
.work .sec-title em { color: var(--blue); }
.work .sec-note { color: var(--muted-dark); }
.work .sec-note .label { color: var(--ink); }
.work .proj { background: #FBF9F5; border-color: var(--line-dark); box-shadow: 0 1px 0 rgba(13,13,15,.04); }
.work .proj:hover, .work .proj.is-open { border-color: rgba(13,13,15,.3); background: #fff; }
.work .proj.is-open { box-shadow: 0 30px 60px -30px rgba(13,13,15,.25); }
.work .proj__num, .work .proj__lead, .work .meta dt, .work .ba dt, .work .psi dt { color: var(--muted-dark); }
.work .proj__kind span, .work .chip { border-color: var(--line-dark); color: var(--muted-dark); }
.work .chip--soon { color: var(--blue); border-color: rgba(61,59,255,.35); }
.work .proj__thumb, .work .proj__cover, .work .dvisual__frame { background: var(--paper-2); }
.work .proj__toggle { border-color: var(--line-dark); }
.work .proj__head:hover .proj__toggle, .work .proj.is-open .proj__toggle { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.work .proj__intro { border-top-color: var(--line-dark); }
.work .ba div, .work .psi div { border-top-color: var(--line-dark); }
.work .ba dd, .work .psi .i dd { color: var(--ink); }
.work .ba div:last-child dt { color: var(--blue); }
.work .psi dt::before { background: var(--muted-dark); }
.work .psi .s dt::before { background: var(--blue); }
.work .psi .i dt::before { background: var(--yellow); outline: 1px solid rgba(13,13,15,.25); }
.work .psi .i dd { background: linear-gradient(transparent 60%, rgba(255,229,0,.55) 60%); display: inline; }
.work .dvisual figcaption { color: var(--muted-dark); }
.work .dvisual figcaption::before { color: var(--blue); }
.work .btn--line { border-color: rgba(13,13,15,.25); }
.work .btn--line::before { background: var(--ink); }
.work .btn--line:hover { color: var(--paper); }
.work .btn--y::before { background: var(--ink); }
.work .btn--y:hover { color: var(--paper); }

/* ---------- Decision tabs: big, card-like, impossible to miss ---------- */
.dtabs { margin-top: clamp(36px, 4vw, 56px); padding: clamp(18px, 2.2vw, 28px); border-radius: 18px; background: var(--paper); border: 1px solid var(--line-dark); }
.dtabs__head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; }
.dtabs__title { margin: 0; font-size: clamp(22px, 2vw, 30px); font-weight: 800; letter-spacing: -.03em; }
.dtabs__hint { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); }
.dtabs__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; border: 0; }
.dtab {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 16px 18px; border-radius: 14px; text-align: left;
  background: #fff; border: 1px solid var(--line-dark); color: var(--ink);
  font-size: 17px; font-weight: 700; letter-spacing: -.01em;
  transition: background .35s var(--ease), color .35s, border-color .35s, transform .35s var(--ease), box-shadow .35s;
}
.dtab::after { display: none; }
.dtab .dtab__n { font-family: var(--f-mono); font-size: 11px; font-weight: 500; margin: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--ink); transition: background .35s, color .35s; }
.dtab__arr { opacity: .35; transition: transform .35s var(--ease), opacity .35s; }
.dtab:hover { border-color: rgba(13,13,15,.35); transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(13,13,15,.35); color: var(--ink); }
.dtab:hover .dtab__arr { opacity: 1; transform: translateX(3px); }
.dtab[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.dtab[aria-selected="true"] .dtab__n { background: var(--yellow); color: var(--ink); }
.dtab[aria-selected="true"] .dtab__arr { opacity: 1; color: var(--yellow); transform: rotate(90deg); }
.dpanel { padding-top: 26px; }
@media (max-width: 960px) { .dtab { padding: 12px 14px; font-size: 15px; } }

/* ---------- Contact: dark, full screen, giant wordmark ---------- */
.contact { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; background: var(--ink); color: var(--paper); border-top: 0; overflow: hidden; padding-top: clamp(110px, 12vw, 160px); }
.contact__grid { flex: 1; align-content: center; }
.contact__title em { color: var(--yellow); }
.contact__label { color: var(--muted); }
.contact__lead { color: var(--muted); }
.contact__mail { background-image: linear-gradient(var(--yellow), var(--yellow)); }
.contact__mail:hover { color: var(--yellow); }
.contact__copy { color: var(--muted); }
.contact__copy:hover { color: var(--paper); }
.contact__list { border-top-color: var(--line); }
.contact__list a { border-bottom-color: var(--line); }
.contact__list a:hover { color: var(--yellow); }
.footer { margin-top: clamp(48px, 6vw, 80px); border-top-color: var(--line); color: var(--muted); position: relative; z-index: 1; }
.footer a:hover { color: var(--paper); }
.contact__wordmark { display: flex; justify-content: space-between; align-items: baseline; gap: .15em; padding: 0 var(--gutter); margin-bottom: -.2em; font-size: clamp(64px, 17.5vw, 330px); font-weight: 900; letter-spacing: -.06em; line-height: .9; color: var(--paper); white-space: nowrap; user-select: none; }
.contact__wordmark .serif { color: var(--paper); opacity: .9; }

/* ---------- v4: 3D hero (pinned), uncropped visuals, blue contact title ---------- */
.hero { display: block; min-height: 0; height: 230vh; overflow: visible; }
.hero__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; align-items: flex-end; }
.hero__3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero__inner { pointer-events: none; width: 100%; }
.hero__inner a, .hero__inner button { pointer-events: auto; }
.hero__inner .hero__sub, .hero__inner .hero__title { max-width: 62%; }
.hero__morph { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); z-index: 3; opacity: 0; visibility: hidden; pointer-events: none; }
.hero__morph > * { max-width: 34%; }
.hero__morph .label { color: var(--yellow); margin: 0 0 18px; }
.hero__morph-title { margin: 0 0 28px; font-size: clamp(30px, 3.4vw, 54px); font-weight: 800; line-height: 1.02; letter-spacing: -.04em; }
.hero__morph-title em { color: var(--yellow); font-weight: 400; }
.hero__morph .btn { pointer-events: auto; }
.hero__hint { position: absolute; right: var(--gutter); bottom: 28px; z-index: 3; color: var(--muted); display: flex; align-items: center; gap: 12px; }
.hero__hint i { width: 1px; height: 36px; background: linear-gradient(var(--yellow), transparent); animation: hint 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes hint { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 900px) {
  .hero { height: 210vh; }
  .hero__inner .hero__sub, .hero__inner .hero__title { max-width: none; }
  .hero__morph { top: auto; bottom: 40px; transform: none; }
  .hero__morph > * { max-width: none; }
  .hero__hint { display: none; }
}

.work .dvisual__frame { aspect-ratio: auto; }
.work .dvisual__frame > img { height: auto; object-fit: contain; }
.work .dvisual__frame > .ph { position: relative; aspect-ratio: 4 / 3; }
.compare__tag { cursor: pointer; transition: transform .3s var(--ease); }
.compare__tag:hover { transform: scale(1.08); }

.contact__title { color: var(--blue); }
.work .dvisual__frame:has(.compare) { aspect-ratio: 4 / 3; }
@media (max-width: 760px) { .hero__facts { display: none; } .hero__kicker { margin-bottom: 14px; } }

/* ---------- v5: About = bento + artist desk ---------- */
.about { padding: clamp(90px, 11vw, 150px) 0; }
.about__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; margin-bottom: clamp(28px, 3.5vw, 48px); }
.about__head .about__label { margin: 0; order: 2; }
.about__hi { max-width: 900px; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: minmax(150px, auto); gap: 12px; }
.tile { position: relative; border-radius: 22px; background: #FBF9F5; border: 1px solid var(--line-dark); padding: clamp(18px, 2vw, 26px); overflow: hidden; transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .4s; }
.tile:not(.tile--desk):hover { transform: translateY(-4px); box-shadow: 0 24px 40px -26px rgba(13,13,15,.35); border-color: rgba(13,13,15,.25); }
.tile .label { color: var(--muted-dark); margin: 0 0 12px; }

.tile--desk { grid-column: span 7; grid-row: span 2; padding: 0; min-height: 520px; background: #EFEADF; }
.tile--bio { grid-column: span 5; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.tile--how { grid-column: span 5; }
.tile--loc, .tile--num, .tile--tools, .tile--now { grid-column: span 3; }

.bio { margin: 0; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.4; letter-spacing: -.01em; }
.tile--bio .btn { align-self: flex-start; }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark::before { background: var(--blue); }

.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.how li { padding: 11px 0; border-top: 1px solid var(--line-dark); color: var(--muted-dark); font-size: 15px; transition: padding .4s var(--ease), color .3s; }
.how li:hover { padding-left: 8px; color: var(--ink); }
.how span { font-family: var(--f-mono); font-size: 11px; color: var(--blue); margin-right: 12px; }
.how b { color: var(--ink); font-size: 18px; letter-spacing: -.02em; }

.loc__city { margin: 0; font-size: clamp(28px, 2.6vw, 40px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.loc__city span { font-family: var(--f-serif); font-style: italic; font-weight: 400; color: var(--blue); }
.loc__time { margin: 14px 0 0; display: flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-dark); }

.tile--num { background: var(--ink); color: var(--paper); border-color: var(--ink); display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 10px; }
.tile--num b { display: block; font-size: clamp(48px, 5vw, 76px); font-weight: 900; letter-spacing: -.05em; line-height: .9; font-variant-numeric: tabular-nums; }
.tile--num div:last-child b { color: var(--yellow); }
.tile--num span { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { border: 1px solid var(--line-dark); border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 500; background: #fff; transition: background .3s, color .3s; }
.chips li:hover { background: var(--ink); color: var(--paper); }

.now { margin: 0; font-size: 17px; line-height: 1.35; }

/* desk — a design canvas (dot grid, like FigJam) instead of striped wood */
.desk { position: absolute; inset: 0; touch-action: pan-y;
  background:
    radial-gradient(120% 90% at 15% 0%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(circle, rgba(13,13,15,.18) 1.1px, transparent 1.6px) 0 0 / 22px 22px,
    #EFEADF; }
.desk__item { position: absolute; left: var(--x); top: var(--y); transform: rotate(var(--r)); cursor: grab; user-select: none; touch-action: none; transition: box-shadow .3s var(--ease), scale .3s var(--ease); box-shadow: 0 8px 18px -8px rgba(13,13,15,.35); will-change: transform; }
.desk__item:hover { scale: 1.03; box-shadow: 0 16px 30px -10px rgba(13,13,15,.4); }
.desk__item.is-drag { cursor: grabbing; scale: 1.07; box-shadow: 0 30px 50px -14px rgba(13,13,15,.45); outline: 1.5px solid var(--blue); outline-offset: 4px; }
.polaroid { width: clamp(150px, 15vw, 210px); background: #fff; padding: 10px 10px 0; margin: 0; }
.polaroid__img { aspect-ratio: 1; min-height: 0; }
.polaroid__img.ph { background: var(--paper-2); }
.polaroid figcaption { font-family: var(--f-serif); font-style: italic; font-size: 22px; text-align: center; padding: 8px 0 10px; color: var(--ink); }
.print { width: clamp(130px, 13vw, 180px); margin: 0; background: #fff; padding: 8px; }
.print--sm { width: clamp(110px, 10vw, 140px); }
.print img { width: 100%; pointer-events: none; }
.sticky { width: 150px; padding: 16px 14px 22px; background: var(--yellow); font-family: var(--f-serif); font-style: italic; font-size: 24px; line-height: 1.05; color: var(--ink); }
.sketch { width: 170px; padding: 14px; background: #fff; display: grid; gap: 8px; }
.sketch i { display: block; }
.sk-bar { height: 8px; border: 1.5px solid var(--ink); border-radius: 3px; }
.sk-h { height: 22px; width: 70%; background: var(--ink); border-radius: 3px; }
.sk-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sk-row i { aspect-ratio: 3/4; border: 1.5px dashed rgba(13,13,15,.5); border-radius: 3px; }
.sk-l { height: 5px; background: rgba(13,13,15,.18); border-radius: 3px; }
.sk-l--s { width: 60%; }
.sketch b { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: 18px; color: var(--blue); justify-self: end; }
.tag { padding: 10px 16px; border-radius: 999px; background: var(--blue); color: var(--paper); font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.tape { width: 110px; height: 28px; background: rgba(255,229,0,.55); box-shadow: none; }
.swatch { display: flex; padding: 8px; background: #fff; gap: 6px; }
.swatch i { width: 26px; height: 40px; border-radius: 3px; }
.swatch i:nth-child(1) { background: var(--blue); } .swatch i:nth-child(2) { background: var(--yellow); } .swatch i:nth-child(3) { background: var(--ink); }
.desk__hint { position: absolute; right: 18px; bottom: 14px; margin: 0; padding: 6px 12px; border-radius: 999px; background: var(--ink); color: var(--paper); pointer-events: none; }

@media (max-width: 1100px) {
  .tile--desk { grid-column: span 12; min-height: 480px; }
  .tile--bio, .tile--how { grid-column: span 6; }
  .tile--loc, .tile--num, .tile--tools, .tile--now { grid-column: span 6; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .tile--desk, .tile--bio, .tile--how, .tile--loc, .tile--num, .tile--tools, .tile--now { grid-column: 1 / -1; }
  .tile--desk { min-height: 440px; }
  .polaroid { width: 130px; } .print { width: 110px; } .print--sm { width: 90px; } .sticky { width: 120px; font-size: 19px; } .sketch { width: 130px; }
}
.polaroid--sm { width: clamp(130px, 12vw, 170px); }
.polaroid--sm figcaption { font-size: 19px; }
@media (max-width: 640px) { .polaroid--sm { width: 110px; } .polaroid--sm figcaption { font-size: 16px; } }

/* ---------- v6: hero background = dark linen canvas + studio light ---------- */
.hero, .hero__stage { background: #121215; }
.hero__bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero__linen {
  position: absolute; inset: 0;
  background-color: #141418;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='h'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9 0.035' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23h)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='v'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.035 0.9' numOctaves='2' seed='8'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23v)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(0deg, rgba(255,255,255,.022) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.28) 0 1px, transparent 1px 3px);
  background-blend-mode: soft-light, multiply, normal, normal;
  opacity: 1;
}
.hero__grid {
  position: absolute; inset: 0; opacity: 0;
  background-image: linear-gradient(rgba(61,59,255,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(61,59,255,.22) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 66% 50%, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 60% 70% at 66% 50%, #000 30%, transparent 80%);
}
.hero__lights { position: absolute; inset: 0; will-change: transform; }
.hero__light { position: absolute; border-radius: 50%; mix-blend-mode: screen; filter: blur(30px); will-change: transform; }
.hero__light--blue { width: 62vmax; height: 62vmax; left: 70%; top: 46%; margin: -31vmax 0 0 -31vmax; background: radial-gradient(circle, rgba(61,59,255,.55) 0%, rgba(61,59,255,.18) 35%, transparent 65%); animation: breathe 9s ease-in-out infinite; }
.hero__light--yellow { width: 30vmax; height: 30vmax; left: 80%; top: 26%; margin: -15vmax 0 0 -15vmax; background: radial-gradient(circle, rgba(255,214,90,.28) 0%, rgba(255,214,90,.08) 40%, transparent 68%); animation: drift 13s ease-in-out infinite; }
.hero__light--deep { width: 40vmax; height: 40vmax; left: 58%; top: 82%; margin: -20vmax 0 0 -20vmax; background: radial-gradient(circle, rgba(35,33,201,.4) 0%, transparent 65%); animation: drift 17s ease-in-out infinite reverse; }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.12) translate(-2%, 2%); opacity: 1; } }
@keyframes drift { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(-6%, 5%) scale(1.08); } 66% { transform: translate(5%, -4%) scale(.95); } }
.hero__vignette { position: absolute; inset: 0; background: radial-gradient(ellipse 85% 85% at 60% 45%, transparent 45%, rgba(8,8,10,.75) 100%), linear-gradient(0deg, rgba(10,10,12,.7), transparent 30%); }
@media (max-width: 900px) {
  .hero__light--blue { left: 55%; top: 22%; }
  .hero__light--yellow { left: 75%; top: 10%; }
  .hero__light--deep { left: 30%; top: 40%; }
  .hero__grid { -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 30%, #000 30%, transparent 80%); mask-image: radial-gradient(ellipse 80% 50% at 50% 30%, #000 30%, transparent 80%); }
}
@media (prefers-reduced-motion: reduce) { .hero__light { animation: none; } }

/* ---------- v7: footer — big rolling nav + physics ball pit ---------- */
.contact { justify-content: flex-start; padding-top: 0; }
.fnav { display: flex; justify-content: space-between; gap: 16px; padding-top: clamp(28px, 4vw, 48px); padding-bottom: clamp(36px, 5vw, 70px); }
.fnav a { position: relative; display: inline-flex; flex-direction: column; align-items: center; font-size: clamp(22px, 2.6vw, 40px); font-weight: 900; letter-spacing: -.03em; text-transform: uppercase; line-height: 1; }
.fnav__label { display: inline-flex; }
.fnav__clip { display: inline-block; overflow: hidden; height: 1.05em; }
.fnav__char { display: inline-block; text-shadow: 0 1.05em 0 var(--yellow); transition: transform .55s var(--ease) calc(var(--i) * 28ms); }
.fnav a:hover .fnav__char, .fnav a:focus-visible .fnav__char { transform: translateY(-1.05em); }
.fnav__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); margin-top: 10px; transform: scale(0); transition: transform .5s var(--ease); }
.fnav a:hover .fnav__dot, .fnav a:focus-visible .fnav__dot { transform: scale(1); }

.contact__grid { flex: 0 0 auto; align-items: end; }
.contact__side { align-self: end; }

.pit { position: relative; height: clamp(380px, 56vh, 620px); margin-top: clamp(24px, 3vw, 40px); overflow: hidden; touch-action: pan-y; }
.pit .contact__wordmark { position: absolute; left: 0; right: 0; bottom: -0.16em; margin: 0; pointer-events: none; opacity: .95; }
.ball { position: absolute; left: 0; top: 0; border-radius: 50%; display: grid; place-items: center; text-align: center; user-select: none; -webkit-user-drag: none; will-change: transform; cursor: grab; box-shadow: 0 14px 30px -12px rgba(0,0,0,.6); overflow: hidden; }
.pit.is-grabbing, .pit.is-grabbing .ball { cursor: grabbing; }
.ball--lg { width: clamp(130px, 13vw, 200px); height: clamp(130px, 13vw, 200px); }
.ball--md { width: clamp(100px, 9.5vw, 150px); height: clamp(100px, 9.5vw, 150px); }
.ball--sm { width: clamp(84px, 7.5vw, 118px); height: clamp(84px, 7.5vw, 118px); }
.ball img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ball--img { border: 5px solid var(--paper); }
.ball--blue { background: var(--blue); color: var(--paper); }
.ball--yellow { background: var(--yellow); color: var(--ink); }
.ball--paper { background: var(--paper); color: var(--ink); }
.ball--ink { background: #1f1f25; color: var(--paper); border: 1.5px solid rgba(243,239,231,.35); }
.ball--outline { background: transparent; color: var(--paper); border: 2px solid var(--paper); box-shadow: none; }
.ball__t { display: block; font-size: clamp(26px, 2.6vw, 42px); font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.ball--sm .ball__t { font-size: clamp(17px, 1.6vw, 24px); }
.ball__t--serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; padding: 0 8px; line-height: 1.05; }
.ball__s { position: absolute; bottom: 18%; font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
a.ball { transition: filter .3s; }
a.ball:hover { filter: brightness(1.08); }
.pit__hint { position: absolute; right: var(--gutter); top: 10px; margin: 0; color: var(--muted); pointer-events: none; }
.pit--static { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 10px; padding: 20px; }
.pit--static .ball { position: relative; }

.contact .footer { margin-top: 0; padding-top: 18px; padding-bottom: 22px; }
@media (max-width: 760px) {
  .fnav { flex-wrap: wrap; gap: 14px 24px; justify-content: flex-start; }
  .pit { height: 440px; }
  .ball--lg { width: 112px; height: 112px; } .ball--md { width: 88px; height: 88px; } .ball--sm { width: 74px; height: 74px; }
  .ball__s { display: none; }
  .pit__hint { display: none; }
}
.pit { height: clamp(420px, 62vh, 680px); }
.pit .contact__wordmark { bottom: auto; top: 6%; }
@media (max-width: 760px) { .pit .contact__wordmark { top: 4%; } }

/* =====================================================================
   v8 — colour rhythm, per-project colours, visual before/after, portrait
   ===================================================================== */

/* ---------- Section colour rhythm: page colour morphs on scroll (main.js) ---------- */
.work, .about { background: transparent; }
.about { color: var(--paper); }
.about .about__label, .about .about__hi em { color: var(--yellow); }
.about .tile { background: var(--paper); color: var(--ink); border-color: transparent; }
.about .tile--num { color: var(--paper); }
.about .tile--num { background: var(--ink); }

/* ---------- Project cards wear their own colours ---------- */
.work .proj { position: relative; isolation: isolate; overflow: visible; transition: border-color .5s var(--ease), color .5s var(--ease); }
.work .proj::before { content: ''; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; background: var(--pbg); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .7s var(--ease); }
.work .proj:hover { z-index: 2; }
.work .proj:hover::before, .work .proj.is-open::before { transform: scaleY(1); }
.work .proj:hover, .work .proj.is-open { color: var(--pfg); border-color: var(--pbg); }
.work .proj.is-open { box-shadow: 0 40px 80px -40px color-mix(in srgb, var(--pbg) 70%, transparent); }
.work .proj:is(:hover, .is-open) :is(.proj__num, .proj__lead, .meta dt, .psi dt, .dvisual figcaption) { color: color-mix(in srgb, var(--pfg) 62%, transparent); }
.work .proj:is(:hover, .is-open) .proj__kind span { border-color: color-mix(in srgb, var(--pfg) 28%, transparent); color: color-mix(in srgb, var(--pfg) 70%, transparent); }
.work .proj:is(:hover, .is-open) .proj__kind .chip--soon { color: var(--pac); border-color: var(--pac); }
.work .proj:is(:hover, .is-open) .proj__toggle { background: var(--pac); color: var(--pon); border-color: var(--pac); }
.work .proj.is-open .proj__intro { border-top-color: color-mix(in srgb, var(--pfg) 15%, transparent); }
.work .proj.is-open :is(.proj__cover, .dvisual__frame) { background: color-mix(in srgb, var(--pfg) 8%, transparent); }
.work .proj.is-open .btn--y { background: var(--pac); color: var(--pon); }
.work .proj.is-open .btn--y::before, .work .proj.is-open .btn--line::before { background: var(--pfg); }
.work .proj.is-open :is(.btn--y, .btn--line):hover { color: var(--pbg); }
.work .proj.is-open .btn--line { color: var(--pfg); border-color: color-mix(in srgb, var(--pfg) 35%, transparent); }
.work .proj.is-open .dtabs { background: color-mix(in srgb, var(--pfg) 6%, transparent); border-color: color-mix(in srgb, var(--pfg) 14%, transparent); }
.work .proj.is-open .dtabs__hint, .work .proj.is-open .dvisual figcaption::before { color: var(--pac); }
.work .proj.is-open .dtab { background: color-mix(in srgb, var(--pfg) 8%, transparent); border-color: color-mix(in srgb, var(--pfg) 16%, transparent); color: var(--pfg); }
.work .proj.is-open .dtab .dtab__n { background: color-mix(in srgb, var(--pfg) 12%, transparent); color: var(--pfg); }
.work .proj.is-open .dtab:hover { border-color: color-mix(in srgb, var(--pfg) 45%, transparent); color: var(--pfg); }
.work .proj.is-open .dtab[aria-selected="true"] { background: var(--pac); color: var(--pon); border-color: var(--pac); }
.work .proj.is-open .dtab[aria-selected="true"] .dtab__n { background: var(--pon); color: var(--pac); }
.work .proj.is-open .psi div { border-top-color: color-mix(in srgb, var(--pfg) 15%, transparent); }
.work .proj.is-open .psi .s dt::before { background: var(--pac); }
.work .proj.is-open .psi .i dt::before { background: var(--pfg); outline: 0; }
.work .proj.is-open .psi .i dd { color: var(--pfg); background: none; box-shadow: inset 0 -.22em 0 color-mix(in srgb, var(--pac) 70%, transparent); }

/* cover that follows the cursor over a closed card */
.proj__float { position: absolute; left: 0; top: 0; z-index: 5; width: 260px; aspect-ratio: 16 / 10; margin: -81px 0 0 -130px; border-radius: 12px; overflow: hidden; pointer-events: none; opacity: 0; scale: .5; transition: opacity .35s var(--ease), scale .5s var(--ease); box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); background: var(--pac); color: var(--pon); display: grid; place-items: center; }
.proj__float img { width: 100%; height: 100%; object-fit: cover; }
.proj__float b { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: 34px; }
@media (hover: hover) and (pointer: fine) {
  .proj:not(.is-open):has(.proj__head:hover) .proj__float { opacity: 1; scale: 1; }
  .proj:not(.is-open):has(.proj__head:hover) .proj__thumb { opacity: 0; }
}
@media (hover: none), (pointer: coarse) { .proj__float { display: none; } }

/* ---------- Before / after: two mini-scenes ---------- */
.bax { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); margin-top: clamp(28px, 3vw, 44px); }
.bax__card { border-radius: 18px; padding: clamp(18px, 2vw, 28px); display: flex; flex-direction: column; gap: 18px; min-height: 300px; }
.bax__card--before { border: 1px dashed color-mix(in srgb, var(--pfg) 28%, transparent); background: color-mix(in srgb, var(--pfg) 5%, transparent); color: color-mix(in srgb, var(--pfg) 78%, transparent); }
.bax__card--after { background: var(--pac); color: var(--pon); }
.bax__tag { margin: 0; font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.bax__scene { flex: 1; display: grid; align-content: start; justify-items: start; gap: 8px; }
.bax__bit { font-size: 14px; padding: 8px 13px; border-radius: 14px 14px 14px 4px; background: color-mix(in srgb, var(--pfg) 10%, transparent); rotate: -1.5deg; }
.bax__bit:nth-child(even) { justify-self: end; border-radius: 14px 14px 4px 14px; rotate: 1.5deg; }
.bax__scene--flow { display: flex; flex-wrap: wrap; align-items: center; align-content: center; gap: 8px; }
.bax__step { padding: 11px 20px; border-radius: 999px; font-size: clamp(15px, 1.3vw, 18px); font-weight: 700; border: 1.5px solid color-mix(in srgb, var(--pon) 35%, transparent); }
.bax__step:last-child { background: var(--pon); color: var(--pac); border-color: var(--pon); }
.bax__link { display: block; width: 22px; height: 2px; background: currentColor; opacity: .5; }
.bax__stat { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.bax__stat b { font-size: clamp(38px, 4.2vw, 64px); font-weight: 900; letter-spacing: -.05em; line-height: .9; }
.bax__card--before .bax__stat b { text-decoration: line-through; text-decoration-thickness: .07em; text-decoration-color: color-mix(in srgb, var(--pfg) 55%, transparent); }
.bax__stat span { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.bax__text { margin: 0; font-size: 15px; line-height: 1.45; max-width: 46ch; }
.bax__card--before .bax__text { opacity: .8; }
.bax__arrow { display: grid; place-items: center; font-size: 30px; color: var(--pac); }
.bax__arrow span { display: inline-block; }
@media (max-width: 760px) {
  .bax { grid-template-columns: minmax(0, 1fr); }
  .bax__arrow { height: 48px; }
  .bax__arrow span { rotate: 90deg; }
  .bax__card { min-height: 0; }
}


/* ---------- v9: readable decision tabs + stronger Problem / Solution / Impact ---------- */
/* an old `.dtab span` rule made every span (incl. the title) 11px mono — reset the title */
.dtab .dtab__t { font-family: var(--f-sans); font-size: 17px; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; margin: 0; }
.dtab .dtab__arr { font-family: var(--f-sans); font-size: 18px; margin: 0; }
@media (max-width: 960px) { .dtab .dtab__t { font-size: 15px; } }

.work .psi div { padding: 18px 0; }
.work .proj .psi dt { font-family: var(--f-sans); font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: inherit; gap: 10px; margin-bottom: 8px; }
.work .proj .psi dt::before { width: 12px; height: 12px; border-radius: 3px; }
.work .proj .psi dd { font-size: 17px; line-height: 1.45; }
.work .proj.is-open .psi .i dd { display: block; box-shadow: none; background: none; font-weight: 600; }

/* ---------- v10: watercolour brush layer (js/brush.js) — hero + footer ---------- */
.brush { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.contact > .brush { z-index: 0; }
.contact > .fnav, .contact > .contact__grid { position: relative; z-index: 1; }

/* ---------- v11: brush under Work + About ---------- */
.brush--fixed { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; }
.work > .wrap, .about > .wrap { position: relative; z-index: 1; }
.marquee { position: relative; }

/* ---------- v11: floating pill navigation, frosted glass once you scroll ---------- */
.nav {
  top: clamp(16px, 1.8vw, 26px); left: var(--gutter); right: var(--gutter);
  max-width: 1240px; margin-inline: auto;
  padding: 10px 10px 10px 26px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .6s var(--ease), background-color .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease), backdrop-filter .5s var(--ease);
}
.nav.is-hidden { transform: translateY(calc(-100% - 40px)); }
.nav.is-glass {
  mix-blend-mode: normal; color: var(--paper);
  background-color: rgba(18, 18, 24, .5);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 12px 40px -14px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.nav.is-glass .nav__status { border-color: rgba(255, 255, 255, .25); }
@media (max-width: 760px) { .nav { padding: 8px 8px 8px 18px; } }

/* ---------- v12: dark gallery room ---------- */
.gallery { background: #0E0E11; color: var(--paper); }
.gallery__intro::before { background: radial-gradient(closest-side, rgba(14,14,17,.9) 40%, rgba(14,14,17,0)); }
.gallery__intro .label, .gallery__now .label, .gallery__end .label { color: var(--yellow); }
.gallery__title em { color: var(--yellow); }
.gallery__hint { color: var(--muted); }
.gallery__track { background: var(--line); }
.gallery__track i { background: var(--yellow); }

/* ---------- v13: "gallery" as a flickering yellow neon sign ---------- */
.gallery__title em {
  color: #FFF7C2;                                       /* hot core of the tube */
  text-shadow:
    0 0 2px #FFFBE0,
    0 0 8px #FFE500,
    0 0 18px #FFE500,
    0 0 42px rgba(255, 229, 0, .75),
    0 0 90px rgba(255, 210, 0, .45);
  animation: neon-flicker 7s linear infinite;
}
/* mostly steady, with a couple of short, irregular stutters */
@keyframes neon-flicker {
  0%, 7%, 9.5%, 11%, 54%, 56.5%, 100% { opacity: 1; text-shadow: 0 0 2px #FFFBE0, 0 0 8px #FFE500, 0 0 18px #FFE500, 0 0 42px rgba(255,229,0,.75), 0 0 90px rgba(255,210,0,.45); }
  8%, 10%, 55% { opacity: .55; text-shadow: 0 0 2px rgba(255,229,0,.4), 0 0 6px rgba(255,229,0,.25); }
  8.6%, 55.6% { opacity: .9; }
}
@media (prefers-reduced-motion: reduce) { .gallery__title em { animation: none; } }

/* ---------- v14: lightbox = the painting alone in a dark room under two spotlights ---------- */
.lightbox {
  color: var(--paper); backdrop-filter: none; overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 30%, rgba(5,5,7,.92) 85%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='56'%3E%3Crect width='96' height='56' fill='%230a0a0d'/%3E%3Cg fill='%23161519'%3E%3Crect x='1' y='1' width='46' height='26' rx='2'/%3E%3Crect x='49' y='1' width='46' height='26' rx='2'/%3E%3Crect x='-23' y='29' width='46' height='26' rx='2'/%3E%3Crect x='25' y='29' width='46' height='26' rx='2'/%3E%3Crect x='73' y='29' width='46' height='26' rx='2'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 96px 56px,
    #0a0a0d;
}
.lightbox__room { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.lightbox > :not(.lightbox__room) { position: relative; z-index: 1; }
.lightbox > .lightbox__close { position: absolute; }

/* warm pool on the wall behind the painting */
.lb-pool { position: absolute; left: 50%; top: 46%; width: min(1100px, 95vw); height: 92vh; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,226,184,.30), rgba(255,214,160,.12) 55%, transparent); mix-blend-mode: screen; opacity: 0; }

/* lamps on the ceiling */
.lb-lamp { position: absolute; top: -6px; width: 34px; height: 46px; border-radius: 6px 6px 14px 14px; background: linear-gradient(#2a2a30, #121215); box-shadow: 0 2px 0 rgba(255,255,255,.05) inset; }
.lb-lamp::after { content: ''; position: absolute; left: 6px; right: 6px; bottom: -3px; height: 6px; border-radius: 50%; background: #fff3dc; box-shadow: 0 0 14px 4px rgba(255,226,184,.8); opacity: 0; transition: opacity .2s; }
.lb-lamp--l { left: calc(50% - 30vw); rotate: -40deg; transform-origin: top center; }
.lb-lamp--r { right: calc(50% - 30vw); rotate: 40deg; transform-origin: top center; }

/* visible beams with slowly drifting dust */
.lb-beam { position: absolute; top: 18px; width: 46vw; height: 96vh; transform-origin: 50% 0; opacity: 0; mix-blend-mode: screen; filter: blur(5px);
  clip-path: polygon(47% 0, 53% 0, 100% 100%, 0 100%);
  background:
    radial-gradient(circle, rgba(255,244,222,.8) 0 1px, transparent 1.6px) 0 0 / 41px 57px,
    radial-gradient(circle, rgba(255,244,222,.55) 0 1px, transparent 1.6px) 13px 21px / 67px 43px,
    linear-gradient(rgba(255,228,190,.32), rgba(255,228,190,.10) 60%, rgba(255,228,190,0));
  animation: lb-dust 26s linear infinite; }
.lb-beam--l { left: calc(50% - 30vw - 23vw + 17px); rotate: -40deg; }
.lb-beam--r { right: calc(50% - 30vw - 23vw + 17px); rotate: 40deg; animation-direction: reverse; }
@keyframes lb-dust { to { background-position: 41px -114px, 80px -65px, 0 0; } }

/* painting: dark until the lights come on */
.lightbox__img img, .lightbox__img canvas { box-shadow: 0 0 0 10px #141416, 0 40px 80px rgba(0,0,0,.7), 0 0 120px rgba(255,214,160,.12); filter: brightness(.12); }
.lightbox.is-lit .lightbox__img img, .lightbox.is-lit .lightbox__img canvas { animation: lb-on 1.1s steps(1, end) forwards, lb-warm 1.4s .5s ease-out forwards; }
.lightbox.is-lit .lb-beam { animation: lb-dust 26s linear infinite, lb-flick 1.1s steps(1, end) forwards; }
.lightbox.is-lit .lb-beam--r { animation-direction: reverse, normal; }
.lightbox.is-lit .lb-pool { animation: lb-flick 1.1s steps(1, end) forwards; }
.lightbox.is-lit .lb-lamp::after { opacity: 1; }
/* lamps stutter on: off · on · off · on */
@keyframes lb-flick { 0% { opacity: 0; } 18% { opacity: .8; } 26% { opacity: .1; } 38% { opacity: 1; } 46% { opacity: .35; } 60%, 100% { opacity: 1; } }
@keyframes lb-on { 0% { filter: brightness(.12); } 18% { filter: brightness(.8); } 26% { filter: brightness(.25); } 38% { filter: brightness(1); } 46% { filter: brightness(.5); } 60%, 100% { filter: brightness(1); } }
@keyframes lb-warm { from { filter: brightness(1); } to { filter: brightness(1.04) saturate(1.04); } }

/* caption and controls on dark */
.lightbox figcaption .label { color: var(--yellow); }
.lightbox figcaption span:last-child { color: var(--muted); }
.lightbox__close, .lightbox__nav { border-color: rgba(243,239,231,.25); color: var(--paper); background: rgba(10,10,13,.4); }
.lightbox__close:hover, .lightbox__nav:hover { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }

@media (max-width: 760px) {
  .lb-lamp--l { left: 8vw; } .lb-lamp--r { right: 8vw; }
  .lb-beam { width: 80vw; } .lb-beam--l { left: calc(8vw - 40vw + 17px); rotate: -18deg; } .lb-beam--r { right: calc(8vw - 40vw + 17px); rotate: 18deg; }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox.is-lit .lightbox__img img, .lightbox.is-lit .lightbox__img canvas { animation: none; filter: none; }
  .lightbox.is-lit .lb-beam, .lightbox.is-lit .lb-pool { animation: none; opacity: 1; }
}

/* =====================================================================
   v15 — light as the motif across the site (matches the night gallery)
   ===================================================================== */

/* shared neon glow */
.neon-yellow, .hero__title em {
  --glow: 0 0 2px #FFFBE0, 0 0 8px #FFE500, 0 0 18px #FFE500, 0 0 42px rgba(255,229,0,.7), 0 0 90px rgba(255,210,0,.4);
}
.neon-blue {
  --glow: 0 0 2px #E4E4FF, 0 0 8px #6F6DFF, 0 0 20px #3D3BFF, 0 0 46px rgba(61,59,255,.8), 0 0 100px rgba(61,59,255,.5);
}

/* ---------- Hero: a single spot lamp over the stack, "paints" in neon ---------- */
.hero__title em { color: #FFF7C2; text-shadow: var(--glow); animation: neon-stutter 9s linear infinite 2.5s; }
.hero__spot { --spot: 1; position: absolute; inset: 0; pointer-events: none; opacity: 0; animation: lb-flick 1.2s steps(1, end) 1.1s forwards; }
.hero__spot > i { position: absolute; display: block; opacity: var(--spot); }
.hero__spot-lamp { left: 72%; top: -8px; width: 46px; height: 58px; translate: -50% 0; border-radius: 6px 6px 18px 18px; background: linear-gradient(#2a2a30, #121215); }
.hero__spot-lamp::after { content: ''; position: absolute; left: 7px; right: 7px; bottom: -4px; height: 8px; border-radius: 50%; background: #fff3dc; box-shadow: 0 0 18px 6px rgba(255,226,184,.85); }
.hero__spot-beam { left: 72%; top: 40px; width: min(56vw, 860px); height: 92vh; translate: -50% 0; mix-blend-mode: screen; filter: blur(6px);
  clip-path: polygon(47% 0, 53% 0, 92% 100%, 8% 100%);
  background:
    radial-gradient(circle, rgba(255,244,222,.8) 0 1px, transparent 1.6px) 0 0 / 43px 61px,
    radial-gradient(circle, rgba(255,244,222,.5) 0 1px, transparent 1.6px) 17px 23px / 71px 47px,
    linear-gradient(rgba(255,228,190,.26), rgba(255,228,190,.08) 65%, transparent);
  animation: lb-dust 30s linear infinite; }
.hero__spot-pool { left: 72%; top: 50%; width: min(60vw, 900px); height: 70vh; translate: -50% -50%; border-radius: 50%; mix-blend-mode: screen;
  background: radial-gradient(closest-side, rgba(255,226,184,.20), rgba(255,214,160,.07) 60%, transparent); }
@media (max-width: 760px) {
  .hero__spot-lamp, .hero__spot-beam, .hero__spot-pool { left: 50%; }
  .hero__spot-pool { top: 32%; height: 50vh; }
  .hero__spot-beam { height: 60vh; width: 110vw; }
}

/* ---------- Marquee: an LED ticker ---------- */
.marquee { background: radial-gradient(circle, rgba(255,255,255,.045) 1.2px, transparent 1.7px) 0 0 / 5px 5px, #060608; border-color: rgba(255,255,255,.06); padding: 18px 0; }
.marquee__track { color: #FFE866; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; text-shadow: 0 0 3px #FFF6C0, 0 0 10px rgba(255,214,40,1), 0 0 22px rgba(255,190,0,.7);
  -webkit-mask-image: radial-gradient(circle, #000 1.9px, rgba(0,0,0,.35) 2.2px, transparent 2.5px); -webkit-mask-size: 5px 5px;
  mask-image: radial-gradient(circle, #000 1.9px, rgba(0,0,0,.35) 2.2px, transparent 2.5px); mask-size: 5px 5px; }
.marquee__track .serif { color: #FFF2B0; text-transform: none; font-weight: 400; }
.marquee__track b { color: #6F6DFF; text-shadow: 0 0 8px rgba(111,109,255,.9); }

/* ---------- Work: every card is a lit display case ---------- */
.work .proj::after { content: ''; position: absolute; inset: -1px; z-index: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .6s var(--ease);
  background:
    linear-gradient(90deg, transparent 15%, color-mix(in srgb, var(--pac) 90%, white) 50%, transparent 85%) top / 100% 2px no-repeat,
    radial-gradient(70% 120px at 50% 0, color-mix(in srgb, var(--pac) 30%, transparent), transparent 100%);
  mix-blend-mode: screen; }
.work .proj:hover::after, .work .proj.is-open::after { opacity: 1; }
.work .proj > * { position: relative; z-index: 1; }
.work .proj > .proj__float { position: absolute; z-index: 5; }
.work .proj:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--pac) 40%, transparent), 0 30px 70px -30px color-mix(in srgb, var(--pac) 55%, transparent); }
.work .proj.is-open { box-shadow: 0 0 0 1px color-mix(in srgb, var(--pac) 30%, transparent), 0 50px 100px -40px color-mix(in srgb, var(--pac) 45%, transparent); }
/* the open project's cover hangs like a painting in its own light */
.work .proj.is-open .proj__cover { box-shadow: 0 0 0 8px color-mix(in srgb, var(--pfg) 6%, transparent), 0 0 90px -10px color-mix(in srgb, var(--pac) 40%, transparent); }

/* ---------- About: night desk under a lamp that follows the cursor ---------- */
.tile--desk { background: #121216; }
.desk { --lx: 55%; --ly: 40%; background:
  radial-gradient(circle, rgba(255,255,255,.09) 1.1px, transparent 1.6px) 0 0 / 22px 22px,
  #17171c; }
.desk__dark { position: absolute; inset: 0; z-index: 5000; pointer-events: none; border-radius: inherit;
  background:
    radial-gradient(circle at var(--lx) var(--ly), rgba(255,222,170,.16), transparent 230px),
    radial-gradient(circle at var(--lx) var(--ly), transparent 120px, rgba(6,6,9,.55) 260px, rgba(6,6,9,.82) 420px); }
.desk__item.is-drag { outline-color: var(--yellow); }
.desk__hint { z-index: 5001; background: var(--yellow); color: var(--ink); }

/* ---------- Footer: neon wordmark ---------- */
.contact__wordmark .nl { color: transparent; -webkit-text-stroke: 1.5px rgba(243,239,231,.14); transition: color .08s, text-shadow .08s, -webkit-text-stroke-color .08s; }
.contact__wordmark .nl.is-on { color: #FFF7C2; -webkit-text-stroke-color: transparent; text-shadow: var(--glow); }
.contact__wordmark .neon-blue .nl.is-on { color: #E8E8FF; }
.contact__wordmark .nl--broken.is-on { animation: neon-stutter 4.5s linear infinite 1s; }
/* colour-neutral stutter: only brightness changes, so it works for any neon colour */
@keyframes neon-stutter { 0%, 7%, 9.5%, 11%, 54%, 56.5%, 100% { opacity: 1; } 8%, 10%, 55% { opacity: .35; } 8.6%, 55.6% { opacity: .85; } }
.contact__wordmark .serif { opacity: 1; }

/* glowing balls, like bulbs */
.ball--blue { box-shadow: 0 0 0 1px rgba(111,109,255,.6), 0 0 34px rgba(61,59,255,.65), 0 14px 30px -12px rgba(0,0,0,.6); }
.ball--yellow { box-shadow: 0 0 34px rgba(255,229,0,.55), 0 14px 30px -12px rgba(0,0,0,.6); }
.ball--paper { box-shadow: 0 0 28px rgba(243,239,231,.3), 0 14px 30px -12px rgba(0,0,0,.6); }
.ball--outline { box-shadow: 0 0 18px rgba(243,239,231,.25), inset 0 0 14px rgba(243,239,231,.15); }

@media (prefers-reduced-motion: reduce) {
  .hero__spot { animation: none; opacity: 1; }
  .hero__spot-beam, .hero__title em, .contact__wordmark .nl--broken.is-on { animation: none; }
}

/* ---------- v16: hero lines stop clipping once revealed (neon glow can spill out) ---------- */
.hero__title.is-revealed .line { overflow: visible; }

/* =====================================================================
   v17: neon everywhere it matters
   ===================================================================== */

/* Marquee: real neon tubes instead of an LED dot-matrix */
.marquee { background: #060608; }
.marquee__track { -webkit-mask-image: none; mask-image: none; color: #FFF7C2;
  text-shadow: 0 0 2px #FFFBE0, 0 0 8px #FFE500, 0 0 18px #FFE500, 0 0 40px rgba(255,229,0,.6); }
.marquee__track .serif { color: #E8E8FF; text-shadow: 0 0 2px #E4E4FF, 0 0 8px #6F6DFF, 0 0 20px #3D3BFF, 0 0 44px rgba(61,59,255,.8); }
.marquee__track b { color: #E8E8FF; text-shadow: 0 0 6px #6F6DFF, 0 0 16px #3D3BFF; }

/* split words open up after the reveal, so glow isn't cut into rectangles */
[data-split].is-revealed .w { overflow: visible; }

/* Selected work: "work" = blue neon, flickering (light section → saturated tube) */
.work .sec-title em { color: #4B49FF;
  text-shadow: 0 0 1px #9C9BFF, 0 0 8px rgba(75,73,255,.85), 0 0 22px rgba(61,59,255,.6), 0 0 48px rgba(61,59,255,.4);
  animation: neon-stutter 7s linear infinite 1.5s; }

/* About: bigger intro, "the way I paint." = yellow neon, closer to the bento */
.about__head { margin-bottom: clamp(14px, 1.6vw, 24px); }
.about__hi { max-width: 1300px; font-size: clamp(48px, 7.2vw, 128px); line-height: .95; letter-spacing: -.05em; }
.about .about__hi em { color: #FFF7C2; text-shadow: 0 0 2px #FFFBE0, 0 0 8px #FFE500, 0 0 18px #FFE500, 0 0 42px rgba(255,229,0,.7), 0 0 90px rgba(255,210,0,.4); animation: neon-stutter 8s linear infinite 3s; }

/* Footer: the tagline is the neon sign now */
.contact__title { color: #E8E8FF; text-shadow: var(--glow); }
.contact__title em { color: #FFF7C2; --glow: 0 0 2px #FFFBE0, 0 0 8px #FFE500, 0 0 18px #FFE500, 0 0 42px rgba(255,229,0,.7), 0 0 90px rgba(255,210,0,.4);
  text-shadow: var(--glow); animation: neon-stutter 6s linear infinite 2s; }

/* no wordmark in the pit → bigger balls */
.ball--lg { width: clamp(170px, 17vw, 260px); height: clamp(170px, 17vw, 260px); }
.ball--md { width: clamp(130px, 12.5vw, 200px); height: clamp(130px, 12.5vw, 200px); }
.ball--sm { width: clamp(108px, 9.5vw, 150px); height: clamp(108px, 9.5vw, 150px); }
.ball__t { font-size: clamp(32px, 3.2vw, 54px); }
.ball--sm .ball__t { font-size: clamp(20px, 1.9vw, 28px); }
.ball__s { font-size: 11px; }
@media (max-width: 760px) {
  .ball--lg { width: 136px; height: 136px; } .ball--md { width: 108px; height: 108px; } .ball--sm { width: 90px; height: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  .work .sec-title em, .about .about__hi em, .contact__title em { animation: none; }
}

/* =====================================================================
   v18: bento row fix + Toolbox ball pit
   ===================================================================== */
/* hover lift uses `translate`, so it never fights GSAP's `transform` reveal */
.tile { transition: translate .5s var(--ease), box-shadow .5s var(--ease), border-color .4s; }
.tile:not(.tile--desk):hover { transform: none; translate: 0 -4px; }
.tile--tools:hover { translate: none; }

/* last row: Based in · Numbers · Toolbox (wide) */
.tile--loc, .tile--num { grid-column: span 3; }
.tile--tools { grid-column: span 6; min-height: 210px; padding: 0; }
.tile--tools > .label { position: absolute; left: clamp(18px, 2vw, 26px); top: clamp(18px, 2vw, 26px); z-index: 2; pointer-events: none; }
.tpit__hint { position: absolute; right: clamp(18px, 2vw, 26px); top: clamp(18px, 2vw, 26px); z-index: 2; margin: 0 !important; pointer-events: none; }
.tpit { position: absolute; inset: 0; overflow: hidden; touch-action: pan-y; list-style: none; margin: 0; padding: 0; }
.tpit.is-grabbing, .tpit.is-grabbing .ball { cursor: grabbing; }
.tball { width: 96px; height: 96px; padding: 8px; font-size: 14px; font-weight: 800; letter-spacing: -.01em; line-height: 1.05; }
.tball--sm { width: 78px; height: 78px; font-size: 13px; }
.tball--serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: 19px; }
.tball--blue { background: var(--blue); color: var(--paper); box-shadow: 0 0 22px rgba(61,59,255,.45), 0 10px 20px -10px rgba(0,0,0,.4); }
.tball--yellow { background: var(--yellow); color: var(--ink); box-shadow: 0 0 22px rgba(255,229,0,.5), 0 10px 20px -10px rgba(0,0,0,.35); }
.tball--ink { background: var(--ink); color: var(--paper); box-shadow: 0 10px 20px -10px rgba(0,0,0,.5); }
.tball--outline { background: transparent; color: var(--ink); border: 2px solid var(--ink); box-shadow: none; }
/* no physics (reduced motion / no Matter.js): show them as a neat row */
.tpit.pit--static { display: flex; flex-wrap: wrap; align-content: flex-end; justify-content: center; gap: 6px; padding: 54px 16px 16px; }
.tpit.pit--static .ball { position: relative; }

@media (max-width: 1100px) {
  .tile--loc, .tile--num { grid-column: span 6; }
  .tile--tools { grid-column: span 12; }
}
@media (max-width: 760px) {
  .tile--tools { min-height: 240px; }
}
/* phones: the bento is one column — every tile spans it (no implicit extra columns) */
@media (max-width: 640px) {
  .tile--loc, .tile--num, .tile--tools { grid-column: 1 / -1; }
}

/* =====================================================================
   v19: QA pass — mobile & accessibility fixes
   ===================================================================== */
/* toast: fully hidden when idle (an empty pill used to peek above the bottom edge) */
.toast { visibility: hidden; opacity: 0; transition: transform .5s var(--ease), opacity .3s, visibility 0s .5s; }
.toast.is-on { visibility: visible; opacity: 1; transition: transform .5s var(--ease), opacity .3s; }

/* Toolbox hint sits on the right, and only where throwing works (mouse) */
.tile--tools > .tpit__hint { left: auto; }
@media (hover: none), (max-width: 760px) { .tpit__hint { display: none; } }

/* active decision tab: the arrow takes the tab's text colour, not yellow-on-accent */
.work .proj.is-open .dtab[aria-selected="true"] .dtab__arr { color: var(--pon); }

/* before/after slider is keyboard-operable — show where focus is */
.compare:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.compare:focus-visible .compare__handle span { box-shadow: 0 0 0 4px var(--yellow), 0 6px 20px rgba(0,0,0,.3); }

/* phones */
@media (max-width: 480px) {
  /* the "Court — Time — Book" flow fits one line: no orphaned dash */
  .bax__scene--flow { gap: 6px; }
  .bax__step { padding: 9px 13px; font-size: 14px; }
  .bax__link { width: 12px; }
  /* footer menu on a single row */
  .fnav { flex-wrap: nowrap; justify-content: space-between; gap: 10px; }
  .fnav a { font-size: clamp(15px, 4.6vw, 19px); }
}
