:root {
  --bg: #FFF6E9;
  --bg2: #FFEBD2;
  --card: #FFFFFF;
  --ink: #2B2340;
  --muted: #6E6585;
  --line: #2B2340;
  --coral: #FF6B5B;
  --sun: #FFC93C;
  --mint: #2EC4A6;
  --sky: #4DA8FF;
  --grape: #9B7BFF;
  --shadow: #2B2340;
  --chip1: #FFE0DB;
  --chip2: #DDF0FF;
  --chip3: #D9F6EE;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1B1728; --bg2: #241E36; --card: #2A2340; --ink: #FFF3E3; --muted: #B8AECF;
    --line: #0E0B16; --shadow: #0E0B16; --chip1: #4A2630; --chip2: #1F3550; --chip3: #1C3F3A;
  }
}
:root[data-theme="dark"] {
  --bg: #1B1728; --bg2: #241E36; --card: #2A2340; --ink: #FFF3E3; --muted: #B8AECF;
  --line: #0E0B16; --shadow: #0E0B16; --chip1: #4A2630; --chip2: #1F3550; --chip3: #1C3F3A;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(var(--bg2) 1.6px, transparent 1.6px);
  background-size: 26px 26px;
  color: var(--ink);
  font: 400 17px/1.6 Nunito, system-ui, sans-serif;
  overflow-x: hidden;
}
h1, h2, h3, .logo, .btn, .tag, .chip { font-family: Fredoka, Nunito, sans-serif; }
a { color: inherit; }
img { max-width: 100%; display: block; }

/* chunky outline + offset shadow, the house style */
.pop-box, .btn, .game, .tile, .contact-card, .nav, .chip, .job .what {
  border: 2.5px solid var(--line);
  box-shadow: 4px 4px 0 var(--shadow);
}

/* NAV */
.nav {
  position: sticky; top: 12px; z-index: 10;
  max-width: 1080px; margin: 12px auto 0; width: calc(100% - 32px);
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px 8px 12px; border-radius: 999px; background: var(--card);
}
.logo {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--coral); color: #fff; text-decoration: none; font-weight: 700; font-size: 17px;
  border: 2.5px solid var(--line);
}
.nav nav { display: flex; gap: 4px; margin-left: auto; }
.nav nav a {
  text-decoration: none; font-weight: 800; font-size: 15px; padding: 8px 12px; border-radius: 999px;
}
.nav nav a:hover { background: var(--bg2); }
.theme {
  width: 42px; height: 42px; border-radius: 50%; border: 2.5px solid var(--line);
  background: var(--sun); color: #2B2340; font-size: 18px; cursor: pointer; flex: none;
}
.theme .moon { display: none; }
:root[data-theme="dark"] .theme .sun { display: none; }
:root[data-theme="dark"] .theme .moon { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .sun { display: none; }
  :root:not([data-theme="light"]) .theme .moon { display: inline; }
}

main { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* HERO */
.hero {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center;
  min-height: min(78vh, 720px); padding: 56px 0 32px;
}
.hello { margin: 0; font-weight: 800; color: var(--muted); font-size: 20px; }
.wave { display: inline-block; animation: wave 2.4s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0) } 10%, 30% { transform: rotate(16deg) } 20%, 40% { transform: rotate(-8deg) } }
h1 {
  font-size: clamp(52px, 9vw, 96px); line-height: 0.95; margin: 6px 0 18px; font-weight: 700;
  letter-spacing: -1px;
}
h1::after {
  content: ""; display: block; width: 120px; height: 12px; margin-top: 14px; border-radius: 99px;
  background: repeating-linear-gradient(90deg, var(--coral) 0 24px, var(--sun) 24px 48px, var(--mint) 48px 72px, var(--sky) 72px 96px, var(--grape) 96px 120px);
}
.lede { font-size: 20px; max-width: 560px; margin: 0 0 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.chip { font-size: 15px; font-weight: 500; padding: 6px 14px; border-radius: 999px; box-shadow: 2px 2px 0 var(--shadow); }
.chip.c1 { background: var(--chip1); } .chip.c2 { background: var(--chip2); } .chip.c3 { background: var(--chip3); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 17px;
  padding: 12px 22px; border-radius: 16px; background: var(--card);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--shadow); }
