* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    background-color: #ffffff;
    font: 16px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    text-align: center;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin: 1.5em 0 0.5em 0;
    text-align: left;
}
h1 { font-size: 2.25em; }
h2 { font-size: 1.75em; border-bottom: 1px solid #eee; padding-bottom: 0.3em; }
h3 { font-size: 1.5em; }
h4 { font-size: 1.25em; }
h5 { font-size: 1.1em; }
h6 { font-size: 1em; color: #777; }

p { margin-bottom: 1em; }
a { color: #007bff; text-decoration: none; }
a:hover { text-decoration: underline; }
s, del { color: #888; }

#post ul, #post ol {
    margin-bottom: 1em;
    padding-left: 2em;
    text-align: left;
}

#post li {
    margin-bottom: 0.5em;
    padding-left: 0.5em;
}

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

#post ul ul li {
    list-style-type: circle;
}
#post ul ul ul li {
    list-style-type: square;
}

#post p { text-align: justify; }

#post p:has(img) { 
    text-align: center;
    margin: 2em 0;
}
#post img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: inline-block;
}

#post p:has(img) em {
    display: block;
    margin-top: 0.8em;
    font-style: italic;
    font-size: 0.9em;
    color: #777;
    text-align: center;
}

#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: "SF Mono", "Consolas", "Menlo", monospace;
}

#post pre {
    background-color: #f6f8fa;
    border: 1px solid #d0d7de;
    color: #24292f;
}

#post pre:has(code.language-bash),
#post pre:has(code.language-shell),
#post pre:has(code.language-sh),
#post pre:has(code.language-console) {
    background-color: #2d2d2d;
    border: 1px solid #111;
    color: #f8f8f2;
}

#post code {
    font-family: "SF Mono", "Consolas", "Menlo", monospace;
    font-size: 0.9em;
    background-color: rgba(0,0,0,0.05);
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

#post pre code { background-color: transparent; padding: 0; border: none; font-size: 1em; }

#post table { width: 100%; border-collapse: collapse; margin-bottom: 1em; text-align: left; }
#post th, #post td { border: 1px solid #d0d7de; padding: 0.5em 0.75em; }
#post th { font-weight: 600; background-color: #f6f8fa; }
#post tr:nth-child(even) { background-color: #f6f8fa; }

hr { border: 0; border-top: 1px solid #eee; margin: 2em 0; }
#post blockquote { padding-left: 1em; border-left: 4px solid #d0d7de; color: #6a737d; margin: 1.5em 0; }

.site { font-size: 110%; text-align: justify; width: 48em; max-width: 90%; margin: 3em auto 2em auto; }
.title { color: #0a5494; font-weight: bold; margin-bottom: 2em; text-align: left; }
.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 .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; padding-top: 1em; overflow: hidden; text-align: left; }
.site .footer .contact { float: left; margin-right: 3em; }
ul.posts { list-style-type: none; margin-bottom: 0.5em; text-align: left; }
ul.posts li { line-height: 1.75em; }
ul.posts span { color: #aaa; font-family: monospace; font-size: 80%; }

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

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

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

.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: 800px) {
    .site {
        width: 90%;
        max-width: 90%;
        margin-top: 2em;
    }
}

@media screen and (max-width: 500px) {
    body { font-size: 15px; }

    .site {
        width: 94%;
        margin: 1.5em auto;
        text-align: left;
    }

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

    .title { line-height: 2.0; margin-bottom: 1.5em; text-align: center; }
    .site .title a.extra { display: inline-block; margin: 0 0.5em; }

    .contact-wrapper {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
    }

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

    .site .footer { text-align: left; }

    .month-name { width: 2.8em; min-width: 2.8em; font-size: 0.8em; }

    #post table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #post pre { font-size: 0.85em; padding: 0.8em; }
}