/* Layout concept: a studio in two rooms. The main page is the purple backdrop itself
   (Hani's portrait as the wall, his story and the section picker in front of it);
   Section A is the black edit bay: behind-the-scenes shots, then spinning rows of work. */
:root {
  --ink: #0b070c;          /* set black, faint purple bias */
  --ink-2: #140d16;        /* raised surfaces */
  --line: #2a1d2d;         /* hairlines */
  --purple: #ac45ab;       /* sampled from the portrait backdrop */
  --purple-hi: #d88ad7;    /* purple readable as text on black */
  --bone: #f4edf3;         /* primary text */
  --muted: #a797a6;        /* secondary text */
  --on-purple: #140614;    /* text on purple */

  --f-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --f-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1240px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--bone); font-family: var(--f-body); font-size: 16px; line-height: 1.6; overflow-x: hidden; }
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--purple-hi); outline-offset: 3px; border-radius: 4px; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.purple { color: var(--purple-hi); }
.eyebrow { color: var(--purple-hi); margin: 0; display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.section-title { margin: 0; font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(44px, 7vw, 96px); line-height: .88; text-wrap: balance; }

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
body.on-work .grain { display: none; } /* the blend would redo the full screen on every video frame */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; background: var(--purple);
  transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 12px rgba(172, 69, 171, .8);
}
.view { animation: fadeIn .7s var(--ease) both; }
section, header { scroll-margin-top: 80px; }

/* ================= NAV ================= */
.bar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gutter) 14px;
  background: rgba(11, 7, 12, .93);
  border-bottom: 1px solid var(--line);
}
.bar--home { position: fixed; left: 0; right: 0; background: transparent; border-bottom-color: transparent; transition: background .3s, border-color .3s; }
.bar--home.scrolled { background: rgba(11, 7, 12, .93); border-bottom-color: var(--line); }
.bar--home:not(.scrolled) .bar__mark, .bar--home:not(.scrolled) .bar__links a { color: var(--on-purple); }
.bar--home:not(.scrolled) .bar__mark span { color: #fff; }
.bar__back {
  display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); border-radius: 999px;
  min-height: 40px; padding: 0 14px; cursor: pointer; color: var(--muted); font-size: 14px; transition: color .2s, border-color .2s;
}
.bar__back:hover { color: var(--bone); border-color: var(--purple); }
.bar__mark { font-family: var(--f-display); font-weight: 900; font-size: 26px; text-decoration: none; margin-right: auto; }
.bar:not(.bar--home) .bar__mark { margin-inline: auto; }
.bar__mark span { color: var(--purple); }
.bar__links { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); font-size: 15px; }
.bar__links a { text-decoration: none; color: var(--muted); transition: color .2s; }
.bar__links a:hover { color: var(--bone); }
.bar__links .bar__cta, .bar__cta {
  color: var(--bone); background: var(--ink); border: 0; cursor: pointer; padding: 9px 18px; border-radius: 999px; font-weight: 600;
  text-decoration: none; transition: background .2s, color .2s;
}
.bar .bar__links .bar__cta { color: var(--on-purple); background: var(--purple); }
.bar--home:not(.scrolled) .bar__links .bar__cta { color: var(--bone); background: var(--ink); }
.bar__links .bar__cta:hover { background: var(--purple-hi); color: var(--on-purple); }

