/* GUIDANT STUDIO — portfolio (pacomepertant-style shell, logo-native palette)
   Tokens from the G mark: off-white paper, ultramarine ink, halftone motif. */

:root {
  --paper: #f2f1ec;
  --ink: #1e16ae;
  --ink-deep: #150f85;
  --ink-soft: #6b66c2;
  --line: #d6d4e6;
  --pop: #2418ff;
  --chip: rgba(250, 250, 248, .92);
  --chip-shadow: 0 6px 26px rgba(21, 15, 133, .16), 0 1px 2px rgba(21, 15, 133, .1);
  /* one voice for language, one for data — mono is signal, not decoration */
  --sans: "Instrument Sans", system-ui, sans-serif;
  --data: "Geist Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
@media (hover: hover) and (pointer: fine) {
  body, body a, body button { cursor: none; }
}

button {
  background: none; border: 0; color: inherit;
  font: inherit;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--paper); }

/* halftone dot texture (logo motif) */
.halftone {
  background-image: radial-gradient(circle, currentColor 1px, transparent 1.15px);
  background-size: 7px 7px;
}

/* big display style — single sans system, weight does the talking */
.display {
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

/* ── preloader ─────────────────────────────── */
.loader {
  position: fixed; inset: 0; z-index: 90;
  background: var(--ink); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
}
.loader::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 28vh; opacity: .25;
  background-image: radial-gradient(circle, var(--paper) 1px, transparent 1.15px);
  background-size: 8px 8px;
  -webkit-mask-image: linear-gradient(to top, #000, transparent);
  mask-image: linear-gradient(to top, #000, transparent);
}
/* brand G — one PNG mask, painted with currentColor wherever it sits */
.gmark {
  display: block;
  background: currentColor;
  -webkit-mask: url(/assets/gmark.png) center / contain no-repeat;
  mask: url(/assets/gmark.png) center / contain no-repeat;
}
.loader-mark {
  width: clamp(72px, 12vw, 140px); height: clamp(72px, 12vw, 140px);
  animation: gpulse 1.6s ease-in-out infinite;
}
@keyframes gpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.loader-pct {
  position: absolute; right: 4vw; bottom: 4vh;
  font-family: var(--data); font-size: 13px; opacity: .7;
}
.loader-pct::after { content: "%"; }

/* ── intro / entry ─────────────────────────── */
.intro {
  position: fixed; inset: 0; z-index: 80;
  background: var(--paper);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6vh;
  text-align: center;
}
.intro-tag {
  font-weight: 600; letter-spacing: -0.03em;
  font-size: clamp(22px, 3.4vw, 38px);
  line-height: 1.25; color: var(--ink);
}
.intro-enter { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.intro-btn {
  font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: .01em;
  padding: 12px 28px; border-radius: 999px;
  transition: background .25s, color .25s, opacity .25s;
}
.enter-sound { border: 1px solid var(--ink); }
.enter-sound:hover { background: var(--ink); color: var(--paper); }
.enter-mute {
  position: absolute; bottom: 5vh; left: 50%; translate: -50% 0;
  opacity: .55; font-size: 12px;
}
.enter-mute:hover { opacity: 1; }

/* ── persistent chrome ─────────────────────── */
.chrome { position: fixed; left: 0; right: 0; z-index: 40; display: flex; align-items: center; padding: 0 28px; pointer-events: none; }
.chrome > * { pointer-events: auto; }
.chrome-top { top: 0; height: 72px; justify-content: space-between; }
.chrome-bottom { bottom: 0; height: 110px; justify-content: space-between; }

/* logo badge — top left, always legible over cards */
.brand {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  box-shadow: var(--chip-shadow);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.brand .gmark { width: 24px; height: 24px; }
.brand:hover { transform: rotate(-12deg) scale(1.06); }

/* view toggle — centered chip */
.view-toggle {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; gap: 12px; align-items: center;
  padding: 9px 18px; border-radius: 999px;
  background: var(--chip); backdrop-filter: blur(10px);
  box-shadow: var(--chip-shadow);
  font-weight: 600; font-size: 13.5px; letter-spacing: -0.01em;
  transition: opacity .3s;
}
.view-toggle button { color: var(--ink-soft); opacity: .55; transition: opacity .25s, color .25s; }
.view-toggle button:hover { opacity: 1; }
.view-toggle button.on { opacity: 1; color: var(--ink); }
.vt-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); opacity: .35; }
body[data-view="about"] .view-toggle,
body[data-view="project"] .view-toggle { opacity: 0; pointer-events: none; }

/* menu — chip with live dot */
.menu-btn {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 20px; border-radius: 999px;
  background: var(--chip); backdrop-filter: blur(10px);
  box-shadow: var(--chip-shadow);
  font-weight: 600; font-size: 13.5px; letter-spacing: -0.01em;
  transition: background .25s, color .25s;
}
.menu-btn i { width: 6px; height: 6px; border-radius: 50%; background: var(--pop); }
.menu-btn:hover { background: var(--ink); color: var(--paper); }
.menu-btn:hover i { background: var(--paper); }

.sound-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: var(--chip); backdrop-filter: blur(10px); box-shadow: var(--chip-shadow);
  transition: background .25s, color .25s;
}
.sound-btn:hover { background: var(--ink); color: var(--paper); }
.snd-bars rect { transform-origin: center; transition: transform .3s; }
body.muted .snd-bars rect { transform: scaleY(.25); }
body:not(.muted) .snd-bars rect:nth-child(1) { animation: eq 1s ease-in-out infinite alternate; }
body:not(.muted) .snd-bars rect:nth-child(2) { animation: eq 1s .2s ease-in-out infinite alternate; }
body:not(.muted) .snd-bars rect:nth-child(3) { animation: eq 1s .4s ease-in-out infinite alternate; }
body:not(.muted) .snd-bars rect:nth-child(4) { animation: eq 1s .6s ease-in-out infinite alternate; }
@keyframes eq { from { transform: scaleY(.35); } to { transform: scaleY(1); } }

.reel-badge {
  color: var(--ink); position: relative;
  display: grid; place-items: center; border-radius: 50%;
}
.reel-badge::before {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: var(--chip); backdrop-filter: blur(10px); box-shadow: var(--chip-shadow);
}
.reel-badge svg { animation: spin 14s linear infinite; display: block; position: relative; }
.reel-badge:hover svg { animation-duration: 5s; }
@keyframes spin { to { transform: rotate(360deg); } }
.reel-text { font-family: var(--data); font-size: 11.5px; letter-spacing: .22em; fill: currentColor; }

/* ── menu: chip morphs into a right-side panel (reference mechanic) ── */
:root {
  /* spring curve lifted from the reference build; the plain cubic-bezier
     line above each transition is the fallback for browsers without linear() */
  --spring: linear(0, .0014, .0055 1.03%, .0239, .053 3.44%, .0961 4.81%,
    .1957 7.39%, .4354 12.88%, .5484, .6494, .7362, .8083 23.88%, .8696,
    .9168 29.72%, .9368, .9536 32.81%, .9793 35.9%, .997 39.17%,
    1.0084 42.77%, 1.0142 47.07%, 1.0144 53.43%, 1.0054 68.37%,
    1.0019 77.3%, .9998 99.98%);
}

.menu-btn .menu-letters { display: inline-block; }
.menu-btn .letter { display: inline-block; will-change: transform; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
/* the chip only returns once the panel has finished collapsing onto it,
   otherwise both are visible at once and read as a doubled pill */
.menu-btn { transition: opacity .3s ease .68s, background .25s, color .25s; }
body.menu-open .menu-btn {
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease 0s, background .25s, color .25s;
}

.menu-dim {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(12, 9, 60, .45);
  opacity: 0; pointer-events: none; transition: opacity .55s;
}
.menu-dim.on { opacity: 1; pointer-events: auto; }

.menu-panel {
  position: fixed; top: 14px; right: 28px; z-index: 60;
  width: 108px; height: 44px; border-radius: 22px;
  background: #fbfaf6; overflow: hidden;
  box-shadow: 0 24px 70px rgba(21, 15, 133, .3);
  visibility: hidden; opacity: 0;
  /* collapses onto the chip, then hands off with a short crossfade */
  transition: width .9s cubic-bezier(.22, 1.1, .3, 1), height 1s cubic-bezier(.22, 1.1, .3, 1), border-radius .9s ease, opacity .28s ease .6s, visibility 0s linear 1s;
  transition: width .9s var(--spring), height 1s var(--spring), border-radius .9s ease, opacity .28s ease .6s, visibility 0s linear 1s;
}
.menu-panel.opened {
  visibility: visible; opacity: 1;
  width: min(460px, calc(100vw - 44px));
  height: calc(100dvh - 28px);
  border-radius: 18px;
  transition: width .9s cubic-bezier(.22, 1.1, .3, 1), height 1s cubic-bezier(.22, 1.1, .3, 1), border-radius .9s ease, opacity .12s ease;
  transition: width .9s var(--spring), height 1s var(--spring), border-radius .9s ease, opacity .12s ease;
}
/* content keeps the final panel size so nothing reflows during the morph */
.menu-inner {
  position: absolute; top: 0; right: 0;
  width: min(460px, calc(100vw - 44px)); height: calc(100dvh - 28px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 34px 44px;
}

.menu-close {
  position: absolute; top: 18px; right: 18px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: #fbfaf6;
  display: grid; place-items: center;
  transform: scale(.125); transform-origin: top right;
  transition: transform .8s cubic-bezier(.22, 1.1, .3, 1);
  transition: transform .8s var(--spring);
}
.menu-close svg { transform: rotate(-45deg); opacity: 0; transition: transform .5s ease, opacity .3s ease; }
.menu-panel.opened .menu-close { transform: scale(1); }
.menu-panel.opened .menu-close svg { transform: rotate(0deg); opacity: 1; }
.menu-close:hover svg { transform: rotate(90deg); }
/* "close" draws out beside the disc when open, leaves fast on close */
.menu-close .close-text {
  position: absolute; right: 58px; top: 50%;
  transform: translateY(-50%) translateX(18px);
  color: var(--ink); font-weight: 500; font-size: 15px; letter-spacing: -0.01em;
  opacity: 0; white-space: nowrap; pointer-events: none;
  transition: opacity .1s ease, transform .1s ease;
}
.menu-panel.opened .menu-close .close-text {
  opacity: 1; transform: translateY(-50%) translateX(0);
  transition: opacity .3s ease .25s, transform .35s var(--spring) .25s;
}

.menu-links { display: flex; flex-direction: column; gap: 2.6vh; }
.menu-links a {
  position: relative;
  font-weight: 500; letter-spacing: -0.05em;
  font-size: clamp(42px, 5.4vw, 64px);
  line-height: 1; width: fit-content; color: var(--ink);
  transition: padding-left .5s cubic-bezier(.22, 1.1, .3, 1);
  transition: padding-left .5s var(--spring);
}
/* hover: dot pops in, word shifts right (reference link treatment) */
.menu-links a::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--pop);
  opacity: 0; transform: translateY(-50%) scale(0);
  transition: transform .5s cubic-bezier(.22, 1.1, .3, 1), opacity .5s ease;
  transition: transform .5s var(--spring), opacity .5s ease;
}
@media (hover: hover) and (pointer: fine) {
  .menu-links a:hover { padding-left: 34px; }
  .menu-links a:hover::before { opacity: 1; transform: translateY(-50%) scale(1); }
}

/* content slides in after the morph, out instantly on close */
.menu-links a, .menu-foot { opacity: 0; transform: translate(12px, -8px); }
.menu-panel .menu-links a { transition-property: opacity, transform, padding-left; }
.menu-panel:not(.opened) .menu-links a,
.menu-panel:not(.opened) .menu-foot {
  transition: opacity .25s ease, transform .25s ease;
}
.menu-panel.opened .menu-links a,
.menu-panel.opened .menu-foot {
  opacity: 1; transform: translate(0, 0);
  transition: opacity .5s ease .35s, transform .5s ease .35s, padding-left .5s var(--spring);
}
.menu-panel.opened .menu-foot { transition: opacity .5s ease .45s, transform .5s ease .45s; }

.menu-foot {
  position: absolute; left: 0; bottom: 0; width: 100%;
  padding: 22px 24px 22px 44px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-weight: 500; font-size: 14px;
}
.menu-foot > a { color: var(--ink); }
.menu-foot > a:hover { color: var(--pop); }

/* icon socials — dark discs; hovering one shrinks the others */
.menu-socials { display: flex; gap: 8px; }
.menu-socials .social-link {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: #fbfaf6;
  display: grid; place-items: center;
  transition: transform .3s ease, background .3s ease, color .3s ease;
}
.menu-socials:has(.social-link:hover) .social-link:not(:hover) {
  background: #e3e1d9; color: var(--ink); transform: scale(.9);
}
.menu-socials .social-link:hover { background: var(--pop); }

/* ── views ─────────────────────────────────── */
.view { position: fixed; inset: 0; visibility: hidden; opacity: 0; }
.view.active { visibility: visible; opacity: 1; }

/* works / spiral */
.view-works { z-index: 10; }
#glCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-x; }
/* cards dissolve into paper at screen edges (their #444 fog pass, CSS-cheap) */
.view-works::before, .view-works::after {
  content: ""; position: absolute; left: 0; right: 0; height: 18vh;
  z-index: 2; pointer-events: none;
}
.view-works::before { top: 0; background: linear-gradient(to bottom, var(--paper) 12%, transparent); }
.view-works::after { bottom: 0; background: linear-gradient(to top, var(--paper) 12%, transparent); }
/* card pill — thumbnail + title only, always readable over artwork */
.card-pill {
  position: absolute; left: 50%; bottom: 12vh;
  z-index: 5; display: flex; align-items: center; gap: 15px;
  padding: 10px 30px 10px 10px; border-radius: 999px;
  background: var(--chip); backdrop-filter: blur(12px);
  box-shadow: var(--chip-shadow);
  text-transform: none;
  opacity: 0; translate: -50% 14px;
  transition: opacity .35s, translate .35s cubic-bezier(.22,1,.36,1), background .25s, color .25s;
}
.card-pill.show { opacity: 1; translate: -50% 0; }
.card-pill:hover { background: var(--ink); color: var(--paper); }
.pill-thumb {
  width: 60px; height: 44px; object-fit: cover;
  border-radius: 14px; background: var(--line); flex: none;
}
.pill-title {
  font-weight: 600; font-size: 21px; letter-spacing: -0.02em;
  white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis;
}
.card-pill.pop { animation: pillPop .4s cubic-bezier(.22,1,.36,1); }
@keyframes pillPop { 0% { scale: .94; } 60% { scale: 1.03; } 100% { scale: 1; } }
body[data-mode="list"] .card-pill { display: none; }
body[data-mode="list"] #glCanvas { opacity: 0; pointer-events: none; }
#glCanvas { transition: opacity .45s; }

/* works / list */
.list {
  position: absolute; inset: 0; overflow-y: auto;
  padding: 11vh 8vw 12vh;
  display: flex; flex-direction: column; justify-content: center;
  visibility: hidden; opacity: 0; transition: opacity .35s;
  scrollbar-width: thin;
  z-index: 4;
}
body[data-mode="list"] .list { visibility: visible; opacity: 1; }
.list-rows {
  list-style: none; display: flex; flex-direction: column; align-items: center; gap: .4vh;
  position: relative; z-index: 2; /* titles ride above the peek card */
}
.list-rows a {
  display: block; padding: 8px 4px; text-align: center;
  transition: color .25s, opacity .3s;
}
.list-rows .li-title {
  font-weight: 600; letter-spacing: -0.035em; line-height: 1.06;
  font-size: clamp(28px, 4vw, 54px);
  display: inline-block;
  transition: transform .35s cubic-bezier(.22,1,.36,1);
}
/* everything dims while one title is peeked */
.list-rows.peeking a { opacity: .3; }
.list-rows.peeking a.on { opacity: 1; color: var(--pop); }
.list-rows a.on .li-title { transform: scale(1.04); }
/* paper glow keeps titles readable wherever the card passes behind them */
.list-rows.peeking .li-title { text-shadow: 0 0 18px var(--paper), 0 0 7px var(--paper); }
.list-rows.peeking a.on .li-title {
  text-shadow: 0 0 26px var(--paper), 0 0 12px var(--paper), 0 0 4px var(--paper);
}

/* peek card trails the cursor, sitting behind the titles */
.list-peek {
  position: fixed; top: 0; left: 0; z-index: 1;
  width: min(340px, 30vw); aspect-ratio: 16/10;
  margin: 0 0 0 0; pointer-events: none;
  opacity: 0; scale: .92;
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(21, 15, 133, .22);
  transition: opacity .35s, scale .45s cubic-bezier(.22,1,.36,1);
}
.list-peek.show { opacity: 1; scale: 1; }
/* light paper veil — enough to keep titles legible, keeps the art vivid */
.list-peek::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: rgba(242, 241, 236, .28);
}
.peek-layer {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  opacity: 0;
}

