/* === BLOG PAGE: PRO-LEVEL STYLESHEET === */

/* --- 1. Root Variables & Global Styles --- */
:root {
    --dark-bg: #0A0A10; --surface-bg: #111119; --border-color: rgba(255, 255, 255, 0.1);
    --primary: #00d4ff; --primary-glow: rgba(0, 212, 255, 0.5); --accent: #ff477b;
    --text-primary: #ECEFF1; --text-secondary: #90A4AE; --font-family: 'Poppins', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background-color: var(--dark-bg); color: var(--text-primary); font-family: var(--font-family); line-height: 1.7; overflow-x: hidden; }
a { color: var(--primary); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: white; }

/* --- 2. Navigation --- */
nav { padding: 1rem 5%; background: rgba(10, 10, 16, 0.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-color); }
nav:first-of-type { display: flex; justify-content: space-between; align-items: center; }
nav:last-of-type { position: sticky; top: 0; z-index: 1000; display: flex; justify-content: center; }
.logo { font-size: 1.8rem; font-weight: 800; }
.logo span { color: var(--primary); text-shadow: 0 0 10px var(--primary-glow); }
nav ul { display: flex; list-style: none; gap: 1rem; align-items: center; overflow-x: auto; padding-bottom: 0.5rem; }
nav:last-of-type a { color: var(--text-secondary); padding: 0.5rem 1rem; border-radius: 8px; font-weight: 500; display: flex; align-items: center; gap: 0.5rem; white-space: nowrap; transition: all 0.3s ease; }
nav:last-of-type a:hover { color: var(--text-primary); background-color: var(--surface-bg); }
nav:last-of-type a.active { color: var(--primary); background: var(--surface-bg); font-weight: 600; }

/* --- 3. Buttons & Surface Glow --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem; padding: 0.8rem 1.8rem; border-radius: 50px; font-weight: 600; text-decoration: none; border: none; cursor: pointer; transition: all 0.3s ease; }
.btn-primary { background: var(--primary); color: #000; box-shadow: 0 0 25px var(--primary-glow); }
.btn-primary:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 0 40px var(--primary-glow); }
.btn-outline { background: transparent; border: 2px solid var(--border-color); color: var(--text-primary); }
.btn-outline:hover { background: var(--surface-bg); border-color: var(--primary); color: var(--primary); }
.btn-outline.active { background: var(--primary); color: #000; border-color: var(--primary); box-shadow: 0 0 20px var(--primary-glow); }
.surface-glow { background: var(--surface-bg); border-radius: 16px; position: relative; }
.surface-glow::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: inherit; padding: 1px;
    background: conic-gradient(from var(--angle), transparent 20%, var(--primary), var(--accent), transparent 80%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    animation: spin 5s linear infinite paused; opacity: 0; transition: opacity 0.4s ease; pointer-events: none;
}
.surface-glow:hover::before { animation-play-state: running; opacity: 1; }
@property --angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --angle: 360deg; } }

/* === BLOG-SPECIFIC STYLES START HERE === */

/* --- 4. Hero Section --- */
.hero { min-height: 60vh; padding: 6rem 2rem; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; }
.hero::before, .hero::after { content: ''; position: absolute; z-index: 0; filter: blur(120px); will-change: transform; border-radius: 50%; }
.hero::before { width: 40vw; height: 40vw; background: radial-gradient(circle, var(--primary) 0%, transparent 60%); top: 10%; left: 10%; animation: drift-1 20s infinite alternate ease-in-out; }
.hero::after { width: 30vw; height: 30vw; background: radial-gradient(circle, var(--accent) 0%, transparent 60%); bottom: 10%; right: 10%; animation: drift-2 25s infinite alternate ease-in-out; }
@keyframes drift-1 { from { transform: translate(-50px, -50px) rotate(0deg); } to { transform: translate(50px, 50px) rotate(90deg); } }
@keyframes drift-2 { from { transform: translate(50px, 50px) rotate(0deg); } to { transform: translate(-50px, -50px) rotate(-90deg); } }
.hero-content { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); background: linear-gradient(90deg, #fff, #b0c4de); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1rem; }
.hero p { font-size: 1.2rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto 2rem; }

/* --- 5. Main Blog Layout & Categories --- */
.blog-container { max-width: 1200px; margin: 0 auto; padding: 3rem 5%; }
.categories { text-align: center; margin-bottom: 3rem; }
.categories h2 { font-size: 1.8rem; margin-bottom: 1.5rem; }
.category-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.category-tags .btn-outline { padding: 0.5rem 1.25rem; font-weight: 500; font-size: 0.9rem; }

/* --- 6. Blog Posts Grid & Cards --- */
.blog-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.post {
    display: flex; flex-direction: column; border-radius: 16px; overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    opacity: 0; transform: translateY(30px);
    animation: fade-in-up 0.6s ease-out forwards;
}
@keyframes fade-in-up { to { opacity: 1; transform: translateY(0); } }
.post:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.2); }
.post img { width: 100%; height: 200px; object-fit: cover; }
.post-content { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.post-meta { display: flex; justify-content: space-between; align-items: center; color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 1rem; }
.post-meta span { display: flex; align-items: center; gap: 0.4rem; }
.post-meta i { color: var(--primary); }
.post h2 { font-size: 1.3rem; margin-bottom: 0.75rem; line-height: 1.4; flex-grow: 1; }
.post-description { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 0.95rem; }
.post .btn-primary { align-self: flex-start; margin-top: auto; }

/* --- 7. Pagination & Newsletter --- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin: 4rem 0; }
.pagination a, .pagination span {
    display: flex; align-items: center; justify-content: center; width: 40px; height: 40px;
    border-radius: 50%; color: var(--text-secondary); background: var(--surface-bg);
    border: 1px solid var(--border-color); text-decoration: none; font-weight: 600; transition: all 0.3s ease;
}
.pagination a:hover { color: var(--primary); border-color: var(--primary); }
.pagination .active { background: var(--primary); color: #000; border-color: var(--primary); }

.newsletter-section { padding: 3rem; text-align: center; margin: 4rem 0; }
.newsletter-section h2 { font-size: 2rem; margin-bottom: 1rem; }
.newsletter-section p { color: var(--text-secondary); max-width: 500px; margin: 0 auto 2rem; }
.newsletter-form { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; max-width: 500px; margin: 0 auto; }
.newsletter-form input {
    flex-grow: 1; padding: 0.9rem 1.5rem; background: rgba(0,0,0,0.2); border: 1px solid var(--border-color);
    color: var(--text-primary); border-radius: 50px; font-size: 1rem;
}
.newsletter-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }