/* =========================================================
   Susie Park — Portfolio  (light theme)
   Palette: white base + #fccf28 (yellow) / #fda427 (orange) accents
   Type: Quicksand Bold (700) headings · Regular (400) body
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Color — light */
  --bg: #ffffff;
  --surface: #faf9f5;      /* warm off-white cards/sections */
  --surface-2: #f3f1e9;
  --ink: #161513;          /* near-black text (softer than pure black) */
  --muted: #56524c;        /* AA on white */
  --muted-2: #6e6a62;      /* AA on white for small text */
  --line: rgba(22, 21, 19, 0.10);
  --line-strong: rgba(22, 21, 19, 0.16);

  --yellow: #fccf28;
  --orange: #fda427;
  --amber-ink: #8a5300;    /* dark amber for accent TEXT that needs contrast */
  --grad: linear-gradient(120deg, var(--yellow), var(--orange));
  --grad-soft: linear-gradient(120deg, rgba(252,207,40,.18), rgba(253,164,39,.18));
  --grad-emph: linear-gradient(115deg, #f0a800, #ec6a12); /* deeper brand gradient for legible emphasis TEXT on white */

  /* Fonts */
  --font-head: "Google Sans", system-ui, sans-serif;
  --font-body: "Google Sans", system-ui, sans-serif;

  /* Fluid type scale */
  --fs-xs: clamp(0.72rem, 0.69rem + 0.15vw, 0.8rem);
  --fs-sm: clamp(0.85rem, 0.8rem + 0.25vw, 0.95rem);
  --fs-base: clamp(1rem, 0.95rem + 0.35vw, 1.15rem);
  --fs-lg: clamp(1.15rem, 1.02rem + 0.6vw, 1.5rem);
  --fs-h3: clamp(1.2rem, 1.08rem + 0.7vw, 1.5rem);
  --fs-h2: clamp(1.9rem, 1.4rem + 2.6vw, 3.2rem);
  --fs-h1: clamp(2.6rem, 1.9rem + 4.4vw, 5.6rem);

  /* Spacing */
  --sp-1: clamp(0.5rem, 0.4rem + 0.4vw, 0.75rem);
  --sp-2: clamp(0.85rem, 0.7rem + 0.6vw, 1.2rem);
  --sp-3: clamp(1.25rem, 1rem + 1vw, 1.9rem);
  --sp-4: clamp(2rem, 1.5rem + 2vw, 3.2rem);
  --sp-5: clamp(3rem, 2rem + 4vw, 5.5rem);
  --sp-6: clamp(4rem, 3rem + 5vw, 8rem);

  --maxw: 1180px;
  --page-pad: max(1.25rem, calc((100vw - var(--maxw)) / 2)); /* viewport edge → container content */
  --radius: 16px;
  --radius-lg: 24px;

  /* ---- MOTION TOKENS (the system this role asks for) ---- */
  --dur-fast: 160ms;
  --dur: 280ms;
  --dur-slow: 560ms;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-standard: cubic-bezier(.4, 0, .2, 1);
  --ease-in: cubic-bezier(.7, 0, .84, 0);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  --shadow-sm: 0 1px 2px rgba(22,21,19,.05), 0 4px 14px rgba(22,21,19,.05);
  --shadow-md: 0 10px 30px rgba(22,21,19,.08);
  --shadow-lg: 0 24px 60px rgba(22,21,19,.12);
}

/* ---------- Glodok Display (self-hosted — not on Google Fonts; drop the file in assets/fonts/) ---------- */
@font-face {
  font-family: "Glodok Display";
  src: url("../assets/fonts/glodok-display.woff2") format("woff2"),
       url("../assets/fonts/glodok-display.woff") format("woff"),
       url("../assets/fonts/glodok-display.otf") format("opentype"),
       url("../assets/fonts/glodok-display.ttf") format("truetype");
  font-weight: 400 800;
  font-display: swap;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle film-grain texture over the whole page (below nav/cursor, ignores clicks) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
strong { font-weight: 700; }

h1, h2, h3, .h1, .h2, .h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.04; letter-spacing: -0.02em; }

/* Emphasis: gradient-colored words (no rectangles/underlines) */
.hl, em { font-style: normal; font-weight: inherit; color: #d9620a; } /* solid fallback */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hl, em {
    background: var(--grad-emph);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
  }
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 200;
  background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 10px; font-weight: 700;
  transition: top var(--dur) var(--ease-out);
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 3px solid var(--amber-ink); outline-offset: 3px; border-radius: 6px; }
:focus:not(:focus-visible) { outline: none; }

