/* RobinLab "living lab" layer — shared by every page.
   Everything here is progressive enhancement driven by js/fx.js: the page is
   fully readable if this file or the script fails. Hidden start-states are
   only ever applied by JS (data-fx attributes), never by CSS alone. */

:root {
  --fx-hot: #ff5d9e;
  --fx-display: "Space Grotesk", var(--font);
  --fx-mono: "JetBrains Mono", var(--font-mono);
  --fx-ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- typography ---------- */
h1, h2, h3, .pf-stat, .col-pack-title, .pr-card-title, .col-packname, .brand-name, .project-title { font-family: var(--fx-display); }
.pf-kicker, .pf-chips li, .pf-skills span, .project-tag, .pf-status, .pf-go {
  font-family: var(--fx-mono);
}
.pf-name { font-weight: 700; letter-spacing: -0.035em; }

/* ---------- fixed backdrop: canvas + aurora orbs ---------- */
#fx-bg {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: -1;
  pointer-events: none;
}
.fx-orbs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.fx-orbs i {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
  will-change: transform;
}
.fx-orbs i:nth-child(1) { width: 46vmax; height: 46vmax; left: -14vmax; top: -10vmax; background: #3b61dc; }
.fx-orbs i:nth-child(2) { width: 38vmax; height: 38vmax; right: -12vmax; top: 24vh; background: #7a3fd8; opacity: 0.32; }
.fx-orbs i:nth-child(3) { width: 30vmax; height: 30vmax; left: 30vw; bottom: -16vmax; background: #14b8a0; opacity: 0.22; }
/* Orbs stay still (they still parallax on scroll): animating a 90px-blurred
   layer forces a full re-blur every frame, which is what made scrolling laggy. */
@keyframes fx-drift {
  from { translate: 0 0; scale: 1; }
  to   { translate: 6vmax 4vmax; scale: 1.18; }
}

/* film grain over everything, very faint */
.fx-grain {
  position: fixed; inset: -50%; z-index: 9990; pointer-events: none;
  opacity: 0.045;
  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>");
  display: none; /* full-screen animated noise layer was too costly */
}
@keyframes fx-grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -5%); } 60% { transform: translate(-5%, -2%); }
  80% { transform: translate(4%, 4%); } 100% { transform: translate(0, 0); }
}

/* ---------- scroll progress ---------- */
.fx-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9991;
  transform-origin: 0 50%; transform: scaleX(0);
  background: var(--aurora);
  box-shadow: 0 0 14px rgba(118, 168, 255, 0.8);
  pointer-events: none;
}

/* ---------- boot loader ---------- */
.fx-loader { display: none; }
html.fx-booting .fx-loader {
  display: block;
  position: fixed; inset: 0; z-index: 9999;
  animation: fx-failsafe 0s 7s forwards;
}
@keyframes fx-failsafe { to { visibility: hidden; pointer-events: none; } }
.fx-loader-panel {
  position: absolute; left: 0; right: 0; height: 50.2%;
  background: #04060f;
  transition: transform 0.9s cubic-bezier(.77, 0, .18, 1);
}
.fx-loader-panel.top { top: 0; border-bottom: 1px solid rgba(118, 168, 255, 0.5); }
.fx-loader-panel.bot { bottom: 0; }
.fx-loader.open .top { transform: translateY(-101%); }
.fx-loader.open .bot { transform: translateY(101%); }
.fx-boot {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: start; gap: 18px;
  padding: 0 24px;
  font-family: var(--fx-mono); font-size: clamp(0.8rem, 2.4vw, 0.98rem);
  color: var(--aurora-3);
  transition: opacity 0.35s ease, transform 0.5s ease;
}
.fx-loader.open .fx-boot { opacity: 0; transform: scale(0.96); }
.fx-boot-log { margin: 0; min-height: 7.5em; white-space: pre-wrap; line-height: 1.65; text-shadow: 0 0 12px rgba(79, 227, 193, 0.55); }
.fx-boot-log b { color: var(--aurora-1); font-weight: 500; }
.fx-boot-bar { width: min(420px, 78vw); height: 3px; background: rgba(118, 168, 255, 0.18); overflow: hidden; border-radius: 2px; }
.fx-boot-bar i { display: block; height: 100%; width: 0; background: var(--aurora); box-shadow: 0 0 12px var(--aurora-1); }
.fx-boot-pct { color: var(--text-muted); font-size: 0.78rem; letter-spacing: 0.18em; }
.fx-boot-skip { color: var(--text-muted); font-size: 0.72rem; opacity: 0.6; }
html.fx-booting body { overflow: hidden; }