/* ================= HERO (main page) ================= */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  background: radial-gradient(90% 90% at 75% 45%, #b34ab3 0%, #a842a8 45%, #9a3b9b 100%);
  color: var(--on-purple);
  display: flex; align-items: center;
  padding: calc(84px + env(safe-area-inset-top, 0px)) var(--gutter) 48px;
}
.hero__bg { position: absolute; inset: 0; z-index: -1; display: flex; justify-content: flex-end; pointer-events: none; }
.hero__bg img {
  height: 100%; width: auto; max-width: none; object-fit: cover; object-position: 50% 15%;
  margin-right: max(0px, calc((100vw - 1500px) / 2));
  -webkit-mask-image: linear-gradient(to left, #000 60%, transparent 100%);
          mask-image: linear-gradient(to left, #000 60%, transparent 100%);
  animation: heroIn 1.6s var(--ease) both, slowZoom 22s 1.6s ease-in-out infinite alternate;
  transform-origin: 60% 30%;
}
.hero::after { /* soft floor so the section below meets it cleanly */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; z-index: -1;
  background: linear-gradient(to bottom, transparent, rgba(11, 7, 12, .35));
}
.hero__hud { position: absolute; right: var(--gutter); bottom: 22px; display: flex; gap: 18px; color: #fff; opacity: .9; font-variant-numeric: tabular-nums; }
.hero__hud span { display: inline-flex; align-items: center; gap: 8px; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff2d55; display: inline-block; animation: blink 1.2s steps(2, start) infinite; }

.hero__content { width: 100%; max-width: var(--maxw); margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.hero__content > * { max-width: 620px; }
.hero__eyebrow { margin: 0; display: flex; align-items: center; gap: 12px; animation: rise .9s .1s var(--ease) both; }
.hero__eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.hero__name {
  margin: 0; font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(64px, 9.2vw, 132px); line-height: .82; display: flex; flex-direction: column;
}
.hero__name > span { white-space: nowrap; }
.hero__last { color: #fff; }
.hero__name .ch { display: inline-block; animation: charIn .9s var(--ease) both; transform-origin: 50% 100%; }
.hero__role {
  margin: 0; font-family: var(--f-display); font-weight: 800; text-transform: uppercase; letter-spacing: .02em;
  font-size: clamp(22px, 2.4vw, 30px); line-height: 1.1; max-width: 24ch; text-wrap: balance; animation: rise .9s .55s var(--ease) both;
}
.hero__bio { margin: 0; font-size: 17px; max-width: 54ch; color: rgba(20, 6, 20, .86); animation: rise .9s .65s var(--ease) both; }

/* Section picker */
.hero__content > .choose { max-width: 820px; }
.choose { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 14px; perspective: 1200px; }
.pick {
  position: relative; text-align: left; border-radius: 24px; padding: 30px 28px 26px; cursor: pointer; min-height: clamp(200px, 26vh, 260px);
  display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; overflow: hidden; border: 1px solid transparent;
  animation: panelIn .9s var(--ease) both;
}
.pick--video { background: var(--ink); color: var(--bone); animation-delay: .8s; box-shadow: 0 24px 60px -28px rgba(11, 7, 12, .9); }
.pick--code { background: rgba(20, 6, 20, .16); border: 1px dashed rgba(20, 6, 20, .45); color: var(--on-purple); cursor: not-allowed; animation-delay: .92s; }
.pick__kicker { opacity: .75; }
.pick__title { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; line-height: .9; font-size: clamp(32px, 3.2vw, 50px); }
.pick__kicker { font-size: 13px; }
.pick__cta { font-size: 18px; }
.pick__soon { font-size: 13px; padding: 8px 14px !important; }
.pick__cta { display: inline-flex; align-items: center; gap: 8px; color: var(--purple-hi); font-weight: 600; margin-top: 4px; }
.pick__cta svg { transition: transform .3s var(--ease); }
.pick--video:hover .pick__cta svg { transform: translateX(5px); }
.pick--video::before {
  content: ""; position: absolute; top: 22px; right: 22px; width: 30px; height: 30px;
  border-top: 2px solid var(--purple); border-right: 2px solid var(--purple);
}
.pick__lock { position: absolute; top: 20px; right: 20px; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(20, 6, 20, .4); }
.pick__lock svg { font-size: 26px; }
.pick__soon { align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: var(--on-purple); color: var(--purple-hi); }
.pick--code.shake { animation: shake .5s; }

/* ================= SKILLS ================= */
.skills { padding: clamp(64px, 9vw, 110px) 0; perspective: 1400px; overflow-x: clip; }
.skills__head { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); display: flex; flex-direction: column; gap: 14px; }
.skills__grid {
  max-width: var(--maxw); margin: 36px auto 0; padding-inline: var(--gutter);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; perspective: 1400px;
}
.tool { background: var(--ink-2); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.tool:hover { border-color: var(--purple); }
.tool__label { margin: 0 0 14px; color: var(--purple-hi); }
.tool ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 17px; }
.tool li { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tool li:last-child { border-bottom: 0; padding-bottom: 0; }

/* ================= CONTACT ================= */
.contact {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(56px, 8vw, 100px) var(--gutter);
  display: flex; flex-direction: column; gap: 18px; border-top: 1px solid var(--line); perspective: 1400px; overflow-x: clip;
}
.contact__title { margin: 0; font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(44px, 8vw, 112px); line-height: .86; text-wrap: balance; }
.contact__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; perspective: 1400px; }
.contact__card { background: var(--purple); color: var(--on-purple); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.contact__card:nth-child(2) { background: var(--ink-2); color: var(--bone); border: 1px solid var(--line); }
.contact__card:nth-child(3) { background: transparent; color: var(--bone); border: 1px dashed var(--line); }
.contact__label { margin: 0; opacity: .8; }
.contact__value { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.05; overflow-wrap: anywhere; }
.contact__value--email { font-size: clamp(20px, 2vw, 26px); user-select: all; -webkit-user-select: all; }
.contact__note { margin: 0; color: var(--muted); }
.contact__row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.contact__card:first-child .btn--ghost { color: var(--on-purple); border-color: rgba(20, 6, 20, .35); }
.contact__card:first-child .btn--ghost:hover { border-color: var(--on-purple); color: var(--on-purple); }

.wa { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; align-self: flex-start; transition: transform .25s var(--ease); }
.wa:hover { transform: translateX(3px); }
.wa__logo { flex: none; width: 46px; height: 46px; border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .45); }
.wa__logo svg { width: 26px; height: 26px; fill: #ffffff; stroke: none; }
.wa--pill { background: var(--bone); color: var(--ink); padding: 6px 22px 6px 6px; border-radius: 999px; font-weight: 700; font-size: 18px; }
.wa--pill .wa__logo { width: 44px; height: 44px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px;
  border-radius: 999px; text-decoration: none; font-weight: 600; cursor: pointer; border: 1px solid transparent;
  transition: transform .25s var(--ease), background .25s, border-color .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--purple); color: var(--on-purple); }
.btn--solid:hover { background: var(--purple-hi); }
.btn--ghost { background: transparent; color: var(--bone); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--purple); color: var(--purple-hi); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 14px; }

.foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted);
  padding: 28px var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line);
}
.foot__credit a { color: var(--bone); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 1px; transition: color .2s, border-color .2s; }
.foot__credit a:hover { color: var(--purple-hi); border-color: var(--purple); }

