/* Sidebar: left drawer, closed by default */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;                  /* closed */
  overflow-x: hidden;
  background-color: #58595b;
  transition: width 0.3s ease;
  z-index: 1000;
  padding-top: 60px;         /* your existing spacing */
}

/* When open, set a fixed width (drawer size) */
.sidebar.open {
  width: 300px;
}

/* Sidebar Links */
.sidebar a{
    padding: 10px 15px;
    text-decoration: none;  /*can create underlines, overline, or none || theres also color and style (double, dotted, dashed) */
    font-size: 18px;
    color: white;
    display: block;
    transition: 0.2s;
}

.sidebar a:hover {
    background-color: #ff8200;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px var(--page-padding);
  /* keep it in normal flow so the whole layout shifts with the drawer */

  /* position: sticky;     stays at top when scrolling */
  top: 0;
  z-index: 1001;        /* > sidebar (1000) so the button is clickable */
  background: #fff;     /* so it doesn’t look transparent over content */
}

/*close button (x) */
.sidebar .closebtn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
}

/* SIDEBAR TABLE OF CONTENTS*/

/* This hides the little default arrow browsers put next to <summary> */
.sidebar summary::-webkit-details-marker { display: none; } 

/* The box around each collapsible section */
.sidebar details.toc {
    border-top: 1px solid #ff8200;
    padding-bottom: 4px;
}

.sidebar details.toc > .toc-list {
  padding: 8px 16px 12px;
}

.sidebar details.toc details.toc {
  margin-left: 8px;       /* indent nested chapters slightly */
  border-top: none;       /* optional: no line between nested items */
}

.sidebar .toc-list ul {
  list-style: none;
  padding-left: 0;
  margin: 6px 0 0;
}

.sidebar .toc-list li + li {
  margin-top: 4px;
}

.sidebar summary {
    padding: 12px 16px;
    cursor: pointer;       /* makes the mouse turn into a hand when you hover */
    color: #fff;
    font-weight: 600;      /* how thick the text looks (400 = normal, 600 = medium-bold, 700 = bold) */
    display: flex;         /* lets items inside line up easily in a row */
    align-items: center;   /* keeps items in the middle vertically */
    justify-content: space-between; /* puts one item on the far left and another on the far right */
}

/* Add an arrow symbol after the summary text */
.sidebar summary::after { 
  /* ::after means "stick something after this element without adding real HTML" */
  content: "›";           /* this symbol › is our arrow (called a chevron) */
  transform: rotate(90deg); /* rotate it so it points to the right when closed */
  transition: transform 0.2s ease; /* makes the arrow turn smoothly */
  font-size: 18px;
  opacity: 0.8;            /* makes it a bit see-through */
}

/* When the section is opened, rotate the arrow down */
.sidebar details[open] > summary::after { 
  /* details[open] means: only apply when the <details> is open */
  transform: rotate(270deg); /* now the arrow points down */
}

/* TOC list */
.sidebar .toc-list {
  display: grid;
  gap: 6px;
  padding: 8px 16px 12px 16px;
}

/* TOC links */
.sidebar .toc-list a {
  color: #ff8200;
  text-decoration: none;
  font-size: 15px;
  padding: 6px 8px;
  border-radius: 6px;
}

.sidebar .toc-list a:hover {
  background: #ff8200;
  color: #111;
}

/* shift BOTH topbar and main when the sidebar opens */
body.sidebar-open .topbar { margin-left: 150px; transition: margin-left 0.3s ease; }
body.sidebar-open #main   { margin-left: 150px; transition: margin-left 0.3s ease; }


/* Main content */
#main {
  transition: margin-left 0.3s; /* pushes content when sidebar opens */
  padding: var(--page-padding);
}



/* Button to open sidebar */
.openbtn {
font-size: 20px;
padding: 10px 15px;
cursor: pointer;
background-color: #58595b;
color: white;
border: none;
}

.openbtn:hover {
background-color: #ff8200;
}


/* header */
.header-card {
    background-color: #ff8200;
    color: aliceblue;
    padding: 14px 18px;
    margin: 0;
    border-radius: 8px;
    width: 100%;
}


.profile-pic {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 4px 13px rgba(0,0,0,.3);
}

.info-card {
    white-space: pre-line;
}
.info-card p{
  margin: 0;
}
.warning {
  color: red;
}