:root {
    --bg: #1e1e1e;
    --fg: #e6e6e6;
    --hl: #5e8e97;
    --bd: #444;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #f0f0f0;
        --fg: #1a1a1a;
        --hl: #5e8e97;
        --bd: #ccc;
    }
}

body {
    background-color: var(--bg);
    color: var(--fg);

    max-width: 51rem;
    margin: 2rem auto;

    font-family: 'EB Garamond', serif;
    font-weight: 400;
    font-size: 1.2rem;
    line-height: 1.6;
}

header {
    margin-top: 1rem;
    margin-bottom: 7rem;
}

header p, header h1 {
    margin: 0;
    font-weight: 400;
}

header time {
    font-size: 90%;
}

header .published {
    font-variant: small-caps;
}

header .tags {
    margin-left: 2rem;
}

header, main {
    padding: 0 1em;
    box-sizing: border-box;
}

a {
    color: var(--hl);
}

a:hover {
    text-decoration: none;
}

main * {
    max-width: 40rem;
    padding: 0;
    margin: 0;
}

main * + * {
    margin-top: 1rem;
}

main figure, main pre, main table {
    max-width: none;
    margin: 2rem 0;
}

main h1, main h2, main h3, main h4, main h5, main h6 {
    font-weight: 400;
    margin-top: 4rem;
    margin-bottom: 2rem;
}
  
em {
    font-style: italic;
}
  
strong {
    font-weight: 700;
}

ul, ol {
    padding-left: 0;
    margin-left: 0;
    list-style-position: inside;
}

ul ul, ul ol, ol ul, ol ol {
    padding-left: 1.5em;
}

pre {
    overflow-x: auto;
    font-size: 80%;
    line-height: 1.4;
    background-color: var(--bg) !important; 
    border: 1px solid var(--bd);
    border-radius: 5px;
    padding: 10px;
}

code {
    font-family: monospace;
}

.table-container {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--fg);
    border-radius: 5px;
}

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

th, td {
    border: 1px solid var(--fg);
    padding: 0.25em;
    text-align: left;
}

thead tr:nth-child(odd), tbody tr:nth-child(even) {
    background-color: white;
}

figure figcaption {
    margin-top: 0;
    font-style: italic;
}

figure img {
    max-width: 100%;
    border-radius: 5px;
}

blockquote {
    margin: 0;
    position: relative;
    padding-left: 1.25em;
    padding-right: 1.25em;
    display: inline-block;
}
  
blockquote::before {
    content: open-quote;
    position: absolute;
    top: 0.25em;
    left: 0;
    font-size:200%;
}

blockquote::after {
    content: close-quote;
    position: absolute;
    bottom: 0;
    right:0;
    font-size:200%;
}

footer {
    margin-top: 3em;
    font-size: 80%;
}

footer p {
    display: inline;
}