/* ---------- Layout ---------- */
.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.section { padding-block: var(--sp-6); position: relative; }
.grid-2 { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: var(--sp-3); grid-template-columns: 1fr; }
@media (min-width: 760px) {
  .grid-2 { grid-template-columns: 0.85fr 1.15fr; align-items: start; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Type helpers ---------- */
.h1 { font-size: var(--fs-h1); }
.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); }
.lede { font-size: var(--fs-lg); color: #2c2a27; line-height: 1.5; font-weight: 500; }
.eyebrow {
  font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--amber-ink); margin-bottom: var(--sp-2);
  display: inline-flex; align-items: center; gap: .5em;
}
.fineprint { font-size: var(--fs-xs); color: var(--muted-2); margin-top: var(--sp-2); }
.center { text-align: center; }
.section__head { max-width: 54ch; margin-bottom: var(--sp-4); }
.section__head .lede { margin-top: var(--sp-2); color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: 0.8em 1.4em; border-radius: 100px;
  font-weight: 700; font-size: var(--fs-sm); min-height: 48px;
  transition: transform var(--dur) var(--ease-spring),
              box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
  will-change: transform;
}
.btn svg { transition: transform var(--dur) var(--ease-out); }
.btn--primary { background: var(--grad); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn--primary:hover { box-shadow: 0 12px 28px rgba(253,164,39,.32); }
.btn--primary:hover svg { transform: translateX(4px); }
.btn--ghost { border: 1.5px solid var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn:active { transform: scale(.96); }
.btn--lg { font-size: var(--fs-base); padding: 1em 1.8em; }

/* Subtle eased scale on hover for links & buttons (replaces the old magnetic wiggle) */
[data-magnetic] { transition: transform var(--dur) var(--ease-out); will-change: transform; }
[data-magnetic]:hover { transform: scale(1.04); }
[data-magnetic]:active { transform: scale(0.97); }

/* ---------- Scroll progress ---------- */
.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 120; pointer-events: none; }
.scroll-progress__bar { display: block; height: 100%; width: 0%; background: var(--grad); }

/* ---------- Custom cursor (light theme: dark ring, no blend) ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; position: fixed; top: 0; left: 0; z-index: 150; pointer-events: none; }
  .cursor__dot { position: absolute; top: 0; left: 0; border-radius: 50%; transform: translate(-50%, -50%); width: 8px; height: 8px; background: var(--orange); }
  body.cursor-hidden .cursor { opacity: 0; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-2) max(1.25rem, calc((100vw - var(--maxw)) / 2));
  transition: background-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out), padding var(--dur) var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(255,255,255,.82); backdrop-filter: blur(12px) saturate(140%);
  border-bottom-color: var(--line); box-shadow: var(--shadow-sm); padding-block: calc(var(--sp-2) * .68);
}
.nav__brand { display: inline-flex; align-items: center; font-family: "Glodok Display", var(--font-head); font-weight: 700; font-size: 1.3rem; letter-spacing: .01em; }
.nav__name { display: inline-block; white-space: nowrap; }
.nav__ltr { display: inline-block; animation: name-wave 3s ease-in-out infinite; animation-delay: calc(var(--i) * 0.06s); will-change: transform; }
.nav__sp { display: inline-block; width: .28em; }
@keyframes name-wave { 0% { transform: translateY(0); } 12% { transform: translateY(-32%); } 26% { transform: translateY(0); } 100% { transform: translateY(0); } }
.nav__links { display: flex; align-items: center; gap: clamp(.8rem, 2vw, 1.6rem); }
.nav__links a[data-link] { font-size: var(--fs-sm); font-weight: 500; color: var(--muted); position: relative; }
.nav__links a[data-link]::after { content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0; background: var(--grad); transition: width var(--dur) var(--ease-out); }
.nav__links a[data-link]:hover { color: var(--ink); }
.nav__links a[data-link]:hover::after { width: 100%; }
.nav__cta { background: var(--grad); color: var(--ink); font-weight: 700; font-size: var(--fs-sm); padding: .6em 1.1em; border-radius: 100px; min-height: 40px; display: inline-flex; align-items: center; transition: transform var(--dur) var(--ease-spring); }
@media (max-width: 640px) { .nav__links a[data-link] { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 92svh; display: flex; align-items: center; padding-top: clamp(6rem, 14vh, 9rem); padding-bottom: var(--sp-5); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); }
.orb--1 { width: 40vmax; height: 40vmax; top: -16vmax; right: -8vmax; background: radial-gradient(circle at 40% 40%, rgba(252,207,40,.38), transparent 64%); }
.orb--2 { width: 32vmax; height: 32vmax; bottom: -14vmax; left: -10vmax; background: radial-gradient(circle at 60% 40%, rgba(253,164,39,.26), transparent 64%); }
.hero__inner { position: relative; z-index: 1; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .55em; font-size: var(--fs-sm); font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em; color: var(--muted);
  padding: .5em 1em; border: 1px solid var(--line); border-radius: 100px; margin-bottom: var(--sp-3); background: #fff;
}
.hero__eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.hero__eyebrow .arrow { color: var(--amber-ink); }
.hero__title { font-size: var(--fs-h1); margin-bottom: var(--sp-3); }
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span { display: block; }
.flip-word { display: inline-block; backface-visibility: hidden; will-change: transform; }
.hero__lede { max-width: 56ch; color: #2c2a27; font-weight: 500; font-size: var(--fs-lg); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }
.hero__scroll { position: absolute; bottom: var(--sp-3); left: 50%; transform: translateX(-50%); display: inline-flex; flex-direction: column; align-items: center; gap: .6em; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .25em; color: var(--muted-2); z-index: 1; }
.hero__scroll-line { width: 1px; height: 40px; background: linear-gradient(var(--orange), transparent); animation: drop 2s var(--ease-standard) infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Intro / stats ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: var(--sp-3); }
.chip-row li { font-size: var(--fs-sm); font-weight: 500; padding: .5em 1em; border: 1px solid var(--line); border-radius: 100px; color: var(--muted); background: var(--surface); transition: border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), transform var(--dur) var(--ease-spring); }
.chip-row li:hover { border-color: var(--orange); color: var(--ink); transform: translateY(-2px); }
.intro__body p + p { margin-top: var(--sp-2); color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); margin-top: var(--sp-5); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat__num { display: block; font-family: var(--font-head); font-weight: 700; font-size: clamp(2rem, 1.2rem + 3vw, 3.2rem); line-height: 1; color: var(--ink); }
.stat__num::after { content: ""; display: block; width: 28px; height: 4px; border-radius: 4px; background: var(--grad); margin-top: .35em; }
.stat__label { display: block; margin-top: .6em; font-size: var(--fs-sm); color: var(--muted); }

/* ---------- Competencies / animated skill icons ---------- */
.skills__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); }
@media (min-width: 560px) { .skills__grid { grid-template-columns: repeat(4, 1fr); } }
.skill {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: .55rem;
  padding: var(--sp-3) var(--sp-2);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.skill:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.skill__icon { width: 64px; height: 64px; border-radius: 16px; display: grid; place-content: center; background: var(--grad-soft); border: 1px solid var(--line); transition: background var(--dur) var(--ease-out); }
.skill:hover .skill__icon { background: linear-gradient(120deg, rgba(252,207,40,.32), rgba(253,164,39,.32)); }
.skill__name { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-base); }
.skill__tag { font-size: var(--fs-xs); color: var(--muted); }
.skill--more .skill__icon { border-style: dashed; border-color: var(--line-strong); } /* "open / more" hint */
#comp-title { white-space: nowrap; font-size: clamp(1.3rem, 0.8rem + 2.5vw, 3rem); }

