/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0D0208;
  --bg-warm: #1A0A10;
  --bg-card: #1C0E14;
  --text: #FFFFFF;
  --accent: #FDBB30;
  --wine: #860038;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.15);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.2);
}

html { overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

/* === PERSON VIEW === */
.universe { position: relative; width: 100%; overflow: visible; padding: 20px 0 60px; }
.connections { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 1; }
.connections line { stroke: rgba(255,255,255,0.15); stroke-width: 1; opacity: 0.3; transition: opacity 0.3s var(--ease), stroke 0.3s var(--ease); }
.connections line.highlight { opacity: 0.7; stroke-width: 1.5; }
.nodes { position: relative; z-index: 2; width: 100%; height: 100%; }
.node-center { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 12px; z-index: 10; transform: translate(-50%, -50%); }
.node-center-photo { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; border: 4px solid var(--bg-card); box-shadow: var(--shadow-lg); }
.node-center-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.node-center:hover .node-center-photo { transform: scale(1.08); box-shadow: var(--shadow-lg), 0 0 0 2px var(--accent); }
.node-center-label { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: #fff; text-align: center; white-space: nowrap; }
.node-center-sub { font-size: 11px; color: #fff; }
.node { position: absolute; transform: translate(-50%, -50%); cursor: pointer; transition: transform 0.25s var(--ease); z-index: 3; }
.node:hover { transform: translate(-50%, -50%) scale(1.12); z-index: 20; }
.node-poster { width: 72px; height: 108px; border-radius: 8px; overflow: hidden; background: var(--bg-warm); box-shadow: var(--shadow-md); border: 2px solid var(--bg-card); }
.node:hover .node-poster { box-shadow: var(--shadow-lg); }
.node-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.node-label { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); text-align: center; white-space: nowrap; pointer-events: none; }
.node-name { font-family: var(--font-display); font-size: 11px; font-weight: 600; color: #fff; }
.node-year { font-size: 10px; color: rgba(255,255,255,0.6); }
.node, .node-center { opacity: 0; transition: opacity 0.5s var(--ease), transform 0.25s var(--ease); }
.node.visible, .node-center.visible { opacity: 1; }
.detail-section { display: none; }
.node-popup { position: absolute; z-index: 30; opacity: 0; transform: translateY(-8px); transition: opacity 0.25s var(--ease), transform 0.25s var(--ease); }
.node-popup.visible { opacity: 1; transform: translateY(0); }
.node-popup-inner { display: flex; gap: 12px; background: var(--bg-card); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-lg); }
.node-popup-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: #fff; }
.node-popup-role { font-size: 12px; color: #fff; }
.node .node-poster { width: 60px; height: 90px; border-radius: 6px; }
