/* blogging page styles */
.blogging-header {
    text-align: center;
    padding: 8rem 2rem 4rem;
    background: transparent;
    position: relative;
    z-index: 1;
}

.blogging-header .callout {
    max-width: 800px;
    margin: -0.5rem auto 1.25rem;
    text-align: left;
}

.blogging-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.callout {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.28);
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
}

.callout i {
    color: var(--primary);
    font-size: 1.05rem;
    margin-top: 2px;
}

[data-theme="light"] .callout {
    background: rgba(var(--primary-rgb), 0.06);
    border-color: rgba(var(--primary-rgb), 0.30);
}

.blogging-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}
/* Articles grid */
.articles-grid {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.article-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all var(--transition-normal);
}

.article-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.article-header {
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.article-category {
    color: var(--primary);
    font-weight: 500;
}

.article-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-read-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    transition: color var(--transition-normal);
}

.article-preview {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-normal);
}

.read-more:hover {
    gap: 0.75rem;
}

.read-more i {
    font-size: 0.875rem;
    transition: transform var(--transition-normal);
}

.read-more:hover i {
    transform: translateX(2px);
}

/* Featured article */
.featured-article {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 4rem;
    transition: all var(--transition-normal);
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
}

.featured-article:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.1);
}


/* Featured article styles - Add to top of file */
.article-card.featured {
    border: 2px solid rgba(255, 187, 0, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
    order: -1; /* Ensure featured articles appear first */
}

.article-card.featured:hover {
    border-color: rgba(255, 187, 0, 0.6);
    box-shadow: 0 8px 30px rgba(255, 187, 0, 0.1);
}

/* Featured badge - update width and positioning */
.articles-grid .article-card.featured .featured-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: rgba(255, 187, 0, 0.9);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 3;
    width: fit-content; /* Make badge width fit content */
    white-space: nowrap; /* Prevent text wrapping */
    display: inline-flex; /* Use flexbox for better content alignment */
    align-items: center;
    justify-content: center;
}

/* Adjust article header spacing to account for badge */
.article-card.featured .article-header {
    margin-top: 2rem; /* Add space below the badge */
}

/* Glimmer effect - match projects styling */
.article-card.featured::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 187, 0, 0.5),
        transparent
    );
    opacity: 0;
    z-index: 2;
    animation: glimmer 3s infinite;
    pointer-events: none;
    will-change: transform;
}

/* Responsive design */
@media (max-width: 1024px) {
    .blogging-header h1 {
        font-size: 2.5rem;
    }

    .articles-grid {
        max-width: 700px;
    }
}

@media (max-width: 768px) {
    .blogging-header h1 {
        font-size: 2.5rem;
    }
    
    .blogging-nav {
        gap: 0.5rem;
    }
    
    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .article-title {
        font-size: 1.5rem;
    }

    .articles-grid {
        padding: 1rem;
    }
}


/* Touch device optimizations */
@media (hover: none) {
    .category-btn:hover {
        transform: none;
    }

    .category-btn.active {
        transform: none;
    }

    .article-card:hover {
        transform: none;
    }

    .article-card,
    .category-btn {
        transition: transform 0.2s ease;
    }

    .article-card:active,
    .category-btn:active {
        transform: scale(0.98);
    }
}

/* Prevent text selection on interactive elements */
.category-btn,
.article-meta span {
    user-select: none;
    -webkit-user-select: none;
}

/* Improve touch scrolling */
@supports (-webkit-overflow-scrolling: touch) {
    .articles-grid {
        -webkit-overflow-scrolling: touch;
    }
}

 /* Featured article styles - Add to top of file */
.article-card.featured {
    border: 2px solid rgba(255, 187, 0, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
    order: -1; /* Ensure featured articles appear first */
}

.article-card.featured:hover {
    border-color: rgba(255, 187, 0, 0.6);
    box-shadow: 0 8px 30px rgba(255, 187, 0, 0.1);
}

/* Featured badge - update width and positioning */
.articles-grid .article-card.featured .featured-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: rgba(255, 187, 0, 0.9);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 3;
    width: fit-content; /* Make badge width fit content */
    white-space: nowrap; /* Prevent text wrapping */
    display: inline-flex; /* Use flexbox for better content alignment */
    align-items: center;
    justify-content: center;
}

/* Adjust article header spacing to account for badge */
.article-card.featured .article-header {
    margin-top: 2rem; /* Add space below the badge */
}

/* Glimmer effect - match projects styling */
.article-card.featured::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 187, 0, 0.5),
        transparent
    );
    opacity: 0;
    z-index: 2;
    animation: glimmer 3s infinite;
    pointer-events: none;
    will-change: transform;
}
