/*
 * Fira Sans - For headings and nav.
 */
@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 400;
  src: local('Fira Sans'), url("fonts/FiraSans-Regular.woff") format('woff');
}
@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 500;
  src: local('Fira Sans Medium'), url("fonts/FiraSans-Medium.woff") format('woff');
}

/*
 * Source Serif Pro - For body text.
 *
 * Using Heuristica for italics since Source Serif Pro currently doesn't support
 * them.
 */
@font-face {
  font-family: 'Source Serif Pro';
  font-style: normal;
  font-weight: 400;
  src: local('Source Serif Pro'), url("fonts/SourceSerifPro-Regular.woff") format('woff');
}
@font-face {
  font-family: 'Source Serif Pro';
  font-style: italic;
  font-weight: 400;
  src: local('Heuristica Italic'), url("fonts/Heuristica-Italic.woff") format('woff');
}
@font-face {
  font-family: 'Source Serif Pro';
  font-style: normal;
  font-weight: 700;
  src: local('Source Serif Pro Bold'), url("fonts/SourceSerifPro-Bold.woff") format('woff');
}

/*
 * Source Code Pro for code and other monospace text.
 */
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 400;
  src: local('Source Code Pro'), url("fonts/SourceCodePro-Regular.woff") format('woff');
}
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 600;
  src: local('Source Code Pro Semibold'), url("fonts/SourceCodePro-Semibold.woff") format('woff');
}

.text-center { text-align: center; }

html {
  font-family: "Source Serif Pro", "serif";

  /* Enable kerning and ligatures. */
  -moz-font-feature-settings: "kern", "liga";
  -webkit-font-feature-settings: "kern", "liga";
  font-feature-settings: "kern", "liga";
}

nav, h1, h2, h3, h4, h5, h6 {
  font-family: "Fira Sans", "sans-serif";
}

code, kbd, pre, samp {
  font-family: "Source Code Pro", "monospace";
}

body > footer, main {
  max-width: 96ch;
}

h1 a, h1 a:visited {
  color: black;
}

nav ul {
  margin: 0 0;
}

/* Grey out post metadata slightly. */
.meta {
  color: #777;
}

/* Subtitles under headings. */
.subtitle { margin-top: 0; }

/*
 * Override Writ's pre formatting with something like Writ's blockquote
 * formatting, but with a border-left line that's half as thick. Additionally,
 * reduce the line-height (from 1.5rem) for code.
 */
pre {
  background-color: inherit;
  border-radius: 0;
  border: rgba(0, 0, 0, .05) solid;
  border-width: 0 0 0 0.25ch;
  margin-left: 1.75ch;
  padding-left: 1ch;
  line-height: 1.2rem;
}

a.anchor { color: black; }

.footnotes {
  border-top: 1px solid #ccc;
  margin-top: 1.5rem;
}

.footnotes p {
  margin: 0;
}

/* Implement side-by-side column layouts using flex. */
.multi-column {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.multi-column > * {
  margin-right: 2em;
}

/* Use flexbox layout for projects page. */
.project-category {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}

/* (30ch + 2ch) * 3 (projects per row) = 96ch (max-width of body) */
.project {
  width: 30ch;
  padding-right: 2ch;
}

.project p {
  margin-top: 0;
}

/*
 * GitHub style for Pygments syntax highlighter.
 */
code .hll { background-color: #f8f8f8; border: 1px solid #ccc; padding: 6px 10px; border-radius: 3px; }
code .c { color: #999988; font-style: italic; }
code .err { color: #a61717; background-color: #e3d2d2; }
code .k { font-weight: bold; }
code .o { font-weight: bold; }
code .cm { color: #999988; font-style: italic; }
code .cp { color: #999999; font-weight: bold; }
code .c1 { color: #999988; font-style: italic; }
code .cs { color: #999999; font-weight: bold; font-style: italic; }
code .gd { color: #000000; background-color: #ffdddd; }
code .gd .x { color: #000000; background-color: #ffaaaa; }
code .ge { font-style: italic; }
code .gr { color: #aa0000; }
code .gh { color: #999999; }
code .gi { color: #000000; background-color: #ddffdd; }
code .gi .x { color: #000000; background-color: #aaffaa; }
code .go { color: #888888; }
code .gp { color: #555555; }
code .gs { font-weight: bold; }
code .gu { color: #800080; font-weight: bold; }
code .gt { color: #aa0000; }
code .kc { font-weight: bold; }
code .kd { font-weight: bold; }
code .kn { font-weight: bold; }
code .kp { font-weight: bold; }
code .kr { font-weight: bold; }
code .kt { color: #445588; font-weight: bold; }
code .m { color: #009999; }
code .s { color: #dd1144; }
code .n { color: #333333; }
code .na { color: teal; }
code .nb { color: #0086b3; }
code .nc { color: #445588; font-weight: bold; }
code .no { color: teal; }
code .ni { color: purple; }
code .ne { color: #990000; font-weight: bold; }
code .nf { color: #990000; font-weight: bold; }
code .nn { color: #555555; }
code .nt { color: navy; }
code .nv { color: teal; }
code .ow { font-weight: bold; }
code .w { color: #bbbbbb; }
code .mf { color: #009999; }
code .mh { color: #009999; }
code .mi { color: #009999; }
code .mo { color: #009999; }
code .sb { color: #dd1144; }
code .sc { color: #dd1144; }
code .sd { color: #dd1144; }
code .s2 { color: #dd1144; }
code .se { color: #dd1144; }
code .sh { color: #dd1144; }
code .si { color: #dd1144; }
code .sx { color: #dd1144; }
code .sr { color: #009926; }
code .s1 { color: #dd1144; }
code .ss { color: #990073; }
code .bp { color: #999999; }
code .vc { color: teal; }
code .vg { color: teal; }
code .vi { color: teal; }
code .il { color: #009999; }
code .gc { color: #999; background-color: #EAF2F5; }
