:root {
  --ink: #202124;
  --paper: #fff8e8;
  --cream: #ffe9b7;
  --lime: #b8f052;
  --coral: #ff6b57;
  --aqua: #5bd8d1;
  --berry: #8d5cf6;
  --night: #182538;
  --line: rgba(32, 33, 36, 0.14);
  --shadow: 0 22px 70px rgba(27, 28, 33, 0.16);
  --radius: 8px;
  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --body: "Nunito", Verdana, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  background:
    radial-gradient(circle at 15% 8%, rgba(91, 216, 209, 0.28), transparent 26rem),
    radial-gradient(circle at 82% 6%, rgba(255, 107, 87, 0.24), transparent 24rem),
    linear-gradient(135deg, rgba(32, 33, 36, 0.045) 25%, transparent 25%) 0 0 / 22px 22px,
    var(--paper);
  min-height: 100vh;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(32, 33, 36, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 33, 36, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

#sparkCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.site-header,
main {
  position: relative;
  z-index: 1;
}

.site-header {
  width: min(1160px, calc(100% - 32px));
  margin: 18px auto 0;
  min-height: 66px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 10px 10px 10px 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(255, 248, 232, 0.86);
  box-shadow: 6px 6px 0 var(--ink);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: var(--lime);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 0.88rem;
}

.main-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.38);
}

.main-nav a {
  padding: 10px 14px;
  border-radius: 7px;
  font-weight: 800;
  font-size: 0.93rem;
}

.main-nav a:hover {
  background: var(--cream);
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.nav-cta {
  padding: 0 18px;
  background: var(--coral);
}

.button {
  padding: 0 20px;
}

.button:hover,
.nav-cta:hover,
.tap-button:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.primary {
  background: var(--lime);
}

.ghost {
  background: #ffffff;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--cream);
  box-shadow: 3px 3px 0 var(--ink);
}

.menu-toggle span {
  display: block;
  width: 19px;
  height: 3px;
  margin: 5px auto;
  background: var(--ink);
  border-radius: 999px;
}

.section-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: clamp(34px, 5vw, 64px);
  align-items: center;
  padding: clamp(64px, 8vw, 108px) 0 48px;
  min-height: calc(100vh - 86px);
}

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0;
  color: #394050;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--display);
  letter-spacing: 0;
  line-height: 0.96;
}

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 6vw, 5.35rem);
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.4rem, 4.6vw, 4.65rem);
}

h3 {
  margin-bottom: 10px;
  font-size: 1.52rem;
}

.hero-lede,
.skill-panel p,
.contact p {
  max-width: 640px;
  color: #4d5360;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 30px 0 30px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 590px;
  margin: 0;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 6px 6px 0 rgba(32, 33, 36, 0.82);
  overflow: hidden;
}

.stats-grid div {
  padding: 18px;
}

.stats-grid div + div {
  border-left: 2px solid var(--ink);
}

.stats-grid dt {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1;
}

.stats-grid dd {
  margin: 4px 0 0;
  color: #5d6370;
  font-weight: 800;
}

.hero-stage {
  position: relative;
  min-height: 620px;
  display: grid;
  place-items: center;
}

.phone-frame {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 9 / 16;
  padding: 16px;
  border: 3px solid var(--ink);
  border-radius: 34px;
  background: #f7c75c;
  box-shadow: 16px 16px 0 var(--ink);
  transform: rotate(3deg);
}

.phone-frame::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 82px;
  height: 10px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--ink);
  transform: translateX(-50%);
}

.game-ui {
  height: 100%;
  padding: 28px 16px 18px;
  border: 2px solid var(--ink);
  border-radius: 22px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0)),
    #74d9ce;
  overflow: hidden;
}

.score-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #ffffff;
  font-family: var(--display);
  font-weight: 900;
  text-shadow: 2px 2px 0 rgba(32, 33, 36, 0.65);
}

.playfield {
  position: relative;
  height: calc(100% - 78px);
  margin: 16px 0;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.2) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 2px, transparent 2px),
    linear-gradient(180deg, #8de6e0 0%, #9ee171 100%);
  background-size: 52px 52px, 52px 52px, auto;
  box-shadow: inset 0 -18px 0 rgba(32, 33, 36, 0.09);
  overflow: hidden;
}

.tile,
.coin,
.player-orb {
  position: absolute;
  border: 2px solid var(--ink);
}

