:root {
  ::selection {
    background: var(--yellow);
  }
  --yellow: #fce234;
  --red: #C5004A;
  --darkred: #7F0036;
  --lightgray: #e0e0e0;
  --gray: #999;
  --darkgray: #333;
  --navy: #17050F;
  --blue: blue;
  --white: white;
}
* {
  box-sizing: border-box;
}
html,
body {
  padding: 0;
  margin: 0;
  font-family: "Lucida Console", Monaco, Menlo, monospace;
  color: var(--darkgray);
  background-color: var(--white);
}
p:last-child {
  margin-bottom: 0;
}
p,
.tmpl-post li,
img {
  max-width: 37.5em; /* 600px /16 */
}
p,
.tmpl-post li {
  line-height: 1.45;
}
a[href] {
  color: var(--blue);
}
main {
  padding: 1rem;
}
main :first-child {
  margin-top: 0;
}
header:after {
  content: "";
  display: table;
  clear: both;
}
table {
  margin: 1em 0;
}
table td,
table th {
  padding-right: 1em;
  font-weight: normal;
/*   table-layout: fixed; */
  width: 50%;
}
img,
table {
  max-width: 100%;
}

pre,
code {
  font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono",
    "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono",
    "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L",
    "Courier New", Courier, monospace;
  line-height: 1.5;
}
pre {
  font-size: 14px;
  line-height: 1.375;
  direction: ltr;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  -moz-tab-size: 2;
  -o-tab-size: 2;
  tab-size: 2;
  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
  padding: 1em;
  margin: 0.5em 0;
  background-color: #f6f6f6;
}
.highlight-line {
  display: block;
  padding: 0.125em 1em;
  text-decoration: none; /* override del, ins, mark defaults */
  color: inherit; /* override del, ins, mark defaults */
}

/* allow highlighting empty lines */
.highlight-line:empty:before {
  content: " ";
}
/* avoid double line breaks when using display: block; */
.highlight-line + br {
  display: none;
}

.highlight-line-isdir {
  color: #b0b0b0;
  background-color: #222;
}
.highlight-line-active {
  background-color: #444;
  background-color: hsla(0, 0%, 27%, 0.8);
}
.highlight-line-add {
  background-color: #45844b;
}
.highlight-line-remove {
  background-color: #902f2f;
}

/* Header */
.home {
  padding: 0 1rem;
  margin: 1rem 0; /* 16px /16 */
  font-size: 0.5em; /* 16px /16 */
}
.home :link:not(:hover) {
  text-decoration: none;
}

/* Nav */
.nav {
  padding: 0;
  list-style: none;
  margin-left: 1em;
}
.nav-item {
  display: block;
  margin: 0.5em;
}
.nav-item a[href]:not(:hover) {
  text-decoration: none;
  color: var(--darkgray);
}
.nav-item-active,
.nav-item a[href]:hover {
  background-color: var(--yellow);
  color: var(--darkgray);
}
h1,
h1 a {
  background-color: white;
}

/* Projects list */
.projects-list {
  list-style: none;
  padding: 0;
}
.projects-list li {
  display: inline-block;
  margin: 1em;
  text-align: center;
  font-size: 0.8em;
  vertical-align: top;
}
.projects-list li img {
  margin-bottom: 0.5em;
  width: 350px;
  height: 200px;
  object-fit: cover;
}
.projects-list li a {
  color: var(--darkgray);
  text-decoration: none;
  line-height: 1em;
}

/* Tags */
.tag {
  display: inline-block;
  vertical-align: text-top;
  text-transform: uppercase;
  font-size: 0.625em; /* 10px /16 */
  padding: 2px 4px;
  margin-left: 0.8em; /* 8px /10 */
  background-color: var(--red);
  color: var(--white);
  border-radius: 0.25em; /* 3px /12 */
  text-decoration: none;
}
a[href].tag,
a[href].tag:visited {
  color: #fff;
}

/* Warning */
.warning {
  background-color: #ffc;
  padding: 1em 0.625em; /* 16px 10px /16 */
}
.warning ol:only-child {
  margin: 0;
}

/* Direct Links / Markdown Headers */
.direct-link {
  font-family: sans-serif;
  text-decoration: none;
  font-style: normal;
  margin-left: 0.1em;
}
a[href].direct-link,
a[href].direct-link:visited {
  color: transparent;
}
a[href].direct-link:focus,
a[href].direct-link:focus:visited,
:hover > a[href].direct-link,
:hover > a[href].direct-link:visited {
  color: #aaa;
}

/* Custom for Andy */
header {
  float: left;
  width: 230px;
  margin-right: 1em;
  /* position: fixed; */
  overflow: auto;
  padding: 0 0 0 1em;
}
main {
  margin: 1em 1em 1em 230px;
}
#logo {
  max-width: 150px;
}
#copyright,
#copyright-footer {
  font-size: 0.7em;
  color: var(--gray);
}
#copyright-footer {
  display: none;
}

/* img captions */
img + br + em {
  display: block;
  font-style: italic;
  color: var(--darkgray);
  text-align: center;
}

/* nav */
.projects-tag-list li {
  list-style-type: none;
  margin: 0.5em 0;
  line-height: 0.8em;
}
.projects-tag-list,
.tag-posts-list {
  margin: 0;
  padding: 0;
}
.tag-posts-list li {
  margin-left: 1em;
}
.tag-posts-list a {
  font-size: 0.8em;
}
.tag-header-button {
  background: none;
  border: none;
  font-size: 0.8em;
  font-weight: bold;
  font-family: inherit;
  padding: 0;
  color: var(--darkgray);
}
.tag-header-button:hover {
  background-color: var(--yellow);
  cursor: pointer;
  text-decoration: underline;
}
.projects-tag {
  margin: 0.5em 0;
}
.tag-posts-list {
  display: none;
}
.tag-posts-list.collapsed {
  display: block;
}

/* mobile */
@media only screen and (max-width: 600px) {
  header {
    float: none;
    width: 100%;
    position: relative;
    text-align: center;
    padding: 0;
    margin: 0;
  }
  #logo {
    display: block;
    margin: 0 auto;
  }
  .nav-item {
    display: inline-block;
  }
  #copyright {
    display: none;
  }
  #copyright-footer {
    display: block;
    padding: 1em;
    text-align: center;
    max-width: 100%;
  }
  main {
    margin: .5em;
  }
  .projects-tag-list {
    margin: 0;
    padding: 0;
  }
  .projects-tag-list {
    display: none;
  }
  .projects-list li {
    /* max-width: 150px; */
    /* margin: .5em; */
  }
  .projects-list li img {
    /* max-width: 300px; */
  }
}
