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

 /*
 * Customized for e-basteln.de
 * jm 11.8.18
 */


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


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

html {
  /* font-family: "Noto Sans", Helvetica, Arial, sans-serif; */
  font-family: "PT Serif", "Times New Roman", Times, serif;
  color: black;
  font-variant-numeric: oldstyle-nums;
}
@media (min-width: 52em) {
  html {
    font-size: 14px;  
  }
}
@media (min-width: 70em) {
  html {
    font-size: 18px;
  }
}

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

/* pt-serif-regular - latin */
@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/pt-serif-v17-latin-regular.eot');
  /* IE9 Compat Modes */
  src: url('/fonts/pt-serif-v17-latin-regular.eot?#iefix') format('embedded-opentype'),
    /* IE6-IE8 */
    url('/fonts/pt-serif-v17-latin-regular.woff2') format('woff2'),
    /* Super Modern Browsers */
    url('/fonts/pt-serif-v17-latin-regular.woff') format('woff'),
    /* Modern Browsers */
    url('/fonts/pt-serif-v17-latin-regular.ttf') format('truetype'),
    /* Safari, Android, iOS */
    url('/fonts/pt-serif-v17-latin-regular.svg#PTSerif') format('svg');
  /* Legacy iOS */
}

/* pt-serif-italic - latin */
@font-face {
  font-family: 'PT Serif';
  font-style: italic;
  font-weight: 400;
  src: url('/fonts/pt-serif-v17-latin-italic.eot');
  /* IE9 Compat Modes */
  src: url('/fonts/pt-serif-v17-latin-italic.eot?#iefix') format('embedded-opentype'),
    /* IE6-IE8 */
    url('/fonts/pt-serif-v17-latin-italic.woff2') format('woff2'),
    /* Super Modern Browsers */
    url('/fonts/pt-serif-v17-latin-italic.woff') format('woff'),
    /* Modern Browsers */
    url('/fonts/pt-serif-v17-latin-italic.ttf') format('truetype'),
    /* Safari, Android, iOS */
    url('/fonts/pt-serif-v17-latin-italic.svg#PTSerif') format('svg');
  /* Legacy iOS */
}

/* pt-serif-700 - latin */
@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-weight: 700;
  src: url('/fonts/pt-serif-v17-latin-700.eot');
  /* IE9 Compat Modes */
  src: url('/fonts/pt-serif-v17-latin-700.eot?#iefix') format('embedded-opentype'),
    /* IE6-IE8 */
    url('/fonts/pt-serif-v17-latin-700.woff2') format('woff2'),
    /* Super Modern Browsers */
    url('/fonts/pt-serif-v17-latin-700.woff') format('woff'),
    /* Modern Browsers */
    url('/fonts/pt-serif-v17-latin-700.ttf') format('truetype'),
    /* Safari, Android, iOS */
    url('/fonts/pt-serif-v17-latin-700.svg#PTSerif') format('svg');
  /* Legacy iOS */
}

/* pt-serif-700italic - latin */
@font-face {
  font-family: 'PT Serif';
  font-style: italic;
  font-weight: 700;
  src: url('/fonts/pt-serif-v17-latin-700italic.eot');
  /* IE9 Compat Modes */
  src: url('/fonts/pt-serif-v17-latin-700italic.eot?#iefix') format('embedded-opentype'),
    /* IE6-IE8 */
    url('/fonts/pt-serif-v17-latin-700italic.woff2') format('woff2'),
    /* Super Modern Browsers */
    url('/fonts/pt-serif-v17-latin-700italic.woff') format('woff'),
    /* Modern Browsers */
    url('/fonts/pt-serif-v17-latin-700italic.ttf') format('truetype'),
    /* Safari, Android, iOS */
    url('/fonts/pt-serif-v17-latin-700italic.svg#PTSerif') format('svg');
  /* Legacy iOS */
}

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

.sidebar {
  text-align: left;
  padding: 2rem 1rem;
  color: rgba(255,255,255,.5);
  background-image: url("/img/bg.png");
  background-size: cover;
  background-color: #202020;
}
@media (min-width: 52em) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 18rem;
    text-align: left;
    padding-top: 3rem;
  }
}

/* About section */
.sidebar-about h1 {
  color: #fff;
  margin-top: 0;
  font-family: "Abril Fatface", serif;
  font-size: 3.25rem;
}

.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;
  font-size: 1em;
}
.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: 40rem;
    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: 28rem;
    margin-right: 4rem;
  }
  .aside {
    margin-left: -7rem;
    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: 54em) {
  .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 figcaption {
  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.wide a, figure.tall a, figure.full a {
    display: block;
    width: 100%;
}

@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.full figcaption {
    margin-left: 4em;
  }
  figure.wide a {
    width: 80%;
  }
  figure.wide figcaption {
    width: 20%;
    margin-left: 2em;
  }
  figure.tall a {
    width: 75%;
  }
  figure.tall figcaption {
    width: 25%;
    margin-left: 2em;
  }
}

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

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

figure.wide img, figure.tall img, figure.full img, figure.text img {
    display: block;
    width: 100%;
}

img {
  min-height: 1px; 
}

@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.full figcaption {
    margin-left: 4em;
  }
  figure.text img {
    max-width: 100%;
  } 
  figure.wide img {
    max-width: 75%;
  }
  figure.wide figcaption {
    max-width: 25%;
    margin-left: 2em;
  }
  figure.tall img {
    max-width: 70%;
  }
  figure.tall figcaption {
    max-width: 30%;
    margin-left: 2em;
  }
}

@media (min-width: 70em) {
  figure.wide, figure.full {
    margin-left: -7em;
  }
  figure.full figcaption {
    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 {
  margin-top: 0.75rem;
  margin-bottom: 1.5rem; 
  font-size: 2.75rem;
  font-weight: normal;
  font-style: italic;
}
h1 {
  margin-top: 2.5rem;
  margin-bottom: 1.5rem; 
  font-size: 2rem;
  font-weight: normal;
  font-style: italic;
}
h2 {
  margin-top: 2rem;
  margin-bottom: 1rem; 
  font-size: 1.25rem;
  font-weight: normal;
  font-style: italic;
}
h3 {
  margin-top: 1.5rem;
  margin-bottom: 1rem; 
  font-size: 1rem;
  font-weight: normal;
  text-decoration: underline;
}
