.fx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#fx-bg { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
html.fx .site-shell { position: relative; z-index: 1; }

/* split text */
html.fx .fx-split .c { display: inline-block; opacity: 0; transition: opacity .8s var(--ease-out), transform 1s var(--ease-out), filter .8s var(--ease-out), color .25s; }
/* Split text duplicates its copy in .fx-sr for assistive tech; keeping the visual
   glyphs out of selection means copy/paste returns one clean string. */
html.fx .fx-split .w { user-select: none; }
html.fx .fx-chars .w { display: inline-block; white-space: nowrap; }
html.fx .fx-chars .c { transform: translateY(.55em) rotate(9deg) scale(.8); filter: blur(8px); transition-delay: calc(var(--i) * 34ms); }
html.fx .fx-words .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .04em .03em .17em; margin: -.04em -.03em -.17em; }
html.fx .fx-words .c { transform: translateY(105%); transition-delay: calc(var(--i) * 70ms); }
html.fx .fx-soft .w { overflow: visible; padding: 0; margin: 0; }
html.fx .fx-soft .c { transform: translateY(.7em); filter: blur(5px); transition-delay: calc(var(--i) * 22ms + 200ms); }
html.fx .fx-split.fx-in .c { opacity: 1; transform: none; filter: none; }
html.fx .fx-done .c { transition-delay: 0ms !important; transition-duration: .35s; }
html.fx .fx-chars.fx-done .c:hover { color: var(--acid); transform: translateY(-.07em) skewX(-9deg); }
html.fx .fx-acc .c { color: var(--acid); }
html.fx .fx-done .fx-acc .c { animation: fx-wave 2.8s ease-in-out infinite; animation-delay: calc(var(--i) * .1s); }
@keyframes fx-wave { 45% { color: var(--paper); text-shadow: 0 0 .35em rgba(213, 255, 57, .55); } }
html.fx .fx-rv { opacity: 0; translate: -34px 0; transition: opacity .8s var(--ease-out) var(--d, 0ms), translate .9s var(--ease-out) var(--d, 0ms); }
html.fx .fx-rv.fx-in { opacity: 1; translate: 0 0; }
html.fx .fx-wipe { opacity: 0; translate: 0 56px; scale: .96; transition: opacity 1s var(--ease-out), translate 1.2s var(--ease-out), scale 1.2s var(--ease-out); }
html.fx .fx-wipe.fx-in { opacity: 1; translate: 0 0; scale: 1; }

/* typed line */
.fx-typed { margin: 0 0 14px; min-height: 1.6em; font-size: 11px; letter-spacing: .04em; color: var(--paper); }
.fx-typed span { color: var(--acid); }
.fx-typed b { font-weight: 400; }
.fx-typed i { display: inline-block; width: 7px; height: 1em; margin-left: 3px; vertical-align: -.15em; background: var(--acid); animation: fx-caret 1s steps(1) infinite; }
@keyframes fx-caret { 50% { opacity: 0; } }

@keyframes fx-spin { from { transform: rotate(-180deg) scale(.4); opacity: 0; } }