/* ---------- custom cursor (fine pointers only) ---------- */
.fx-cur-dot, .fx-cur-ring { display: none; }
html.fx-cursor, html.fx-cursor a, html.fx-cursor button, html.fx-cursor .btn { cursor: none; }
html.fx-cursor .fx-cur-dot, html.fx-cursor .fx-cur-ring {
  display: block;
  position: fixed; left: 0; top: 0; z-index: 9995;
  pointer-events: none;
  border-radius: 50%;
  will-change: transform;
}
.fx-cur-dot {
  width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  background: #fff;
  box-shadow: 0 0 10px 2px var(--aurora-1);
  transition: opacity 0.2s ease, width 0.2s ease, height 0.2s ease, margin 0.2s ease;
}
.fx-cur-ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1.5px solid rgba(118, 168, 255, 0.75);
  transition: width 0.3s var(--fx-ease), height 0.3s var(--fx-ease), margin 0.3s var(--fx-ease),
    background 0.3s ease, border-color 0.3s ease, opacity 0.25s ease;
}
html.fx-cursor.cur-link .fx-cur-ring {
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  background: rgba(118, 168, 255, 0.12);
  border-color: var(--aurora-3);
}
html.fx-cursor.cur-link .fx-cur-dot { width: 4px; height: 4px; margin: -2px 0 0 -2px; }
html.fx-cursor.cur-down .fx-cur-ring { width: 26px; height: 26px; margin: -13px 0 0 -13px; border-color: var(--fx-hot); }
html.fx-cursor.cur-out .fx-cur-dot, html.fx-cursor.cur-out .fx-cur-ring { opacity: 0; }

/* ---------- reveal on scroll ---------- */
html.fx-js [data-fx]:not([data-fx="words"]) {
  opacity: 0;
  translate: 0 38px;
  scale: 0.97;
  filter: blur(8px);
  transition: opacity 0.9s var(--fx-ease), translate 0.9s var(--fx-ease), scale 0.9s var(--fx-ease),
    filter 0.9s var(--fx-ease), transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  transition-delay: var(--d, 0ms);
}
html.fx-js [data-fx="left"]:not(.in) { translate: -48px 0; }
html.fx-js [data-fx="pop"]:not(.in) { translate: 0 0; scale: 0.6; }
html.fx-js [data-fx].in:not([data-fx="words"]) { opacity: 1; translate: 0 0; scale: 1; filter: none; }

/* word-by-word text */
.fx-words .w {
  display: inline-block;
  opacity: 0; translate: 0 0.7em; filter: blur(4px);
  transition: opacity 0.6s var(--fx-ease), translate 0.6s var(--fx-ease), filter 0.6s var(--fx-ease);
  transition-delay: calc(var(--i, 0) * 22ms);
}
.fx-words.in .w { opacity: 1; translate: 0 0; filter: none; }

/* scroll-scrubbed paragraphs: words light up as you read */
.fx-scrub .w { color: rgba(155, 169, 197, 0.34); transition: color 0.35s ease, text-shadow 0.35s ease; }
.fx-scrub .w.on { color: var(--text); }
.fx-scrub strong .w.on { color: var(--aurora-3); text-shadow: 0 0 18px rgba(79, 227, 193, 0.45); }

/* ---------- header + nav ---------- */
.site-header { transition: transform 0.45s var(--fx-ease), background 0.3s ease; }
.site-header.fx-hide { transform: translateY(-100%); }
.brand-mark { position: relative; }
.brand:hover .brand-mark { animation: fx-wobble 0.6s ease; }
@keyframes fx-wobble { 30% { rotate: -12deg; scale: 1.12; } 60% { rotate: 8deg; } }
.site-nav > a {
  position: relative;
  transition: color 0.2s ease;
}
.site-nav > a.is-active, .site-nav > a[aria-current="page"] { color: var(--text); }

