/* node.css */

/* ── Title overlay typography ────────────────────── */

#title-overlay h1.title-name {
  font-size: 104px;
  text-align: left;
  margin-bottom: 8px;
  font-family: 'Roboto Mono', monospace;
}

#title-overlay p.title-sub {
  font-style: italic;
  text-align: center;
  font-size: 52px;
  font-family: 'Roboto Mono', monospace;
}

/* ── Sources intro ───────────────────────────────── */

.sources-intro {
  margin-bottom: 48px;
}

.sources-intro-zitat {
  font-style: italic;
}

p.sources-intro-anekdote {
  font-family: 'Reenie Beanie', cursive;
  font-size: 20px;
  line-height: 1.78;
}

/* ── Floating keywords ───────────────────────────── */

.floating-keyword {
  position: absolute;
  z-index: 3;
  font-size: 20px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  pointer-events: all;
  white-space: nowrap;
  transition: text-shadow 0.2s ease;
  will-change: transform;
}

.floating-keyword:hover {
  text-shadow: 0 0 2px #fff, 0 0 5px #fff, 0 0 10px #fff;
}

.floating-keyword.visited {
  color: rgba(200, 60, 40, 0.75);
}

/* ── Source references ───────────────────────────── */

sup.source-ref {
  font-size: 0.65em;
  vertical-align: super;
  line-height: 0;
}

/* ── Zitat italic ────────────────────────────────── */

.node-card.zitat .node-preview {
  font-style: italic;
  font-weight: 300;
}

#expanded-card.zitat .exp-title,
#expanded-card.zitat .exp-content,
#expanded-card.zitat .exp-source {
  font-style: italic;
  font-weight: 300;
}

/* ── Anekdote font ───────────────────────────────── */

.node-card.anekdote .node-preview {
  font-family: 'Reenie Beanie', cursive;
  font-size: calc(26px * var(--node-scale, 1));
}

#expanded-card.anekdote .exp-title {
  font-family: 'Reenie Beanie', cursive;
  font-size: 34px;
}

#expanded-card.anekdote .exp-content {
  font-family: 'Reenie Beanie', cursive;
  font-size: 20px;
}

#expanded-card.anekdote .exp-source {
  font-family: 'Reenie Beanie', cursive;
  font-size: 17px;
}

/* ── Visited trace glow ─────────────────────────── */

.node-card.visited {
  --glow-color: rgba(255, 70, 50, 0.28);
}

.node-card.visited .node-glow {
  background: radial-gradient(circle, rgba(255, 70, 50, 0.28) 0%, transparent 70%);
}

.exp-keyword.visited {
  color: rgba(200, 60, 40, 0.75);
  text-shadow: 0 0 8px rgba(255, 80, 60, 0.2);
}

.conn-chip.visited {
  border-color: rgba(255, 70, 50, 0.3);
  color: rgba(190, 55, 35, 0.7);
  box-shadow: 0 0 6px rgba(255, 70, 50, 0.12);
}

/* ── Node cards (in space) ───────────────────────── */

.node-card {
  position: absolute;
  top: 0;
  left: 0;
  cursor: pointer;
  transition: opacity 0.3s;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
}

.node-glow {
  position: absolute;
  width: 180%;
  height: 180%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-color, rgba(80, 140, 180, 0.55)) 0%, transparent 70%);
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}

.node-thumb,
.node-preview {
  position: relative;
  z-index: 1;
}

.node-card:hover {
  opacity: 0.75;
}

.node-card:hover .node-glow {
  opacity: 0;
}


.node-card:hover .node-thumb {
  filter: drop-shadow(0 0 14px rgba(255,255,255,0.8));
  transition: filter 0.3s ease;
}

.node-thumb {
  display: block;
  width: calc(340px * var(--node-scale, 1));
  max-height: calc(260px * var(--node-scale, 1));
  height: auto;
  object-fit: contain;
  pointer-events: none;
}


.node-preview {
  font-size: calc(15px * var(--node-scale, 1));
  color: #333333;
  line-height: 1.6;
  width: calc(280px * var(--node-scale, 1));
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 10;
  -webkit-box-orient: vertical;
}

/* ── Overlay ─────────────────────────────────────── */

#overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#overlay.visible {
  opacity: 1;
  pointer-events: all;
}

#overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(235, 244, 252, 0.35);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#expanded-card {
  position: relative;
  z-index: 1;
  background: none;
  border: none;
  border-radius: 0;
  width: min(700px, 90vw);
  max-height: 84vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: 52px 56px 48px;
  box-shadow: none;
  transform: translateY(18px);
  transition: transform 0.4s ease;
}

