:root {
    --purple-primary: #6B46C1;
    --purple-hover: #553C9A;
    --purple-light: #FAF5FF;
    --text-main: #1A202C;
    --text-muted: #718096;
    --bg-main: #F7FAFC;
    --card-bg: #FFFFFF;
    --border-color: #E2E8F0;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --text-main: #F7FAFC;
    --text-muted: #A0AEC0;
    --bg-main: #1A202C;
    --card-bg: #2D3748;
    --border-color: #4A5568;
    --purple-light: #2D3748;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', system-ui, sans-serif; }

body { background: var(--bg-main); color: var(--text-main); line-height: 1.6; transition: var(--transition); }

a { text-decoration: none; color: inherit; }

/* Navigation */
nav { background: var(--card-bg); padding: 1rem 5%; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 100;}
.logo { font-size: 1.5rem; font-weight: 800; color: var(--purple-primary); }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a:hover { color: var(--purple-primary); }

/* Buttons */
.btn-primary { background: var(--purple-primary); color: white; padding: 0.5rem 1.2rem; border-radius: 6px; font-weight: 600; border: none; cursor: pointer; transition: var(--transition);}
.btn-primary:hover { background: var(--purple-hover); transform: translateY(-2px); }

/* Layout Grid */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; margin-top: 2rem;}

/* Article Cards (Dev.to / Hashnode style) */
.card { background: var(--card-bg); border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color); transition: var(--transition); display: flex; flex-direction: column;}
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(107, 70, 193, 0.1); }
.card-img { width: 100%; height: 200px; object-fit: cover; }
.card-content { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column;}
.card-category { font-size: 0.8rem; font-weight: 700; color: var(--purple-primary); text-transform: uppercase; letter-spacing: 0.5px;}
.card-title { font-size: 1.25rem; font-weight: 700; margin: 0.5rem 0; line-height: 1.4;}
.card-excerpt { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.5rem; flex-grow: 1;}
.card-meta { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border-color); padding-top: 1rem; font-size: 0.85rem; color: var(--text-muted);}

/* Reading Progress Bar */
.progress-container { width: 100%; height: 4px; background: transparent; position: fixed; top: 0; z-index: 101;}
.progress-bar { height: 4px; background: var(--purple-primary); width: 0%; transition: width 0.1s;}

/* Full Article Page */
.article-header { text-align: center; max-width: 800px; margin: 0 auto 2rem; }
.article-cover { width: 100%; max-height: 500px; object-fit: cover; border-radius: 12px; margin-bottom: 2rem;}
.article-body { max-width: 750px; margin: 0 auto; font-size: 1.1rem; line-height: 1.8;}
.article-body h2 { margin: 2rem 0 1rem; }
.article-body img { max-width: 100%; border-radius: 8px; margin: 1.5rem 0;}

/* Floating Actions */
.floating-actions { position: sticky; top: 100px; float: left; margin-left: -80px; display: flex; flex-direction: column; gap: 1rem;}
.action-btn { width: 45px; height: 45px; border-radius: 50%; background: var(--card-bg); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition);}
.action-btn:hover { color: var(--purple-primary); border-color: var(--purple-primary);}

@media (max-width: 768px) {
    .floating-actions { position: fixed; bottom: 0; left: 0; right: 0; width: 100%; margin: 0; flex-direction: row; justify-content: center; background: var(--card-bg); padding: 1rem; border-top: 1px solid var(--border-color); z-index: 50;}
    .nav-links { display: none; /* Add hamburger menu logic here */ }
}
