/*
 *  __                  __
 * /\ \                /\ \
 * \ \ \___   __  __   \_\ \     __
 *  \ \  _ `\/\ \/\ \  /'_` \  /'__`\
 *   \ \ \ \ \ \ \_\ \/\ \_\ \/\  __/
 *    \ \_\ \_\/`____ \ \___,_\ \____\
 *     \/_/\/_/`/___/> \/__,_ /\/____/
 *                /\___/
 *                \/__/
 *
 * Designed, built, and released under MIT license by @mdo. Learn more at
 * https://github.com/poole/hyde.
 */

 /*
 * jm 11.8.18 Customized for e-basteln.de    
 * jm 27.8.24 Convert to Alegreya Sans font, some width adjustments
 */


/*
 * Contents
 *
 * Global resets
 * Fonts
 * Sidebar
 * Container
 * Reverse layout
 * Themes
 */


/*
 * Global resets
 *
 * Update the foundational and global aspects of the page.
 */

html {
  font-family: "Alegreya Sans", Helvetica, Arial, sans-serif;
  color: black;
  font-variant-numeric: oldstyle-nums;
  font-size: 17px;              /* for mobile phones */  
}
@media (min-width: 52em) {      /* for tablets */
  html {
    font-size: 17px;  
  }
}
@media (min-width: 70em) {      /* for large screens */
  html {
    font-size: 19px;
  }
}

/*
 * Font declarations
 *
 * Locally hosted Google fonts
 */

/* alegreya-sans-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/alegreya-sans-v24-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* alegreya-sans-italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Alegreya Sans';
  font-style: italic;
  font-weight: 400;
  src: url('../fonts/alegreya-sans-v24-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* alegreya-sans-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/alegreya-sans-v24-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* alegreya-sans-700italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Alegreya Sans';
  font-style: italic;
  font-weight: 700;
  src: url('../fonts/alegreya-sans-v24-latin-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* squada-one-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Squada One';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/squada-one-v18-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/*
 * Sidebar
 *
 * Flexible banner for housing site name, intro, and "footer" content. 
 * Starts out above content in mobile and later moves to the side with wider viewports.
 * Copyright & contactare  only visible on large sreens (actual sidebar, not menu on top).
 */

.sidebar {
  text-align: left;
  line-height: 150%;
  padding: 2rem 1rem;
  color: rgba(255,255,255,.5);
  background-image: url("/img/bg.png");
  background-size: cover;
  background-color: #202020;
}
  .sidebar-copyright {
    display: none;
  }

@media (min-width: 52em) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 17rem;
    text-align: left;
    padding-top: 3rem;
  }
  .sidebar-copyright {
    display: block;
  }
}

/* About section (tag line) */
.sidebar-about p {
  font-family: "Squada One", sans-serif;
  font-size: 1.4rem;
}

.sidebar-about img {
  width: 16em;
}

/* sidebar links */
.sidebar-nav1 a {
  color: white;
}
.sidebar-nav2 a,
.sidebar-nav3 a {
  color: rgba(255,255,255,.5);
}

/* Sidebar nav */
.sidebar-nav1, .sidebar-nav2, .sidebar-nav3 {
  margin-top: 0px;
  margin-bottom: 0px;
  font-weight: bold;
  line-height: 145%;
}
.sidebar-nav1 {
  padding-left: 0;
  list-style: none;
}
.sidebar-nav2 {
  list-style: none;
}
.sidebar-nav1-item, .sidebar-nav2-item, .sidebar-nav3-item {
  display: block;
}
a.sidebar-nav1-item:hover, a.sidebar-nav1-item:focus, 
a.sidebar-nav2-item:hover, a.sidebar-nav2-item:focus,
a.sidebar-nav3-item:hover, a.sidebar-nav3-item:focus 
{
  text-decoration: underline;
}

a.active {
  color: white;
}

/* Sticky sidebar
 *
 * Add the `sidebar-sticky` class to the sidebar's container to affix it the
 * contents to the bottom of the sidebar in tablets and up.
 */

@media (min-width: 52em) {
  .sidebar-sticky {
    position: absolute;
    right:  1rem;
    bottom: 1rem;
    left:   1rem;
  }
}


/* Container
 *
 * Align the contents of the site above the proper threshold with some margin-fu
 * with a 25%-wide `.sidebar`.
 */

.content {
  padding-top:    4rem;
  padding-bottom: 4rem;
  color: black;
}


/* TOC without bullets, hide H2 and H3 in TOC */
div.toc ul {
  list-style: none;
}
div.toc ul > li > ul  { display: none; }
div.toc ul > li > ul > li > ul { display: none; }

@media (min-width: 52em) {
  .content {
    max-width: 35rem;
    margin-left: 24rem;
    margin-right: 2rem;
  }
  .aside {
    margin-left: -4rem;
    margin-right: 0;
    width: 3rem; 
    float: left;
  }
  .toc {
    margin-left: -4rem;
  }
  div.toc ul {
    padding: 0;
  }
/*
  div.toc ul li ul {
    padding-left: 1.5em;
  }
*/
}

