/* -- Theme Variables -- */
:root {
    --bg-color: #0d1117; --primary-color: #c9d1d9; --accent-color: #58a6ff;
    --border-color: #30363d; --content-bg: rgba(22, 27, 34, 0.7); --glow-color: rgba(88, 166, 255, 0.2);
    --font-family: 'Poppins', sans-serif;
}
/* -- Basic Reset & Body -- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    /* The background-color is removed from here and applied to the particle container itself for better stacking */
    color: var(--primary-color); 
    font-family: var(--font-family); 
}

#particles-js-blog { 
    position: fixed; 
    width: 100%; 
    height: 100%; 
    top: 0; 
    left: 0; 
    background-color: var(--bg-color); /* Add the background color here */
    z-index: -1; /* This is the key change from -1 */
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 3rem 2rem; 
    position: relative; /* Add this */
    z-index: 1;         /* And this, to lift the content up */
}


/* -- Filter & Search Controls -- */
.filter-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 3rem; }
.search-container { position: relative; }
.search-container i { position: absolute; top: 50%; left: 15px; transform: translateY(-50%); color: #8b949e; }
#search-input { background: var(--content-bg); border: 1px solid var(--border-color); border-radius: 8px; color: var(--primary-color); padding: 12px 12px 12px 40px; font-size: 1rem; transition: border-color .3s; width: 300px; }
#search-input:focus { outline: none; border-color: var(--accent-color); }
.tags-container { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-filter { background: none; border: 1px solid var(--border-color); color: #8b949e; padding: 8px 16px; border-radius: 20px; cursor: pointer; transition: all .3s; }
.tag-filter:hover, .tag-filter.active { color: #fff; background-color: var(--accent-color); border-color: var(--accent-color); }

/* -- Post Grid -- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.post-card {
    background: var(--content-bg); backdrop-filter: blur(10px); border: 1px solid var(--border-color);
    border-radius: 12px; overflow: hidden; transform-style: preserve-3d; transition: all 0.4s ease;
    display: flex; /* For hidden state */ flex-direction: column;
}
.post-card.hidden { transform: scale(0.8); opacity: 0; display: none; }
.post-card:hover { transform: translateY(-10px) rotateX(5deg) scale(1.03); box-shadow: 0 20px 40px -10px var(--glow-color); border-color: var(--accent-color); }
.card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.card-image { width: 100%; height: 200px; object-fit: cover; }
.card-content { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.card-meta { display: flex; justify-content: space-between; font-size: 0.85rem; color: #8b949e; margin-bottom: 1rem; }
.card-title { font-size: 1.4rem; font-weight: 600; margin-bottom: 0.75rem; }
.card-excerpt { font-size: 0.95rem; color: #b1bac4; line-height: 1.6; flex-grow: 1; margin-bottom: 1.5rem; }
.card-tags .tag { display: inline-block; background: #30363d55; color: #8b949e; padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; margin-right: 0.5rem; }

@media(max-width: 768px) {
    .filter-controls { flex-direction: column; align-items: stretch; }
    #search-input { width: 100%; }
}
