:root {
    --black: #2d4059;
    --white: #f6f6f6;
    --text: var(--black);
    --background: var(--white);
    --code: #e4e4ea;
    --accent: #D81159;
    --light-accent: #FFBC42;

    --lighter-bg: #e4e4ea;
    --box-shadow: 0, 0, 0, 0.2;
    --kbd-top-shadow: 255, 255, 255, 0.7;
    --kbd-border: var(--black);
}

@media (prefers-color-scheme: dark) {
    :root {
        --white: #f6f6f6;
        --black: #223144;
        --text: var(--white);
        --background: var(--black);
        --code: #0E141B;
        --accent: #F45283;
        --light-accent: #FFBC42;

        --lighter-bg: #30455f;
        --box-shadow: 0, 0, 0, 0.8;
        --kbd-top-shadow: 255, 255, 255, 0.15;
        --kbd-border: var(--code);
    }
}


* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-size: 18px;
    font-family: 'Open Sans', sans-serif;
    background-color: var(--background);
    color: var(--text);
    display: grid;
    grid-template-rows: auto 1fr auto;
}

abbr {
    font-variant: small-caps;
    font-size: 1.1em;
    text-decoration: none;
}

hr {
    height: 0;
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid var(--white);
}

h1, h2, h3, h4 {
    font-family: 'Roboto Slab', sans-serif;
    color: var(--text);
    margin-bottom: 10px;
}

h1.post-title {
    margin-top: 0.3em;
    margin-bottom: 0.3em;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1em;
}

h2, h3, h4 {
    margin-top: 1.5em;
    font-weight: 700;
}

h2 {
    font-size: 30px;
}

h3 {
    font-size: 24px;
}

h4 {
    font-size: 20px;
}

p {
    line-height: 1.5em;
    color: var(--text);
    margin: 0 0 1.5em;
}

::selection {
    background: var(--light-accent);
    color: var(--black);
}

::-moz-selection {
    background: var(--light-accent);
    color: var(--black);
}

a {
    text-decoration: none;
    color: var(--accent);
    border-radius: 2px;
}

a:focus, a:hover {
    text-decoration: none;
    color: var(--text);
}

a svg {
    stroke: var(--accent);
}

a:hover svg, a:focus svg {
    stroke: var(--text);
}

code {
    padding: 2px 4px;
    font-size: 90%;
    background: var(--code);
    color: var(--text);
    border-radius: 4px;
    word-break: break-word;
    white-space: nowrap;
}

pre {
    display: block;
    padding: 12px;
    margin: 0 0 1.5em;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text);
    background: var(--code);
    border-radius: 4px;
    overflow: auto;
}

pre code {
    padding: 0;
    font-size: inherit;
    color: inherit;
    background-color: transparent;
    border-radius: 0;
    word-break: normal;
}

pre > code {
    border: none;
    white-space: pre;
}

img {
    vertical-align: middle;
}

ul, ol {
    margin-bottom: 1.5em;
}

ul li, ol li {
    line-height: 1.5em;
    margin-top: 0.5em;
}

kbd {
    background-color: var(--lighter-bg);
    border-radius: 4px;
    border: 1px solid var(--kbd-border);
    box-shadow: 0 1px 2px rgba(var(--box-shadow)), 0 2px 0 rgba(var(--kbd-top-shadow)) inset;
    color: var(--text);
    display: inline-block;
    font-size: .85em;
    font-weight: 700;
    line-height: 1;
    padding: 4px 8px;
    white-space: nowrap;
}

#topBar {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#logo {
    display: inline-flex;
    flex-direction: column;
    text-align: center;
    margin: 16px auto;
}

#logo a {
    padding: 4px 8px;
}

#logo img {
    margin: 0 8px;
    height: 32px;
    width: 32px;
}

#logo .subtitle {
    font-style: italic;
    color: var(--text);
    margin: 0;
}

#logo .title {
    font-family: 'Roboto Slab', sans-serif;
    display: inline;
    vertical-align: middle;
    font-size: 24px;
    margin: 0;
    color: var(--accent);
}

nav ul {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}

nav ul li {
    line-height: 1em;
    margin: 0;
    list-style-type: none;
}

nav ul li a {
    display: inline-block;
    padding: 12px;
    margin: 0;
    color: var(--text);
}

nav ul li a svg {
    stroke: var(--text);
}

nav ul li a:focus,
nav ul li a:hover
{
    color: var(--accent);
}

nav ul li a:hover svg,
nav ul li a:focus svg
{
    stroke: var(--accent);
}

nav .nav-icon {
    display: inline;
}

main#content {
    text-align: left;
    max-width: 600px;
    min-width: 0;
    margin: auto;
}

footer#footer {
    margin: 12px auto 12px;
    padding: 12px;
}

footer#footer a {
    color: var(--text);
    padding: 8px;
}