/* icon base — static, complete (so non-hover + reduced-motion show finished icons) */
.ic { width: 38px; height: 38px; overflow: visible; }
.ic * { transform-box: fill-box; transform-origin: center; }
.ic .stroke { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ic .accent { fill: var(--orange); }
.ic .accent2 { fill: var(--yellow); }
.ic .inkfill { fill: var(--ink); }
.ai-handle { stroke-width: 1.6; opacity: .5; }
.ai-path { stroke-dasharray: 130; }
.fg-frame { stroke-dasharray: 4 5; }
.fg-ripple { fill: none; stroke: var(--orange); stroke-width: 2.5; opacity: 0; }
.ae-ghost { opacity: 0; transform-origin: center bottom; }
.ae-ball { transform-origin: center bottom; }
.id-line { transform-origin: left center; }
.more-ring { stroke-dasharray: 5 6; }

/* ===== competency icons — complex, seamless loops (hover-activated) ===== */
.skill:hover .ai-path    { animation: ai-draw 2.6s ease-in-out infinite; }
.skill:hover .ai-handle  { animation: ai-handle 2.6s ease-in-out infinite; }
.skill:hover .ai-hdot    { animation: ai-orbit 2.6s ease-in-out infinite; }
.skill:hover .anchor     { animation: ai-anchor 2.6s var(--ease-spring) infinite; }

.skill:hover .ps-blob    { animation: ps-blob 2.4s ease-in-out infinite; }
.skill:hover .ps-spark   { animation: ps-spark 1.8s ease-in-out infinite; }

.skill:hover .id-line    { animation: id-type 2.8s ease-in-out infinite; }

.skill:hover .lr-knob1   { animation: lr-a 2.6s cubic-bezier(.5, 0, .2, 1) infinite; }
.skill:hover .lr-knob2   { animation: lr-b 2.6s cubic-bezier(.5, 0, .2, 1) infinite; }

.skill:hover .ae-ball    { animation: ae-arc 1.7s ease-in-out infinite; }
.skill:hover .ae-ghost   { opacity: .26; animation: ae-arc 1.7s ease-in-out infinite; }
.skill:hover .ae-kf      { animation: ae-kf 1.7s ease-in-out infinite; }

.skill:hover .fg-frame   { animation: ic-ants 2.4s linear infinite; }
.skill:hover .fg-cursor  { animation: fg-cursor 3s ease-in-out infinite; }
.skill:hover .fg-handle  { animation: fg-handle 2s ease-in-out infinite; }
.skill:hover .fg-ripple  { animation: fg-ripple 3s ease-out infinite; }

.skill:hover .cl-star    { animation: cl-star 3.2s ease-in-out infinite; }
.skill:hover .cl-dot     { animation: cl-dot 2.2s ease-in-out infinite; }

.skill:hover .more-ring  { animation: more-ring 3s linear infinite; }
.skill:hover .more-plus  { animation: more-plus 2.6s ease-in-out infinite; }
.skill:hover .more-spark { animation: cl-dot 2.2s ease-in-out infinite; }

/* ===== keyframes ===== */
@keyframes ai-draw   { 0% { stroke-dashoffset: 130; } 38% { stroke-dashoffset: 0; } 58% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -130; } }
@keyframes ai-handle { 0%, 100% { opacity: .3; transform: scaleX(.8) rotate(0); } 50% { opacity: .85; transform: scaleX(1.12) rotate(4deg); } }
@keyframes ai-orbit  { 0%, 100% { opacity: .5; transform: translate(0, 0) scale(1); } 25% { opacity: 1; transform: translate(2px, -2px) scale(1.35); } 50% { opacity: .6; transform: translate(0, -3px) scale(1); } 75% { opacity: 1; transform: translate(-2px, -1px) scale(1.25); } }
@keyframes ai-anchor { 0%, 100% { transform: scale(1) rotate(0); } 18% { transform: scale(1.5) rotate(-14deg); } 40% { transform: scale(.82) rotate(0); } 62% { transform: scale(1.28) rotate(12deg); } 82% { transform: scale(.95); } }

