/* Blog wall — homepage stage language + article sheet */

html.page-blog,
body.page-blog {
  overflow: hidden;
  background: #08080a;
  touch-action: none;
}

body.page-blog:has(#cursor-layer),
body.page-blog:has(#cursor-layer) a,
body.page-blog:has(#cursor-layer) button {
  cursor: none;
}

body.page-blog #stage {
  z-index: 0;
}

body.page-blog #hud,
body.page-blog #wander {
  z-index: 40;
}

/* Titles live on each tile — hide hover readout */
body.page-blog #readout {
  display: none !important;
}

/* Let captions sit in the box corner (clip was hiding them) */
html.page-blog .cell {
  overflow: visible !important;
  contain: layout style !important;
  clip-path: none !important;
  border-radius: 2px;
}

html.page-blog .cell-inner {
  clip-path: none;
  border-radius: 2px;
  overflow: hidden;
}

html.page-blog .blog-cell-caption,
html.page-blog .cell > .blog-cell-caption {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 5;
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(8, 8, 10, .82);
  color: #f2f0ec;
  font-family: var(--sans);
  font-size: clamp(11px, 1.2vw, 13px);
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.3;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  pointer-events: none;
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
  opacity: 1 !important;
  visibility: visible !important;
}

.blog-filter-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--t-chrome);
  font-weight: 600;
  padding: 9px 16px 10px;
  color: #101012;
  opacity: 0.66;
  transition: opacity var(--dur-1), background var(--dur-1), color var(--dur-1);
}

a.blog-filter-link:hover {
  opacity: 0.92;
}

.blog-filter-link.is-active {
  opacity: 1;
  background: var(--accent);
  color: #fff;
}

.blog-cell {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: inherit;
  background: transparent;
  overflow: visible;
  contain: layout style;
}

.blog-cell-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0a0a0c;
}

.blog-cell .cell-inner {
  position: absolute;
  inset: 0;
}

.blog-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity var(--dur-3) var(--ease-out), transform 0.55s var(--ease-out);
}

.blog-cell img.is-loaded {
  opacity: 1;
}

.blog-cell:hover img {
  transform: scale(1.07);
}

.blog-cell-poster {
  display: block;
  background: var(--poster-bg, #c9c4b8);
  color: var(--poster-ink, #2a2822);
}

.blog-cell-caption {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 5;
  width: auto;
  max-width: none;
  height: auto;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(8, 8, 10, .82);
  color: #f2f0ec;
  font-family: var(--sans);
  font-size: clamp(11px, 1.2vw, 13px);
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.3;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  pointer-events: none;
  display: block;
  overflow: visible;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Article detail — about-sheet language */
#post {
  position: fixed;
  inset: 0;
  z-index: 70;
}

#post[hidden] {
  display: none;
}

#post-scrim {
  position: absolute;
  inset: 0;
  background: #0606078c;
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease-out);
}

#post.is-open #post-scrim {
  opacity: 1;
}

#post-card {
  position: absolute;
  left: 50%;
  top: clamp(8px, 2.2vw, 30px);
  transform: translate(-50%, 8px);
  width: min(1720px, calc(100vw - (2 * clamp(8px, 2.2vw, 30px))));
  height: calc(100dvh - (2 * clamp(8px, 2.2vw, 30px)));
  overflow: visible;
  background: transparent;
  color: #2a2822;
  border: 0;
  box-shadow: none;
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-3) var(--ease-out);
}

#post.is-open #post-card {
  opacity: 1;
  transform: translate(-50%, 0);
}

#post-card:focus {
  outline: none;
}

#post-ground {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #c9c4b8;
  clip-path: polygon(0.6% 0.8%, 99.2% 0.4%, 99.5% 99.3%, 0.4% 99.6%);
}

#post-close {
  position: absolute;
  top: 3.4%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  width: clamp(46px, 4vw, 60px);
  height: clamp(46px, 4vw, 60px);
  display: grid;
  place-items: center;
  background: none;
  color: #2a2822;
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease-out) 0.18s, transform var(--dur-1);
}

#post.is-open #post-close {
  opacity: 1;
}

#post-close svg {
  width: 74%;
  height: 74%;
  overflow: visible;
}

#post-close:hover {
  transform: translate(-50%, -50%) scale(0.88);
}

#post-scroll {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(24px, 3.2vw, 56px);
  padding: clamp(56px, 8vh, 88px) clamp(28px, 5vw, 72px) clamp(36px, 5vh, 64px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

#post-copy {
  min-width: 0;
}

#post-date {
  display: block;
  margin: 0 0 12px;
  font-size: var(--t-label);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  opacity: 0.62;
}

#post-title {
  margin: 0 0 16px;
  font-family: var(--display);
  font-size: clamp(28px, 4.2vw, 54px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: #2a2822;
}

#post-excerpt {
  margin: 0 0 22px;
  font-size: var(--t-lead);
  line-height: 1.5;
  opacity: 0.78;
  max-width: 42ch;
}

#post-body {
  font-size: var(--t-body);
  line-height: 1.7;
  max-width: 48ch;
}

#post-body p {
  margin: 0 0 1.05em;
}

#post-media {
  position: relative;
  min-width: 0;
  height: min(62vh, 580px);
  align-self: center;
  overflow: hidden;
  clip-path: polygon(1.2% 1.5%, 98.4% 0.6%, 99.1% 98.8%, 0.5% 99.2%);
  background: #b4aea1;
}

#post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#post-media[hidden] {
  display: none;
}

body.is-post-open #stage,
body.is-post-open #wander,
body.is-post-open #readout {
  pointer-events: none;
}

@media (max-width: 860px) {
  #post-scroll {
    grid-template-columns: 1fr;
    align-content: start;
    padding-top: clamp(64px, 10vh, 92px);
  }

  #post-media {
    order: -1;
    height: min(38vh, 280px);
    width: 100%;
  }

  #post-title {
    font-size: clamp(26px, 8vw, 40px);
  }
}
