:root {
    /* --- Palette: "Digital Humanism" --- */
    --bg-color: #0B0C10;         /* Deep Matte Black */
    --surface-dark: #1F2833;     /* Dark Grey for cards */
    --surface-light: #C5C6C7;    /* Light Grey for text */
    --accent-cyan: #66FCF1;      /* Electric Cyan (Highlights) */
    --accent-blue: #45A29E;      /* Muted Teal (Secondary) */
    
    --text-primary: #FFFFFF;
    --text-secondary: #C5C6C7;
    --text-muted: #8892b0;

    /* --- Typography --- */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* --- Spacing & Layout --- */
    --container-width: 1200px;
    --section-spacing: 100px;
    --card-radius: 4px;          /* Minimal rounding */
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

ul {
    list-style: none;
}

/* --- Typography Helpers --- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
}

.text-muted { color: var(--text-muted); }

/* --- Header & Nav --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(11, 12, 16, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    z-index: 100;
    height: 70px;
}

.navbar {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.logo img {
    height: 30px;
    opacity: 0.9;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--accent-cyan);
}

.header-actions {
    display: flex;
    gap: 20px;
}

.social-link {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* --- Hero Section --- */
.hero-section {
    height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    background: radial-gradient(circle at 50% 30%, rgba(69, 162, 158, 0.15) 0%, transparent 60%);
}

.hero-content h1 {
    font-size: 4.5rem;
    letter-spacing: -2px;
    margin-bottom: 20px;
    background: linear-gradient(to bottom right, #ffffff, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-primary, .btn-secondary {
    padding: 14px 32px;
    border-radius: var(--card-radius);
    font-weight: 600;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--accent-cyan);
    color: #000;
    border: 1px solid var(--accent-cyan);
}

.btn-primary:hover {
    background: #45A29E;
    border-color: #45A29E;
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
}

/* --- Main Layout Blocks --- */
.main-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-block {
    margin-bottom: var(--section-spacing);
    padding-top: 80px; /* Anchor offset */
}

.section-header {
    margin-bottom: 50px;
    border-left: 2px solid var(--accent-cyan);
    padding-left: 20px;
}

.section-header h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* --- Cards (Grid) --- */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

/* Modern Card Component */
.modern-card {
    background: rgba(31, 40, 51, 0.5); /* Surface Dark with opacity */
    border: 1px solid rgba(255,255,255,0.05);
    padding: 30px;
    border-radius: var(--card-radius);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modern-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-color: rgba(102, 252, 241, 0.2);
}

/* Category Card Specifics */
.category-card .card-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.category-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.link-text {
    font-weight: 600;
    color: var(--accent-cyan);
    font-size: 0.9rem;
}

/* Article Card Specifics */
.article-card {
    padding: 0; /* Remove padding for image/layout flexibility */
    background: transparent; /* Clean look */
    border: none; /* No border for article cards in list */
    border-bottom: 1px solid rgba(255,255,255,0.1);
    border-radius: 0;
    padding-bottom: 30px;
}

.article-card:hover {
    transform: none; /* Don't move list items */
    box-shadow: none;
    border-color: var(--text-muted);
}

.article-image-link {
    display: block;
    width: 100%;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: var(--card-radius);
    background: #161B22;
}

.article-image-link img {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    opacity: 0.9;
}

.article-card:hover .article-image-link img {
    transform: scale(1.05);
    opacity: 1;
}

.article-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

.meta-cat {
    color: var(--accent-cyan);
    text-transform: uppercase;
}

.meta-date {
    color: var(--text-muted);
}

.article-link h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.article-link:hover h3 {
    color: var(--accent-cyan);
}

.article-excerpt {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more-btn {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--accent-cyan);
    align-self: flex-start;
    padding-bottom: 2px;
}

/* --- Footer --- */
footer {
    background: #050507;
    padding: 80px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 100px;
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 200px;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: var(--text-primary);
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 10px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .categories-grid, .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 600px) {
    .categories-grid, .articles-grid {
        grid-template-columns: 1fr;
    }

    .navbar {
        padding: 0 15px;
    }
    
    .nav-links {
        display: none; /* Mobile nav not implemented in this clean pass, can be added if requested */
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .section-block {
        padding-top: 40px;
    }
}

/* Cookie Banner (Minimal) */
#cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    background: var(--surface-dark);
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 999;
    border-radius: var(--card-radius);
}

.sys-btn {
    margin-top: 10px;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    border: none;
    font-weight: 600;
}

.sys-btn.accept {
    background: var(--accent-cyan);
    color: black;
}

.sys-btn.reject {
    background: transparent;
    color: var(--text-muted);
    margin-left: 10px;
}

/* --- Post Reading Experience (Reader View) --- */

/* Container for the full article page */
.post-page .main-container {
    padding-top: 100px;
}

.full-post-content-wrapper {
    max-width: 800px; /* Optimal measure width + padding */
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Typography */
.full-post-header h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #E6EDF3; /* High legibility heading */
    letter-spacing: -0.02em;
}

.full-post-meta {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 30px;
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.meta-cat {
    color: var(--accent-cyan);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* The Article Body - Crucial for comfort */
.post-full-content {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; /* Clean sans-serif */
    font-size: 1.15rem; /* ~18px */
    line-height: 1.8;   /* Airy line height */
    color: #C9D1D9;     /* Soft light grey (GitHub Dark Dimmed text) */
    font-weight: 400;
}

/* Paragraph spacing */
.post-full-content p {
    margin-bottom: 2em; /* More breathing room between paragraphs */
}

/* Internal Headings */
.post-full-content h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-top: 2.5em;
    margin-bottom: 1em;
    color: #FFFFFF;
    border-left: none; /* Remove distinct border from previous design */
}

.post-full-content h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-top: 2em;
    margin-bottom: 0.8em;
    color: #E6EDF3;
}

/* Lists */
.post-full-content ul, 
.post-full-content ol {
    margin-bottom: 2em;
    padding-left: 1.5em;
    color: #C9D1D9;
}

.post-full-content li {
    margin-bottom: 0.8em;
    padding-left: 0.5em;
}

/* Blockquotes */
.post-full-content blockquote {
    border-left: 4px solid var(--accent-cyan);
    margin: 2.5em 0;
    padding: 10px 20px;
    background: rgba(102, 252, 241, 0.05);
    color: #E6EDF3;
    font-style: italic;
    font-size: 1.2rem;
}

/* Images in content */
.post-full-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--card-radius);
    margin: 2em 0;
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Code blocks */
.post-full-content pre {
    background: #161B22;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2em 0;
    border: 1px solid rgba(255,255,255,0.05);
}

.post-full-content code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--accent-cyan);
}

/* Links in content */
.post-full-content a {
    color: var(--accent-cyan);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: rgba(102, 252, 241, 0.3);
}

.post-full-content a:hover {
    text-decoration-color: var(--accent-cyan);
    color: #fff;
}