@import url('https://static.vyang.org/style/common.css');

* {
    box-sizing: border-box;
}

/* --- Blog list --- */
.blog-list {
    max-width: 60%;
    margin: 0 auto;
    padding: 2% 5%;
}

.blog-post-preview {
    padding: 3% 2%;
    border-bottom: 1px solid #ddd;
    margin-bottom: 0;
}

.blog-post-preview:last-child {
    border-bottom: none;
}

.blog-post-preview h2 {
    margin: 0 0 0.5% 0;
    font-size: 250%;
    font-family: var(--main-font);
    font-weight: normal;
}

.blog-post-preview h2 .blog-title:hover {
    color: #1f1f1f;
    text-decoration: none;
}

.blog-date {
    display: block;
    font-size: 110%;
    color: #666;
    font-family: var(--main-font);
    font-style: italic;
    margin-bottom: 1.5%;
}

.scheduled-badge {
    display: block;
    margin: 0.35rem 0 0.55rem 0;
    font-size: 1.15rem;
    font-family: Georgia, serif;
    color: #ff8c00;
    background: transparent;
    border: none;
    vertical-align: middle;
}

.scheduled-notice {
    padding: 0.9rem 1rem;
    border-left: 4px solid #f0b72f;
    background: #fff9e8;
    color: #6f5400;
    border-radius: 0.25rem;
}

.blog-excerpt {
    font-size: 140%;
    line-height: 1.6;
    font-family: var(--main-font);
    margin: 1.5% 0;
    color: #333;
}

.read-more {
    display: inline-block;
    font-size: 125%;
    font-family: var(--main-font);
    color: rgb(0, 0, 233);
    text-decoration: none;
    margin-top: 1%;
    opacity: 0.75;
}

.read-more:hover {
    text-decoration: underline;
    opacity: 1;
}

/* --- Individual post --- */
.blog-post {
    max-width: 55%;
    margin: 2% auto 0;
    padding: 3% 5%;
}

.blog-header {
    margin-bottom: 4%;
    padding-bottom: 2%;
    border-bottom: 1px solid #e0e0e0;
}

.blog-header > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2%;
    margin-bottom: 1.5%;
    width: 100%;
}

.blog-header h1 {
    margin: 0 0 1% 0;
    font-size: 400%;
    text-align: left;
    line-height: 1.2;
    width: 80%;
    max-width: 80% !important;
}

.blog-header .blog-date {
    font-size: 130%;
    margin-top: 1%;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5%;
    font-size: 120%;
    font-family: var(--main-font);
    color: rgba(0, 0, 233, 1);
    text-decoration: none;
    padding: 0.8% 1.5%;
    margin-bottom: 1%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
    border-radius: 0.3%;
    background: rgba(0, 0, 233, 0.05);
    white-space: nowrap;
}

.back-link:hover {
    color: rgba(0, 0, 233, 0.8);
    background: rgba(0, 0, 233, 0.08);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

/* --- Post content --- */
.blog-content {
    font-size: 140%;
    line-height: 1.8;
    font-family: var(--main-font);
    color: #333;
}

.blog-content p       { margin: 1.5% 0; }
.blog-content h2      { font-size: 200%; margin: 3% 0 1.5% 0; font-weight: normal; font-family: var(--main-font); }
.blog-content h3      { font-size: 160%; margin: 2.5% 0 1.2% 0; font-weight: normal; font-family: var(--main-font); }
.blog-content h4      { font-size: 150%; margin: 3% 0 1% 0; font-weight: normal; color: #000; }
.blog-content ul,
.blog-content ol      { margin: 1.5% 0; padding-left: 5%; }
.blog-content li      { margin: 0.8% 0; }
.blog-content a       { color: rgb(0, 0, 233); text-decoration: underline; }
.blog-content a:hover { text-decoration: none; }
.blog-content strong  { font-weight: bold; color: #111; }
.blog-content img     { max-width: 100%; height: auto; display: block; margin: 2% auto; }

.blog-content code {
    background-color: #f4f4f4;
    padding: 0.1% 0.4%;
    border-radius: 0.2%;
    font-family: var(--secondary-font);
    font-size: 90%;
}

.blog-content pre {
    background-color: #f4f4f4;
    padding: 2%;
    border-radius: 0.4%;
    overflow-x: auto;
    font-family: var(--secondary-font);
    font-size: 110%;
}

.blog-content pre code {
    background: none;
    padding: 0;
}

.blog-content blockquote {
    border-left: 3px solid rgb(0, 0, 233, 0.253);
    margin: 2% 0;
    padding-left: 3%;
    font-style: italic;
    color: #555;
}

.blog-content hr {
    border: 0;
    border-top: 1px solid #e0e0e0;
    margin: 4% 0;
}

/* --- Post footer --- */
.blog-footer {
    border-top: 1px solid #e0e0e0;
}

.blog-footer > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2%;
    width: 100%;
}

.blog-actions-back    { margin: 0; flex-shrink: 0; }
.blog-actions-support { margin: 0; flex: 1; display: flex; justify-content: flex-end; }
.blog-footer-div      { margin-top: 1.5%; }



@media (max-width: 900px) {
    .blog-list,
    .blog-post {
        max-width: 92%;
        padding-left: 0;
        padding-right: 0;
    }

    .blog-post { margin-top: 1rem; }

    .blog-post-preview h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: 0.35rem;
    }

    .blog-excerpt,
    .blog-content {
        font-size: clamp(1rem, 4vw, 1.2rem);
        line-height: 1.65;
    }

    .blog-header h1 {
        font-size: clamp(2rem, 8vw, 2.8rem);
    }

    .blog-header .blog-date,
    .blog-date,
    .read-more,
    .back-link {
        font-size: clamp(0.95rem, 3.6vw, 1.05rem);
    }

    .blog-content pre {
        font-size: 0.95rem;
        padding: 0.85rem;
    }

    .blog-content ul,
    .blog-content ol {
        padding-left: 1.2rem;
    }
}

@media (max-width: 600px) {
    .blog-header > div:first-child,
    .blog-footer > div:first-child {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }

    .blog-actions-support { justify-content: flex-start; }
    .back-link            { white-space: normal; }
}
