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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f1f1f1;
    color: #333333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
}

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

@media (min-width: 960px) {
    .site {
        flex-direction: row;
        max-width: 1400px;
        margin: 0 auto;
    }

    .sidebar {
        width: 320px;
        flex-shrink: 0;
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
        background: #ffffff;
        border-right: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 0 4px rgba(0, 0, 0, 0.05);
    }

    .site-content {
        flex: 1;
        min-width: 0;
        padding: 30px 40px;
    }
}

@media (max-width: 959px) {
    .sidebar {
        width: 100%;
        background: #ffffff;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .site-content {
        padding: 16px;
    }
}

.site-header {
    padding: 24px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.site-title a {
    color: #222222;
    text-decoration: none;
    transition: color 0.2s;
}

.site-title a:hover {
    color: #258fb8;
}

.site-description {
    margin: 8px 0 0;
    font-size: 0.85rem;
    color: #777777;
    line-height: 1.4;
}

.main-navigation {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-menu li a {
    display: block;
    padding: 8px 12px;
    color: #444444;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.nav-menu li a:hover {
    background: #eef6f9;
    color: #258fb8;
}

.widgets-area {
    padding: 20px;
}

.widget {
    margin-bottom: 24px;
}

.widget-title {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #333333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-left: 3px solid #258fb8;
    padding-left: 8px;
}

.category-list,
.archive-list,
.archive-posts {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-list li,
.archive-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f4f4f4;
    font-size: 0.9rem;
}

.category-list a,
.archive-list a {
    color: #555555;
    text-decoration: none;
    transition: color 0.2s;
}

.category-list a:hover,
.archive-list a:hover {
    color: #258fb8;
}

.count {
    color: #999999;
    font-size: 0.8rem;
}

.tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tagcloud a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f4f4f4;
    color: #555555;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.tagcloud a:hover {
    background: #258fb8;
    color: #ffffff;
}

.tagcloud .tag-count {
    font-size: 0.75rem;
    opacity: 0.8;
}

.empty {
    color: #999999;
    font-size: 0.85rem;
    font-style: italic;
}

.banner-entry {
    margin-bottom: 24px;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.site-banner {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 360px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222222;
    margin: 0 0 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #258fb8;
}

.hentry {
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.card-index {
    font-size: 1.5rem;
    font-weight: 700;
    color: #258fb8;
    opacity: 0.4;
    min-width: 32px;
    padding-top: 16px;
}

.card-row .hentry {
    flex: 1;
    margin-bottom: 0;
}

.entry-header {
    padding: 24px 28px 12px;
}

.entry-title {
    margin: 0 0 10px;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
}

.entry-title a {
    color: #222222;
    text-decoration: none;
    transition: color 0.2s;
}

.entry-title a:hover {
    color: #258fb8;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: #777777;
}

.posted-on {
    color: #777777;
}

.cat-links a {
    color: #258fb8;
    text-decoration: none;
    font-weight: 500;
}

.cat-links a:hover {
    text-decoration: underline;
}

.entry-summary {
    padding: 0 28px 24px;
    color: #555555;
    font-size: 0.95rem;
    line-height: 1.6;
}

.entry-summary p {
    margin: 0 0 12px;
}

.article-more-link {
    margin: 0;
}

.article-more-link a {
    display: inline-block;
    color: #258fb8;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.article-more-link a:hover {
    border-bottom-color: #258fb8;
}

.article-page .entry-header {
    padding: 32px 36px 16px;
}

.cover-kicker {
    font-size: 0.75rem;
    font-weight: 700;
    color: #258fb8;
    letter-spacing: 1px;
    margin: 0 0 8px;
}

.article-toc {
    background: #f7fafc;
    border-left: 3px solid #258fb8;
    padding: 16px 20px;
    margin: 0 36px 24px;
    border-radius: 4px;
}

.toc-title {
    margin: 0 0 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #333333;
}

.article-toc ul {
    margin: 0;
    padding-left: 20px;
}

.article-toc a {
    color: #555555;
    text-decoration: none;
    font-size: 0.85rem;
}

.article-toc a:hover {
    color: #258fb8;
}

.article-content {
    padding: 0 36px 32px;
    color: #333333;
    font-size: 1rem;
    line-height: 1.7;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin: 1.5em 0 0.6em;
    color: #222222;
    font-weight: 700;
    line-height: 1.3;
}

.article-content p {
    margin: 0 0 1.2em;
}

.article-content ul,
.article-content ol {
    margin: 0 0 1.2em;
    padding-left: 24px;
}

.article-content blockquote {
    border-left: 4px solid #258fb8;
    background: #f7fafc;
    margin: 1.5em 0;
    padding: 12px 20px;
    color: #555555;
    font-style: italic;
}

.article-content code {
    background: #eef2f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: monospace;
}

.article-content pre {
    background: #282c34;
    color: #abb2bf;
    padding: 16px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.article-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1em 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

.article-content th,
.article-content td {
    border: 1px solid #e0e0e0;
    padding: 10px 14px;
    text-align: left;
}

.article-content th {
    background: #f7f7f7;
    font-weight: 700;
}

.article-footer {
    padding: 20px 36px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.taxonomy-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.taxonomy-label {
    font-weight: 600;
    color: #666666;
}

.taxonomy-link {
    background: #eef6f9;
    color: #258fb8;
    padding: 3px 10px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.taxonomy-link:hover {
    background: #258fb8;
    color: #ffffff;
}

.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding: 20px 0 0;
}

.post-nav-prev,
.post-nav-next {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    max-width: 48%;
}

.post-nav-prev span,
.post-nav-next span {
    font-size: 0.8rem;
    color: #888888;
    text-transform: uppercase;
}

.post-nav-prev strong,
.post-nav-next strong {
    font-size: 0.95rem;
    color: #222222;
}

.post-nav-prev:hover strong,
.post-nav-next:hover strong {
    color: #258fb8;
}

.post-nav-next {
    text-align: right;
    margin-left: auto;
}

.term-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.term-card {
    background: #ffffff;
    padding: 16px 20px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #333333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.term-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #258fb8;
}

.term-card strong {
    background: #eef6f9;
    color: #258fb8;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85rem;
}

.archive-year {
    padding: 24px 28px;
}

.archive-year-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 2px solid #258fb8;
    margin-bottom: 16px;
}

.archive-year-heading h2 {
    margin: 0;
    font-size: 1.4rem;
    color: #222222;
}

.archive-count {
    font-size: 0.85rem;
    color: #888888;
}

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

.archive-posts li {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid #f4f4f4;
}

.archive-posts time {
    font-size: 0.85rem;
    color: #888888;
    min-width: 90px;
}

.archive-posts a {
    color: #333333;
    text-decoration: none;
    font-size: 0.95rem;
}

.archive-posts a:hover {
    color: #258fb8;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 32px 0 16px;
}

.page-link {
    background: #258fb8;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
}

.page-link:hover {
    background: #1b7596;
}

.page-number {
    font-size: 0.9rem;
    color: #666666;
}

.site-footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.site-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #777777;
}

.site-info a {
    color: #258fb8;
    text-decoration: none;
}

.site-info a:hover {
    text-decoration: underline;
}

.empty-state {
    background: #ffffff;
    padding: 32px;
    text-align: center;
    color: #888888;
    border-radius: 4px;
}
