/* General Reset & Typography */
body {
  font-family: 'Open Sans', Arial, sans-serif;
  line-height: 1.6;
  color: hsl(0, 0%, 20%);
  margin: 0;
}

h1, h2 {
  color: #222;
  margin-top: 10px;
}

/* Sidebar Navigation */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100%;
  border-right: 2px solid hsl(0, 0%, 80%);
  background-color: #fff;
  z-index: 10;
}

#navbar header {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid #ccc;
}

#nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  height: calc(100vh - 80px);
  overflow-y: auto;
}

#nav-list li {
  padding: 15px;
  border-bottom: 1px solid hsl(0, 0%, 90%);
  transition: all 0.2s ease;
  cursor: pointer;
}

#nav-list li:hover {
  background-color: hsl(200, 70%, 95%);
  color: hsl(200, 70%, 30%);
  padding-left: 25px; /* Subtle movement effect */
}

.nav-link {
  text-decoration: none;
  color: #333;
  display: block;
}

/* Main Content Area */
main {
  margin-left: 320px;
  padding: 20px;
  max-width: 1000px;
}

.main-section {
  margin-bottom: 40px;
  text-align: justify;
}

.main-section h2 {
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}

/* Code Block Styling */
code {
  background-color: #fdf6e3;
  display: block;
  line-height: 1.8;
  white-space: pre-wrap;
  word-wrap: break-word;
  border-radius: 6px;
  padding: 15px;
  margin: 15px 0;
  font-family: 'Courier New', monospace;
  border-left: 5px solid #d3af37;
}

/* Responsive Design */
@media (max-width: 810px) {
  #navbar {
    position: relative;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 2px solid #ccc;
  }
  
  #nav-list {
    max-height: 250px;
  }
  
  main {
    margin-left: 0;
    padding: 15px;
  }
}

@media (max-width: 500px) {
  body {
    font-size: 15px;
  }
  
  h1 {
    font-size: 1.5rem;
  }
}
