/* modified from http://www.yinwang.org/main.css */
body {
    font-family: "lucida grande", "lucida sans unicode", lucida, helvetica, "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
    background-color: white;
    font-size: 100%;
    color: #222435;
    word-break: break-word;
}

div.main {
    margin: auto;
    /* 顶边用 rem，避免 2% 在大屏上过窄、整站贴浏览器上沿 */
    padding: 1.5rem 5% 5% 5%;
    width: 700px;
    line-height: 150%;
    border: 1px solid LightGrey;
    word-break: break-word;
}

/* Site header - home link */
div.site-header {
    text-align: center;
    padding: 1em 0 1em 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 1.5em;
}

a.site-brand {
    display: inline-flex;
    /* 与文字首行基线对齐，避免 align-items:center 与中文视觉重心不一致导致 logo 显「飘」 */
    align-items: baseline;
    justify-content: center;
    gap: 0.5em;
    text-decoration: none;
    padding: 0.3em 0.8em;
    border-radius: 4px;
    transition: all 0.2s ease;
    /* 与标题同一字号基准，logo 用 em 与「阿男聊技术」对齐 */
    font-size: 1.5em;
    /* 避免继承 .main 的 150% 行高，否则行框过高会导致 logo 与字形视觉不齐 */
    line-height: 1;
    --site-title-font-family: "Palatino Linotype", "Book Antiqua", Palatino, Helvetica, STKaiti, SimSun, serif;
    --site-title-line-height: 1.15;
}

