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

:root {
    /* Color Palette - Premium Tech/Dark Mode friendly */
    --primary: #6366f1;
    /* Indigo 500 */
    --primary-hover: #4f46e5;
    --background: #0f172a;
    /* Slate 900 */
    --surface: #1e293b;
    /* Slate 800 */
    --surface-glass: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #22d3ee;
    /* Cyan 400 */

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --radius-md: 12px;
    --radius-lg: 20px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #fff;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

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

.section {
    padding: 4rem 0;
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* --- ENHANCED HEADER Styles --- */

/* Top Bar (Socials & Quick Links) */
.top-bar {
    background: #020617;
    /* Darker than bg */
    padding: 0.5rem 0;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-links {
    display: flex;
    gap: 1.5rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a:hover {
    color: var(--accent);
}

/* Main Navbar */
.main-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo h3 {
    margin: 0;
    font-size: 1.5rem;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Desktop Nav */
.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
}

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

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

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

/* Mobile Dropdown */
.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--surface);
    border-bottom: var(--glass-border);
    padding: 1rem 0;
    transform: translateY(-150%);
    /* Hidden by default */
    transition: transform 0.3s ease-in-out;
    z-index: 99;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu a {
    display: block;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.02);
    color: white;
    padding-left: 2.5rem;
    /* Slide effect */
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Hide Desktop Nav */
    }

    .mobile-toggle {
        display: block;
    }

    .top-bar .quick-links {
        display: none;
        /* Hide quick links on very small screens if needed */
    }
}


/* --- END Header Styles --- */


/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0;
    background: radial-gradient(circle at 50% 50%, #1e1b4b 0%, var(--background) 70%);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Cards (Posts) */
.post-card {
    background: var(--surface);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.3);
}

.post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-content {
    padding: 1.5rem;
}

.post-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 0.5rem;
    display: inline-block;
}

.post-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.post-excerpt {
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Footer */
.main-footer {
    background: var(--surface);
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: var(--glass-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.footer-links li {
    margin-bottom: 0.5rem;
}

/* Utilities */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

/* Post Content Styles (For single post pages) */
.article-content {
    background: var(--surface);
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: var(--glass-border);
    margin-top: -3rem;
    /* Overlap hero */
    position: relative;
    z-index: 10;
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
}

.article-header img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-top: 2rem;
}

.breadcrumb {
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
}

/* Grid Variations */
.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Featured Cards */
.featured-card {
    background: var(--surface);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.featured-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.featured-content {
    padding: 1.5rem;
}

.featured-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.featured-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Section Styles */
.section-header {
    text-align: center;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: -0.5rem;
}

/* Categories Section */
.categories-section {
    background: linear-gradient(180deg, transparent 0%, rgba(30, 41, 59, 0.3) 50%, transparent 100%);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.category-card {
    background: var(--surface);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.category-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.category-card p {
    font-size: 0.85rem;
    margin: 0;
    color: var(--text-muted);
}

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

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

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(34, 211, 238, 0.05) 100%);
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.newsletter-section h2 {
    margin-bottom: 1rem;
}

.newsletter-section p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.newsletter-benefits {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    color: var(--accent);
    font-size: 0.9rem;
}

/* Skeleton Loader Animation */
.skeleton-loader {
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Text Utilities */
.text-center {
    text-align: center;
}

/* Button Improvements */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Hero Improvements */
.hero p {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.15rem;
}

/* Responsive Hero */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero {
        padding: 4rem 0;
    }

    .featured-title {
        font-size: 1.2rem;
    }

    .featured-image {
        height: 200px;
    }
}