:root {
  --paper: #f3ead6;
  --ink: #1b1410;
  --muted: #6b5a4a;
  --rust: #c45a22;
  --yellow: #e6c21a;
  --line: #d7c7ad;
  --dobe-black: #161616;
  --dobe-rust: #c45a22;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Shippori Antique B1", "Yu Mincho", serif;
}

body {
  min-height: 100vh;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 22px 64px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 22px 0 10px;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.top nav {
  display: flex;
  gap: 16px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
}

.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--ink); }

.cat {
  width: 18px;
  height: 14px;
  position: relative;
  display: inline-block;
  background: #c47a2a;
  border-radius: 7px 8px 6px 6px;
}
.cat::before,
.cat::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 6px;
  height: 8px;
  background: #c47a2a;
  border-radius: 2px 4px 0 0;
}
.cat::before { left: 2px; transform: rotate(-12deg); }
.cat::after { right: 2px; transform: rotate(12deg); }

.hero { padding: 36px 0 8px; max-width: 34rem; }
.kicker {
  margin: 0 0 10px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--rust);
  text-transform: lowercase;
}
h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1.25;
  font-weight: 400;
}
.lead {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.75;
}
.poke {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 600 13px/1 "IBM Plex Mono", ui-monospace, monospace;
  padding: 10px 14px;
  cursor: pointer;
}
.poke:hover { background: var(--ink); color: var(--paper); }

.stage {
  position: relative;
  height: 220px;
  margin: 10px 0 48px;
  cursor: pointer;
}
.ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 42px;
  height: 2px;
  background: var(--ink);
}
.ground::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 8px;
  height: 1px;
  background: var(--line);
}
.caption {
  position: absolute;
  left: 0;
  bottom: 0;
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--muted);
}

.notes, .works { margin: 0 0 48px; }
h2 {
  margin: 0 0 16px;
  font-size: 13px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--rust);
}

.notes ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.notes li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.notes li:last-child { border-bottom: 1px solid var(--line); }
.notes b { font-weight: 400; }
.notes span { color: var(--muted); }

.work {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 4px 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.work:last-child { border-bottom: 1px solid var(--line); }
.work em {
  grid-row: span 2;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-style: normal;
  color: var(--rust);
  padding-top: 4px;
}
.work strong { font-size: 20px; font-weight: 400; }
.work span { color: var(--muted); font-size: 14px; }
.work:hover strong { text-decoration: underline; }

footer {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--muted);
}

.dobe {
  position: absolute;
  left: 8%;
  bottom: 52px;
  width: 88px;
  height: 64px;
  transform-origin: 50% 80%;
}
.dobe--hero { transform: scale(2.15); transform-origin: left bottom; }
.dobe-shadow {
  position: absolute;
  left: 18px;
  bottom: 2px;
  width: 52px;
  height: 8px;
  border-radius: 50%;
  background: rgba(27, 20, 16, 0.22);
}
.dobe-body {
  position: absolute;
  left: 22px;
  bottom: 16px;
  width: 40px;
  height: 22px;
  background: var(--dobe-black);
  border-radius: 14px 18px 12px 10px;
}
.dobe-body::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 3px;
  width: 10px;
  height: 8px;
  background: var(--dobe-rust);
  border-radius: 40%;
}
.dobe-neck {
  position: absolute;
  left: 50px;
  bottom: 28px;
  width: 14px;
  height: 16px;
  background: var(--dobe-black);
  border-radius: 6px;
  transform: rotate(18deg);
}
.dobe-collar {
  position: absolute;
  left: 52px;
  bottom: 32px;
  width: 16px;
  height: 5px;
  background: var(--yellow);
  border-radius: 2px;
  z-index: 2;
}
.dobe-head {
  position: absolute;
  left: 58px;
  bottom: 34px;
  width: 22px;
  height: 18px;
  transform-origin: 20% 80%;
}
.dobe-head::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 16px;
  height: 16px;
  background: var(--dobe-black);
  border-radius: 8px 10px 6px 8px;
}
.dobe-ear {
  position: absolute;
  top: -8px;
  width: 7px;
  height: 14px;
  background: var(--dobe-black);
  border-radius: 2px 6px 0 0;
  transform-origin: 50% 100%;
}
.dobe-ear.l { left: 1px; transform: rotate(-8deg); }
.dobe-ear.r { left: 9px; transform: rotate(10deg); }
.dobe-ear::after {
  content: "";
  position: absolute;
  inset: 3px 1px 2px 2px;
  background: var(--dobe-rust);
  border-radius: 1px 4px 0 0;
}
.dobe-muzzle {
  position: absolute;
  left: 12px;
  bottom: 1px;
  width: 14px;
  height: 8px;
  background: var(--dobe-rust);
  border-radius: 0 8px 6px 4px;
  z-index: 1;
}
.dobe-eye {
  position: absolute;
  left: 7px;
  top: 5px;
  width: 4px;
  height: 4px;
  background: var(--yellow);
  border-radius: 50%;
  box-shadow: 5px 0 0 var(--yellow);
  z-index: 2;
}
.dobe-nose {
  position: absolute;
  left: 22px;
  bottom: 5px;
  width: 5px;
  height: 4px;
  background: #0b0b0b;
  border-radius: 50%;
  z-index: 2;
}
.dobe-tail {
  position: absolute;
  left: 16px;
  bottom: 28px;
  width: 16px;
  height: 6px;
  background: var(--dobe-black);
  border-radius: 6px 2px 2px 8px;
  transform-origin: 100% 50%;
  transform: rotate(-28deg);
}
.dobe-fore, .dobe-hind {
  position: absolute;
  width: 7px;
  background: var(--dobe-black);
  border-radius: 3px 3px 2px 2px;
}
.dobe-fore { bottom: 8px; height: 18px; }
.dobe-fore.l { left: 46px; }
.dobe-fore.r { left: 54px; }
.dobe-hind { bottom: 8px; height: 16px; }
.dobe-hind.l { left: 26px; }
.dobe-hind.r { left: 34px; }
.dobe-fore::after, .dobe-hind::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 8px;
  height: 5px;
  background: var(--dobe-rust);
  border-radius: 0 0 3px 2px;
}

