/* ==== Global Styles ==== */
body {
    margin: 0;
    padding: 0;
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #111;
    color: #ddd;
    line-height: 1.6;
}

a {
    color: #4da3ff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
}

/* ==== Main blog content ==== */
.main-content {
    flex: 3;
    padding-right: 40px;
}

/* ==== Sidebar ==== */
.sidebar {
    flex: 1;
    border-left: 1px solid #333;
    padding-left: 30px;

    /* ensure vertical layout */
    display: flex;
    flex-direction: column;
    gap: 20px;   /* spacing between Tags and Archive */

}

.sidebar h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #fff;
    font-size: 18px;
}

.sidebar ul {
    list-style: none;
    padding-left: 0;
}

.sidebar ul li {
    margin-bottom: 6px;
}

/* ==== Tag cloud style ==== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-cloud a {
    background: #222;
    padding: 5px 8px;
    border-radius: 3px;
    font-size: 13px;
    color: #76b2ff;
    border: 1px solid #333;
}

.tag-cloud a:hover {
    background: #333;
}

/* ==== Posts on index page ==== */
.post-item {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.post-item h2 {
    margin-top: 0;
    color: #fff;
}

.post-meta {
    font-size: 14px;
    color: #999;
}

/* ==== Single post ==== */
.post-content h1 {
    margin-top: 0;
    color: #fff;
}

.post-content img {
    max-width: 100%;
    border-radius: 4px;
}

/* ==== Header Navigation Bar ==== */
.site-header {
    background: #0d0d0d;
    border-bottom: 1px solid #222;
    padding: 15px 30px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav {
    display: flex;
    gap: 25px;
}

.nav-item {
    color: #ccc;
    font-size: 16px;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.nav-item:hover {
    color: #4da3ff;
    text-decoration: none;
}

/* ==== Archive Side Pane ==== */

.archive-year .view-posts {
    font-size: 0.85em;
    margin-left: 6px;
    color: #555;
    text-decoration: none;
}

.archive-year .view-posts:hover {
    text-decoration: underline;
}

.archive-year .month-list {
    margin-left: 1rem;
}

/* Code block container */
pre {
    /* background: #0d2d97; */
    padding: 12px 16px;
    border-radius: 6px;
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    margin: 1.2em 0;
}

/* Inline code */
code {
    font-family: monospace;
    font-size: 0.9rem;
}

/* Ensure syntax-highlighted blocks look good */
pre code {
    background: none !important; /* prevent double backgrounds */
    color: inherit;
}

.post-divider {
    margin: 20px 0;
    border: none;
    border-top: 1px solid #333;
}

.about-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.about-text {
    flex: 2;
}

.about-image {
    flex: 1;
    text-align: right;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
