:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #161616;
  --muted: #606570;
  --rule: #d9d9d9;
  --serif: "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; scrollbar-gutter: stable; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 5px; text-decoration-thickness: 1px; }
a:hover { color: var(--muted); }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; border-radius: 1px; }
::selection { background: #e7e7e7; color: #000; }
.page { width: min(1156px, calc(100% - 96px)); margin-inline: auto; }
.header { min-height: 94px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--rule); gap: 24px; }
.brand { font: 30px/1 var(--serif); text-decoration: none; }
nav { display: flex; gap: 36px; }
nav a { font-size: 16px; color: var(--muted); text-decoration: none; padding-block: 14px; }
nav a:hover { color: var(--ink); text-decoration: underline; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 44px; align-items: center; padding: 80px 0 68px; }
h1 { margin: 20px 0 20px; font: 400 clamp(64px, 8.8vw, 128px)/1.02 Georgia, var(--serif); letter-spacing: -0.055em; }
.bio { font-size: 23px; line-height: 1.5; color: #515661; margin: 0; }
.portrait { width: 270px; aspect-ratio: 1; position: relative; }
.portrait-fallback, .portrait-live { width: 100%; height: 100%; display: block; }
.portrait-live { position: absolute; inset: 0; visibility: hidden; }
.portrait.is-alive .portrait-live { visibility: visible; }
.portrait.is-alive .portrait-fallback { visibility: hidden; }
.pupil { transform: translate(var(--gaze-x, 0px), var(--gaze-y, 0px)); }
.eye-blink { transform-box: fill-box; transform-origin: center 45%; }
.is-blinking .eye-blink { animation: blink 190ms ease-in-out; }
.tongue { transform-origin: 627px 752px; transform: scaleY(0); transition: transform 160ms ease-out; }
.is-cheeky .tongue { transform: scaleY(1); }
@keyframes blink { 0%, 100% { transform: scaleY(1); } 45%, 55% { transform: scaleY(.07); } }

.info-row { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 44px; padding: 44px 0; border-top: 1px solid var(--rule); }
h2 { margin: 8px 0 0; font-size: 16px; line-height: 1.5; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
p { margin: 0; }
.statement { font: 400 39px/1.28 var(--serif); letter-spacing: -0.023em; }
.detail { margin-top: 18px; color: var(--muted); font-size: 20px; line-height: 1.6; }
.email { font: 25px/1.4 var(--serif); overflow-wrap: anywhere; }
address { font-style: normal; font-size: 18px; line-height: 1.6; color: var(--muted); margin-top: 12px; }
footer { border-top: 1px solid var(--rule); padding: 23px 0 30px; display: flex; justify-content: space-between; gap: 20px; font: 16px/1.5 var(--serif); color: #515661; }
.skip-link { position: absolute; top: 12px; left: 12px; padding: 12px; background: white; transform: translateY(-180%); z-index: 1; }
.skip-link:focus { transform: translateY(0); }
@media (max-width: 1100px) {
  .intro { grid-template-columns: minmax(0, 1fr) 200px; gap: 32px; }
  .portrait { width: 200px; }
  .bio { font-size: 19px; }
  .info-row { grid-template-columns: 170px minmax(0, 1fr); gap: 30px; }
  .statement { font-size: 32px; }
}
@media (max-width: 680px) {
  .page { width: calc(100% - 40px); }
  .header { min-height: 80px; gap: 16px; }
  .brand { font-size: 25px; }
  nav { gap: 16px; }
  nav a { font-size: 12px; }
  .intro { grid-template-columns: 1fr; gap: 22px; padding: 38px 0 40px; }
  .portrait { grid-row: 1; width: 120px; }
  h1 { font-size: clamp(48px, 11vw, 72px); margin: 0 0 20px; }
  .bio { font-size: 17px; line-height: 1.65; }
  .info-row { grid-template-columns: 1fr; gap: 20px; padding: 30px 0; }
  h2 { margin: 0; font-size: 12px; }
  .statement { font-size: 30px; }
  .detail, address { font-size: 16px; }
  .detail { margin-top: 14px; }
  .email { font-size: 23px; }
  footer { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 360px) {
  .header { gap: 12px; }
  .brand { font-size: 23px; }
  nav { gap: 10px; }
  nav a { font-size: 11px; }
}

/* The cat sits on the existing divider without adding layout height. */
.cat-track { position: relative; height: 0; }
/* The docked and roaming cat share the same paw-to-origin distance. */
.cat { --cat-ground-offset: 39px; position: absolute; left: 0; top: calc(0px - var(--cat-ground-offset)); width: 56px; height: 44px; padding: 0; border: 0; background: none; color: #000; cursor: pointer; transform: translateX(var(--cat-x, 0px)); z-index: 1; -webkit-tap-highlight-color: transparent; }
.cat[hidden] { display: none; }
.cat svg { display: block; width: 56px; height: 44px; overflow: visible; transform: scaleX(var(--cat-direction, 1)); }
.cat:focus-visible { outline: 1px dashed #606570; outline-offset: 3px; border-radius: 8px; }
/* Grounded feet and continuously reshaped body/tail share a single rig. */
.cat-legs { visibility: hidden; }
.cat-leg-back { transform-origin: 20px 26px; }
.cat-leg-front { transform-origin: 43px 25px; }
/* Click and return journeys render the same 620ms gait in cat-pose.js. */
@media (prefers-reduced-motion: reduce) {
  .tongue { transition: none; }
  .cat.is-running .cat-leg { animation: none; }
}

.cat { touch-action: none; user-select: none; -webkit-user-select: none; }
.cat.is-roaming { position: absolute; left: 0; top: 0; bottom: auto; z-index: 20; }
.cat.is-held { cursor: grabbing; }
.cat.is-jumping .cat-leg { animation: none; }
.cat-rig { transform-box: view-box; }

.cat-dragging, .cat-dragging * { user-select: none !important; -webkit-user-select: none !important; }

.cat.is-grounded .cat-leg { animation: none; }

.portrait-cat { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 600ms ease; }
.portrait.is-cat .portrait-cat { opacity: 1; }
.portrait-cat-ear { transform-box: view-box; }
.portrait-cat-ear-left { transform-origin: 430px 223px; }
.portrait-cat-ear-right { transform-origin: 821px 223px; }
.portrait.is-cat .portrait-cat-ear-left { animation: cat-ear-left 5.4s ease-in-out infinite; }
.portrait.is-cat .portrait-cat-ear-right { animation: cat-ear-right 7.1s ease-in-out infinite; }
@keyframes cat-ear-left { 0%, 30%, 46%, 100% { transform: rotate(0); } 35% { transform: rotate(-9deg); } 40% { transform: rotate(4deg); } 43% { transform: rotate(-3deg); } }
@keyframes cat-ear-right { 0%, 52%, 68%, 100% { transform: rotate(0); } 57% { transform: rotate(8deg); } 62% { transform: rotate(-4deg); } }
.cat-whisker { transform-box: view-box; }
.portrait.is-cat .cat-whisker-left { animation: cat-whisker-sway 3.8s ease-in-out infinite; }
.portrait.is-cat .cat-whisker-right { animation: cat-whisker-sway 4.4s ease-in-out infinite reverse; }
.portrait.is-cat .cat-whisker:nth-child(3n + 2) { animation-delay: -.45s; }
.portrait.is-cat .cat-whisker:nth-child(3n) { animation-delay: -.9s; }
@keyframes cat-whisker-sway { 0%, 100% { transform: rotate(-2deg); } 45% { transform: rotate(3deg); } 70% { transform: rotate(0deg); } }
.portrait.is-paused .portrait-cat-ear, .portrait.is-paused .cat-whisker { animation-play-state: paused; }
.cat.is-fusing { pointer-events: none; }
.cat-ear-button { position: absolute; top: 2%; width: 20%; height: 21%; min-width: 30px; min-height: 30px; border: 0; padding: 0; background: transparent; cursor: pointer; z-index: 2; }
.cat-ear-button-left { left: 25%; }
.cat-ear-button-right { left: 58%; }
.cat-ear-button:focus-visible { outline: 1px dashed var(--muted); outline-offset: 3px; border-radius: 50%; }
.photo-gallery { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: center; }
.photo-link { display: block; cursor: zoom-in; }
.photo-link img { display: block; width: 100%; height: auto; }
.photo-lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; padding: 64px 40px 76px; color: #fff; background: #141414; }
.photo-lightbox[open] { display: grid; place-items: center; }
.photo-lightbox::backdrop { background: #141414; }
.photo-full { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.photo-cat-stage { position: absolute; overflow: hidden; pointer-events: none; }
.photo-cat { position: absolute; left: 0; top: 0; width: 56px; height: 44px; transform-origin: 0 0; }
.photo-cat svg { display: block; width: 56px; height: 44px; overflow: visible; transform: scaleX(var(--cat-direction, 1)); }
.photo-lightbox button { background: transparent; border: 0; color: inherit; font: 14px var(--sans); cursor: pointer; padding: 12px; }
.photo-lightbox button:focus-visible { outline: 1px solid #fff; outline-offset: 3px; }
.photo-close { position: absolute; top: 14px; right: 24px; }
.photo-controls { position: absolute; bottom: 18px; left: 28px; right: 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.photo-counter { color: #bcbcbc; font-size: 13px; font-variant-numeric: tabular-nums; }
@media (max-width: 680px) {
  .photo-gallery { grid-template-columns: 1fr; gap: 22px; margin-top: 8px; }
  .photo-lightbox { padding: 60px 12px 76px; }
  .photo-close { right: 8px; }
  .photo-controls { left: 4px; right: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .portrait-cat { transition: none; }
  .portrait.is-cat .portrait-cat-ear, .portrait.is-cat .cat-whisker { animation: none; }
}
