:root {
    --bg-color: #121212;
    --surface-color: #1E1E1E;
    --primary-color: #00BFFF; /* DeepSkyBlue */
    --text-color: #EAEAEA;
    --heading-color: #FFFFFF;
    --border-color: #2c2c2c;
    --shadow-color: rgba(0, 191, 255, 0.1);
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Lato', sans-serif;
}

/* --- Global Resets & Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

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

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

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

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

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    margin-bottom: 1rem;
    line-height: 1.3;
    text-transform: uppercase;
}

h1 { font-size: 3rem; letter-spacing: 1px; }
h2 { font-size: 2.2rem; border-bottom: 2px solid var(--primary-color); display: inline-block; padding-bottom: 0.5rem; margin-bottom: 2rem; }
h3 { font-size: 1.4rem; color: var(--heading-color); }
h4 { font-size: 1.2rem; }

p {
    margin-bottom: 1rem;
}

ul {
    list-style-type: none;
}

/* --- Header & Navigation --- */
.site-header {
    background-color: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--heading-color);
    letter-spacing: 1px;
}
.logo:hover { color: var(--primary-color); }

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

.main-nav a {
    font-weight: 700;
    font-size: 1rem;
    padding-bottom: 5px;
    position: relative;
    color: var(--text-color);
    text-transform: uppercase;
}

.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::after, .main-nav a.active::after {
    width: 100%;
}
.main-nav a:hover, .main-nav a.active {
    color: var(--heading-color);
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 5rem 1rem;
    margin: 2rem 0;
}
.hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-color);
    max-width: 600px;
    margin: 0 auto;
}

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

/* --- Articles Grid --- */
.content-section {
    margin-bottom: 4rem;
}
.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
.articles-grid.featured {
    grid-template-columns: 1fr; /* Default for mobile */
}

.article-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
    border-color: var(--primary-color);
}

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

.article-card h3 a {
    color: var(--heading-color);
    text-decoration: none;
}
.article-card h3 a:hover {
    color: var(--primary-color);
}
.article-card p {
    flex-grow: 1;
    margin-top: 0.5rem;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--bg-color);
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 700;
    font-family: var(--font-body);
    text-align: center;
    transition: transform 0.2s ease, background-color 0.3s ease;
    margin-top: auto;
    border: 2px solid var(--primary-color);
    align-self: flex-start;
}

.btn:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: scale(1.05);
}

/* --- Article Page --- */
.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.article-header h1 {
    font-size: 2.8rem;
}
.article-meta {
    font-size: 0.9rem;
    color: #888;
    margin-top: -1rem;
}
.article-content ul, .article-content ol {
    margin-left: 20px;
    margin-bottom: 1.5rem;
}
.article-content code {
    background-color: #2b2b2b;
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
}
.article-content pre {
    background-color: #2b2b2b;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}
.article-content pre code {
    background-color: transparent;
    padding: 0;
}

/* --- Sidebar --- */
.sidebar .widget {
    background-color: var(--surface-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}
.widget-title {
    font-size: 1.25rem;
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}
.widget-list li:not(:last-child) {
    margin-bottom: 10px;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--surface-color);
    color: var(--text-color);
    padding: 3rem 0 1.5rem;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-col h4 {
    color: var(--heading-color);
    margin-bottom: 1rem;
}
.footer-col ul li {
    margin-bottom: 0.5rem;
}
.footer-col a:hover {
    color: var(--primary-color);
}
.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: #888;
}

/* --- Responsive Design --- */
@media (min-width: 768px) {
    .page-layout {
        grid-template-columns: 2.5fr 1fr;
    }
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .articles-grid.featured {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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