/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #0d0f14;
    color: #c9cdd4;
    line-height: 1.6;
}

a {
    color: #facc15;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
}

/* ===== Layout ===== */
.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== Top Bar ===== */
.top-bar {
    background: #13151c;
    color: #e4e6eb;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 32px;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    border-bottom: 1px solid #2a2d38;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    flex-wrap: wrap;
    min-height: 56px;
}

.top-bar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    flex-wrap: wrap;
}

.top-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    color: #9aa0b4;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.top-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #e4e6eb;
    text-decoration: none;
}

.top-nav-link.active {
    color: #facc15;
    background: rgba(250, 204, 21, 0.1);
}

.site-footer {
    margin-top: auto;
    padding: 16px 32px;
    background: #13151c;
    color: #4a4f63;
    border-top: 1px solid #2a2d38;
}

.site-footer-copyright {
    font-size: 12px;
    text-align: center;
}

.nav-icon {
    font-size: 16px;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-btn {
    min-width: 42px;
    text-align: center;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid #2a2d38;
    background: transparent;
    color: #9aa0b4;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #e4e6eb;
    text-decoration: none;
}

.lang-btn.active {
    background: #facc15;
    border-color: #facc15;
    color: #111111;
}

/* ===== Content ===== */
.content {
    flex: 1;
    padding: 40px 48px;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

/* ===== Page Header ===== */
.page-header {
    margin-bottom: 36px;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #e4e6eb;
    margin-bottom: 8px;
}

.page-header p {
    color: #6b7085;
    font-size: 1.05rem;
}

/* ===== Sections ===== */
section {
    margin-bottom: 40px;
}

section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #c9cdd4;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #2a2d38;
}

section p {
    color: #9aa0b4;
    margin-bottom: 12px;
}

/* ===== Blog List ===== */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.blog-card {
    background: #13151c;
    border-radius: 10px;
    padding: 24px 28px;
    border: 1px solid #2a2d38;
    transition: border-color 0.2s, transform 0.2s;
}

.blog-card:hover {
    border-color: #facc15;
    transform: translateY(-2px);
}

.blog-card-meta {
    font-size: 0.8rem;
    color: #6b7085;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.blog-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #e4e6eb;
    margin-bottom: 10px;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
}

.blog-card-title a:hover {
    color: #facc15;
    text-decoration: none;
}

.blog-card-excerpt {
    font-size: 0.93rem;
    color: #6b7085;
    line-height: 1.7;
    margin-bottom: 16px;
}

.blog-read-more {
    font-size: 0.88rem;
    font-weight: 600;
    color: #facc15;
}

.blog-read-more:hover {
    text-decoration: underline;
}

.blog-empty {
    color: #4a4f63;
    font-size: 1rem;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    padding-bottom: 16px;
}

.pagination-btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 8px;
    background: #13151c;
    border: 1px solid #2a2d38;
    color: #facc15;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s ease;
}

.pagination-btn:hover {
    border-color: #facc15;
    text-decoration: none;
}

.pagination-btn.disabled {
    background: #13151c;
    border-color: #1e2030;
    color: #3a3f55;
    cursor: default;
    pointer-events: none;
}

.pagination-info {
    font-size: 14px;
    color: #6b7085;
}

/* ===== Article Page ===== */
.article-back {
    margin-bottom: 24px;
}

.article-back a {
    font-size: 0.9rem;
    font-weight: 600;
    color: #facc15;
}

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

.article {
    background: #13151c;
    border-radius: 10px;
    padding: 36px 44px;
    border: 1px solid #2a2d38;
}

.article-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #2a2d38;
}

.article-meta {
    font-size: 0.8rem;
    color: #6b7085;
    font-weight: 500;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.article-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: #e4e6eb;
    line-height: 1.3;
}

/* ===== Article Body (Markdown output) ===== */
.article-body {
    color: #c0c4d0;
    line-height: 1.85;
}

.article-body p {
    font-size: 1rem;
    margin-bottom: 16px;
}

.article-body h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #e4e6eb;
    margin: 32px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #2a2d38;
}

.article-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #c9cdd4;
    margin: 24px 0 8px;
}

.article-body ul {
    padding-left: 1.5em;
    margin-bottom: 16px;
    list-style: disc;
}

.article-body ol {
    padding-left: 1.5em;
    margin-bottom: 16px;
    list-style: decimal;
}
.article-body li {
    margin-bottom: 6px;
}

.article-body pre {
    background: #0a0b10;
    border: 1px solid #2a2d38;
    border-radius: 8px;
    padding: 16px 20px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.article-body code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
    font-size: 0.88em;
    color: #a8d8a8;
}

.article-body pre code {
    background: none;
    padding: 0;
    font-size: 0.87rem;
    color: #c9cdd4;
}

.article-body :not(pre) > code {
    background: #1a1d26;
    border: 1px solid #2a2d38;
    border-radius: 4px;
    padding: 2px 6px;
    color: #facc15;
}

.article-body strong {
    color: #e4e6eb;
    font-weight: 600;
}

.article-body blockquote {
    border-left: 3px solid #facc15;
    padding-left: 16px;
    color: #6b7085;
    margin: 20px 0;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.93rem;
}

.article-body th,
.article-body td {
    border: 1px solid #2a2d38;
    padding: 8px 12px;
    text-align: left;
}

.article-body th {
    background: #1a1d26;
    color: #c9cdd4;
    font-weight: 600;
}

/* ===== About Page ===== */
.about-card {
    display: flex;
    align-items: center;
    gap: 28px;
    background: #13151c;
    border-radius: 10px;
    padding: 28px;
    border: 1px solid #2a2d38;
    margin-bottom: 32px;
}

.about-bio p {
    font-size: 1rem;
    color: #9aa0b4;
    line-height: 1.8;
}

.about-links h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #c9cdd4;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #2a2d38;
}

.about-links-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
}

.about-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #2a2d38;
    background: #1a1d26;
    color: #c9cdd4;
}

.about-link:hover {
    text-decoration: none;
    transform: translateY(-2px);
    border-color: #facc15;
    color: #facc15;
}

.about-link-icon {
    font-size: 1.2rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .content {
        padding: 32px 32px;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 20px 20px;
    }

    .about-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .top-bar {
        padding: 10px 16px;
        gap: 12px;
    }

    .article {
        padding: 24px 20px;
    }
}

@media (max-width: 576px) {
    .content {
        padding: 16px;
    }

    .site-footer {
        padding: 14px 16px;
    }
}

