:root {
  --black: #000000;
  --white: #ffffff;
  --gray: #f7f7f7;
  --blue: #007bff;
  --bg-color: #000000; /*var(--gray);*/
  --bg-color-highlight: #1a1a1a;
  --fg-color: #ffffff; /*var(--black)*/;
  --dark-bg-color: #1a1a1a; /*var(--black);*/
  --dark-fg-color: #ffffff; /*var(--white);*/
  --hover-color: #007bff; /*var(--blue);*/
  --sidebar-width: 100px;
  --topbar-height: 60px;
  --invert: invert(1.0);
}

@font-face {
    font-family: 'Spleen';
    src: url('/~getz/fonts/spleen.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}


@font-face {
    font-family: 'Gohu';
    src: url('/~getz/fonts/gohu.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Gallant';
    src: url('/~getz/fonts/gallant.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Gallant-lineart';
    src: url('/~getz/fonts/gallant-lineart.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

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


/* Modified base styles */
body {
    max-width: 100ch;
    min-height: 100vh;
    margin: 2vh auto 60px auto; /* Center the body horizontally */
    font-family: 'Gohu', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3rem;
    color: var(--fg-color);
    background: var(--bg-color);
    box-sizing: border-box;
    padding: 0 1rem;
}

/* Style page content */
.main {
    margin-left: var(--sidebar-width); /* Same as the width of the sidebar */
    word-wrap: break-word; /* Ensure long words break and wrap */
    overflow-wrap: break-word; /* Modern alternative to word-wrap */

    margin-left: calc(var(--sidebar-width));
    margin-right: auto;
    padding: 0 0px;
}

body {
    max-width: 100ch;
    min-height: 100vh;

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

   /* font-family: Monaco, "Courier New", monospace; */

   font-family: 'Gohu', sans-serif;

   font-size: 16px;
    font-weight: 400;
    line-height: 1.3rem;

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

    box-sizing: border-box;
    padding: 0 1rem;
}

p {
    /*line-height: 1.5em;*/
    }

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

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

.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;
*/
}

.light-heading {
  font-weight: normal;
}

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

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

/* Exception for specific link - add a class to the link you want to exclude */
.text-style-link:link, .text-style-link:visited {
    color: inherit;
}

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

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

pre {
    width: 96%;
    background-color: var(--bg-color-highlight);
    overflow: scroll;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 1000px;
    padding: 0.5em 0.5em;
    font-size: 10pt;
    padding-left: 0px;
    padding-right: 0px;
    
    border: 1px solid var(--fg-color);
    border-radius: 4px;
    padding: 0.5em 0.8em;

}


pre > code {
    background-color: var(--bg-color-highlight);
    border: none;
    display: inline-block;
}

/* pre for pasted ascii code */
ascii pre {
  border: none;
  background-color: inherit;
  overflow-x: initial;
  overflow-y: initial;
  max-height: none;
  font-family: 'Gohu', monospace;
  font-size: 14px;
  line-height: 18px;
  margin: initial;
  padding: initial;
  white-space: pre;
  word-wrap: break-word; /* Ensure long words break and wrap */
  overflow-wrap: break-word; /* Modern alternative to word-wrap */
}

code {
    background-color: var(--bg-color-highlight);
    border: 1px solid var(--fg-color);
    border-radius: 4px;
    padding: 1px;
}

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

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


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

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

blockquote, description { 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, description 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%;
}

iframe {
    border: 1px solid var(--fg-color); /* Add a border to the image */
    width: 99%;
    height: 400px;
}

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

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

.svg {
	filter: var(--invert);
}

img#logo {
    filter: var(--invert);
    width: 60px;
    height: 60px;
    padding-left: 10px;
}
figure figcaption {
    margin: .4em auto;
    font-style: italic;
    font-family: Didot, serif;
    text-align: center;
}

.image-grid {
  border: 0px 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: 0px solid var(--fg-color);
    padding: 0em;

}

.image-border {
    height: auto;
}

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

.sidebar-footer {
    margin-top: auto;
    margin-bottom: 75px;
    font-size: 0.8em;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
         
.sidebar-theme-text {
  position: fixed;
  color: var(--fg-color);
  text-align: center;
  bottom: 0.5rem;
  font-size: 8px; /* Customize the font size */
  left: 0.8rem;
}
   
#toggleThemeBtn
{
  position: fixed;
  bottom: 0.5rem; /* Adjust this value as needed */
  left: 0.5rem; /* 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: 13px; /* Or a smaller font size */
  width: 80px;  /* Adjust as needed */
  padding-top: 5px;
/*  height: 35px; */ /* Adjust as needed */

}

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

/* The sidebar menu */
.sidebar {
  height: 100%; /* Full-height: remove this if you want "auto" height */
  width: var(--sidebar-width); /* 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: var(--bg-color);
  overflow-x: hidden; /* Disable horizontal scroll */
  overflow-y: hidden; /* Disable vertical scroll */
  padding-top: 5px;
  /* create a dotted line on the side of the sidebar */
  border-right: 3px dotted var(--fg-color);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease-in-out;
}

.sidebar-nav {
    flex-grow: 1;
    line-height: 14px;
}

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin: 5px 0;
    transition: transform 0.2s;
}

.icon-logo {
    background: none;
    border: none;
    cursor: pointer;
}

.icon-button:hover {
    transform: scale(1.3);
}

.icon-button img {
    width: 100%;
    height: auto;
    max-width: 30px;
    will-change: transform;
}

#pjw.icon-button img,
#openbsd.icon-button img,
#webring.icon-button img,
#df.icon-button img
{
    max-width: 40px;
}

#sdf.icon-button img
{
    max-width: 60px;
}

/* The navigation menu links */
.sidebar a {
    padding: 6px 4px 6px 0px;
    font-size: 19px; /* Or a smaller font size */
    text-decoration: none;
    color: var(--fg-color);
    display: block;
}

/* ==========================================================================
   Topbar
   ========================================================================== */
   #themeToggle
   {
   display: none;
 }

   .topbar {
          display: none;
          position: fixed;
          top: 0;
          left: 0;
          right: 0;
          height: var(--topbar-height);
          background-color: var(--bg-color);
          border-bottom: 2px dotted var(--fg-color);
          padding: 0px 5px;
          z-index: 1000;
        }

        .topbar-logo {
          height: 40px;
          width: auto;
	  filter: var(--invert);
        }

        .menu-toggle {
          display: none;
          background: none;
          border: none;
          font-size: 2.1em;
          cursor: pointer;
          filter: var(--invert);

        }


/* ==========================================================================
   Mobile view
   ========================================================================== */

   @media (max-width: 700px) {
       
          :root {
              --sidebar-width: 0;
              --topbar-height: 60px;
          }

          body {
            font-size: 16px;
            line-height: 1.5em;
          }

          code, pre, tt {
              font-size: 13pt;
          }

          p {
              line-height: 1.5em;
          }
          
          pre {
              font-size: 15pt;
              padding: 0.5em 0.5em;
          }
          
          img#logo {
              display: none;
          }
.sidebar a {
    padding: 6px 4px 6px 0px;
    font-size: 40px; /* Or a smaller font size */
    text-decoration: none;
    color: var(--fg-color);
    line-height: 1.2em;
    display: block;
}

.sidebar {
    height: auto;
    width: 100%;
            transform: translateY(-250%);
            padding-top: 60px;
  border-bottom: 3px dotted var(--fg-color);

          }

          .sidebar-footer {
              flex-direction: initial;
              padding-bottom: 0px;
              margin-bottom: -10px;
              margin-top: -25px;
              margin-left: 8px;
          }
          
          .sidebar.active {
              transform: translateY(0);
              z-index: 999;
          }

          .topbar {
            display: flex;
            position: absolute;
            align-items: center;
            justify-content: space-between;
          }

          .menu-toggle {
            display: block;
          }

          .sidebar-theme-text {
              display: none;
          }

          .main {
            margin-left: 0;
            max-width: 100%;
            padding-top: var(--topbar-height);
          }
          #toggleThemeBtn
          {
          display: none;
   }
          #themeToggle
          {
          display: initial;
   }
          #sdf
          {
              display: none;
 }


/* pre for pasted ascii code */
ascii pre {
  font-size: 2.15vw;
  overflow: initial;
  line-height: 2.5vw;
  width: 100%;
  white-space: pre-wrap;
}

   .icon-button img {
       max-width: 25px;
   }

}

textarea, input[type="text"], input[type="email"], input[type="password"], input[type="number"],input[type="date"] {
  background-color: var(--bg-color-highlight);
  color: var(--fg-color);
    border: none;
}


textarea:focus, input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="number"]:focus, input[type="date"]:focus {
  outline: none; /* Remove default focus outline */
  border-color: var(--fg-color); /* Slightly darker border on focus */
}

/* ==========================================================================
   Mediaplayer
   ========================================================================== */

.custom-audio-player {
    cursor: pointer;
  }
  
.custom-audio-player .play-icon {
    width: 61px;
    height: 61px;
    /* padding-bottom: 10px; */
    background-image: url('/~getz/share/blaupunkt.png'); /* Replace with your icon path */
    background-size: contain;
    filter: var(--invert);
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s;
    margin-bottom: 8px;
}

.custom-audio-player .play-icon:hover {
    transform: scale(1.2);
}


  /* Hide the default audio player */
.custom-audio-player audio {
    display: none;
  }

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

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