.tile {
  width: 70px;
  height: 22px;
  border-radius: 7px;
  background: var(--cream);
  box-shadow: 3px 3px 0 rgba(32, 33, 36, 0.42);
}

.tile-a {
  left: 22px;
  bottom: 58px;
}

.tile-b {
  right: 22px;
  bottom: 128px;
}

.tile-c {
  left: 48px;
  top: 118px;
}

.tile-d {
  right: 52px;
  top: 58px;
}

.coin {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffd84d;
  animation: coinFloat 1.8s ease-in-out infinite;
}

.coin-one {
  top: 88px;
  right: 36px;
}

.coin-two {
  bottom: 180px;
  left: 44px;
  animation-delay: 0.55s;
}

.player-orb {
  left: 50%;
  bottom: 86px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 8px 0 rgba(32, 33, 36, 0.2);
  transform: translateX(-50%);
  animation: playerBounce 1.35s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.tap-button {
  width: 100%;
  min-height: 44px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--lime);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  font-weight: 1000;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.floating-card {
  position: absolute;
  z-index: 2;
  width: 188px;
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 7px 7px 0 var(--ink);
}

.top-card {
  top: 92px;
  left: 6px;
  transform: rotate(-8deg);
}

.bottom-card {
  right: 0;
  bottom: 108px;
  transform: rotate(6deg);
  background: var(--lime);
}

.mini-label,
.tag {
  display: inline-flex;
  margin-bottom: 8px;
  color: #626977;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.ticker {
  width: 100%;
  overflow: hidden;
  border-block: 2px solid var(--ink);
  background: var(--night);
  color: #ffffff;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 22s linear infinite;
}

.ticker span {
  padding: 18px 32px;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 900;
  white-space: nowrap;
}

.portfolio,
.split-section,
.contact {
  padding: clamp(70px, 10vw, 124px) 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: end;
  gap: 28px;
  margin-bottom: 26px;
}

.section-heading h2 {
  grid-column: 1 / -1;
  max-width: 920px;
}

.section-heading.compact {
  display: block;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.filter-chip {
  min-height: 40px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.filter-chip.active {
  background: var(--aqua);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.game-card {
  display: grid;
  grid-template-rows: 260px 1fr;
  min-height: 540px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 7px 7px 0 var(--ink);
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, opacity 180ms ease;
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: 11px 14px 0 var(--ink);
}

.game-card.hidden {
  display: none;
}

.game-art {
  position: relative;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
}

.game-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.18) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 2px, transparent 2px);
  background-size: 38px 38px;
}

.sunset {
  background: linear-gradient(160deg, #ffcf64 0%, #ff765d 55%, #7c58db 100%);
}

.mint {
  background: linear-gradient(160deg, #e4ff7a 0%, #64ddd7 58%, #4f8fef 100%);
}

.night {
  background: radial-gradient(circle at 30% 20%, #ffdc67 0 8%, transparent 9%),
    linear-gradient(160deg, #1b2845 0%, #503f88 58%, #ff6b57 100%);
}

.runner {
  position: absolute;
  left: 50%;
  bottom: 70px;
  width: 58px;
  height: 58px;
  border: 2px solid var(--ink);
  border-radius: 50% 50% 42% 42%;
  background: var(--lime);
  box-shadow: 6px 6px 0 rgba(32, 33, 36, 0.35);
  transform: translateX(-50%);
}

.runner::before,
.runner::after {
  content: "";
  position: absolute;
  top: 19px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
}

.runner::before {
  left: 15px;
}

.runner::after {
  right: 15px;
}

.platform {
  position: absolute;
  height: 20px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 4px 4px 0 rgba(32, 33, 36, 0.35);
}

.p1 {
  left: 24px;
  bottom: 42px;
  width: 120px;
}

.p2 {
  right: 36px;
  bottom: 112px;
  width: 94px;
}

.p3 {
  left: 72px;
  top: 48px;
  width: 118px;
}

.merge {
  position: absolute;
  width: 68px;
  height: 68px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  box-shadow: 5px 5px 0 rgba(32, 33, 36, 0.3);
}

.m1 {
  left: 40px;
  top: 42px;
  background: var(--coral);
}

.m2 {
  right: 54px;
  top: 76px;
  background: #ffffff;
}

.m3 {
  left: 72px;
  bottom: 42px;
  background: #ffd84d;
}

.m4 {
  right: 40px;
  bottom: 58px;
  background: var(--berry);
}

.blast {
  position: absolute;
  width: 54px;
  height: 54px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.16);
}

.b1 {
  left: 46px;
  top: 44px;
}

.b2 {
  right: 44px;
  top: 94px;
  background: var(--lime);
}

.b3 {
  left: 82px;
  bottom: 48px;
  background: var(--coral);
}

.ship {
  position: absolute;
  right: 58px;
  bottom: 50px;
  width: 72px;
  height: 54px;
  border: 2px solid var(--ink);
  border-radius: 50% 50% 10px 10px;
  background: #ffffff;
  transform: rotate(-18deg);
  box-shadow: 6px 6px 0 rgba(32, 33, 36, 0.35);
}

.game-content {
  padding: 22px;
}

.game-content p {
  color: #585f6b;
  line-height: 1.62;
}

.game-content ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 20px 0 0;
  list-style: none;
}

.game-content li {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff8e8;
  font-size: 0.88rem;
  font-weight: 900;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 6vw, 78px);
  align-items: start;
}

.skill-panel {
  position: sticky;
  top: 112px;
}

.skill-list {
  display: grid;
  gap: 14px;
}

.skill-list article {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  padding: 22px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 5px 5px 0 var(--ink);
}

.skill-list span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: var(--cream);
  font-family: var(--display);
  font-weight: 900;
}

.skill-list p,
.timeline p {
  margin-bottom: 0;
  color: #5b626d;
  line-height: 1.6;
}

.process {
  padding: clamp(70px, 10vw, 120px) 0;
  border-block: 2px solid var(--ink);
  background: #ffffff;
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 25px;
  left: 8%;
  right: 8%;
  height: 3px;
  background: var(--ink);
}

.timeline article {
  position: relative;
  padding-top: 64px;
}

.step-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 52px;
  height: 52px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 4px 4px 0 var(--ink);
}

