:root {
  --bg: #110d0b;
  --bg-deep: #090605;
  --bg-panel: rgba(36, 26, 22, 0.8);
  --bg-panel-soft: rgba(58, 43, 36, 0.48);
  --line: rgba(233, 218, 201, 0.13);
  --line-strong: rgba(233, 218, 201, 0.26);
  --text: #f2e8da;
  --text-soft: #cdbda9;
  --text-faint: #9f8c78;
  --glow: rgba(217, 126, 82, 0.24);
  --glow-strong: rgba(217, 126, 82, 0.42);
  --paper: #efe4d2;
  --paper-shadow: #bda68f;
  --terminal: #8ef5b8;
  --terminal-dim: rgba(142, 245, 184, 0.32);
  --mist: rgba(242, 232, 218, 0.06);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(132, 76, 49, 0.24), transparent 24%),
    radial-gradient(circle at 84% 12%, rgba(109, 55, 33, 0.18), transparent 26%),
    radial-gradient(circle at 50% 115%, rgba(158, 97, 68, 0.2), transparent 32%),
    linear-gradient(180deg, #1a1310 0%, var(--bg) 42%, var(--bg-deep) 100%);
  color: var(--text);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  opacity: 0.32;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.018) 0,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px,
      transparent 3px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.012) 0,
      rgba(255, 255, 255, 0.012) 1px,
      transparent 1px,
      transparent 4px
    );
  mix-blend-mode: soft-light;
}

body::after {
  background:
    radial-gradient(circle at center, transparent 45%, rgba(0, 0, 0, 0.26) 100%);
}

a {
  color: inherit;
}

main,
footer {
  position: relative;
  z-index: 1;
}

.path-mark,
.eyebrow,
.room-kicker,
.room-meta,
.archive-meta,
.footer-meta,
.status-chip,
.back-link {
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.path-mark,
.eyebrow,
.archive-meta,
.footer-meta {
  color: var(--text-faint);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.4rem;
  color: var(--text-soft);
  text-decoration: none;
}

.back-link::before {
  content: "";
  width: 2.7rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242, 232, 218, 0.7));
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--text);
}

.house-page .house-stage {
  width: min(1220px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.house-lede {
  display: grid;
  gap: 0.85rem;
  padding: 1.5rem 1.25rem 2rem;
}

.house-whisper {
  max-width: 36rem;
  margin: 0;
  color: var(--text-soft);
  font-size: clamp(1.15rem, 1.9vw, 1.45rem);
  line-height: 1.45;
  font-family: var(--serif);
  font-style: italic;
}

.pulse-count,
.pulse-five {
  display: inline-block;
  color: rgba(255, 234, 205, 0.96);
  text-shadow: 0 0 0 transparent;
  animation: ember-pulse 2.4s ease-in-out infinite;
}

.house-frame {
  position: relative;
  padding: 1rem;
  border-radius: 2rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(74, 54, 44, 0.2), rgba(15, 11, 9, 0.45)),
    rgba(7, 5, 5, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 28px 80px rgba(0, 0, 0, 0.28);
}

.house-frame::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(242, 232, 218, 0.05);
  pointer-events: none;
}

.house-grid {
  position: relative;
  display: grid;
  --house-columns: 4;
  --house-row-step: 8rem;
  --house-gap: 1rem;
  grid-template-columns: repeat(var(--house-columns), minmax(0, 1fr));
  grid-auto-rows: minmax(var(--house-row-step), auto);
  grid-auto-flow: dense;
  gap: var(--house-gap);
  counter-reset: room-counter;
}

/* Mirror data-room-count into a CSS custom property so mobile fragment math
   is generic (authors only ever edit the data attribute). Extend the range
   if a house ever grows past eight rooms. */
.house-grid[data-room-count="1"] { --house-room-count: 1; }
.house-grid[data-room-count="2"] { --house-room-count: 2; }
.house-grid[data-room-count="3"] { --house-room-count: 3; }
.house-grid[data-room-count="4"] { --house-room-count: 4; }
.house-grid[data-room-count="5"] { --house-room-count: 5; }
.house-grid[data-room-count="6"] { --house-room-count: 6; }
.house-grid[data-room-count="7"] { --house-room-count: 7; }
.house-grid[data-room-count="8"] { --house-room-count: 8; }

.room {
  --room-col-span: 1;
  --room-row-span: 2;
  --room-copy-offset: 0rem;
  --room-min-height:
    calc(
      (var(--room-row-span) * var(--house-row-step)) +
      ((var(--room-row-span) - 1) * var(--house-gap))
  );
  position: relative;
  display: block;
  counter-increment: room-counter;
  grid-column: span var(--room-col-span);
  grid-row: span var(--room-row-span);
  min-height: var(--room-min-height);
  overflow: hidden;
  border-radius: 1.55rem;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 42%),
    rgba(18, 13, 11, 0.92);
  border: 1px solid rgba(242, 232, 218, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 16px 32px rgba(0, 0, 0, 0.22);
  transform: translateY(0) scale(1);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
  isolation: isolate;
}

.room-featured {
  --room-col-span: 2;
  --room-row-span: 3;
}

.room-wide {
  --room-col-span: 2;
}

.room-tall {
  --room-row-span: 3;
}

.room::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 22%, rgba(255, 255, 255, 0.08), transparent 24%),
    radial-gradient(circle at 82% 14%, rgba(255, 255, 255, 0.04), transparent 20%);
  opacity: 0.5;
  z-index: 0;
}

