:root {
  --fg: #000;
  --bg: #fefefe;
  --bg-code: #ddd;
  --border: 0.08rem solid var(--fg);
}

/* Generic */
body {
  color: var(--fg);
  background-color: var(--bg);
  fill: var(--fg);

  margin: 0 auto;
  max-width: 48em;
  padding: 1em;

  font: 1.1em/1.6 serif;

  overflow-y: scroll;
}

h1 { font: 1.6em serif; }
h2 {
  font: 1.3em serif;
  padding: 0em 0em 0.2em 0em;
  border-bottom: var(--border);
}
h3 {
  font: 1.2em serif;
  border-bottom: var(--border);
}

a {
  font-style: italic;
  color: #000;
}

a:visited {
  color: #555;
}

img {
  display: block;
  width: 85%;
  max-width: 100%;
  margin: 1em auto;
}

figure {
  margin: 0px;
}

figure.banner img {
    width: 100%;
}

figcaption {
  font-size: 0.85em;
  color: #555;
  text-align: center;
  margin-top: 0.5em;
}

/* Blockquote */
blockquote {
  margin: 1.5em 0;
  padding: 0.75em 1em;
  border-left: 0.3em solid #aaa;
  background: #f9f9f9;
}

blockquote p {
  margin: 0.5em 0;
}

blockquote {
  color: #333;
  font-style: italic;
}

blockquote p:first-child { margin-top: 0em; }
blockquote p:last-child { margin-bottom: 0em; }

/* Codeblocks */
pre {
  background: var(--bg-code);
  padding: 1em;
  overflow-x: auto;
}

code {
  background: var(--bg-code);
  font-family: monospace;
  padding: 0em;
}

/* Inline Code */
p code,
li code {
  background: var(--bg-code);
  border: 1px solid #ddd;
  padding: 0.1em 0.3em;
}

/* Footnotes */
.footnotes {
  border-top: var(--border);
  font: 0.8em serif;
  padding: 1em 3em;
  
  li {
    margin-bottom: 0.5em;
  }
}

/* Header */
header {
  border-bottom: var(--border);
  padding-bottom: 1em;
  
  .site-title a {
    font-style: normal;
    color: inherit;
    text-decoration: none;
  }
}

.site-nav a {
  font-style: normal;
  margin-right: 1.5em;
  text-decoration: none;
  color: #333;
}

/* Footer */
footer {
  border-top: var(--border);
  padding: 1em;
  text-align: center;
  font: 0.7em sans-serif;
}

/* Repo */

.repo-title {
  font: 1.5em;
  margin: 0.3em 0em 0.1em 0em;
}

ul.repo-filelist {
  margin: 0.3em 0em;
}

.repo-nav {
  color: #333;
  border-bottom: 0.1em dashed var(--fg);
  padding: 0em 0em 0.2em 0em;
}

.repo-nav a {
  font-size: 1.1em;
  font-style: normal;
  margin-right: 0.5em;
  color: #333;
}

.repo-path {
  margin: 0.5em 0em -0.5em 0em;
  border: none;
}

/* File view */

pre .ln {
  display: inline-block;
  width: 2em;
  margin-right: 1em;
  text-align:
  right;
  color: #888;
  user-select: none;
}

/* Log */

table.log {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

table.log col.date   { width: 7.5em; }
table.log col.author { width: 12em; }
table.log th,
table.log td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  padding: 0.25em 0.5em;
}

table.log tr:nth-child(even) td { background: #f3f3f3; }

/* Writings */
a.category {
  margin-right: 0.3em;
  color: #222;
}

.writings-header {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 0.1em dashed var(--fg);
  padding: 0em 0em 0.2em 0em;

}

nav.feed {
  text-align: right;
  margin-left: 4em;
  color: #222;
}


a.feed {
  color: #222;
}

/* Writings List */
ul.writings-list li:nth-child(odd) { background: #f3f3f3; }

ul.writings-list {
  list-style: none;
  padding: 0;
  margin: 0;

  li.writing {
    display: grid;
    grid-template-columns: max-content auto auto;
    margin-bottom: 0.5em;
    .item-title,
    .item-categories {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
    }
    .item-date {width: 6.5em;}
    .item-title {padding-right: 12px;}
    .item-categories {text-align: right;}
  }
}
