/* ==========================================
   1. VARIABLES & RESET
   ========================================== */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-main: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.025);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.03);
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==========================================
   2. HEADER & NAVIGATION
   ========================================== */
   /* Ensure full-width header block */
.site-header {
    width: 100%;
    display: block;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Ensure body stretches full width */
html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}
   
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.9);
}

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

.brand-logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-accent {
    color: var(--primary);
}

.logo-dot {
    color: var(--primary);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-outline {
    border: 1px solid var(--border);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--text-main);
}

/* ==========================================
   3. MAIN LAYOUT & HERO
   ========================================== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.hero-section {
    margin-bottom: 3rem;
}

.hero-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.hero-card:hover {
    box-shadow: var(--shadow-lg);
}

.hero-image-wrapper {
    display: block;
    overflow: hidden;
    min-height: 380px;
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-card:hover .hero-image-wrapper img {
    transform: scale(1.03);
}

.hero-content {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.badge {
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 50px;
}

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

.badge-subtle {
    background: #eff6ff;
    color: var(--primary);
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1rem;
}

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

.hero-excerpt {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.author-meta {
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
}

.author-name {
    display: block;
    font-size: 0.95rem;
}

.author-details time {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==========================================
   4. CATEGORY PILLS
   ========================================== */
.category-section {
    margin-bottom: 3rem;
}

.pills-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.pills-scroll::-webkit-scrollbar {
    display: none;
}

.pill {
    padding: 0.6rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    color: var(--text-muted);
    transition: var(--transition);
}

.pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pill.active {
    background: var(--text-main);
    color: #ffffff;
    border-color: var(--text-main);
}

/* ==========================================
   5. ARTICLES GRID
   ========================================== */
.articles-section {
    margin-bottom: 5rem;
}

.section-header {
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.25rem;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card-image-link {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.card-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .card-image-link img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-body .badge {
    align-self: flex-start;
    margin-bottom: 0.75rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

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

.card-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    font-size: 0.85rem;
}

.read-time {
    color: var(--text-muted);
}

.read-more {
    font-weight: 600;
    color: var(--primary);
}

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

/* ==========================================
   6. PAGINATION & NEWSLETTER
   ========================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 4rem;
}

.page-link {
    padding: 0.6rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition);
}

.page-link:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.newsletter-cta {
    margin-bottom: 3rem;
}

.cta-inner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 4rem 3rem;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cta-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.cta-content p {
    color: #94a3b8;
    max-width: 450px;
}

.cta-form {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    max-width: 420px;
}

.cta-form input[type="email"] {
    flex-grow: 1;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: white;
    font-size: 1rem;
    outline: none;
}

.cta-form input[type="email"]::placeholder {
    color: #64748b;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

/* ==========================================
   7. FOOTER
   ========================================== */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 4rem 1.5rem 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-bio {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 1rem;
    max-width: 350px;
}

.links-col h4 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
}

.links-col ul {
    list-style: none;
}

.links-col li {
    margin-bottom: 0.75rem;
}

.links-col a {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: var(--transition);
}

.links-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==========================================
   8. RESPONSIVE BREAKPOINTS
   ========================================== */
@media (max-width: 900px) {
    .hero-card {
        grid-template-columns: 1fr;
    }
    
    .hero-content {
        padding: 2rem;
    }
    
    .cta-inner {
        flex-direction: column;
        text-align: center;
        padding: 3rem 1.5rem;
    }
    
    .cta-form {
        flex-direction: column;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}