/* =========================================================
   Luka Jović — Portfolio
   Pure CSS, no build step. Works from file:// and static hosting.
   ========================================================= */

:root {
  --bg: #0b0a10;
  --bg-2: #121019;
  --panel: #15131d;
  --panel-2: #1b1825;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f4f1fb;
  --muted: #a7a1b8;
  --dim: #6f6982;
  --violet: #9257ff;
  --violet-2: #b88bff;
  --blue: #27b6ff;
  --blue-2: #5a7bff;
  --lime: #d8ff3c;
  --lime-ink: #141a00;
  --radius: 26px;
  --radius-sm: 14px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --f-display: 'Permanent Marker', 'Comic Sans MS', system-ui, sans-serif;
  --f-hand: 'Caveat Brush', 'Permanent Marker', cursive;
  --f-body: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* subtle dot grid + grain across the page */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: -1;
  background:
    radial-gradient(rgba(255,255,255,.035) 1px, transparent 1.4px) 0 0 / 26px 26px,
    radial-gradient(1200px 700px at 85% -10%, rgba(146,87,255,.14), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(39,182,255,.08), transparent 60%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 100;
  opacity: .05; mix-blend-mode: overlay;
  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");
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { flex: none; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--lime); color: var(--lime-ink); padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  --h: 54px;
  display: inline-flex; align-items: center; gap: 10px;
  height: var(--h); padding: 0 26px;
  border-radius: 999px;
  font-weight: 700; font-size: 16px; letter-spacing: .01em;
  text-decoration: none; white-space: nowrap;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, color .3s, border-color .3s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--lime); color: var(--lime-ink); box-shadow: 0 10px 30px -10px rgba(216,255,60,.55), inset 0 -3px 0 rgba(0,0,0,.12); }
.btn-primary:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 18px 40px -12px rgba(216,255,60,.7), inset 0 -3px 0 rgba(0,0,0,.12); }
.btn-ghost { border-color: rgba(146,87,255,.7); color: var(--text); background: rgba(146,87,255,.08); }
.btn-ghost:hover { transform: translateY(-3px) rotate(1deg); background: rgba(146,87,255,.22); border-color: var(--violet-2); box-shadow: 0 14px 34px -14px rgba(146,87,255,.8); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-sm { --h: 46px; padding: 0 20px; font-size: 15px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--header-h);
  transition: background .4s, backdrop-filter .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { background: rgba(11,10,16,.72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.logo { font-family: var(--f-display); font-size: 30px; text-decoration: none; letter-spacing: .02em; line-height: 1; transform: rotate(-3deg); transition: transform .4s var(--ease); }
.logo span { color: var(--lime); }
.logo:hover { transform: rotate(2deg) scale(1.05); }
.nav { display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.nav-link {
  position: relative; padding: 8px 18px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted);
  transition: color .25s, background .25s;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.06); }
.nav-link.is-active { color: var(--lime-ink); background: var(--lime); }
.nav-toggle { display: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--violet); cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 14px; right: 14px; height: 2.5px; border-radius: 2px; background: #fff; transition: transform .3s var(--ease), top .3s var(--ease); }
.nav-toggle span:first-child { top: 18px; }
.nav-toggle span:last-child { top: 26px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 22px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 22px; transform: rotate(-45deg); }

/* ---------- Doodles / hand notes ---------- */
.doodle { position: absolute; pointer-events: none; }
.hand-note { font-family: var(--f-hand); color: var(--violet-2); line-height: 1.05; margin: 0; letter-spacing: .01em; }

@keyframes floaty { 0%,100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-10px) rotate(calc(var(--r, 0deg) + 4deg)); } }
@keyframes wiggle { 0%,100% { transform: rotate(var(--r, 0deg)); } 50% { transform: rotate(calc(var(--r, 0deg) - 7deg)); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%,100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.6) rotate(30deg); opacity: .5; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  padding: calc(var(--header-h) + 40px) 0 90px;
  display: flex; align-items: center;
  overflow: hidden;
}
.splash { position: absolute; pointer-events: none; z-index: 0; filter: blur(2px); }
.splash-a {
  width: 520px; height: 420px; left: -180px; top: -140px;
  background: radial-gradient(closest-side, rgba(146,87,255,.75), rgba(146,87,255,.25) 60%, transparent);
  border-radius: 43% 57% 64% 36% / 45% 38% 62% 55%;
  opacity: .55;
}
.splash-b {
  width: 360px; height: 300px; left: -120px; bottom: 30px;
  background: radial-gradient(closest-side, rgba(39,182,255,.6), rgba(39,182,255,.15) 65%, transparent);
  border-radius: 60% 40% 45% 55% / 50% 60% 40% 50%;
  opacity: .5;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero-copy { position: relative; }

.status-pill {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 22px; padding: 7px 16px 7px 12px;
  border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04);
  font-size: 14px; font-weight: 600; color: var(--muted);
}
.status-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(216,255,60,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(216,255,60,.55); } 70% { box-shadow: 0 0 0 10px rgba(216,255,60,0); } 100% { box-shadow: 0 0 0 0 rgba(216,255,60,0); } }

