/* === Google Font Import === */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

/* === CSS Variables - Tech / Futuristic Theme === */
:root {
    --bg-color: #0d1117; /* Dark GitHub-like background */
    --primary-color: #161b22; /* Slightly lighter background for cards */
    --secondary-color: #58a6ff; /* Bright blue for links and accents */
    --accent-color: #3fb950; /* Green for highlights */
    --text-color: #c9d1d9; /* Light grey for primary text */
    --text-muted-color: #8b949e; /* Muted grey for secondary text */
    --border-color: #30363d;
    --header-font: 'Montserrat', sans-serif;
    --body-font: 'Montserrat', sans-serif;
}

/* === Global Resets & Base Styles === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

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

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--header-font);
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; border-bottom: 2px solid var(--border-color); padding-bottom: 0.5rem; margin-top: 2rem; }
h3 { font-size: 1.5rem; color: var(--secondary-color); margin-top: 1.5rem;}

p {
    margin-bottom: 1rem;
}

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

a:hover, a:focus {
    color: var(--accent-color);
    text-decoration: underline;
}

ul, ol {
    margin-left: 20px;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

/* === Layout & Container === */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

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

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

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

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

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

.site-title a {
    color: inherit;
    text-decoration: none;
}

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

.main-nav a {
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.main-nav a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* === Main Content Area === */
main {
    padding: 1rem 0;
}

.intro-section, .content-page {
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.content-page h1 {
    margin-top: 0;
}

/* === Blog Articles Grid (Homepage) === */
.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(--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 8px 24px rgba(88, 166, 255, 0.2);
}

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

.card-title {
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
}

.card-excerpt {
    color: var(--text-muted-color);
    font-size: 0.9rem;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.read-more-btn {
    display: inline-block;
    background-color: transparent;
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    align-self: flex-start;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.read-more-btn:hover {
    background-color: var(--secondary-color);
    color: var(--bg-color);
    text-decoration: none;
}


/* === Sidebar === */
.sidebar .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.25rem;
    margin-top: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

.widget li a::before {
    content: '»';
    margin-right: 8px;
    color: var(--secondary-color);
}

.promo-text {
    background-color: rgba(56, 139, 253, 0.1);
    border-left: 4px solid var(--secondary-color);
    padding: 1rem;
    font-style: italic;
    color: var(--text-muted-color);
    border-radius: 4px;
}

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

.article-title {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}

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

.article-content a {
    text-decoration: underline;
    font-weight: 600;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

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

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
    background-color: #48d65d;
    transform: scale(1.05);
}

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