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

/* --- CSS Variables (DarkNova Theme) --- */
:root {
    --bg-color: #121212;
    --surface-color: #1E1E1E;
    --text-color: #E0E0E0;
    --text-color-secondary: #B0B0B0;
    --heading-color: #FFFFFF;
    --primary-color: #9370DB; /* Medium Purple */
    --primary-color-hover: #A488E4;
    --border-color: #333333;
    --font-family-main: 'Inter', sans-serif;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --border-radius: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-family-main);
    color: var(--heading-color);
    margin-bottom: 1.25rem;
    line-height: 1.3;
    font-weight: 700;
}

h1 { font-size: 3.25rem; font-weight: 900; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.6rem; }

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.75rem;
    position: relative;
    color: var(--heading-color);
    font-weight: 900;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

p { margin-bottom: 1.5rem; color: var(--text-color-secondary); }

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

a:hover {
    color: var(--primary-color-hover);
    text-decoration: none;
}

ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

li { margin-bottom: 0.75rem; }

/* --- Layout --- */
.container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 0;
}

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

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

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

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

.site-title {
    font-size: 2rem;
    font-weight: 900;
}

.site-title a {
    color: var(--heading-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
.site-title a:hover {
    color: var(--primary-color);
}

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

.main-nav a {
    color: var(--text-color);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}
.main-nav a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}
.main-nav a:hover, .main-nav a.active {
    color: var(--heading-color);
}
.main-nav a:hover::after, .main-nav a.active::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 5rem 1rem;
    background: linear-gradient(rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 0.8)), url('https://picsum.photos/1400/600?blur=5&random=99') center/cover no-repeat;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--heading-color);
}

.hero p {
    font-size: 1.25rem;
    max-width: 750px;
    margin: 1rem auto 0;
    color: var(--text-color);
    font-weight: 400;
}

/* --- Article Grid --- */
.article-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

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

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

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5), 0 0 0 2px var(--primary-color);
}

.article-card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    filter: grayscale(30%);
    transition: filter 0.3s ease, transform 0.3s ease;
}
.article-card:hover .article-card-image img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

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

.article-card-content h3 {
    margin-top: 0;
    font-size: 1.5rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
}
.article-card-content p {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.read-more-btn {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-color);
    padding: 0.7rem 1.4rem;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease, color 0.3s ease;
    align-self: flex-start;
}

.read-more-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* --- Sidebar --- */
.sidebar {
    position: sticky;
    top: 120px;
}
.widget { 
    margin-bottom: 2.5rem; 
    padding: 1.75rem;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    font-weight: 700;
}

.widget ul { list-style: none; padding: 0; }
.widget ul li { border-bottom: 1px solid var(--border-color); }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { display: block; padding: 0.8rem 0; transition: color 0.2s ease, padding-left 0.2s ease; }
.widget ul li a:hover { color: var(--primary-color-hover); padding-left: 0.5rem; }

/* --- Article & Page Styles --- */
.page-header {
    text-align: center;
    padding-bottom: 2rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}
.page-header p {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-color);
}

.article-header-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 2.5rem;
}

.article-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.article-header h1 {
    font-size: 3.25rem;
    line-height: 1.2;
}

.article-meta {
    font-size: 0.95rem;
    color: var(--text-color-secondary);
    margin-top: 1rem;
    font-weight: 600;
    text-transform: uppercase;
}
.article-meta a {
    color: var(--text-color-secondary);
}

.article-content h2 { margin-top: 3rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--border-color); }
.article-content h3 { margin-top: 2.5rem; color: var(--primary-color); }

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    font-style: italic;
    background-color: rgba(30, 30, 30, 0.5);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}
.article-content blockquote p {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-color);
}

.cta-section {
    background: linear-gradient(45deg, var(--primary-color), #6a46b2);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    margin: 3rem 0;
    border-radius: var(--border-radius);
}

.cta-section h2 { color: white; margin-top: 0; font-size: 2.2rem; }
.cta-section p { color: white; opacity: 0.95; }

.cta-button {
    display: inline-block;
    background: #FFFFFF;
    color: var(--primary-color);
    padding: 0.8rem 2.5rem;
    font-weight: 700;
    text-decoration: none;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
    border: 2px solid #FFFFFF;
}
.cta-button:hover {
    background-color: transparent;
    color: #FFFFFF;
}

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

.footer-container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
}
.footer-container p { color: var(--text-color-secondary); margin-bottom: 1rem; }

.footer-links { margin-top: 1rem; }
.footer-links a {
    color: var(--text-color-secondary);
    margin: 0 1rem;
    text-decoration: none;
    font-weight: 600;
    opacity: 0.8;
    transition: opacity 0.3s ease, color 0.3s ease;
}
.footer-links a:hover { opacity: 1; color: var(--primary-color); }
