/* --- Variables & Reset --- */
:root {
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --primary-color: #bb86fc;
    --secondary-color: #03dac6;
    --text-color: #e0e0e0;
    --text-muted-color: #a0a0a0;
    --border-color: #333333;
    --font-family: 'Poppins', sans-serif;
}

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

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

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

a:hover {
    color: var(--secondary-color);
}

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

h1, h2, h3 {
    line-height: 1.3;
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

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

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

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
}
.logo a:hover {
    color: var(--primary-color);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    font-weight: 400;
    color: var(--text-muted-color);
    position: relative;
    padding: 0.5rem 0;
}

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

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

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

/* --- Main Layout --- */
main.container {
    padding: 2rem 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

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

/* --- Articles Grid --- */
.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.article-card {
    background-color: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.article-card a {
    color: var(--text-color);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-category {
    display: inline-block;
    background-color: var(--primary-color);
    color: #000;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.card-content h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-content p {
    font-size: 0.9rem;
    color: var(--text-muted-color);
}

/* --- Category & Article Page --- */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.article-list .article-card {
    grid-column: span 2; /* Make cards wider on category pages */
}

@media (min-width: 1200px) {
    .article-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.article-content {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.article-meta {
    margin-bottom: 1.5rem;
    color: var(--text-muted-color);
}

.article-meta span {
    margin-right: 1rem;
}

.article-full-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body h3 {
    margin-top: 2rem;
}

/* --- Sidebar --- */
.sidebar .promo-box, .sidebar .related-articles {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.sidebar h3 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.sidebar p {
    color: var(--text-muted-color);
}

.related-articles ul {
    list-style: none;
}
.related-articles li {
    margin-top: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}
.related-articles li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.related-articles a {
    font-weight: 600;
}

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