/** Reset some basic elements */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
hr,
dl,
dd,
ol,
ul,
figure {
    margin: 0;
    padding: 0;
}

/** Basic styling */
body {
    font-family: Courier, "Courier New", mono;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 300;
    color: #111;
    background-color: #fdfdfd;
    -webkit-text-size-adjust: 100%;
}

/** Set `margin-bottom` to maintain vertical rhythm */
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
ul,
ol,
dl,
figure,
.highlight {
    margin-bottom: 15px;
}

/** Images */
img {
    max-width: 100%;
    vertical-align: middle;
}

/** Figures */
figure > img {
    display: block;
}

figcaption {
    font-size: 14px;
}

/** Lists */
ul,
ol {
    margin-left: 30px;
}

li > ul,
li > ol {
    margin-bottom: 0;
}

/** Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 300;
}

/** Links */
a {
    color: #2a7ae2;
    text-decoration: none;
}

a:visited {
    color: #1756a9;
}

a:hover {
    color: #111;
    text-decoration: underline;
}

/** Blockquotes */
blockquote {
    color: #828282;
    border-left: 4px solid #e8e8e8;
    padding-left: 15px;
    font-size: 18px;
    letter-spacing: -1px;
    font-style: italic;
}

blockquote > :last-child {
    margin-bottom: 0;
}

/** Tables (GFM markdown tables) — scoped to content, not the nav table */
.post-content table,
.blog-post-content table {
    border-collapse: collapse;
    margin-bottom: 15px;
}

.post-content th,
.post-content td,
.blog-post-content th,
.blog-post-content td {
    border: 1px solid #e8e8e8;
    padding: 6px 13px;
}

.post-content th,
.blog-post-content th {
    font-weight: 600;
    background: #f5f5f5;
}

.post-content tr:nth-child(2n) td,
.blog-post-content tr:nth-child(2n) td {
    background: #fafafa;
}

body.dark .post-content th,
body.dark .blog-post-content th {
    background: #2a2a2a;
}

body.dark .post-content tr:nth-child(2n) td,
body.dark .blog-post-content tr:nth-child(2n) td {
    background: #252525;
}

body.dark .post-content th,
body.dark .post-content td,
body.dark .blog-post-content th,
body.dark .blog-post-content td {
    border-color: #444;
}

/** Code formatting */
pre,
code {
    font-size: 15px;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
}

code {
    padding: 1px 5px;
}

pre {
    padding: 8px 12px;
    overflow-x: auto;
}

pre > code {
    border: 0;
    padding-right: 0;
    padding-left: 0;
}

/** Wrapper */
.wrapper {
    max-width: -webkit-calc(800px - (30px * 2));
    max-width: calc(800px - (30px * 2));
    margin-right: auto;
    margin-left: auto;
    padding-right: 30px;
    padding-left: 30px;
}

@media screen and (max-width: 800px) {
    .wrapper {
        max-width: -webkit-calc(800px - (30px));
        max-width: calc(800px - (30px));
        padding-right: 15px;
        padding-left: 15px;
    }
}

/** Clearfix */
.footer-col-wrapper:after,
.wrapper:after {
    content: "";
    display: table;
    clear: both;
}

/** Site header */
.site-header {
    min-height: 56px;
    position: relative;
}

.site-title {
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 32px;
    font-weight: bold;
    line-height: 56px;
    margin-bottom: 0;
}

.site-title,
.site-title:visited {
    color: #424242;
}

/** Page content */
.page-content {
    padding: 0;
}

.page-end {
    margin-bottom: 30px;
}

.nav-header {
    margin-bottom: 0;
}

.nav-table {
    width: 100%;
}

.nav-column-right {
    width: 25%;
}

@media screen and (max-width: 600px) {
    .nav-item-when {
        font-size: 10pt;
    }
}

.indent-1 {
    margin-left: 30px;
}

.indent-2 {
    margin-left: -webkit-calc((30px * 2));
    margin-left: calc((30px * 2));
}

.indent-3 {
    margin-left: -webkit-calc((30px * 3));
    margin-left: calc((30px * 3));
}

.post-meta {
    font-size: 14px;
    color: #828282;
}

/** Posts */
.post-header {
    margin-top: 30px;
    margin-bottom: 30px;
}

.post-title {
    font-size: 26px;
    font-family: "Times New Roman", Times, Georgia, serif;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 0px;
}

.post-title,
.post-title:visited {
    color: #424242;
}

@media screen and (max-width: 800px) {
    .post-title {
        font-size: 36px;
    }
}

.post-content {
    margin-bottom: 30px;
}

.post-content h2 {
    font-size: 32px;
}

@media screen and (max-width: 800px) {
    .post-content h2 {
        font-size: 28px;
    }
}

.post-content h3 {
    font-size: 26px;
}

@media screen and (max-width: 800px) {
    .post-content h3 {
        font-size: 22px;
    }
}

.post-content h4 {
    font-size: 20px;
}

@media screen and (max-width: 800px) {
    .post-content h4 {
        font-size: 18px;
    }
}

/** Syntax highlighting styles (Chroma classes mapped to rouge palette) */
.highlight {
    background: #fff;
}