/* ================= SECTION A: BEHIND THE CAMERA ================= */
/* ================= SECTION A: SPINNING ROWS ================= */
.reel { padding: clamp(56px, 8vw, 100px) 0 clamp(24px, 4vw, 48px); overflow: hidden; perspective: 1400px; }
.reel + .reel { border-top: 1px solid var(--line); }
.reel__head { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); display: flex; flex-direction: column; gap: 14px; }
.reel__sub { margin: 0; color: var(--muted); max-width: 60ch; }

.ringrow { margin-top: clamp(20px, 4vw, 40px); }
.ringrow + .ringrow { margin-top: clamp(8px, 2vw, 20px); }
.ring {
  --cw: clamp(150px, 19vw, 240px);
  --ch: calc(var(--cw) * var(--ratio, 1.7778));
  position: relative; height: calc(var(--ch) * 1.25 + 30px);
  touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; outline: none; perspective: 1600px;
}
.ring:focus-visible { outline: 2px dashed var(--purple); outline-offset: -8px; }
.ring.dragging { cursor: grabbing; }
.ring__scene { position: absolute; inset: 0; perspective: 1500px; perspective-origin: 50% 20%; }
.ring__spinner {
  position: absolute; left: 50%; top: 50%; width: var(--cw); height: var(--ch);
  margin-left: calc(var(--cw) / -2); margin-top: calc(var(--ch) / -2);
  transform-style: preserve-3d; transition: transform .9s var(--ease);
}
.ring.dragging .ring__spinner { transition: none; }
.ring--big { --cw: min(clamp(220px, 30vw, 380px), calc((100svh - 240px) / 1.5)); } /* big, but always fits the screen */
.ring__word {
  position: absolute; left: 50%; top: 70%; z-index: 3; transform: translate(-50%, -50%);
  font-family: var(--f-display); font-weight: 900; font-size: clamp(56px, 10vw, 150px); line-height: 1; letter-spacing: .04em;
  color: var(--purple-hi); text-shadow: 0 10px 40px rgba(11, 7, 12, .6);
  pointer-events: none; user-select: none; white-space: nowrap;
  opacity: 0; transition: transform .9s var(--ease), opacity .35s;
}
.ring__word.is-on { opacity: .92; }
.ring.dragging .ring__word { transition: none; }
.ring__floor {
  position: absolute; left: 50%; bottom: 0; width: min(900px, 100%); height: 60px; translate: -50% 0;
  background: radial-gradient(50% 50% at 50% 50%, rgba(172, 69, 171, .32), transparent 70%); filter: blur(10px); pointer-events: none;
}
.card {
  position: absolute; inset: 0; border-radius: 16px; overflow: hidden; background: var(--ink-2);
  border: 1px solid var(--line); cursor: pointer; padding: 0;
  transition: opacity .6s var(--ease), box-shadow .5s, border-color .5s;
  -webkit-box-reflect: below 10px linear-gradient(transparent 72%, rgba(255, 255, 255, .12));
}
.card::after { /* dims the side cards; much cheaper than filter: brightness() */
  content: ""; position: absolute; inset: 0; z-index: 2; background: #000; pointer-events: none;
  opacity: var(--dim, 0); transition: opacity .6s var(--ease);
}
.card.is-far { -webkit-box-reflect: unset; } /* cards facing away don't need a mirror image */
.card img, .card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card video { opacity: 0; transition: opacity .5s; }
.card.playing video { opacity: 1; }
.card__tc { position: absolute; top: 10px; right: 10px; z-index: 1; font-size: 10px; color: #fff; background: rgba(11, 7, 12, .6); padding: 3px 7px; border-radius: 6px; }
.card__play {
  position: absolute; left: 50%; bottom: 14px; translate: -50% 8px; z-index: 1; opacity: 0;
  display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: var(--on-purple); background: var(--purple);
  padding: 6px 10px; border-radius: 999px; white-space: nowrap; transition: opacity .4s, translate .4s var(--ease);
}
.card.is-active .card__play { opacity: 1; translate: -50% 0; }
.card.is-active { border-color: var(--purple); box-shadow: 0 0 0 2px var(--purple), 0 20px 60px -10px rgba(172, 69, 171, .7); }
.card.is-far { pointer-events: none; }

.ring__controls {
  max-width: 560px; margin: 10px auto 0; padding-inline: var(--gutter);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px;
}
.icon-btn {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--ink-2); border: 1px solid var(--line); color: var(--bone); font-size: 22px;
  transition: background .25s, border-color .25s, transform .25s var(--ease);
}
.icon-btn:hover { background: var(--purple); border-color: var(--purple); color: var(--on-purple); transform: scale(1.06); }
.caption { text-align: center; min-width: 0; }
.caption p { margin: 0; }
.caption__count { color: var(--purple-hi); font-variant-numeric: tabular-nums; font-size: 14px; }
.caption__meta { color: var(--muted); font-size: 11px; margin-top: 4px !important; }
.caption.swap { animation: capSwap .5s var(--ease); }

