@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* --- Base Styles & Variables --- */
:root {
    --primary-color: #3a86ff;
    --secondary-color: #ffbe0b;
    --text-color: #e0e0e0;
    --text-dark: #333;
    --bg-color: #1a1a2e;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.2);
    --font-family: 'Poppins', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    background-image: linear-gradient(to right top, #051937, #004d7a, #008793, #00bf72, #a8eb12);
    background-attachment: fixed;
    font-size: 16px;
}

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

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

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

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

a:hover {
    color: #fff;
    text-decoration: underline;
}

p {
    margin-bottom: 1rem;
}

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

/* --- Glassmorphism Card Style --- */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

/* --- Header & Navigation --- */
.site-header {
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

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

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
}

.site-title a {
    color: #fff;
}

.site-title a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

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

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

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

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


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

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

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

/* --- Homepage Specifics --- */
.hero-section {
    text-align: center;
    padding: 3rem 1.5rem;
}

.hero-section h1 {
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

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

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

.blog-post-preview h3 {
    margin-top: 0;
}

.read-more-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-weight: 500;
}

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

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

.article-header h1 {
    color: #fff;
}

.article-meta {
    font-size: 0.9rem;
    color: #ccc;
}

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

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

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

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

aside ul {
    list-style: none;
}

aside ul li a {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--glass-border);
}

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

/* --- Sub-pages (About, Contact, etc.) --- */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-content {
    max-width: 800px;
    margin: 0 auto;
}
.page-content.card {
  padding: 2rem;
}


/* --- Responsive Menu (placeholder for non-JS) --- */
/* For a real-world scenario, a checkbox hack or JS would be needed for a toggle menu. */
/* Here, we'll just stack them on small screens. */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
}
