/* ====================================
   Blog-Specific Styles
   ==================================== */

/* Blog Header */
.blog-header {
    padding: 12rem 2rem 6rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(20, 27, 42, 0.95) 0%, rgba(20, 27, 42, 0.98) 100%);
    position: relative;
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(202, 138, 4, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.blog-header .container {
    position: relative;
    z-index: 1;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--gray);
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    transition: color 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.back-link:hover {
    color: var(--primary);
}

.blog-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--light) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-subtitle {
    font-size: 1.25rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Posts List */
.blog-list {
    padding: 6rem 2rem;
    background-color: var(--darker);
}

.posts-grid {
    display: grid;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.post-card {
    background-color: rgba(20, 27, 42, 0.5);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: rgba(202, 138, 4, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.post-date {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-card .post-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-card .post-title a {
    color: var(--light);
    text-decoration: none;
    transition: color 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.post-card .post-title a:hover {
    color: var(--primary);
}

.post-excerpt {
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background-color: rgba(202, 138, 4, 0.1);
    border: 1px solid rgba(202, 138, 4, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--primary);
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.tag:hover {
    background-color: rgba(202, 138, 4, 0.2);
    border-color: var(--primary);
}

.post-read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.post-read-more:hover {
    color: var(--secondary);
    transform: translateX(5px);
}

/* ====================================
   Individual Post Page
   ==================================== */

.post-content {
    padding: 12rem 2rem 4rem;
    background-color: var(--darker);
}

.post-container {
    max-width: 750px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-reading-time {
    color: var(--gray);
}

.post-title-main {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--light);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

/* Post Body Content */
.post-body {
    color: var(--light);
    line-height: 1.8;
    font-size: 1.1rem;
}

.post-body .lead {
    font-size: 1.3rem;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.post-body h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--light);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.post-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--light);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.post-body p {
    margin-bottom: 1.5rem;
    color: rgba(245, 245, 247, 0.9);
}

.post-body strong {
    color: var(--primary);
    font-weight: 600;
}

.post-body em {
    color: var(--gray);
    font-style: italic;
}

.post-body a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.post-body a:hover {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

.post-body ul,
.post-body ol {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}

.post-body li {
    margin-bottom: 0.8rem;
    color: rgba(245, 245, 247, 0.9);
    line-height: 1.7;
}

.post-body li::marker {
    color: var(--primary);
}

/* Code Blocks */
.post-body pre {
    background-color: rgba(13, 17, 23, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    overflow-x: hidden !important;
    font-size: 0.95rem;
    line-height: 1.6;
}

.post-body code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
}

.post-body pre code {
    display: block;
    max-width: 100%;
    overflow-x: hidden !important;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    word-break: normal;
}

.post-body pre code.hljs {
    overflow-x: hidden !important;
}

.post-body :not(pre) > code {
    background-color: rgba(202, 138, 4, 0.15);
    color: var(--primary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid rgba(202, 138, 4, 0.3);
}

/* Post CTA Box */
.post-cta {
    background-color: rgba(202, 138, 4, 0.1);
    border-left: 4px solid var(--primary);
    padding: 1.5rem 2rem;
    margin: 3rem 0;
    border-radius: 8px;
}

.post-cta p {
    margin: 0;
    color: var(--light);
}

.post-cta a {
    color: var(--primary);
    font-weight: 600;
}

/* Post Footer */
.post-footer {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.post-author {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.author-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--light);
    margin-bottom: 0.5rem;
}

.author-info p {
    color: var(--gray);
    line-height: 1.6;
    margin: 0;
}

/* ====================================
   Responsive Design
   ==================================== */

@media (max-width: 768px) {
    .blog-header {
        padding: 10rem 1.5rem 4rem;
    }

    .blog-title {
        font-size: 2.5rem;
    }

    .blog-subtitle {
        font-size: 1.1rem;
    }

    .blog-list {
        padding: 4rem 1.5rem;
    }

    .post-card {
        padding: 2rem;
    }

    .post-card .post-title {
        font-size: 1.5rem;
    }

    .post-content {
        padding: 10rem 1.5rem 3rem;
    }

    .post-title-main {
        font-size: 2rem;
    }

    .post-body {
        font-size: 1.05rem;
    }

    .post-body .lead {
        font-size: 1.15rem;
    }

    .post-body h2 {
        font-size: 1.65rem;
        margin-top: 2.5rem;
    }

    .post-body h3 {
        font-size: 1.35rem;
        margin-top: 2rem;
    }

    .post-body pre {
        padding: 1rem;
        font-size: 0.85rem;
        margin: 1.5rem -1rem;
        border-radius: 0;
    }

    .post-cta {
        padding: 1.25rem 1.5rem;
        margin: 2rem 0;
    }
}

@media (max-width: 576px) {
    .blog-title {
        font-size: 2rem;
    }

    .blog-subtitle {
        font-size: 1rem;
    }

    .post-card {
        padding: 1.5rem;
    }

    .post-title-main {
        font-size: 1.75rem;
    }

    .post-body {
        font-size: 1rem;
    }

    .post-body .lead {
        font-size: 1.1rem;
    }
}
