/* ============================================================
   Michael Owen — portfolio
   dark, type-driven, ML-flavored
   ============================================================ */

:root {
  --bg: #060609;
  --bg-soft: #0c0c12;
  --ink: #f0f0f4;
  --ink-dim: #8a8a98;
  --ink-faint: #4a4a58;
  --accent: #3b82f6;
  --accent-soft: #93c5fd;
  --accent-2: #38bdf8;
  --line: rgba(240, 240, 244, 0.08);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ============ Preloader ============ */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.preloader__inner { text-align: center; }

.preloader__word {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 14vw, 9rem);
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.pl-letter {
  display: inline-block;
  color: var(--ink);
  line-height: 1;
  will-change: transform, opacity, width;
}
.pl-letter--mid { overflow: hidden; }
.pl-letter--key {
  background: linear-gradient(165deg, var(--accent-soft), var(--accent) 50%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.3));
}
.preloader__tag {
  font-family: var(--font-mono);
  font-size: clamp(0.66rem, 1.7vw, 0.82rem);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: var(--accent-soft);
  margin-top: 1.8rem;
}

.preloader__foot {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem;
  margin-top: 2.2rem;
}
.preloader__bar {
  width: min(220px, 50vw); height: 1px;
  background: var(--line);
  overflow: hidden;
}
.preloader__bar-fill {
  width: 100%; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
}
.preloader__counter {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--ink-dim);
  line-height: 1;
  min-width: 2.2ch;
  text-align: left;
}

/* ============ Cursor ============ */
.cursor-dot {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 999;
  border-radius: 50%;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  background: var(--accent);
  will-change: transform;
}
@media (hover: none), (max-width: 768px) {
  .cursor-dot { display: none; }
}

/* ============ Grain ============ */
.grain {
  position: fixed; inset: -50%; z-index: 998;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}

/* ============ Scroll progress ============ */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; z-index: 997;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
}

/* ============ Nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem clamp(1.2rem, 4vw, 3.5rem);
  background: linear-gradient(to bottom, rgba(6, 6, 9, 0.65), rgba(6, 6, 9, 0));
}
.nav__logo {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 0.5rem;
}
.nav__logo-mark {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  border: 1.5px solid rgba(240, 240, 244, 0.45);
  border-radius: 9px;
  padding: 0.3rem 0.6rem;
  line-height: 1;
}
.nav__links { display: flex; gap: clamp(1rem, 2.5vw, 2.2rem); }
.nav__links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-dim);
  transition: color 0.25s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__num { color: var(--accent-soft); font-size: 0.65rem; vertical-align: super; }
.nav__contact {
  display: flex; align-items: center; gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.nav__contact a { color: var(--ink-dim); transition: color 0.25s ease; }
.nav__contact a:hover { color: var(--ink); }
.nav__contact-sep { color: var(--ink-faint); }
@media (max-width: 900px) { .nav__links { display: none; } }
@media (max-width: 560px) {
  .nav__contact-phone, .nav__contact-sep { display: none; }
}

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: 0 clamp(1.2rem, 5vw, 4rem);
  overflow: hidden;
}
#ml-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}

.hero__content { position: relative; z-index: 2; width: 100%; }

.hero__tag {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.5rem 1.1rem;
  margin-bottom: 2.2rem;
  backdrop-filter: blur(6px);
  background: rgba(6, 6, 9, 0.35);
}
.hero__tag-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero__title {
  font-size: clamp(3.6rem, 13.5vw, 12rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.hero__line { display: block; overflow: hidden; }
.hero__line-inner { display: inline-block; will-change: transform; }
.hero__line--accent .hero__line-inner {
  background: linear-gradient(100deg, var(--accent-soft) 0%, var(--accent) 45%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero__sub {
  margin-top: 2.4rem;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 300;
  color: var(--ink-dim);
  max-width: 40ch;
}
.hero__sub em {
  font-style: normal;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
}

.hero__meta {
  display: flex; flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 4rem);
  margin-top: 3.2rem;
}
.hero__meta-item {
  display: flex; flex-direction: column; gap: 0.3rem;
  font-size: 0.92rem;
}
.hero__meta-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
}

.hero__scroll-hint {
  position: absolute;
  bottom: 2.2rem; left: 50%; transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.hero__scroll-line {
  width: 1px; height: 56px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-drip 2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scroll-drip {
  0% { transform: scaleY(0); }
  45% { transform: scaleY(1); }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ============ Marquee ============ */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.3rem 0;
  overflow: hidden;
  white-space: nowrap;
  background: var(--bg-soft);
}
.marquee__track {
  display: inline-flex; align-items: center;
  gap: 2.5rem;
  will-change: transform;
}
.marquee__track span {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  font-weight: 300;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.marquee__track i { color: var(--accent); font-style: normal; font-size: 0.65rem; }

/* ============ Sections (shared) ============ */
.section {
  padding: clamp(6rem, 12vw, 10rem) clamp(1.2rem, 5vw, 4rem);
  position: relative;
}
.section__head {
  display: flex; align-items: baseline; gap: 1rem;
  font-family: var(--font-mono);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
}
.section__num { color: var(--accent-soft); font-size: 0.8rem; }
.section__name {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--ink-dim);
}