/* ---------- hero ---------- */
.pf-hero, .col-hero, .pr-hero { position: relative; overflow: hidden; isolation: isolate; }
/* HUD corner brackets */
.pf-hero::before, .col-hero::before, .pr-hero::before {
  content: "";
  position: absolute; inset: 12px; z-index: -1; pointer-events: none;
  --k: var(--aurora-3);
  background:
    linear-gradient(var(--k), var(--k)) 0 0 / 20px 1.5px no-repeat,
    linear-gradient(var(--k), var(--k)) 0 0 / 1.5px 20px no-repeat,
    linear-gradient(var(--k), var(--k)) 100% 0 / 20px 1.5px no-repeat,
    linear-gradient(var(--k), var(--k)) 100% 0 / 1.5px 20px no-repeat,
    linear-gradient(var(--k), var(--k)) 0 100% / 20px 1.5px no-repeat,
    linear-gradient(var(--k), var(--k)) 0 100% / 1.5px 20px no-repeat,
    linear-gradient(var(--k), var(--k)) 100% 100% / 20px 1.5px no-repeat,
    linear-gradient(var(--k), var(--k)) 100% 100% / 1.5px 20px no-repeat;
  opacity: 0.7;
  animation: fx-bracket 4s ease-in-out infinite;
}
@keyframes fx-bracket { 50% { inset: 18px; opacity: 0.25; } }
/* scanner sweep */
.pf-hero::after, .col-hero::after, .pr-hero::after {
  content: "";
  position: absolute; left: 0; right: 0; top: -30%; height: 30%;
  z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(79, 227, 193, 0.09) 70%, rgba(118, 168, 255, 0.28));
  border-bottom: 1px solid rgba(118, 168, 255, 0.5);
  animation: fx-scan 6.5s linear infinite;
}
@keyframes fx-scan { to { top: 110%; } }

/* moving coordinates in the hero corner */
.fx-hud {
  position: absolute; right: 26px; top: 20px;
  font-family: var(--fx-mono); font-size: 0.68rem; letter-spacing: 0.12em;
  color: var(--text-muted); text-align: right; line-height: 1.7;
  pointer-events: none;
}
.fx-hud b { color: var(--aurora-3); font-weight: 500; }

/* avatar: parallax + orbit rings */
.pf-avatar {
  transform: translate3d(var(--ax, 0px), var(--ay, 0px), 0);
  transition: transform 0.25s ease-out;
  animation: fx-avatar-glow 4.5s ease-in-out infinite;
}
@keyframes fx-avatar-glow {
  50% { box-shadow: 0 20px 90px -10px rgba(180, 140, 255, 0.75), 0 0 0 10px rgba(118, 168, 255, 0.06); }
}
.fx-orbit {
  position: absolute; inset: -20px; border-radius: 50%;
  border: 1px dashed rgba(118, 168, 255, 0.4);
  animation: fx-spin 16s linear infinite;
  pointer-events: none;
}
.fx-orbit i {
  position: absolute; top: -4.5px; left: 50%; margin-left: -4.5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--aurora-3); box-shadow: 0 0 14px 2px var(--aurora-3);
}
.fx-orbit.o2 { inset: -38px; border-color: rgba(180, 140, 255, 0.32); border-style: dotted; animation-duration: 26s; animation-direction: reverse; }
.fx-orbit.o2 i { background: var(--aurora-2); box-shadow: 0 0 14px 2px var(--aurora-2); top: auto; bottom: -4.5px; }
.fx-orbit.o3 { inset: -58px; border-color: rgba(255, 93, 158, 0.18); animation-duration: 40s; }
.fx-orbit.o3 i { background: var(--fx-hot); box-shadow: 0 0 12px 2px var(--fx-hot); width: 6px; height: 6px; margin-left: -3px; top: -3px; }
@keyframes fx-spin { to { rotate: 360deg; } }

