// data.jsx — node positions, labels, and connections for 3 layers × 8 nodes.
// Coordinates are in a [-1, 1] range on the layer's local x/z plane.
// Each layer has a thematic concept area; connections include intra-layer
// and inter-layer (which become S-curves through 3D space).

const LAYERS = [
  {
    id: 'L1',
    title: 'PHILOSOPHY',
    subtitle: 'foundations',
    inkOpacity: 1.0,
    pattern: 'dots',
    gridSteps: 6,        // sparse grid
    gridContrast: 0.7,
    nodes: [
      { id: 'p1', label: 'Phenomenology', pos: [-0.78,  0.62], desc: 'Experience as it presents itself — before theory closes the frame.' },
      { id: 'p2', label: 'Dialectic',     pos: [-0.32,  0.18], desc: 'Truth as a moving negotiation between opposing positions.' },
      { id: 'p3', label: 'Ontology',      pos: [ 0.18,  0.74], desc: 'What there is, and what it means for a thing to exist at all.' },
      { id: 'p4', label: 'Hermeneutics',  pos: [ 0.62,  0.30], desc: 'The discipline of reading — how meaning is made, not found.' },
      { id: 'p5', label: 'Aesthetics',    pos: [ 0.84, -0.42], desc: 'The sensible order: where form, taste, and judgement meet.' },
      { id: 'p6', label: 'Ethics',        pos: [ 0.10, -0.58], desc: 'How one ought to act — and what makes that question livable.' },
      { id: 'p7', label: 'Epistemology',  pos: [-0.46, -0.30], desc: 'The architecture of knowing — its limits, sources, and warrants.' },
      { id: 'p8', label: 'Metaphysics',   pos: [-0.74, -0.78], desc: 'The deepest structure of reality, beyond the phenomenal surface.' },
    ],
    edges: [
      ['p1','p2'], ['p2','p3'], ['p3','p4'], ['p2','p7'],
      ['p7','p8'], ['p7','p6'], ['p4','p5'], ['p5','p6'],
      ['p1','p7'], ['p3','p2'],
    ],
  },
  {
    id: 'L2',
    title: 'STUDIO',
    subtitle: 'what is open',
    inkOpacity: 0.78,
    pattern: 'diag',
    gridSteps: 10,       // medium
    gridContrast: 1.0,
    nodes: [
      { id: 'r2', label: 'Research',   pos: [-0.68,  0.62], route: 'research',   desc: 'Spintronics work at KAIST — papers, devices, and open questions.' },
      { id: 'r3', label: 'Projects',   pos: [ 0.08,  0.72], route: 'projects',   desc: 'Portfolio of built things — tools, prototypes, and experiments.' },
      { id: 'r4', label: 'NodePrompt', pos: [ 0.80,  0.34], route: 'nodeprompt', desc: 'Flagship project: a graph-native interface for thinking with LLMs.' },
      { id: 'r5', label: 'Venture',    pos: [ 0.52, -0.42], route: 'venture',    desc: 'Stealth AI startup, pre-launch — co-founder, shipping under embargo.' },
      { id: 'r6', label: 'Archive',    pos: [-0.08, -0.18], route: 'archive',    desc: 'HUSTLY ARCHIV — cultural archive directed as long-form curation.' },
      { id: 'r7', label: 'Writing',    pos: [-0.78, -0.06], route: 'writing',    desc: 'Essays, fragments, and working notes — thinking in public.' },
      { id: 'r8', label: 'Paideia',    pos: [-0.36, -0.78], route: 'paideia',    desc: 'A self-curriculum across science, art, and philosophy. Includes the Codex.' },
    ],
    edges: [
      ['r2','r3'], ['r3','r4'], ['r4','r5'], ['r5','r6'],
      ['r6','r7'], ['r7','r2'], ['r6','r8'], ['r7','r8'],
      ['r3','r6'], ['r4','r6'],
    ],
  },
  {
    id: 'L3',
    title: 'SCIENCE',
    subtitle: 'inquiry',
    inkOpacity: 0.58,
    pattern: 'cross',
    gridSteps: 16,       // dense
    gridContrast: 1.4,
    nodes: [
      { id: 's1', label: 'Topology',          pos: [-0.66,  0.74], desc: 'The shape of relations — what survives every continuous deformation.' },
      { id: 's2', label: 'Information',       pos: [-0.06,  0.50], desc: 'The currency of difference: what can be measured, sent, and lost.' },
      { id: 's3', label: 'Quantum',           pos: [ 0.58,  0.62], desc: 'Reality at the scale where probability and observation collide.' },
      { id: 's4', label: 'Complexity',        pos: [ 0.82, -0.04], desc: 'Where simple rules generate behavior no rule predicts.' },
      { id: 's5', label: 'Cognition',         pos: [ 0.30, -0.62], desc: 'Mind as process — the mechanics of thought, attention, recall.' },
      { id: 's6', label: 'Cybernetics',       pos: [-0.34, -0.36], desc: 'Feedback as fundament — control loops in machines, bodies, and societies.' },
      { id: 's7', label: 'Linguistics',       pos: [-0.78, -0.20], desc: 'The grammar that conditions every sentence we manage to think.' },
      { id: 's8', label: 'Evolution',         pos: [-0.20, -0.84], desc: 'Variation, inheritance, selection — the algorithm life keeps running.' },
    ],
    edges: [
      ['s1','s2'], ['s2','s3'], ['s3','s4'], ['s2','s6'],
      ['s4','s5'], ['s5','s6'], ['s6','s7'], ['s5','s8'],
      ['s6','s8'], ['s1','s7'],
    ],
  },
];

// Inter-layer edges: connect concepts across layers.
// [layerA, nodeId, layerB, nodeId]
const CROSS_EDGES = [
  [0, 'p1', 1, 'r7'],   // Phenomenology  ⇄ Writing         (observation as practice)
  [0, 'p3', 1, 'r6'],   // Ontology       ⇄ Archive         (what is, catalogued)
  [0, 'p5', 1, 'r3'],   // Aesthetics     ⇄ Projects        (formed things)
  [0, 'p7', 1, 'r8'],   // Epistemology   ⇄ Paideia         (formation of knowing)
  [0, 'p2', 2, 's2'],   // Dialectic      ⇄ Information
  [1, 'r4', 2, 's2'],   // NodePrompt     ⇄ Information
  [1, 'r5', 2, 's4'],   // Venture        ⇄ Complexity
  [1, 'r2', 2, 's3'],   // Research       ⇄ Quantum
  [1, 'r2', 2, 's6'],   // Research       ⇄ Cybernetics
  [0, 'p4', 2, 's7'],   // Hermeneutics   ⇄ Linguistics
  [0, 'p6', 2, 's5'],   // Ethics         ⇄ Cognition
  [1, 'r6', 2, 's8'],   // Archive        ⇄ Evolution
  [0, 'p8', 2, 's8'],   // Metaphysics    ⇄ Evolution
];

window.MINDMAP_DATA = { LAYERS, CROSS_EDGES };