/* split-text targets */
[data-split] .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
[data-split] .w > span {
  display: inline-block;
  transform: translateY(110%);
  will-change: transform;
}

/* ============ About ============ */
.about__statement {
  font-size: clamp(1.6rem, 4.2vw, 3.4rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  max-width: 22ch;
  text-wrap: balance;
}
.about__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: clamp(3.5rem, 7vw, 6rem);
}
.about__card {
  background: var(--bg);
  padding: 2.2rem 1.8rem;
  transition: background 0.4s ease;
}
.about__card:hover { background: var(--bg-soft); }
.about__card-num {
  display: block;
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--ink), var(--accent-soft));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 0.8rem;
}
.about__card p { color: var(--ink-dim); font-size: 0.95rem; max-width: 26ch; }

/* ============ Skills ============ */
.skills__title, .work__title, .exp__title {
  font-size: clamp(2.2rem, 6vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.skills__rows { display: flex; flex-direction: column; }
.skills__row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2fr;
  gap: 2rem;
  padding: 2.6rem 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.skills__row:last-child { border-bottom: 1px solid var(--line); }
.skills__row-label h3 {
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.skills__row-index {
  font-family: var(--font-mono);
  color: var(--accent-soft);
  font-size: 0.8rem;
  display: block;
  margin-bottom: 0.5rem;
}
.skills__row-label p {
  color: var(--ink-faint);
  font-size: 0.9rem;
  margin-top: 0.4rem;
}
.skills__tags {
  display: flex; flex-wrap: wrap; gap: 0.7rem;
  align-content: start;
}
.skills__tags li {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.55rem 1.2rem;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease, transform 0.3s ease;
  cursor: default;
}
.skills__tags li:hover {
  border-color: var(--accent);
  color: var(--ink);
  background: rgba(59, 130, 246, 0.08);
  transform: translateY(-3px);
}
@media (max-width: 760px) {
  .skills__row { grid-template-columns: 1fr; gap: 1.2rem; }
}

/* ============ Work / Project cards ============ */
.work__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.2rem, 2.5vw, 2rem);
}
@media (max-width: 880px) {
  .work__grid { grid-template-columns: 1fr; }
}

.pcard {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.4rem 1.4rem 1.8rem;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.pcard:hover {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 24px 60px -28px rgba(59, 130, 246, 0.35);
}
.pcard__head {
  display: flex; align-items: baseline; gap: 0.9rem;
  margin-top: 1.4rem;
}
.pcard__index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
}
.pcard__name {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
  flex: 1;
}
.pcard:not(.pcard--static):hover .pcard__name { color: var(--accent-soft); }
.pcard__arrow {
  font-size: 1.4rem;
  color: var(--accent-soft);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.pcard:hover .pcard__arrow { transform: translate(5px, -5px); }
.pcard__arrow--muted { color: var(--ink-faint); font-size: 0.6rem; }
.pcard:hover .pcard__arrow--muted { transform: none; }
.pcard__desc {
  color: var(--ink-dim);
  font-size: 0.95rem;
  font-weight: 300;
  margin-top: 0.8rem;
}

/* skills used — highlighted */
.pcard__skills-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
  margin-top: auto;
  padding-top: 1.4rem;
}
.pcard__skills {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 0.7rem;
}
.pcard__skills li {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--accent-soft);
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 99px;
  padding: 0.35rem 0.85rem;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease,
    box-shadow 0.3s ease, transform 0.3s ease;
  cursor: default;
}
.pcard__skills li:hover {
  background: rgba(59, 130, 246, 0.22);
  border-color: var(--accent-soft);
  color: var(--ink);
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.35);
  transform: translateY(-2px);
}

