/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: 'Inter', sans-serif;
  background-color: #f8f9fa;
  color: #2c3e50;
  line-height: 1.6;
  font-size: 16px;
/*   background-color: rgba(52,73,94,0.8); */
}

a {
  color: #157878;
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: #145f6c;
  text-decoration: underline;
}

/* Layout */
body {
  display: flex;
  min-height: 100vh;
  flex-direction: row;
}

.sidebar {
  width: 250px;
  background-color: #2c3e50;
  color: white;
  padding: 10px 15px;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  z-index: 10;
  font-size: 14px;
  scrollbar-width: thin;
  scrollbar-color: #dee2e6 transparent;
}

.main-content {
  position: relative; /* Allow absolute positioning inside */
  margin: 0px 250px;
  padding: 0px 0px;
  flex: 1;
  max-width: calc(100vw - 250px);
  background-color: white;
}

/* .main-content .toc {
  position: absolute;
  top: 100px;
  right: -280px;
  width: 250px;
  background-color: #f9f9f9;
  border-left: 1px solid #ccc;
  padding: 1rem;
  font-size: 0.9rem;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
} */

.main-content .toc {
  position: fixed;
  top: 0px;
  right: 0px;
  width: 250px;
  background-color: #f9f9f9;
  border-left: 1px solid #dee2e6;
  padding: 1rem;
  font-size: 0.9rem;
  height: 100vh;
  overflow-y: hidden;
  z-index: 5;
  font-size: 13px;
}


/* Center heading inside ToC */
.main-content .toc h2 {
  text-align: center;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

/* Sidebar */
.sidebar h2 {
  font-size: 1.2rem;
  margin-top: 5px !important;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: white 1px solid;
  color: white;
  text-align: center;
}

.sidebar-section {
  margin-top: 7px;
}
.sidebar-section h3 {
  font-size: 0.9rem;
  margin-bottom: 10px;
  color: #ecf0f1;
}
.sidebar-section ul {
  list-style: none;
  padding-left: 0;
}
.sidebar-section li {
  margin-bottom: 5px;
  padding-left: 20px;
  padding-right: 10px;
}
.sidebar-section a {
  display: block;
  padding: 5px 15px;
  border-radius: 6px;
  background-color: #34495e;
  color: white;
  font-size: 13px;
  transition: background-color 0.3s;
}
.sidebar-section a:hover {
  background-color: #1abc9c;
}

/* Page Header */
.page-header {
  padding: 60px 0;
  text-align: center;
  border-bottom: 1px solid #dee2e6;
  background-color: #f9f9f9;
/*   background-color: rgba(52,73,94,0.8); */
}
.page-header .project-name {
  font-size: 2.2rem;
  margin-bottom: 10px;
}
.page-header .project-tagline {
  font-size: 1.2rem;
  color: #6c757d;
}

/* Footer */
.site-footer {
  padding-top: 10px;
  border-top: 1px solid #dee2e6;
  font-size: 0.9rem;
  color: #6c757d;
  text-align: center;
/*   background-color: rgba(52,73,94,0.8); */
}
.site-footer a {
  color: #157878;
}
.site-footer a:hover {
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-block;
  background-color: #2c3e50;
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  opacity: 0.8;
  transition: background-color 0.3s ease;
}
.btn:hover {
  opacity: 0.6;
  color: white;
}

/* main h1,main h2,main h3,main h4,main h5,main h6,main p,main ul,main ol,main li {
  padding: 0px 25px;
} */

main {
  padding: 10px 25px;
  background: #f9f9f9;
}

main button {
  border: 1px solid #dee2e6;
  border-radius: 5px;
  padding: 10px 10px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  background-color: #2c3e50; 
  color: white;
  opacity: 0.8;
}

main button:hover {
  opacity: 0.6;
  color: white;
}

/* Markdown Content Styling */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0.2em;
  margin-bottom: 0.3em;
  font-weight: 600;
  color: #2c3e50;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.3rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1.2em;
}

ul, ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
}
li {
  margin-bottom: 0.5em;
}

code {
  background-color: #f0f0f0;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: Menlo, Consolas, monospace;
  font-size: 0.95em;
}

pre {
  background-color: #f0f0f0;
  padding: 1em;
  border-radius: 6px;
  overflow-x: auto;
}

blockquote {
  border-left: 4px solid #ccc;
  padding-left: 1em;
  color: #555;
  margin: 1.5em 0;
  font-style: italic;
}

/* Responsive */
@media (max-width: 1024px) {
  .main-content .toc {
    position: static;
    width: 100%;
    border-left: none;
    border-top: 1px solid #ccc;
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .main-content {
    margin-left: 0;
    padding: 20px;
    max-width: 100%;
  }
}
