html {
    scrollbar-gutter: stable;
}

* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}


header {
    margin: 12px 0;
}

header .blogName {
    font-size: 2em;
    font-weight: bold;
    word-break: break-word;
}

ul.posts {
    list-style: none;
    margin: 0;
    padding: 0;
}

.markdown-body {
    max-width: min(980px, 100%);
    margin: 0 auto;
    padding: 48px;
    overflow-wrap: break-word;
}

.markdown-body a {
    word-break: break-all;
}

@media (max-width: 767px) {
    .markdown-body {
        padding: 16px;
    }
}

footer {
    border-top: 1px solid #ddd;
    padding: 24px 0;
    text-align: center;
}

.container {
    display: flex;
    gap: 12px;
}

.content {
    flex: 1;
    min-width: 0;
    padding-right: 12px;
    margin-bottom: 48px;
}

.sidebar {
    width: 180px;
    position: sticky;
    top: 24px;
    align-self: flex-start;
    background: #f6f8fa;
    border-radius: 8px;
    padding: 20px;
    margin: 0 0 24px 12px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-section h3 {
    color: #59636E;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 0.9em;
    font-weight: 600;
    border-bottom: 1px solid #e1e4e8;
    padding-bottom: 8px;
}

.sidebar ul {
    padding: 0;
    list-style-position: inside;
}

.sidebar a {
    color: #59636E;
    text-decoration: none;
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #0d1117;
        color: #e6edf3;
    }

    .sidebar {
        background: #151b23;
        border: 1px solid #3d444db3;
    }

    .sidebar h3 {
        color: #8b949e;
        border-bottom: 1px solid rgba(48, 54, 61, 0.8);
    }

    .sidebar a {
        color: #c9d1d9;
    }

    .sidebar a:hover {
        background-color: rgba(56, 139, 253, 0.15);
        color: #58a6ff;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .content {
        padding-right: 0;
    }

    .sidebar {
        position: static;
        margin: 0 0 24px 0;
    }
}