.highlight .c {
    color: #998;
    font-style: italic;
}
.highlight .err {
    color: #a61717;
    background-color: #e3d2d2;
}
.highlight .k {
    font-weight: bold;
}
.highlight .o {
    font-weight: bold;
}
.highlight .cm {
    color: #998;
    font-style: italic;
}
.highlight .cp {
    color: #999;
    font-weight: bold;
}
.highlight .c1 {
    color: #998;
    font-style: italic;
}
.highlight .cs {
    color: #999;
    font-weight: bold;
    font-style: italic;
}
.highlight .gd {
    color: #000;
    background-color: #fdd;
}
.highlight .ge {
    font-style: italic;
}
.highlight .gr {
    color: #a00;
}
.highlight .gh {
    color: #999;
}
.highlight .gi {
    color: #000;
    background-color: #dfd;
}
.highlight .go {
    color: #888;
}
.highlight .gp {
    color: #555;
}
.highlight .gs {
    font-weight: bold;
}
.highlight .gu {
    color: #aaa;
}
.highlight .gt {
    color: #a00;
}
.highlight .kc {
    font-weight: bold;
}
.highlight .kd {
    font-weight: bold;
}
.highlight .kn {
    font-weight: bold;
}
.highlight .kp {
    font-weight: bold;
}
.highlight .kr {
    font-weight: bold;
}
.highlight .kt {
    color: #458;
    font-weight: bold;
}
.highlight .m {
    color: #099;
}
.highlight .s {
    color: #d14;
}
.highlight .na {
    color: #008080;
}
.highlight .nb {
    color: #0086b3;
}
.highlight .nc {
    color: #458;
    font-weight: bold;
}
.highlight .no {
    color: #008080;
}
.highlight .ni {
    color: #800080;
}
.highlight .ne {
    color: #900;
    font-weight: bold;
}
.highlight .nf {
    color: #900;
    font-weight: bold;
}
.highlight .nn {
    color: #555;
}
.highlight .nt {
    color: #000080;
}
.highlight .nv {
    color: #008080;
}
.highlight .ow {
    font-weight: bold;
}
.highlight .w {
    color: #bbb;
}
.highlight .mf {
    color: #099;
}
.highlight .mh {
    color: #099;
}
.highlight .mi {
    color: #099;
}
.highlight .mo {
    color: #099;
}
.highlight .sb {
    color: #d14;
}
.highlight .sc {
    color: #d14;
}
.highlight .sd {
    color: #d14;
}
.highlight .s2 {
    color: #d14;
}
.highlight .se {
    color: #d14;
}
.highlight .sh {
    color: #d14;
}
.highlight .si {
    color: #d14;
}
.highlight .sx {
    color: #d14;
}
.highlight .sr {
    color: #009926;
}
.highlight .s1 {
    color: #d14;
}
.highlight .ss {
    color: #990073;
}
.highlight .bp {
    color: #999;
}
.highlight .vc {
    color: #008080;
}
.highlight .vg {
    color: #008080;
}
.highlight .vi {
    color: #008080;
}
.highlight .il {
    color: #099;
}

/** Blog post styling */
.blog-post {
    font-family: "Source Serif Pro", serif;
}

.blog-post h2 {
    font-size: 32px;
}

.blog-post h3 {
    font-size: 24px;
}

.blog-post h4 {
    font-size: 20px;
}

.blog-post h5 {
    font-size: 18px;
}

.blog-toc {
    margin-left: 1em;
}

.blog-post-content {
    clear: both;
    padding-top: 24px;
}

.img-caption {
    font-style: italic;
    color: #888;
    margin-bottom: 10px;
}

/** Dark mode toggle */
.dark-toggle {
    float: right;
    font-size: 20px;
    line-height: 56px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

body.dark {
    background-color: #1e1e1e;
    color: #ddd;
}

body.dark a {
    color: #6ab0f3;
}

body.dark a:visited {
    color: #4a8fd4;
}

body.dark a:hover {
    color: #eee;
}

body.dark .site-title,
body.dark .site-title:visited,
body.dark .post-title,
body.dark .post-title:visited {
    color: #ccc;
}

body.dark blockquote {
    color: #999;
    border-left-color: #444;
}

body.dark pre,
body.dark code {
    border-color: #444;
}

body.dark .highlight {
    background: #1e1e1e;
}

body.dark .form-box input[type="submit"],
body.dark .form-box button {
    background: #1e1e1e;
    color: #ddd;
    border-color: #444;
}

body.dark table.manage-table td,
body.dark table.manage-table th {
    border-color: #444;
}

/** Forms (admin / private login) */
.form-box {
    margin: 30px 0;
}

.form-box label {
    display: block;
    margin-bottom: 5px;
}

.form-box input[type="text"],
.form-box input[type="password"],
.form-box textarea,
.form-box select {
    font-family: Courier, "Courier New", mono;
    font-size: 15px;
    padding: 6px 8px;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
    width: 100%;
    max-width: 480px;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.form-box textarea {
    min-height: 400px;
}

.form-box input[type="submit"],
.form-box button {
    font-family: Courier, "Courier New", mono;
    font-size: 15px;
    padding: 6px 14px;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
    background: #fdfdfd;
    cursor: pointer;
}

.form-box input[type="submit"]:hover,
.form-box button:hover {
    border-color: #2a7ae2;
    color: #2a7ae2;
}

.error {
    color: #a61717;
    margin: 15px 0;
}

.inline-form {
    display: inline;
}

table.manage-table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 15px;
}

table.manage-table td,
table.manage-table th {
    border: 1px solid #e8e8e8;
    padding: 6px 10px;
    text-align: left;
}

table.manage-table input[type="text"],
table.manage-table input[type="password"] {
    font-family: Courier, "Courier New", mono;
    font-size: 15px;
    padding: 4px 6px;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
    width: 100%;
    box-sizing: border-box;
}