.hero-title { margin: 0; font-family: var(--f-display); font-weight: 400; line-height: .92; letter-spacing: .01em; }
.hero-title .hey { display: block; font-size: clamp(34px, 5vw, 64px); color: var(--violet-2); transform: rotate(-4deg); transform-origin: left; margin-bottom: 4px; text-shadow: 0 0 30px rgba(146,87,255,.5); }
.hero-title .name { position: relative; display: inline-block; font-size: clamp(58px, 9.6vw, 132px); color: #fff; text-shadow: 0 6px 0 rgba(146,87,255,.35); white-space: nowrap; }
.hero-title .brush { position: absolute; left: -2%; bottom: -16px; width: 98%; height: 26px; color: var(--lime); z-index: -1; transform: rotate(-1.5deg); }
.hero-crown { width: 66px; height: 50px; color: var(--lime); top: 26px; left: min(520px, 62%); --r: 14deg; transform: rotate(14deg); animation: wiggle 3.5s ease-in-out infinite; }

.hero-sub { margin: 34px 0 10px; font-size: clamp(17px, 1.7vw, 22px); font-weight: 600; letter-spacing: .02em; }
.hero-sub i { font-style: normal; color: var(--violet); margin: 0 8px; }
.hero-lead { margin: 0 0 30px; max-width: 520px; color: var(--muted); font-size: 17px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.note-hero { position: absolute; left: -6px; bottom: -112px; font-size: 25px; transform: rotate(-6deg); color: var(--blue); }
.note-arrow { position: absolute; left: 172px; top: -14px; width: 70px; height: 54px; color: var(--blue); transform: scaleY(-1) rotate(-10deg); }

.hero-art { position: relative; justify-self: center; width: min(100%, 540px); aspect-ratio: 1 / 1; }
.portrait { position: absolute; inset: 6%; }
.portrait img {
  position: relative; z-index: 1;
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 46% 54% 44% 56% / 52% 46% 54% 48%;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 0 3px rgba(11,10,16,1);
  animation: blobby 12s ease-in-out infinite;
}
@keyframes blobby {
  0%,100% { border-radius: 46% 54% 44% 56% / 52% 46% 54% 48%; }
  50% { border-radius: 54% 46% 52% 48% / 46% 54% 46% 54%; }
}
.portrait-ring {
  position: absolute; inset: -14px; z-index: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--violet), var(--blue), var(--lime), var(--violet));
  filter: blur(26px); opacity: .55;
  animation: spin 14s linear infinite;
}
.bubble {
  position: absolute; z-index: 3; left: -4%; top: 2%;
  padding: 16px 22px 14px; border-radius: 50% 50% 48% 52% / 60% 55% 45% 40%;
  background: #fff; color: #17121f;
  font-family: var(--f-display); font-size: clamp(15px, 1.6vw, 20px); line-height: 1.05; text-align: center;
  transform: rotate(-8deg);
  box-shadow: 6px 6px 0 var(--violet);
  animation: floaty 5s ease-in-out infinite; --r: -8deg;
}
.bubble::after { content: ""; position: absolute; right: 16px; bottom: -14px; border: 10px solid transparent; border-top: 18px solid #fff; border-bottom: 0; transform: rotate(-24deg); }
.d-bolt { width: 46px; height: 70px; color: var(--blue); right: -2%; top: 8%; --r: 12deg; animation: floaty 4.2s ease-in-out infinite; filter: drop-shadow(0 0 8px rgba(39,182,255,.7)); }
.d-smiley { width: 58px; height: 58px; color: var(--lime); right: 1%; bottom: 10%; --r: -10deg; animation: wiggle 3s ease-in-out infinite; }
.d-star { width: 40px; height: 40px; color: var(--violet-2); left: 0; bottom: 14%; --r: -12deg; animation: floaty 5.5s ease-in-out infinite .6s; }
.d-spark1 { width: 22px; height: 22px; color: var(--lime); left: 18%; top: -1%; animation: twinkle 2.6s ease-in-out infinite; }
.d-spark2 { width: 16px; height: 16px; color: var(--blue); right: 18%; bottom: -1%; animation: twinkle 3.2s ease-in-out infinite .8s; }
.d-spiral { width: 54px; height: 54px; color: rgba(184,139,255,.7); left: -6%; top: 46%; animation: spin 9s linear infinite; }

.scroll-hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 2;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); text-decoration: none;
}
.scroll-hint:hover { color: var(--text); }
.mouse { width: 20px; height: 32px; border: 2px solid currentColor; border-radius: 12px; position: relative; }
.mouse span { position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--lime); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }

