:root {
  --ink: #241f1c;
  --ink-deep: #110c0a;
  --charcoal: #3a332e;
  --body: #514842;
  --mute: #81746b;
  --ash: #b7aaa1;
  --canvas: #fffdf9;
  --paper: #fff8ef;
  --soft: #fbf3e8;
  --card: #f3e9dc;
  --line: rgba(89, 55, 28, 0.14);
  --line-strong: #9d8878;
  --cat: #fff7ed;
  --cat-ink: #4a3930;
  --cat-blush: #efb0a2;
  --cat-accent: #cf765b;
  --max: 1040px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Berkeley Mono", "IBM Plex Mono", "JetBrains Mono", ui-monospace,
    SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  letter-spacing: 0;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 20% 8%, rgba(243, 233, 220, 0.56), transparent 28%),
    linear-gradient(180deg, #fffdf9 0%, #fffaf3 48%, #fffdf9 100%);
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

button {
  font: inherit;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 max(20px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.9);
  backdrop-filter: blur(10px);
}

.wordmark {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  transform: rotate(-1deg);
}

.wordmark::before {
  content: "[";
  color: var(--mute);
}

.wordmark::after {
  content: "]";
  color: var(--mute);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--body);
  font-weight: 500;
}

.nav-links a {
  text-decoration: none;
}

.quiet-button,
.text-button {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(255, 253, 249, 0.82);
  color: var(--ink);
  cursor: pointer;
  padding: 2px 12px;
}

.quiet-button:active,
.text-button:active,
.post-row:active {
  background: var(--card);
}

.shell {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 72px;
}

.shell:focus {
  outline: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: end;
  padding: 54px 0 76px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  position: relative;
}

.hero-copy::before {
  content: "";
  position: absolute;
  left: -18px;
  top: -24px;
  width: 92px;
  height: 92px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 248, 239, 0.68);
  z-index: -1;
}

.eyebrow,
.section-label,
.meta-line {
  color: var(--mute);
  font-size: 14px;
  line-height: 2;
}

.eyebrow::before,
.section-label::before {
  content: "[+] ";
  color: var(--ink);
  font-weight: 700;
}

.title {
  max-width: 760px;
  margin: 8px 0 18px;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 700;
  line-height: 1.16;
}

.title span {
  display: inline-block;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  transform: rotate(-1deg);
}

.title em {
  display: block;
  margin-top: 10px;
  color: var(--body);
  font-style: normal;
  font-weight: 500;
}

.intro {
  max-width: 680px;
  margin: 0;
  color: var(--body);
  font-size: 17px;
  line-height: 1.8;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 760px;
  margin-top: 30px;
}

.profile-item {
  min-height: 92px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 253, 249, 0.58);
}

.profile-label {
  display: block;
  color: var(--mute);
  font-size: 14px;
  line-height: 2;
}

.profile-value {
  display: block;
  color: var(--ink);
  font-weight: 700;
}

.motto {
  position: relative;
  max-width: 300px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 20px 20px;
  background: rgba(255, 248, 239, 0.88);
  transform: rotate(1deg);
}

.motto::before {
  content: "warm note";
  position: absolute;
  top: -14px;
  left: 12px;
  background: var(--paper);
  color: var(--mute);
  padding: 0 6px;
  font-size: 14px;
}

.motto p {
  margin: 0;
  font-weight: 700;
}

.motto small {
  display: block;
  margin-top: 10px;
  color: var(--mute);
  line-height: 1.8;
}

.motto-pin {
  position: absolute;
  right: 18px;
  top: 14px;
  width: 10px;
  height: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--cat-blush);
}

.cat-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(300px, 420px);
  gap: 42px;
  align-items: center;
  margin: 76px 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 76px;
}

.cat-orbit {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at 62% 24%, rgba(239, 176, 162, 0.24), transparent 18%),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    rgba(255, 248, 239, 0.76);
  background-size: auto, 34px 34px, 34px 34px, auto;
  cursor: crosshair;
}

.orbit-moon {
  position: absolute;
  right: 38px;
  top: 34px;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--canvas);
}

.orbit-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid var(--ink);
  background: var(--canvas);
  transform: translate(-50%, -50%);
}

.orbit-line {
  position: absolute;
  inset: 34px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
}

.cat-hint {
  max-width: 460px;
  color: var(--body);
}

.cat-hint p {
  margin: 8px 0 0;
}

.posts {
  padding-top: 8px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.section-heading p {
  max-width: 470px;
  margin: 0;
  color: var(--mute);
  font-size: 14px;
  line-height: 1.8;
}

.post-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 24px;
  width: 100%;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.64);
  color: inherit;
  cursor: pointer;
  padding: 18px 20px;
  text-align: left;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.post-row:first-child {
  border-top: 1px solid var(--line);
}

.post-row:hover {
  border-color: rgba(89, 55, 28, 0.28);
  background: var(--paper);
  transform: translateY(-1px);
}

.post-title {
  display: block;
  font-weight: 700;
}