@keyframes ps-blob   { 0%, 100% { transform: translate(0, 0) scale(1); } 28% { transform: translate(2px, -2px) scale(1.18); } 52% { transform: translate(-2px, 1px) scaleX(1.18) scaleY(.86); } 78% { transform: translate(1px, 1px) scale(1.08); } }
@keyframes ps-spark  { 0%, 100% { opacity: .15; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(180deg); } }

@keyframes id-type   { 0% { transform: scaleX(.05); opacity: .35; } 24% { transform: scaleX(1); opacity: 1; } 54% { transform: scaleX(1); opacity: 1; } 76% { transform: scaleX(.05); opacity: .35; } 100% { transform: scaleX(.05); opacity: .35; } }

@keyframes lr-a      { 0%, 100% { transform: translateX(-9px) scale(1); } 14% { transform: translateX(-9px) scale(1.3); } 36% { transform: translateX(3px) scale(1); } 58% { transform: translateX(10px) scale(1.3); } 80% { transform: translateX(-3px) scale(1); } }
@keyframes lr-b      { 0%, 100% { transform: translateX(9px) scale(1); } 14% { transform: translateX(9px) scale(1.3); } 36% { transform: translateX(-3px) scale(1); } 58% { transform: translateX(-10px) scale(1.3); } 80% { transform: translateX(3px) scale(1); } }

@keyframes ae-arc    { 0% { transform: translate(0, -4px) scale(1); } 25% { transform: translate(-3px, 22px) scaleX(1.25) scaleY(.75); } 50% { transform: translate(0, -8px) scaleX(.92) scaleY(1.08); } 75% { transform: translate(3px, 22px) scaleX(1.25) scaleY(.75); } 100% { transform: translate(0, -4px) scale(1); } }
@keyframes ae-kf     { 0%, 100% { opacity: .3; transform: scale(.7) rotate(0); } 50% { opacity: 1; transform: scale(1.18) rotate(90deg); } }