/* name: glitch twins */
.pf-name, .fx-title { position: relative; display: block; width: fit-content; }
.pf-name::before, .pf-name::after, .fx-title::before, .fx-title::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0; width: 100%;
  -webkit-text-fill-color: currentColor;
  background: none;
  opacity: 0; pointer-events: none;
  mix-blend-mode: screen;
}
.pf-name::before, .fx-title::before { color: var(--fx-hot); }
.pf-name::after, .fx-title::after { color: var(--aurora-3); }
.pf-name.glitch::before, .fx-title.glitch::before { opacity: 0.85; animation: fx-glitch-a 0.42s steps(2) 1; }
.pf-name.glitch::after, .fx-title.glitch::after { opacity: 0.85; animation: fx-glitch-b 0.42s steps(2) 1; }
@keyframes fx-glitch-a {
  0% { transform: translate(-4px, 1px); clip-path: inset(10% 0 60% 0); }
  25% { transform: translate(3px, -2px); clip-path: inset(55% 0 12% 0); }
  50% { transform: translate(-3px, 2px); clip-path: inset(30% 0 35% 0); }
  75% { transform: translate(5px, 0); clip-path: inset(72% 0 5% 0); }
  100% { transform: translate(0); clip-path: inset(0 0 100% 0); }
}
@keyframes fx-glitch-b {
  0% { transform: translate(4px, -1px); clip-path: inset(62% 0 8% 0); }
  25% { transform: translate(-3px, 2px); clip-path: inset(8% 0 70% 0); }
  50% { transform: translate(3px, -2px); clip-path: inset(40% 0 30% 0); }
  75% { transform: translate(-5px, 0); clip-path: inset(18% 0 55% 0); }
  100% { transform: translate(0); clip-path: inset(0 0 100% 0); }
}
.pf-name.scrambling::before, .pf-name.scrambling::after,
.fx-title.scrambling::before, .fx-title.scrambling::after { display: none; }

/* typed role line */
.pf-role { font-family: var(--fx-mono); min-height: 1.5em; }
.fx-prefix { color: var(--aurora-3); }
.fx-caret {
  display: inline-block; width: 0.55ch; height: 1.05em; margin-left: 2px;
  vertical-align: -0.15em; background: var(--aurora-3);
  animation: fx-blink 0.9s steps(1) infinite;
}
@keyframes fx-blink { 50% { opacity: 0; } }

/* status dot gets a ripple ring */
.pf-status { position: relative; }

/* ---------- marquee ---------- */
.fx-marquee {
  position: relative; overflow: hidden;
  margin: 28px 0 12px;
  padding: 6px 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  user-select: none;
}
.fx-marquee .fx-row { display: flex; width: max-content; will-change: transform; }
.fx-marquee .fx-row + .fx-row { margin-top: 4px; }
.fx-marquee span {
  display: inline-flex; align-items: center; gap: 0.7em;
  padding-right: 0.7em;
  font-family: var(--fx-display); font-weight: 700;
  font-size: clamp(2.2rem, 7vw, 5.2rem); line-height: 1.1;
  text-transform: uppercase; letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1.2px rgba(155, 175, 230, 0.42);
  white-space: nowrap;
  transition: color 0.3s ease, -webkit-text-stroke-color 0.3s ease;
}
.fx-marquee span:hover { color: rgba(118, 168, 255, 0.9); -webkit-text-stroke-color: transparent; }
.fx-marquee span::after { content: "\2726"; font-size: 0.4em; color: var(--aurora-3); -webkit-text-stroke: 0; }
.fx-marquee .fx-row:nth-child(2) span { -webkit-text-stroke-color: rgba(180, 140, 255, 0.4); }
.fx-marquee .fx-row:nth-child(2) span::after { color: var(--aurora-2); }

/* ---------- bento / cards: 3D tilt + glare ---------- */
html.fx-js .fx-tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
}
html.fx-js .fx-tilt:hover {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px);
}
.pf-tile { overflow: hidden; isolation: isolate; }
.pf-tile::after {
  content: "";
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgba(118, 168, 255, 0.2), transparent 70%);
  opacity: 0; transition: opacity 0.3s ease;
}
.pf-tile:hover::after { opacity: 1; }
.pf-tile .pf-go { transition: letter-spacing 0.35s var(--fx-ease), color 0.2s ease; }
.pf-tile:hover .pf-go { letter-spacing: 0.06em; color: var(--aurora-3); }
.pf-stat { display: inline-block; font-variant-numeric: tabular-nums; }
.pf-skills span { transition: transform 0.25s var(--fx-ease), border-color 0.2s ease, background 0.2s ease, color 0.2s ease; }
.pf-skills span:hover { transform: translateY(-3px) rotate(-2deg); border-color: var(--aurora-3); background: rgba(79, 227, 193, 0.1); color: var(--aurora-3); }
.pf-timeline li { transition: transform 0.3s var(--fx-ease); }
.pf-timeline li:hover { transform: translateX(6px); }
.pf-chips li { transition: transform 0.25s var(--fx-ease), background 0.2s ease; }
.pf-chips li:hover { transform: translateY(-3px) scale(1.06); background: rgba(118, 168, 255, 0.28); }