.post-summary {
  display: block;
  margin-top: 6px;
  color: var(--body);
}

.post-date {
  color: var(--mute);
  font-size: 14px;
  line-height: 2;
  text-align: right;
}

.article {
  max-width: 760px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 249, 0.76);
  padding: 34px clamp(20px, 4vw, 54px) 56px;
}

.article-header {
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.article h1 {
  margin: 10px 0 18px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.25;
}

.article-body {
  padding-top: 48px;
}

.article-body h2 {
  margin: 44px 0 12px;
  font-size: 16px;
}

.article-body h2::before {
  content: "[+] ";
  color: var(--mute);
}

.article-body p {
  margin: 0 0 20px;
  color: var(--body);
  line-height: 1.9;
}

.article-body blockquote {
  margin: 32px 0;
  border-left: 1px solid var(--line-strong);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
}

.article-media {
  margin: 32px 0;
}

.article-media img,
.article-media video,
.article-media audio {
  display: block;
  width: 100%;
  max-height: 70vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  object-fit: contain;
}

.article-media audio {
  padding: 12px;
}

.article-media figcaption {
  margin-top: 8px;
  color: var(--mute);
  font-size: 14px;
  line-height: 1.7;
}

.inline-media {
  display: block;
  max-width: 100%;
  max-height: 52vh;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  object-fit: contain;
}

.article-body ul {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.article-body li {
  margin: 8px 0;
  color: var(--body);
}

.article-body li::before {
  content: "[x] ";
  color: var(--ink);
  font-weight: 700;
}

.backline {
  margin-bottom: 40px;
}

.desk-cat {
  --x: calc(100vw - 150px);
  --y: calc(100vh - 150px);
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30;
  width: 104px;
  height: 112px;
  border: 0;
  background: transparent;
  cursor: grab;
  transform: translate3d(var(--x), var(--y), 0);
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.desk-cat.is-dragging {
  cursor: grabbing;
  transition: none;
}

.desk-cat.is-pounced .cat-sprite {
  animation: pounce 420ms ease both;
}

.cat-sprite {
  position: absolute;
  left: 12px;
  bottom: 0;
  width: 78px;
  height: 82px;
  filter: drop-shadow(0 1px 0 rgba(15, 0, 0, 0.22));
}

.cat-head,
.cat-body,
.cat-ear,
.cat-tail,
.cat-paw {
  position: absolute;
  background: var(--cat);
  border: 2px solid var(--cat-ink);
}

.cat-head {
  left: 12px;
  top: 8px;
  width: 54px;
  height: 44px;
  border-radius: 4px;
}

.cat-ear {
  top: 0;
  width: 18px;
  height: 18px;
  transform: rotate(45deg);
}

.cat-ear.left {
  left: 16px;
}

.cat-ear.right {
  right: 14px;
}

.cat-eye {
  position: absolute;
  top: 18px;
  width: 5px;
  height: 9px;
  background: var(--cat-ink);
}

.cat-eye.left {
  left: 15px;
}

.cat-eye.right {
  right: 15px;
}

.cat-mouth {
  position: absolute;
  left: 24px;
  top: 29px;
  width: 7px;
  height: 5px;
  border-bottom: 2px solid var(--cat-accent);
}

.cat-body {
  left: 20px;
  top: 46px;
  width: 40px;
  height: 34px;
  border-radius: 4px;
}

.cat-tail {
  right: -24px;
  top: 6px;
  width: 28px;
  height: 12px;
  border-radius: 4px;
  transform-origin: 3px 6px;
  animation: tail 1.8s ease-in-out infinite;
}

.cat-paw {
  bottom: -8px;
  width: 12px;
  height: 12px;
}

.cat-paw.left {
  left: 5px;
}

.cat-paw.right {
  right: 5px;
}

.cat-bubble {
  position: absolute;
  left: -10px;
  top: 0;
  min-width: 54px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--canvas);
  color: var(--ink);
  opacity: 0;
  padding: 2px 8px;
  font-size: 14px;
  line-height: 2;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.desk-cat.is-talking .cat-bubble {
  opacity: 1;
  transform: translateY(0);
}

@keyframes tail {
  0%,
  100% {
    transform: rotate(12deg);
  }
  50% {
    transform: rotate(-8deg);
  }
}

@keyframes pounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  35% {
    transform: translateY(-18px) scale(1.04, 0.96);
  }
  70% {
    transform: translateY(2px) scale(0.98, 1.03);
  }
}

@media (max-width: 760px) {
  .site-nav {
    padding-inline: 20px;
  }

  .nav-links {
    gap: 10px;
  }

  .hero,
  .cat-panel,
  .post-row {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 32px;
    padding-bottom: 56px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .motto {
    max-width: none;
  }

  .cat-panel {
    margin: 56px 0;
    padding-bottom: 56px;
  }

  .post-date {
    text-align: left;
  }

  .desk-cat {
    width: 90px;
    height: 100px;
  }
}