footer#footer .contact {
    font-size: 0.8em;
    color: var(--text);
}

footer#footer .contact .icons {
    margin: 12px 0 0 0;
}

h1.title {
    margin-bottom: 50px;
    text-align: center;
}

del {
    text-decoration: line-through;
    background-color: var(--accent);
    color: var(--white);
    padding: 0 4px;
}

ins {
    text-decoration: none;
    background-color: var(--light-accent);
    padding: 0 4px;
    color: var(--black);
}

table {
    width: 100%;
    border-collapse: collapse;
}


th, td {
    padding: 8px 8px;
}

th {
    border-bottom: 1px solid var(--black);
}

#home {
    text-align: center;
}

#home .image img, #about .image img {
    margin: 32px 0;
    height: 200px;
    width: 200px;
    border: 8px solid var(--light-accent);
}

#home .title {
    font-size: 2.1em;
    margin: 0 0 1em 0;
}

#home .lead {
    text-align: left;
    font-size: 1.2em;
    font-style: italic;
    margin-bottom: 1em;
}

#blog {
    margin-top: 20px;
    margin-bottom: 50px;
}

#blog .post {
    margin-bottom: 48px;
}

.author {
    padding: 35px 0 24px 0;
    margin-top: 72px;
    background: var(--background);
    position: relative;
}

.author h4 {
    text-align: center;
    font-family: 'Roboto Slab', sans-serif;
    margin-top: 4px;
}

.author img.profile {
    height: 80px;
    width: 80px;
    position: absolute;
    top: -45px;
    left: 50%;
    margin-left: -40px;
}

.author p.lead {
    font-size: 0.9em;
    margin-bottom: 0;
    font-style: italic;
}

.author .contact {
    padding-top: 12px;
}

.author .contact a {
    padding: 12px;
}

.contact .icons {
    display: flex;
    justify-content: space-evenly;
}

.meta-info {
    display: flex;
    justify-content: space-between;
    flex-flow: row wrap;
    font-style: italic;
    font-size: 0.9em;
    color: var(--text);
    margin-bottom: 1.4em;
}

.meta-info > div {
    margin: 0 1em 0.7em 0;
}

.tags span::after {
    content: ", ";
}

.tags span:last-child::after {
    content: "";
}

.feather {
    vertical-align: bottom;
}

h2 .feather {
    vertical-align: baseline;
}

.post img {
    max-width: 100%;
    height: auto;
    margin: 2em auto;
    text-align: center;
    display: block;
}

.post img + em {
    display: block;
    width: 80%;
    margin: -1em auto 2em;
    font-size: 16px;
    text-align: center;
}

.post img.space-bottom {
    margin-bottom: 3em;
}

.post video {
    max-width: 100%;
    height: auto;
}

.post pre {
    margin-bottom: 1.5em;
}

.post div.centered {
    display: block;
    margin: auto;
    text-align: center;
}

.post div.highlighted {
    margin: 2.5em 0;
    border-left: 8px solid var(--light-accent);
    padding: 0 12px;
    line-height: 1.5em;
}

.post aside {
    border: 1px solid var(--text);
    padding: 0 24px;
    font-size: 0.9em;
    transform: rotate(-1deg);
    margin: 12px;
}

blockquote {
    line-height: 1.5em;
    border-left: 8px solid var(--light-accent);
    padding: 1em;
    margin: 1em 0 1em 1em;
}

blockquote p {
    margin: 0;
}

.intro {
    font-size: 1.2em;
    line-height: 1.4em;
}

.comments {
    margin-top: 50px;
}

.skills .tag {
    background: var(--code);
    color: var(--text);
    padding: 4px 12px;
    margin: 4px;
    border-radius: 6px;
    white-space: nowrap;
}

.skills {
    margin: 2em 0;
    line-height: 2.3em;
}

.float-right {
    float: right;
}

.img-circle {
    border-radius: 50%;
}

.pager {
    margin: 50px 0 20px;
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.pager a {
    display: inline-flex;
    padding: 12px 10px;
    border-radius: 16px;
    align-items: center;
}

.pager a:focus, .pager a:hover {
    text-decoration: none;
    background-color: var(--light-accent);
}

.pager a.disabled  {
    visibility: hidden;
}

.page_number {
    margin: 0 12px;
    color: var(--text);
}

@media (max-width: 768px) {
    main#content {
        max-width: 100%;
        padding: 16px;
    }

    h1.post-title {
        font-size: 36px;
    }

    .page_number {
        margin: 0 10px;
    }
}

@media(min-width: 1280px) {
    .author {
        position: fixed;
        bottom: 12px;
        left: 12px;
        width: 300px;
    }
}

@media(max-width: 576px) {
    nav .nav-icon {
        display: none;
    }

    .meta-info > div {
        flex: 1 100%;
    }
}