/* quick contact on the work page */
.hire { max-width: var(--maxw); margin: 0 auto; padding: clamp(56px, 8vw, 100px) var(--gutter); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 24px; perspective: 1400px; overflow-x: clip; }
.hire__title { margin: 0; font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(40px, 7vw, 96px); line-height: .88; }
.hire__row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ================= VIEWER / WIPE / TOAST ================= */
.player { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; color: var(--bone); }
.player::backdrop { background: rgba(8, 4, 9, .9); backdrop-filter: blur(8px); }
.player__inner { position: relative; display: flex; flex-direction: column; align-items: center; padding: 16px; }
.player video, .player img { max-height: min(86vh, 900px); width: auto; max-width: calc(100vw - 32px); border-radius: 16px; background: #000; object-fit: contain; }
.player video { height: min(86vh, 900px); aspect-ratio: 9 / 16; }
.player__close { position: absolute; top: 0; right: 0; z-index: 2; }

.wipe { position: fixed; inset: 0; z-index: 90; background: var(--purple); display: grid; place-items: center; clip-path: inset(100% 0 0 0); pointer-events: none; color: var(--on-purple); }
.wipe.run { animation: wipe 1.1s var(--ease) forwards; }
.wipe span { font-size: 14px; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); translate: -50% 20px; z-index: 95;
  background: var(--bone); color: var(--ink); padding: 12px 18px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: opacity .3s, translate .3s var(--ease); letter-spacing: .08em;
}
.toast.show { opacity: 1; translate: -50% 0; }

/* ================= MOTION ================= */
/* 3D scroll depth (script.js sets --p from -1 to 1) */
[data-depth] {
  rotate: x calc(var(--p, 0) * var(--k, 6) * 1deg);
  translate: 0 calc(var(--p, 0) * 26px);
  transform-origin: 50% 0%;
}