.room:hover,
.room:focus-visible,
.room.is-active {
  transform: translateY(-0.25rem) scale(1.012);
  border-color: rgba(242, 232, 218, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 0 1px rgba(217, 126, 82, 0.12),
    0 24px 52px rgba(0, 0, 0, 0.32),
    0 0 42px rgba(217, 126, 82, 0.18);
}

.room:focus-visible {
  outline: 2px solid rgba(242, 232, 218, 0.55);
  outline-offset: 3px;
}

.room-visual,
.room-copy {
  position: absolute;
  inset: 0;
}

.room-visual {
  z-index: 1;
}

.room-copy {
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.7rem;
  padding: 1.2rem;
  background:
    linear-gradient(180deg, transparent 16%, rgba(9, 6, 5, 0.16) 46%, rgba(9, 6, 5, 0.92) 100%);
  opacity: 0;
  transform: translateY(0.8rem);
  transition: opacity 220ms ease, transform 220ms ease;
}

.room:hover .room-copy,
.room:focus-visible .room-copy,
.room.is-active .room-copy {
  opacity: 1;
  transform: translateY(0);
}

.room-kicker {
  margin: 0;
  color: var(--text-faint);
}

.room-number::before {
  content: counter(room-counter, decimal-leading-zero);
}

.room h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 0.94;
  font-style: italic;
  font-weight: 500;
}

.room p {
  margin: 0;
  max-width: 22rem;
  color: var(--text-soft);
  line-height: 1.55;
  font-size: 0.96rem;
}

.room-meta {
  color: rgba(242, 232, 218, 0.82);
}

.house-footer {
  display: block;
  padding: 1.5rem 1.25rem 0;
}

.house-footer-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: baseline;
  margin: 0;
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  font-style: italic;
}

.house-footer-line a {
  color: inherit;
  text-decoration: none;
}

.house-footer-line a:hover,
.house-footer-line a:focus-visible {
  color: var(--text);
}

.writing-house .house-stage {
  position: relative;
}

.writing-house .room-copy {
  opacity: 1;
  transform: translateY(var(--room-copy-offset));
}

/* Desktop puzzle layout: each .room declares its grid cell via inline custom
   properties (--desk-col-start/--desk-col-span/--desk-row-start/--desk-row-span)
   and the parent .house-grid declares the total grid dimensions
   (--desk-grid-cols, --desk-grid-rows). The seal-fragment background is
   derived from those so each tile shows its quadrant of a single image that
   is notionally stretched across the whole grid. No per-room CSS needed. */
@media (min-width: 1101px) {
  .house-grid {
    --house-columns: var(--desk-grid-cols, 12);
    --house-row-step: 5.6rem;
    grid-template-columns: repeat(var(--house-columns), minmax(0, 1fr));
    grid-auto-rows: minmax(var(--house-row-step), auto);
  }

  .house-grid .room {
    grid-column: var(--desk-col-start, auto) / span var(--desk-col-span, var(--room-col-span));
    grid-row: var(--desk-row-start, auto) / span var(--desk-row-span, var(--room-row-span));
    min-height: var(--desk-min-height, var(--room-min-height));
  }

  .writing-house .house-grid .room {
    --bg-w: calc(var(--desk-grid-cols, 12) / var(--desk-col-span) * 100%);
    --bg-h: calc(var(--desk-grid-rows, 1) / var(--desk-row-span) * 100%);
    --bg-left: calc((1 - var(--desk-col-start)) / var(--desk-col-span) * 100%);
    --bg-top: calc((1 - var(--desk-row-start)) / var(--desk-row-span) * 100%);
  }
}

