/* =========================================================
   JOBOSU // LAB
   EXP 002 — TECHNOLOGY LANDSCAPE
   Interface v0.3
========================================================= */

:root {
  --bg: #040605;
  --panel: rgba(7, 10, 8, 0.82);

  --line: rgba(132, 255, 173, 0.11);
  --line2: rgba(132, 255, 173, 0.22);

  --green: #87ffad;
  --text: #e6ece8;
  --muted: #667069;
  --dim: #343c37;

  --font:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    Menlo,
    monospace;
}


/* =========================================================
   BASE
========================================================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;

  width: 100%;
  height: 100%;

  background: var(--bg);
  color: var(--text);

  font-family: var(--font);

  overflow: hidden;
}

body::before {
  content: "";

  position: fixed;
  inset: 0;

  pointer-events: none;

  background:
    linear-gradient(
      rgba(255, 255, 255, 0.012) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.012) 1px,
      transparent 1px
    );

  background-size: 64px 64px;
}


/* =========================================================
   APP
========================================================= */

.app {
  height: 100vh;

  display: grid;

  grid-template-rows:
    68px
    1fr
    54px;
}


/* =========================================================
   HEADER
========================================================= */

header {
  display: flex;

  align-items: center;
  justify-content: space-between;

  padding: 0 30px;

  border-bottom: 1px solid var(--line);

  background: rgba(4, 6, 5, 0.9);

  z-index: 20;
}

.brand {
  display: flex;

  align-items: center;

  gap: 20px;
}

.logo {
  color: var(--green);

  font-size: 13px;

  letter-spacing: 0.15em;
}

.exp {
  color: #6e7871;

  font-size: 10px;

  letter-spacing: 0.16em;
}

.status {
  display: flex;

  align-items: center;

  gap: 9px;

  color: #737d76;

  font-size: 9px;

  letter-spacing: 0.15em;
}

.status-dot {
  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: var(--green);

  box-shadow:
    0 0 12px rgba(135, 255, 173, 0.8);
}


/* =========================================================
   MAIN
========================================================= */

main {
  min-height: 0;

  display: grid;

  grid-template-columns:
    210px
    1fr
    280px;
}


/* =========================================================
   LEFT SIDEBAR
========================================================= */

.sidebar {
  padding: 30px 22px;

  border-right: 1px solid var(--line);

  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.012),
      transparent
    );

  z-index: 10;
}

.label {
  margin-bottom: 20px;

  color: #465049;

  font-size: 8px;

  letter-spacing: 0.2em;
}

.filter {
  position: relative;

  padding:
    9px
    0
    9px
    18px;

  color: #657069;

  font-size: 10px;

  letter-spacing: 0.09em;

  cursor: pointer;

  transition:
    color 0.25s ease,
    transform 0.25s ease;

  user-select: none;
}

.filter::before {
  content: "";

  position: absolute;

  left: 0;
  top: 50%;

  width: 4px;
  height: 4px;

  border-radius: 50%;

  background: #303832;

  transform: translateY(-50%);

  transition:
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.filter:hover {
  color: #cdd6d0;

  transform: translateX(2px);
}

.filter:hover::before {
  background: rgba(135, 255, 173, 0.65);
}

.filter.active {
  color: var(--green);
}

.filter.active::before {
  background: var(--green);

  box-shadow:
    0 0 8px rgba(135, 255, 173, 0.8);
}


/* =========================================================
   VIEWPORT
========================================================= */

.viewport {
  position: relative;

  overflow: hidden;
}

.viewport::after {
  content: "";

  position: absolute;
  inset: 0;

  pointer-events: none;

  box-shadow:
    inset 0 0 120px rgba(0, 0, 0, 0.42);
}

.view-header {
  position: absolute;

  top: 26px;
  left: 30px;

  z-index: 8;

  pointer-events: none;
}

.view-kicker {
  margin-bottom: 8px;

  color: var(--green);

  font-size: 8px;

  letter-spacing: 0.2em;
}

.view-title {
  color: #aab3ad;

  font-size: 11px;

  letter-spacing: 0.08em;
}

.hint {
  position: absolute;

  left: 30px;
  bottom: 24px;

  z-index: 8;

  color: #3f4842;

  font-size: 8px;

  letter-spacing: 0.1em;

  pointer-events: none;
}


/* =========================================================
   GRAPH
========================================================= */

#graph {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  cursor: grab;
}

