:root {
    --bg-color: #0d1117;
    --primary-color: #161b22;
    --secondary-color: #010409;
    --accent-color: #58a6ff;
    --text-color: #c9d1d9;
    --text-muted: #8b949e;
    --border-color: #30363d;
    --font-family: 'Fira Code', monospace, sans-serif;
    --header-height: 70px;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #a3ceff;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
    margin-bottom: 0.8em;
    line-height: 1.2;
}

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

p {
    margin-bottom: 1em;
}

ul {
    list-style: none;
}

/* Header & Navigation */
.site-header {
    background-color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.8rem;
    margin: 0;
    color: var(--accent-color);
}

.main-nav ul {
    display: flex;
    gap: 20px;
}

.main-nav a {
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.main-nav a:hover, .main-nav a.active {
    background-color: var(--border-color);
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 40px;
}

@media (min-width: 768px) {
    .main-content {
        grid-template-columns: 3fr 1fr;
    }
}

main > section {
    margin-bottom: 40px;
}

/* Article Grid on Homepage */
.article-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 600px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 992px) {
    .article-grid {
        grid-template-columns: repeat(1, 1fr); /* Back to 1 column in main area */
    }
}

.article-preview {
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.article-preview:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.article-preview h3 {
    color: var(--accent-color);
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    font-weight: bold;
}

/* Sidebar */
.sidebar .widget {
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.sidebar h3 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.sidebar ul li {
    padding: 8px 0;
    border-bottom: 1px solid #21262d;
}

.sidebar ul li:last-child {
    border-bottom: none;
}

.promo-widget {
    background-color: var(--accent-color);
    color: var(--secondary-color);
    text-align: center;
    font-weight: bold;
}

/* Footer */
.site-footer {
    background-color: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
}

/* Article Page Specifics */
.article-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.article-header .meta {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.article-content h2 {
    margin-top: 2em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5em;
}

.article-content h3 {
    margin-top: 1.5em;
}

.article-content ul {
    list-style: disc;
    padding-left: 20px;
}

.article-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
    margin: 1.5em 0;
    font-style: italic;
    color: var(--text-muted);
}

.cta-section {
    background-color: var(--primary-color);
    border: 1px solid var(--accent-color);
    padding: 25px;
    text-align: center;
    border-radius: 8px;
    margin-top: 40px;
}