@media (min-width: 70em) {
  .content {
    margin-left: 27rem;
    margin-right: 5rem;
  }
  .aside {
    margin-left: -6rem;
    margin-right: 0;
    width: 5rem; 
    float: left;
  }
  .toc {
    margin-left: -7rem;
    margin-top: 1.5em;
    margin-bottom: 1.5em;
  }
}


/*
 * Reverse layout
 *
 * Flip the orientation of the page by placing the `.sidebar` on the right.
 */

@media (min-width: 52em) {
  .layout-reverse .sidebar {
    left: auto;
    right: 0;
  }
  .layout-reverse .content {
    margin-left: 2rem;
    margin-right: 20rem;
  }
}

@media (min-width: 70em) {
  .layout-reverse .content {
    margin-left: 12rem;
    margin-right: 22rem;
  }
}

/* Custom color scheme */

/* Sidebar has a background image instead
.theme-e-basteln .sidebar {
  background-color: #6879AD;
}
*/
.theme-e-basteln .content a,
.theme-e-basteln .related-posts li a:hover {
  color: #6879AD;
  /* color: #0982b6; */
  /* color: #5E709E; */
  /* font-weight: bold; */
}


/* ---- additions by jm to follow ---- */

/* use hyphenation in the content section (not in the sidebar) */
.content p {
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
  -o-hyphens: auto;
  hyphens: auto;
}

/* figure captions in italics */
figure .caption {
  margin-top: 0.5em;
  font-style: italic;
}

/* footer with left & right arrow navigation */
section.post-nav ul {
  margin: 0.5em 0;
  padding: 0.5em 0 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #f7f7f7;
}

/* unnumbered lists with square bullets */
ul {
  list-style: square;
}

/* icon to indicate external links */
/* load proper Font Awesome font in layouts/partials/head_fonts-html! */
a[href^="http://"]:after, a[href^="https://"]:after, a[href^="ftp://"]:after {
  font-family: 'FontAwesome';
  font-size: 0.9em;
  content: " \f08e"; 		/* version 6.1 open square */
  /* content: " \f35d";	*/	/* version 5.11 open square */
  /* content: " \f14c"; */	/* version 4.7 filled square */
}

/* --- Figures --- */

figure {
  display: flex;
  flex-direction: column;
  margin: 1em 0 1em 0;
  align-items: flex-start; 
}

figure .image {
  display: block;
  width: 100%;
}

/*  Trickery is required to scale Youtube videos (iframes)  while maintaining aspect ratio.
    The iframe is embedded in a div, and the div gets a fixed 3:2 aspect ratio.
    (Compromise between 16:9 and 4:3)
*/

figure .youtubediv {
  position: relative;
  padding-bottom: 66%;
}

figure iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%  
}

figure video {
  width: 100%;
  height: 100%  
}

/* wide-enough screens: caption to the right of the image */

@media (min-width: 52em) {
  figure.wide, figure.tall {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    margin: 2em 0 2em 0;
  }
  figure.wide, figure.full {
    margin-left: -4em;
  }
  figure.wide .image {
    width: 80%;
  }
  figure.wide .caption {
    width: 20%;
    margin-left: 2em;
  }
  figure.tall .image {
    width: 75%;
  }
  figure.tall .caption {
    width: 25%;
    margin-left: 2em;
  }
  figure.full .caption {
    margin-left: 4em;
  }
}

/* full-size screen: larger margins */

@media (min-width: 70em) {
  figure.wide, figure.full {
    margin-left: -7em;
  }
  figure.full .caption {
    margin-left: 7em;
  }
}

/* --- Tables --- */

@media (min-width: 52em) {
  table {
    width: auto;
  }
}

@media (min-width: 70em) {
  table {
    width: auto;
  }
}

tr:nth-child(even) {background-color: #e8e8e8;}
th {background-color: #d8d8d8;}
th, td {border-right: 2px solid #fff;}

/* --- Headers --- */

h1.title, h1, h2 {
  font-family: "Squada One", Helvetica, Arial, sans-serif;
  font-weight: normal;
  font-style: normal;
}

h1.title {
  margin-top: 0.75rem;
  margin-bottom: 1.5rem; 
  font-size: 2.75rem;
}

h1 {
  margin-top: 2.5rem;
  margin-bottom: 1.5rem; 
  font-size: 2rem;
}

h2 {
  margin-top: 2rem;
  margin-bottom: 1rem; 
  font-size: 1.25rem;
}

h3 {
  margin-top: 1.5rem;
  margin-bottom: 1rem; 
  font-size: 1rem;
  font-weight: normal;
  text-decoration: underline;
}

/* --- Subscripts and superscripts which don't change line spacing --- */

sup { vertical-align: top; font-size: 0.8em; }
sub { vertical-align: bottom; font-size: 0.8em; }