* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: Verdana, Arial, sans-serif;
    font-size: 13px;
    background: #fdf7c0;
    color: #1a3a50;
    line-height: 1.6;
}
a { color: #1a7aaa; text-decoration: none; }
a:hover { color: #0a5a8a; text-decoration: underline; }

/* Header */
#header {
    background: #2a90c0;
    padding: 0;
    border-bottom: 1px solid #1a6a9a;
}
#header-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 14px 20px 12px;
    display: flex;
    align-items: center;
    gap: 16px;
}
#avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.6);
    object-fit: cover;
    flex-shrink: 0;
    background: #fff;
}
#header-text {}
#site-title {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,80,120,0.4);
    letter-spacing: 1px;
}
#site-title a { color: #fff; }
#site-subtitle {
    font-size: 12px;
    color: #e8f8ff;
    margin-top: 2px;
}
#nav {
    background: linear-gradient(135deg, #5ab8e0 0%, #7ecae8 100%);
    border-bottom: 1px solid #3a98c0;
}
#nav-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 0;
}
#nav a {
    color: #fff;
    padding: 7px 14px;
    display: inline-block;
    font-size: 12px;
    font-weight: bold;
}
#nav a:hover, #nav a.active {
    background: #2a90c0;
    color: #f5e040;
    text-decoration: none;
}

/* Layout */
#wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
#content { flex: 1; min-width: 0; }
#sidebar {
    width: 200px;
    flex-shrink: 0;
}

/* Post */
.post {
    background: #fffde8;
    border: 1px solid #b8dce8;
    margin-bottom: 16px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,80,120,0.08);
}
.post-header {
    background: #5ab8e0;
    border-bottom: 2px solid #f5e040;
    padding: 8px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.post-title {
    font-size: 15px;
    font-weight: bold;
    color: #fff;
}
.post-title a { color: #fff; }
.post-meta {
    font-size: 11px;
    color: #e8f8ff;
}
.post-body {
    padding: 14px;
    line-height: 1.75;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.post-body p { margin-bottom: 10px; }
.post-body img { max-width: 100%; height: auto; }
.post-private-badge {
    background: #a8d8e8;
    color: #1a4a6a;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}
.post-footer {
    border-top: 1px solid #d8eef8;
    padding: 6px 14px;
    background: #f0faff;
    font-size: 11px;
    color: #6a9ab0;
    display: flex;
    gap: 14px;
}
.post-footer a { color: #1a7aaa; }

/* Comments */
.comments-section {
    border-top: 2px solid #f5e040;
    padding: 10px 14px;
    background: #fffde8;
}
.comments-title {
    font-size: 12px;
    font-weight: bold;
    color: #8a7800;
    margin-bottom: 8px;
}
.comment {
    border-bottom: 1px solid #ede880;
    padding: 8px 0;
    font-size: 12px;
}
.comment:last-child { border-bottom: none; }
.comment-author { font-weight: bold; color: #1a7aaa; }
.comment-date { color: #aaa; font-size: 11px; margin-left: 6px; }
.comment-body { margin-top: 4px; line-height: 1.6; }
.comment-body p { margin-bottom: 6px; }

/* Sidebar */
.sidebar-box {
    background: #fff;
    border: 1px solid #b8dce8;
    margin-bottom: 14px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,80,120,0.08);
}
.sidebar-box-title {
    background: #5ab8e0;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 6px 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sidebar-box-body {
    padding: 10px;
    font-size: 12px;
}
.sidebar-box-body ul { list-style: none; }
.sidebar-box-body li { padding: 3px 0; border-bottom: 1px dotted #d8eef8; }
.sidebar-box-body li:last-child { border-bottom: none; }
.sidebar-box-body a { color: #1a7aaa; }

/* Archive list */
.arc-year { font-weight: bold; color: #2a90c0; font-size: 12px; padding: 6px 0 2px; border-bottom: 1px solid #d0e4f0; margin-bottom: 2px; }
.archive-months { columns: 2; margin-bottom: 6px; }
.archive-months li { font-size: 11px; }

/* Pagination */
.pagination {
    text-align: center;
    margin: 20px 0;
    font-size: 13px;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 5px 10px;
    margin: 2px;
    border: 1px solid #b8dce8;
    background: #fff;
    border-radius: 2px;
}
.pagination a { color: #1a7aaa; }
.pagination a:hover { background: #e8f6fc; text-decoration: none; }
.pagination .current { background: #5ab8e0; color: #fff; border-color: #2a90c0; }

/* Mobile nav button */
#mobile-menu-btn {
    display: none;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    margin-left: auto;
    line-height: 1;
}

/* Sidebar drawer overlay (mobile only) */
#sidebar-overlay { display: none; }
#drawer-close { display: none; }

/* Mobile post navigator */
#mobile-post-nav {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid #b8dce8;
}
#mobile-post-nav button {
    background: #5ab8e0;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}
#mobile-post-nav button:disabled { opacity: 0.3; cursor: default; }
#mobile-post-counter { font-size: 12px; color: #4a7a9a; }

@media (max-width: 700px) {
    #mobile-menu-btn { display: block; }
    #wrapper { flex-direction: column; padding: 10px; }
    #content { width: 100%; }
    #mobile-post-nav { display: flex; }
    .index-page .post { display: none; }
    .index-page .post.mobile-active { display: block; }
    .pagination { display: none; }
    /* Sidebar becomes a slide-over drawer on mobile */
    #sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 200;
    }
    #sidebar-overlay.open { display: block; }
    #sidebar {
        position: fixed;
        top: 0; right: 0;
        width: 280px;
        height: 100%;
        overflow-y: auto;
        background: #fdf7c0;
        z-index: 201;
        padding: 12px;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        box-shadow: -4px 0 20px rgba(0,0,0,0.2);
    }
    #sidebar.open { transform: translateX(0); }
    #drawer-close {
        display: block;
        text-align: right;
        font-size: 22px;
        cursor: pointer;
        color: #1a3a50;
        margin-bottom: 8px;
        background: none;
        border: none;
        padding: 0;
    }
}

/* Footer */
#footer {
    text-align: center;
    padding: 16px;
    font-size: 11px;
    color: #6a9ab0;
    border-top: 2px solid #f5e040;
    margin-top: 10px;
    background: #e8f6fc;
}

/* Single post page */
.back-link { margin-bottom: 12px; font-size: 12px; }
.back-link a { color: #1a7aaa; }