/* ---------- Sections & panels ---------- */
.section { position: relative; padding: clamp(18px, 3vw, 28px) 0; }
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 52px);
  box-shadow: 0 30px 70px -40px rgba(0,0,0,.9);
}
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; position: relative; }
.section-title {
  position: relative; display: inline-block;
  margin: 0; font-family: var(--f-display); font-weight: 400;
  font-size: clamp(34px, 4.6vw, 56px); line-height: 1; letter-spacing: .01em;
  padding-bottom: 6px;
}
.section-title .hl { color: var(--violet-2); }
.section-title .hl-blue { color: var(--blue); }
.section-title .amp { color: var(--lime); }
.title-squiggle { position: absolute; right: -96px; top: 50%; width: 80px; height: 18px; color: var(--violet); transform: translateY(-50%) rotate(-6deg); }
.section-intro { margin: 18px 0 34px; max-width: 680px; color: var(--muted); }
.section-intro b { color: var(--text); }
.link-more { display: inline-flex; align-items: center; gap: 6px; color: var(--lime); font-weight: 600; text-decoration: none; padding-bottom: 6px; }
.link-more svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.link-more:hover svg { transform: translate(3px, -3px); }

/* ---------- Project cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 26px); }
.card {
  --accent: var(--violet); --accent2: var(--blue);
  position: relative; display: flex; flex-direction: column;
  border-radius: 22px; overflow: hidden;
  background: var(--panel-2);
  border: 1px solid var(--line);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .4s;
  cursor: pointer;
}
.card:hover, .card:focus-within { transform: translateY(-8px); border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--accent) 70%, transparent); }
.card-art { position: relative; aspect-ratio: 4 / 3; overflow: hidden; isolation: isolate; }
.card-art::after { content: ""; position: absolute; inset: 0; z-index: 5; background: linear-gradient(180deg, transparent 55%, rgba(27,24,37,.9)); pointer-events: none; }
.layer { position: absolute; max-width: none; transition: transform .6s var(--ease), filter .6s var(--ease); will-change: transform; }
.card-tag {
  position: absolute; z-index: 6; left: 14px; top: 14px;
  padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(11,10,16,.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid var(--line-2);
}

.art-bass { background: #0a3a4a; }
.art-bass .l-bg { inset: -6%; width: 112%; height: 112%; object-fit: cover; }
.art-bass .l-hero { width: 52%; left: 24%; top: 16%; filter: drop-shadow(0 18px 24px rgba(0,0,0,.55)); }
.art-bass .l-bait { width: 30%; left: 2%; top: 46%; transform: rotate(-12deg); filter: drop-shadow(0 12px 16px rgba(0,0,0,.5)); }
.art-bass .l-spool { width: 28%; right: 2%; top: 40%; transform: rotate(10deg); filter: drop-shadow(0 12px 16px rgba(0,0,0,.5)); }

.art-blood { background: radial-gradient(70% 70% at 50% 45%, #5c0f22, #22070f 70%, #120408); }
.art-blood::before { content: ""; position: absolute; inset: 0; background: radial-gradient(40% 40% at 50% 50%, rgba(255,80,60,.35), transparent 70%); animation: flicker 3s ease-in-out infinite; }
@keyframes flicker { 0%,100% { opacity: .8; } 45% { opacity: 1; } 55% { opacity: .65; } }
.art-blood .l-bg { inset: -6%; width: 112%; height: 112%; object-fit: cover; z-index: -1; }
.art-blood .l-hero { height: 78%; left: 50%; top: 12%; margin-left: -18%; filter: drop-shadow(0 18px 26px rgba(0,0,0,.6)); }
.art-blood .l-ring { width: 36%; left: -2%; top: 40%; transform: rotate(-14deg); filter: drop-shadow(0 12px 18px rgba(0,0,0,.6)) brightness(.9); }
.art-blood .l-candles { height: 62%; right: 0; top: 28%; filter: drop-shadow(0 12px 18px rgba(0,0,0,.6)) brightness(.95); }

.art-sweet { background: #f2a6d8; }
.art-sweet .l-bg { inset: -6%; width: 112%; height: 112%; object-fit: cover; }
.art-sweet .l-hero { width: 40%; left: 30%; top: 16%; filter: drop-shadow(0 18px 24px rgba(0,0,0,.55)); }
.art-sweet .l-rainbow { width: 31%; left: 7%; top: 33%; transform: rotate(-12deg); filter: drop-shadow(0 12px 16px rgba(0,0,0,.5)); }
.art-sweet .l-red { width: 30%; right: 7%; top: 36%; transform: rotate(10deg); filter: drop-shadow(0 12px 16px rgba(0,0,0,.5)); }

.card:hover .l-hero { transform: translateY(-6px) scale(1.06); }
.card:hover .l-bg { transform: scale(1.05); }

.card-body { position: relative; padding: 4px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin: 0 0 8px; font-family: var(--f-display); font-weight: 400; font-size: 28px; letter-spacing: .01em; }
.card-body p { margin: 0 0 16px; color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.chips { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 12.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px; color: var(--text); background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.card-cta {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  font-weight: 700; font-size: 14.5px; cursor: pointer;
  transition: background .3s, transform .3s var(--ease), color .3s;
}
.card-cta svg { width: 14px; height: 14px; }
.card-cta:hover, .card:hover .card-cta { background: var(--accent); color: #0b0a10; }

/* ---------- Spine Lab ---------- */
.panel-lab::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(39,182,255,.5), transparent 30%, transparent 70%, rgba(146,87,255,.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.note-lab { font-size: 26px; color: var(--lime); transform: rotate(-4deg); padding-bottom: 8px; }
.lab { display: grid; grid-template-columns: 290px 1fr; gap: 22px; align-items: start; }
.lab-side { display: flex; flex-direction: column; gap: 22px; padding: 20px; border-radius: 20px; background: rgba(0,0,0,.25); border: 1px solid var(--line); min-width: 0; }
.lab-label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.lab-label em { font-style: normal; color: var(--violet-2); margin-left: 4px; }
.seg { display: grid; gap: 6px; }
.seg button, .scene-list button, .anim-list button {
  width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255,255,255,.03);
  transition: background .25s, border-color .25s, color .25s, transform .25s var(--ease);
}
.seg button { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; font-weight: 700; font-size: 15.5px; }
.seg button .sw { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.seg button:hover, .scene-list button:hover, .anim-list button:hover { background: rgba(255,255,255,.07); border-color: var(--line-2); }
.seg button[aria-selected="true"] { background: linear-gradient(90deg, rgba(146,87,255,.35), rgba(146,87,255,.08)); border-color: rgba(184,139,255,.6); }
.scene-list { display: grid; gap: 6px; }
.scene-list button { padding: 9px 14px; border-radius: 12px; font-size: 14.5px; font-weight: 600; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.scene-list button small { color: var(--dim); font-weight: 500; }
.scene-list button[aria-pressed="true"] { color: var(--text); border-color: rgba(39,182,255,.7); background: rgba(39,182,255,.12); }
.anim-list { display: flex; flex-direction: column; gap: 4px; max-height: 330px; overflow: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.anim-list .grp { font-size: 12px; color: var(--dim); margin: 8px 0 2px 4px; font-weight: 600; }
.anim-list button { padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); font-family: var(--f-body); display: flex; align-items: center; gap: 8px; }
.anim-list button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--dim); flex: none; }
.anim-list button[aria-pressed="true"] { color: var(--lime-ink); background: var(--lime); border-color: var(--lime); }
.anim-list button[aria-pressed="true"]::before { background: var(--lime-ink); border-color: var(--lime-ink); }
.anim-list button:disabled { opacity: .45; cursor: default; }

