@charset "UTF-8";

:root.light {
    --color-bg: #eee;
    --color-bg-2: #fafafa;
    --color-border: #aaa;
    --color-text: #444;
    --color-text-faded: #888;
    --color-text-link: #2a5db0;
    --color-table-bg-hilight: #f8f8f8;
    --font-line-height: 1.6;
    --font-text-weight: normal;
    --font-title-weight-bold: bold;
    --font-tracking: normal;
    --font-word-spacing: normal;
}

:root {
    --color-bg: #333;
    --color-bg-2: #272822;
    --color-border: #777;
    --color-text: #eee;
    --color-text-faded: #aaa;
    --color-text-link: rgb(19, 127, 179);
    --color-table-bg-hilight: #444;
    --font-line-height: 1.8;
    --font-text-weight: 100;
    --font-title-weight: normal;
    --font-tracking: .03rem;
    --font-word-spacing: .01rem;
}

html {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: medium;
    font-weight: var(--font-text-weight);
    letter-spacing: var(--font-tracking);
    word-spacing: var(--font-word-spacing);
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: var(--font-line-height);
    margin: 2rem auto;
    max-width: 40em;
    padding: 0 2em;
    width: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-text);
    font-weight: var(--font-title-weight);
    margin-bottom: 1em;
    margin-top: 2em;
}

h1 {
    font-size: 2.2em;
    text-align: center;
}

h2 {
    font-size: 1.8em;
}

h3 {
    font-size: 1.3em;
}

h4 {
    font-size: 1.3em;
}

h5 {
    font-size: 1.2em;
}

h6 {
    font-size: 1.1em;
}

li {
    padding: 0.3em 0;
}

header {
    text-align: center;
}

header nav {
    display: inline-block;
}

header ul {
    display: inline-block;
    font-size: 1.2em;
    list-style: none;
    margin: 0;
    padding: 0;
}

header li{
    display: inline-block;
    padding: 0 0.3em;
    vertical-align: top;
}

.active {
    background-color: var(--color-bg-2);
    border: 1px solid var(--color-border);
}

code,
pre {
    background-color: var(--color-bg-2);
    border: 1px solid var(--color-border);
    font: 'Menlo', 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre;
    overflow-x: auto;
}

pre code {
    border: none;
}

h3 code,
p code,
table code,
ul code {
    padding: 0.2em;
}

h3 code {
    font-size: inherit;
}

a {
    color: var(--color-text-link);
    text-decoration: none;
    transition-duration: 0.3s;
    transition-property: color, background-color;
    transition-timing-function: linear;
}

a:hover {
    background-color: var(--color-bg-2);
    text-decoration: underline;
}

h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a,
header a {
    color: var(--color-text);
}

h1 a:hover,
h2 a:hover,
h3 a:hover,
h4 a:hover,
h5 a:hover,
h6 a:hover,
header a:hover {
    background-color: inherit;
}

.meta,
footer {
    color: var(--color-text-faded);
}

.feed {
    float: right;
}

a.feed:hover {
    background-color: inherit;
}

.feed img {
    height: 1.4rem;
    width: 1.4rem;
}

table {
    border: 1px solid var(--color-border);
    border-collapse: collapse;
    border-spacing: 0;
    text-align: left;
    width: 100%;
    display: block;
    overflow-x: auto;
}

th, td {
    border: 1px solid var(--color-border);
    padding: 0.3em 0.6em;
    white-space: nowrap;
}

tr:hover {
    background-color: var(--color-table-bg-hilight);
}

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

/* Captions for images using the following markdown syntax:
 * ![](path_to_image)
 * *image_caption*
 *
 * From http://stackoverflow.com/a/30366422/4721953
 */
img+em {
    display: block;
    color: var(--color-text-faded);
}

/* ========================================================================
 * Project page
 * ======================================================================== */
.project a {
    display: inline-block;
    background-color: inherit;
}

.project img {
    display: block;
    height: auto;
    width: 380px;
}

.description {
    display: inline-block;
    vertical-align: top;
    width: 35%;
}

.img-wrapper {
    display: inline-block;
    background: var(--color-bg-2);
    border: 1px solid var(--color-border);
    left: -5px;
    margin: 10px;
    padding: 4px;
    position: relative;
    top: -5px;
}

/* ========================================================================
 * Photos page
 * ======================================================================== */

.photo-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    grid-auto-rows: 128px;
    grid-column-gap: 1rem;
    grid-row-gap: 1rem;
    list-style: none;
    margin-bottom: 3rem;
}

.photo-list > .photo img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.photo > a:hover {
    background: none;
}

.photo img:hover {
    outline: var(--color-bg-2) solid;
}