@keyframes ic-ants   { to { stroke-dashoffset: -18; } }
@keyframes fg-cursor { 0% { transform: translate(-7px, -7px); } 24% { transform: translate(5px, 5px); } 40% { transform: translate(5px, 5px); } 56% { transform: translate(8px, -5px); } 72% { transform: translate(8px, -5px); } 100% { transform: translate(-7px, -7px); } }
@keyframes fg-ripple { 0%, 18% { opacity: 0; transform: scale(.3); } 26% { opacity: .9; transform: scale(.5); } 44% { opacity: 0; transform: scale(1.8); } 60% { opacity: 0; transform: scale(.3); } 68% { opacity: .9; transform: scale(.5); } 86% { opacity: 0; transform: scale(1.8); } 100% { opacity: 0; } }
@keyframes fg-handle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.45) rotate(90deg); } }

@keyframes cl-star   { 0% { transform: rotate(0) scale(.9); } 30% { transform: rotate(120deg) scale(1.12); } 60% { transform: rotate(240deg) scale(.96); } 100% { transform: rotate(360deg) scale(.9); } }
@keyframes cl-dot    { 0%, 100% { opacity: .2; transform: translate(0, 0) scale(.45); } 50% { opacity: 1; transform: translate(-2px, 2px) scale(1.15); } }

@keyframes more-ring { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.08); } 100% { transform: rotate(360deg) scale(1); } }
@keyframes more-plus { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.25); } 100% { transform: rotate(360deg) scale(1); } }

/* ---------- Featured: Certified EO Animations (video reel) ---------- */
.anims { background: var(--surface); border-block: 1px solid var(--line); }
.anims__grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
@media (min-width: 720px) { .anims__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .anims__grid { grid-template-columns: repeat(3, 1fr); } }
.vid { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
.vid:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.vid__frame { position: relative; aspect-ratio: 16 / 9; background: var(--grad); }
/* placeholder shown until a real mp4 loads on top */
.vid__frame::before {
  content: "▶  Add clip"; position: absolute; inset: 0; display: grid; place-content: center;
  font-weight: 700; font-size: var(--fs-sm); color: rgba(22,21,19,.7); letter-spacing: .02em;
}
.vid__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: transparent; }
.vid__cap { display: flex; flex-direction: column; gap: .15em; padding: var(--sp-2) var(--sp-3) var(--sp-3); }
.vid__title { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-h3); }
.vid__tag { font-size: var(--fs-sm); color: var(--muted); }

/* ---------- Motion reel (sticky header + scrolling rows) ---------- */
.reel { position: relative; }
.reel__inner { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
.reel__head { margin-bottom: var(--sp-3); }
.reel__intro { color: var(--muted); margin-top: var(--sp-2); }

.reel__track { display: flex; flex-direction: column; gap: clamp(2.5rem, 8vh, 6rem); }
.reel__row { display: grid; gap: var(--sp-3); grid-template-columns: 1fr; align-items: center; will-change: opacity, transform; }
.reel__text { display: grid; grid-template-columns: 1fr; gap: var(--sp-2); }
.reel__title { font-size: clamp(1.4rem, 1.1rem + 1.1vw, 2rem); }
.reel__tag { margin-top: .45em; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--amber-ink); }
.reel__desc { color: var(--muted); margin-top: .7em; max-width: 46ch; }
.reel__stats { display: flex; flex-direction: column; gap: var(--sp-2); }
.reel__stat dt { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); }
.reel__stat dd { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: var(--fs-base); color: var(--ink); }
.reel__stat + .reel__stat { padding-top: var(--sp-2); border-top: 1px solid var(--line); }
@media (min-width: 560px) {
  .reel__text { grid-template-columns: 1fr auto; column-gap: var(--sp-5); align-items: start; }
  .reel__stats { min-width: 8.5rem; }
}
.reel__media { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); box-shadow: var(--shadow-sm); transition: box-shadow var(--dur) var(--ease-out); }
.reel__row.is-active .reel__media { box-shadow: var(--shadow-lg); }
.vid__frame--square { aspect-ratio: 1 / 1; } /* square clips (e.g. The ABCs of EO) fill the column — no side gutters */

@media (min-width: 900px) {
  .reel__inner { grid-template-columns: 0.7fr 1.3fr; gap: var(--sp-5); align-items: start; }
  .reel__head { position: sticky; top: 92px; align-self: start; margin-bottom: 0; }
}

