/* blog-graph.css — "second brain" neuron graph mode for the blog index.
   The graph itself is drawn on a <canvas> by brain-graph.js; this is just the
   launch button, the full-screen overlay shell, and the HUD chrome. */

/* dancing duck perched next to the Blog heading (sibling of h1 so fx.js's
   textContent scramble on the heading can't wipe it) */
.blog-duck {
  height: 1em;
  width: auto;
  margin-left: 10px;
  margin-bottom: 10px;
  flex-shrink: 0;
  transform: translateY(0.06em);
  image-rendering: pixelated;
}

/* mobile-only heads-up: the blog's interactive pieces (brain graph, notes
   galleries, terminal) are cramped on a phone. Hidden on desktop entirely. */
.mobile-notice { display: none; --notice-red: #c0392b; }
[data-theme="dark"] .mobile-notice { --notice-red: #f38ba8; }

@media (max-width: 760px) {
  .mobile-notice {
    display: block;
    margin: 0 0 1.6rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid color-mix(in srgb, var(--notice-red) 45%, var(--line));
    border-left: 3px solid var(--notice-red);
    border-radius: 10px;
    background: color-mix(in srgb, var(--notice-red) 8%, var(--card-bg));
    color: var(--notice-red);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.55;
  }
  .mobile-notice__icon { margin-right: 0.35rem; }
}

.brain-open {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1.6rem;
  padding: 0.5rem 0.95rem;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 7%, var(--card-bg));
  color: var(--soft);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.brain-open:hover {
  border-color: var(--accent);
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 14%, var(--card-bg));
}

.brain-open__icon { color: var(--accent); font-size: 14px; line-height: 1; }

.brain-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  opacity: 1;
  transition: opacity 0.2s ease;
}

.brain-overlay[hidden] { display: none; }
.brain-overlay.is-entering { opacity: 0; }

.brain-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}
.brain-canvas.is-grabbing { cursor: grabbing; }
.brain-canvas.is-hot { cursor: pointer; }

.brain-hud {
  position: absolute;
  top: 1rem;
  left: 1.2rem;
  right: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  pointer-events: none;
  font-family: var(--mono);
}

.brain-hud__title { font-size: 13px; color: var(--ink); letter-spacing: 0.02em; }
.brain-hud__sub { color: var(--muted); }

.brain-hud__close {
  pointer-events: auto;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--soft);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.brain-hud__close:hover { color: var(--ink); border-color: var(--rosy); }

.brain-hud__hint {
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  pointer-events: none;
}

.brain-legend {
  position: absolute;
  bottom: 2.7rem;
  left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  pointer-events: none;
}

.brain-legend__row { display: inline-flex; align-items: center; gap: 0.4rem; }
.brain-legend__dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; }

@media (max-width: 600px) {
  .brain-legend { display: none; }
  .brain-hud__hint { font-size: 10px; padding: 0 1rem; }
}
