/* ─── CONSTELLATION VIEW ─────────────────────────────────────────
   D3 force graph of every project/product/news/other entry.
   Background matches the mosaic/map views (#4d5f63); edges/labels/UI
   go light-on-dark accordingly. Color lives only inside the node
   fills. No shadows, no gradients. ── */

.graph-view {
  display: none;
  position: fixed;
  inset: 0;
  background: #4d5f63;
  z-index: 50;
  flex-direction: column;
}

.graph-view.is-active { display: flex; }

.graph-view .site-name img { filter: brightness(0) invert(1); opacity: 0.82; }
.graph-view .site-name:hover { opacity: 0.5; }
.graph-view .view-btn            { color: rgba(232, 228, 223, 0.55); }
.graph-view .view-btn:hover      { color: rgba(232, 228, 223, 1); }
.graph-view .view-btn.is-active  { color: rgba(232, 228, 223, 1); }

.graph-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.4rem 1.4rem 1rem;
  flex-shrink: 0;
  background: #4d5f63;
  z-index: 10;
}

#graph-canvas {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  cursor: grab;
}

#graph-canvas.is-dragging-bg { cursor: grabbing; }

#graph-canvas svg {
  display: block;
  width: 100%;
  height: 100%;
}

.graph-edge {
  stroke: rgba(232, 228, 223, 0.7);
  fill: none;
}

.graph-edge--related { stroke-opacity: 0.6; }
.graph-edge--driver   { stroke-opacity: 0.32; }
.graph-edge--tag       { stroke-opacity: 0.16; }

.graph-node { cursor: pointer; }
.graph-node,
.graph-edge { transition: opacity 0.15s ease; }

.graph-node__ring {
  fill: none;
  stroke: rgba(232, 228, 223, 0.85);
  stroke-width: 1px;
  pointer-events: none;
}

.graph-node__img { pointer-events: none; }

.graph-node__label {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: rgba(232, 228, 223, 0.9);
  pointer-events: none;
}

/* ─── Hover tooltip (title + year, §4.4) ─────────────────────── */
.graph-tooltip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.8rem;
  font-weight: 400;
  padding: 0.35rem 0.7rem;
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.1s ease;
}

/* ─── Filter chips: All / Projects / Products / News / Others ── */
.graph-filters {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.graph-filter-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(232, 228, 223, 0.4);
  padding: 0;
  transition: color 0.15s ease;
}

.graph-filter-btn:hover     { color: rgba(232, 228, 223, 0.75); }
.graph-filter-btn.is-active { color: rgba(232, 228, 223, 1); }
