/* ─────────── Tokens ─────────── */
:root {
  --cream: #fff6ea;
  --cream-2: #ffecd4;
  --card: #fffdf8;
  --ink: #221c18;
  --ink-soft: #5d534b;
  --ink-faint: #9a8f84;
  --ginger: #ff7a21;
  --ginger-soft: #ff8a35;
  --ginger-deep: #d65a0a;
  --pink: #ff8fab;
  --pink-deep: #ff5f8f;
  --mint: #2fae6f;
  --line: #eadbc6;

  --f-display: "Fraunces", Georgia, serif;
  --f-body: "DM Sans", system-ui, -apple-system, sans-serif;
  --f-hand: "Caveat", "Comic Sans MS", cursive;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --r: 22px;
  --shadow: 6px 6px 0 var(--ink);
  --wrap: 1160px;
  --gutter: 24px;
  --bounce: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

/* ─────────── Base ─────────── */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; overflow-x: clip;
  background: var(--cream);
  background-image: radial-gradient(rgba(34, 28, 24, .07) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  color: var(--ink);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
code { font: 500 .84em var(--f-mono); background: rgba(255, 122, 33, .13); padding: .08em .35em; border-radius: 6px; }
mark { background: linear-gradient(transparent 55%, rgba(255, 122, 33, .45) 55%); color: inherit; padding: 0 .1em; }
::selection { background: var(--ginger); color: #fff; }
:focus-visible { outline: 3px solid var(--ginger); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.muted { color: var(--ink-soft); }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 700; }
.skip-link:focus { top: 12px; }
.doodle { font: 600 22px/1.2 var(--f-hand); color: var(--ink-soft); }

/* ─────────── Buttons & bits ─────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  padding: 14px 22px; border-radius: 999px;
  border: 2.5px solid var(--ink);
  font: 700 16px/1 var(--f-body); text-decoration: none; cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .2s var(--bounce), box-shadow .2s var(--bounce), background .2s;
}
.btn svg { width: 16px; height: 16px; fill: currentColor; }
.btn:hover { transform: translate(-2px, -2px) rotate(-1.5deg); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn--ink { background: var(--ink); color: var(--cream); }
.btn--ginger { background: var(--ginger); color: #fff; }
.btn--line { background: var(--card); color: var(--ink); }
.btn--sm { padding: 10px 16px; font-size: 14px; box-shadow: 3px 3px 0 var(--ink); }

.link { font-weight: 700; text-decoration: none; background: linear-gradient(var(--ginger), var(--ginger)) left 100% / 100% 3px no-repeat; padding-bottom: 2px; transition: background-size .3s var(--ease); }
.link:hover { background-size: 0 3px; background-position: right 100%; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); font-weight: 700; font-size: 14px; box-shadow: 3px 3px 0 var(--ink); }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--cream-2); border: 2px solid var(--ink); font-weight: 700; font-size: 13px; }
.pill-row { margin-top: 12px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--card); cursor: pointer; font-weight: 800; font-size: 18px; box-shadow: 2px 2px 0 var(--ink); transition: transform .4s var(--bounce); }
.icon-btn:hover { transform: rotate(180deg); }

/* ─────────── Nav ─────────── */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(255, 246, 234, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 2.5px solid var(--ink); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; margin-right: auto; font: 800 22px/1 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; }
.logo b { color: var(--ginger); }
.logo-paw { width: 26px; height: 26px; fill: var(--ginger); transition: transform .5s var(--bounce); }
.logo:hover .logo-paw { transform: rotate(-25deg) scale(1.15); }
.nav-links { display: flex; gap: 6px; }
.nav-links a { display: block; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; transition: background .2s, color .2s; }
.nav-links a:hover, .nav-links a.active { background: var(--ink); color: var(--cream); }
.burger { display: none; position: relative; width: 46px; height: 42px; flex: none; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--card); box-shadow: 2px 2px 0 var(--ink); cursor: pointer; transition: transform .2s var(--bounce), background .2s; }
.burger:active { transform: translate(2px, 2px); box-shadow: none; }
.burger span { position: absolute; left: 10px; right: 10px; height: 2.5px; border-radius: 2px; background: var(--ink); transition: top .25s var(--ease), transform .3s var(--bounce), opacity .15s; }
.burger span:nth-child(1) { top: 11px; } .burger span:nth-child(2) { top: 17.5px; } .burger span:nth-child(3) { top: 24px; }
.nav.open .burger { background: var(--ginger); }
.nav.open .burger span:nth-child(1) { top: 17.5px; transform: rotate(45deg); }
.nav.open .burger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav.open .burger span:nth-child(3) { top: 17.5px; transform: rotate(-45deg); }
.mobile-menu { display: none; }
.yarn-track { position: absolute; left: 0; right: 0; bottom: -2.5px; height: 2.5px; pointer-events: none; }
.yarn-line { position: absolute; left: 0; top: 0; height: 3px; width: calc(var(--p, 0) * 100%); background: var(--ginger); }
.yarn-ball {
  position: absolute; top: -7px; left: calc(var(--p, 0) * 100% - 8px); width: 16px; height: 16px; border-radius: 50%;
  background: repeating-linear-gradient(45deg, var(--ginger) 0 3px, #ffb27a 3px 5px);
  border: 2px solid var(--ink); transform: rotate(calc(var(--p, 0) * 2000deg));
}

/* ─────────── Hero ─────────── */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 56px; min-height: calc(100svh - 68px - 58px); }
.hero-title { font: 800 clamp(58px, 9vw, 124px)/.92 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.035em; margin: 22px 0 22px; }
.hero-title .bounce { display: block; }
.hero-title .name { color: var(--ginger); font-style: italic; position: relative; width: fit-content; }
.hero-title .name::after { content: ""; position: absolute; left: 2%; right: 12%; bottom: .02em; height: .1em; border-radius: 99px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease) 1s; }
.ready .hero-title .name::after { transform: scaleX(1); }
.wave { display: inline-block; font-style: normal; font-size: .6em; margin-left: .12em; vertical-align: .25em; transform-origin: 70% 80%; animation: wave 2.4s ease-in-out 1.4s infinite; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-10deg); } }
.hero-lede { font: 500 clamp(20px, 2.1vw, 25px)/1.4 var(--f-body); max-width: 30ch; }
.hero-lede strong { font-weight: 800; background: linear-gradient(transparent 60%, rgba(255, 143, 171, .55) 60%); }
.hero-aside { margin-top: 12px; color: var(--ink-soft); font-size: 17px; }
.hero-aside b { color: var(--ink); }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.mini-stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 12px 30px; margin-top: 36px; }
.mini-stats dt { font: 800 30px/1 var(--f-display); font-variation-settings: "SOFT" 100; letter-spacing: -.02em; }
.mini-stats dd { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-top: 4px; }

