/* Shared decorative layer for Kill Switch blog pages.
   Loaded in addition to each page's inline styles — only adds background depth,
   poster figures, and small flourishes; it does not restyle the existing layout. */

/* Subtle fixed background: brand glows + dot grid + faint SVG shapes, behind all content. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 8%, rgba(92, 226, 231, 0.10), transparent 38%),
    radial-gradient(circle at 88% 92%, rgba(224, 104, 0, 0.07), transparent 42%),
    radial-gradient(circle at 70% 20%, rgba(92, 226, 231, 0.05), transparent 30%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    url("/blog/assets/bg-shapes.svg");
  background-size: 34px 34px, cover;
  background-position: 0 0, center;
  background-repeat: repeat, no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.55));
          mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.55));
}

/* Poster / hero image for posts (graceful: hidden until the file exists). */
.poster {
  display: block;
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  margin: 0 0 1.8em;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  background: linear-gradient(135deg, rgba(92,226,231,0.06), rgba(224,104,0,0.05));
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.poster[data-missing] { display: none; }

/* Inline meme / GIF figures inside posts. */
.meme {
  margin: 1.6em auto 1.8em;
  max-width: 100%;
  text-align: center;
}
.meme video,
.meme img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.meme figcaption {
  font-size: 12.5px;
  color: #6b6e7e;
  margin-top: 0.5em;
  font-style: italic;
}

/* Card thumbnails on the blog index (WebM loop + WebP/PNG fallback). */
.post .card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 1.1em;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(135deg, rgba(92,226,231,0.06), rgba(224,104,0,0.05));
}
.post .card-thumb,
.post .card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post .card-thumb {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.post .card-thumb.is-playing {
  opacity: 1;
}
.post .card-poster {
  position: relative;
  z-index: 0;
}
.post .card-poster[data-missing] { display: none; }

/* ---- Post visualizations (blog-viz.js) ---- */
.viz { margin: 2em 0 2.2em; padding: 1.1em 1.3em 1.2em; background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.09); border-radius: 12px; }
.viz-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 0.7em; flex-wrap: wrap; }
.viz-label { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: #8a8d9b; font-weight: 600; }
.viz-readout { font-family: 'JetBrains Mono', monospace; font-size: 20px; font-weight: 600; color: #fff; transition: color 0.3s; }
.viz-accent { color: #5ce2e7; }
.viz-done { text-shadow: 0 0 14px rgba(92,226,231,0.55); }
.viz-svg { width: 100%; height: auto; display: block; background: rgba(0,0,0,0.25); border-radius: 8px; }
.viz-cap { font-size: 13px; color: #8a8d9b; line-height: 1.55; margin-top: 0.7em; }
.viz-cap code { font-size: 0.85em; }
.viz-bars { display: flex; gap: 28px; align-items: flex-end; justify-content: center; padding: 0.6em 0 0.2em; }
.viz-bar { display: flex; flex-direction: column; align-items: center; gap: 0.6em; }
.viz-bar-track { position: relative; width: 84px; height: 150px; background: rgba(255,255,255,0.04); border-radius: 8px; display: flex; align-items: flex-end; overflow: hidden; }
.viz-bar-fill { width: 100%; height: 0; border-radius: 8px 8px 0 0; }
.viz-bar-fill.ws { background: linear-gradient(180deg, #ff7a5c, #c2410c); }
.viz-bar-fill.shm { background: linear-gradient(180deg, #5ce2e7, #2a9fb3); }
.viz-bar-num { position: absolute; top: 6px; left: 0; right: 0; text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 600; color: #fff; }
.viz-bar-lab { font-size: 12.5px; color: #c4c5ca; text-align: center; line-height: 1.35; }
.viz-bar-lab small { color: #7e8294; font-size: 11px; }
.viz-agent { opacity: 0.9; animation: vizAgentFade 0.4s ease both; }
@keyframes vizAgentFade { from { opacity: 0; } to { opacity: 0.9; } }
@media (prefers-reduced-motion: reduce) { .viz-agent { animation: none; } }
@media (max-width: 760px) { .viz-readout { font-size: 17px; } }

/* ---- Hover-animated card thumbnails (blog index) ---- */
.card-viz {
  height: 152px; margin: 0 0 1.1em; padding: 8px 12px;
  background: rgba(0,0,0,0.28); border: 1px solid rgba(255,255,255,0.07); border-radius: 9px;
  display: flex; flex-direction: column; overflow: hidden;
  transition: border-color 0.2s;
}
.post:hover .card-viz { border-color: rgba(92,226,231,0.35); }
.card-viz .viz-head { flex: 0 0 auto; margin-bottom: 4px; }
.card-viz .viz-label { display: none; }
.card-viz .viz-readout { font-size: 12.5px; }
.card-viz .viz-svg { flex: 1 1 auto; min-height: 0; width: 100%; height: 100%; background: transparent; }
.card-viz .viz-cap { display: none; }
.card-viz .viz-bars { flex: 1 1 auto; gap: 16px; padding: 0; align-items: flex-end; }
.card-viz .viz-bar-track { height: 78px; width: 42px; }
.card-viz .viz-bar-num { font-size: 10px; top: 3px; }
.card-viz .viz-bar-lab { font-size: 10.5px; }

/* ---- Tweet embeds + article pull-quotes ---- */
.tweet-embed { margin: 1.8em 0; display: flex; justify-content: center; }
blockquote.twitter-tweet { border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.03); border-radius: 12px; padding: 1.1em 1.3em; max-width: 520px; margin: 0 auto; font-size: 15px; line-height: 1.55; color: #c4c5ca; }
blockquote.twitter-tweet p { margin: 0 0 0.6em; }
blockquote.twitter-tweet a { color: #5ce2e7; }
.pullquote { margin: 1.9em 0; padding: 0.2em 0 0.2em 1.4em; border-left: 4px solid #5ce2e7; }
.pullquote p { font-family: 'Outfit', sans-serif; font-size: 1.35em; line-height: 1.42; color: #eef0f5; font-weight: 500; margin: 0 0 0.55em; }
.pullquote p code { font-size: 0.66em; color: #5ce2e7; background: rgba(92,226,231,0.08); padding: 1px 5px; }
.pullquote cite { font-style: normal; font-size: 13.5px; color: #8a8d9b; }
.pullquote cite a { color: #5ce2e7; }
