
/* --- Root Variables & Global Styles --- */
:root {
    --bg-color: #0d1117;
    --primary-color: #161b22;
    --secondary-color: #010409;
    --accent-color: #58a6ff;
    --text-color: #c9d1d9;
    --text-muted-color: #8b949e;
    --border-color: #30363d;
    --font-family: 'JetBrains Mono', monospace;
}

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

* {
    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.7;
}

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

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

a:hover {
    color: #79c0ff;
    text-shadow: 0 0 5px rgba(88, 166, 255, 0.5);
}

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

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

p {
    margin-bottom: 1rem;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

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

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

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
}

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

.main-nav a {
    font-weight: 700;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

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

/* --- Main Content & Layout --- */
.main-content {
    padding: 3rem 0;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.main-area {
    width: 100%;
}

.sidebar {
    width: 100%;
}

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


/* --- Homepage Intro Section --- */
.intro-section {
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
    text-align: center;
}
.intro-section h1 {
    color: var(--accent-color);
}


/* --- Blog Articles Grid --- */
.articles-section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@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(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.article-card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.article-card-content p {
    flex-grow: 1;
    color: var(--text-muted-color);
}

.read-more-btn {
    display: inline-block;
    background-color: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    font-weight: 700;
    margin-top: 1rem;
    align-self: flex-start;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.read-more-btn:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}


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

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    margin-bottom: 0.75rem;
}

.widget ul li a::before {
    content: '>> ';
    color: var(--accent-color);
    opacity: 0.7;
}

.promo-text {
    background-color: var(--secondary-color);
    border-left: 3px solid var(--accent-color);
    padding: 1rem;
    font-style: italic;
    color: var(--text-muted-color);
    border-radius: 0 5px 5px 0;
}


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

.site-footer p {
    margin: 0;
    color: var(--text-muted-color);
}

/* --- Article Page Specific Styles --- */
.article-header {
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
}

.article-header h1 {
    font-size: 3rem;
    color: var(--accent-color);
}

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

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

.article-content h3 {
    margin-top: 2rem;
    color: #a3c9f5;
}

.article-content ul {
    list-style-position: inside;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.article-content ul li {
    margin-bottom: 0.5rem;
}

.cta-section {
    background-color: var(--primary-color);
    border: 1px solid var(--accent-color);
    padding: 2rem;
    border-radius: 8px;
    margin: 3rem 0;
    text-align: center;
}

.cta-section h2 {
    color: var(--accent-color);
}

.cta-btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--bg-color);
    padding: 0.8rem 2.5rem;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.5);
}

/* --- Simple Page Styles (About, Contact, etc.) --- */
.simple-page {
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 8px;
    min-height: 50vh;
}

.simple-page h1 {
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 2rem;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    h1 { font-size: 2rem; }
    .article-header h1 { font-size: 2.5rem; }
}

@media (max-width: 480px) {
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    .main-nav a {
        display: block;
        width: 100%;
        text-align: center;
    }
}
