/* Colors */
:root {
    --lightgray: #e0e0e0;
    --gray: #C0C0C0;
    --bold: #333;
    --text: #555;
    --white: #fff;

    --font-mono: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace;
}

/* Global stylesheet */

html,
body {
    padding: 0;
    margin: 0;
    font-family: Figtree, sans-serif;
    font-size: 16px;
    line-height: 20px;
    color: var(--text);
    background-color: var(--white);
}

p:last-child {
    margin-bottom: 0;
}

header a[href] {
    color: black;
}

a[href] {
    color: #4882e5;
}

main {
    padding: 2rem 1rem 6rem 1rem;
}

main :first-child {
    margin-top: 0;
}

header {
    border-bottom: 1px dashed var(--lightgray);
}

table {
    margin: 1em 0;
}

table td,
table th {
    padding-right: 1em;
}

pre,
code {
    font-family: var(--font-mono);
    line-height: 1.5;
}

pre {
    font-size: 14px;
    line-height: 1.375;
    direction: ltr;
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    -moz-tab-size: 2;
    -o-tab-size: 2;
    tab-size: 2;
    -webkit-hyphens: none;
    -moz-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;
    padding: 1em;
    margin: .5em 0;
    background-color: #f6f6f6;
}

code {
    word-break: break-all;
}

hr {
    margin-top: 60px;
}

header {
    display: flex;
    align-items: center;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: var(--bold);
}
strong {
    font-weight: 600;
    color: var(--bold);
}
b {
    font-weight: 600;
    color: var(--bold);
}

/* Home link */
.home {
    padding: 0 16px;
    margin: 16px 0;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
}
.home:link:not(:hover) {
    text-decoration: none;
}

.nav {
    padding: 0;
    list-style: none;
    margin-left: 1em;
}

.nav-item {
    margin-right: 1em;
}

.nav-item a[href]:not(:hover) {
    text-decoration: none;
}

.nav-item-active {
    font-weight: 600;
    text-decoration: underline;
}

/* Templates */
.tmpl-post,.tmpl-home {
    margin: 0 auto;
    max-width: 40em;
    line-height: 1.5;
}

.tmpl-post img {
    max-width: 100%;
    height: auto;
    border: 1px solid #00000033;
    border-radius: 2px;
}

/* Posts list */
.postlist {
    list-style: none;
    padding: 0;
}

.postlist-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    line-height: 2;
}

.postlist-item:before {
    display: inline-block;
    pointer-events: none;
    line-height: 100%;
    text-align: right;
}

.postlist-date,
.postlist-item:before {
    font-size: 0.8125em;
    /* 13px /16 */
    color: var(--text);
}

.postlist-date {
    word-spacing: -0.5px;
    padding-right: 0.5em;
    font-family: var(--font-mono);
}

.postlist-link {
    font-weight: 400;
    padding-left: .25em;
    padding-right: .25em;
    text-underline-position: from-font;
    text-underline-offset: 0;
    text-decoration-thickness: 1px;
}


/* Tags */
.post-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    font-size: 0.75em;
    /* 12px /16 */
    padding: 0.08333333333333em 0.3333333333333em;
    /* 1px 4px /12 */
    margin-left: 0.6666666666667em;
    /* 8px /12 */
    margin-top: 0.5em;
    /* 6px /12 */
    margin-bottom: 0.5em;
    /* 6px /12 */
    color: var(--text);
    border: 1px solid var(--gray);
    border-radius: 0.25em;
    /* 3px /12 */
    text-decoration: none;
    line-height: 1.8;
}

a[href].post-tag,
a[href].post-tag:visited {
    color: inherit;
}

a[href].post-tag:hover,
a[href].post-tag:focus {
    background-color: var(--lightgray);
}

.postlist-item>.post-tag {
    align-self: center;
}

/* Direct Links / Markdown Headers */
.direct-link {
    font-family: sans-serif;
    text-decoration: none;
    font-style: normal;
    margin-left: .1em;
}

a[href].direct-link,
a[href].direct-link:visited {
    color: transparent;
}

a[href].direct-link:focus,
a[href].direct-link:focus:visited,
:hover>a[href].direct-link,
:hover>a[href].direct-link:visited {
    color: #aaa;
}