@charset "UTF-8";
@import url("https://fonts.googleapis.com/css2?family=Overpass+Mono:wght@300..700&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");
/* Design tokens and fallbacks (top-level, not nested) */
:root {
  --card-bg: #ffffff;
  --card-border: rgba(0,0,0,0.06);
  --muted-text: #9aa1b3;
  --accent: #8b6cef;
  --background-primary: #0b0b0b;
  --content-max: 1100px;
  /* Navbar + graph (ForceGraph reads these) */
  --navbar-bg: #f7f7f7;
  --navbar-fg: #0b0b0b;
  --graph-main: #8b6cef;
  --graph-muted: rgba(139,108,239,.45);
}

/* Base */
html, body, .livebar {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: auto; /* safety: restore scroll unless a fullscreen overlay is on top */
}

body {
  margin: 0;
  font-family: "Overpass Mono", monospace;
}

html, body {
  height: 100%;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content {
  flex: 1;
}

/* Containment for wide sections */
.cards-wrap {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: 1rem;
}

/* Cards grid — 2 columns (mobile: 1) */
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cards.grid-2x4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 560px) {
  .cards.grid-2x4 {
    grid-template-columns: 1fr;
  }
}
.cards.grid-2x4 .card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.cards.grid-2x4 .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.12);
}

.cards.grid-2x4 .card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.cards.grid-2x4 .card p {
  margin: 0;
  color: var(--muted-text);
  font-size: 0.92rem;
}

.card .badge {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.66rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* Graph containers */
#graph, #link-graph, #full-graph-container {
  position: relative;
  z-index: 1;
  max-width: 100%;
  overflow: hidden;
}

.graph-fs {
  position: fixed !important;
  inset: 0;
  z-index: 1000;
  background: var(--background-primary);
}

#full-graph-container, #full-graph-page {
  width: 100%;
  height: calc(100vh - 160px);
  min-height: 420px;
}

.graph-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0 1rem;
  font-size: 0.9rem;
  color: var(--muted-text);
}

.graph-controls .gc-left, .graph-controls .gc-right {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.graph-controls .gc-search {
  width: 180px;
  background: #1b1b1b;
  color: #e5e5e5;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
}

/* Navbar color lock */
.navbar {
  background: var(--navbar-bg);
  color: var(--navbar-fg);
}

/* Heading scale (restore visual hierarchy) */
h1 {
  font-size: clamp(2.1rem, 4.5vw, 2.8rem);
  line-height: 1.15;
  font-weight: 600;
  margin: 1.4rem 0 0.9rem;
}

h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.2rem);
  line-height: 1.2;
  font-weight: 600;
  margin: 1.3rem 0 0.8rem;
}

h3 {
  font-size: clamp(1.35rem, 2.6vw, 1.6rem);
  line-height: 1.25;
  font-weight: 600;
  margin: 1.1rem 0 0.6rem;
}

h4 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0.9rem 0 0.5rem;
}

h5 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.8rem 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

h6 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0.7rem 0 0.4rem;
  opacity: 0.75;
}

/* Tighten spacing when headings follow each other */
h1 + h2, h2 + h3, h3 + h4 {
  margin-top: 0.4rem;
}

/* Preserve line breaks in note content */
.content p {
  white-space: pre-line;
}

/* Optional: scale down on small screens */
@media (max-width: 640px) {
  h1 {
    font-size: 1.8rem;
  }
  h2 {
    font-size: 1.4rem;
  }
  h3 {
    font-size: 1.1rem;
  }
}
#nav-title {
  font-size: 1.2rem !important;
  line-height: 1.05;
  margin: 0.6rem 0;
}

.home-hero {
  margin-block: 3rem 4rem;
}

.home-hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 0.5rem;
}

.home-hero .tagline {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.home-hero p {
  max-width: 42rem;
  margin-inline: auto;
  margin-bottom: 1.5rem;
}

.home-hero .quick-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.home-hero .quick-links a {
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

/* Sections */
section {
  margin-block: 3.5rem;
}

section h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin-bottom: 1.2rem;
  border-bottom: 2px solid var(--card-border);
  padding-bottom: 0.4rem;
}

section .more {
  margin-top: 1.5rem;
  text-align: right;
}

section .more a {
  font-weight: 600;
}

/* Panel (for zettel gateway block) */
.panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1.5rem;
}

.panel h3 {
  margin-top: 0;
}

.panel .button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
}

/* Live dashboard (same treatment as panel) */
.live-dashboard {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1.5rem;
}

/* Footer styles */
footer {
  background: var(--footer-bg, #f8f8f8);
  padding: 1rem;
}

/* Wikilink styling (internal links) */
a.internal-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid color-mix(in oklab, var(--accent) 40%, transparent);
  transition: border-color 0.15s ease;
}

a.internal-link:hover {
  border-bottom-color: var(--accent);
}

/* Unresolved wikilinks (dead links) */
a.internal-link.is-unresolved {
  color: color-mix(in oklab, var(--accent) 60%, #999);
  font-weight: 600;
  opacity: 0.7;
  border-bottom-style: dashed;
}