.timeline article:nth-child(2) .step-dot {
  background: var(--aqua);
}

.timeline article:nth-child(3) .step-dot {
  background: var(--coral);
}

.timeline article:nth-child(4) .step-dot {
  background: var(--cream);
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: center;
}

.contact-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--lime);
  box-shadow: 8px 8px 0 var(--ink);
}

.contact-card a {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: #ffffff;
  font-weight: 900;
}

.contact-card a::after {
  content: ">";
  font-family: var(--display);
}

@keyframes coinFloat {
  50% {
    transform: translateY(-10px) rotate(18deg);
  }
}

@keyframes playerBounce {
  0%,
  100% {
    transform: translate(-50%, 0) scale(1, 1);
  }

  50% {
    transform: translate(-50%, -42px) scale(0.96, 1.04);
  }
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .main-nav,
  .nav-cta {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .site-header.menu-open .main-nav {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-self: stretch;
  }

  .site-header.menu-open .nav-cta {
    grid-column: 1 / -1;
    display: inline-flex;
  }

  .hero,
  .split-section,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 56px;
  }

  .hero-stage {
    min-height: 560px;
  }

  .game-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    top: 0;
    bottom: 0;
    left: 25px;
    right: auto;
    width: 3px;
    height: auto;
  }

  .timeline article {
    min-height: 128px;
    padding-top: 0;
    padding-left: 72px;
  }

  .skill-panel {
    position: static;
  }
}

@media (max-width: 580px) {
  .site-header,
  .section-shell {
    width: min(100% - 22px, 1160px);
  }

  .site-header {
    margin-top: 10px;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .brand span:last-child {
    max-width: 134px;
    white-space: normal;
    line-height: 1.05;
  }

  h1 {
    font-size: clamp(2.55rem, 13vw, 3.35rem);
    line-height: 1.02;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid div + div {
    border-left: 0;
    border-top: 2px solid var(--ink);
  }

  .hero-stage {
    min-height: 510px;
  }

  .phone-frame {
    width: min(86vw, 316px);
    box-shadow: 10px 10px 0 var(--ink);
  }

  .floating-card {
    width: 160px;
    padding: 12px;
  }

  .top-card {
    top: 26px;
    left: 0;
  }

  .bottom-card {
    right: 0;
    bottom: 24px;
  }

  .game-card {
    grid-template-rows: 220px 1fr;
    min-height: auto;
  }

  .skill-list article {
    grid-template-columns: 1fr;
  }

  .contact {
    padding-bottom: 84px;
  }

  .contact-card {
    width: 100%;
  }
}

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