/* Kindle-like reading stylesheet */

body {
  font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, serif;
  color: #292219;
  background-color: #F7F3EA;
  font-size: 1.25rem;
  line-height: 1.6;
  max-width: 34em;
  padding: 2rem 1.5rem;
  margin: 0 auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  word-spacing: 0.05em;
}

p {
  margin: 0 0 1em 0;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  text-indent: 1.5em;
}

/* First paragraph after a heading should not be indented */
h1 + p, h2 + p, h3 + p,
figure + p, blockquote + p, pre + p,
.title + p, header + p {
  text-indent: 0;
}

.content {
  margin-bottom: 2rem;
}

h1, h2, h3 {
  font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, serif;
  text-align: left;
  letter-spacing: -0.01em;
  color: #1a1510;
}

h1 {
  font-weight: bold;
  font-size: 1.5em;
  margin: 1.8em 0 0.6em;
}

h2 {
  font-weight: bold;
  font-size: 1.25em;
  margin: 1.5em 0 0.5em;
}

h3 {
  font-weight: bold;
  font-size: 1.05em;
  margin: 1.3em 0 0.4em;
}

/* NAVIGATION — quiet, out of the way */

.site-nav {
  display: flex;
  font-size: 0.85rem;
  border-bottom: 1px solid #e0dbd0;
  margin-bottom: 2em;
  padding-bottom: 0.5em;
}

.site-nav a {
  display: block;
  padding: 0.3em 0.8em;
  color: #8a8070;
  text-decoration: none;
}

.site-nav a:hover {
  color: #292219;
}

.site-nav .logo {
  padding-left: 0;
  text-decoration: none;
  color: #292219;
}

.main-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media screen and (max-width: 48rem) {
  .site-nav,
  .main-menu {
    flex-direction: column;
  }

  .site-nav a {
    padding: 0.3rem;
    padding-left: 0;
  }

  body {
    padding: 1rem;
  }
}

/* IMAGES */

img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5em auto;
}

/* LINKS — subtle, like endnotes in a book */

a:link {
  color: #49442e;
  text-decoration: underline;
  text-decoration-color: #c8c0ac;
  text-underline-offset: 2px;
}

a:visited {
  color: #5c5647;
}

a:hover {
  text-decoration-color: #49442e;
}

/* CODE — recede into the page */