/* ---------- Work grid ---------- */
.work { counter-reset: workcat; }
.workcat { counter-increment: workcat; }
.workcat + .workcat { margin-top: 0; }
.workcat__title {
  display: flex; align-items: center; gap: clamp(.7rem, 1.8vw, 1.2rem);
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem);
  letter-spacing: -.02em; line-height: 1.05;
  margin: 0; padding: var(--sp-5) 0 var(--sp-3);
}
.workcat__title::before {
  content: counter(workcat, decimal-leading-zero);
  flex: none; font-size: clamp(1.05rem, 1.5vw, 1.45rem); font-weight: 700; letter-spacing: 0;
  color: transparent; background: var(--grad-emph);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.workcat__title::after {
  content: ""; flex: 1 1 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

/* Each project as its own full-bleed horizontal section */
.prows { display: block; }
.prow + .prow { margin-top: 0; }   /* projects sit flush — no white gap between them */
.prow { width: 100vw; margin-left: calc(50% - 50vw); display: grid; grid-template-columns: 1fr; align-items: center; } /* break out to the page edges */
.prow__media { position: relative; overflow: hidden; height: clamp(300px, 44vh, 520px); display: grid; place-content: center; background: linear-gradient(135deg, var(--a), var(--b)); }
/* project cover/shots fill the media exactly (no scroll-driven offset) */
.prow__media .card__mono { position: relative; font-size: clamp(2.6rem, 9vw, 5rem); font-weight: 700; letter-spacing: -.03em; color: rgba(22,21,19,.82); }
/* two GIFs side-by-side (e.g. Money Goals) */
.prow__media--duo { grid-template-columns: 1fr 1fr; gap: 0; place-content: stretch; }
.prow__gif { width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.prow__media--duo .card__mono { position: absolute; inset: 0; display: grid; place-content: center; }
/* Image set (multiple files per project): click the arrow to cross-fade through, click the image to enlarge */
.prow__media[data-shots] { cursor: zoom-in; }
.shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; z-index: 1; transition: opacity .55s var(--ease-out); }
.prow__media--fit .shot, .prow__media--fit-rest .shot { object-fit: contain; }   /* show images uncropped */
.prow__media--fit-rest .shot:first-of-type { object-fit: cover; }                 /* …but keep the thumbnail/cover cropped */
.prow__media--fit:has(.shot.is-ready), .prow__media--fit-rest:has(.shot.is-ready) { background: var(--surface); } /* clean mat behind uncropped images */
.prow__shotbar { position: absolute; left: 0; right: 0; bottom: 12px; z-index: 2; display: flex; gap: 4px; justify-content: center; padding: 0 16px; pointer-events: none; }
.prow__shotbar span { height: 3px; flex: 1 1 0; max-width: 44px; border-radius: 3px; background: rgba(255,255,255,.55); box-shadow: 0 1px 3px rgba(22,21,19,.25); transition: background var(--dur) var(--ease-out); }
.prow__shotbar span.is-on { background: var(--grad); }
.prow__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 46px; height: 46px; border-radius: 50%; display: grid; place-content: center; color: var(--ink); background: rgba(255,255,255,.92); box-shadow: var(--shadow-md); cursor: pointer; transition: transform var(--dur) var(--ease-spring), background var(--dur) var(--ease-out); }
.prow__nav--prev { left: 16px; }
.prow__nav--next { right: 16px; }
.prow__nav svg { width: 20px; height: 20px; }
.prow__nav:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.prow__nav:active { transform: translateY(-50%) scale(.95); }
.prow__nav[hidden] { display: none; }
/* YouTube video project (click-to-play facade) */
.prow__media--video { height: auto; aspect-ratio: 16 / 9; background: #000; }
.ytlite { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; display: block; }
.ytlite__thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.ytlite__play { position: absolute; inset: 0; display: grid; place-content: center; }
.ytlite__play svg { width: clamp(58px, 8vw, 74px); height: auto; filter: drop-shadow(0 3px 10px rgba(0,0,0,.45)); transition: transform var(--dur) var(--ease-spring); }
.ytlite__play svg path:first-child { fill: rgba(20,20,20,.82); transition: fill var(--dur) var(--ease-out); }
.ytlite:hover .ytlite__play svg { transform: scale(1.12); }
.ytlite:hover .ytlite__play svg path:first-child { fill: #f00; }
.prow__media--video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prow__title { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-h3); }
.prow__tag { margin-top: .5em; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--amber-ink); }
.prow__desc { margin-top: .6em; color: var(--muted); max-width: 42ch; scrollbar-width: thin; overscroll-behavior: contain; }
.prow__hint { display: inline-block; margin-top: var(--sp-2); font-weight: 700; color: var(--ink); }
.prow__tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: var(--sp-3); }
.prow__tab { font-size: var(--fs-xs); font-weight: 700; padding: .55em 1.05em; border: 1px solid var(--line-strong); border-radius: 100px; color: var(--ink); background: transparent; cursor: pointer; transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-spring); }
.prow__tab:hover { border-color: var(--ink); transform: translateY(-1px); }
.prow__tab[aria-pressed="true"] { background: var(--grad); border-color: transparent; color: var(--ink); }
.prow__title.swap, .prow__desc.swap { animation: proj-swap .7s var(--ease-out); }
@keyframes proj-swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.prow__desc p + p { margin-top: .7em; }
.prow__desc strong { color: var(--ink); font-weight: 700; }
[data-gallery-open].prow { cursor: pointer; }
[data-gallery-open].prow:hover .prow__hint { color: var(--amber-ink); }
/* text aligns to the container while the image bleeds to the edge */
.prow__text { padding-inline: var(--page-pad); }
@media (min-width: 720px) {
  .prow { grid-template-columns: 1fr 1fr; }
  .prow__media { height: clamp(320px, 48vh, 560px); }
  .prow__text { padding-left: var(--sp-5); padding-right: var(--page-pad); }
  .prow:nth-of-type(even) .prow__media { order: 2; }
  .prow:nth-of-type(even) .prow__text { padding-left: var(--page-pad); padding-right: var(--sp-5); }
}
.work__grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
@media (min-width: 620px) { .work__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .work__grid { grid-template-columns: repeat(3, 1fr); } }
.card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); will-change: transform; }
.card:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: var(--shadow-lg); }
.card__thumb { position: relative; aspect-ratio: 4 / 3; display: grid; place-content: center; background: linear-gradient(135deg, var(--a), var(--b)); }
.card__thumb::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 72% 18%, rgba(255,255,255,.35), transparent 55%); }
.card__mono { position: relative; font-size: clamp(2.2rem, 7vw, 3.6rem); font-weight: 700; color: rgba(22,21,19,.82); letter-spacing: -.03em; }
.card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.card__play { position: absolute; bottom: 12px; left: 12px; z-index: 2; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--ink); background: rgba(255,255,255,.9); padding: .35em .7em; border-radius: 100px; transform: translateY(6px); opacity: 0; transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.card:hover .card__play { opacity: 1; transform: translateY(0); }
.card__meta { padding: var(--sp-2) var(--sp-3) var(--sp-3); }
.card__title { font-size: var(--fs-h3); }
.card__tags { font-size: var(--fs-sm); color: var(--muted); margin-top: .3em; }

