@font-face {
    font-family: 'charterregular';
    src: url('webfonts/charter_regular-webfont.eot');
    src: url('webfonts/charter_regular-webfont.eot?#iefix') format('embedded-opentype'),
         url('webfonts/charter_regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@import "webfonts/berkeleymono.css";


/* Body resets
   -------------------------------------------------- */

body {
    padding: 20px;
    font-family: "Berkeley Mono", Menlo, Monaco, monospace;
    line-height: 1.5;
    color: #000;
    background-color: #fffff8;
}
p {
    margin: 0 0 20px;
}
i, em, b, strong {
    padding-left: .1em;
    padding-right: .1em;
}
b, strong {
    font-weight: bold;
    color: #333;
}
ul, ol {
    padding: 0;
}

code, pre {
    font-family: "Berkeley Mono", Menlo, Monaco, Consolas, "Courier New", monospace;
}
code {
    font-size: 12px;
    color: #d14;
}
pre {
    display: block;
    margin: 0 0 14px;
    padding: 15px;
    border-radius: 3px 3px 3px 3px;
    font-size: 12px;
    background-color: #f5f5f5;
    word-break: break-all;
    word-wrap: break-word;
    overflow-x: auto;
}
blockquote {
    padding: 0 0 0 20px;
    margin: 0 30px 20px 0;
    color: #999;
    border-left: 8px solid #e5e5e5;
}
blockquote p:last-child {
    margin-bottom: 0;
}
img {
    display: block;
    margin: 0;
    border-radius: 5px;
}
a {
    font-weight: inherit;
    line-height: inherit;
    text-decoration: none;
}

#footnotes {
    border-top: 1px solid grey;
}

sup a:before {
    content: "[";
}
sup a:after {
    content: "]";
}
a:hover {
    text-decoration: underline;
}
table {
    line-height: 2.5;
    margin-bottom: 15px;
    max-width: 100%;
    width: 100%;
}
table td, table th {
    padding: 0 15px;
}
table th.left, table td.left {
    text-align: left;
}
table th.right, table td.right {
    text-align: right;
}
/******************************************************/
/* body */
body {
    color: #111;
    word-wrap: break-word; /* for long words & urls */
    position: relative;
    width: 770px;
    margin: 7em auto;
    padding: 0 74px 0 222px;
}


.sidebar {
    width: 180 px;
    position:absolute;
    left:0;
    margin-left: 20px;
    text-align:right;
}


.sidebar ul {
    list-style: none;
}

.sidebar h1:before {
    content: "";
}

.light {color: #8a8a8a}

.entry + .light {margin: 1.7em 0}

h1 + .light {margin-top: -1em}
h1 + .light:empty {display: none;}


.sidebar h1 {
    font-weight: 400;
    margin-bottom: 1em;
}

.sidebar h1, .sidebar a{
    font-size: 12px;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 1.7325px;
}

.sidebar a {display: block;}

.sidebar ul a {
    color: #8a8a8a;
}

#webring_icon {
    float: right;
    height: 14px;
    width: 14px;
    margin-left: 2px;
    background: url('data:image/svg+xml;base64,CjxzdmcgZmlsbD0ibm9uZSIgaGVpZ2h0PSIzMDAiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIgc3Ryb2tlLXdpZHRoPSIyOCIgd2lkdGg9IjMwMCIgdmlld0JveD0iMjUgMjUgMjUwIDI1MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik0yMDEuOTYyIDIxMGE2MCA2MCAwIDEwLTEwMy45MjQtNjBsLTUwIDg2LjYwMyIvPgogICAgPHBhdGggZD0iTTk4LjAzOCAyMTBhNjAgNjAgMCAxMDEwMy45MjQtNjBsLTUwLTg2LjYwMyIvPgogICAgPHBhdGggZD0iTTE1MCAxMjBhNjAgNjAgMCAxMDAgMTIwaDEwMCIvPgo8L3N2Zz4K') no-repeat center center;
    background-size: contain;
}

@media (prefers-color-scheme: dark) {
    #webring_icon {
        filter: invert(100%);
    }
}

/* post */


.post {
    position: relative;
    font-family: 'charterregular', Georgia, serif;
}

.post h1, .post h2, .post h3 {
    color: #111;
    font-size: 18px;
    font-weight: bold;
}

.post h1:first-of-type {
    font-size: 28px;
}

.post img {
    max-width: 100%;
}
.post li {
    list-style: none outside none;
}
.post ul > li:before {
    content: "- ";
}
.post ol {
    counter-reset: o-list;
}
.post ol > li:before {
    content: counter(o-list) ") ";
    counter-increment: o-list;
}

.post li ul, .post li ol {
    /* Indent nested lists */
    padding-left: 1em;
}

.post a {
    color: #3873AD;
}

/* index */

.index a {
    color: #000;
}

.index aside {
    float: right;
    margin: 0 10px 0 10px;
}

.index ul > li::before {
    content: "";
}

.index .index-link {
    width: 90%;
}

/* special for li in pre */
.post pre li {
    list-style-type: decimal;
}

.post pre li:before {
    display: none;
}

.post .footnum {
    float: left;
    margin-right: .2em;
}

/* table of content */
#table-of-contents {
    display: none;
}

/* katex */
.katex-html {
}

.post-meta {
    font-size: 12px;
}
.post-meta a {
    font-size: 12px;
    color : #3873AD;
}

/***********/
/* footer  */
/***********/

.footpara {
    margin: 0 0 5px 0;
}

/* Responsive
   -------------------------------------------------- */

@media screen and (max-width: 1000px) {

    body {padding: 0 2em;margin: 2em auto;width: auto;}

    .sidebar {position: relative;width: 100%;text-align: center;margin: 0 0 3em}

    .sidebar a {display: inline-block;}

    .sidebar .logo {margin: 0;display: block;text-align: center;}

    .logo.hasAvatar {word-spacing: 0}

    .margin,
    .margin.right,
    .margin.left {
        width: 30%;
        position: relative;display: block;top: auto;left: auto;right: auto;bottom: auto;}

    .margin.right {float: right;}
    .margin.left {text-align: left;float: left;}

    .wide, .wide.left, .wide.right {width: 100%;margin: 0}
    .index .index-link {
        width: 70%;
    }

    .sidebar ul {
        /* Transform the list into multiple columns */
        -webkit-column-count: 2; /* Chrome, Safari, Opera */
        -moz-column-count: 2;    /* Firefox */
        column-count: 2;         /* Standard syntax */

        -webkit-column-gap: 20px;
        -moz-column-gap: 20px;
        column-gap: 20px;
    }

    .sidebar {
        margin-bottom: 24px;
    }
}

@media screen and (max-width: 600px) {
    .index .index-link {
        width: 60%;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    body {
        color: #ddd;
        background-color: #2d2d2d;
    }
    b, strong {
        color: #ccc;
    }
    blockquote {
        color: #777;
        border-left: 8px solid #444;
    }
    .sidebar h1, .sidebar a {
        color: #ddd;
    }
    .sidebar a {
        color: #777;
    }
    .post {
        color: #ddd;
    }
    .post h1, .post h2, .post h3 {
        color: #ddd;
    }
    .post a {
        color: #d67a69;
    }
    .index a {
        color: #ddd;
    }
    .post-meta a {
        color: #d67a69;
    }
    code {
        color: #ffa07a;
    }
    pre {
        background-color: #1e1e1e;
        color: #dcdcdc;
    }
    blockquote {
        color: #888;
        border-left: 8px solid #666;
    }
    img {
        filter: brightness(0.8);
    }
    a {
        color: #a3d1ff;
    }
}
