/* Inspired by https://github.com/poole/hyde. */

.bibtex-protected {
  white-space: nowrap;
}

.caption {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 90%;
  color: var(--light-gray);
}

/* Sidebar */
.sidebar {
  text-align: center;
  padding: 1rem 1rem;
  color: rgba(255,255,255,.5);
  background-color: var(--dark-blue);
  display: none;
}
#home .sidebar {
  display: block;
}
@media (min-width: 991px) and (min-height: 710px) {
  .sidebar {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 18rem;
    text-align: center;
    padding: 2rem 1rem;
  }
}
.sidebar a {
  color: var(--white);
}

/* About section */
.sidebar-about h1 {
  color: var(--white);
  margin-top: 0;
  margin-bottom: 1rem;
  font-family: "Abril Fatface", serif;
  font-size: 3rem;
  line-height: 1;
}
.sidebar-about a:hover {
  text-decoration: none;
}
.sidebar-about .profile-picture {
  margin: 0 auto 1rem;
  border-radius: 50%;
  max-width: 8rem;
}
@media screen and (min-width: 991px) and (min-height: 710px) {
  .sidebar-about .profile-picture {
    max-width: 10rem;
  }
}
@media screen and (min-width: 991px) and (min-height: 800px) {
  .sidebar-about .profile-picture {
    max-width: 100%;
  }
}

/* Sidebar nav */
.sidebar-nav {
  display: none;
  margin-bottom: 1rem;
}
@media screen and (min-width: 991px) and (min-height: 710px) {
  .sidebar-nav {
    display: block;
  }
}
.sidebar-nav-item {
  display: block;
  line-height: 2;
}
@media screen and (min-width: 991px) and (min-height: 710px) {
  .sidebar-nav-item {
    line-height: 2.125;
  }
}
@media screen and (min-width: 991px) and (min-height: 800px) {
  .sidebar-nav-item {
    line-height: 2.5;
  }
}
a.sidebar-nav-item:hover,
a.sidebar-nav-item:focus {
  text-decoration: underline;
}
.sidebar-nav-item.active {
  font-weight: bold;
}

/* Sidebar social */
.sidebar-social {
  margin-bottom: 1.5rem;
  width: 100%;
  display: inline-block;
}
.sidebar-social-item {
    display: inline-block;
    padding: 0.4rem 0.5rem;
    background: var(--light-blue);
    margin: 0 .1rem;
    border-radius: .25rem;
    font-size: 0.9rem;
    width: 2.3rem;
}
a.sidebar-social-item:hover {
  background: var(--dark-blue);
}

/* Affix contents to the bottom of the sidebar in tablets and up. */
@media (min-width: 991px) and (min-height: 710px) {
  .sidebar-sticky {
    position: absolute;
    right:  1rem;
    bottom: 1rem;
    left:   1rem;
  }
}
/* Place picture underneath menu items */
.sidebar-sticky {
  z-index: -1;
}
.copyright {
  font-size: 0.75rem;
  margin-bottom: 1rem;
  display: block;
  text-align: center;
}
.sidebar .copyright {
  margin: 0;
  display: none;
}
@media (min-width: 991px) and (min-height: 710px) {
  .copyright {
    display: none;
  }
  .sidebar .copyright {
    display: block;
  }
}

/* Mobile menu */
.menu-toggle {
  position: sticky;
  z-index: 1001;
  right: 0;
  top: 0;
  padding: 10px 20px;
  line-height: 1;
  width: 100%;
  text-align: right;
  background-color: var(--dark-blue);
}
.menu-toggle a {
  font-size: 1.5em;
  color: var(--white);
}
.menu-toggle-sidebar {
  display:none;
}
@media (min-width: 991px) and (min-height: 710px) {
  .menu-toggle {
    display:none;
  }
  .menu-toggle-sidebar {
    display: block;
    padding: 0px 20px;
    text-align: center;
    background-color: var(--dark-blue);
  }
  .menu-toggle-sidebar a {
    font-size: 1.5em;
    color: var(--white);
  }
}
@media (min-width: 991px) and (min-height: 710px) {
  .menu-toggle {
    display:none;
  }
  .menu-toggle-sidebar {
    display:none;
  }
}

.mobile-navigation {
  position: absolute;
  position: fixed;
  display: none;
  right: -200px;
  top: 0;
  height: 100%;
  overflow-x: visible;
  z-index: 999;
  background-color: var(--dark-blue);
}
.mobile-navigation ul {
  list-style: none;
  margin: 0;
  padding: 2.5em 0 0;
  -webkit-box-shadow: -8px 0 8px rgba(0,0,0,.5);
     -moz-box-shadow: -8px 0 8px rgba(0,0,0,.5);
          box-shadow: -8px 0 8px rgba(0,0,0,.5);
  min-height: 100%;
  width: 200px;
  background: var(--dark-blue);
  text-align: right;
}
.mobile-navigation li:first-child a {
  border-top: 1px solid var(--light-gray);
}
.mobile-navigation a {
  display: block;
  padding: .75em 15px;
  line-height: 1em;
  /* font-size: 1em; */
  color: var(--white);
  border-bottom: 1px solid var(--light-gray);
}
.mobile-navigation .menu-close {
  position: absolute;
  right: 0;
  top: 0;
  border: none;
  padding-right: 25px;
}
.mobile-navigation.open {
  display: block;
  right: 0;
  outline: none;
  -moz-box-shadow: 3px 0 12px rgba(0,0,0,.25);
  -webkit-box-shadow: 3px 0 12px rgba(0,0,0,.25);
  box-shadow: 3px 0 12px rgba(0,0,0,.25);
  z-index: 1002;
}

