
/* ---------------------------
   Base & Reset
--------------------------- */
html, body {
  margin: 0;
  padding: 0;
  height: 500vh;   /* allows scrolling for knot animation */
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}

/* ---------------------------
   Dark / Light Mode Variables
--------------------------- */
:root {
  --bg-color: #000000;      /* default = dark mode */
  --text-color: #ffffff;
  --accent-color: #00ffff;
}

body.light {
  --bg-color: #ffffff;
  --text-color: #000000;
  --accent-color: #00ffff;
}

/* ---------------------------
   Canvas
--------------------------- */
canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------------------------
   Content layer
--------------------------- */
.content {
  position: relative;
  z-index: 10;
  text-align: center;
  margin-top: 40vh;  /* adjust to center content relative to scroll */
}

/* ---------------------------
   Navigation links
--------------------------- */
nav a {
  margin: 0 15px;
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--accent-color);
}

/* ---------------------------
   3D Knot UI Sections
--------------------------- */
#ui {
  position: fixed;
  inset: 0;
  pointer-events: none;  /* allow clicks to pass through */
  z-index: 100;
}

.section {
  position: absolute;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease-out, color 0.3s;
  color: var(--text-color);
  font-size: 24px;
  pointer-events: none;  /* controlled via JS click handler if needed */
  white-space: nowrap;
  font-weight: bold;
}

/* ---------------------------
   Theme Toggle Button
--------------------------- */
#themeToggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 101;
  pointer-events: auto;  /* ensure it's clickable */
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  background-color: var(--accent-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}

#themeToggle:hover {
  opacity: 0.8;
}