/* ---------- Gallery lightbox (e.g. Dogmoji) ---------- */
[data-gallery-open] { cursor: pointer; }
.lightbox[hidden] { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: var(--sp-3); }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(10,10,10,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox__panel { position: relative; z-index: 1; width: min(100%, 1100px); max-height: 88vh; overflow: auto; background: var(--bg); border-radius: var(--radius-lg); padding: var(--sp-4); box-shadow: var(--shadow-lg); }
.lightbox__title { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-h3); margin-bottom: var(--sp-3); }
.lightbox__close { position: absolute; top: 12px; right: 14px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; font-size: 1.6rem; line-height: 1; color: var(--ink); background: var(--surface); border: 1px solid var(--line); transition: transform var(--dur) var(--ease-spring), background var(--dur) var(--ease-out); }
.lightbox__close:hover { transform: rotate(90deg) scale(1.05); background: var(--surface-2); }
.gallery { overflow: hidden; border-radius: var(--radius); }
.gallery__track { display: flex; width: max-content; animation: gallery-scroll 45s linear infinite; }
.gallery:hover .gallery__track { animation-play-state: paused; }
.gallery__item { flex: none; margin-right: var(--sp-3); }
.gallery__img { display: block; height: clamp(180px, 42vh, 360px); width: auto; border-radius: var(--radius); object-fit: cover; background: var(--surface-2); animation: gallery-float 3.4s ease-in-out infinite; }
.gallery__item:nth-child(2n) .gallery__img { animation-delay: -1.1s; }
.gallery__item:nth-child(3n) .gallery__img { animation-delay: -2.3s; }
.gallery__item:nth-child(4n) .gallery__img { animation-duration: 4.2s; }
@keyframes gallery-scroll { to { transform: translateX(-50%); } }
@keyframes gallery-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-9px) rotate(-1.6deg); } }
body.lightbox-open { overflow: hidden; }

