/* ==========================================================================
   1. Core Reset & Typography
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  color: #333333;
  background-color: #f8f9fa;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   2. Layout Structure
   ========================================================================== */
header {
  background-color: #ffffff;
  color: #111111;
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 2rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  z-index: 100;
}

header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.layout {
  display: flex;
  flex: 1;
  margin-top: 60px; /* Pushes content down past the fixed header */
  min-height: calc(100vh - 110px); /* Keeps footer at bottom */
}

/* ==========================================================================
   3. Sidebar Navigation
   ========================================================================== */
#Sidebar {
  width: 260px;
  background-color: #ffffff;
  border-right: 1px solid #e5e7eb;
  position: fixed;
  top: 60px;
  bottom: 50px; /* Stops right above the footer */
  left: 0;
  overflow-y: auto;
  padding: 2rem 1.5rem;
}

#Sidebar ul {
  list-style: none;
}

#Sidebar li {
  margin-bottom: 0.5rem;
}

.nav-link {
  display: block;
  color: #4b5563;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background-color: #f3f4f6;
  color: #111111;
}

/* Driven by your router.js script */
.nav-link.active {
  background-color: #eff6ff;
  color: #2563eb;
  font-weight: 600;
}

/* ==========================================================================
   4. Dynamic Content View Area
   ========================================================================== */
#content-view {
  flex: 1;
  margin-left: 260px; /* Offsets the content so it doesn't hide behind Sidebar */
  padding: 2.5rem 3.5rem;
  max-width: 900px; /* Limits reading line-length for better UX */
}

/* Styling documentation content fragments */
#content-view h2 {
  font-size: 1.75rem;
  color: #111111;
  margin-bottom: 1rem;
  font-weight: 700;
}

#content-view p {
  margin-bottom: 1.25rem;
  color: #4b5563;
}

#content-view pre {
  background-color: #1e1e1e;
  color: #d4d4d4;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

#content-view code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
}

/* ==========================================================================
   5. Footer Area
   ========================================================================== */
footer {
  background-color: #ffffff;
  border-top: 1px solid #e5e7eb;
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
  color: #9ca3af;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  z-index: 100;
}
