/* =========================================================
   Oleksandr Khotsevych — Spine 2D Animator portfolio
   ========================================================= */
:root {
  --bg: #0d0c11;
  --bg2: #14131a;
  --panel: #1b1a23;
  --panel2: #23222c;
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .16);
  --text: #f4f0e8;
  --muted: #9c98a8;
  --accent: #ff5a36;
  --key: #ffd23f;
  --mint: #7cf0c5;
  --violet: #8f8bff;
  --stage: #3a3a3d;

  --f-display: "Unbounded", system-ui, sans-serif;
  --f-body: "Manrope", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --pad: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --tl-h: 52px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-back: cubic-bezier(.68, -0.55, .27, 1.55);
}

*, *::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(--bg); color: var(--text);
  font: 400 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.mono { font-family: var(--f-mono); letter-spacing: .02em; }
::selection { background: var(--accent); color: #fff; }

/* subtle film grain */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* ================= LOADER ================= */
.loader {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  display: grid; place-items: center; align-content: center; gap: 28px;
}
.loader__stage { position: relative; width: 220px; height: 170px; }
.loader__ball-wrap { position: absolute; left: 50%; top: 0; width: 46px; margin-left: -23px; animation: ballY .9s infinite; }
.loader__ball {
  width: 46px; height: 46px; border-radius: 50%; transform-origin: 50% 100%;
  background: radial-gradient(circle at 32% 30%, #ffb199, var(--accent) 45%, #c2341b);
  animation: ballSquash .9s infinite;
}
.loader__shadow {
  position: absolute; left: 50%; bottom: 0; width: 60px; height: 10px; margin-left: -30px; border-radius: 50%;
  background: rgba(255, 90, 54, .35); filter: blur(3px); animation: ballShadow .9s infinite;
}
@keyframes ballY {
  0%, 100% { transform: translateY(0); animation-timing-function: cubic-bezier(.45, 0, .9, .5); }
  50% { transform: translateY(119px); animation-timing-function: cubic-bezier(.1, .5, .55, 1); }
}
@keyframes ballSquash {
  0%, 100% { transform: scale(.92, 1.08); }
  42% { transform: scale(.82, 1.22); }
  50% { transform: scale(1.45, .6); }
  58% { transform: scale(.85, 1.18); }
}
@keyframes ballShadow { 0%, 100% { transform: scale(.45); opacity: .3; } 50% { transform: scale(1.15); opacity: 1; } }
.loader__meta { display: flex; justify-content: space-between; width: 260px; font: 600 12px var(--f-mono); color: var(--muted); }
.loader__frame b { color: var(--text); }
.loader__bar { width: 260px; height: 2px; background: var(--line); position: relative; overflow: hidden; }
.loader__bar i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* ================= FRAME WIPE ================= */
.wipe { position: fixed; inset: 0; z-index: 150; pointer-events: none; display: flex; }
.wipe i { flex: 1; background: var(--accent); transform: scaleY(0); transform-origin: bottom; }
.wipe i:nth-child(2) { background: var(--key); }
.wipe i:nth-child(3) { background: var(--panel2); }
.wipe i:nth-child(4) { background: var(--violet); }
.wipe i:nth-child(5) { background: var(--mint); }

/* ================= CURSOR ================= */
.cursor { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; mix-blend-mode: normal; }
.cursor__dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--accent); }
.cursor__ring {
  position: absolute; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .5); display: grid; place-items: center;
  transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out), background .3s, border-color .3s;
}
.cursor__label { font: 700 11px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: #111; opacity: 0; transition: opacity .2s; }
.cursor.is-big .cursor__ring { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: var(--key); border-color: var(--key); }
.cursor.is-big .cursor__label { opacity: 1; }
.cursor.is-hover .cursor__ring { width: 56px; height: 56px; margin: -28px 0 0 -28px; border-color: var(--accent); }
.cursor.is-hidden { opacity: 0; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }
@media (hover: hover) and (pointer: fine) { body, a, button { cursor: none; } }

/* ================= NAV ================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--pad); transition: transform .5s var(--ease-out), background .3s, padding .3s;
}
.nav.is-scrolled { background: rgba(13, 12, 17, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.nav.is-hidden { transform: translateY(-110%); }
.nav__logo { display: flex; align-items: center; gap: 10px; font: 600 15px var(--f-display); }
.nav__logo em { font-style: normal; color: var(--accent); }
.lg-joint { fill: var(--accent); }
.lg-bone { fill: var(--key); transform-origin: 16px 48px; transition: transform .6s var(--ease-back); }
.nav__logo:hover .lg-bone { transform: rotate(-24deg); }
.nav__links { display: flex; gap: 4px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 99px; padding: 4px; }
.nav__links a { padding: 8px 14px; border-radius: 99px; font-size: 14px; font-weight: 500; color: var(--muted); transition: color .2s, background .2s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--text); background: rgba(255, 255, 255, .08); }
.nav__right { display: flex; align-items: center; gap: 14px; }
.status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); text-decoration: none; transition: color .2s; }
a.status:hover { color: var(--text); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(124, 240, 197, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(124, 240, 197, 0); } 100% { box-shadow: 0 0 0 0 rgba(124, 240, 197, 0); } }
.lang { display: flex; border: 1px solid var(--line2); border-radius: 99px; padding: 3px; font: 600 12px var(--f-mono); }
.lang span { padding: 5px 9px; border-radius: 99px; color: var(--muted); transition: background .3s, color .3s; }
html[lang="en"] .lang [data-l="en"], html[lang="uk"] .lang [data-l="ua"] { background: var(--text); color: var(--bg); }

/* ================= HERO ================= */
.hero {
  position: relative; min-height: 100svh; padding: 96px var(--pad) calc(var(--tl-h) + 64px);
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: center; gap: clamp(24px, 4vw, 64px);
  overflow: hidden; max-width: var(--max); margin: 0 auto;
}
.hero__rig { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__grid {
  position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: radial-gradient(ellipse at 40% 50%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 40% 50%, #000 20%, transparent 75%);
}
.hero__content { position: relative; z-index: 2; container-type: inline-size; }
.hero__tag { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); padding: 8px 14px; border: 1px solid var(--line2); border-radius: 99px; margin: 0 0 28px; background: rgba(13, 12, 17, .6); }
.rec { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }
.w { display: inline-block; white-space: nowrap; }
.hero__title { font: 900 min(clamp(40px, 6.6vw, 112px), 11.6cqi)/.94 var(--f-display); letter-spacing: -.035em; margin: 0 0 26px; text-transform: none; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .line > span { display: inline-block; }
.line--bounce { color: var(--accent); overflow: visible !important; }
.line--bounce .ch { display: inline-block; transform-origin: 50% 100%; will-change: transform; }
.hero__lead { max-width: 620px; font-size: clamp(16px, 1.3vw, 19px); color: var(--muted); margin: 0 0 22px; }
.facts { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); max-width: 600px; }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 6px; height: 6px; background: var(--key); transform: rotate(45deg); flex: none; }
.facts__open { color: var(--mint); }
.facts__open::before { background: var(--mint) !important; }
.hero__lead b { color: var(--text); font-weight: 700; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 26px; border-radius: 99px;
  font-weight: 700; font-size: 15px; transition: background .3s, color .3s, border-color .3s; position: relative; overflow: hidden;
}
.btn--primary { background: var(--accent); color: #1a0d0a; }
.btn--primary:hover { background: var(--key); color: #111; }
.btn--ghost { border: 1px solid var(--line2); }
.btn--ghost:hover { border-color: var(--text); background: var(--text); color: var(--bg); }

/* spine viewport */
.viewport {
  position: relative; z-index: 2; margin: 0; border-radius: 14px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(0, 0, 0, .4);
  transform: rotate(2deg);
}
.viewport__bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--panel2); }
.viewport__bar .dots { display: flex; gap: 6px; }
.viewport__bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.viewport__bar .dots i:nth-child(2) { background: #febc2e; }
.viewport__bar .dots i:nth-child(3) { background: #28c840; }
.viewport__mode { margin-left: auto; color: var(--key); border: 1px solid rgba(255, 210, 63, .4); padding: 2px 8px; border-radius: 4px; font-size: 10px; }
.viewport__screen { position: relative; aspect-ratio: 1 / 1; background: var(--stage); overflow: hidden; }
.viewport__screen video, .viewport__screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.viewport__screen .vp-clip { position: absolute; inset: 0; clip-path: inset(0 0 0 100%); background: var(--stage); }
.viewport__screen .vp-clip.is-on { clip-path: inset(0 0 0 0); }
.viewport__tree { position: absolute; left: 10px; top: 52px; display: flex; flex-direction: column; font-size: 10px; color: rgba(255, 255, 255, .55); background: rgba(20, 19, 26, .7); padding: 8px 10px; border-radius: 6px; pointer-events: none; }
.viewport__foot { display: flex; justify-content: space-between; padding: 10px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.viewport__foot #vpAnim { color: var(--mint); }

.hero__hint { position: absolute; left: var(--pad); bottom: calc(var(--tl-h) + 26px); z-index: 2; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.ik-ico { width: 18px; height: 18px; border: 1.5px solid var(--key); border-radius: 50%; position: relative; }
.ik-ico::before, .ik-ico::after { content: ""; position: absolute; background: var(--key); }
.ik-ico::before { left: 50%; top: -5px; bottom: -5px; width: 1.5px; margin-left: -.75px; }
.ik-ico::after { top: 50%; left: -5px; right: -5px; height: 1.5px; margin-top: -.75px; }
.hero__scroll { position: absolute; right: var(--pad); bottom: calc(var(--tl-h) + 26px); z-index: 2; display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.hero__scroll i { width: 1px; height: 44px; background: var(--line2); position: relative; overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--accent); animation: drip 1.6s var(--ease-out) infinite; }
@keyframes drip { to { top: 100%; } }

/* ================= MARQUEE ================= */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 22px 0; background: var(--bg2); }
.marquee__track { display: flex; gap: 36px; width: max-content; font: 800 clamp(22px, 3vw, 40px)/1 var(--f-display); text-transform: uppercase; letter-spacing: -.02em; will-change: transform; }
.marquee__track span:nth-of-type(odd) { color: transparent; -webkit-text-stroke: 1.5px var(--text); }
.marquee__track b { color: var(--accent); font-size: .5em; align-self: center; }

/* ================= SECTIONS ================= */
.section { position: relative; max-width: var(--max); margin: 0 auto; padding: clamp(64px, 8vw, 120px) var(--pad); }
.section__head { display: grid; grid-template-columns: auto 1fr; column-gap: 24px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.section__num { font-size: 12px; color: var(--accent); align-self: start; border: 1px solid rgba(255, 90, 54, .4); padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.section__title { font: 800 clamp(32px, 4.6vw, 68px)/.95 var(--f-display); letter-spacing: -.035em; margin: 0; }
.section__sub { grid-column: 2; max-width: 620px; color: var(--muted); margin: 22px 0 0; font-size: clamp(15px, 1.2vw, 18px); }
.reveal-lines .rl { display: block; overflow: hidden; padding-bottom: .05em; }
.reveal-lines .rl > span { display: inline-block; }

/* ================= WORKS ================= */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filters button { padding: 10px 18px; border-radius: 99px; border: 1px solid var(--line2); font-size: 14px; font-weight: 600; color: var(--muted); transition: all .3s var(--ease-out); }
.filters button:hover { color: var(--text); border-color: var(--text); }
.filters button.is-active { background: var(--key); border-color: var(--key); color: #111; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 22px); grid-auto-flow: dense; }
.card { grid-column: span 4; position: relative; }
.card.is-wide { grid-column: span 8; }
.card.is-tall .card__media { aspect-ratio: 4 / 5; }
.card.is-hidden { display: none; }
.card__link { display: block; text-align: left; width: 100%; }
.card__media {
  position: relative; aspect-ratio: 5 / 4; border-radius: 14px; overflow: hidden; background: var(--stage);
  transform: translateZ(0); transition: border-radius .5s var(--ease-out);
}
.card.is-wide .card__media { aspect-ratio: 16 / 10; }
/* poster and clip share the same stage framing, so hover never jumps between crops */
.card__media img, .card__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: transform 1s var(--ease-out), opacity .5s; }
.card__media video { opacity: 0; background: var(--stage); }
.card.is-playing .card__media video { opacity: 1; }
.card__media::after { /* onion ghost frame */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.card__keys { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 26px; display: flex; align-items: center; gap: 0; padding: 0 10px; border-radius: 8px; background: rgba(13, 12, 17, .75); backdrop-filter: blur(8px); opacity: 0; transform: translateY(10px); transition: opacity .4s, transform .5s var(--ease-out); }
.card__keys .k { width: 7px; height: 7px; background: var(--key); transform: rotate(45deg); flex: none; }
.card__keys .seg { flex: 1; height: 1px; background: var(--line2); }
.card__keys .ph { position: absolute; top: 4px; bottom: 4px; width: 2px; background: var(--accent); left: 10px; }
.card__keys .fr { position: absolute; right: 10px; top: -22px; font: 600 10px var(--f-mono); color: var(--key); background: rgba(13, 12, 17, .75); padding: 2px 6px; border-radius: 4px; }
.card.is-playing .card__keys { opacity: 1; transform: none; }
.card__info { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 4px 0; }
.card__title { font: 700 clamp(18px, 1.6vw, 24px)/1.1 var(--f-display); margin: 0; letter-spacing: -.02em; overflow: hidden; }
.card__title span { display: inline-block; transition: transform .5s var(--ease-out); }
.card__title span::after { content: attr(data-txt); position: absolute; left: 0; top: 100%; color: var(--accent); }
.card__title span { position: relative; }
.card:hover .card__title span { transform: translateY(-100%); }
.card__meta { font: 500 12px var(--f-mono); color: var(--muted); white-space: nowrap; }
.card__idx { position: absolute; top: 12px; left: 12px; z-index: 2; font: 600 11px var(--f-mono); padding: 4px 8px; border-radius: 6px; background: rgba(13, 12, 17, .7); }
.card__count { position: absolute; top: 12px; right: 12px; z-index: 2; font: 600 11px var(--f-mono); padding: 4px 8px; border-radius: 6px; background: rgba(13, 12, 17, .7); color: var(--text); }
.works__more { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }


/* ================= ABOUT ================= */
.about__wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.about__photo { position: sticky; top: 100px; }
.onion-stack { position: relative; aspect-ratio: 3 / 4; border-radius: 18px; overflow: visible; }
.onion-stack img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
.onion-stack .main { z-index: 3; filter: grayscale(.15) contrast(1.05); }
.ghost { z-index: 1; opacity: 0; mix-blend-mode: screen; transition: transform .8s var(--ease-out), opacity .6s; }
.ghost--1 { filter: sepia(1) hue-rotate(200deg) saturate(4) brightness(.8); }
.ghost--2 { filter: sepia(1) hue-rotate(-30deg) saturate(5) brightness(.8); }
.about__photo:hover .ghost--1, .about__photo.is-onion .ghost--1 { opacity: .55; transform: translate(-22px, 8px) rotate(-3deg); }
.about__photo:hover .ghost--2, .about__photo.is-onion .ghost--2 { opacity: .55; transform: translate(22px, -6px) rotate(3deg); }
.about__bones { position: absolute; left: 0; top: 0; z-index: 4; width: 100%; height: auto; aspect-ratio: 3 / 4; pointer-events: none; opacity: 0; transition: opacity .5s; touch-action: none; }
.about__photo:hover .about__bones, .about__photo.is-rigged .about__bones { opacity: 1; }
.about__photo.bones-off .about__bones { opacity: 0; transition-duration: .7s; }
.bone-draw circle { fill: none; stroke: var(--key); stroke-width: 2.5; }
.bone-draw path { fill: rgba(255, 210, 63, .25); stroke: var(--key); stroke-width: 1.5; }
.about__label { position: absolute; left: 12px; bottom: 12px; z-index: 5; font-size: 11px; padding: 5px 9px; border-radius: 6px; background: rgba(13, 12, 17, .75); color: var(--muted); }
.about__text p { color: var(--muted); font-size: clamp(16px, 1.2vw, 18px); margin: 0 0 20px; max-width: 62ch; }
.about__text p.big { font: 600 clamp(20px, 1.9vw, 27px)/1.35 var(--f-body); color: var(--text); letter-spacing: -.01em; margin-bottom: 28px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 40px 0; }
.stat { padding: 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.stat b { font: 800 clamp(30px, 3.4vw, 46px)/1 var(--f-display); color: var(--text); }
.stat sup { color: var(--accent); font: 800 20px var(--f-display); }
.stat span { display: block; margin-top: 8px; font-size: 13px; color: var(--muted); }
.skills h3 { font-size: 13px; color: var(--accent); font-weight: 600; margin: 0 0 16px; }
.skills__list { list-style: none; padding: 0; margin: 0 0 26px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; counter-reset: sk; border-top: 1px solid var(--line); }
.skills__list li { counter-increment: sk; display: flex; align-items: baseline; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 500; transition: color .25s, transform .35s var(--ease-back); }
.skills__list li::before { content: counter(sk, decimal-leading-zero); font: 600 11px var(--f-mono); color: var(--key); flex: none; }
.skills__list li:hover { color: var(--accent); transform: translateX(6px); }
.skills__list li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tool { font: 600 12px var(--f-mono); padding: 8px 12px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); color: var(--c); }

/* ================= DOPE SHEET ================= */
.dope { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 0 0 12px; overflow: hidden; }
.dope__ruler { position: relative; height: 40px; margin-left: var(--lbl); border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.dope { --lbl: clamp(110px, 16vw, 200px); }
.dope__ruler span { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; padding-left: 6px; border-left: 1px solid var(--line); }
.dope__row { position: relative; display: flex; align-items: center; height: 58px; width: 100%; text-align: left; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .3s; }
.dope__row.is-edu { height: 34px; }
.dope__row.is-edu .dope__lbl { font-size: 11px; color: var(--muted); }
.dope__row.is-edu .dope__clip { top: 7px; bottom: 7px; font-size: 10px; }
.dope__row:focus-visible { outline: 2px solid var(--key); outline-offset: -2px; }
.dope__clip.is-short { overflow: visible; }
.dope__clip.is-short .lbl { position: absolute; left: calc(100% + 8px); color: var(--c); overflow: visible; padding: 0; }
.dope__clip.is-short .k--end { display: none; }
.dope__row:hover, .dope__row.is-active { background: rgba(255, 255, 255, .03); }
.dope__lbl { width: var(--lbl); flex: none; padding: 0 16px; font: 700 14px var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 10px; }
.dope__lbl i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.dope__lane { position: relative; flex: 1; height: 100%; background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: calc(100% / var(--years)) 100%; }
.dope__clip {
  position: absolute; top: 12px; bottom: 12px; border-radius: 8px; background: color-mix(in srgb, var(--c) 28%, transparent);
  border: 1.5px solid var(--c); display: flex; align-items: center; justify-content: space-between; padding: 0 8px; overflow: hidden;
  transform-origin: left; font: 600 11px var(--f-mono); color: var(--text); white-space: nowrap;
}
.dope__clip.is-edu { background: repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 6px, transparent 6px 12px); border-style: dashed; color: var(--muted); }
.dope__clip .k { width: 10px; height: 10px; background: var(--c); transform: rotate(45deg); flex: none; }
.dope__clip .k--end { opacity: .6; }
.dope__clip .lbl { overflow: hidden; text-overflow: ellipsis; padding: 0 8px; }
.dope__clip.is-live::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 30px; background: linear-gradient(90deg, transparent, var(--c)); opacity: .5; animation: blink 1.4s infinite; }
.dope__head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); left: 0; z-index: 3; pointer-events: none; will-change: transform; }
.dope__hint { display: flex; justify-content: flex-end; padding: 8px 16px 0; font-size: 11px; color: var(--muted); }
.dope__head::before { content: ""; position: absolute; top: 0; left: -7px; width: 16px; height: 14px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%); }
.exp__detail { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px; padding: 28px; border-radius: 18px; background: var(--bg2); border: 1px solid var(--line); min-height: 150px; }
.exp__detail h3 { font: 800 clamp(24px, 2.6vw, 38px)/1.05 var(--f-display); margin: 0 0 8px; letter-spacing: -.02em; }
.exp__detail .when { font: 500 13px var(--f-mono); color: var(--c, var(--accent)); }
.exp__detail .role { font-weight: 700; margin: 0 0 8px; }
.exp__detail p { margin: 0; color: var(--muted); }

/* ================= CONTACT ================= */
.contact { text-align: center; padding-bottom: clamp(80px, 10vw, 140px); }
.contact__pre { color: var(--accent); font-size: 13px; margin: 0 0 18px; }
.contact__title { font: 900 clamp(40px, 9vw, 150px)/.92 var(--f-display); letter-spacing: -.04em; margin: 0 auto 28px; max-width: 14ch; }
.contact__title .ch { display: inline-block; transform-origin: 50% 100%; }
.contact__title .w { display: inline-block; white-space: nowrap; }
.contact__sub { max-width: 560px; margin: 0 auto 44px; color: var(--muted); font-size: clamp(16px, 1.3vw, 19px); }
.mail { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 40px; border-radius: 22px; background: var(--text); color: var(--bg); transition: background .3s, transform .3s; max-width: 100%; }
.mail:hover { background: var(--key); }
.mail__addr { font: 700 clamp(17px, 2.4vw, 32px) var(--f-display); letter-spacing: -.02em; word-break: break-all; }
.mail__hint { font-size: 12px; opacity: .6; }
.socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.socials a { padding: 12px 22px; border-radius: 99px; border: 1px solid var(--line2); font-weight: 600; transition: all .3s; }
.socials a:hover { background: var(--accent); border-color: var(--accent); }

.footer { max-width: var(--max); margin: 0 auto; padding: 28px var(--pad) calc(var(--tl-h) + 28px); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.footer__loop:hover { color: var(--accent); }

/* ================= TIMELINE ================= */
.timeline {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 85; height: var(--tl-h);
  display: flex; align-items: center; gap: 14px; padding: 0 16px;
  background: rgba(20, 19, 26, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line2);
  font-size: 12px; transform: translateY(100%); transition: transform .8s var(--ease-out);
}
body.is-ready .timeline { transform: none; }
.timeline__btn { flex: none; width: 34px; height: 30px; border-radius: 6px; background: var(--panel2); color: var(--key); font-size: 10px; letter-spacing: -2px; }
.timeline__btn:hover { background: var(--key); color: #111; }
.timeline__track { position: relative; flex: 1; height: 100%; cursor: pointer; }
.timeline__ticks { position: absolute; left: 0; right: 0; top: 0; height: 12px;
  background-image: linear-gradient(90deg, rgba(255,255,255,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px);
  background-size: 10% 12px, 1% 6px; background-repeat: repeat-x; }
.timeline__keys { position: absolute; inset: 0; }
.tl-key { position: absolute; top: 14px; bottom: 0; display: flex; align-items: center; gap: 7px; transform: translateX(-6px); padding-right: 6px; transform-origin: 6px 50%; }
.tl-key.is-up { top: 0; bottom: 14px; }
.tl-key.is-up span { order: -1; }
.tl-key.is-up::before { order: 0; }
.timeline.is-scrub { cursor: grabbing; }
.timeline__track { cursor: grab; touch-action: none; }
.tl-key::before { content: ""; width: 11px; height: 11px; flex: none; background: var(--key); transform: rotate(45deg); border: 2px solid #14131a; transition: transform .3s var(--ease-back), background .3s; }
.tl-key:hover::before, .tl-key.is-on::before { transform: rotate(45deg) scale(1.45); background: var(--accent); }
.tl-key.is-end { flex-direction: row-reverse; transform: translateX(calc(-100% + 6px)); padding: 0 0 0 6px; }
.tl-key span { font-size: 10px; color: var(--muted); white-space: nowrap; pointer-events: none; transition: color .3s; }
.tl-key.is-on span, .tl-key:hover span { color: var(--text); }
.timeline__head { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--accent); pointer-events: none; will-change: transform; }
.timeline__head i { position: absolute; top: 0; left: -6px; width: 14px; height: 12px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%); }
.timeline__time { flex: none; color: var(--text); font-weight: 600; min-width: 170px; text-align: right; }
.timeline__time b { color: var(--key); font-weight: 600; margin-right: 6px; }
.timeline__time small { color: var(--muted); font-weight: 400; }

/* ================= PROJECT OVERLAY ================= */
.project { position: fixed; inset: 0; z-index: 120; background: var(--bg); }
.project[hidden] { display: none; }
.project__inner { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--pad) 60px; }
.project__head { position: relative; max-width: var(--max); margin: 0 auto; padding: 90px 0 36px; }
.project__close { position: fixed; top: 20px; right: var(--pad); z-index: 5; width: 54px; height: 54px; border-radius: 50%; background: var(--text); color: var(--bg); font-size: 18px; font-weight: 700; transition: background .3s, transform .5s var(--ease-back); }
.project__close:hover { background: var(--accent); color: #fff; transform: rotate(90deg); }
.project__idx { color: var(--accent); font-size: 13px; }
.project__title { font: 900 clamp(46px, 10vw, 160px)/.9 var(--f-display); letter-spacing: -.04em; margin: 14px 0 20px; }
.project__title .ch { display: inline-block; }
.project__meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; margin-bottom: 20px; }
.project__meta span { padding: 6px 10px; border-radius: 6px; background: var(--panel2); color: var(--muted); }
.project__desc { max-width: 680px; color: var(--muted); font-size: clamp(16px, 1.3vw, 20px); margin: 0; }
.project__video { max-width: var(--max); margin: 0 auto 20px; }
.project__video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; background: #000; }
.project__media { max-width: var(--max); margin: 0 auto; columns: 3 300px; column-gap: 16px; }
.pm { break-inside: avoid; margin: 0 0 16px; border-radius: 12px; overflow: hidden; background: var(--stage); position: relative; }
.pm video, .pm img { width: 100%; height: auto; }
.pm::after { content: attr(data-f); position: absolute; left: 8px; top: 8px; font: 600 10px var(--f-mono); padding: 3px 6px; border-radius: 4px; background: rgba(13, 12, 17, .7); color: var(--muted); }
.pm { touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize; }
.pm__ghost { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: .4; mix-blend-mode: screen; pointer-events: none; filter: sepia(1) hue-rotate(200deg) saturate(3); }
.pm__hud { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--text); opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .4s var(--ease-out); }
.pm:hover .pm__hud, .pm.is-scrub .pm__hud { opacity: 1; transform: none; }
.pm__f { flex: none; background: rgba(13, 12, 17, .75); padding: 3px 6px; border-radius: 4px; color: var(--key); min-width: 72px; }
.pm__bar { flex: 1; height: 14px; border-radius: 4px; background: rgba(13, 12, 17, .6); position: relative; overflow: hidden;
  background-image: linear-gradient(90deg, rgba(255,255,255,.25) 1px, transparent 1px), rgba(13, 12, 17, .6); background-size: 4.1666% 100%; }
.pm__bar b { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255, 90, 54, .55); border-right: 2px solid var(--accent); }
.pm__onion { flex: none; font: 600 10px var(--f-mono); padding: 3px 7px; border-radius: 4px; background: rgba(13, 12, 17, .75); color: var(--muted); border: 1px solid transparent; cursor: pointer; }
.pm__onion[aria-pressed="true"] { color: var(--violet); border-color: var(--violet); }
.pm.is-scrub { outline: 2px solid var(--key); outline-offset: -2px; }
.project__hint { max-width: var(--max); margin: 0 auto 14px; font-size: 12px; color: var(--muted); }
.project__hint::before { content: "◆ "; color: var(--key); }
@media (hover: none) { .project__hint { display: none; } .pm__hud { opacity: 1; transform: none; } }
.project__foot { max-width: var(--max); margin: 40px auto 0; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 32px; }
.project__next { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.project__next span { color: var(--muted); font-size: 13px; }
.project__next b { font: 800 clamp(28px, 4vw, 56px)/1 var(--f-display); letter-spacing: -.03em; transition: color .3s; }
.project__next:hover b { color: var(--accent); }

/* ================= MOBILE MENU ================= */
.burger { display: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line2); position: relative; }
.burger i { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--text); top: 15px; transition: transform .4s var(--ease-back), top .3s; }
.burger i + i { top: 23px; }
.burger.is-open i { top: 19px; transform: rotate(45deg); }
.burger.is-open i + i { transform: rotate(-45deg); }
.mmenu { position: fixed; inset: 0; z-index: 79; background: var(--bg); padding: 90px var(--pad) calc(var(--tl-h) + 24px); display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.mmenu[hidden] { display: none; }
.mmenu > a { font: 800 clamp(30px, 9vw, 44px)/1.15 var(--f-display); letter-spacing: -.03em; padding: 6px 0; border-bottom: 1px solid var(--line); }
.mmenu > a.is-active { color: var(--accent); }
.mmenu__foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding-top: 24px; }
.mmenu .status { display: flex; }
body.menu-open { overflow: hidden; }
@media (max-width: 900px) { .burger { display: block; } }

/* ================= NAV CV ================= */
.cv-btn { padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line2); font-size: 12px; font-weight: 600; transition: background .3s, color .3s, border-color .3s; }
.cv-btn:hover { background: var(--key); border-color: var(--key); color: #111; }

/* ================= PROOF ================= */
.proof { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) clamp(40px, 6vw, 80px); }
.proof__title { font-size: 13px; color: var(--accent); font-weight: 600; margin: 0 0 18px; }
.proof__games { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 28px; }
.game { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); transition: border-color .3s, transform .5s var(--ease-back); }
.game b { font: 700 16px/1.2 var(--f-display); letter-spacing: -.01em; }
.game span { font-size: 12px; color: var(--muted); }
.game em { font-style: normal; font-size: 11px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; margin-top: auto; padding-top: 6px; }
a.game:hover { border-color: var(--mint); transform: translateY(-4px) rotate(-1deg); }
.proof__brands { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.proof__track { display: flex; gap: 28px; width: max-content; font: 800 clamp(22px, 2.6vw, 36px)/1 var(--f-display); color: var(--muted); letter-spacing: -.02em; }
.proof__track i { font-style: normal; color: var(--accent); font-size: .6em; align-self: center; }

/* ================= SERVICES ================= */
.sv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sv { position: relative; padding: 26px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; transition: border-color .4s, transform .6s var(--ease-back); }
.sv::before { content: ""; position: absolute; inset: auto -30% -60% auto; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 90, 54, .18), transparent 70%); opacity: 0; transition: opacity .5s; }
.sv:hover { border-color: rgba(255, 90, 54, .5); transform: translateY(-6px); }
.sv:hover::before { opacity: 1; }
.sv__ico { width: 44px; height: 44px; fill: rgba(255, 210, 63, .14); stroke: var(--key); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; margin-bottom: 22px; transition: transform .6s var(--ease-back); }
.sv:hover .sv__ico { transform: rotate(-12deg) scale(1.12); }
.sv__n { position: absolute; top: 24px; right: 24px; font-size: 12px; color: var(--muted); }
.sv h3 { font: 700 20px/1.2 var(--f-display); letter-spacing: -.02em; margin: 0 0 10px; }
.sv p { margin: 0; color: var(--muted); font-size: 15px; }