img.site-logo {
    /* em 相对 .site-brand，与 .site-title 的 1em 同字号档 */
    height: 0.92em;
    width: 0.92em;
    border-radius: 0.2em;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

span.site-title {
    font-family: var(--site-title-font-family);
    font-size: 1em;
    font-weight: 600;
    color: #555;
    line-height: var(--site-title-line-height);
}

a.site-brand:hover {
    background-color: #f0f0f0;
    text-decoration: none;
}

a.site-brand:hover span.site-title {
    color: #204A87;
}

nav.site-nav {
    margin-top: 0.75em;
    font-size: 0.85em;
    line-height: 1.6;
}

nav.site-nav a {
    color: #555;
    text-decoration: none;
}

nav.site-nav a:hover {
    color: #204A87;
    text-decoration: underline;
}

span.site-nav-sep {
    color: #bbb;
    margin: 0 0.35em;
}

div.home-intro {
    margin: 0 1.25em 1.5em 1.25em;
    padding: 1em 1.1em;
    background-color: #f8f8ff;
    border: 1px solid #e8e8f0;
    border-radius: 4px;
    font-size: 0.95em;
    line-height: 1.65;
}

div.home-series {
    margin-top: 0.75em;
}

div.post-meta {
    margin: 0 0 1.25em 0;
    padding: 0.75em 1em;
    background-color: #f8f8ff;
    border-left: 3px solid #204A87;
    font-size: 0.9em;
    line-height: 1.6;
}

p.post-video-link,
p.post-series-link {
    margin: 0.25em 0;
}

div.series-nav {
    margin: 1.5em 0;
    padding: 1em 1.1em;
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

p.series-nav-title {
    margin: 0 0 0.6em 0;
    font-weight: 600;
    color: #555;
}

ol.series-nav-list {
    margin: 0;
    padding-left: 1.4em;
}

ol.series-nav-list li {
    margin: 0.35em 0;
    line-height: 1.5;
}

p.series-item-desc {
    margin: 0.35em 0 0 0;
    font-size: 0.85em;
    color: #666;
    line-height: 1.5;
}

p.series-back {
    margin-top: 1.5em;
    font-size: 0.9em;
}

div.tag-index {
    margin: 1em 0 1.5em 0;
}

div.tag-card {
    margin: 1em 0;
    padding: 0.9em 1em;
    border: 1px solid #e8e8f0;
    border-radius: 4px;
    background: #fafafa;
}

div.tag-card h3 {
    margin: 0 0 0.4em 0;
    border: none;
    font-size: 1.1em;
}

div.tag-card p {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

div.site-footer {
    text-align: center;
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid #e0e0e0;
    font-size: 0.85em;
    color: #666;
}

div.site-footer p {
    margin: 0.35em 0;
}

div.site-footer span {
    margin: 0 0.4em;
    color: #bbb;
}

p.site-footer-meta {
    font-size: 0.75em;
    color: #999;
}

p.site-footer-icp {
    font-size: 0.8em;
}

p.site-footer-icp a {
    color: #666;
    text-decoration: none;
}

p.site-footer-icp a:hover {
    text-decoration: underline;
}

.site-footer-beian-icon {
    vertical-align: middle;
    margin-right: 0.25em;
}

H1, H2, H3, H4, H5, H6 {
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, Helvetica, STKaiti, SimSun, serif;
    width: 98%;
    line-height: 150%;
    color: #666666;
    word-break: break-word;
}

H1 { font-size: 1.6em; }
H2 { font-size: 1.45em; }
H3 { font-size: 1.25em; }
H4 { font-size: 1.12em; }
H5 { font-size: 1.05em; }
H6 { font-size: 1em; }

H1, H2 {
    margin-bottom: 1.67em;
    padding: 0.2em;
    border-bottom: 2px LightGrey solid;
}

/* 文章页：标题 h2 紧跟 site-header，补一段与页眉分隔的顶距 */
div.main > h2:first-of-type {
    margin-top: 0.5em;
}

H3, H4 {
    margin-top: 2.14em;
    margin-bottom: 1.5em;
    border-bottom: 1px LightGrey solid;
}

H5, H6 {
    margin-top: 1.4em;
    margin-bottom: 0.75em;
    font-weight: 600;
}

blockquote {
    margin: 0 0 0 0.25em;
    padding: 0 0 0 0.5em;
    border-left: 0.25em lightgrey solid;
    word-break: break-word;
}

pre {
    font-family: Inconsolata, Consolas, "DEJA VU SANS MONO", "DROID SANS MONO", Proggy, monospace;
    border: solid 1px #ddd;
    border-radius: 3px;
    background-color: #f8f8ff;
    padding: 6px 10px;
    font-size: 1em;
    line-height: 100%;
    overflow: auto;
    word-break: break-word;
}

code {
    font-family: Inconsolata, Consolas, "DEJA VU SANS MONO", "DROID SANS MONO", Proggy, monospace;
    font-size: 0.75em;
    border: solid 1px #ddd;
    border-radius: 3px;
    background-color: #f8f8ff;
    margin: 0 2px;
    padding: 0px 5px;
    word-break: break-word;
}

pre code {
    border: none;
    margin: 0;
    padding: 0;
    background-color: transparent;
    word-break: break-word;
}

a {
    text-decoration: none;
    padding: 1px;
    color: #204A87;
    word-break: break-word;
}

a:hover {
    text-decoration: underline;
}

div.tag_cloud a {
    word-break: break-word;
}

div.nav a {
    text-decoration: none;
    color: #555;
}

div.nav a:hover {
    background-color: LightGrey;
    color: #ffffff;
}

div.nav {
    border-top: 1px solid #d4d4d4;
    border-left: 1px solid #d4d4d4;
    border-right: 1px solid #d4d4d4;
    margin: auto;
    padding: 0 5% 0 5%;
    width: 700px;
    height: 1.5em;
    line-height: 150%;
    font-size: 1em;
}

div.nav_rss {
    width: 20%;
    text-align: right;
    float: right;
}

div.nav_nav {
    width: 80%;
    float: left;
}

img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
    max-width: 100%;
}

img.emoji {
    display: inline;
    margin-bottom: 0;
}

hr {
    border: 0;
    height: 2px;
    background-color: LightGrey;
    margin: 0.75em 0;
}

strong {
    color: #666666;
}

div.overview {
    margin: 1.75em 1.25em 1.75em 1.25em;
    display: flex;
    align-items: baseline;
    gap: 0.75em;
}

div.detail {
    flex: 1;
    min-width: 0;
    margin-left: 0;
    word-break: break-word;
}

div.date {
    flex: 0 0 25%;
    max-width: 25%;
    color: #555;
    text-align: right;
    font-style: italic;
    font-size: 0.75em;
}

div.paginator {
    margin-left: 20%;
    float: center;
    width: 60%;
    color: #555;
    text-align: center;
    font-size: 0.75em;
}

.prev_next {
    display: block;
    padding: 0;
    padding-top: 0.6em;
}

.prev_next li {
    list-style-type: none;
    padding: 0 0 0.2em;
}

.prev_next li span {
    padding: 0 0.5em 0 0.5em;
    background-color: lightslategrey;
    color: #fff;
    margin-right: 0.5em;
}

div.post_footer {
    text-align: right;
    font-size: 0.9em;
    font-style: italic;
}

div.post_footer a {
    border: LightGrey 1px dashed;
}

table {
    border-collapse: collapse;
}

th {
    padding: 0.375em 0.8125em;
    border: 1px solid #ddd;
    font-weight: bold;
}

td {
    padding: 0.375em 0.8125em;
    border: 1px solid #ddd;
}

tr:nth-child(2n) {
    background-color: #f8f8f8;
}