/* ---------- buttons ---------- */
.btn { position: relative; overflow: hidden; }
.btn-primary::after {
  content: "";
  position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s var(--fx-ease);
}
.btn-primary:hover::after { left: 130%; }
.fx-mag { transition: translate 0.35s var(--fx-ease); }

/* ---------- section headings ---------- */
main { counter-reset: fxsec; }
.section-heading :is(h1, h2) { position: relative; display: inline-block; }
.projects .section-heading :is(h1, h2)::before,
.about .section-heading :is(h1, h2)::before,
.contact .section-heading :is(h1, h2)::before {
  counter-increment: fxsec;
  content: "0" counter(fxsec) " / ";
  font-family: var(--fx-mono); font-size: 0.55em; font-weight: 500;
  letter-spacing: 0.1em; vertical-align: 0.3em; margin-right: 6px;
}
.section-heading :is(h1, h2)::after {
  content: "";
  display: block; height: 2px; margin-top: 8px;
  width: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: var(--aurora);
  transition: transform 1.1s var(--fx-ease) 0.2s;
}
.section-heading.in h2::after, html:not(.fx-js) .section-heading :is(h1, h2)::after { transform: scaleX(1); }

/* ---------- horizontal-scroll project showcase (desktop) ---------- */
.projects.fx-h { max-width: none; padding: 0; border-top: 0; }
.fx-h-pin {
  position: sticky; top: 64px;
  height: calc(100vh - 64px);
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
  overflow: hidden;
}
.fx-h-pin > .section-heading { margin: 0; padding: 0 max(var(--gutter), calc((100vw - 1320px) / 2)); }
.fx-h .project-grid {
  display: flex; align-items: stretch; gap: 22px;
  width: max-content;
  padding: 18px max(var(--gutter), calc((100vw - 1320px) / 2)) 26px;
  will-change: transform;
}
.fx-h .project-card { width: 350px; flex: none; }
.fx-h .project-card-placeholder { width: 280px; }
.fx-h-bar {
  margin: 0 max(var(--gutter), calc((100vw - 1320px) / 2));
  display: flex; align-items: center; gap: 14px;
  font-family: var(--fx-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted);
}
.fx-h-bar span:first-child { color: var(--aurora-3); }
.fx-h-bar .track { flex: 1; height: 2px; background: rgba(118, 168, 255, 0.18); border-radius: 2px; overflow: hidden; }
.fx-h-bar .track i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--aurora); }

/* ---------- contact links ---------- */
.contact-link { transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.25s ease, translate 0.35s var(--fx-ease); }
.contact-link:hover { box-shadow: 0 0 0 1px rgba(118, 168, 255, 0.4), 0 14px 34px -14px rgba(118, 168, 255, 0.6); }

/* ---------- small screens: calmer ---------- */
@media (max-width: 720px) {
  .fx-hud { display: none; }
  .fx-orbit.o3 { display: none; }
  .fx-marquee span { -webkit-text-stroke-width: 1px; }
}
@media (max-width: 560px) {
  .fx-orbit.o2 { inset: -30px; }
}

/* ---------- reduced motion: show everything, move nothing ---------- */
@media (prefers-reduced-motion: reduce) {
  html.fx-js [data-fx] { opacity: 1 !important; translate: none !important; scale: none !important; filter: none !important; transition: none !important; }
  .fx-words .w { opacity: 1; translate: none; filter: none; transition: none; }
  .fx-scrub .w { color: var(--text); }
  .fx-orbs i, .fx-grain, .fx-orbit, .pf-hero::before, .pf-hero::after, .pf-avatar, .fx-caret { animation: none; }
  .pf-hero::after, .col-hero::after, .pr-hero::after { display: none; }
  .section-heading :is(h1, h2)::after { transform: scaleX(1); transition: none; }
  .fx-grain { display: none; }
}

/* ---------- inner pages: hero + cards ---------- */
.col-hero, .pr-hero { padding-bottom: 48px; }
.col-hero .fx-hud, .pr-hero .fx-hud { display: none; }
@media (min-width: 760px) { .col-hero .fx-hud, .pr-hero .fx-hud { display: block; } }
.pr-card::after, .col-packcard::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgba(118, 168, 255, 0.18), transparent 70%);
  opacity: 0; transition: opacity 0.3s ease;
}
.pr-card:hover::after, .col-packcard:hover::after { opacity: 1; }
.col-pack-title::before { content: "/ "; font-family: var(--fx-mono); color: var(--aurora-3); }

