/* Black on white, humanist sans, 800px measure.
   Typography and page furniture follow jondeaton.github.io. */

body {
  max-width: 800px;
  margin: auto;
  padding: 1em;
  line-height: 1.5;
  font-family: Optima, Candara, Calibri, Arial, sans-serif;
}

/* ---------------------------------------------------------------
   Header and footer
   --------------------------------------------------------------- */

.topnav {
  text-align: left;
  padding: 0 0 0.7em;
  margin-bottom: 1em;
  border-bottom: 1px dashed #ddd;
}

.topnav a {
  text-decoration: none;
  background: #eee;
  padding: 5px;
  border-radius: 5px;
}

hr {
  border-style: dashed;
  color: #ddd;
}

footer {
  text-align: center;
}

footer a {
  text-decoration: none;
}

.date {
  color: #666;
}

/* ---------------------------------------------------------------
   Code
   --------------------------------------------------------------- */

code {
  background: #f9f9f9;
  font-family: 'Lucida Console', Monaco, monospace;
  font-size: 85%;
}

pre {
  border: 1px solid #ddd;
  box-shadow: 5px 5px 5px #eee;
  padding: 1em;
  overflow-x: auto;
}

pre code {
  background: none;
}

.codehilite {
  overflow-x: auto;
}

/* ---------------------------------------------------------------
   Misc elements
   --------------------------------------------------------------- */

img, iframe, video {
  max-width: 100%;
}

blockquote {
  background: #f9f9f9;
  border-left: 5px solid #ccc;
  padding: 3px 1em 3px;
}

table {
  margin: auto;
  border-top: 1px solid #666;
  border-bottom: 1px solid #666;
}

table thead th {
  border-bottom: 1px solid #ddd;
}

th, td {
  padding: 5px;
}

thead, tfoot, tr:nth-child(even) {
  background: #eee;
}

/* Wide tables scroll rather than stretching the page. */
.table-wrap {
  overflow-x: auto;
}

/* ---------------------------------------------------------------
   Intro: portrait floats right, bio wraps around it.
   --------------------------------------------------------------- */

.intro-photo img {
  width: 200px;
  height: auto; /* override the intrinsic height attribute on the tag */
  float: right;
  margin-left: 10px;
  margin-bottom: 10px;
}

@media only screen and (max-width: 500px) {
  .intro-photo img {
    width: 140px;
  }
}

/* ---------------------------------------------------------------
   Print
   --------------------------------------------------------------- */

@media print {
  body {
    max-width: 100%;
  }

  .topnav {
    display: none;
  }

  pre {
    box-shadow: none;
  }

  tr, img {
    page-break-inside: avoid;
  }

  h2, h3 {
    page-break-after: avoid;
  }
}

/* Syntax highlighting in black and white -- weight and slant only.
   Regenerate with: .venv/bin/pygmentize -S bw -f html -a .codehilite */

.codehilite .hll { background-color: #ffffcc }
.codehilite .c { font-style: italic } /* Comment */
.codehilite .err { border: 1px solid #F00 } /* Error */
.codehilite .k { font-weight: bold } /* Keyword */
.codehilite .ch { font-style: italic } /* Comment.Hashbang */
.codehilite .cm { font-style: italic } /* Comment.Multiline */
.codehilite .cpf { font-style: italic } /* Comment.PreprocFile */
.codehilite .c1 { font-style: italic } /* Comment.Single */
.codehilite .cs { font-style: italic } /* Comment.Special */
.codehilite .ge { font-style: italic } /* Generic.Emph */
.codehilite .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.codehilite .gh { font-weight: bold } /* Generic.Heading */
.codehilite .gp { font-weight: bold } /* Generic.Prompt */
.codehilite .gs { font-weight: bold } /* Generic.Strong */
.codehilite .gu { font-weight: bold } /* Generic.Subheading */
.codehilite .kc { font-weight: bold } /* Keyword.Constant */
.codehilite .kd { font-weight: bold } /* Keyword.Declaration */
.codehilite .kn { font-weight: bold } /* Keyword.Namespace */
.codehilite .kr { font-weight: bold } /* Keyword.Reserved */
.codehilite .s { font-style: italic } /* Literal.String */
.codehilite .nc { font-weight: bold } /* Name.Class */
.codehilite .ni { font-weight: bold } /* Name.Entity */
.codehilite .ne { font-weight: bold } /* Name.Exception */
.codehilite .nn { font-weight: bold } /* Name.Namespace */
.codehilite .nt { font-weight: bold } /* Name.Tag */
.codehilite .ow { font-weight: bold } /* Operator.Word */
.codehilite .sa { font-style: italic } /* Literal.String.Affix */
.codehilite .sb { font-style: italic } /* Literal.String.Backtick */
.codehilite .sc { font-style: italic } /* Literal.String.Char */
.codehilite .dl { font-style: italic } /* Literal.String.Delimiter */
.codehilite .sd { font-style: italic } /* Literal.String.Doc */
.codehilite .s2 { font-style: italic } /* Literal.String.Double */
.codehilite .se { font-weight: bold; font-style: italic } /* Literal.String.Escape */
.codehilite .sh { font-style: italic } /* Literal.String.Heredoc */
.codehilite .si { font-weight: bold; font-style: italic } /* Literal.String.Interpol */
.codehilite .sx { font-style: italic } /* Literal.String.Other */
.codehilite .sr { font-style: italic } /* Literal.String.Regex */
.codehilite .s1 { font-style: italic } /* Literal.String.Single */
.codehilite .ss { font-style: italic } /* Literal.String.Symbol */
