/* style.css */
:root {
  --bg-color: #ffffff;
  --text-color: #333333;
  --link-color: #0056b3;
  --link-hover: #003d82;
  --header-bg: #f9f9f9;
  --border-color: #eaeaea;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --link-color: #66b3ff;
    --link-hover: #99ccff;
    --header-bg: #1e1e1e;
    --border-color: #333333;
  }
  .logo img {
    filter: invert(1);
    mix-blend-mode: screen;
  }
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
}

nav {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 40px; /* Adjust size as needed */
  width: auto;
  mix-blend-mode: multiply;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  font-size: 1rem;
}

.nav-links a:hover {
  text-decoration: underline;
}

main {
  flex: 1;
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

h1, h2, h3 {
  color: var(--text-color);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  opacity: 0.9;
}

a {
  color: var(--link-color);
}

a:hover {
  color: var(--link-hover);
}

ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

li {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.7;
}

@media (max-width: 600px) {
  nav {
    flex-direction: column;
    gap: 1.5rem;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  h1 {
    font-size: 2rem;
  }
}

/* Graph container */
#graph-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

#graph-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* SVG Node styles */
.node circle {
  stroke-width: 2px;
  transition: filter 0.1s, transform 0.1s;
  cursor: pointer;
}

.node:not(.blank) circle {
  filter: drop-shadow(0 0 10px #FFE6DB);
}

.node.blank circle {
  filter: drop-shadow(0 0 4px #B8D4FF);
}

.node:hover circle {
  filter: brightness(1.25) drop-shadow(0 0 15px #FFE6DB);
}

.node text {
  font-family: var(--font-family);
  fill: #000; /* Dark text for contrast on baby blue */
  pointer-events: none;
  font-weight: bold;
  text-anchor: middle;
  dominant-baseline: central;
}

.node:hover text {
  fill: #000;
}

.link {
  stroke: #1e5a7a; /* Faint blue lines */
  stroke-opacity: 0.6;
  stroke-width: 1px;
}

/* Modal / Popover */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 1000;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-color);
  padding: 2rem;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  position: relative;
  border: 1px solid var(--border-color);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 1.5rem;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-color);
}

.modal-close:hover {
  color: var(--link-hover);
}