.lab-main { min-width: 0; }
.stage {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(rgba(255,255,255,.06) 1px, transparent 1.3px) 0 0 / 22px 22px,
    radial-gradient(70% 80% at 50% 50%, var(--stage-c1, #2a1a44), var(--stage-c2, #0f0c16));
  transition: --stage-c1 .5s;
}
.stage[data-theme="bass"] { --stage-c1: #0f4a63; --stage-c2: #06141c; }
.stage[data-theme="blood"] { --stage-c1: #4d0d1f; --stage-c2: #12050a; }
.stage[data-theme="sweet"] { --stage-c1: #6a2a6a; --stage-c2: #1a0b1c; }
.stage-player { position: absolute; inset: 0; }
.stage-player .spine-player { width: 100%; height: 100%; background: none; }
.stage-player canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.stage-player .spine-player-error { display: none !important; }
.stage-overlay {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(11,10,16,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  color: var(--muted); font-weight: 600; text-align: center; padding: 20px;
  transition: opacity .4s;
}
.stage-overlay p { margin: 0; }
.stage-overlay.is-hidden { opacity: 0; pointer-events: none; }
.stage-overlay.is-error { color: #ffb3c0; }
.stage-overlay.is-error .loader { display: none; }
.loader { display: flex; gap: 8px; }
.loader span { width: 12px; height: 12px; border-radius: 50%; background: var(--lime); animation: bounce 1s ease-in-out infinite; }
.loader span:nth-child(2) { background: var(--blue); animation-delay: .12s; }
.loader span:nth-child(3) { background: var(--violet); animation-delay: .24s; }
@keyframes bounce { 0%,100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(-10px); opacity: 1; } }
.stage-hud { position: absolute; left: 14px; top: 14px; z-index: 2; display: flex; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.stage-hud span { padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: rgba(11,10,16,.7); border: 1px solid var(--line-2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.stage-hud span:last-child { color: var(--lime); }

/* fullscreen: the whole stage becomes the canvas area, controls float at the bottom */
.lab-main:fullscreen { background: #07060a; display: flex; flex-direction: column; padding: 16px; gap: 12px; }
.lab-main:fullscreen .stage { flex: 1; aspect-ratio: auto; border-radius: 14px; }
.lab-main.pseudo-full { position: fixed; inset: 0; z-index: 300; background: #07060a; display: flex; flex-direction: column; padding: 12px; gap: 10px; }
.lab-main.pseudo-full .stage { flex: 1; aspect-ratio: auto; }

.controls {
  margin-top: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px; border-radius: 18px; background: rgba(0,0,0,.3); border: 1px solid var(--line);
}
.ctl {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255,255,255,.05);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .25s, transform .25s var(--ease), border-color .25s, color .25s;
}
.ctl svg { width: 20px; height: 20px; }
.ctl:hover:not(:disabled) { background: rgba(255,255,255,.12); transform: translateY(-2px); }
.ctl:disabled { opacity: .4; cursor: default; }
.ctl-play { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.ctl-play:hover:not(:disabled) { background: #e6ff7a; }
.ctl-toggle.is-on { color: var(--blue); border-color: rgba(39,182,255,.6); background: rgba(39,182,255,.12); }
.timeline { flex: 1 1 120px; min-width: 80px; height: 6px; border-radius: 6px; background: rgba(255,255,255,.1); overflow: hidden; }
.timeline-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--blue)); }
.time { font-variant-numeric: tabular-nums; font-size: 13.5px; color: var(--muted); min-width: 104px; text-align: right; }
.speed { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); padding: 0 6px; }
.speed output { font-variant-numeric: tabular-nums; color: var(--text); min-width: 46px; font-weight: 700; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 120px; height: 6px; border-radius: 6px; background: rgba(255,255,255,.12); outline-offset: 6px; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--lime); border: 3px solid #0b0a10; box-shadow: 0 0 0 1px var(--lime); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--lime); border: 3px solid #0b0a10; }
input[type="range"]:disabled { opacity: .4; cursor: default; }

/* ---------- Rig inspection (Spine debug overlays) ---------- */
.controls { position: relative; }
.debug-wrap { display: contents; }
.ctl-debug { position: relative; }
.ctl-debug[aria-expanded="true"], .ctl-debug.is-active { color: var(--blue); border-color: rgba(39,182,255,.6); background: rgba(39,182,255,.12); }
.debug-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px #15131d; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .2s var(--ease); }
.ctl-debug.is-active .debug-dot { opacity: 1; transform: none; }
.debug-panel {
  position: absolute; right: 0; bottom: calc(100% + 10px); z-index: 20;
  width: min(340px, 100%);
  padding: 14px; border-radius: 16px;
  background: rgba(21,19,29,.97); border: 1px solid var(--line-2);
  box-shadow: 0 24px 50px -18px rgba(0,0,0,.85), 0 0 0 1px rgba(39,182,255,.08);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  animation: dbgIn .22s var(--ease);
}
.debug-panel[hidden] { display: none; }
@keyframes dbgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.debug-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.debug-title { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.debug-reset { border: 1px solid var(--line-2); background: rgba(255,255,255,.04); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; transition: color .2s, background .2s; }
.debug-reset:hover { color: var(--text); background: rgba(255,255,255,.1); }
.debug-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dbg {
  position: relative; display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
  font-size: 14px; font-weight: 600; color: var(--muted);
  transition: background .2s, border-color .2s, color .2s;
  -webkit-user-select: none; user-select: none;
}
.dbg:hover { background: rgba(255,255,255,.07); }
.dbg input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.dbg-sw { flex: none; position: relative; width: 28px; height: 16px; border-radius: 999px; background: rgba(255,255,255,.14); transition: background .2s; }
.dbg-sw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #cfc9dd; transition: transform .2s var(--ease), background .2s; }
.dbg input:checked + .dbg-sw { background: var(--blue); }
.dbg input:checked + .dbg-sw::after { transform: translateX(12px); background: #fff; }
.dbg input:focus-visible + .dbg-sw { outline: 2px solid var(--lime); outline-offset: 2px; }
.dbg:has(input:checked) { color: var(--text); border-color: rgba(39,182,255,.45); background: rgba(39,182,255,.08); }
.dbg-name { flex: 1; min-width: 0; }
.dbg-n { font-size: 11.5px; font-weight: 700; color: var(--dim); font-variant-numeric: tabular-nums; }
.dbg.is-na { cursor: not-allowed; opacity: .5; }
.debug-note { margin: 10px 2px 0; font-size: 12px; line-height: 1.45; color: var(--dim); }

/* ---------- Skills ---------- */
.note-skills { font-size: 28px; color: var(--violet-2); transform: rotate(-6deg); padding-bottom: 6px; }
.tools { list-style: none; padding: 0; margin: 38px 0 30px; display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(12px, 2vw, 22px); }
.tool { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.tool-icon {
  width: 100%; max-width: 116px; aspect-ratio: 1; padding: 14px; border-radius: 24px;
  background: rgba(255,255,255,.035); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s, background .3s;
}
.tool-icon img { width: 100%; height: 100%; object-fit: contain; border-radius: 18px; }
.tool:hover .tool-icon { transform: translateY(-8px) rotate(-4deg); border-color: rgba(184,139,255,.5); background: rgba(146,87,255,.1); box-shadow: 0 22px 40px -20px rgba(146,87,255,.8); }
.tool:nth-child(even):hover .tool-icon { transform: translateY(-8px) rotate(4deg); }
.tool-name { font-size: 14.5px; font-weight: 600; color: var(--muted); line-height: 1.25; }
.tool:hover .tool-name { color: var(--text); }
.skill-tags { list-style: none; margin: 0; padding: 22px 0 0; border-top: 1px dashed var(--line-2); display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tags li { padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14.5px; background: rgba(255,255,255,.04); border: 1px solid var(--line); transition: background .3s, border-color .3s, color .3s; }
.skill-tags li:nth-child(3n+1) { border-color: rgba(146,87,255,.45); }
.skill-tags li:nth-child(3n+2) { border-color: rgba(39,182,255,.45); }
.skill-tags li:nth-child(3n) { border-color: rgba(216,255,60,.4); }
.skill-tags li:hover { background: rgba(255,255,255,.09); color: #fff; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(260px, 400px) 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.about-card { position: sticky; top: calc(var(--header-h) + 20px); }
.about-card-inner {
  position: relative; overflow: hidden; border-radius: 24px; aspect-ratio: 1 / 1.08;
  background: var(--lime);
  box-shadow: 10px 10px 0 var(--violet);
}
.about-card-inner::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(rgba(0,0,0,.18) 1.4px, transparent 1.8px) 0 0 / 14px 14px;
  -webkit-mask-image: linear-gradient(135deg, #000, transparent 60%); mask-image: linear-gradient(135deg, #000, transparent 60%);
}
.about-card-inner img {
  position: absolute; right: -5%; bottom: -5%; width: 76%;
  border-radius: 50% 50% 0 0 / 46% 46% 0 0;
  border: 5px solid #0b0a10; border-bottom: 0;
  transition: transform .6s var(--ease);
}
.about-card:hover img { transform: translateY(-6px) rotate(-2deg); }
.about-words { position: absolute; left: 22px; top: 20px; z-index: 1; margin: 0; font-family: var(--f-display); font-size: clamp(24px, 2.6vw, 32px); line-height: 1.02; color: var(--lime-ink); transform: rotate(-6deg); transform-origin: left top; }
.about-crown { width: 56px; height: 42px; color: var(--lime-ink); left: 26px; bottom: 28px; transform: rotate(-12deg); }
.facts { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 10px; }
.facts li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.facts b { min-width: 76px; color: var(--lime); font-weight: 800; display: inline-flex; }
.facts b svg { width: 20px; height: 20px; }

.about-copy .section-title { margin-bottom: 22px; }
.about-bio { color: var(--muted); margin: 0 0 14px; max-width: 700px; }
.about-bio b { color: var(--text); }
.timeline-cols { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(20px, 3vw, 40px); margin-top: 34px; }
.tl-title { font-family: var(--f-display); font-weight: 400; font-size: 26px; margin: 0 0 18px; color: var(--text); }
.tl { list-style: none; margin: 0 0 24px; padding: 0 0 0 22px; position: relative; }
.tl::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: linear-gradient(var(--violet), var(--blue) 70%, transparent); }
.tl-item { position: relative; padding: 0 0 22px; }
.tl-item::before { content: ""; position: absolute; left: -22px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2.5px solid var(--violet-2); }
.tl-item.is-current::before { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 0 5px rgba(216,255,60,.15); }
.tl-date { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
.tl-item h4 { margin: 2px 0 6px; font-size: 18px; font-weight: 700; line-height: 1.3; }
.tl-item h4 em { display: block; font-style: normal; font-weight: 600; font-size: 15px; color: var(--violet-2); }
.tl-item p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.tl-item a { color: var(--lime); text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.footer { padding: clamp(18px, 3vw, 28px) 0 30px; }
.panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; overflow: hidden; }
.footer-title { margin: 0; font-family: var(--f-display); font-size: clamp(32px, 4.4vw, 54px); line-height: 1.02; transform: rotate(-2deg); }
.circled { position: relative; display: inline-block; color: var(--lime); padding: 0 12px; }
.circled::after { content: ""; position: absolute; inset: -6px -4px -2px; border: 3px solid var(--violet); border-radius: 50% 46% 52% 48% / 58% 50% 54% 46%; transform: rotate(-4deg); }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; position: relative; z-index: 1; }
.f-link { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; font-size: 17px; color: var(--text); transition: color .25s; }
.f-link svg { width: 40px; height: 40px; padding: 9px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); transition: background .3s, border-color .3s, color .3s, transform .3s var(--ease); }
.f-link:hover { color: var(--lime); }
.f-link:hover svg { background: var(--violet); border-color: var(--violet); color: #fff; transform: rotate(-8deg); }
.footer-smiley { width: 70px; height: 70px; left: 50%; top: 50%; margin-top: -35px; color: rgba(146,87,255,.45); transform: rotate(12deg); animation: wiggle 4s ease-in-out infinite; --r: 12deg; }
@media (max-width: 1100px) { .footer-smiley { display: none; } }
.footer-bottom { display: flex; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; padding: 22px 6px 0; font-size: 13.5px; color: var(--dim); }
.footer-bottom a { color: var(--muted); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .lab { grid-template-columns: 1fr; }
  .lab-side { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .lab-group-anims { grid-column: 1 / -1; }
  .anim-list { flex-direction: row; flex-wrap: wrap; max-height: none; }
  .anim-list button { width: auto; }
  .anim-list .grp { flex-basis: 100%; }
  .seg { grid-template-columns: repeat(3, 1fr); }
  .seg button { justify-content: center; font-size: 14px; padding: 10px 8px; }
  .tools { grid-template-columns: repeat(3, 1fr); }
  .tool-icon { max-width: 104px; }
}
@media (max-width: 960px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .cards .card:last-child { grid-column: 1 / -1; }
  .cards .card:last-child { flex-direction: row; }
  .cards .card:last-child .card-art { flex: 0 0 50%; aspect-ratio: auto; min-height: 300px; }
  .cards .card:last-child .card-body { padding-top: 24px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-card { position: relative; top: 0; max-width: 460px; order: 2; }
  .about-copy { order: 1; }
  .timeline-cols { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .nav {
    position: fixed; top: calc(var(--header-h) + 8px); left: 16px; right: 16px;
    flex-direction: column; gap: 4px; padding: 10px; border-radius: 20px;
    background: rgba(21,19,29,.97); border-color: var(--line-2);
    box-shadow: 0 30px 60px -20px rgba(0,0,0,.8);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .3s, transform .3s var(--ease), visibility .3s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-link { padding: 14px 18px; font-size: 17px; }
  .nav-toggle { display: block; }
  .hero { padding-top: calc(var(--header-h) + 24px); padding-bottom: 80px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { order: -1; width: min(78vw, 420px); }
  .hero-crown { display: none; }
  .note-hero { position: relative; left: auto; bottom: auto; margin-top: 26px; font-size: 22px; }
  .note-arrow { display: none; }
  .title-squiggle { display: none; }
  .scroll-hint { display: none; }
  .lab-side { grid-template-columns: 1fr; }
  .timeline { order: 10; flex-basis: 100%; }
  .time { order: 11; text-align: left; min-width: 0; }
  .speed { margin-left: auto; order: 5; }
  .ctl-debug, #btnFull { order: 6; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .cards { grid-template-columns: 1fr; }
  .cards .card:last-child { flex-direction: column; }
  .cards .card:last-child .card-art { flex: none; aspect-ratio: 4 / 3; min-height: 0; }
  .cards .card:last-child .card-body { padding-top: 4px; }
  .lab-side { grid-template-columns: 1fr; padding: 14px; }
  .seg { grid-template-columns: 1fr; }
  .stage { aspect-ratio: 4 / 3; }
  .controls { gap: 8px; }
  .timeline { order: 10; flex-basis: 100%; }
  .time { order: 11; text-align: left; min-width: 0; }
  .speed { margin-left: auto; padding: 0; order: 5; }
  .ctl-debug, #btnFull { order: 6; }
  .stage-hud span:first-child { display: none; }
  .speed span { display: none; }
  input[type="range"] { width: 92px; }
  .tools { grid-template-columns: repeat(2, 1fr); }
  .hero-cta .btn { flex: 1 1 100%; justify-content: center; }
  .panel-footer { flex-direction: column; align-items: flex-start; }
  .footer-smiley { display: none; }
  .bubble { left: -2%; top: -2%; }
  .note-skills, .note-lab { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
