body {
  padding: 0;
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, sans-serif;
  font-size: 16px;
  background: #f3f3f3;
  color: #222;
}
.content {
  margin: 0 auto;
  max-width: 800px;
  min-height: calc(100vh - 6em);
  line-height: 1.6;
  padding: 0 1em
}
h1, h2, h3 {
  line-height: 1.2;
}

iframe.youtube-embed {
  float: left;
  outline: 0.3em solid #aaa;
  margin-right: 1rem;
}

img.content-image {
  outline: 0.3em solid #aaa;
  object-fit: cover;
  max-height: 300px;
}

.image-gallery-container {
  display: flex;
  flex-wrap: wrap;
}

img.image-gallery {
  flex: 2;
  min-width: 100%;
}

@media (min-width: 481px) {
  img.image-gallery {
    min-width: 50%;
  }
  
  img.image-gallery.image-gallery-mod2 {
    min-width: 100%;
  }
}
  
@media (min-width: 681px) {
 img.image-gallery, img.image-gallery.image-gallery-mod2 {
    min-width: 33%;
  }
  
  img.image-gallery.image-gallery-mod3 {
    min-width: 50%;
  }
}  

img.image-full {
  max-width: 100%;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

img.image-preview {
  max-width: 33%;
  float: left;
  margin: 1rem 1rem 0.5rem 0.5rem;
}

div.post-summary:after {
  content: "";
  clear: both;
  display: table;
}

img.image-left {
  max-width: 50%;
  float: left;
  margin: 1rem 0.5rem;
}

img.image-right {
  max-width: 50%;
  float: right;
  margin: 1rem 0.5rem;
}

.post-title a, .post-metadata a, .read-more a, .pagination a {
  color: inherit;
  text-decoration: none;
}
.post-title a:hover, .read-more a:hover {
  text-decoration: underline;
}

a.tag {
  text-decoration: none;
  padding: 0.2rem;
  margin-right: 0.2rem;
  border-radius: 0.2rem;
  background: #ddd;
}
a.tag:hover {
  color: #ddd;
  background: #555;
}

article {
  padding: 1rem;
  margin: 1em 0;
}
article.summary {
  border-radius: 0.5rem;
  background: #eee;
  border: 1px solid #bbb;
}

h1.post-title {
  margin: 0 0 0.2em 0;
}
.post-metadata {
  font-size: 14px;
}
.post-metadata time {
  padding-right: 1rem;
}

/**
 * Some styling around block quotes.
 * Assumes that the final <p> is an attribution line
 */
blockquote {
  background: #f9f9f9;
  border-left: 10px solid #bbb;
  margin: 1.5em 10px;
  padding: 0.5em 10px;
}
blockquote p {
  display: inline;
}
blockquote p:first-of-type::before {
  color: #bbb;
  content: open-quote;
  font-size: 4rem;
  line-height: 0.1rem;
  margin-right: 0.25rem;
  vertical-align: -0.4rem;
}
blockquote p:last-of-type {
  quotes: '\201C' '\201D' '\2018' '\2019';
  font-style: italic;
}
blockquote p:last-of-type::before {
  content: '\000A' '\2014' ' ';
  white-space: pre;
  margin-left: 0.1rem;
  font-style: normal;
}

/* Inline and block code elements */
code {
    font-family: Monaco, Consolas, monospace;
    color: #922;
    border-radius: 4px;
    border: 1px solid #bbb;
    color: #922;
    padding: 2px;
    background: #f3f3f3;
}
pre {
    border-radius: 4px;
    border: 1px solid #bbb;
    padding-left: 5px;
    background: #f3f3f3;
}
pre code {
    border-radius: 0;
    border: 0;
    padding: 0;
}

/* Pagination */
.pagination, .read-more {
  font-size: 14px;
  color: #555;
}
.read-more {
  text-align: right;
  margin-top: -0.75rem;
}
.pagination {
  text-align: center;
}

/* Navigation */
nav, footer {
  display: flex;
  width: 100%;
}
nav > *, footer > * {
  padding: 0.5rem;
  text-decoration: none;
  text-align: center;
  color: inherit;
}
nav {
  border-style: solid;
  border-width: 0 0 1px;
  border-color: #bbb;
  height: 2.5rem;
  background: #eee;
}
nav .title {
  font-weight: 900;
}
nav a:nth-child(2) {
  margin-left: auto;
}
footer {
  align-items: center;
  justify-content: space-around;
  font-size: 13px;
  color: #666;
  margin-top: 0.5rem;
}

/* Image Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background-color: rgba(80,80,80,80%);
  padding: 3rem;
  box-sizing: border-box;
  text-align: center;

  display: none;
}

.modal-overlay.open-modal {
  display: block;
}

.modal {
  position: relative;
  background-color: #fefefe;
  padding: 1rem;
  display: inline-block;
  margin: auto;
}

.close {
  top: -1.5rem;
  right: -1.5rem;
  transform: translate(50%, -50%);
}

.modal img {
  max-height: 90vh;
  max-height: calc(100vh - 10rem);
  max-width: 100%;
  object-fit: contain;
}

.modal .modal-button {
  color: #eee;
  font-size: 50px;
  cursor: pointer;
  user-select: none;
  position: absolute;
}

.modal .prev {
  top: 50%;
  top: calc(50% - 1rem);
  left: 1.5rem;
  transform: translate(0, -50%);
  display: none;
}
.modal .next {
  top: 50%;
  top: calc(50% - 1rem);
  right: 1.5rem;
  transform: translate(0, -50%);
  display: none;
}
.modal .prev.nav-enabled, .modal .next.nav-enabled {
  display: block;
}
.modal p {
  line-height: 1;
  margin-bottom: 0;
}