.dobe[data-mood="alert"] .dobe-head { animation: dobe-tilt 3.6s ease-in-out infinite; }
.dobe[data-mood="alert"] .dobe-ear.l { animation: dobe-ear 2.8s ease-in-out infinite; }
.dobe[data-mood="sit"] .dobe-hind { height: 10px; border-radius: 8px 3px 2px 6px; }
.dobe[data-mood="sit"] .dobe-body { bottom: 14px; transform: rotate(-8deg); }
.dobe[data-mood="sit"] .dobe-tail { animation: dobe-wag 0.28s ease-in-out infinite alternate; }
.dobe[data-mood="sleep"] { transform: translateY(6px); }
.dobe--hero[data-mood="sleep"] { transform: scale(2.15) translateY(4px); }
.dobe[data-mood="sleep"] .dobe-body { transform: rotate(-16deg); bottom: 12px; }
.dobe[data-mood="sleep"] .dobe-head { transform: rotate(-18deg) translateY(4px); }
.dobe[data-mood="sleep"] .dobe-eye { height: 2px; border-radius: 2px; }
.dobe[data-mood="sleep"] .dobe-fore,
.dobe[data-mood="sleep"] .dobe-hind { height: 8px; }
.dobe.is-trot { animation: dobe-trot 0.7s ease; }
.dobe--hero.is-trot { animation: dobe-trot-hero 0.85s ease; }

@keyframes dobe-tilt {
  0%, 70%, 100% { transform: rotate(0); }
  78% { transform: rotate(-10deg); }
  86% { transform: rotate(6deg); }
}
@keyframes dobe-ear {
  0%, 82%, 100% { transform: rotate(-8deg); }
  88% { transform: rotate(-22deg); }
}
@keyframes dobe-wag {
  from { transform: rotate(-40deg); }
  to { transform: rotate(-8deg); }
}
@keyframes dobe-trot {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(6px) translateY(-3px); }
  50% { transform: translateX(10px); }
  75% { transform: translateX(4px) translateY(-2px); }
}
@keyframes dobe-trot-hero {
  0%, 100% { transform: scale(2.15) translateX(0); }
  25% { transform: scale(2.15) translateX(10px) translateY(-4px); }
  50% { transform: scale(2.15) translateX(18px); }
  75% { transform: scale(2.15) translateX(8px) translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .dobe, .dobe * { animation: none !important; }
}

@media (max-width: 640px) {
  .notes li { grid-template-columns: 1fr; gap: 4px; }
  .dobe--hero { transform: scale(1.7); }
  .dobe--hero[data-mood="sleep"] { transform: scale(1.7) translateY(4px); }
}