/* interactive polish */
.button { transition: color var(--duration-short), background var(--duration-short), transform var(--duration-short), translate .4s var(--ease-out); }
.text-link { transition: color var(--duration-short), translate .4s var(--ease-out); }
.github-link { transition: border-color var(--duration-short), color var(--duration-short), translate .4s var(--ease-out); }
.contact-email { transition: gap var(--duration-short), translate .4s var(--ease-out); }
.motion-toggle { transition: color var(--duration-short), border-color var(--duration-short), translate .4s var(--ease-out); }
.art-frame { transition: transform .5s var(--ease-out); }
.button-primary { position: relative; overflow: hidden; isolation: isolate; }
.button-primary::before { position: absolute; inset: 0; z-index: -1; content: ''; background: var(--paper); transform: translateY(101%); transition: transform .45s var(--ease-out); }
.button-primary:hover::before { transform: translateY(0); }
.button-primary span:last-child { transition: transform .35s var(--ease-out); }
.button-primary:hover span:last-child { transform: translate(4px, -4px); }
.wordmark:hover .wordmark-symbol { animation: fx-spin .8s var(--ease-out); }
.process-list li { transition: opacity .8s var(--ease-out) var(--d, 0ms), translate .9s var(--ease-out) var(--d, 0ms), padding-left .4s var(--ease-out), background .4s; }
.process-list li:hover { padding-left: 14px; background: rgba(16, 17, 15, .08); }
.process-list li > span:last-child { transition: transform .4s var(--ease-out); }
.process-list li:hover > span:last-child { transform: translate(-6px, 0) rotate(45deg); }
@media (min-width: 701px) {
  .site-nav a { position: relative; }
  .site-nav a::after { position: absolute; left: 0; right: 0; bottom: -7px; height: 1px; content: ''; background: var(--acid); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease-out); }
  .site-nav a:hover::after, .site-nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
}
.site-nav a.is-active { color: var(--acid); }

/* ticker */
.ticker { transform: rotate(-1deg) scale(1.02) skewX(var(--sk, 0deg)); }
.ticker-alt { margin-top: -6px; background: var(--ink); color: transparent; -webkit-text-stroke: 1px var(--paper); transform: rotate(1deg) scale(1.02) skewX(calc(var(--sk, 0deg) * -1)); }
.ticker-alt .ticker-track { animation-direction: reverse; animation-duration: 44s; }

/* idle animation */
.hero::before { position: absolute; z-index: 0; top: -5%; right: -10%; width: 55vw; height: 55vw; max-width: 760px; max-height: 760px; content: ''; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(213, 255, 57, .16), transparent 55%), radial-gradient(circle at 70% 65%, rgba(233, 127, 86, .14), transparent 55%); filter: blur(40px); pointer-events: none; animation: fx-drift 18s ease-in-out infinite alternate; }
@keyframes fx-drift { to { transform: translate(-8%, 10%) rotate(40deg) scale(1.15); } }
.orbit-one { animation: fx-orbit1 24s linear infinite; }
.orbit-two { animation: fx-orbit2 30s linear infinite reverse; }
@keyframes fx-orbit1 { to { transform: translate(-50%, -50%) rotate(326deg); } }
@keyframes fx-orbit2 { to { transform: translate(-50%, -50%) rotate(399deg); } }
.portrait-card { animation: fx-float 6s ease-in-out infinite; }
@keyframes fx-float { 50% { translate: 0 -8px; } }
.art-crosshair { animation: fx-turn 8s linear infinite; }
@keyframes fx-turn { to { rotate: 360deg; } }
.status-dot, .live-dot { animation: fx-pulse 1.8s ease-out infinite; }
@keyframes fx-pulse { 70% { box-shadow: 0 0 0 8px rgba(213, 255, 57, 0); } }
.fx-scan { position: absolute; z-index: 3; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--acid), transparent); box-shadow: 0 0 18px var(--acid); pointer-events: none; animation: fx-scan 5s ease-in-out infinite; }
@keyframes fx-scan { 0% { top: 0; opacity: 0; } 10%, 90% { opacity: .5; } 100% { top: 100%; opacity: 0; } }
.visual-orbit { animation: fx-turn 20s linear infinite; }
.shape-one { animation: fx-turn 40s linear infinite; }
.visual-sun { animation: fx-sun 3s ease-in-out infinite; }
@keyframes fx-sun { 50% { scale: 1.12; } }
.visual-window { animation: fx-float 5s ease-in-out infinite; }

