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

/* --- CSS Variables --- */
:root {
    --font-family: 'Fira Code', monospace;
    --primary-bg: #0A0A1A; /* Deep navy blue */
    --secondary-bg: #14142B; /* Slightly lighter navy */
    --card-bg: rgba(20, 20, 43, 0.8);
    --text-color: #E0E1DD;
    --accent-color: #00FFFF; /* Cyan */
    --accent-hover: #9FFFFF;
    --border-color: rgba(0, 255, 255, 0.3);
    --header-text: #FFFFFF;
}

/* --- General Styles & Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--primary-bg);
    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: 20px 20px;
    color: var(--text-color);
    line-height: 1.8;
    font-size: 16px;
    padding: 20px;
}

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

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

a:hover {
    color: var(--accent-hover);
    text-shadow: 0 0 5px var(--accent-hover);
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 0.8em;
    line-height: 1.3;
    color: var(--header-text);
}

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

p {
    margin-bottom: 1.2em;
}

/* --- Card Style --- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
    box-shadow: 0 0 15px var(--border-color);
}

/* --- Header & Navigation --- */
.site-header {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.site-header .logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--header-text);
    text-shadow: 0 0 8px var(--accent-color);
}

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

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

.main-nav a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

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

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

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

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

.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* --- Blog Post Grid --- */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

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

.blog-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.blog-card h3 {
    margin-top: 0;
    color: var(--accent-color);
}

.blog-card .read-more {
    display: inline-block;
    margin-top: auto;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: transparent;
    transition: background 0.3s ease, color 0.3s ease;
    text-align: center;
}

.blog-card .read-more:hover {
    background: var(--accent-color);
    color: var(--primary-bg);
    text-decoration: none;
    text-shadow: none;
}

/* --- Sidebar --- */
.sidebar .widget {
    margin-bottom: 2rem;
}

.sidebar .widget:last-child {
    margin-bottom: 0;
}

.sidebar h3 {
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin-bottom: 0.5rem;
    padding-left: 1.2em;
    position: relative;
}
.sidebar li::before {
    content: '>>';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 0.8em;
}

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

.article-meta {
    font-size: 0.9rem;
    color: #ccc;
    margin-top: -1rem;
    margin-bottom: 1rem;
}

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

.article-content a:hover {
    text-decoration: none;
}

.cta-section {
    margin-top: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

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

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        gap: 1.5rem;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
}

/* Contact Form Placeholder */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: var(--secondary-bg);
    color: var(--text-color);
    font-family: var(--font-family);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #bbb;
}

.contact-form button {
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    background: var(--accent-color);
    color: var(--primary-bg);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
    align-self: flex-start;
}

.contact-form button:hover {
    background: transparent;
    color: var(--accent-color);
}