.btn.primary { background: var(--coral); color: #fff; }

/* hero art: the AH Taiti Dragon card with the Bonk Pals bear */
.hero-art { position: relative; height: 380px; }
.blob { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .9; z-index: 0; }
.b1 { width: 260px; height: 260px; background: var(--sun); right: 30px; top: 50px; border-radius: 42% 58% 60% 40% / 45% 40% 60% 55%; }
.b2 { width: 120px; height: 120px; background: var(--mint); left: 20px; bottom: 30px; border-radius: 60% 40% 45% 55%; }
.tilt-wrap {
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center;
  animation: bob 5s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg) } 50% { transform: translateY(-10px) rotate(-1deg) } }
.card3d {
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 30%; --ga: 0;
  position: relative; width: 220px; aspect-ratio: 960 / 1344;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; outline: none;
}
.card3d.live .side { transition: transform .08s linear; }
.card3d.grab { cursor: grabbing; }
.card3d:focus-visible .side { box-shadow: 0 0 0 4px var(--sky), 8px 10px 0 var(--shadow); }
.side {
  position: absolute; inset: 0; border-radius: 16px; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: 2.5px solid var(--line); box-shadow: 8px 10px 0 var(--shadow);
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .7s cubic-bezier(.2, 1.5, .4, 1);
}
.side img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.backside { transform: perspective(1100px) rotateX(var(--rx)) rotateY(calc(var(--ry) + 180deg)); visibility: hidden; }
.card3d.show-back .backside { visibility: visible; }
.card3d.show-back .front { visibility: hidden; }
/* gold foil shimmer that slides with the tilt, and a soft light glare under the pointer */
.foil {
  position: absolute; inset: 0; mix-blend-mode: color-dodge; opacity: calc(.15 + var(--ga) * .55);
  background: linear-gradient(115deg, transparent 20%, rgba(255,215,120,.55) 40%, rgba(255,250,220,.7) 48%, rgba(255,190,90,.45) 56%, transparent 75%);
  background-size: 250% 250%; background-position: var(--gx) var(--gy);
}
.glare {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255,255,255,.75), transparent 55%);
  opacity: calc(.25 + var(--ga) * .6);
}
.rank {
  position: absolute; display: flex; flex-direction: column; align-items: center; line-height: .9;
  font: 700 26px/1 Georgia, 'Times New Roman', serif; letter-spacing: -1px;
  background: linear-gradient(180deg, #FFF1C0, #E8C770 45%, #B8862B);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rank i { font-style: normal; font-size: 22px; letter-spacing: 0; margin-top: 2px; }
.rank.tl { left: 15px; top: 15px; }
.rank.br { right: 15px; bottom: 15px; transform: rotate(180deg); }
.pip {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 104px; line-height: 1; color: #D8343F;
  text-shadow: 0 0 1px #FFE7A3, 0 0 2px #E8C770, 0 0 18px rgba(255, 90, 90, .35);
}
.backside .foil {
  mix-blend-mode: screen; opacity: calc(.12 + var(--ga) * .5);
  background: linear-gradient(115deg, transparent 38%, rgba(232,199,112,.35) 45%, rgba(255,244,210,.55) 49%, rgba(232,199,112,.35) 53%, transparent 60%);
  background-size: 300% 300%; background-position: var(--gx) var(--gy);
}
.backside .glare { mix-blend-mode: screen; background: radial-gradient(circle at var(--gx) var(--gy), rgba(255,240,200,.28), transparent 45%); }
.card-hint {
  position: absolute; bottom: -6px; left: 0; right: 0; text-align: center; margin: 0;
  font: 600 14px Fredoka, sans-serif; color: var(--muted); letter-spacing: .5px;
}
/* the Bonk Pals bear, peeking over the card */
.bear {
  position: absolute; z-index: 0; width: 46%; height: auto; right: -4%; top: -27%;
  transform-origin: 50% 100%; pointer-events: none;
  animation: peek 6s ease-in-out infinite;
}
.card3d .side { z-index: 1; }
@keyframes peek {
  0%, 12% { transform: translateY(38%) rotate(10deg); }
  22%, 60% { transform: translateY(0) rotate(10deg); }
  66% { transform: translateY(0) rotate(4deg); }
  72% { transform: translateY(0) rotate(14deg); }
  78%, 86% { transform: translateY(0) rotate(10deg); }
  96%, 100% { transform: translateY(38%) rotate(10deg); }
}
:root[data-theme="dark"] .bear { filter: drop-shadow(0 0 1.5px rgba(255,243,227,.55)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bear { filter: drop-shadow(0 0 1.5px rgba(255,243,227,.55)); } }

/* SECTIONS */
.section { padding: 72px 0 24px; }
.section-head { margin-bottom: 28px; }
.section-head h2 { font-size: clamp(34px, 5vw, 48px); margin: 8px 0 6px; line-height: 1.05; }
.section-head p { color: var(--muted); margin: 0; font-size: 18px; }
.tag {
  display: inline-block; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px;
  background: var(--ink); color: var(--bg); padding: 4px 12px; border-radius: 8px; transform: rotate(-2deg);
}

/* GAMES */
.games { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.game { background: var(--card); border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; transition: transform .2s; }
.game:hover { transform: translateY(-4px) rotate(-.4deg); }
.game.bonk:hover { transform: translateY(-4px) rotate(.4deg); }
.banner { display: block; border-bottom: 2.5px solid var(--line); aspect-ratio: 1024 / 500; overflow: hidden; }
.banner img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.game:hover .banner img { transform: scale(1.04); }
.game-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.game-title { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.icon { width: 56px; height: 56px; border-radius: 14px; border: 2.5px solid var(--line); }
.game h3 { margin: 0; font-size: 28px; line-height: 1.1; }
.sub { margin: 2px 0 0; color: var(--muted); font-weight: 700; font-size: 15px; }
.game-body > p { margin: 8px 0 14px; }
.pills { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 18px; }
.pills li { font-size: 14px; font-weight: 800; padding: 4px 12px; border-radius: 999px; background: var(--bg2); }
.game-actions { margin-top: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.taiti .btn.play { background: #1E5C55; color: #FFE7A3; }
.bonk .btn.play { background: var(--sun); color: #2B2340; }
.soon { font-size: 14px; color: var(--muted); font-weight: 700; }
.under-hood {
  margin: 26px 0 0; padding: 14px 18px; border-radius: 16px; border: 2.5px dashed var(--muted);
  color: var(--muted); font-size: 16px;
}
.under-hood strong { color: var(--ink); }

/* WORK */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 170px; top: 10px; bottom: 10px; width: 4px; border-radius: 4px;
  background: repeating-linear-gradient(var(--muted) 0 10px, transparent 10px 18px); opacity: .5;
}
.job { display: grid; grid-template-columns: 170px 1fr; gap: 0 32px; margin-bottom: 20px; position: relative; }
.job::before {
  content: ""; position: absolute; left: 161px; top: 22px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--card); border: 2.5px solid var(--line); z-index: 1;
}
.job.now::before { background: var(--mint); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(46,196,166,.6) } 50% { box-shadow: 0 0 0 10px rgba(46,196,166,0) } }
.when { white-space: nowrap; font-weight: 800; color: var(--muted); font-size: 15px; padding-top: 20px; padding-right: 24px; text-align: right; }
.what { background: var(--card); border-radius: 20px; padding: 16px 22px; margin-left: 16px; }
.what h3 { margin: 0 0 4px; font-size: 22px; line-height: 1.25; }
.what h3 span { color: var(--coral); font-weight: 600; }
.what p { margin: 4px 0; }
.what ul { margin: 8px 0 2px; padding-left: 20px; }
.what li { margin: 3px 0; }
.what li::marker { color: var(--coral); }
.compact { list-style: none; padding: 0 !important; }
.compact li { padding: 4px 0; border-bottom: 1.5px dashed var(--bg2); }
.compact li:last-child { border: 0; }

/* TOOLBOX */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.tile { background: var(--card); border-radius: 22px; padding: 20px 22px; }
.tile h3 { margin: 0 0 12px; font-size: 22px; }
.tile h3.mt { margin-top: 18px; }
.tile .pills { margin: 0; }
.t-skills { border-top: 10px solid var(--coral); }
.t-certs { border-top: 10px solid var(--sun); }
.t-edu { border-top: 10px solid var(--sky); }
.t-lang { border-top: 10px solid var(--mint); }
.list { margin: 0; padding-left: 20px; }
.list li { margin: 6px 0; }

/* CONTACT */
.contact { padding-bottom: 72px; }
.contact-card {
  text-align: center; border-radius: 28px; padding: 40px 24px; background: var(--grape); color: #fff;
}
.contact-card h2 { font-size: clamp(36px, 6vw, 56px); margin: 0 0 6px; }
.contact-card p { font-size: 19px; margin: 0 auto 22px; max-width: 520px; }
.contact-card .cta { justify-content: center; }
.contact-card .btn { color: var(--ink); }
.contact-card .btn.primary { background: var(--sun); color: #2B2340; }

footer { text-align: center; color: var(--muted); font-weight: 700; font-size: 15px; padding: 0 16px 36px; }

/* reveal on scroll */
.pop { opacity: 0; transform: translateY(24px) scale(.98); transition: opacity .5s, transform .5s cubic-bezier(.3,1.4,.5,1); }
.pop.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .pop { opacity: 1; transform: none; }
}

/* PHONES */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 40px; gap: 8px; }
  .hero-art { order: -1; }
  .hero-art { height: 340px; }
  .card3d { width: 180px; }
  .pip { font-size: 82px; }
  .rank { font-size: 21px; }
  .rank i { font-size: 18px; }
  .b1 { width: 190px; height: 190px; right: 10%; top: 30px; }
  .games, .tiles { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav nav a { padding: 6px 7px; font-size: 14px; }
  .nav nav a[href="#toolbox"] { display: none; }
  .lede { font-size: 18px; }
  .timeline::before { left: 9px; }
  .job { grid-template-columns: 1fr; }
  .job::before { left: 0; top: 2px; }
  .when { text-align: left; padding: 0 0 6px 34px; }
  .what { margin-left: 0; }
  .game-body { padding: 16px; }
}

/* OTHER BUILDS */
.builds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.build {
  position: relative; display: flex; flex-direction: column; text-decoration: none;
  background: var(--card); border-radius: 20px; padding: 18px 20px;
  border: 2.5px solid var(--line); box-shadow: 4px 4px 0 var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
a.build:hover { transform: translate(-2px, -3px) rotate(-.6deg); box-shadow: 6px 7px 0 var(--shadow); }
.build .emoji {
  display: grid; place-items: center; width: 48px; height: 48px; font-size: 26px;
  border-radius: 14px; background: var(--bg2); margin-bottom: 10px;
}
.build h3 { margin: 0 0 4px; font-size: 20px; }
.build p { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.build .go { margin-top: auto; font: 600 15px Fredoka, sans-serif; color: var(--coral); }
@media (max-width: 860px) { .builds { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .builds { grid-template-columns: 1fr; }
  .nav nav a[href="#builds"] { display: none; }
}

/* GUITAR */
.clips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.clip {
  margin: 0; background: var(--card); border-radius: 20px; overflow: hidden;
  border: 2.5px solid var(--line); box-shadow: 4px 4px 0 var(--shadow);
}
.clip:nth-child(odd) { transform: rotate(-.6deg); }
.clip:nth-child(even) { transform: rotate(.6deg); }
.clip.pop:not(.in) { transform: translateY(24px) scale(.98); }
.clip video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border-bottom: 2.5px solid var(--line); }
.clip figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 10px 14px 12px; }
.clip figcaption span { font: 600 18px Fredoka, sans-serif; }
.clip figcaption small { color: var(--muted); font-weight: 800; }
@media (max-width: 860px) { .clips { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .clips { grid-template-columns: 1fr; }
  .nav nav a[href="#guitar"] { display: none; }
}

/* HARDWARE */
.hw { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.hw-card {
  display: flex; flex-direction: column; background: var(--card); border-radius: 22px; overflow: hidden;
  border: 2.5px solid var(--line); box-shadow: 4px 4px 0 var(--shadow);
}
.hw-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 2.5px solid var(--line); }
.hw-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.hw-body h3 { margin: 0 0 6px; font-size: 22px; line-height: 1.2; }
.hw-body p { margin: 0 0 10px; font-size: 15.5px; }
.hw-body .why { font-weight: 800; color: var(--coral); }
.hw-body .pills { margin: auto 0 0; }
@media (max-width: 860px) { .hw { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .hw { grid-template-columns: 1fr; } }
@media (max-width: 1000px) { .nav nav a[href="#toolbox"], .nav nav a[href="#builds"] { display: none; } }
@media (max-width: 640px) { .nav nav a[href="#hardware"] { display: none; } }
