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

/* --- CSS Variables --- */
:root {
    --bg-color: #0A0F1E;
    --panel-bg-color: rgba(10, 15, 30, 0.75);
    --border-color: #00FFFF; /* Cyan */
    --text-color: #C0C0E0;
    --heading-color: #FFFFFF;
    --accent-color-1: #00FFFF; /* Cyan */
    --accent-color-2: #FF00FF; /* Magenta */
    --shadow-color-cyan: rgba(0, 255, 255, 0.4);
    --shadow-color-magenta: rgba(255, 0, 255, 0.4);
    --font-body: 'Fira Code', monospace;
    --container-width: 1200px;
    --border-radius: 4px;
}

/* --- General Resets & Body --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    color: var(--text-color);
    line-height: 1.7;
    font-size: 16px;
    padding-top: 80px; /* Space for fixed header */
}

/* --- Typography --- */
h1, h2, h3, h4 {
    color: var(--heading-color);
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 700;
    text-shadow: 0 0 5px var(--shadow-color-cyan);
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1.25rem; }

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

a:hover {
    color: var(--accent-color-2);
    text-shadow: 0 0 8px var(--shadow-color-magenta);
}

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

/* --- Layout & Panel Effect --- */
.panel {
    background-color: var(--panel-bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 0 15px var(--shadow-color-cyan);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 2rem 0;
}

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

/* --- Header & Navigation --- */
.site-header {
    background-color: rgba(10, 15, 30, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 1rem 0;
}

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

.site-title a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--heading-color);
    text-shadow: 0 0 8px var(--shadow-color-cyan);
}
.site-title a:hover {
    color: var(--accent-color-2);
    text-shadow: 0 0 10px var(--shadow-color-magenta);
}

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

.main-nav a {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, text-shadow 0.3s ease, border-color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--heading-color);
    text-shadow: 0 0 5px var(--shadow-color-magenta);
    border-bottom-color: var(--accent-color-2);
}

/* --- Main Content & Articles --- */
.intro-section {
    text-align: center;
    padding: 2rem 1rem;
}
.intro-section h1 {
    color: var(--accent-color-1);
    font-size: 3.5rem;
    text-shadow: 0 0 15px var(--shadow-color-cyan);
}

.articles-section h2 {
    text-align: center;
    margin: 2rem 0;
    font-size: 2.5rem;
}

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

.article-preview {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-preview:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 20px var(--shadow-color-magenta);
    border-color: var(--accent-color-2);
}

.article-preview h3 a {
    color: var(--heading-color);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}
.article-preview h3 a:hover {
    color: var(--accent-color-2);
    text-shadow: 0 0 8px var(--shadow-color-magenta);
}

.read-more-link {
    display: inline-block;
    margin-top: auto; /* Pushes the button to the bottom */
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    background: transparent;
    border: 1px solid var(--accent-color-1);
    color: var(--accent-color-1);
    border-radius: var(--border-radius);
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.read-more-link:hover {
    background-color: var(--accent-color-1);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--shadow-color-cyan);
    text-shadow: none;
}

.article-meta {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

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

/* --- Sidebar --- */
.widget {
    margin-bottom: 2rem;
}
.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--accent-color-1);
    color: var(--heading-color);
}

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

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

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

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* --- Media Queries --- */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    body {
        padding-top: 130px;
    }
}


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

@media (min-width: 1024px) {
    h1 { font-size: 3.2rem; }
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