@media (prefers-reduced-motion: no-preference) and (min-width: 1101px) {
  .writing-house .house-grid {
    transition: gap 0.7s cubic-bezier(0.7, 0, 0.2, 1);
  }

  .writing-house .house-frame:hover .house-grid {
    gap: 0;
  }

  .writing-house .room {
    transition:
      transform 220ms ease,
      box-shadow 0.6s ease,
      border-color 0.6s ease,
      border-radius 0.6s ease;
  }

  .writing-house .house-frame:hover .room {
    border-color: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .writing-house .house-frame:hover .room::before {
    filter: saturate(1.02) brightness(1) contrast(1.08);
  }

  .writing-house .house-frame:hover .room::after {
    background: linear-gradient(180deg, transparent 65%, rgba(9, 6, 5, 0.2) 100%);
  }

  .writing-house .room-copy {
    transition: opacity 0.5s ease;
  }

  .writing-house .house-frame:hover .room-copy {
    opacity: 0;
  }

  .writing-house .room:hover .room-copy,
  .writing-house .room:focus-visible .room-copy {
    opacity: 1;
  }
}

.writing-house .mobile-hero {
  display: none;
}

.writing-house .room.is-writing-focus {
  border-color: rgba(242, 232, 218, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 0 1px rgba(217, 126, 82, 0.12),
    0 18px 42px rgba(0, 0, 0, 0.3),
    0 0 34px rgba(217, 126, 82, 0.14);
}

.writing-house .room:hover .room-kicker,
.writing-house .room:hover .room-meta,
.writing-house .room:focus-visible .room-kicker,
.writing-house .room:focus-visible .room-meta {
  color: rgba(242, 232, 218, 0.9);
}

.writing-house .room::before {
  content: "";
  position: absolute;
  top: var(--bg-top, 0);
  left: var(--bg-left, 0);
  width: var(--bg-w, 100%);
  height: var(--bg-h, 100%);
  background-image: url("img/bic-seal.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  filter: saturate(0.9) brightness(0.84) contrast(1.04);
  z-index: 1;
  transition: filter 0.6s ease;
  pointer-events: none;
}

.small-tools-house .room::before {
  background-image: url("img/04_circuitboard.png");
}

.writing-house .room::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(10, 6, 6, 0.02) 0%,
    rgba(10, 6, 6, 0.06) 40%,
    rgba(9, 6, 5, 0.45) 100%
  );
  transition: background 0.6s ease;
  pointer-events: none;
}

.writing-house .room-copy {
  z-index: 3;
}

/* Below 1100px the seal fragments across vertical cards; stack and reveal
   must activate together so the bands reassemble top-to-bottom. Featured
   card keeps a taller min-height so the editorial hierarchy survives in
   the single-column stack. */
@media (max-width: 1100px) {
  .writing-house .house-grid {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
  }

  .writing-house .room {
    min-height: 11rem;
  }

  .writing-house .room-featured {
    min-height: 14rem;
  }

  /* Seal fragments stacked top-to-bottom: N rooms show N bands covering the
     center 80% of the seal image. Each room's --room-index (0..N-1) and the
     grid's --house-room-count drive both the image scale and the slice
     position, so adding a room is purely an HTML change. */
  .writing-house .room::before {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: auto calc(var(--house-room-count, 4) * 125%);
    background-position-x: center;
    background-position-y: calc(
      50% * (var(--house-room-count, 4) + 8 * var(--room-index, 0)) /
      (5 * var(--house-room-count, 4) - 4)
    );
    filter: saturate(1.3) brightness(1.65) contrast(1.22);
  }

  .writing-house .room::after {
    background: linear-gradient(
      180deg,
      rgba(9, 6, 5, 0.02) 0%,
      rgba(9, 6, 5, 0.1) 50%,
      rgba(9, 6, 5, 0.55) 100%
    );
  }
}

@keyframes ember-pulse {
  0%,
  100% {
    opacity: 1;
    text-shadow: 0 0 0 rgba(217, 126, 82, 0);
  }
  50% {
    opacity: 0.82;
    text-shadow: 0 0 14px rgba(217, 126, 82, 0.35);
  }
}

.archive-page .archive-shell {
  width: min(1080px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2.2rem 0 4rem;
}

.archive-head {
  display: grid;
  gap: 0.95rem;
  padding: 0.6rem 0 2.5rem;
}

.sentence {
  margin: 0;
  max-width: 44rem;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.95;
  font-weight: 500;
  font-style: italic;
}

.archive-intro {
  max-width: 40rem;
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
  font-size: 1rem;
}

.archive-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.8fr);
  gap: 1rem;
}