.hero-cat { position: relative; display: flex; flex-direction: column; align-items: center; }
.mutex-btn { background: none; border: 0; padding: 0; cursor: grab; width: min(100%, 440px); -webkit-tap-highlight-color: transparent; }
.mutex-btn:active { cursor: grabbing; }
.mutex { width: 100%; height: auto; overflow: visible; filter: drop-shadow(8px 10px 0 rgba(34, 28, 24, .12)); }
.kkk { font: 700 13px var(--f-mono); fill: #ff8a35; opacity: .8; }
.tail { transform-origin: 240px 318px; animation: swish 3.2s ease-in-out infinite; }
@keyframes swish { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-10deg); } }
.head { transform-origin: 180px 210px; transition: transform .5s var(--bounce); }
.ear { transition: transform .35s var(--bounce); }
.ear-l { transform-origin: 130px 110px; } .ear-r { transform-origin: 230px 110px; }
.ear-l.twitch { animation: twitchL .5s; } .ear-r.twitch { animation: twitchR .5s; }
@keyframes twitchL { 40% { transform: rotate(-14deg); } }
@keyframes twitchR { 40% { transform: rotate(14deg); } }
.eye { transform-box: fill-box; transform-origin: center; transition: transform .09s; }
.blink .eye { transform: scaleY(.08); }
.pupil { transition: transform .12s linear; }
.eyes-happy, .eyes-mad { opacity: 0; }
.mutex.happy .eyes { opacity: 0; } .mutex.happy .eyes-happy { opacity: 1; }
.mutex.happy .head { transform: rotate(-6deg); }
.mutex.mad .eyes { opacity: 0; } .mutex.mad .eyes-mad { opacity: 1; }
.mutex.mad .ear-l { transform: rotate(-38deg); } .mutex.mad .ear-r { transform: rotate(38deg); }
.mutex.mad .tail { animation-duration: .5s; }
.bubble {
  position: absolute; top: 2%; left: 0; z-index: 2;
  max-width: 220px; padding: 12px 16px; border-radius: 20px;
  background: var(--card); border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  font: 700 26px/1.1 var(--f-hand);
  transform-origin: 80% 110%;
  transition: transform .35s var(--bounce), opacity .2s;
}
.bubble::after { content: ""; position: absolute; right: 28px; bottom: -12px; width: 18px; height: 18px; background: var(--card); border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(45deg) skew(8deg, 8deg); }
.bubble.swap { transform: scale(.6); opacity: 0; }
.hero-note { margin-top: 8px; transform: rotate(-2deg); }
.hero-note span { color: var(--ginger-deep); }
.heart { position: fixed; z-index: 400; pointer-events: none; font-size: 26px; animation: heart 1.1s ease-out forwards; }
@keyframes heart { from { transform: translate(-50%, -50%) scale(.5); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% - 110px)) scale(1.3) rotate(var(--rot)); opacity: 0; } }