/* ---------- smoothness on touch / small / low-power devices ---------- */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; -webkit-tap-highlight-color: transparent; }
.fx-h-pin { height: calc(100dvh - 64px); }

/* a radial gradient looks like the blurred orb but costs nothing to paint */
.fx-orbs i { filter: none; background-color: transparent; }
.fx-orbs i:nth-child(1) { background: radial-gradient(closest-side, #3b61dc, transparent); }
.fx-orbs i:nth-child(2) { background: radial-gradient(closest-side, #7a3fd8, transparent); }
.fx-orbs i:nth-child(3) { background: radial-gradient(closest-side, #14b8a0, transparent); }

/* backdrop blur re-samples everything behind it every frame; drop it where it hurts */
@media (max-width: 900px), (pointer: coarse) {
  *, *::before, *::after {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .fx-orbs i { will-change: auto; }
}
@media (hover: none) {
  .pr-card::after, .col-packcard::after { display: none; }
}

/* ---------- display names: Title Case + aurora gradient ---------- */
.col-pack-title, .pr-card-title, .sk-name, .col-card-name {
  letter-spacing: 0.01em;
}
.col-pack-title, .pr-card-title {
  background: var(--aurora);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  font-weight: 700;
}
.col-pack-title::before { -webkit-text-fill-color: var(--aurora-3); }
.sk-name {
  font-family: var(--fx-display); font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, rgba(120,140,255,.14), rgba(80,220,200,.14));
}
.col-card-name { font-family: var(--fx-display); font-weight: 600; }
.col-card-ext {
  flex-shrink: 0; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border);
  font-family: var(--fx-mono); font-size: 9.5px; letter-spacing: 0.08em; color: var(--aurora-3);
}

/* ---------- code-rain backdrop: dim it so text stays readable ---------- */
#fx-bg { opacity: 0.55; }
.fx-orbs { display: none; }
body::before { display: none; }

/* ---------- terminal window backdrop (sits above the binary rain canvas, below content) ---------- */
body:not(.col-page)::after {
  content: "";
  position: fixed; inset: 76px max(12px, calc((100vw - 1080px) / 2 - 24px)) 12px; z-index: -1; pointer-events: none;
  padding: 40px 18px 0; box-sizing: border-box; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font: 12px/1 "JetBrains Mono", Consolas, monospace; color: rgba(94, 255, 168, .55);
  border: 1px solid rgba(94, 242, 255, .28); border-radius: 10px;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, .55), 0 0 24px rgba(94, 242, 255, .08);
  background:
    radial-gradient(circle at 18px 15px, #ff5f57 0 5px, transparent 6px),
    radial-gradient(circle at 38px 15px, #febc2e 0 5px, transparent 6px),
    radial-gradient(circle at 58px 15px, #28c840 0 5px, transparent 6px),
    linear-gradient(rgba(20, 26, 40, .72), rgba(20, 26, 40, .72)) 0 0 / 100% 30px no-repeat,
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px);
}
@media (max-width: 560px) { body:not(.col-page)::after { inset: 70px 6px 6px; } }

/* ---------- animated, non-white text ---------- */
@keyframes fx-hue { to { background-position: 300% 0; } }
.pf-name, h1, h2, .project-title, .col-pack-title, .brand-name {
  background-image: linear-gradient(90deg, #5ef2ff, #8f7bff, #ff6ad5, #ffd36a, #5effa8, #5ef2ff);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: fx-hue 8s linear infinite;
}
/* body copy: soft mint-cyan with a slow shimmer instead of flat white */
:root { --text: #bff8ff; --text-muted: #86c9d6; }
p, li, .about-intro { text-shadow: 0 0 10px rgba(94, 242, 255, 0.18); }
@media (prefers-reduced-motion: reduce) {
  .pf-name, h1, h2, .project-title, .col-pack-title, .brand-name { animation: none; }
}

/* ---------- collection: scene switcher button ---------- */
.fx-scene-btn {
  position: fixed; right: 14px; bottom: 14px; z-index: 50; cursor: pointer;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: rgba(8, 12, 24, .72); color: var(--text); backdrop-filter: blur(8px);
  font: 12px var(--fx-mono, monospace); letter-spacing: .04em;
}
.fx-scene-btn:hover { border-color: var(--aurora-3, #5ef2ff); }
body.col-page { background: radial-gradient(120% 90% at 50% 0%, #0d1530 0%, #04060f 70%) fixed; }
