:root {
  --background: #f8f6f1;
  --ink: #30312e;
  --muted: #68685f;
  --purple: #71639d;
  --line: #deddd5;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 40px; }
body { margin: 0; color: var(--ink); background: var(--background); font: 16px/1.7 'Trebuchet MS', system-ui, sans-serif; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 3px solid var(--purple); outline-offset: 6px; }
img { max-width: 100%; display: block; }
header, main, footer { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
header { display: flex; justify-content: space-between; align-items: center; min-height: 94px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: bold; }
.brand img, .about-art img { image-rendering: pixelated; }
.brand span span { color: var(--purple); }
nav, .socials { display: flex; gap: 28px; flex-wrap: wrap; }
nav a, .socials a, footer a { transition: color .2s; }
nav a:hover, .socials a:hover, footer a:hover { color: var(--purple); }
h1, h2, h3 { font-weight: 500; line-height: 1.3; }
h1 { font-size: 32px; margin: 0 0 16px; letter-spacing: -.7px; }
h1 span { color: var(--purple); }
h2 { font-size: 26px; margin: 0 0 28px; letter-spacing: -.5px; }
h3 { font-size: 22px; margin: 0; display: flex; justify-content: space-between; gap: 12px; }
p { color: var(--muted); }
.hero { padding: 76px 0 72px; }
.hero p { margin: 0 0 26px; }
.button { display: inline-flex; gap: 25px; align-items: center; background: #e5def3; color: #514574; padding: 11px 22px; border-radius: 99px; transition: background .2s, transform .2s; }
.button:hover { background: #d9cfea; transform: translateY(-2px); }
#projects { padding: 40px 0 64px; border-top: 1px solid var(--line); }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project { background: #fffdf8; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.project:hover { transform: translateY(-5px); box-shadow: 0 12px 28px #30312e0c; }
.preview { aspect-ratio: 1.6; overflow: hidden; background: #efede5; border-bottom: 1px solid var(--line); }
.preview img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .3s; }
.project:hover .preview img { transform: scale(1.025); }
.project-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.project-body p { margin: 14px 0 24px; }
.visit { margin-top: auto; display: flex; justify-content: space-between; gap: 12px; color: var(--purple); }
#about { display: grid; grid-template-columns: 160px 1fr; align-items: center; gap: 48px; padding: 42px; background: #efede5; border-radius: 22px; margin-bottom: 64px; }
#about h2 { margin-bottom: 20px; }
#about p { margin: 0 0 18px; }
.about-art { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.socials { margin-top: 28px; }
footer { border-top: 1px solid var(--line); padding: 24px 0; display: flex; justify-content: space-between; gap: 20px; font-size: 14px; color: var(--muted); }
.skip { position: absolute; top: -100px; left: 20px; padding: 12px; background: white; z-index: 5; }
.skip:focus { top: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; }
  .reveal.visible { opacity: 1; transform: none; }
}
@media (max-width: 900px) {
  .projects { gap: 16px; }
  .project-body { padding: 18px; }
  #about { grid-template-columns: 120px 1fr; gap: 30px; padding: 32px; }
}
@media (max-width: 700px) {
  header, main, footer { width: calc(100% - 36px); }
  header { min-height: 80px; }
  nav { gap: 20px; }
  .hero { padding: 52px 0; }
  .projects { grid-template-columns: 1fr; gap: 24px; }
  .project-body { padding: 24px; }
  #projects { padding: 32px 0 48px; }
  #about { grid-template-columns: 1fr; gap: 24px; padding: 28px 24px; margin-bottom: 48px; }
  .about-art img { width: 96px; height: 96px; }
  .socials { gap: 24px; }
  footer { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

#cat { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 16px; }
#cat:focus-visible { outline: 3px solid var(--purple); outline-offset: 8px; }
#cat.jumping { animation: cat-jump .55s ease-in-out; }
@keyframes cat-jump {
  0%, 100% { transform: translateY(0); }
  20% { transform: translateY(3px) scale(1.04, .96); }
  50% { transform: translateY(-30px); }
  80% { transform: translateY(0) scale(1.03, .97); }
}

#meow-count { margin: 14px 0 0; color: var(--purple); font-size: 16px; }
#meow-count[hidden] { display: none; }
