/* --- Base Reset & Variable Assignment --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #ffffff;
    color: #1f2937; /* Clean soft black style font color */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --- Exact Site Header --- */
header {
    background-color: #ffffff;
    border-bottom: 1px solid #f3f4f6;
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 20px; /* Aligned padding spacing */
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
    letter-spacing: -0.025em;
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    margin-left: 24px;
    text-decoration: none;
    color: #4b5563; /* Aligned navigation link color rules */
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s ease;
}

nav a:hover {
    color: #111827;
}

/* --- Content Container Framework --- */
.main-container {
    max-width: 1200px;
    margin: 48px auto;
    padding: 0 20px;
}

/* --- True 3-Column Clean Card Layout --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 48px 32px;
}

.blog-card {
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

/* Precise Thumbnail Framing Placement Box */
.card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Fixed 16:9 Image View Grid standard */
    background-color: #f3f4f6;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.fallback-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    padding: 16px;
    text-align: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.category-tag {
    font-size: 12px;
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 8px;
    display: inline-block;
}

.card-title {
    font-size: 18px; /* Correct responsive text standard scale setting */
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.card-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.15s ease;
}

.card-title a:hover {
    color: #2563eb;
}

/* Meta Line Grid Setup (Author context tags) */
.card-meta {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.author-img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
}

.author-name {
    font-weight: 500;
    color: #374151;
}

.meta-separator {
    margin: 0 6px;
    color: #9ca3af;
}

.card-excerpt {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.read-more {
    color: #111827;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
}

.read-more:hover {
    color: #2563eb;
}

/* --- Article Detail View Management CSS --- */
.single-post-container {
    max-width: 760px;
    margin: 56px auto;
}

.article-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #111827;
    margin-top: 12px;
    margin-bottom: 16px;
}

.article-content h2 {
    font-size: 22px;
    font-weight: 700;
    margin-top: 36px;
    margin-bottom: 14px;
    color: #111827;
}

.article-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 10px;
    color: #1f2937;
}

.article-content p {
    font-size: 16px;
    color: #374151;
    margin-bottom: 20px;
    line-height: 1.65;
}

/* --- Footer Minimal UI --- */
footer {
    border-top: 1px solid #f3f4f6;
    padding: 32px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
    margin-top: 96px;
}

/* --- Mobile Screen Adaptive Scale Updates --- */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 16px;
        padding: 16px 20px;
    }
    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 16px;
    }
    nav a {
        margin-left: 0;
    }
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .article-title {
        font-size: 24px;
    }
}