/* ---
Theme: Dark Mode Elegance
Font: Poppins (Sans-Serif)
Tone: Friendly & Casual
Language: English (US)
--- */

/* CSS Variables */
:root {
    --primary-color: #00A896; /* A vibrant teal */
    --primary-hover-color: #008778;
    --background-color: #121212; /* Very dark grey, almost black */
    --surface-color: #1E1E1E; /* Dark grey for cards, headers */
    --text-color: #E0E0E0; /* Light grey for readability */
    --muted-text-color: #888888;
    --border-color: #2c2c2c;
    --font-family: 'Poppins', sans-serif;
    --header-height: 70px;
    --shadow-color: rgba(0, 168, 150, 0.2);
}

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

body {
    font-family: var(--font-family);
    line-height: 1.7; /* Increased for better readability */
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    margin-bottom: 1rem;
    font-weight: 600;
}

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

p {
    margin-bottom: 1.25rem;
}

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

a:hover {
    color: var(--primary-hover-color);
    text-decoration: none; /* remove underline on hover for a cleaner look */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Header & Navigation */
.site-header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 5%;
}

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

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

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 1.8rem;
}

.site-nav a {
    text-decoration: none;
    font-weight: 500;
    color: var(--muted-text-color);
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

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

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

.site-nav a:hover,
.site-nav a.active {
    color: var(--text-color);
}

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

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

main {
    flex-grow: 1;
}

/* Blog Post Cards (Homepage) */
.intro-section {
    background-color: var(--surface-color);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    text-align: center;
}

.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(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0;
    filter: brightness(0.9);
    transition: filter 0.3s ease;
}
.article-card:hover .card-image img {
    filter: brightness(1);
}

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

.card-content h3 {
    font-size: 1.3rem;
    margin-top: 0;
    color: var(--text-color);
}

.card-content p {
    color: var(--muted-text-color);
    flex-grow: 1;
}

.read-more-link {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 600;
}

/* Sidebar */
.sidebar {
    padding: 1.5rem;
    background-color: var(--surface-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    height: fit-content;
}

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

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

.sidebar-widget h3 {
    font-size: 1.3rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.sidebar-widget ul {
    list-style: none;
}

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

.sidebar-widget ul li a {
    color: var(--muted-text-color);
    transition: color 0.3s ease;
}
.sidebar-widget ul li a:hover {
    color: var(--primary-color);
}


.promo-text {
    background-color: rgba(0, 168, 150, 0.1);
    padding: 1rem;
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
    font-style: italic;
    color: var(--primary-color);
}

/* Article Page Styling */
.article-page {
    background-color: var(--surface-color);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.article-header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.article-meta {
    color: var(--muted-text-color);
    font-size: 0.9rem;
}
.article-meta a {
    color: var(--muted-text-color);
    text-decoration: underline;
}
.article-meta a:hover {
    color: var(--primary-color);
}


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

.article-content h3 {
    margin-top: 2rem;
}

.article-content ul, .article-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--muted-text-color);
    font-size: 1.1rem;
}

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

.cta-section h3 {
    margin-top: 0;
    font-size: 1.8rem;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.8rem 2rem;
    border-radius: 50px; /* pill shape */
    font-weight: 600;
    text-decoration: none;
    margin-top: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
    background-color: var(--primary-hover-color);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Simple Page Styling (About, Contact, etc.) */
.simple-page {
    background-color: var(--surface-color);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    min-height: 40vh;
}

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

.footer-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}