/* ---- card visual stage ---- */
.pcard__viz {
  position: relative;
  height: clamp(170px, 22vw, 220px);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 90% at 50% 110%, rgba(59, 130, 246, 0.12), transparent 60%),
    rgba(6, 6, 9, 0.7);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.4s ease;
}
.pcard:hover .pcard__viz { border-color: rgba(59, 130, 246, 0.4); }
.pcard__viz svg { width: 100%; height: 100%; }

.viz-chip {
  position: absolute;
  top: 0.8rem; left: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(6, 6, 9, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 99px;
  padding: 0.3rem 0.7rem;
  backdrop-filter: blur(4px);
}

.viz-grid line { stroke: rgba(240, 240, 244, 0.05); stroke-width: 1; }

/* — ML playground: gradient descent — */
.viz-bowl {
  stroke: rgba(59, 130, 246, 0.5);
  stroke-width: 1.6;
  stroke-dasharray: 460;
  stroke-dashoffset: 460;
  animation: viz-draw 2s ease forwards 0.3s;
}
.viz-ball {
  fill: var(--accent-2);
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.9));
}
.viz-scatter circle {
  fill: var(--accent-soft);
  opacity: 0.85;
  animation: viz-blink 3s ease-in-out infinite;
}
.viz-scatter circle:nth-child(2n) { animation-delay: 0.6s; }
.viz-scatter circle:nth-child(3n) { animation-delay: 1.2s; }
.viz-fit {
  stroke: var(--accent-2);
  stroke-width: 1.4;
  stroke-dasharray: 6 5;
  opacity: 0.8;
  animation: viz-dash-march 1.2s linear infinite;
}
@keyframes viz-draw { to { stroke-dashoffset: 0; } }
@keyframes viz-blink { 0%, 100% { opacity: 0.85; } 50% { opacity: 0.3; } }
@keyframes viz-dash-march { to { stroke-dashoffset: -22; } }

/* — Music player — */
.pcard__viz--music { flex-direction: column; gap: 1.1rem; padding: 1rem 1.6rem; }
.viz-player {
  display: flex; align-items: center; gap: 1rem;
  width: 100%;
}
.viz-play {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.viz-play::after {
  content: "";
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(59, 130, 246, 0.6);
  animation: viz-ring 2s ease-out infinite;
}
.viz-play span {
  width: 0; height: 0;
  border-left: 11px solid #06060a;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  margin-left: 3px;
}
@keyframes viz-ring {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.7); opacity: 0; }
}
.viz-track { flex: 1; }
.viz-track-bar {
  height: 4px; border-radius: 99px;
  background: rgba(240, 240, 244, 0.12);
  overflow: hidden;
}
.viz-track-fill {
  height: 100%; width: 45%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: viz-progress 6s linear infinite;
}
@keyframes viz-progress {
  0% { width: 8%; }
  100% { width: 96%; }
}
.viz-track-time {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--ink-faint);
  margin-top: 0.45rem;
}
.viz-eq {
  display: flex; gap: 5px; align-items: flex-end;
  height: 56px; width: 100%;
  justify-content: center;
}
.viz-eq span {
  flex: 1; max-width: 10px;
  background: linear-gradient(to top, var(--accent), var(--accent-2));
  border-radius: 3px;
  height: 20%;
  animation: viz-eq-bounce 1s ease-in-out infinite alternate;
}
.viz-eq span:nth-child(2n) { animation-delay: 0.15s; animation-duration: 0.85s; }
.viz-eq span:nth-child(3n) { animation-delay: 0.3s; animation-duration: 1.15s; }
.viz-eq span:nth-child(4n) { animation-delay: 0.07s; animation-duration: 0.7s; }
.viz-eq span:nth-child(5n) { animation-delay: 0.45s; }
@keyframes viz-eq-bounce {
  from { height: 12%; }
  to { height: 92%; }
}

