:root {
    --primary: #2fa4e7;
    --primary-hover: #1995dc;
    --primary-dark: #157ab5;
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --text: #333333;
    --text-muted: #777777;
    --border: #e9ecef;
    --border-dark: #dee2e6;
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
}

/* Navbar */
.site-navbar {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.5rem;
}

.navbar-brand {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Container & Layout */
.site-main-container {
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 0 1.5rem;
    min-height: 70vh;
}

.site-layout-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

.main-column {
    min-width: 0;
}

.sidebar-column {
    min-width: 0;
}

/* Home Banner */
.home-banner {
    margin-bottom: 2rem;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #ffffff;
}

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

/* Section Header */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222222;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

/* Article Cards */
.card-list {
    display: flex;
    flex-direction: column;
}

.card-row {
    position: relative;
}

.card-index {
    display: none;
}

.article-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.meta-date {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.meta-icon {
    display: inline-block;
}

.meta-category a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.meta-category a:hover {
    text-decoration: underline;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0.25rem 0 0.75rem;
}

.card-title a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.card-title a:hover {
    color: var(--primary);
}

.card-excerpt {
    color: #555555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.card-footer {
    display: flex;
    justify-content: flex-end;
}

.read-more-link {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.read-more-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Single Article */
.article-page {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow);
    padding: 2rem;
}

.entry-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.entry-title {
    font-size: 2rem;
    font-weight: 700;
    color: #222222;
    margin-bottom: 0.75rem;
    line-height: 1.25;
}

.entry-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
    align-items: center;
}

.article-toc {
    background: #f1f8fc;
    border-left: 4px solid var(--primary);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.toc-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #333333;
    font-size: 1rem;
}

.article-toc ul {
    padding-left: 1.25rem;
    margin: 0;
}

.article-toc li {
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.article-toc a {
    color: var(--primary);
    text-decoration: none;
}

.article-toc a:hover {
    text-decoration: underline;
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #333333;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    margin: 1.75rem 0 0.75rem;
    font-weight: 600;
    color: #222222;
}

.article-content ul,
.article-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

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

.article-content blockquote {
    border-left: 4px solid var(--primary);
    margin: 1.25rem 0;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    color: #555555;
}

.article-footer {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.taxonomy-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

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

.taxonomy-link {
    background: #eaf5fc;
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.taxonomy-link:hover {
    background: var(--primary);
    color: #ffffff;
}

.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    gap: 1rem;
}

.post-nav-prev,
.post-nav-next {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: 4px;
    max-width: 48%;
    transition: border-color 0.2s, background 0.2s;
}

.post-nav-prev:hover,
.post-nav-next:hover {
    border-color: var(--primary);
    background: #eaf5fc;
}

.post-nav-prev span,
.post-nav-next span {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.post-nav-prev strong,
.post-nav-next strong {
    font-size: 0.95rem;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 0.25rem;
}

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

/* Sidebar */
.sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.widget {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow);
    padding: 1.25rem;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333333;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

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

.widget-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.widget-list li:last-child {
    border-bottom: none;
}

.widget-list a {
    color: #444444;
    text-decoration: none;
    transition: color 0.2s;
}

.widget-list a:hover {
    color: var(--primary);
}

.badge {
    background: var(--primary);
    color: #ffffff;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #eaf5fc;
    color: var(--primary);
    border: 1px solid #cbe6f7;
    border-radius: 4px;
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
}

.tag-badge:hover {
    background: var(--primary);
    color: #ffffff;
}

.tag-badge .badge {
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
    padding: 0.1rem 0.35rem;
}

.tag-badge:hover .badge {
    background: rgba(255, 255, 255, 0.3);
}

/* Archives Page */
.archive-year-group {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.archive-year-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.archive-year-heading h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333333;
    margin: 0;
}

.archive-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}

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

.archive-posts li {
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    gap: 1rem;
    align-items: baseline;
    font-size: 0.95rem;
}

.archive-posts li:last-child {
    border-bottom: none;
}

.archive-posts time {
    color: var(--text-muted);
    font-size: 0.85rem;
    min-width: 90px;
}

.archive-posts a {
    color: #333333;
    text-decoration: none;
    font-weight: 500;
}

.archive-posts a:hover {
    color: var(--primary);
}

/* Taxonomy Grid */
.term-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.term-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: transform 0.2s, border-color 0.2s;
}

.term-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    color: var(--primary);
}

.term-card strong {
    background: var(--primary);
    color: #ffffff;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

/* Pagination */
.pagination-nav {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.pagination-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.pagination-btn {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--primary);
    border-radius: 4px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.pagination-btn:hover {
    background: var(--primary);
    color: #ffffff;
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Footer */
.site-footer {
    background: #222222;
    color: #bbbbbb;
    padding: 1.75rem 0;
    margin-top: 3rem;
    font-size: 0.875rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-footer a {
    color: var(--primary);
    text-decoration: none;
}

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

/* Empty states */
.empty-state,
.empty-message,
.empty-item {
    color: var(--text-muted);
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .site-layout-grid {
        grid-template-columns: 1fr;
    }

    .article-nav {
        flex-direction: column;
    }

    .post-nav-prev,
    .post-nav-next {
        max-width: 100%;
    }

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

    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}