#graph.dragging {
  cursor: grabbing;
}


/* =========================================================
   LINKS
========================================================= */

.link {
  stroke: rgba(126, 255, 169, 0.16);

  stroke-width: 1;

  transition:
    stroke 0.3s ease,
    opacity 0.3s ease,
    stroke-width 0.3s ease;
}

.link.active {
  stroke: rgba(126, 255, 169, 0.62);

  stroke-width: 1.4;
}

.link.dim {
  opacity: 0.06;
}


/* =========================================================
   NODES
========================================================= */

.node {
  cursor: pointer;

  transition: opacity 0.3s ease;
}

.node-circle {
  fill: #050806;

  stroke: rgba(126, 255, 169, 0.22);

  stroke-width: 1;

  transition:
    stroke 0.25s ease,
    fill 0.25s ease,
    opacity 0.25s ease;
}

.node-core {
  fill: #405047;

  transition:
    fill 0.25s ease,
    r 0.25s ease;
}

.node-label {
  fill: #7b8780;

  font-family: var(--font);

  font-size: 8px;

  letter-spacing: 1px;

  text-anchor: middle;

  pointer-events: none;

  transition:
    fill 0.25s ease,
    opacity 0.25s ease;
}


/* =========================================================
   NODE INTERACTION
========================================================= */