.archive-panel,
.essay-feature,
.essay-stack {
  position: relative;
  padding: 1.4rem;
  border-radius: 1.65rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 45%),
    rgba(20, 15, 13, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 20px 46px rgba(0, 0, 0, 0.22);
}

.archive-panel-wide {
  grid-column: 1 / -1;
}

.panel-title,
.essay-title,
.index-title {
  margin: 0 0 1.2rem;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 500;
  font-style: italic;
}

.archive-list,
.essay-list {
  display: grid;
  gap: 0.85rem;
}

.archive-card,
.essay-entry {
  padding: 1rem 1rem 1.05rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(242, 232, 218, 0.08);
  background:
    linear-gradient(180deg, rgba(233, 218, 201, 0.04), rgba(233, 218, 201, 0.01)),
    rgba(35, 25, 21, 0.54);
}

.archive-card h2,
.essay-entry h2 {
  margin: 0.35rem 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.06;
}

.archive-card h2 a,
.essay-entry h2 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease, color 180ms ease;
}

.archive-card h2 a:hover,
.archive-card h2 a:focus-visible,
.essay-entry h2 a:hover,
.essay-entry h2 a:focus-visible {
  color: var(--text);
  border-bottom-color: rgba(242, 232, 218, 0.5);
}

.archive-card h2 a:focus-visible,
.essay-entry h2 a:focus-visible {
  outline: none;
}

.archive-card p,
.essay-entry p,
.quiet-note,
.essay-excerpt {
  margin: 0.7rem 0 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.quiet-note {
  margin: 0;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-soft);
}

.status-chip::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(217, 126, 82, 0.65);
  box-shadow: 0 0 12px rgba(217, 126, 82, 0.35);
}

.status-chip.muted::before {
  background: rgba(191, 177, 160, 0.45);
  box-shadow: none;
}

.archive-aside {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.aside-block {
  padding: 1.1rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(242, 232, 218, 0.08);
  background: rgba(30, 21, 18, 0.45);
}

.aside-block h2,
.aside-block h3 {
  margin: 0 0 0.7rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-style: italic;
  font-weight: 500;
}

.aside-block p,
.aside-block li {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.aside-block ul {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.65rem;
}

.post-page .post-shell {
  width: min(780px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2.2rem 0 4rem;
}

.post-head {
  display: grid;
  gap: 0.9rem;
  padding: 0.6rem 0 2rem;
}

.post-title {
  margin: 0;
  max-width: 12ch;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 6vw, 5.2rem);
  line-height: 0.96;
  font-weight: 500;
  font-style: italic;
}

.post-subtitle {
  max-width: 38rem;
  margin: 0;
  color: var(--text-soft);
  font-size: 1.12rem;
  line-height: 1.7;
}

.post-note {
  max-width: 38rem;
  margin: 0.2rem 0 0;
  padding: 0.95rem 1rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(242, 232, 218, 0.08);
  background: rgba(30, 21, 18, 0.45);
  color: var(--text-soft);
  line-height: 1.65;
}

.post-note a,
.post-body a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(242, 232, 218, 0.32);
}

.post-note a:hover,
.post-note a:focus-visible,
.post-body a:hover,
.post-body a:focus-visible {
  border-bottom-color: rgba(242, 232, 218, 0.6);
}

.post-body {
  padding: 1.7rem 1.35rem 1.85rem;
  border-radius: 1.65rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 45%),
    rgba(20, 15, 13, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 20px 46px rgba(0, 0, 0, 0.22);
}

.post-body > :first-child {
  margin-top: 0;
}

.post-body p,
.post-body ul,
.post-body ol,
.post-body blockquote {
  margin: 1.15rem 0 0;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.9;
}

.post-body ul,
.post-body ol {
  padding-left: 1.3rem;
}

.post-body li + li {
  margin-top: 0.5rem;
}

.post-body blockquote {
  padding-left: 1rem;
  border-left: 1px solid rgba(242, 232, 218, 0.24);
  color: var(--text-soft);
  font-style: italic;
}

.post-body h2,
.post-body h3,
.post-body h4 {
  margin: 2rem 0 0.7rem;
  color: var(--text);
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  line-height: 1.14;
}

.post-body h2 {
  font-size: 2rem;
}

.post-body h3 {
  font-size: 1.7rem;
}

.post-body h4 {
  font-size: 1.35rem;
}

.essay-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.9fr);
  gap: 1rem;
}