/* Expanded image viewer (click a project image) */
.imgbox[hidden] { display: none; }
.imgbox { position: fixed; inset: 0; z-index: 210; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(.4rem, 2vw, 1.4rem); padding: clamp(1rem, 4vw, 3rem); background: rgba(14,13,12,.92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: imgbox-in .25s var(--ease-out); }
.imgbox__backdrop { position: absolute; inset: 0; z-index: 0; background: none; border: 0; cursor: zoom-out; }
.imgbox__stage { position: relative; z-index: 1; display: grid; justify-items: center; align-content: center; min-width: 0; }
.imgbox__img { max-width: 100%; max-height: 84vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: imgbox-pop .35s var(--ease-out); }
.imgbox__count { margin-top: .9rem; color: rgba(255,255,255,.82); font-weight: 700; font-size: var(--fs-sm); letter-spacing: .05em; }
.imgbox__nav, .imgbox__close { position: relative; z-index: 2; display: grid; place-content: center; width: 50px; height: 50px; border-radius: 50%; color: #fff; background: rgba(255,255,255,.14); cursor: pointer; transition: background var(--dur) var(--ease-out), transform var(--dur) var(--ease-spring); }
.imgbox__nav svg, .imgbox__close svg { width: 22px; height: 22px; }
.imgbox__nav:hover, .imgbox__close:hover { background: rgba(255,255,255,.3); transform: scale(1.08); }
.imgbox__nav[hidden] { display: none; }
.imgbox__close { position: absolute; top: clamp(.8rem, 3vw, 1.8rem); right: clamp(.8rem, 3vw, 1.8rem); z-index: 3; }
@keyframes imgbox-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes imgbox-pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .gallery { overflow-x: auto; }
  .gallery__track { animation: none; }
  .gallery__item[aria-hidden="true"] { display: none; }
}

/* ---------- Approach / easings ---------- */
.easings { display: grid; grid-template-columns: 1fr; gap: var(--sp-2); margin-bottom: var(--sp-5); }
@media (min-width: 680px) { .easings { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .easings { grid-template-columns: repeat(4, 1fr); } }
.easing { text-align: left; padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: grid; gap: .9em; transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
.easing:hover { border-color: var(--orange); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.easing__name { font-weight: 700; font-size: var(--fs-sm); }
.easing__track { position: relative; height: 10px; border-radius: 6px; background: rgba(22,21,19,.08); }
.easing__ball { position: absolute; top: 50%; left: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--grad); transform: translate(0, -50%); }
.easing.is-playing .easing__ball { animation: roll 1.1s var(--ease, linear) forwards; }
@keyframes roll { to { left: calc(100% - 20px); } }
.easing code { font-family: ui-monospace, monospace; font-size: var(--fs-xs); color: var(--muted); }

.caps .cap { padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); box-shadow: var(--shadow-sm); transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.caps .cap:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.caps .cap h3 { color: var(--ink); margin-bottom: .4em; font-size: var(--fs-lg); }
.caps .cap h3::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--grad); margin-right: .5em; vertical-align: middle; }
.caps .cap p { color: var(--muted); font-size: var(--fs-sm); }

/* ---------- About ---------- */
.about__body p + p { margin-top: var(--sp-2); color: var(--muted); }

/* ---------- Contact ---------- */
.contact { text-align: center; background: radial-gradient(80% 120% at 50% 0%, rgba(252,207,40,.12), transparent 60%), var(--bg); }
.contact__inner { max-width: 60ch; margin-inline: auto; display: grid; justify-items: center; gap: var(--sp-2); }
.contact__title { font-size: var(--fs-h1); line-height: 1.02; }
.contact .btn { margin-top: var(--sp-2); }
.contact__links { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; margin-top: var(--sp-3); }
.contact__links a { font-weight: 700; color: var(--muted); transition: color var(--dur) var(--ease-out); }
.contact__links a:hover { color: var(--amber-ink); }
.contact__socials { display: flex; gap: var(--sp-2); justify-content: center; margin-top: var(--sp-3); padding: 0; }
.social { width: 56px; height: 56px; border-radius: 50%; display: grid; place-content: center; border: 1.5px solid var(--line-strong); color: var(--ink); transition: transform var(--dur) var(--ease-spring), background var(--dur) var(--ease-out), color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out); }
.social svg { width: 24px; height: 24px; display: block; }
.social:hover { transform: translateY(-5px) scale(1.08); background: var(--grad); border-color: transparent; color: var(--ink); }
.social:hover svg { animation: social-bounce .8s ease-in-out infinite; }
@keyframes social-bounce { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-7deg); } }

/* ---------- Footer ---------- */
.footer { padding-block: var(--sp-3); }
.footer__inner { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); justify-content: space-between; font-size: var(--fs-sm); color: var(--muted-2); }

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