.node:hover .node-circle {
  stroke: rgba(135, 255, 173, 0.8);

  filter: url(#glow);
}

.node:hover .node-core {
  fill: var(--green);
}

.node:hover .node-label {
  fill: #e1e9e4;
}

.node.selected .node-circle {
  stroke: var(--green);

  filter: url(#glowStrong);
}

.node.selected .node-core {
  fill: var(--green);
}

.node.selected .node-label {
  fill: var(--green);
}

.node.dim {
  opacity: 0.1;
}

.node.hidden {
  display: none;
}


/* =========================================================
   SYSTEM NODES
   Main structural layers are intentionally stronger.
========================================================= */

.node[data-id="capital"] .node-circle,
.node[data-id="energy"] .node-circle,
.node[data-id="compute"] .node-circle,
.node[data-id="ai"] .node-circle {
  stroke-width: 1.4;
}

.node[data-id="capital"] .node-core,
.node[data-id="energy"] .node-core,
.node[data-id="compute"] .node-core,
.node[data-id="ai"] .node-core {
  r: 3;
}

.node[data-id="capital"] .node-label,
.node[data-id="energy"] .node-label,
.node[data-id="compute"] .node-label,
.node[data-id="ai"] .node-label {
  fill: #a0aca4;

  font-size: 9px;
}


/* =========================================================
   CATEGORY SIGNALS
========================================================= */

.category-capital .node-circle {
  stroke: rgba(126, 255, 169, 0.36);
}

.category-energy .node-circle {
  stroke: rgba(183, 255, 126, 0.32);
}

.category-compute .node-circle {
  stroke: rgba(126, 226, 255, 0.32);
}

.category-ai .node-circle {
  stroke: rgba(160, 126, 255, 0.34);
}

.category-product .node-circle {
  stroke: rgba(255, 210, 126, 0.3);
}

.category-frontier .node-circle {
  stroke: rgba(255, 126, 176, 0.3);
}


/* =========================================================
   RIGHT INFORMATION PANEL
========================================================= */

.panel {
  padding: 30px 22px;

  border-left: 1px solid var(--line);

  background:
    linear-gradient(
      270deg,
      rgba(255, 255, 255, 0.012),
      transparent
    );

  overflow: auto;

  z-index: 10;
}

.panel-id {
  margin-bottom: 14px;

  color: var(--green);

  font-size: 8px;

  letter-spacing: 0.2em;
}

.panel h2 {
  margin:
    0
    0
    8px;

  font-size: 20px;

  font-weight: 400;

  letter-spacing: -0.03em;
}

.panel-type {
  margin-bottom: 28px;

  color: #68736c;

  font-size: 9px;

  letter-spacing: 0.12em;
}

.field {
  padding: 14px 0;

  border-top:
    1px solid
    rgba(255, 255, 255, 0.04);
}

.field-name {
  margin-bottom: 7px;

  color: #424b45;

  font-size: 7px;

  letter-spacing: 0.18em;
}

.field-value {
  color: #939e97;

  font-size: 10px;

  line-height: 1.6;
}

.connections-list {
  display: flex;

  flex-wrap: wrap;

  gap: 5px;

  margin-top: 8px;
}

.connection-tag {
  padding: 5px 7px;

  border:
    1px solid
    rgba(135, 255, 173, 0.12);

  color: #6e7871;

  font-size: 7px;
}


/* =========================================================
   TIMELINE
========================================================= */

footer {
  display: flex;

  align-items: center;

  padding: 0 30px;

  border-top: 1px solid var(--line);

  background:
    rgba(4, 6, 5, 0.94);

  z-index: 20;
}

.timeline {
  width: 100%;

  display: flex;

  align-items: center;
  justify-content: space-between;

  color: #424b45;

  font-size: 8px;
}

.timeline span {
  position: relative;
}

.timeline .now {
  color: var(--green);
}

.timeline .now::before {
  content: "";

  position: absolute;

  width: 5px;
  height: 5px;

  left: 50%;
  top: -16px;

  transform: translateX(-50%);

  border-radius: 50%;

  background: var(--green);

  box-shadow:
    0 0 10px rgba(135, 255, 173, 0.8);
}


/* =========================================================
   INTRO
========================================================= */

.intro {
  position: absolute;

  inset: 0;

  z-index: 30;

  display: flex;

  align-items: center;
  justify-content: center;

  pointer-events: none;

  background: #040605;

  animation:
    introOut
    2.8s
    forwards;
}

.intro-inner {
  text-align: center;

  animation:
    introMove
    2.5s
    ease
    forwards;
}

.intro-small {
  margin-bottom: 18px;

  color: var(--green);

  font-size: 9px;

  letter-spacing: 0.25em;
}

.intro-title {
  font-size:
    clamp(
      26px,
      4vw,
      52px
    );

  font-weight: 400;

  letter-spacing: -0.04em;
}

@keyframes introOut {

  0%,
  55% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    visibility: hidden;
  }

}

@keyframes introMove {

  0% {
    transform: translateY(8px);
    opacity: 0;
  }

  25%,
  60% {
    transform: translateY(0);
    opacity: 1;
  }

  100% {
    transform: translateY(-8px);
    opacity: 0;
  }

}


/* =========================================================
   SCROLLBAR
========================================================= */

.panel::-webkit-scrollbar {
  width: 4px;
}

.panel::-webkit-scrollbar-track {
  background: transparent;
}

.panel::-webkit-scrollbar-thumb {
  background:
    rgba(135, 255, 173, 0.15);
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {

  main {
    grid-template-columns:
      150px
      1fr;
  }

  .panel {
    display: none;
  }

}


@media (max-width: 650px) {

  main {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  header {
    padding: 0 18px;
  }

  footer {
    padding: 0 18px;
  }

  .view-header {
    left: 20px;
  }

  .hint {
    left: 20px;
  }

}


/* =========================================================
   ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {

  .intro {
    animation: none;

    display: none;
  }

  .intro-inner {
    animation: none;
  }

  * {
    scroll-behavior: auto !important;
  }

}
