/* ==========================================================================
   yuanye theme — minimal single-column blog
   Style values extracted (getComputedStyle) from sinyalee.com (Cenote theme):
     body Roboto 16/400 #363B40 on #FFF | headings Catamaran 700 #16181A
     accent #146BB7 (blue, meta links) | dark #16181A (header/footer bg)
     post title 21px | excerpt line-height 1.8 | 80px between entries
   ========================================================================== */

/* ---------- Self-hosted fonts (latin-only; CJK falls back to system) ---------- */
@font-face {
    font-family: 'Catamaran';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/catamaran-latin-700.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/roboto-latin-400.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/roboto-latin-500.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Design tokens ---------- */
:root {
    --color-bg: #ffffff;
    --color-text: #363b40;
    --color-heading: #16181a;
    --color-dark: #16181a;          /* header bar + footer bg */
    --color-accent: #146bb7;        /* blue — meta links, hovers */
    --color-meta: #6c757d;
    --color-border: #e9ecef;
    --color-footer-text: #bdbdbd;

    --font-heading: "Catamaran", "PingFang SC", "Hiragino Sans GB",
                    "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
    --font-body: "Roboto", "PingFang SC", "Hiragino Sans GB",
                 "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;

    --content-width: 760px;         /* reading column — change to 1160px to match reference exactly */
    --container-wide: 1160px;
    --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.8;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-heading);
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}

a { color: var(--color-accent); text-decoration: none; transition: color .2s var(--ease); }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ---------- Layout containers ---------- */
.container {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 20px;
}
.container-wide { max-width: var(--container-wide); }

.site-main { min-height: 50vh; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header { border-bottom: 1px solid var(--color-border); }

.header-top {
    background: var(--color-dark);
    padding: 10px 0;
}
.header-top .container {
    display: flex;
    justify-content: center;
}
.header-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}
.header-nav .nav-link {
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
    opacity: 0.82;
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
}
.header-nav .nav-link:hover,
.header-nav .nav-current {
    opacity: 1;
    text-decoration: none;
    border-bottom-color: #ffffff;
}

.header-branding {
    padding: 52px 20px 40px;
    text-align: center;
}
.site-title {
    font-size: 1.75rem;          /* 28px — slightly larger than the 21px measured, for hierarchy */
    margin: 0 0 8px;
}
.site-title a { color: var(--color-heading); }
.site-title a:hover { color: var(--color-accent); text-decoration: none; }
.site-description {
    font-size: 14px;
    color: var(--color-text);
    margin: 0;
}

/* ==========================================================================
   Post list (index / tag / author)
   ========================================================================== */
.post-list,
.post-list-inner,
.archive { padding: 28px 0 56px; }

.post-entry { margin: 0 0 80px; }
.post-entry:last-child { margin-bottom: 0; }

.entry-meta {
    font-size: 12px;
    line-height: 1.6;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.entry-meta .cat-links a {
    color: var(--color-accent);
    text-decoration: none;
}
.entry-meta .posted-on {
    position: relative;
    display: inline-block;
    padding-left: 60px;
    margin-left: 10px;
}
.entry-meta .posted-on::before {
    content: "";
    position: absolute;
    left: 10px;
    top: calc(50% - 1px);
    width: 40px;
    height: 1px;
    background: var(--color-accent);
}
.entry-meta .posted-on a,
.entry-meta time { color: var(--color-accent); text-decoration: none; }

.entry-title {
    font-size: 21px;             /* matches reference exactly (1.313rem) */
    font-weight: 700;
    margin: 0 0 10px;
}
.entry-title a { color: var(--color-heading); text-decoration: none; }
.entry-title a:hover { color: var(--color-accent); }

.entry-content p {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.8;
}

/* "阅读更多" link with sliding line — signature micro-interaction from reference */
.readmore {
    display: inline-block;
    position: relative;
    padding-left: 40px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-heading);
    text-decoration: none;
    transition: transform .5s var(--ease);
}
.readmore::before {
    content: "";
    position: absolute;
    left: 0;
    top: calc(50% - 1px);
    width: 30px;
    height: 1px;
    background: var(--color-heading);
    transition: background .5s var(--ease);
}
.readmore:hover { transform: translateX(10px); text-decoration: none; }
.readmore:hover::before { background: var(--color-accent); }