code, src {
  color: #443d33;
  background: #eee9dd;
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

pre {
  background-color: #eee9dd;
  padding: 1em 1.2em;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  overflow: auto;
  margin: 1.5em 0;
  font-size: 0.82em;
  line-height: 1.5;
  border-radius: 3px;
  border: none;
}

pre.example {
  background-color: #eee9dd;
  color: #443d33;
  padding: 1em 1.2em;
  font-size: 0.82em;
  line-height: 1.5;
  white-space: pre-wrap;
  border-radius: 3px;
}

div.highlight pre {
  background-color: #eee9dd !important;
  font-size: 0.82em;
  line-height: 1.5;
}

code.verbatim {
  font-size: 0.85em;
}

/* BLOCKQUOTES — like a Kindle highlight */

blockquote {
  border-left: 2px solid #d4cfc4;
  margin: 1.5em 0;
  padding: 0.4em 1.2em;
  color: #4a4338;
  font-style: italic;
}

/* LISTS */

ul, ol {
  padding-left: 1.5em;
}

ul li, ol li {
  margin-bottom: 0.4em;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.post-snippet {
  margin-bottom: 1rem;
}

.post-snippet h3 {
  margin-bottom: 0.25rem;
}

h3.post-list a {
  font-weight: normal;
}

/* FOOTER */

footer p.copyright {
  font-size: 60%;
  font-style: italic;
  color: #b0a898;
}

/* TABLES */

td {
  padding-left: 20px;
  padding-right: 20px;
}

/* MISC */

a.post-title {
  padding-right: 10px;
}

a.tag {
  padding: 1px 4px 2px 2px;
  text-decoration: none;
}

figcaption {
  font-style: italic;
  font-size: 0.85em;
  color: #8a8070;
  text-align: center;
}

span.imgerr {
  color: red;
  font-family: monospace;
}

.postdate {
  font-style: italic;
  color: #b0a898;
  font-size: 0.9em;
}

/* TAGS — muted, barely there */

span.art-tag, span.clojure-tag, span.code-tag,
span.emacs-tag, span.misc-tag, span.orgmode-tag,
span.physics-tag, span.python-tag, span.sketchup-tag,
span.southpole-tag {
  background-color: #ece7db;
  border-radius: 2px;
  padding: 1px 5px;
}

span.art-tag a, span.clojure-tag a, span.code-tag a,
span.emacs-tag a, span.misc-tag a, span.orgmode-tag a,
span.physics-tag a, span.python-tag a, span.sketchup-tag a,
span.southpole-tag a {
  color: #8a8070;
}

div.container {
  display: inline-grid;
}

span.sold {
  color: red;
  font-style: italic;
}

/* ORG-MODE EXPORT DEFAULTS */

#content { max-width: 34em; margin: auto; }
.title  { text-align: center; margin-bottom: .2em; }
.subtitle { text-align: center; font-size: medium;
            font-weight: bold; margin-top:0; }
.todo   { font-family: monospace; color: red; }
.done   { font-family: monospace; color: green; }
.priority { font-family: monospace; color: orange; }
.tag    { background-color: #ece7db; font-family: monospace;
          padding: 2px; font-size: 80%; font-weight: normal; }
.timestamp { color: #bebebe; }
.timestamp-kwd { color: #5f9ea0; }
.org-right  { margin-left: auto; margin-right: 0px;  text-align: right; }
.org-left   { margin-left: 0px;  margin-right: auto; text-align: left; }
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
.underline { text-decoration: underline; }
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
p.verse { margin-left: 3%; }

pre.src {
  position: relative;
  overflow: auto;
}
pre.src:before {
  display: none;
  position: absolute;
  top: -8px;
  right: 12px;
  padding: 3px;
  color: #8a8070;
  background-color: #eee9ddcc;
  font-size: 0.75em;
}
pre.src:hover:before { display: inline; margin-top: 14px;}

/* Language labels */
pre.src-asymptote:before { content: 'Asymptote'; }
pre.src-awk:before { content: 'Awk'; }
pre.src-authinfo::before { content: 'Authinfo'; }
pre.src-C:before { content: 'C'; }
pre.src-clojure:before { content: 'Clojure'; }
pre.src-css:before { content: 'CSS'; }
pre.src-D:before { content: 'D'; }
pre.src-ditaa:before { content: 'ditaa'; }
pre.src-dot:before { content: 'Graphviz'; }
pre.src-calc:before { content: 'Emacs Calc'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
pre.src-fortran:before { content: 'Fortran'; }
pre.src-gnuplot:before { content: 'gnuplot'; }
pre.src-haskell:before { content: 'Haskell'; }
pre.src-hledger:before { content: 'hledger'; }
pre.src-java:before { content: 'Java'; }
pre.src-js:before { content: 'Javascript'; }
pre.src-latex:before { content: 'LaTeX'; }
pre.src-ledger:before { content: 'Ledger'; }
pre.src-lisp:before { content: 'Lisp'; }
pre.src-lilypond:before { content: 'Lilypond'; }
pre.src-lua:before { content: 'Lua'; }
pre.src-matlab:before { content: 'MATLAB'; }
pre.src-mscgen:before { content: 'Mscgen'; }
pre.src-ocaml:before { content: 'Objective Caml'; }
pre.src-octave:before { content: 'Octave'; }
pre.src-org:before { content: 'Org mode'; }
pre.src-oz:before { content: 'OZ'; }
pre.src-plantuml:before { content: 'Plantuml'; }
pre.src-processing:before { content: 'Processing.js'; }
pre.src-python:before { content: 'Python'; }
pre.src-R:before { content: 'R'; }
pre.src-ruby:before { content: 'Ruby'; }
pre.src-sass:before { content: 'Sass'; }
pre.src-scheme:before { content: 'Scheme'; }
pre.src-screen:before { content: 'Gnu Screen'; }
pre.src-sed:before { content: 'Sed'; }
pre.src-sh:before { content: 'shell'; }
pre.src-sql:before { content: 'SQL'; }
pre.src-sqlite:before { content: 'SQLite'; }
pre.src-forth:before { content: 'Forth'; }
pre.src-io:before { content: 'IO'; }
pre.src-J:before { content: 'J'; }
pre.src-makefile:before { content: 'Makefile'; }
pre.src-maxima:before { content: 'Maxima'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-picolisp:before { content: 'Pico Lisp'; }
pre.src-scala:before { content: 'Scala'; }
pre.src-shell:before { content: 'Shell Script'; }
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
pre.src-cpp:before  { content: 'C++'; }
pre.src-abc:before  { content: 'ABC'; }
pre.src-coq:before  { content: 'Coq'; }
pre.src-groovy:before  { content: 'Groovy'; }
pre.src-bash:before  { content: 'bash'; }
pre.src-csh:before  { content: 'csh'; }
pre.src-ash:before  { content: 'ash'; }
pre.src-dash:before  { content: 'dash'; }
pre.src-ksh:before  { content: 'ksh'; }
pre.src-mksh:before  { content: 'mksh'; }
pre.src-posh:before  { content: 'posh'; }
pre.src-ada:before { content: 'Ada'; }
pre.src-asm:before { content: 'Assembler'; }
pre.src-caml:before { content: 'Caml'; }
pre.src-delphi:before { content: 'Delphi'; }
pre.src-html:before { content: 'HTML'; }
pre.src-idl:before { content: 'IDL'; }
pre.src-mercury:before { content: 'Mercury'; }
pre.src-metapost:before { content: 'MetaPost'; }
pre.src-modula-2:before { content: 'Modula-2'; }
pre.src-pascal:before { content: 'Pascal'; }
pre.src-ps:before { content: 'PostScript'; }
pre.src-prolog:before { content: 'Prolog'; }
pre.src-simula:before { content: 'Simula'; }
pre.src-tcl:before { content: 'tcl'; }
pre.src-tex:before { content: 'TeX'; }
pre.src-plain-tex:before { content: 'Plain TeX'; }
pre.src-verilog:before { content: 'Verilog'; }
pre.src-vhdl:before { content: 'VHDL'; }
pre.src-xml:before { content: 'XML'; }
pre.src-nxml:before { content: 'XML'; }
pre.src-conf:before { content: 'Configuration File'; }

table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top; }
th.org-right  { text-align: center; }
th.org-left   { text-align: center; }
th.org-center { text-align: center; }
td.org-right  { text-align: right; }
td.org-left   { text-align: left; }
td.org-center { text-align: center; }
dt { font-weight: bold; }
.footpara { display: inline; }
.footdef  { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }
.equation-container {
  display: table;
  text-align: center;
  width: 100%;
}
.equation { vertical-align: middle; }
.equation-label {
  display: table-cell;
  text-align: right;
  vertical-align: middle;
}
.inlinetask {
  padding: 10px;
  border: 2px solid gray;
  margin: 10px;
  background: #ffffcc;
}
#org-div-home-and-up { text-align: right; font-size: 70%; white-space: nowrap; }
textarea { overflow-x: auto; }
.linenr { font-size: smaller; }
.code-highlighted { background-color: #ffff00; }
.org-info-js_info-navigation { border-style: none; }
#org-info-js_console-label { font-size: 10px; font-weight: bold; white-space: nowrap; }
.org-info-js_search-highlight { background-color: #ffff00; color: #000000; font-weight: bold; }
.org-svg { }

/* FIGURES */

figure,
figure.org-image {
  margin: 1.5em 0;
  text-align: center;
}

figure img {
  max-width: 100%;
  height: auto;
}

figure.org-image figcaption,
figure figcaption {
  font-size: 0.85em;
  color: #8a8070;
  margin-top: 0.5em;
}