.essay-flow {
  display: grid;
  gap: 1rem;
}

.essay-feature h2,
.essay-stack h2 {
  margin-top: 0.4rem;
}

.essay-excerpt {
  max-width: 34rem;
  font-size: 1.03rem;
}

.ghost-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.ghost-line {
  height: 3.6rem;
  border-radius: 999px;
  border: 1px dashed rgba(242, 232, 218, 0.08);
  background:
    linear-gradient(90deg, rgba(242, 232, 218, 0.06), transparent 22%, transparent 78%, rgba(242, 232, 218, 0.04)),
    rgba(15, 10, 9, 0.36);
}

.essay-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.2rem;
  color: var(--text);
  text-decoration: none;
}

.essay-link::after {
  content: "->";
  font-size: 0.95rem;
}

.bic-visual {
  background:
    radial-gradient(circle at 75% 24%, rgba(255, 255, 255, 0.08), transparent 20%),
    linear-gradient(180deg, #1a1412 0%, #0e0a09 100%);
}

.bic-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.bic-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  transform: scale(1.04);
  filter: saturate(0.82) brightness(0.78) contrast(1.06) sepia(0.08);
  animation: asset-breathe 10.4s ease-in-out infinite;
}

.debug-visual {
  background:
    radial-gradient(circle at 28% 22%, rgba(142, 245, 184, 0.14), transparent 22%),
    linear-gradient(180deg, #030504, #050907 62%, #020403);
}

.debug-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.debug-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  transform: scale(1.04);
  filter: saturate(0.82) brightness(0.78) contrast(1.06) sepia(0.08);
  animation: asset-breathe 11.2s ease-in-out infinite;
}

.bird-visual {
  background: linear-gradient(180deg, #2b1b16 0%, #130d0b 100%);
}

.bird-asset-set {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #2b1b16 0%, #130d0b 100%);
}

.bird-proposed-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.bird-proposed-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
  transform: scale(1.035);
  filter: saturate(0.82) brightness(0.78) contrast(1.06) sepia(0.06);
  animation: asset-breathe 10s ease-in-out infinite;
}

.bird-asset-set::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 6, 6, 0.02), rgba(8, 6, 6, 0.14) 55%, rgba(8, 6, 6, 0.48) 100%),
    radial-gradient(circle at 18% 18%, rgba(148, 104, 82, 0.1), transparent 24%);
}

.bird-sky-haze {
  position: absolute;
  top: 10%;
  right: 8%;
  width: 38%;
  height: 18%;
  border-radius: 999px;
  background: rgba(192, 156, 124, 0.08);
  filter: blur(22px);
}

.wrote-visual {
  background: linear-gradient(180deg, #160f0e 0%, #090707 100%);
}

.comedy-proposed-set {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #160f0e 0%, #090707 100%);
}

.comedy-proposed-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.comedy-proposed-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
  transform: scale(1.04);
  filter: saturate(0.78) brightness(0.73) contrast(1.1) sepia(0.28) hue-rotate(-16deg);
  animation: asset-breathe 10.8s ease-in-out infinite;
}

.comedy-proposed-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 6, 6, 0.06), rgba(10, 6, 6, 0.12) 48%, rgba(10, 6, 6, 0.34) 100%),
    radial-gradient(circle at 50% 40%, rgba(198, 149, 82, 0.18), rgba(198, 149, 82, 0.05) 28%, transparent 56%),
    radial-gradient(circle at 22% 20%, rgba(92, 55, 39, 0.16), transparent 25%),
    radial-gradient(circle at 80% 18%, rgba(126, 90, 50, 0.14), transparent 24%);
}