/* ===== v2 ===== */
.fx-orb { position: fixed; z-index: 0; width: 62vw; height: 62vw; max-width: 900px; max-height: 900px; border-radius: 50%; pointer-events: none; }
.fx-orb-a { left: -22vw; top: 28vh; background: radial-gradient(circle, rgba(233, 127, 86, .11), transparent 66%); animation: fx-orb 24s ease-in-out infinite alternate; }
.fx-orb-b { right: -24vw; bottom: -18vh; background: radial-gradient(circle, rgba(213, 255, 57, .1), transparent 66%); animation: fx-orb 30s ease-in-out infinite alternate-reverse; }
@keyframes fx-orb { to { transform: translate(14vw, -12vh) scale(1.2); } }
.fx-spot-glow, .fx-spot-grid { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .5s; }
.fx-spot-glow { background: radial-gradient(circle 380px at var(--mx, 50%) var(--my, 50%), rgba(213, 255, 57, .085), transparent 70%); }
.fx-spot-grid { background-image: linear-gradient(rgba(213, 255, 57, .3) 1px, transparent 1px), linear-gradient(90deg, rgba(213, 255, 57, .3) 1px, transparent 1px); background-size: 46px 46px; -webkit-mask-image: radial-gradient(circle 210px at var(--mx, 50%) var(--my, 50%), #000, transparent); mask-image: radial-gradient(circle 210px at var(--mx, 50%) var(--my, 50%), #000, transparent); }
.fx-spot-on .fx-spot-glow, .fx-spot-on .fx-spot-grid { opacity: 1; }

html.fx .fx-chars .c { transition-property: opacity, transform, filter, color, scale, rotate; }
.fx-rgb { text-shadow: calc(var(--v, 0) * 1px) 0 rgba(233, 127, 86, .75), calc(var(--v, 0) * -1px) 0 rgba(213, 255, 57, .6); }
.process-header h2.fx-rgb { text-shadow: calc(var(--v, 0) * 1px) 0 rgba(233, 127, 86, .8), calc(var(--v, 0) * -1px) 0 rgba(16, 17, 15, .5); }

.content-section { position: relative; }
.fx-num { position: absolute; z-index: -1; right: -2vw; top: 4%; font: 700 clamp(150px, 28vw, 430px)/1 var(--display); letter-spacing: -.08em; color: transparent; -webkit-text-stroke: 1px rgba(241, 240, 233, .1); pointer-events: none; user-select: none; will-change: translate; }

.fx-term { max-width: 560px; min-height: 196px; margin-top: 38px; border: 1px solid var(--line-strong); background: rgba(23, 24, 21, .82); backdrop-filter: blur(6px); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.fx-term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 13px; border-bottom: 1px solid var(--line); }
.fx-term-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--rust); }
.fx-term-bar i:nth-child(2) { background: #e0c35a; }
.fx-term-bar i:nth-child(3) { background: var(--acid); }
.fx-term-bar span { margin-left: auto; color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.fx-term-body { padding: 16px 16px 18px; font-size: 12px; line-height: 1.9; color: #cfd0c8; }
.fx-prompt { color: var(--acid); }
.fx-cmd { color: var(--paper); }
.fx-out { margin: 0 0 6px 18px; color: #9c9e96; animation: fx-line .5s var(--ease-out); }
@keyframes fx-line { from { opacity: 0; translate: -8px 0; } }
.fx-caret2 { display: inline-block; width: 7px; height: 1em; vertical-align: -.15em; background: var(--acid); animation: fx-caret 1s steps(1) infinite; }

.fx-teaser { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2.4vw, 34px); margin-top: 34px; }
.project-grid:not([hidden]) + .fx-teaser { display: none; }
html.fx .fx-tile { transition: opacity .8s var(--ease-out) var(--d, 0ms), translate .9s var(--ease-out) var(--d, 0ms), transform .5s var(--ease-out); }
.fx-tile .project-visual { aspect-ratio: .9; }
.fx-tile .visual-word { font-size: clamp(24px, 4vw, 56px); }
.fx-tile .visual-window strong { font-size: clamp(20px, 3vw, 34px); }
.project-card > .fx-tcap { margin: 12px 0 0; color: var(--acid); font-size: 8px; letter-spacing: .07em; }
@media (max-width: 700px) {
  .fx-teaser { grid-template-columns: 1fr; }
  .fx-tile .project-visual { aspect-ratio: 1.3; }
  .fx-orb { display: none; }
  .fx-term { min-height: 0; }
}
