* {
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    background-color: white;
    font: 13.34px helvetica, arial, clean, sans-serif;
    text-align: center;
}

h1, h2, h3, h4, h5, h6 {
    font-size: 100%;
}

h1 {
    margin-bottom: 1em;
}

p {
    margin: 1em 0;
}

a {
    color: #00a;
}

a:visited {
    color: #a0a;
}

a:hover {
    color: black;
}

table {
    font-size: inherit;
    font: 100%;
}

#post ul, #post ol {
    margin: 1em 0;
    padding-left: 2em; 
    list-style-position: outside; 
    text-align: left;
}

#post li {
    margin-bottom: 0.5em;
    line-height: 1.6;
}

ul.posts {
    list-style-type: none;
    margin-bottom: 0.5em;
}

ul.posts li {
    line-height: 1.75em;
}

ul.posts span {
    color: #aaa;
    font-family: Monaco, "Courier New", monospace;
    font-size: 80%;
}

.site {
    font-size: 110%;
    text-align: justify;
    width: 42em;
    margin: 3em auto 2em auto;
    line-height: 1.5em;
}

.title {
    color: #0a5494;
    font-weight: bold;
    margin-bottom: 2em;
}

.site .title a {
    color: #0a5494;
    text-decoration: none;
}

.site .title a:hover {
    color: black;
}

.site .title a.extra {
    color: #aaa;
    text-decoration: none;
    margin-left: 1em;
}

.site .title a.extra:hover {
    color: black;
}

.site .meta {
    color: #aaa;
    font-family: Monaco, "Courier New", monospace;
    font-size: 0.95em; 
    margin-bottom: 2em;
    text-align: left;
    line-height: 1.6;
}

.site .meta a {
    color: #0a5494; 
    text-decoration: none;
    font-weight: bold;
}

.site .meta a:hover {
    color: black;
    text-decoration: underline;
}

.site .footer {
    font-size: 80%;
    color: #666;
    border-top: 4px solid #eee;
    margin-top: 2em;
    overflow: hidden;
}

.site .footer .contact {
    float: left;
    margin-right: 3em;
}

.site .footer .contact a {
    color: #8085C1;
}

#post pre {
    padding: 1em;
    margin: 1.5em 0;
    border-radius: 6px;
    line-height: 1.5;
    
    text-align: left;
    white-space: pre;
    overflow-x: auto;
    
    font-family: Consolas, "Monaco", "Courier New", monospace;

    background-color: #2d2d2d;
    color: #f8f8f2;
    border: 1px solid #111;
}

#post code {
    font-family: Consolas, "Monaco", "Courier New", monospace;
    font-size: 90%;
    
    background-color: transparent;
    color: inherit; 
    border: none;
    padding: 0;
}

#post p code, #post li code {
    background-color: #444;
    color: #fff;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: Consolas, "Monaco", "Courier New", monospace;
    font-size: 85%;
    border: none;
}

#post img {
    max-width: 100%; 
    padding: 1em 0;
}

#post blockquote {
    padding-left: 1em;
    border-left: 5px solid #ddd;
    font-style: italic;
}

#post .note {
    padding-left: 1em;
    border-left: 5px solid #a00;
    font-style: italic;
}

#post table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    text-align: left;
    font-size: 0.9em;
}

#post th, #post td {
    border: 1px solid #ddd;
    padding: 0.75em;
}

#post th {
    background-color: #eef;
    color: #0a5494;
    font-weight: bold;
}

#post tr:nth-child(even) {
    background-color: #f9f9f9;
}

#post ul ul, #post ol ol, #post ul ol, #post ol ul {
    padding-left: 2em;
    margin-top: 0.5em;
}

#post p:has(img) {
    text-align: center;
    margin: 2em 0;
    text-align-last: center;
}

#post img {
    display: inline-block;
    max-width: 100%;
    height: auto;
    border-radius: 3px;
}

#post p:has(img) em {
    display: block;
    text-align: center;

    font-style: italic;
    font-size: 0.9em;
    color: #777;

    font-family: helvetica, arial, clean, sans-serif;
}

.year-section {
    margin-bottom: 3em;
    text-align: left;
}

#home h1,
#post h1 {
    font-size: 2.0em;
    font-weight: bold;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.2em;
    margin-top: 1em;
    margin-bottom: 0.5em;
    color: #111;
    text-align: left;
}

#home h2,
.year-title {
    font-size: 1.5em;
    font-weight: bold;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.2em;
    margin-top: 1.8em;
    margin-bottom: 0.8em;
    color: #111;
    text-align: left;
}


#post h2 {
    font-size: 1.3em;
    font-weight: bold;
    border-bottom: none;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: #222;
}

.month-row {
    display: flex;
    margin-bottom: 1.5em;
    align-items: baseline;
}

.month-name {
    width: 3em;
    min-width: 3em;
    font-weight: bold;
    color: #888;
    text-transform: uppercase;
    font-size: 0.85em;
    padding-right: 1em;
}

.month-posts {
    flex-grow: 1;
}

.post-item {
    margin-bottom: 0.4em;
}

.post-item a {
    font-weight: 500;
    text-decoration: none;
    color: #007bff;
}

.post-item a:hover {
    text-decoration: underline;
}


@media screen and (max-width: 768px) {
    .site {
        width: 92%;
        margin-top: 2em;
    }
}

@media screen and (max-width: 480px) {
    .site {
        text-align: left;
        line-height: 1.4em;
    }

    .title {
        text-align: center;
        line-height: 2.4;
    }
    .site .title a.extra {
        display: inline-block;
        padding: 0 5px;
    }

    #home h1, #post h1 { font-size: 1.5em; }
    #home h2, .year-title { font-size: 1.25em; }

    .month-name {
        width: 3.5em;
        font-size: 0.75em;
    }

    .contact-wrapper {
        display: flex !important;
        flex-wrap: wrap !important;
        width: 100%;
        text-align: left;
    }

    .site .footer .contact {
        display: block;
        float: none;
        box-sizing: border-box; 
        width: 50% !important;
        margin: 0 0 1.5em 0 !important;
        padding-right: 15px;
    }

    .site .footer .contact p {
        margin: 0;
        font-size: 0.9em;
    }

    #post p:has(img) {
        margin: 1.5em 0;
    }
}