/*****************************************************************************/
/*
/* Common
/*
/*****************************************************************************/

/* Global Reset */

* {
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  background-color: #f5f5f5;
  font: 13.34px helvetica, arial, clean, sans-serif;
  text-align: center;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 100%;
}

h1 {
  margin-bottom: 1em;
}

p {
  margin: 1em 0;
}

a {
  color: #00a;
}

a:hover {
  color: black;
}

a:visited {
  color: #a0a;
}

table {
  font-size: inherit;
  font: 100%;
}

/*****************************************************************************/
/*
/* Home
/*
/*****************************************************************************/

ul.posts {
  list-style-type: none;
  margin-bottom: 2em;
}

ul.posts li {
  line-height: 1.75em;
}

ul.posts span {
  color: #aaa;
  font-family: Monaco, "Courier New", monospace;
  font-size: 80%;
}

/*****************************************************************************/
/*
/* Site
/*
/*****************************************************************************/

.site {
  font-size: 110%;
  text-align: justify;
  width: 42em;
  margin: 3em auto 2em 10%;
  line-height: 1.5em;
}

.title {
  color: #066F6F;
  font-weight: bold;
  margin-bottom: 2em;
}

.site .title a {
  color: #066F6F;
  text-decoration: none;
}

.site .title a:hover {
  color: black;
}

.site .title a.extra {
  color: #aaa;
  text-decoration: none;
  margin-left: 1em;
}

.site .title a.extra:hover {
  color: black;
}

.site .meta {
  color: #aaa;
}

.site .footer {
  font-size: 80%;
  color: #666;
  border-top: 4px solid #eee;
  margin-top: 2em;
  overflow: hidden;
}

.site .footer .contact {
  float: left;
  margin-right: 3em;
}

.site .footer .contact a {
  color: #8085C1;
}

.site .footer .rss {
  margin-top: 1.1em;
  margin-right: -.2em;
  float: right;
}

.site .footer .rss img {
  border: 0;
}

/*****************************************************************************/
/*
/* Posts
/*
/*****************************************************************************/

#post {
  font-family: Georgia, Times, "Times New Roman", serif;
  color: #333333;
}

/* standard */

#post pre {
  border: 1px solid #ddd;
  background-color: #eef;
  padding: 0 .4em;
}

#post ul,
#post ol {
  margin-left: 1.35em;
}

#post code {
  border: 1px solid #ddd;
  background-color: #eef;
  font-size: 85%;
  padding: 0 .2em;
}

#post pre code {
  border: none;
}

#post img {
  max-width: 80%;
  padding: 1em 0;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}

#post blockquote {
  padding-left: 1em;
  border-left: 5px solid #ddd;
  font-style: italic;
}

#post .note {
  padding-left: 1em;
  border-left: 5px solid #066F6F;
  font-style: italic;
}

/* terminal */

#post pre.terminal {
  border: 1px solid black;
  background-color: #333;
  color: white;
}

#post pre.terminal code {
  background-color: #333;
}

#related {
  margin-top: 2em;
}

#related h2 {
  margin-bottom: 1em;
}

/*****************************************************************************/
/*
/* Lightbox
/*
/*****************************************************************************/

#lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-container {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#lightbox-img {
  max-width: 100%;
  max-height: calc(90vh - 60px);
  object-fit: contain;
}

#lightbox-metadata {
  color: rgba(255, 255, 255, 0.7);
  margin-top: 15px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9em;
  text-align: center;
  min-height: 1.5em;
}

/*****************************************************************************/
/*
/* Mobile Responsive Overrides
/*
/*****************************************************************************/

@media screen and (max-width: 600px) {
  .site {
    font-size: 100%;
    width: 90%;
    margin: 2em auto;
  }

  /* Ensure images do not overflow on small screens */
  #post img {
    max-width: 100%;
  }

  /* Stack footer items for better readability */
  .site .footer .contact {
    float: none;
    margin-right: 0;
    margin-bottom: 1em;
    text-align: center;
  }

  .site .footer .rss {
    float: none;
    margin-top: 0;
    text-align: center;
    display: block;
  }
}