/* Base Styles & Variables */
:root {
    --primary: #4A6FA5;
    --primary-dark: #3A5A8C;
    --secondary: #FF6B6B;
    --accent: #4ECDC4;
    --light: #F8F9FA;
    --dark: #212529;
    --gray: #6C757D;
    --gray-light: #E9ECEF;
    --border: #DEE2E6;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }

.highlight {
    color: var(--secondary);
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--accent);
    opacity: 0.3;
    z-index: -1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: rgba(74, 111, 165, 0.1);
}

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

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

/* Navigation */
.navbar {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.5rem;
    color: var(--dark);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--primary);
    color: white;
    border-radius: 6px;
    font-weight: bold;
    font-family: 'Fira Code', monospace;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 8px 0;
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
}

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

.theme-toggle,
.menu-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--dark);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle:hover,
.menu-toggle:hover {
    background-color: var(--gray-light);
}

.menu-toggle {
    display: none;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background-color: var(--accent);
    color: var(--dark);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-title {
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--gray);
    margin-bottom: 30px;
    max-width: 90%;
}

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

.hero-code {
    background-color: var(--dark);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-code pre {
    margin: 0;
    padding: 30px;
}

.hero-code code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Articles Section */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    margin-bottom: 12px;
}

.section-subtitle {
    color: var(--gray);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.article-card {
    background-color: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.article-category {
    position: absolute;
    top: 16px;
    left: 16px;
    background-color: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
}

.article-image {
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

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

.article-title {
    margin-bottom: 12px;
}

.article-title a {
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
}

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

.article-excerpt {
    color: var(--gray);
    margin-bottom: 20px;
    flex-grow: 1;
}

.article-meta {
    display: flex;
    gap: 20px;
    font-size: 0.875rem;
    color: var(--gray);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-footer {
    text-align: center;
}

/* Resources Section */
.resources-section {
    background-color: var(--gray-light);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.resource-card {
    background-color: white;
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.resource-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.resource-card h3 {
    margin-bottom: 12px;
}

.resource-card p {
    color: var(--gray);
    margin-bottom: 20px;
}

.resource-link {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.resource-link:hover {
    color: var(--primary-dark);
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.newsletter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.newsletter-content {
    flex: 1;
}

.newsletter-title {
    color: white;
    margin-bottom: 12px;
}

.newsletter-description {
    opacity: 0.9;
}

.newsletter-form {
    flex: 1;
    max-width: 500px;
}

.form-group {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.form-group input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

.form-notice {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Footer */
.footer {
    background-color: var(--dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
}

.footer-description {
    opacity: 0.8;
    margin-bottom: 20px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.footer-col h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    font-size: 0.875rem;
}

.footer-bottom p {
    margin-bottom: 8px;
}

/* Dark Theme */
body.dark-theme {
    --light: #121212;
    --dark: #F8F9FA;
    --gray-light: #1E1E1E;
    --border: #2D2D2D;
    background-color: var(--light);
    color: var(--dark);
}

.dark-theme .navbar,
.dark-theme .article-card,
.dark-theme .resource-card {
    background-color: #1E1E1E;
}

.dark-theme .resources-section {
    background-color: #121212;
}

.dark-theme .hero-code {
    background-color: #0D0D0D;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-description {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .newsletter-container {
        flex-direction: column;
        text-align: center;
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 60px 0;
    }
}

@media (max-width: 576px) {
    .form-group {
        flex-direction: column;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}