.spotlight {
  position: absolute;
  left: 26%;
  right: 24%;
  top: 18%;
  height: 36%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 48%, rgba(214, 175, 103, 0.24), rgba(214, 175, 103, 0.06) 45%, transparent 70%);
  filter: blur(11px);
  animation: spotlight-sway 8.2s ease-in-out infinite;
}

.essay-visual {
  background:
    radial-gradient(circle at 20% 18%, rgba(212, 142, 102, 0.22), transparent 18%),
    linear-gradient(180deg, #201713 0%, #0d0908 100%);
}

.essay-room-stack {
  position: absolute;
  inset: 14% 16% 15% 16%;
}

.essay-room-sheet {
  position: absolute;
  width: 72%;
  height: 66%;
  left: 13%;
  top: 12%;
  border-radius: 0.8rem;
  background:
    linear-gradient(180deg, rgba(239, 228, 210, 0.98), rgba(220, 203, 181, 0.96));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.essay-room-sheet::before {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: 1.2rem;
  height: 1px;
  background: rgba(72, 56, 44, 0.16);
  box-shadow:
    0 0.7rem 0 rgba(72, 56, 44, 0.16),
    0 1.4rem 0 rgba(72, 56, 44, 0.16),
    0 2.1rem 0 rgba(72, 56, 44, 0.16),
    0 2.8rem 0 rgba(72, 56, 44, 0.16);
}

.essay-room-sheet-back {
  transform: rotate(-6deg) translate(-10%, 6%);
  opacity: 0.72;
}

.essay-room-sheet-front {
  transform: rotate(4deg);
}

.essay-room-note {
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  color: rgba(92, 74, 60, 0.78);
  font-family:
    "Apple SD Gothic Neo",
    "Noto Serif KR",
    "Malgun Gothic",
    serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  opacity: 0.86;
}

.essay-glow {
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 12%;
  height: 2.6rem;
  border-radius: 999px;
  background: rgba(217, 126, 82, 0.18);
  filter: blur(20px);
}

.bird-docket-visual {
  background: linear-gradient(180deg, #281712 0%, #100906 100%);
}

.bird-docket-asset {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.bird-docket-asset img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 44%;
  transform: scale(1.03);
  filter: saturate(0.84) brightness(0.78) contrast(1.04);
}

.bird-docket-asset::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 6, 6, 0.04), rgba(10, 6, 6, 0.12) 45%, rgba(10, 6, 6, 0.3) 100%),
    radial-gradient(circle at 50% 36%, rgba(217, 126, 82, 0.14), transparent 32%);
}

.ambient-breath {
  animation: breathe 5.8s ease-in-out infinite;
}

.ambient-breath.slow {
  animation-duration: 8.8s;
}

@keyframes asset-breathe {
  0%,
  100% {
    transform: scale(1.04) translateY(0);
  }

  50% {
    transform: scale(1.065) translateY(-0.18rem);
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.03);
  }
}