.process { margin-top: clamp(60px, 8vw, 110px); }
.process__title { font: 800 clamp(26px, 3vw, 42px)/1.05 var(--f-display); letter-spacing: -.03em; margin: 0 0 30px; }
.process__steps { --draw: 1; position: relative; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.process__steps::before { content: ""; position: absolute; left: 6px; right: 6px; top: 7px; height: 2px; background: linear-gradient(90deg, var(--accent), var(--key)); transform-origin: left; transform: scaleX(var(--draw)); }
.process__steps::after { content: ""; position: absolute; left: 6px; right: 6px; top: 7px; height: 2px; background: var(--line); z-index: -1; }
.step { position: relative; padding-top: 34px; }
.step__key { position: absolute; top: 0; left: 0; width: 16px; height: 16px; background: var(--key); border: 3px solid var(--bg); transform: rotate(45deg); box-shadow: 0 0 0 1px var(--key); }
.step__f { font-size: 11px; color: var(--accent); }
.step h4 { font: 700 18px/1.2 var(--f-display); margin: 6px 0 8px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

.needs { margin-top: clamp(50px, 6vw, 80px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.needs__col { padding: 28px; border-radius: 18px; background: var(--bg2); border: 1px solid var(--line); }
.needs h3 { font-size: 13px; color: var(--accent); font-weight: 600; margin: 0 0 16px; }
.needs__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.needs__list li { display: flex; gap: 12px; align-items: baseline; }
.needs__list li::before { content: ""; width: 8px; height: 8px; flex: none; background: var(--mint); transform: rotate(45deg) translateY(-2px); }
.needs__cta { display: flex; flex-direction: column; justify-content: space-between; gap: 20px; align-items: flex-start; background: linear-gradient(135deg, rgba(255, 90, 54, .14), rgba(143, 139, 255, .08)); }
.needs__cta p { margin: 0; font-size: clamp(16px, 1.3vw, 19px); }

/* ================= BRIEF FORM ================= */
.brief { max-width: 920px; margin: clamp(60px, 8vw, 100px) auto 0; text-align: left; padding: clamp(20px, 3vw, 36px); border-radius: 22px; background: var(--panel); border: 1px solid var(--line2); scroll-margin-top: 90px; }
.brief__head { margin-bottom: 26px; }
.brief__tag { font-size: 11px; color: var(--mint); }
.brief__head h3 { font: 800 clamp(24px, 3vw, 38px)/1.1 var(--f-display); letter-spacing: -.03em; margin: 8px 0 6px; }
.brief__head p { margin: 0; color: var(--muted); }
.brief__group { border: 0; padding: 0; margin: 0 0 20px; }
.brief__group legend, .field > span { display: block; font: 600 12px var(--f-mono); color: var(--muted); margin-bottom: 8px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 10px 16px; border-radius: 99px; border: 1px solid var(--line2); font-size: 14px; font-weight: 600; transition: background .25s, border-color .25s, color .25s; }
.chips label:hover span { border-color: var(--text); }
.chips input:checked + span { background: var(--key); border-color: var(--key); color: #111; }
.chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.brief__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 14px; }
.field { display: block; }
.field--wide { margin-bottom: 18px; }
.field input, .field select, .field textarea {
  width: 100%; font: 500 16px var(--f-body); color: var(--text); background: var(--bg); border: 1px solid var(--line2);
  border-radius: 10px; padding: 12px 14px; transition: border-color .25s, box-shadow .25s; appearance: none; -webkit-appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(-45deg, transparent 50%, var(--muted) 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field select option { background: var(--panel); }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 90, 54, .2); }
.brief__more { margin: 0 0 18px; }
.brief__more summary { cursor: pointer; font-size: 12px; color: var(--mint); padding: 8px 0; list-style: none; }
.brief__more summary::-webkit-details-marker { display: none; }
.brief__more[open] summary { margin-bottom: 10px; }
.brief__more.is-off { display: none; }
.brief-section { padding-bottom: 0; }
.brief-section .brief { margin-top: 0; }
.contact__actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.btn--big { padding: 20px 36px; font-size: 18px; }
.brief__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brief__err { margin: 0; color: var(--accent); font-size: 13px; min-height: 1em; }
.brief button[disabled] { opacity: .6; }

/* ================= TOAST ================= */
.toast { position: fixed; left: 50%; bottom: calc(var(--tl-h) + 20px); z-index: 160; transform: translate(-50%, 30px); opacity: 0; padding: 12px 18px; border-radius: 10px; background: var(--key); color: #111; font-size: 13px; font-weight: 600; pointer-events: none; transition: all .5s var(--ease-back); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ================= RESPONSIVE ================= */
@media (max-width: 1100px) {
  .nav .status { display: none; }
  .card { grid-column: span 6; }
  .card.is-wide { grid-column: span 12; }
  .card.is-tall .card__media { aspect-ratio: 5 / 4; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .nav__links { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 110px; padding-bottom: 140px; min-height: auto; }
  .viewport { max-width: 380px; width: 100%; justify-self: center; }
  .hero__hint { display: none; }
  .about__wrap { grid-template-columns: minmax(0, 1fr); }
  .about__photo { position: relative; top: 0; max-width: 380px; }
  .exp__detail { grid-template-columns: minmax(0, 1fr); }
  .sv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process__steps { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-left: 34px; }
  .process__steps::before, .process__steps::after { left: 7px; right: auto; top: 6px; bottom: 6px; width: 2px; height: auto; transform-origin: top; transform: scaleY(var(--draw)); }
  .step { padding-top: 0; }
  .step__key { left: -34px; top: 2px; }
  .needs { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) { .sv-grid { grid-template-columns: minmax(0, 1fr); } .cv-btn { display: none; } }
@media (max-width: 640px) {
  :root { --tl-h: 46px; }
  .section__head { grid-template-columns: minmax(0, 1fr); }
  .section__num { justify-self: start; margin-bottom: 16px; }
  .section__sub { grid-column: 1; }
  .card, .card.is-wide { grid-column: span 12; }
  .card.is-tall .card__media { aspect-ratio: 4 / 3; }
  .timeline__time small { display: none; }
  .timeline__time { min-width: 0; }
  .tl-key span { display: none; }
  .timeline__time { min-width: 0; }
  .proof__games { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .game { flex: 0 0 72%; scroll-snap-align: start; }
  .dope__clip .lbl { display: none; }
  .dope { --lbl: 92px; }
  .dope__lbl { font-size: 11px; padding: 0 10px; gap: 7px; }
  .dope__ruler { overflow: hidden; font-size: 10px; }
  .project__close { width: 46px; height: 46px; top: 14px; }
  .hero__scroll { display: none; }
  .mail { padding: 20px 22px; }
}

a:focus-visible, button:focus-visible, .g-handle:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--key); outline-offset: 3px; }
.card__link:focus-visible { outline-offset: -2px; border-radius: 14px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  body::after { display: none; }
}

@media (max-width: 640px) { .skills__list { grid-template-columns: minmax(0, 1fr); } }

/* ---- review round 2 ---- */
.project__hint kbd { display: inline-block; min-width: 1.6em; padding: 1px 6px; border: 1px solid var(--line2); border-radius: 4px; color: var(--text); font: inherit; text-align: center; }
.project__hint { font-size: 13px; }
@media (max-width: 640px) {
  /* phone: the animation comes right after the headline, before the long intro */
  .hero { container-type: inline-size; }
  .hero__content { display: contents; }
  .hero__tag { order: 1; justify-self: start; }
  .hero__title { order: 2; margin-bottom: 20px; }
  .viewport { order: 3; margin-bottom: 28px; }
  .hero__lead { order: 4; }
  .facts { order: 5; }
  .hero__cta { order: 6; }
  /* career labels: enough room for the studio names */
  .dope { --lbl: 122px; }
  .dope__lbl { padding: 0 8px; gap: 6px; }
}

/* ---- photo mesh warp: drag the joints ---- */
.about__warp { position: absolute; z-index: 3; pointer-events: none; opacity: 0; filter: grayscale(.15) contrast(1.05); }
.about__photo.is-meshed .about__warp { opacity: 1; }
.about__photo.is-meshed .onion-stack .main { opacity: 0; }
.bone-hits circle { fill: transparent; stroke: none; pointer-events: all; cursor: grab; touch-action: none; }
.about__photo.is-dragging .bone-hits circle { cursor: grabbing; }
.about__photo:hover .about__bones, .about__photo.is-dragging .about__bones, .about__photo.is-warping .about__bones { opacity: 1; }
/* joints can be grabbed only while the rig is actually visible, otherwise touches go to the page */
.about__photo:not(.is-rigged):not(:hover):not(.is-warping) .bone-hits circle,
.about__photo.bones-off:not(:hover):not(.is-warping) .bone-hits circle { pointer-events: none; }
.bone-draw circle { transition: r .2s; }
.about__photo:hover .bone-draw circle { r: 7; }
.about__hint { margin: 12px 0 0; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.about__hint::before { content: ""; width: 8px; height: 8px; border: 2px solid var(--key); border-radius: 50%; flex: none; }

/* ---- brief: persistent result under the button ---- */
.brief__status { margin-top: 18px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel2); font-size: 15px; }
.brief__status.is-ok { border-color: rgba(124, 240, 197, .45); color: var(--mint); }
.brief__status.is-fail { border-color: rgba(255, 90, 54, .45); }
.brief__status p { margin: 0 0 12px; }
.brief__status .mono { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.brief__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---- touch targets: at least 44 px to hit, visuals unchanged ---- */
.lang, .timeline__btn { position: relative; }
.lang::after { content: ""; position: absolute; inset: -6px -2px; }
.timeline__btn::after { content: ""; position: absolute; inset: -7px -5px; }
.tl-key::after { content: ""; position: absolute; left: -14px; right: -14px; top: -8px; bottom: -8px; }
.footer__loop { display: inline-block; padding: 12px 0; }
@media (max-width: 900px) {
  .burger { width: 44px; height: 44px; }
  .burger i { left: 13px; right: 13px; top: 17px; }
  .burger i + i { top: 25px; }
  .burger.is-open i { top: 21px; }
  .dope__row.is-edu { height: 44px; }
}

.brief__copy { width: 100%; margin-top: 12px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg); color: var(--text); font: 13px/1.5 var(--f-mono); }
.vp-play { position: absolute; left: 50%; top: 50%; z-index: 5; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(13, 12, 17, .75); color: var(--key); border: 1px solid var(--line2); font-size: 18px; }
.vp-play[aria-pressed="true"] { opacity: .55; }
:focus-visible.vp-play { outline: 2px solid var(--key); outline-offset: 3px; }

/* ---- v2 test: reel controls ---- */
.viewport__foot { align-items: center; gap: 10px; }
.vp-ctrl { display: flex; align-items: center; gap: 2px; }
.vp-ctrl button { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--text); transition: background .2s, color .2s; }
.vp-ctrl button::after { content: ""; position: absolute; inset: -7px -2px; } /* 44px tap area */
.vp-ctrl button:hover { background: var(--panel2); color: var(--key); }
.vp-ctrl button:focus-visible { outline: 2px solid var(--key); outline-offset: 2px; }
.vp-ctrl button[hidden] { display: none; }
#vpToggle { background: var(--key); color: #111; }
#vpToggle:hover { background: var(--text); color: #111; }
.vp-ico-pause, .vp-ico-play { display: block; width: 12px; height: 12px; }
.vp-ico-pause { border-left: 4px solid currentColor; border-right: 4px solid currentColor; width: 12px; box-sizing: border-box; }
.vp-ico-play { width: 0; height: 0; border-left: 11px solid currentColor; border-top: 6.5px solid transparent; border-bottom: 6.5px solid transparent; margin-left: 3px; }
.vp-count { min-width: 44px; text-align: center; font-size: 11px; color: var(--muted); }
.viewport__screen { cursor: pointer; }
.viewport.is-full { display: flex; flex-direction: column; border-radius: 0; background: #111; }
.viewport.is-full .viewport__screen { flex: 1; aspect-ratio: auto; }

/* ---- v2 test: featured works ---- */
.works__label { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .02em; margin: 0 0 18px; }
.feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 64px; }
.fcard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); overflow: hidden; transition: border-color .3s, transform .4s var(--ease-out); }
.fcard:hover { border-color: var(--line2); transform: translateY(-4px); }
.fcard__media { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; background: var(--stage); overflow: hidden; }
.fcard__media img, .fcard__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.fcard__media video { opacity: 0; transition: opacity .4s; }
.fcard.is-playing .fcard__media video { opacity: 1; }
.fcard__media:focus-visible { outline: 2px solid var(--key); outline-offset: -4px; }
.fcard__info { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px 22px 22px; }
.fcard__tag { font-size: 12px; color: var(--mint); }
.fcard__title { font: 700 clamp(20px, 1.8vw, 28px)/1.05 var(--f-display); letter-spacing: -.02em; margin: 0; }
.fcard__desc { margin: 0 0 6px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.fcard__open { margin-top: auto; }
@media (max-width: 900px) {
  .feat { grid-template-columns: 1fr; gap: 16px; margin-bottom: 48px; }
  .fcard { flex-direction: row; }
  .fcard__media { width: 44%; flex: none; }
}
@media (max-width: 600px) {
  .fcard { flex-direction: column; }
  .fcard__media { width: 100%; aspect-ratio: 4 / 3; }
  .fcard__info { padding: 18px; }
}

/* ---- v2 test: quick contact above the brief ---- */
.quick { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 20px 24px; margin-bottom: 20px; border: 1px dashed var(--line2); border-radius: 16px; }
.quick__text { margin: 0; color: var(--muted); max-width: 420px; }
.quick__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.quick__mail { font: 700 clamp(15px, 1.4vw, 19px) var(--f-display); color: var(--key); word-break: break-all; padding: 10px 4px; }
.quick__mail:hover { color: var(--text); }
