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

/* --- CSS Variables --- */
:root {
    --bg-color: #1A1A2E;
    --panel-bg-color: #16213E;
    --text-color: #E0E0E0;
    --heading-color: #FFFFFF;
    --accent-color: #0F3460;
    --accent-highlight: #537895;
    --border-color: rgba(255, 255, 255, 0.1);
    --font-main: 'Montserrat', sans-serif;
    --container-width: 1200px;
    --border-radius: 8px;
    --shadow-color: rgba(79, 70, 229, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

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

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

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

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

a:hover {
    color: #fff;
    text-shadow: 0 0 5px var(--accent-highlight);
}

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

ul li, ol li {
    margin-bottom: 0.75rem;
}

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

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

/* Panel Style */
.panel {
    background-color: var(--panel-bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* --- Header & Navigation --- */
.site-header {
    background: rgba(26, 26, 46, 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);
    letter-spacing: 1px;
}

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

.main-nav a {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    padding-bottom: 5px;
    position: relative;
}

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

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

/* --- Homepage Specific --- */
.intro-section {
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}
.intro-section h1 {
    font-size: 3.2rem;
    background: linear-gradient(90deg, #FFFFFF, #B0B0FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

.article-preview {
    background-color: var(--panel-bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

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

.article-preview h3 a {
    color: var(--heading-color);
}

.read-more-link {
    display: inline-block;
    margin-top: auto;
    padding: 0.7rem 1.4rem;
    font-weight: 600;
    background-color: var(--accent-color);
    color: #fff;
    border-radius: 6px;
    text-align: center;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    align-self: flex-start;
}

.read-more-link:hover {
    background-color: var(--accent-highlight);
    color: #fff;
    box-shadow: 0 0 15px var(--accent-color);
}


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

.article-meta {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 1rem;
    opacity: 0.8;
}
.article-meta span {
    margin: 0 1rem;
}

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

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

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget ul li {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: padding-left 0.3s ease;
}
.widget ul li:hover {
    padding-left: 10px;
}
.widget ul li a {
    font-weight: 600;
}

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

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 0;
}
.footer-links a {
    font-weight: 600;
}

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


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

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

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