/* — Gesture recognition — */
.viz-frame path {
  fill: none;
  stroke: rgba(56, 189, 248, 0.5);
  stroke-width: 1.6;
  animation: viz-blink 2.4s ease-in-out infinite;
}
.viz-scan {
  stroke: rgba(56, 189, 248, 0.55);
  stroke-width: 1;
  animation: viz-scan-sweep 3.4s ease-in-out infinite;
}
@keyframes viz-scan-sweep {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(108px); opacity: 0.25; }
}
.viz-hand line { stroke: rgba(59, 130, 246, 0.75); stroke-width: 1.6; }
.viz-joint {
  fill: var(--accent-2);
  filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.7));
  animation: viz-blink 2s ease-in-out infinite;
}
.viz-joint--palm { fill: var(--accent-soft); }
.viz-finger {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: viz-wave 2.6s ease-in-out infinite;
}
.viz-finger--1 { animation-delay: 0s; }
.viz-finger--2 { animation-delay: 0.18s; }
.viz-finger--3 { animation-delay: 0.36s; }
.viz-finger--4 { animation-delay: 0.54s; }
.viz-finger--5 { animation-delay: 0.72s; }
@keyframes viz-wave {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(7deg); }
}

/* — Kaggle accuracy — */
.viz-acc {
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: viz-acc-climb 4s ease-in-out infinite;
}
.viz-acc-dot {
  fill: var(--accent-2);
  filter: drop-shadow(0 0 7px rgba(56, 189, 248, 0.9));
  animation: viz-acc-pop 4s ease-in-out infinite;
}
@keyframes viz-acc-climb {
  0% { stroke-dashoffset: 340; }
  45%, 85% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes viz-acc-pop {
  0%, 35% { opacity: 0; transform: scale(0); transform-box: fill-box; transform-origin: center; }
  50%, 85% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; }
}
.viz-syms text {
  font-family: var(--font-display);
  font-size: 20px;
  fill: rgba(147, 197, 253, 0.45);
  animation: viz-float 4s ease-in-out infinite;
}
.viz-syms text:nth-child(2) { animation-delay: 0.8s; }
.viz-syms text:nth-child(3) { animation-delay: 1.6s; }
.viz-syms text:nth-child(4) { animation-delay: 2.4s; }
@keyframes viz-float {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50% { transform: translateY(-7px); opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
  .pcard__viz *, .viz-eq span, .viz-track-fill, .viz-play::after {
    animation: none !important;
  }
  .viz-bowl, .viz-acc { stroke-dashoffset: 0; }
}

.work__gh {
  display: inline-block;
  margin-top: 3rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 1rem 2rem;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.work__gh:hover { color: var(--ink); border-color: var(--accent); background: rgba(59, 130, 246, 0.08); }

/* ============ Experience ============ */
.exp__list { display: flex; flex-direction: column; }
.exp__item {
  display: grid;
  grid-template-columns: minmax(140px, 240px) 1fr;
  gap: 2rem;
  padding: 2.4rem 0;
  border-top: 1px solid var(--line);
}
.exp__item:last-child { border-bottom: 1px solid var(--line); }
.exp__when {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-soft);
  padding-top: 0.4rem;
}
.exp__what h3 {
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}
.exp__what p {
  color: var(--ink-dim);
  font-weight: 300;
  font-size: 0.98rem;
  max-width: 64ch;
}
@media (max-width: 640px) {
  .exp__item { grid-template-columns: 1fr; gap: 0.6rem; }
}

/* ============ Contact ============ */
.contact { padding-bottom: 2rem; }
.contact__title {
  font-size: clamp(2.6rem, 8.5vw, 7.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.contact__line { display: block; }
.contact__line--accent {
  background: linear-gradient(100deg, var(--accent-soft), var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
/* gradient must paint the inner split spans too */
.contact__line--accent .w > span {
  background: linear-gradient(100deg, var(--accent-soft), var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.contact__email {
  display: inline-block;
  margin-top: 3.5rem;
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 3vw, 1.9rem);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.4rem;
  transition: color 0.3s ease;
}
.contact__email:hover { color: var(--accent-soft); }

.contact__links {
  display: flex; flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 3rem;
}
.contact__links a {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink-dim);
  transition: color 0.3s ease;
}
.contact__links a:hover { color: var(--ink); }

.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(4rem, 8vw, 7rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* reveal default state (gsap animates in) */
[data-reveal] { opacity: 0; transform: translateY(40px); }
.no-js [data-reveal], .gsap-fallback [data-reveal] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  [data-reveal] { opacity: 1; transform: none; }
  [data-split] .w > span { transform: none; }
}