/* entrance */
.pop, .hero-title .bounce, .hero-cat { opacity: 0; transform: translateY(24px); }
.ready .pop, .ready .hero-title .bounce, .ready .hero-cat { opacity: 1; transform: none; transition: opacity .6s, transform .9s var(--bounce); }
.ready .hero-title .bounce:nth-child(2) { transition-delay: .12s; }
.ready .hero-lede { transition-delay: .24s; } .ready .hero-aside { transition-delay: .32s; }
.ready .cta-row { transition-delay: .4s; } .ready .mini-stats { transition-delay: .48s; }
.hero-cat { transform: translateY(60px) scale(.9); }
.ready .hero-cat { transition-delay: .2s; transition-duration: .6s, 1.1s; }

/* ─────────── Marquee ─────────── */
.marquee { overflow: hidden; background: var(--ginger); border-top: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(-1.2deg); margin: 12px -10px 0; }
.marquee-track { display: flex; align-items: center; gap: 26px; width: max-content; padding: 14px 0; animation: marquee 28s linear infinite; }
.marquee span { font: 800 26px/1 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; color: #fff; white-space: nowrap; }
.marquee i { width: 22px; height: 22px; flex: none; background: var(--ink); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='16.2' rx='5.6' ry='4.6'/%3E%3Ccircle cx='5.8' cy='10.6' r='2.4'/%3E%3Ccircle cx='9.6' cy='6.4' r='2.4'/%3E%3Ccircle cx='14.4' cy='6.4' r='2.4'/%3E%3Ccircle cx='18.2' cy='10.6' r='2.4'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='16.2' rx='5.6' ry='4.6'/%3E%3Ccircle cx='5.8' cy='10.6' r='2.4'/%3E%3Ccircle cx='9.6' cy='6.4' r='2.4'/%3E%3Ccircle cx='14.4' cy='6.4' r='2.4'/%3E%3Ccircle cx='18.2' cy='10.6' r='2.4'/%3E%3C/svg%3E") center / contain no-repeat; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ─────────── Sections ─────────── */
.section { padding-top: 120px; }
.label { display: inline-block; font: 600 14px/1 var(--f-mono); color: var(--ginger-deep); background: rgba(255, 122, 33, .12); padding: 7px 10px; border-radius: 8px; margin-bottom: 14px; }
.section-title { font: 800 clamp(40px, 6vw, 68px)/1 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.03em; margin-bottom: 40px; }
.card { background: var(--card); border: 2.5px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); padding: 28px; position: relative; }
.card-kicker { font: 700 12.5px/1.2 var(--f-body); text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); margin-bottom: 10px; }
.card-title { font: 700 26px/1.1 var(--f-display); font-variation-settings: "SOFT" 100; margin-bottom: 8px; letter-spacing: -.01em; }

