/* =========================================
   BLOG ARCHIVE — Page Styles
   ========================================= */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #050505;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6366f1;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, #6366f1, #a855f7);
    z-index: 100;
    transition: width 0.1s ease;
}

/* Custom Cursor */
@media (min-width: 768px) {
    * {
        cursor: none !important;
    }
}

.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: white;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.cursor-outline.hover {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: transparent;
}

/* ─── Ambient Orbs ─── */
.ambient-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    filter: blur(120px);
}

/* ─── Filter Bar ─── */
.blog-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.blog-filter-btn {
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.blog-filter-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    opacity: 0;
    transition: opacity 0.35s ease;
    border-radius: 9999px;
    z-index: -1;
}

.blog-filter-btn:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.blog-filter-btn.active {
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.blog-filter-btn.active::before {
    opacity: 1;
}

/* ─── Blog Grid ─── */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
}

@media (min-width: 640px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ─── Blog Card ─── */
.blog-card {
    display: flex;
    flex-direction: column;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
}

.blog-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(99, 102, 241, 0.08);
}

.blog-card .card-image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.blog-card .card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover .card-image {
    transform: scale(1.06);
}

/* Reading time badge on image */
.blog-card .read-time-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.6875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.blog-card .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card .card-category {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.625rem;
    width: fit-content;
}

.blog-card .card-category.cat-development {
    color: #6366f1;
}

.blog-card .card-category.cat-design {
    color: #a855f7;
}

.blog-card .card-category.cat-career {
    color: #c084fc;
}

.blog-card .card-category.cat-tech {
    color: #22d3ee;
}

.blog-card .card-category.cat-productivity {
    color: #34d399;
}

.blog-card .card-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.625rem;
    line-height: 1.35;
    transition: color 0.3s ease;
}

.blog-card:hover .card-title {
    color: #a5b4fc;
}

.blog-card .card-excerpt {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.65;
    margin-bottom: 1.25rem;
    flex: 1;
}

.blog-card .card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.blog-card .card-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
}

.blog-card .card-read-more {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: color 0.3s ease, gap 0.3s ease;
}

.blog-card:hover .card-read-more {
    color: #a5b4fc;
    gap: 0.625rem;
}

/* ─── Featured / Large Card ─── */
.blog-card.featured {
    grid-column: 1 / -1;
}

@media (min-width: 640px) {
    .blog-card.featured {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .blog-card.featured .card-image-wrap {
        aspect-ratio: unset;
        min-height: 300px;
    }

    .blog-card.featured .card-body {
        padding: 2rem 2.5rem;
        justify-content: center;
    }

    .blog-card.featured .card-title {
        font-size: 1.75rem;
    }

    .blog-card.featured .card-excerpt {
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.5);
    }
}

/* ─── Stagger reveal animation ─── */
.blog-card {
    opacity: 0;
    transform: translateY(40px);
}

.blog-card.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:nth-child(1) {
    transition-delay: 0s;
}

.blog-card:nth-child(2) {
    transition-delay: 0.08s;
}

.blog-card:nth-child(3) {
    transition-delay: 0.16s;
}

.blog-card:nth-child(4) {
    transition-delay: 0.24s;
}

.blog-card:nth-child(5) {
    transition-delay: 0.32s;
}

.blog-card:nth-child(6) {
    transition-delay: 0.4s;
}

.blog-card:nth-child(7) {
    transition-delay: 0.48s;
}

.blog-card:nth-child(8) {
    transition-delay: 0.56s;
}

.blog-card:nth-child(9) {
    transition-delay: 0.64s;
}

/* ─── Newsletter CTA ─── */
.newsletter-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(168, 85, 247, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    position: relative;
    overflow: hidden;
}

.newsletter-box .nl-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.newsletter-box input[type="email"] {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: white;
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.3s ease;
    width: 100%;
}

.newsletter-box input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.newsletter-box input[type="email"]:focus {
    border-color: rgba(99, 102, 241, 0.5);
}

/* ─── Footer ─── */
.blog-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.blog-footer a:hover {
    color: #a5b4fc;
}