@keyframes blink {
  0%,
  45% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

@keyframes sweep {
  0% {
    transform: translateY(-10%);
  }

  100% {
    transform: translateY(430%);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(-50%) translateX(0);
  }

  50% {
    transform: translateY(-50%) translateX(1.2rem);
  }
}

@keyframes spotlight-sway {
  0%,
  100% {
    transform: translateX(0) translateY(0) scale(1);
    opacity: 0.88;
  }

  50% {
    transform: translateX(0.4rem) translateY(0.15rem) scale(1.05);
    opacity: 1;
  }
}

@media (max-width: 1040px) {
  .archive-grid,
  .essay-layout {
    grid-template-columns: 1fr;
  }

  .archive-aside {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .house-page .house-stage,
  .archive-page .archive-shell {
    width: min(100%, calc(100vw - 1.2rem));
  }

  .house-grid {
    --house-columns: 2;
    --house-row-step: 7.5rem;
    grid-template-columns: repeat(var(--house-columns), minmax(0, 1fr));
    grid-auto-rows: minmax(var(--house-row-step), auto);
  }

  .room {
    --room-col-span: 1;
    --room-row-span: 2;
    --room-copy-offset: 0rem;
    --room-min-height: 17rem;
  }

  .room-featured {
    --room-col-span: 2;
    --room-row-span: 2;
    --room-min-height: 20rem;
  }

  .room-wide {
    --room-col-span: 2;
    --room-row-span: 2;
    --room-min-height: 16.5rem;
  }

  .room-tall {
    --room-min-height: 18rem;
  }

}

@media (max-width: 720px) {
  .bird-proposed-image img {
    object-position: 50% 34%;
  }

  .comedy-proposed-image img {
    object-position: 50% 34%;
  }

  .essay-room-sheet {
    width: 76%;
    height: 68%;
    left: 11%;
    top: 13%;
  }

  .essay-room-note {
    font-size: 0.72rem;
  }

  .house-grid {
    --house-columns: 1;
    --house-gap: 0.8rem;
    --house-row-step: 7.2rem;
    grid-template-columns: 1fr;
    gap: var(--house-gap);
  }

  .room {
    --room-col-span: 1;
    --room-row-span: 2;
    --room-copy-offset: 0rem;
    --room-min-height: 17rem;
  }

  .room-featured {
    --room-row-span: 2;
    --room-min-height: 19rem;
  }

  .room-wide,
  .room-tall {
    --room-col-span: 1;
  }

  .room-copy {
    opacity: 1;
    transform: none;
    background:
      linear-gradient(180deg, transparent 24%, rgba(9, 6, 5, 0.22) 48%, rgba(9, 6, 5, 0.94) 100%);
  }

  .house-page .house-stage,
  .archive-page .archive-shell {
    width: calc(100vw - 1rem);
  }

  .house-frame {
    padding: 0.75rem;
    border-radius: 1.4rem;
  }

  .house-footer {
    padding-top: 1.2rem;
  }

  .post-page .post-shell {
    width: calc(100vw - 1rem);
  }

  .post-body {
    padding: 1.35rem 1rem 1.45rem;
  }
}

@media (max-width: 640px) {
  .house-page .house-stage,
  .archive-page .archive-shell,
  .post-page .post-shell {
    width: calc(100vw - 0.8rem);
    padding-top: 1rem;
  }

  .house-lede,
  .house-footer {
    padding-inline: 0.4rem;
  }

  .room h2 {
    font-size: 2rem;
  }

  .archive-aside {
    grid-template-columns: 1fr;
  }

  .sentence {
    line-height: 1.02;
  }

  .post-title {
    line-height: 1;
  }

.post-subtitle,
.post-note,
.post-body p,
.post-body ul,
.post-body ol,
.post-body blockquote {
  font-size: 1rem;
  }
}

.bird-universe-page .sentence {
  max-width: 14ch;
  font-size: clamp(2.8rem, 5vw, 4.2rem);
}

.bird-universe-page .archive-intro {
  max-width: 42rem;
  font-size: 1.02rem;
}

.bird-universe-page .archive-head {
  padding-bottom: 2rem;
}

.bird-directory-panel {
  padding: 0;
  overflow: hidden;
}

.bird-directory-list {
  display: grid;
  gap: 0;
}

.bird-directory-entry {
  padding: 1.45rem 1.5rem 1.5rem;
  border-top: 1px solid rgba(242, 232, 218, 0.08);
}

.bird-directory-entry:first-child {
  border-top: 0;
}

.bird-directory-entry h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-style: italic;
  font-weight: 500;
  line-height: 0.98;
}

.bird-directory-entry h2 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease, color 180ms ease;
}

.bird-directory-entry h2 a:hover,
.bird-directory-entry h2 a:focus-visible {
  color: var(--text);
  border-bottom-color: rgba(242, 232, 218, 0.45);
}

.bird-directory-kind {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.bird-directory-entry p {
  margin: 0.8rem 0 0;
  max-width: 52rem;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.62;
}

.bird-directory-notes {
  display: grid;
  gap: 0.65rem;
  padding-top: 1.8rem;
}

.bird-directory-notes .quiet-note {
  color: rgba(205, 189, 169, 0.55);
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.75;
}

/* --- Room: small (shelf) --- */

.small-visual {
  background: linear-gradient(180deg, #141414 0%, #0a0a0a 100%);
}

.small-shelf {
  position: absolute;
  inset: 18% 16%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
}

.small-shelf-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.015);
  overflow: hidden;
}

.small-shelf-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 58%;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.small-shelf-card::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 30%;
  bottom: 22%;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1px;
  box-shadow: 0 6px 0 rgba(255, 255, 255, 0.05);
}

.small-shelf-card:nth-child(2),
.small-shelf-card:nth-child(3) {
  opacity: 0.55;
}

.small-shelf-card:nth-child(4) {
  opacity: 0.28;
}
