:root {
  --black: #000000;
  --white: #ffffff;
  --gray: #f7f7f7;
  --blue: #007bff;
  --bg-color: #fef9e4; /*var(--gray);*/
  --bg-color-highlight: #ffe;
  --fg-color: #000000; /*var(--black)*/;
  --dark-bg-color: #1a1a1a; /*var(--black);*/
  --dark-fg-color: #ffffff; /*var(--white);*/
  --hover-color: #007bff; /*var(--blue);*/

}

   /* ==========================================================================
   Base
   ========================================================================== */

body {
    width: max(56vw, 78ch, 50rem);
    min-height: 100vh;

    margin-left: auto;
    margin-right: auto;
    margin-top: 2vh;
    margin-bottom: 60px;

    font-family: Monaco, "Courier New", monospace;
    font-size: 16px;
    font-weight: 400;
    line-height: 18px;

    color: var(--fg-color);
    background: var(--bg-color);

}

/* Light theme */
body[theme="light"] {
  --bg-color: #fef9e4;
  --bg-color-highlight: #ffe;
  --fg-color: #000000;
}

/* Dark theme */
body[theme="dark"] {
  --bg-color: #000000;
  --bg-color-highlight: #1a1a1a;
  --fg-color: #ffffff;
}

.grayscale {
    -webkit-filter: grayscale(50%);
    -moz-filter: grayscale(50%);
    -ms-filter: grayscale(50%);
    filter: grayscale(50%);
}


/* ==========================================================================
   Typography
   ========================================================================== */


h1, h2, h3, h4, h5, h6 {
	/*color: rgb(0, 64, 255);*/
    line-height: normal;
	font-family:
        'Helvetica Neue',
	    'Helvetica',
	    sans-serif;
}

ul, ol {
    margin-top: 0.5rem;
    padding-left: 1.5em; /* 20px */
}

a:link, a:visited {
  color: var(--blue); /* Change this to the desired color */
  text-decoration: none; /* Optional: Removes underline */
}

a:hover {
  text-decoration: underline; /* Optional: Adds underline on hover */
}

code, pre, tt {
    font-family: 'Go mono';
    display: inline-block; /* Fix the overflow */
    overflow-wrap: inherit;
    text-align: left;
    font-size: 12pt;
    font-weight: 500;
}


pre {
    width: 96%;
    background-color: var(--bg-color-highlight);
    }

pre > code {
    background-color: var(--bg-color-highlight);
}

code {
    font-family: 'Courier New', Courier, monospace;
}

.codeblock {
    padding: 20px;
    display: block;
    margin: 20px auto;
    white-space: pre;
    overflow-x: auto;
    overflow: scroll;
}

p > code, p > tt { /* Give code inside a paragraph a little room. */
    padding: 0 0.25em;
}

pre {
    border: 1px solid var(--fg-color);
    padding: 0.5em 0.8em;
}

table {
  text-align: justify;
  width: 100%;
  border-collapse: collapse; }

td, th {
  padding: 0.5em;
  border-bottom: 1px solid var(--fg-color); }

blockquote{ padding:0 0 0 1rem;
            margin:.8rem 0;
            background-color:var(--bg-color-highlight);
            color:var(--fg-color);
            border-left:.25rem solid var(--fg-color);
          }

blockquote p {
  margin-bottom: 0; }

img, video {
  height: auto;
  max-width: 100%;
  margin-top: 0rem;
  margin-bottom: 0rem; }

div.block {
	display: inline-block;
	vertical-align: top;
	width: 40%;
}

figure {
    display: flex;
    flex-direction: column;
    align-content: center;
    margin-top: 1em;
    margin-bottom: 1em;
}

figure img {
    vertical-align: top;
    margin: 0 auto;
}

img#logo {
    width: 80px;
    height: 80px;
    padding-left: 20px;
}

figure figcaption {
    margin: .4em auto;
    font-style: italic;
    font-family: Didot, serif;
    text-align: center;
}

.image-grid {
  border: 2px solid var(--fg-color); /* Add a border to the image */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 10px;
}

