:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #1e293b;
    --accent-color: #f59e0b;
    
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --surface-hover: #f1f5f9;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    
    --border-color: #e2e8f0;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --surface-hover: #334155;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-tertiary: #64748b;
    
    --border-color: #334155;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography elements */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    line-height: 1.2;
}

.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    margin-bottom: 12px;
    font-family: 'Inter', sans-serif;
}

.news-meta {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    font-family: 'Inter', sans-serif;
}

/* Header & Nav */
.navbar {
    background-color: var(--surface-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-smooth);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
}

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

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    position: relative;
    padding-bottom: 6px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-fast);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: 16px;
}

.nav-actions button {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast), background-color var(--transition-fast);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-actions button:hover {
    color: var(--primary-color);
    background-color: var(--surface-hover);
}

/* Main Content Layout */
.main-content {
    max-width: 1280px;
    margin: 40px auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* Featured Section */
.featured-article {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    height: 550px;
    display: flex;
    align-items: flex-end;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
}

.featured-article img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.featured-article:hover img {
    transform: scale(1.05);
}

.featured-article .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

.featured-content {
    position: relative;
    z-index: 2;
    padding: 48px;
    width: 100%;
    max-width: 800px;
}

.featured-content h2 {
    color: white;
    font-size: 3rem;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.featured-content p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.featured-content .news-meta {
    color: rgba(255,255,255,0.7);
}

/* Grid Layout */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 48px;
}

/* Section Header */
.section-header {
    margin-bottom: 32px;
    position: relative;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.header-line {
    height: 4px;
    width: 60px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.news-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

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

.news-card-img {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

.news-card:hover .news-card-img img {
    transform: scale(1.05);
}

.news-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    transition: color var(--transition-fast);
}

.news-card:hover h3 {
    color: var(--primary-color);
}

.news-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: auto;
}

/* Sidebar */
.sidebar-section {
    background: var(--surface-color);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

/* Trending */
.trending-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    align-items: center;
}

.trending-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.trending-item:first-child {
    padding-top: 0;
}

.trending-number {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--border-color);
    line-height: 1;
    transition: color var(--transition-fast);
}

.trending-item:hover .trending-number {
    color: var(--primary-color);
}

.trending-content h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    transition: color var(--transition-fast);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

.trending-item:hover .trending-content h4 {
    color: var(--primary-color);
}

/* Newsletter */
.newsletter {
    background: linear-gradient(135deg, var(--primary-color), #4f46e5);
    color: white;
    border: none;
}

.newsletter h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 12px;
    font-family: 'Inter', sans-serif;
}

.newsletter p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-form input {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: none;
    font-family: 'Inter', sans-serif;
    background: rgba(255,255,255,0.1);
    color: white;
    outline: none;
    border: 1px solid rgba(255,255,255,0.2);
}

.newsletter-form input::placeholder {
    color: rgba(255,255,255,0.6);
}

.newsletter-form input:focus {
    border-color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.15);
}

.newsletter-form button {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 40px 24px;
    margin-top: 80px;
    text-align: center;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .featured-article {
        height: 400px;
    }
    .featured-content h2 {
        font-size: 2rem;
    }
    .news-grid, .sidebar {
        grid-template-columns: 1fr;
    }
}