.backdrop {
  display: none;
}
.mobile-navigation.open + .backdrop {
  position: absolute;
  position: fixed;
  display: block;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 998;
  background: rgba(0,0,0,.85);
  cursor: default;
}


/* Container */
 .container {
   max-width: 48em;
   padding-left:  1rem;
   padding-right: 1rem;
   margin-left:  auto;
   margin-right: auto;
 }
.content {
  padding-top: 2rem;
  padding-bottom: 2rem;
}
@media (min-width: 991px) and (min-height: 710px) {
  .content {
    margin-left: 22rem;
    margin-right: 4rem;
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}


/* Reverse layout */
@media (min-width: 991px) and (min-height: 710px) {
  .layout-reverse .sidebar {
    left: auto;
    right: 0;
  }

  .layout-reverse .content {
    margin-left: 4rem;
    margin-right: 22rem;
  }
}


/* Posts and pages */
.page,
.post {
  margin-bottom: 4em;
}


/* Citation tooltip */
.tooltip {
  position: relative;
  display: inline-block;
}
.tooltip .tooltiptext {
  display: none;
  visibility: hidden;
  width: 500px;
  background-color: var(--white);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 90%;
  border: solid 1px var(--lighter-gray);
  box-shadow: 3px 3px 10px -5px var(--lighter-blue);
   
  /* Position tooltip text */
  position: absolute;
  z-index: 100;
  bottom: 100%;
  left: 50%;
  margin-left: -50px;
}
@media (min-width: 991px) {
  .tooltip:hover .tooltiptext {
    display: unset;
    visibility: visible;
  }
}

/* News list */
div.news {
  margin-top: 0.5rem;
}
.news p {
  margin-bottom: 0.5rem;
}
.news hr {
  margin: 1rem 0;
}
.news ul:nth-of-type(2) li:nth-child(4) {
  opacity: 0.8;
}
.news ul:nth-of-type(2) li:nth-child(5) {
  opacity: 0.6;
}
.news ul:nth-of-type(2) li:nth-child(6) {
  opacity: 0.5;
}
.news ul:nth-of-type(2) li:nth-child(7) {
  opacity: 0.4;
}
.news ul:nth-of-type(2) li:nth-child(8) {
  opacity: 0.3;
}
.news ul:nth-of-type(2) li:nth-child(9) {
  opacity: 0.25;
}
.news ul:nth-of-type(2) li:nth-child(10) {
  opacity: 0.2;
}
.news ul:nth-of-type(2) li:nth-child(11) {
  opacity: 0.15;
}
.news ul:nth-of-type(2) li:nth-child(n+12) {
  display: none;
}

/* Blog post, post index, or page title */
.index-title,
.page-title,
.post-title {
  margin-top: 0;
}
.index-date,
.post-date {
  display: block;
  margin-top: -0.8rem;
  margin-bottom: 0.8rem;
  font-size: 90%;
  color: var(--light-gray);
}
.index-date {
  margin-bottom: 0.5rem;
}
.index-summary {
  margin-bottom: 3.5rem;
}
.post-content {
  padding-top: 1rem;
}
.post-meta {
  padding-top: 12px;
  border-top: 1px solid var(--lighter-gray);
}

/* Pagination */
.pagination {
  overflow: hidden; /* clearfix */
}
.pagination-item {
  display: block;
  padding: 1rem;
  border: 1px solid var(--lighter-gray);
  text-align: center;
  color: var(--light-gray);
}
.pagination-item:first-child {
  margin-bottom: -1px;
}
@media (min-width: 30em) {
  .pagination {
    margin: 3rem 0;
  }
  .pagination-item {
    float: left;
    width: 50%;
  }
  .pagination-item:first-child {
    margin-bottom: 0;
    border-top-left-radius:    7px;
    border-bottom-left-radius: 7px;
  }
  .pagination-item:last-child {
    margin-left: -1px;
    border-top-right-radius:    7px;
    border-bottom-right-radius: 7px;
  }
}

.related-posts li a:hover {
  color: var(--light-blue);
}


/* YouTube responsive embed */
.embed-responsive {
  position: relative;
  display: block;
  width: 100%;
  max-width: 30em;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  overflow: hidden;
}

.embed-responsive::before {
  display: block;
  content: "";
}

.embed-responsive .embed-responsive-item {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.embed-responsive-21by9::before {
  padding-top: 42.857143%;
}

.embed-responsive-16by9::before {
  padding-top: 56.25%;
}

.embed-responsive-4by3::before {
  padding-top: 75%;
}

.embed-responsive-1by1::before {
  padding-top: 100%;
}