.image-figure {
    border: 1px solid var(--fg-color);
    padding: 0.5em;

}

.image-border {
    height: auto;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

#toggleThemeBtn {
  position: fixed;
  bottom: 1rem; /* Adjust this value as needed */
  left: 1rem; /* Adjust this value to horizontally center the button */
  background-color: var(--bg-color); /* Change button background color */
  color: var(--fg-color); /* Change button text color */
  border: 1px solid var(--fg-color); /* Add a border */
  border-radius: 5px; /* Round button corners */
  cursor: pointer;
  font-size: 12px; /* Or a smaller font size */


  width: 99px;  /* Adjust as needed */
  height: 35px; /* Adjust as needed */

}




/* The sidebar menu */
.sidenav {
  height: 100%; /* Full-height: remove this if you want "auto" height */
  width: 160px; /* Set the width of the sidebar */
  position: fixed; /* Fixed Sidebar (stay in place on scroll) */
  top: 0; /* Stay at the top */
  left: 0;
  background-color: inherit;
  overflow-x: hidden; /* Disable horizontal scroll */
  padding-top: 20px;
  /* create a dotted line on the side of the sidebar */
  border-right: 3px dotted var(--fg-color);
}

/* The navigation menu links */
.sidenav a {
  padding: 9px 8px 9px 0px;
  text-decoration: none;
  font-size: 25px;
  color: var(--fg-color);
  display: block;
}

/* Style page content */
.main {
  margin-left: 160px; /* Same as the width of the sidebar */
}

@media only screen and (max-width: 768px) { /* Adjust breakpoint as needed */

body {
   width: 145vw;
   box-sizing: border-box;
   padding: 0 1rem;
}

#toggleThemeBtn {
   left: 0.5rem;
   width: 85px; /* Or a smaller width */
   height: 40px; /* Or a smaller height */
   font-size: 13px; /* Or a smaller font size */
}
  .sidenav {
    width: 100px; /* Or a smaller width */
  }

  .sidenav a {
    padding: 6px 4px 6px 0px;
    font-size: 17px; /* Or a smaller font size */
  }

  ul {
    padding-left: 0.5em; /* 20px */
  }

  .main {
      margin-left: 100px;
  }

  img#logo {
    width: 60px;
    height: 60px;
    padding-left: 10px;
}

}

/* When you mouse over the navigation links, change their color */
.sidenav a:hover {
  color: --hover-color;
}




/* ==========================================================================
   Hack to make tree look nice
   ========================================================================== */

.tree {

  BODY { font-family : ariel, monospace, sans-serif; }
  P { font-weight: normal; font-family : ariel, monospace, sans-serif; color: var(--fg-color); background-color: transparent;}
  B { font-weight: normal; color: black; background-color: transparent;}
  A:visited { font-weight : normal; text-decoration : none; background-color : transparent; margin : 0px 0px 0px 0px; padding : 0px 0px 0px 0px; display: inline; }
  A:link    { font-weight : normal; text-decoration : none; margin : 0px 0px 0px 0px; padding : 0px 0px 0px 0px; display: inline; }
  A:hover   { color : #000000; font-weight : normal; text-decoration : underline; background-color : yellow; margin : 0px 0px 0px 0px; padding : 0px 0px 0px 0px; display: inline; }
  A:active  { color : #000000; font-weight: normal; background-color : transparent; margin : 0px 0px 0px 0px; padding : 0px 0px 0px 0px; display: inline; }
  .VERSION { font-size: small; font-family : arial, sans-serif; }
  .NORM  { color: var(--fg-color);  background-color: transparent;}
  .FIFO  { color: purple; background-color: transparent;}
  .CHAR  { color: yellow; background-color: transparent;}
  .DIR   { color: blue;   background-color: transparent;}
  .BLOCK { color: yellow; background-color: transparent;}
  .LINK  { color: aqua;   background-color: transparent;}
  .SOCK  { color: fuchsia;background-color: transparent;}
  .EXEC  { color: green;  background-color: transparent;}


}
