:root {
    --primary-color: #0f172a;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --text-color: #334155;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --container-width: 1200px;
    --header-height: 70px;
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--light-bg);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--secondary-color);
    color: white;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Header */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-height);
}

.header-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.nav-link:hover, .nav-link:focus {
    color: var(--secondary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: 0.3s;
}

/* Main Content */
main {
    flex: 1;
    max-width: var(--container-width);
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), #1e293b);
    color: white;
    padding: 60px 20px;
    border-radius: 12px;
    margin-bottom: 50px;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Article Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.article-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.card-excerpt {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 20px;
    flex: 1;
}

.card-meta {
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.read-more {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Article Page */
.article-container {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.article-header {
    margin-bottom: 30px;
    text-align: center;
}

.article-title {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.article-meta {
    color: #64748b;
    font-size: 0.9rem;
}

.article-featured-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
}

.article-body {
    font-size: 1.1rem;
    color: #334155;
    max-width: 800px;
    margin: 0 auto;
}

.article-body h2 {
    color: var(--primary-color);
    margin: 30px 0 15px;
    font-size: 1.5rem;
}

.article-body h3 {
    color: var(--secondary-color);
    margin: 20px 0 10px;
    font-size: 1.2rem;
}

.article-body p {
    margin-bottom: 15px;
}

.article-body ul, .article-body ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-body li {
    margin-bottom: 8px;
}

.table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f1f5f9;
    font-weight: 600;
}

/* Sidebar / Related */
.related-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.related-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

/* Footer */
footer {
    background: var(--primary-color);
    color: #cbd5e1;
    padding: 50px 0 20px;
    margin-top: auto;
}

.footer-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--white);
}

.copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        transition: 0.3s;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero h1 {
        font-size: 2rem;
    }
}
