/* ==========================================================================
   GLOBAL STYLES & VARIABLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary-color: #476FFF;
  --secondary-color: #D44E99;
  --background-color: rgb(241, 243, 249);
  --text-color: #475467;
  --heading-font: 'Roboto', sans-serif;
  --body-font: 'Open Sans', sans-serif;
  --transition-speed: 0.3s;
  --top-bar-height: 40px;
}

html body {
  margin: 0;
  padding: 0;
  font-family: var(--body-font);
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
  display: block;
  height: 100%;
}

/* ==========================================================================
   TYPOGRAPHY & ELEMENTS
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  color: var(--primary-color);
  margin-bottom: 1rem;
  line-height: 1.2;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color var(--transition-speed);
}

a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

button {
  background-color: var(--primary-color);
  color: #FFF;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-family: var(--body-font);
  transition: background-color var(--transition-speed);
}

button:hover {
  background-color: var(--secondary-color);
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.layout-wrapper {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar-fixed {
  position: relative;
  width: 15rem;
  min-width: 14rem;
  max-width: 24rem;
  background-color: #0A0F2C;
  padding: 1rem;
  overflow: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
  cursor: ew-resize;
  background-color: rgba(255, 255, 255, 0.2);
  z-index: 10;
}

.main-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #fff;
}

.top-bar {
  background-color: #ffffff;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  height: 60px;
  border-bottom: 1px solid #e5e7eb;
}

.top-bar-left,
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
}

.topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.main-scroll {
  flex-grow: 1;
  overflow-y: auto;
  padding: 2rem;
  background-color: #fff;
  width: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.main-scroll::-webkit-scrollbar {
  display: none;
}

.sidebar-logo {
  text-align: center;
  margin-bottom: 2rem;
  margin-top: 0;
}

.sidebar-logo-img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  transform: scale(0.8);
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav-item {
  margin-bottom: 1rem;
}

.sidebar-nav-link {
  display: block;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background-color var(--transition-speed);
}

.sidebar-nav-link:hover,
.sidebar-nav-link:focus {
  background-color: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.sidebar-subnav {
  list-style: none;
  padding-left: 1rem;
  margin-top: 0.5rem;
}

.sidebar-subnav-item {
  margin-bottom: 0.5rem;
}

.sidebar-subnav-link {
  color: #CBD5E1;
  font-size: 1.1rem;
  padding: 0.4rem 1rem;
  display: block;
  border-radius: 4px;
  transition: background-color var(--transition-speed);
}

.sidebar-subnav-link:hover,
.sidebar-subnav-link:focus {
  background-color: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.sidebar-icon {
  margin-right: 0.5rem;
  display: inline-block;
  width: 1.2rem;
  text-align: center;
}

.custom-dropdown-btn {
  border: 1px solid #d3d3d3;
  font-size: 1.2rem;
  background-color: #ffffff;
  color: #000;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.custom-dropdown-btn .dropdown-icon {
  margin-right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  vertical-align: middle;
}

.tutorial-card  {
  background-color: #fff;
  color: #000;
  border: none;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}


/* ==========================================================================
   REMARK.JS STYLES – clean base
   ========================================================================== */
.remark-slide-content {
  font-family: var(--body-font);
  color: var(--text-color);
  line-height: 1.5;
  font-size: 1em;       /* baseline, remark scaler adjusts */
  padding: 2rem;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.remark-slide-content h1,
.remark-slide-content h2,
.remark-slide-content h3 {
  font-family: var(--heading-font);
  color: var(--primary-color);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.remark-slide-content h1 { font-size: 2.2em; }
.remark-slide-content h2 { font-size: 1.6em; }
.remark-slide-content h3 { font-size: 1.3em; }

.remark-slide-content a {
  color: var(--secondary-color);
  text-decoration: none;
}
.remark-slide-content a:hover {
  text-decoration: underline;
  color: var(--primary-color);
}

.remark-slide-number {
  color: #888;
  font-size: 0.8em;
  position: absolute;
  bottom: 10px;
  right: 20px;
}

.remark-slide-content code {
  background-color: #f0f0f0;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: monospace;
}
.remark-slide-content pre code {
  display: block;
  padding: 1rem;
  overflow-x: auto;
}

.remark-slide-content img {
  display: block;
  margin: 1rem auto;
  max-width: 90%;
  max-height: 80%;
  height: auto;
  width: auto;
  object-fit: contain;
}

.remark-slide-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95em;
}
.remark-slide-content th,
.remark-slide-content td {
  border: 1px solid #ddd;
  padding: 0.5rem 0.8rem;
  text-align: left;
  vertical-align: top;
}
.remark-slide-content th {
  background-color: #f8f9fa;
  font-weight: bold;
}
.remark-slide-content tr:nth-child(even) { background-color: #fdfdfd; }

/* Only affect slides tagged with with-image */
/* Only slides tagged with with-image */
.remark-slide-content.with-image {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.remark-slide-content.with-image > *:not(img) {
  flex: 0 0 auto;
}

.remark-slide-content.with-image img {
  flex: 1 1 auto;       /* shrink/expand */
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  margin: 1rem auto;
}

.tutorial-toc-fixed {
  position: relative;
  width: 15rem;
  min-width: 14rem;
  max-width: 24rem;
  padding: 1rem 0.5rem;
  border-radius: 6px;
  box-shadow: none;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  height: 100vh;
  font-family: var(--heading-font);
  color: var(--primary-color);
  font-size: 1.1rem;
  background: none;
}

.tutorial-toc-fixed ul,
.tutorial-toc-fixed ol {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.tutorial-toc-fixed li {
  padding-left: 0;
  margin-bottom: 0.3em;
}

.tutorial-toc-fixed a {
  color: var(--primary-color);
  font-size: 1em;
  text-decoration: none;
  transition: color var(--transition-speed);
}

.tutorial-toc-fixed a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.chapter-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--heading-font);
  color: var(--primary-color);
  font-size: 2em;
  font-weight: 700;
  margin: 2.5rem 0 1.5rem 0;
  letter-spacing: 0.03em;
  height: 100%;
  width: 100%;
  text-align: center;
}

.column-img {
  width: 100%;
  object-fit: contain;
  display: block;
}