#overlay.visible #expanded-card {
  transform: translateY(0);
}

/* ── Adjacent keyword node previews ─────────────────────── */
.adj-preview {
  position: absolute;
  top: 0;
  bottom: 0;
  width: calc(min(700px, 90vw) / 3);
  z-index: 0;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  opacity: 0.5;
  transition: opacity 0.25s ease;
}

.adj-preview:hover {
  opacity: 0.75;
}

#node-preview-left {
  left: 0;
  justify-content: flex-end;
}

#node-preview-right {
  right: 0;
  justify-content: flex-start;
}

.adj-preview-card {
  width: min(700px, 90vw);
  flex-shrink: 0;
  padding: 52px 56px 48px;
  max-height: 84vh;
  overflow: hidden;
  filter: blur(4px);
  pointer-events: none;
}

#close-btn {
  position: absolute;
  top: 20px;
  right: 26px;
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}

#close-btn:hover {
  color: var(--text);
}

.exp-type {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.exp-title {
  font-size: 26px;
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 28px;
  color: var(--text);
}

.exp-body {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.exp-keywords {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  min-width: 80px;
}

.exp-keyword {
  font-size: 20px;
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.2s;
}

.exp-keyword:hover {
  text-shadow: 0 0 2px #fff, 0 0 5px #fff, 0 0 10px #fff;
}

.exp-main {
  flex: 1;
  min-width: 0;
}

.exp-image {
  width: 100%;
  max-height: 52vh;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 28px;
  display: block;
}

.exp-image--full {
  max-height: none;
  border-radius: 0;
  object-fit: unset;
}

.exp-content {
  font-size: 15px;
  line-height: 1.78;
  white-space: pre-wrap;
  margin-bottom: 28px;
  color: var(--text);
}

.exp-source {
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
  line-height: 1.65;
  white-space: pre-wrap;
  border-top: 1px solid var(--border);
  padding-top: 22px;
  margin-bottom: 26px;
}

.exp-connections-label {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.exp-connections {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.conn-chip {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 11px;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  transition: all 0.2s;
}

.conn-chip:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ── Page overlays (Sources / About) ─────────────────── */

.page-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.page-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.page-overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(235, 244, 252, 0.35);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.page-overlay-card {
  position: relative;
  z-index: 1;
  background: none;
  width: min(700px, 90vw);
  max-height: 84vh;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 52px 56px 48px;
  transform: translateY(18px);
  transition: transform 0.4s ease;
}

.page-overlay.visible .page-overlay-card {
  transform: translateY(0);
}

.page-overlay-card h1 {
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 32px;
  color: var(--text);
}

.page-overlay-card p {
  font-size: 15px;
  line-height: 1.78;
  color: var(--text);
  margin-bottom: 18px;
}

/* ── About intro nav hint ────────────────────────── */
.about-nav-hint {
  margin-top: 50px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}

.about-nav-hint.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.about-enter {
  font-size: 104px;
  font-weight: bold;
  font-style: normal;
  margin-top: 60px;
  margin-bottom: 48px;
  cursor: pointer;
  color: var(--text);
  transition: text-shadow 0.2s ease;
  text-align: right;
}

.about-enter:hover {
  text-shadow: 0 0 2px #fff, 0 0 8px #fff, 0 0 18px #fff;
}

/* ── Navigation intro overlay ─────────────────────────── */

.nav-intro-overlay {
  z-index: 201;
  background: rgba(235, 244, 252, 0.12);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.nav-intro-card {
  position: relative;
  z-index: 1;
  text-align: left;
  transform: translateY(18px);
  transition: transform 0.4s ease;
}

.nav-intro-overlay.visible .nav-intro-card {
  transform: translateY(0);
}

.nav-intro-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}

.nav-intro-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nav-intro-list li {
  font-size: 15px;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.nav-intro-action {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text);
  text-transform: uppercase;
  min-width: 130px;
  flex-shrink: 0;
}

.page-close-btn {
  position: absolute;
  top: 20px;
  right: 26px;
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}

.page-close-btn:hover {
  color: var(--text);
}

.source-entry {
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

.source-entry:last-child {
  border-bottom: none;
}

.source-entry h3 {
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.source-entry p {
  font-size: 13px;
  font-style: italic;
  line-height: 1.7;
  color: var(--text);
  margin: 0;
}