.no-posts { color: var(--color-meta); padding: 40px 0; }

/* ==========================================================================
   Single post / page
   ========================================================================== */
.post-single { padding: 36px 0 64px; }

.post-header { margin-bottom: 24px; }
.post-title {
    font-size: 2rem;
    line-height: 1.3;
    margin: 8px 0 0;
}

.post-content { font-size: 16px; line-height: 1.8; }
.post-content > *:first-child { margin-top: 0; }
.post-content p { margin: 0 0 1.25em; }
.post-content h2 { font-size: 1.5rem; margin: 1.8em 0 0.5em; }
.post-content h3 { font-size: 1.25rem; margin: 1.6em 0 0.5em; }
.post-content a { color: var(--color-accent); text-decoration: underline; }
.post-content ul, .post-content ol { margin: 0 0 1.25em; padding-left: 1.5em; }
.post-content li { margin-bottom: 0.4em; }
.post-content blockquote {
    margin: 1.5em 0;
    padding: 0.2em 0 0.2em 1.2em;
    border-left: 3px solid var(--color-border);
    color: var(--color-meta);
    font-style: normal;
}
.post-content img { border-radius: 2px; }

/* Koenig editor image alignment (required by Ghost) */
.post-content .kg-width-wide { width: min(1100px, 92vw); margin-left: 50%; transform: translateX(-50%); }
.post-content .kg-width-full { width: 100vw; margin-left: calc(50% - 50vw); max-width: 100vw; }
.post-content .kg-card { margin: 1.5em 0; }
.post-content .kg-gallery-container { display: flex; flex-direction: column; }
.post-content pre {
    background: #f6f7f8;
    padding: 16px 18px;
    overflow-x: auto;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
}
.post-content code {
    font-family: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
    font-size: 0.92em;
}
.post-content pre code { background: none; padding: 0; }
.post-content :not(pre) > code {
    background: #f0f1f3;
    padding: 0.15em 0.4em;
    border-radius: 3px;
}
.post-content hr { border: none; border-top: 1px solid var(--color-border); margin: 2em 0; }
.post-content figure { margin: 1.5em 0; }
.post-content figcaption { font-size: 13px; color: var(--color-meta); text-align: center; margin-top: 6px; }

.post-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    font-size: 14px;
}
.tags-label { color: var(--color-meta); }
.tag-link { margin-right: 10px; }
.tag-link::before { content: "#"; opacity: 0.5; }

/* ==========================================================================
   Archive header (tag / author)
   ========================================================================== */
.archive-header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--color-border); }
.archive-title { font-size: 2rem; margin: 4px 0 8px; }
.archive-desc { color: var(--color-meta); margin: 0; }

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
    text-align: center;
    padding: 8px 0 56px;
    font-size: 14px;
}
.pagination a,
.pagination span {
    display: inline-block;
    margin: 0 5px;
    color: var(--color-text);
    padding: 4px 8px;
    text-decoration: none;
}
.pagination a:hover { color: var(--color-accent); }
.pagination .nav-current { color: var(--color-accent); font-weight: 700; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--color-dark);
    padding: 25px 0;
    margin-top: 64px;
}
.site-info {
    color: var(--color-footer-text);
    font-size: 14px;
    text-align: center;
}
.site-info a { color: #ffffff; text-decoration: none; }
.site-info a:hover { text-decoration: underline; }

/* ==========================================================================
   Error page
   ========================================================================== */
.error-page { text-align: center; padding: 80px 0; }
.error-code { font-size: 5rem; color: var(--color-heading); margin: 0 0 8px; }
.error-message { color: var(--color-meta); margin: 0 0 24px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .header-branding { padding: 36px 20px 28px; }
    .site-title { font-size: 1.4rem; }
    .header-nav { gap: 18px; }
    .post-entry { margin-bottom: 56px; }
    .post-title { font-size: 1.6rem; }
    .archive-title { font-size: 1.6rem; }
    .entry-meta .posted-on { padding-left: 50px; }
    .entry-meta .posted-on::before { width: 30px; }
}