/* about */
.view-about { z-index: 20; background: var(--paper); overflow-y: auto; }
.about-inner { max-width: 880px; margin: 0 auto; padding: 18vh 6vw 12vh; }
.about-bio {
  font-weight: 600; letter-spacing: -0.03em;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.22;
}
/* two shades stay as they are; a thin marker rule carries the emphasis */
.about-bio em {
  font-style: normal; color: var(--pop);
  background: linear-gradient(to top, rgba(36, 24, 255, .45) 0 2.5px, transparent 2.5px);
  background-position: 0 -.06em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.about-services { list-style: none; margin-top: 8vh; border-top: 1px solid var(--line); }
.about-services li {
  display: grid; grid-template-columns: 44px 180px 1fr;
  align-items: baseline; gap: 12px;
  padding: 16px 4px; border-bottom: 1px solid var(--line);
}
.about-services em { font-style: normal; font-family: var(--data); font-size: 11px; letter-spacing: .06em; color: var(--ink-soft); }
.about-services b { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.about-services span { font-family: var(--sans); font-size: 14px; letter-spacing: -0.005em; color: var(--ink-soft); }
@media (max-width: 640px) {
  .about-services li { grid-template-columns: 34px 1fr; }
  .about-services span { grid-column: 2; }
}
.about-index { list-style: none; margin-top: 10vh; border-top: 1px solid var(--line); }
.about-index a {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 16px 4px; border-bottom: 1px solid var(--line);
  font-family: var(--sans); font-size: 14px; letter-spacing: -0.005em;
}
.about-index a b { font-family: var(--sans); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.about-index a span { opacity: .5; transition: opacity .2s, color .2s; }
.about-index a:hover span { opacity: 1; color: var(--pop); }
.about-socials { display: flex; gap: 22px; margin-top: 8vh; font-family: var(--sans); font-size: 14px; letter-spacing: -0.005em; }
.about-socials .social-link { display: inline-flex; align-items: center; gap: 10px; }
.about-socials .social-ico {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: #fbfaf6;
  display: grid; place-items: center;
  transition: transform .3s ease, background .3s ease, color .3s ease;
}
.about-socials .social-ico svg { width: 15px; height: 15px; }
.about-socials .social-link span { border-bottom: 1px solid transparent; transition: border-color .2s; }
.about-socials:has(.social-link:hover) .social-ico { background: #e3e1d9; color: var(--ink); transform: scale(.9); }
.about-socials .social-link:hover .social-ico { background: var(--pop); color: #fbfaf6; transform: scale(1); }
.about-socials .social-link:hover span { border-bottom-color: var(--ink); }
.about-credits { margin-top: 6vh; font-family: var(--sans); font-size: 13px; letter-spacing: -0.005em; color: var(--ink-soft); }

/* ── project preview: the live site, near-fullscreen ── */
.preview {
  position: fixed; inset: 0; z-index: 65;
  background: #0b0a1c;
  opacity: 0; visibility: hidden;
  transition: opacity .45s ease, visibility 0s linear .45s;
}
.preview.open {
  opacity: 1; visibility: visible;
  transition: opacity .45s ease;
}
.preview-frame {
  position: absolute; inset: 14px;
  width: calc(100% - 28px); height: calc(100% - 28px);
  border: 0; border-radius: 12px; background: #fff;
  transform: scale(.985); opacity: 0;
  transition: transform .6s cubic-bezier(.22, 1, .36, 1), opacity .45s ease;
}
.preview.open .preview-frame { transform: scale(1); opacity: 1; }
.preview-frame[hidden] { display: none; }

.preview-missing[hidden], .preview-open[hidden] { display: none; }
.preview-missing {
  position: absolute; inset: 14px; border-radius: 12px;
  background: var(--paper); color: var(--ink);
  display: grid; place-content: center; text-align: center; gap: 10px;
}
.preview-missing p { font-weight: 600; font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.03em; }
.preview-missing span { font-family: var(--sans); font-size: 14px; letter-spacing: -0.005em; color: var(--ink-soft); }
.preview-missing code { color: var(--pop); }

/* only the close disc floats over the framed site */
.preview-close {
  position: absolute; top: 36px; right: 38px; z-index: 2;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: #fbfaf6;
  box-shadow: 0 10px 30px rgba(8, 6, 40, .45);
  opacity: 0; transform: scale(.6);
  transition: transform .5s var(--spring) .15s, opacity .3s ease .15s, background .25s;
}
.preview.open .preview-close { opacity: 1; transform: scale(1); }
.preview-close:hover { background: var(--pop); }
.preview-close:hover svg { transform: rotate(90deg); }
.preview-close svg { transition: transform .4s ease; }

/* title pill doubles as "open in a new tab" */
.preview-label {
  position: absolute; left: 38px; bottom: 34px; z-index: 2;
  display: flex; align-items: center; gap: 9px;
  padding: 11px 20px; border-radius: 999px;
  background: var(--chip); color: var(--ink);
  font-weight: 600; font-size: 15px; letter-spacing: -0.015em;
  box-shadow: var(--chip-shadow);
  opacity: 0; transform: translateY(10px);
  transition: opacity .4s ease .25s, transform .5s var(--spring) .25s, background .25s, color .25s;
}
.preview.open .preview-label { opacity: 1; transform: translateY(0); }
.preview-label:hover { background: var(--ink); color: #fbfaf6; }
.preview-label svg { opacity: .6; }
.preview-label:hover svg { opacity: 1; }

/* ── showreel modal ────────────────────────── */
.reel {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(18, 13, 100, .97); color: var(--paper);
  display: grid; place-items: center;
  visibility: hidden; opacity: 0; transition: opacity .4s;
}
.reel.open { visibility: visible; opacity: 1; }
.reel-close { position: absolute; top: 26px; right: 28px; font-family: var(--sans); font-size: 13.5px; font-weight: 500; opacity: .7; }
.reel-close:hover { opacity: 1; }
.reel-stage { width: min(82vw, 1080px); position: relative; }
.reel-stage canvas, .reel-stage video { width: 100%; aspect-ratio: 16/9; display: block; border-radius: 6px; background: #0d0955; }
.reel-stage canvas[hidden], .reel-stage video[hidden] { display: none; }
.reel-note { margin-top: 14px; font-family: var(--sans); font-size: 13px; letter-spacing: -0.005em; opacity: .55; text-align: center; }
.reel-note code { color: #8f88ff; }

/* ── custom cursor: the leg of the G, dragging a halftone wake ── */
.cursor-mark, .cursor-trail { display: none; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor-mark, .cursor-trail { display: block; }
}
.cursor-trail {
  position: fixed; inset: 0; z-index: 98;
  width: 100%; height: 100%;
}
.cursor-mark {
  position: fixed; top: 0; left: 0; z-index: 99;
  width: 15px; height: 14.6px;
  color: var(--ink);
  transition: color .28s;
}
/* scale lives on the inner svg — a standalone `scale` on the wrapper would
   compose before the JS translate and multiply it, flinging the mark aside */
.cursor-mark svg {
  display: block; width: 100%; height: 100%;
  transform-origin: 0 0;
  transition: scale .28s cubic-bezier(.22, 1, .36, 1);
}
body.cursor-hover .cursor-mark { color: var(--pop); }
body.cursor-hover .cursor-mark svg { scale: 1.75; }
.reel.open ~ .cursor-mark { color: var(--paper); }

/* ── responsive ────────────────────────────── */
@media (max-width: 860px) {
  .proj-inner { grid-template-columns: 1fr; gap: 5vh; align-items: start; padding-top: 12vh; }
  .proj-close { right: 90px; }
  .list { padding: 14vh 6vw 16vh; }
  .list-rows a { padding: 7px 4px; }
  .list-peek { display: none; }
  .spiral-caption { bottom: 17vh; }
  .reel-badge svg { width: 72px; height: 72px; }
  .chrome { padding: 0 18px; }
}
@media (max-width: 560px) {
  .wordmark { font-size: 10.5px; letter-spacing: .08em; gap: 6px; }
  .wordmark svg { width: 18px; height: 18px; }
  .view-toggle { font-size: 11px; gap: 5px; }
}
@media (max-width: 420px) {
  .wordmark span { display: none; }
}