/* reveal */
.reveal { opacity: 0; transform: translateY(34px) rotate(.6deg); transition: opacity .7s ease, transform .9s var(--bounce); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ─────────── About bento ─────────── */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card--wide { grid-column: span 2; }
.card--photo { grid-row: span 2; padding: 16px; display: flex; flex-direction: column; }
.card--ginger { background: var(--ginger); color: #fff; }
.card--ginger .card-kicker { color: rgba(255, 255, 255, .8); }
.card--ginger .link { background-image: linear-gradient(#fff, #fff); }
.card--care { display: flex; flex-direction: column; justify-content: space-between; min-height: 250px; }
.care-text { font: 600 clamp(23px, 2.6vw, 32px)/1.25 var(--f-display); font-variation-settings: "SOFT" 100; letter-spacing: -.01em; max-width: 26ch; }
.race-doodle { position: relative; height: 54px; margin-top: 20px; border-bottom: 2.5px dashed var(--ink-faint); }
.racer { position: absolute; bottom: 4px; width: 46px; height: 42px; color: var(--ginger-soft); animation: race 3.4s var(--ease) infinite; }
.racer.r2 { color: #b6aea6; animation-delay: .12s; bottom: 2px; }
.finish { position: absolute; right: 0; bottom: 2px; font-size: 38px; line-height: 1; }
@keyframes race { 0% { left: 0; } 70%, 100% { left: calc(100% - 92px); } 70% { transform: translateY(0); } 78% { transform: translateY(-14px) rotate(-8deg); } 86% { transform: translateY(0); } }

.catpic { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.catpic-frame { position: relative; flex: 1; min-height: 240px; border-radius: 14px; overflow: hidden; border: 2.5px solid var(--ink); background: linear-gradient(100deg, var(--cream-2) 30%, #fff5e8 50%, var(--cream-2) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
.catpic-frame.loaded { animation: none; background: var(--cream-2); }
.catpic-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .5s, transform .8s var(--ease); }
.catpic-frame.loaded img { opacity: 1; transform: none; }
.catpic-frame.failed { animation: none; display: grid; place-items: center; }
.catpic-frame.failed::after { content: "🐈 the cat API is napping"; font: 700 22px var(--f-hand); color: var(--ink-soft); }
@keyframes shimmer { to { background-position: -150% 0; } }
.catpic figcaption { font-size: 15px; line-height: 1.4; }
.reroll { position: absolute; top: 26px; right: 26px; z-index: 2; }

/* ─────────── LeetCode ─────────── */
.lc-card { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 44px; padding: 36px; }
.lc-big { font: 900 clamp(96px, 12vw, 150px)/.85 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.05em; color: var(--ginger); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 5px 5px 0 var(--ink); }
.lc-sub { font-weight: 700; margin-top: 12px; }
.lc-status { color: var(--ink-faint); font-weight: 500; font-size: 14px; }
.lc-bars { display: grid; gap: 12px; margin-top: 24px; }
.lc-bars li { display: grid; grid-template-columns: 70px 1fr 44px; gap: 12px; align-items: center; font-weight: 700; font-size: 14px; }
.lc-bars em { font: 600 15px var(--f-mono); font-style: normal; text-align: right; }
.bar { height: 16px; border: 2.5px solid var(--ink); border-radius: 99px; overflow: hidden; background: var(--cream-2); }
.bar i { display: block; height: 100%; width: calc(var(--p) * 100%); min-width: 8px; border-radius: 99px; background: var(--mint); transform: scaleX(0); transform-origin: left; transition: transform 1.3s var(--ease) .3s; }
.bar--med i { background: #ffb020; } .bar--hard i { background: var(--pink-deep); }
.in .bar i { transform: none; }
.lc-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-weight: 700; font-size: 14px; color: var(--ink-soft); margin-bottom: 14px; }
.lc-head b { color: var(--ink); }
.paws { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); grid-template-columns: repeat(26, 1fr); gap: 3px; }
.paws i {
  aspect-ratio: 1; background: rgba(34, 28, 24, .1);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='16.2' rx='5.6' ry='4.6'/%3E%3Ccircle cx='5.8' cy='10.6' r='2.4'/%3E%3Ccircle cx='9.6' cy='6.4' r='2.4'/%3E%3Ccircle cx='14.4' cy='6.4' r='2.4'/%3E%3Ccircle cx='18.2' cy='10.6' r='2.4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='16.2' rx='5.6' ry='4.6'/%3E%3Ccircle cx='5.8' cy='10.6' r='2.4'/%3E%3Ccircle cx='9.6' cy='6.4' r='2.4'/%3E%3Ccircle cx='14.4' cy='6.4' r='2.4'/%3E%3Ccircle cx='18.2' cy='10.6' r='2.4'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: scale(0) rotate(-30deg); transition: transform .5s var(--bounce); transition-delay: calc(var(--i) * 4ms);
}
.in .paws i { transform: none; }
.paws i.l1 { background: #ffc48f; } .paws i.l2 { background: #ff9a4d; } .paws i.l3 { background: var(--ginger-deep); } .paws i.l4 { background: var(--ink); }
.lc-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 22px; }

/* ─────────── Projects ─────────── */
.project { padding: 36px; margin-bottom: 44px; }
.project-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.project-title { font: 900 clamp(46px, 6vw, 76px)/1 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.035em; }
.project-links { display: flex; gap: 10px; flex-wrap: wrap; }
.project-lede { font-size: 20px; line-height: 1.5; max-width: 62ch; margin-top: 14px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.chips-row li { padding: 7px 14px; border: 2px solid var(--ink); border-radius: 999px; font-weight: 600; font-size: 14px; background: var(--cream); }
.chips-row b { font: 800 17px var(--f-display); }
.chips-row .hot { background: var(--mint); color: #fff; }
.project-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; margin-top: 32px; align-items: start; }
.project-grid--flip > :first-child { order: 2; }
.inside h4, .rush h4 { font: 700 22px/1.2 var(--f-display); font-variation-settings: "SOFT" 100; margin-bottom: 14px; }
.ticks { display: grid; gap: 12px; margin-bottom: 22px; }
.ticks li { position: relative; padding-left: 32px; line-height: 1.5; font-size: 16px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; background: var(--ginger); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='16.2' rx='5.6' ry='4.6'/%3E%3Ccircle cx='5.8' cy='10.6' r='2.4'/%3E%3Ccircle cx='9.6' cy='6.4' r='2.4'/%3E%3Ccircle cx='14.4' cy='6.4' r='2.4'/%3E%3Ccircle cx='18.2' cy='10.6' r='2.4'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='16.2' rx='5.6' ry='4.6'/%3E%3Ccircle cx='5.8' cy='10.6' r='2.4'/%3E%3Ccircle cx='9.6' cy='6.4' r='2.4'/%3E%3Ccircle cx='14.4' cy='6.4' r='2.4'/%3E%3Ccircle cx='18.2' cy='10.6' r='2.4'/%3E%3C/svg%3E") center / contain no-repeat; transform: rotate(-12deg); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font: 600 13px var(--f-mono); padding: 6px 11px; border-radius: 8px; background: var(--ink); color: var(--cream); transition: transform .25s var(--bounce), background .2s; }
.tags li:hover { transform: rotate(-4deg) scale(1.08); background: var(--ginger); }

/* The Great Box Rush */
.rush { background: var(--cream); border: 2.5px solid var(--ink); border-radius: 18px; padding: 20px; }
.rush-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.rush-head h4 { margin-bottom: 2px; }
.rush-head .muted { font-size: 14px; }
.seg { display: inline-flex; border: 2.5px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--card); }
.seg button { border: 0; background: transparent; padding: 8px 14px; font-weight: 700; font-size: 14px; cursor: pointer; transition: background .2s, color .2s; white-space: nowrap; }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--cream); }
.seg--big button { padding: 11px 18px; font-size: 15px; }
.boxes { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px 4px; }
.box { position: relative; aspect-ratio: 60 / 52; margin-top: 10px; }
.box svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.box .cat { transform-box: fill-box; transform-origin: 50% 100%; transform: translateY(16px); opacity: 0; transition: transform .35s var(--bounce), opacity .15s; }
.box .cat2 { transform: translate(8px, 16px); }
.box.one .cat1, .box.two .cat1 { transform: none; opacity: 1; }
.box.two .cat1 { transform: translateX(-8px) rotate(-10deg); }
.box.two .cat2 { transform: translateX(8px) rotate(10deg); opacity: 1; }
.box.two .front { fill: var(--pink-deep); }
.box.two { animation: hiss .4s; }
@keyframes hiss { 25% { transform: translateX(-3px) rotate(-3deg); } 75% { transform: translateX(3px) rotate(3deg); } }
.box.locked::after { content: "🔒"; position: absolute; top: -12px; right: -6px; font-size: 13px; animation: lockpop .3s var(--bounce); }
@keyframes lockpop { from { transform: scale(0); } }
.rush-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.rush-stats div { background: var(--card); border: 2px solid var(--ink); border-radius: 12px; padding: 8px 12px; }
.rush-stats span { display: block; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.rush-stats b { font: 800 30px/1.1 var(--f-display); font-variation-settings: "SOFT" 100; font-variant-numeric: tabular-nums; }
.rush-stats .neg b { color: var(--pink-deep); }
.rush-stats .hiss b { color: var(--pink-deep); }
.rush-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; }
.rush-foot p { font: 600 15px/1.4 var(--f-body); min-height: 2.8em; display: flex; align-items: center; }
.rush-foot p.bad { color: var(--pink-deep); }
.rush-foot p.good { color: var(--mint); }
.rush-foot .btn { flex: none; }
.rush-note { font-size: 13px; color: var(--ink-faint); margin-top: 10px; }

/* terminal + loaf cat */
.term-wrap { position: relative; padding-top: 70px; }
.loaf { position: absolute; top: 0; right: 36px; width: 170px; height: auto; z-index: 2; overflow: visible; }
.loaf-tail { transform-origin: 166px 80px; animation: swish 2.6s ease-in-out infinite; }
.zzz { font: 700 16px var(--f-hand); fill: var(--ink-soft); animation: zzz 2.4s ease-in-out infinite; }
.zzz.z2 { animation-delay: 1.2s; font-size: 12px; }
@keyframes zzz { 0% { opacity: 0; transform: translate(0, 6px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(8px, -10px); } }
.term { background: #1c1714; border: 2.5px solid var(--ink); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #2a231f; color: #9a8f84; font: 500 12px var(--f-mono); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #504741; }
.term-bar i:nth-child(1) { background: #ff5f57; } .term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 8px; }
.term-body { margin: 0; padding: 18px; min-height: 360px; font: 400 13.5px/1.65 var(--f-mono); color: #f3e9dc; white-space: pre-wrap; word-break: break-word; }
.term-body .p { color: #ffb27a; }
.term-body .dim { color: #a79c90; }
.term-body .ok { color: #7ee0a4; }
.term-body .cur { display: inline-block; width: .6em; height: 1.1em; background: #f3e9dc; vertical-align: -.2em; animation: blinkc 1s steps(1) infinite; }
@keyframes blinkc { 50% { opacity: 0; } }
.term-note { margin-top: 14px; text-align: right; transform: rotate(-1.5deg); }

/* ─────────── Skills ─────────── */
.skills-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 40px; }
.skills-head .section-title { margin-bottom: 0; }
.skill-groups { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 24px; }
.skill-group h3 { font: 700 22px/1.2 var(--f-display); font-variation-settings: "SOFT" 100; margin-bottom: 16px; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-chips li {
  padding: 9px 15px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--cream);
  font-weight: 700; font-size: 15px; box-shadow: 2px 2px 0 var(--ink);
  transition: transform .45s var(--bounce), background .2s, box-shadow .2s;
  transition-delay: calc(var(--i, 0) * 25ms);
}
.skill-chips li:hover { background: var(--ginger); color: #fff; transform: translateY(-3px) rotate(-2deg); box-shadow: 3px 5px 0 var(--ink); }
.flipping .skill-chips li, .flipping h3 { transform: rotateX(90deg); }
.skill-group h3 { transition: transform .4s var(--bounce); }
.cat-mode .skill-chips li { background: #fff0f4; border-style: dashed; }
.cat-mode .skill-group { background: #fffaf4; }

.board { margin-top: 72px; }
.board-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.board-title { font: 800 34px/1.1 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.02em; }
.polaroids { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.polaroid { background: #fff; border: 2.5px solid var(--ink); padding: 14px 14px 18px; box-shadow: var(--shadow); border-radius: 6px; transition: transform .5s var(--bounce); }
.polaroid:nth-child(1) { --rot: -3deg; } .polaroid:nth-child(2) { --rot: 2deg; margin-top: 20px; } .polaroid:nth-child(3) { --rot: -1.5deg; }
.polaroid.in { transform: rotate(var(--rot)); }
.polaroid:hover { transform: rotate(0) scale(1.04); z-index: 2; }
.polaroid .catpic-frame { aspect-ratio: 1; min-height: 0; border-radius: 3px; }
.polaroid figcaption { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; }
.polaroid figcaption b { font: 700 18px var(--f-display); }
.polaroid .doodle { font-size: 21px; color: var(--ginger-deep); }

/* ─────────── Stats ─────────── */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.stat { transition: transform .35s var(--bounce), box-shadow .35s var(--bounce), opacity .7s; }
.stat:hover { transform: translate(-3px, -3px) rotate(-1.2deg); box-shadow: 9px 9px 0 var(--ink); }
.stat-num { font: 900 46px/1 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.03em; margin-bottom: 14px; }
.stat-what { font-weight: 800; }
.stat .muted { font-size: 15px; margin-top: 4px; }
.stat--ginger { background: var(--ginger); color: #fff; }
.stat--ginger .muted { color: rgba(255, 255, 255, .85); }
.stats-note { margin-top: 26px; text-align: center; transform: rotate(-1deg); }

/* ─────────── Contact ─────────── */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; padding: 40px; margin-bottom: 110px; }
.contact-lede { font-size: 19px; line-height: 1.55; max-width: 40ch; }
.big-mail { display: inline-block; margin-top: 22px; font: 800 clamp(24px, 3vw, 34px)/1.1 var(--f-display); font-variation-settings: "SOFT" 100; text-decoration: none; word-break: break-all; background: linear-gradient(var(--ginger), var(--ginger)) left 92% / 100% 6px no-repeat; transition: color .2s; }
.big-mail:hover { color: var(--ginger-deep); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.social { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 2.5px solid var(--ink); border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; background: var(--cream); transition: transform .25s var(--bounce), background .2s, color .2s; }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.social:hover { background: var(--ink); color: var(--cream); transform: translateY(-3px) rotate(-2deg); }
.mail-form { display: grid; gap: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mail-form label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.mail-form input, .mail-form textarea { width: 100%; font: 400 16px/1.4 var(--f-body); color: var(--ink); background: var(--cream); border: 2.5px solid var(--ink); border-radius: 14px; padding: 12px 14px; resize: vertical; transition: box-shadow .2s, background .2s; }
.mail-form input:focus, .mail-form textarea:focus { outline: none; background: #fff; box-shadow: 4px 4px 0 var(--ginger); }
.mail-form .invalid { border-color: var(--pink-deep); background: #fff0f4; }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-note { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.form-note.err { color: var(--pink-deep); }
.send-wrap { position: relative; display: inline-block; }
.send-paw { position: absolute; left: 50%; bottom: -8px; width: 34px; height: 34px; fill: var(--ginger); transform: translate(-50%, 0) rotate(8deg); opacity: 0; transition: transform .35s var(--bounce), opacity .2s; z-index: 2; pointer-events: none; }
.send-wrap:hover .send-paw { transform: translate(-50%, -30px) rotate(-8deg); opacity: 1; }
.send-wrap .btn { position: relative; z-index: 1; }

/* ─────────── Footer ─────────── */
.footer { background: var(--ink); color: var(--cream); padding: 64px 0 40px; text-align: center; border-top: 2.5px solid var(--ink); }
.foot-inner { display: flex; flex-direction: column; align-items: center; }
.curl { width: 150px; height: auto; margin-bottom: 18px; overflow: visible; }
.curl .zzz { fill: var(--cream); }
.foot-name { font: 800 clamp(44px, 7vw, 80px)/1 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.03em; }
.foot-sub { color: #cbbfb2; margin-top: 8px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 26px 0; }
.foot-links a { display: block; padding: 8px 16px; border: 2px solid #5d534b; border-radius: 999px; text-decoration: none; font-weight: 700; transition: background .2s, border-color .2s, color .2s; }
.foot-links a:hover { background: var(--ginger); border-color: var(--ginger); color: #fff; }
.foot-fine { font-size: 14px; color: #a79c90; }
kbd { font: 600 13px var(--f-mono); background: #3a322d; color: var(--cream); padding: 2px 7px; border-radius: 6px; border-bottom: 2px solid #15110f; }

/* ─────────── Floating: cat break, modal, peek, paws, rain ─────────── */
.cat-break {
  position: fixed; right: 20px; bottom: 20px; z-index: 150;
  display: flex; align-items: center; gap: 8px; padding: 10px 16px 10px 10px;
  border: 2.5px solid var(--ink); border-radius: 999px; background: var(--pink); color: var(--ink);
  font-weight: 800; font-size: 15px; cursor: pointer; box-shadow: 4px 4px 0 var(--ink);
  transition: transform .3s var(--bounce), box-shadow .3s var(--bounce);
  animation: nudge 6s ease-in-out 4s infinite;
}
.cat-break svg { width: 34px; height: 30px; color: #fff; }
.cat-break:hover { transform: translate(-2px, -3px) rotate(-3deg); box-shadow: 6px 7px 0 var(--ink); animation: none; }
@keyframes nudge { 0%, 88%, 100% { transform: none; } 91% { transform: rotate(-6deg); } 94% { transform: rotate(6deg); } 97% { transform: rotate(-3deg); } }

.gif-modal { border: 2.5px solid var(--ink); border-radius: 26px; padding: 0; background: var(--card); color: var(--ink); box-shadow: 10px 10px 0 var(--ink); width: min(92vw, 480px); overflow: visible; }
.gif-modal::backdrop { background: rgba(34, 28, 24, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.gif-modal[open] { animation: modal .45s var(--bounce); }
@keyframes modal { from { transform: scale(.7) rotate(-4deg); opacity: 0; } }
.gif-inner { padding: 24px; }
.gif-frame { position: relative; aspect-ratio: 4 / 3; border: 2.5px solid var(--ink); border-radius: 16px; overflow: hidden; background: linear-gradient(100deg, var(--cream-2) 30%, #fff5e8 50%, var(--cream-2) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
.gif-frame.loaded { animation: none; background: #1c1714; }
.gif-frame img { width: 100%; height: 100%; object-fit: contain; }
.gif-frame img:not([src]) { visibility: hidden; }
.gif-modal .doodle { margin: 14px 0 18px; text-align: center; color: var(--ginger-deep); }
.gif-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.peek { position: fixed; left: 34px; bottom: -8px; z-index: 140; width: 110px; pointer-events: none; transform: translateY(calc(100% + 60px)); transition: transform .6s var(--bounce); }
.peek.show { transform: translateY(18%); }
.peek-bubble { position: absolute; top: -40px; left: 70px; background: var(--card); border: 2.5px solid var(--ink); border-radius: 14px; padding: 4px 10px; font: 700 20px var(--f-hand); white-space: nowrap; }

.pawprint { position: fixed; z-index: 90; width: 16px; height: 16px; pointer-events: none; fill: var(--ginger); opacity: .55; animation: pawfade 1.3s ease-out forwards; }
@keyframes pawfade { to { opacity: 0; transform: var(--t) scale(.6); } }
.raincat { position: fixed; top: -60px; z-index: 500; pointer-events: none; font-size: 40px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(calc(100vh + 120px)) rotate(var(--spin)); } }

/* ─────────── Responsive ─────────── */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 40px; gap: 10px; }
  .hero-cat { order: -1; max-width: 360px; margin: 0 auto; width: 100%; }
  .bento { grid-template-columns: 1fr 1fr; }
  .card--wide { grid-column: span 2; }
  .card--photo { grid-row: span 1; }
  .lc-card { grid-template-columns: 1fr; gap: 30px; }
  .project-grid, .project-grid--flip { grid-template-columns: 1fr; }
  .project-grid--flip > :first-child { order: 0; }
  .stats { grid-template-columns: 1fr 1fr; }
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; --r: 18px; --shadow: 4px 4px 0 var(--ink); }
  body { font-size: 16px; }
  .nav-inner { height: 62px; gap: 10px; }
  .nav-inner > nav, .nav-cta { display: none; }
  .burger { display: block; }
  .mobile-menu {
    display: block; position: absolute; top: 100%; left: 0; right: 0; z-index: -1;
    padding: 14px var(--gutter) 22px; background: var(--cream);
    border-bottom: 2.5px solid var(--ink); box-shadow: 0 14px 0 rgba(34, 28, 24, .08);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform .35s var(--bounce), opacity .2s, visibility 0s .35s;
  }
  .nav.open .mobile-menu { transform: none; opacity: 1; visibility: visible; transition: transform .35s var(--bounce), opacity .2s; }
  .mobile-menu ul { display: grid; margin-bottom: 18px; }
  .mobile-menu li + li { border-top: 2px dashed var(--line); }
  .mobile-menu ul a { display: flex; align-items: center; justify-content: space-between; padding: 13px 4px; text-decoration: none; font: 800 27px/1.1 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.02em; }
  .mobile-menu ul a::after { content: "→"; font: 700 20px var(--f-body); color: var(--ink-faint); transition: transform .25s var(--bounce), color .2s; }
  .mobile-menu ul a:active::after, .mobile-menu ul a.active::after { color: var(--ginger); transform: translateX(4px); }
  .mobile-menu ul a.active { color: var(--ginger-deep); }
  .mobile-menu .btn { width: 100%; }
  .nav.open .mobile-menu li { animation: menuIn .4s var(--bounce) both; }
  .nav.open .mobile-menu li:nth-child(2) { animation-delay: .04s; } .nav.open .mobile-menu li:nth-child(3) { animation-delay: .08s; } .nav.open .mobile-menu li:nth-child(4) { animation-delay: .12s; }
  .hero-cat { max-width: 280px; }
  .bubble { font-size: 21px; padding: 8px 12px; left: -8px; }
  .hero-title { margin: 16px 0; }
  .mini-stats { grid-template-columns: 1fr 1fr; gap: 16px 20px; }
  .cta-row .btn { flex: 1 1 auto; }
  .section { padding-top: 88px; }
  .section-title { margin-bottom: 28px; }
  .card { padding: 20px; }
  .bento { grid-template-columns: 1fr; gap: 18px; }
  .card--wide { grid-column: auto; }
  .catpic-frame { min-height: 220px; }
  .lc-card, .project, .contact { padding: 22px; }
  .paws { gap: 2px; }
  .boxes { grid-template-columns: repeat(10, 1fr); gap: 4px 2px; }
  .rush { padding: 14px; }
  .rush-stats b { font-size: 24px; }
  .rush-stats span { font-size: 11px; }
  .rush-foot { flex-direction: column; align-items: stretch; }
  .term-body { font-size: 11.5px; min-height: 320px; padding: 14px; }
  .loaf { width: 130px; right: 16px; }
  .term-wrap { padding-top: 54px; }
  .skill-groups { grid-template-columns: 1fr; gap: 18px; }
  .polaroids { grid-template-columns: 1fr; gap: 26px; max-width: 340px; margin: 0 auto; }
  .polaroid:nth-child(2) { margin-top: 0; }
  .stats { gap: 14px; }
  .stat-num { font-size: 34px; }
  .row2 { grid-template-columns: 1fr; }
  .cat-break span { display: none; }
  .cat-break { padding: 8px; right: 14px; bottom: 14px; }
  .peek { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .reveal, .pop, .hero-title .bounce, .hero-cat, .paws i, .bar i { opacity: 1 !important; transform: none !important; }
}

@keyframes menuIn { from { opacity: 0; transform: translateX(-14px); } }