/* Hover tilt */
[data-tilt] { transition: rotate .45s var(--ease), translate .45s var(--ease), border-color .3s, box-shadow .3s, background .3s; }
[data-tilt].tilting { transition: rotate .08s linear, translate .45s var(--ease), border-color .3s, box-shadow .3s, background .3s; }
.tool:hover, .contact__card:hover, .pick--video:hover { translate: 0 -6px; box-shadow: 0 24px 50px -24px rgba(172, 69, 171, .55); }
.pick--video:hover { box-shadow: 0 30px 60px -24px rgba(11, 7, 12, .95); }

/* Scroll reveals (armed only when JS runs) */
.js-reveal .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js-reveal .reveal.in { opacity: 1; transform: none; }
.js-reveal .reveal[data-tilt] { transition: opacity .9s var(--ease), transform .9s var(--ease), rotate .45s var(--ease), translate .45s var(--ease), border-color .3s, box-shadow .3s; }
.js-reveal .reveal[data-tilt].tilting { transition: opacity .9s var(--ease), transform .9s var(--ease), rotate .08s linear, translate .45s var(--ease), border-color .3s, box-shadow .3s; }
.js-reveal .reveal--flip { transform: perspective(900px) rotateX(-32deg) translateY(40px); transform-origin: 50% 0%; }
.js-reveal .reveal--flip.in { transform: none; }

@keyframes rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes charIn { from { opacity: 0; transform: translateY(50%) rotateX(-70deg); } to { opacity: 1; transform: none; } }
@keyframes heroIn { from { opacity: 0; transform: scale(1.08) translateX(4%); } to { opacity: 1; transform: none; } }
@keyframes panelIn { from { opacity: 0; transform: translateY(40px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes blink { to { visibility: hidden; } }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
@keyframes wipe { 0% { clip-path: inset(100% 0 0 0); } 45%, 55% { clip-path: inset(0 0 0 0); } 100% { clip-path: inset(0 0 100% 0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slowZoom { from { transform: scale(1); } to { transform: scale(1.07); } }
@keyframes capSwap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ================= RESPONSIVE ================= */
@media (max-width: 1100px) {
  .skills__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .skills__grid { grid-template-columns: minmax(0, 1fr); }
  .contact__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .hero { align-items: flex-end; padding-top: 0; min-height: auto; }
  .hero__bg { position: relative; inset: auto; position: absolute; top: 0; left: 0; right: 0; height: 72vh; }
  .hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; margin: 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 92%); mask-image: linear-gradient(to bottom, #000 45%, transparent 92%); }
  .hero__content { padding-top: 60vh; }
  .hero__name { font-size: clamp(56px, 16vw, 90px); }
  .hero__hud { top: calc(76px + env(safe-area-inset-top, 0px)); bottom: auto; }
  .choose { grid-template-columns: minmax(0, 1fr); }
  .pick { min-height: 180px; }
  .bar__links a:not(.bar__cta):not(.jump) { display: none; }
  .bar__back span { display: none; }
  .bar:not(.bar--home) .bar__mark { display: none; }

  /* flat swipe rows instead of the 3D ring: far less work for phones */
  .ring.ring--flat { --cw: min(56vw, 240px); height: calc(var(--ch) + 36px); perspective: none; }
  .ring.ring--flat.ring--big { --cw: min(70vw, 320px); }
  .ring--flat .ring__scene { perspective: 900px; } /* only the SET word turns in 3D here */
  .ring--flat .ring__spinner { transform-style: flat; transition: none; }
  .ring--flat .card { -webkit-box-reflect: unset; transition: transform .5s var(--ease), box-shadow .5s, border-color .5s; }
  .ring--flat.dragging .card { transition: none; }
  .ring--flat .card.is-far { visibility: hidden; transition: none; }
  .ring--flat .card.is-active { box-shadow: 0 0 0 2px var(--purple), 0 14px 36px -12px rgba(172, 69, 171, .6); }
  .ring__floor { display: none; }
  [data-depth] { rotate: none !important; translate: none !important; }
}
@media (max-width: 420px) {
  .bar__links { gap: 12px; font-size: 14px; }
  .icon-btn { width: 46px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-depth] { rotate: none !important; translate: none !important; }
}
