/* ============================================================ 
   SINGLE POST "ENGINEERING JOURNAL" v4.0
   Design: Luminous Reading Mode x Technical Typography
   ============================================================ */

.post-mastery-body {
    background: #FFFFFF;
    color: var(--color-gray-900);
    overflow-x: hidden;
}

/* --- READING PROGRESS BAR --- */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 1000;
    transition: width 0.1s ease;
}

/* --- POST HERO --- */
.post-hero {
    position: relative;
    padding: 60px 0 80px;
    background: #FFFFFF;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
    overflow: hidden;
}

.post-hero__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.post-hero__mesh {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
    z-index: 1;
}

.post-hero__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(15, 17, 26, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 17, 26, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
    z-index: 2;
}

.relative {
    position: relative;
}

.z-10 {
    z-index: 10;
}

.post-hero__badge {
    display: inline-flex;
    padding: 6px 16px;
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.post-hero__title {
    font-size: 48px !important;
    font-weight: 600 !important;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-gray-900);
    max-width: 900px;
    margin: 0 auto 32px;
}

.post-hero__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-gray-500);
}

.post-hero__author {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-gray-900);
}

.post-hero__avatar {
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* --- POST CONTENT --- */
.post-main {
    padding: 40px 0 80px;
    /* Reduced top padding */
    background: #FFFFFF;
}

.post-content {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #334155;
    font-family: 'Inter', sans-serif;
}

.post-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin: 60px 0 24px;
    color: var(--color-gray-900);
    letter-spacing: -0.03em;
}

.post-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 48px 0 20px;
    color: var(--color-gray-900);
    letter-spacing: -0.02em;
}

.post-content p {
    margin-bottom: 32px;
}

.post-content strong {
    color: var(--color-gray-900);
    font-weight: 600;
}

.post-content blockquote {
    margin: 48px 0;
    padding: 32px 40px;
    background: #F8FAFC;
    border-left: 4px solid var(--color-primary);
    border-radius: 0 20px 20px 0;
    font-style: italic;
    font-size: 1.25rem;
    color: var(--color-gray-700);
}

/* Code Blocks Styling */
.post-content pre {
    background: #0F172A;
    color: #F8FAFC;
    padding: 32px;
    border-radius: 16px;
    overflow-x: auto;
    margin: 40px 0;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.post-content code {
    background: #F1F5F9;
    color: var(--color-primary);
    padding: 3px 6px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
}

.post-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.post-content img {
    border-radius: 24px;
    margin: 48px 0;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
}

/* --- POST FOOTER --- */
.post-footer {
    max-width: 760px;
    margin: 80px auto 0;
    padding-top: 48px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 48px;
}

.post-tag {
    padding: 8px 16px;
    background: #F1F5F9;
    color: #64748B;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-tag:hover {
    background: var(--color-primary);
    color: #FFFFFF;
}

/* --- MORE ARTICLES --- */
.post-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-top: 60px;
}

.post-nav__link {
    padding: 32px;
    background: #F8FAFC;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-nav__link:hover {
    background: #FFFFFF;
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
}

.post-nav__label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.post-nav__title {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--color-gray-900);
    line-height: 1.4;
}

/* --- AUTHOR BIO --- */
.author-bio {
    margin-top: 80px;
    padding: 48px;
    background: #F8FAFC;
    border-radius: 32px;
    display: flex;
    gap: 32px;
    align-items: center;
}

.author-bio__avatar {
    width: 80px;
    height: 80px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    flex-shrink: 0;
}

.author-bio__name {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-gray-900);
    margin-bottom: 8px;
}

.author-bio__desc {
    font-size: 14px;
    color: #64748B;
    line-height: 1.6;
}


/* --- BREADCRUMBS --- */
.breadcrumbs {
    position: relative;
    z-index: 10;
    background: #FFFFFF;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    padding: 16px 0;
    margin-top: 80px;
    /* Offset for fixed header */
}

@media (min-width: 992px) {
    .breadcrumbs {
        margin-top: 100px;
        /* Precise header offset */
    }
}

.breadcrumbs__list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 13px;
    font-weight: 500;
    color: #64748B;
}

.breadcrumbs__item {
    display: flex;
    align-items: center;
}

.breadcrumbs__link {
    color: #64748B;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.breadcrumbs__separator {
    margin: 0 10px;
    opacity: 0.4;
    font-size: 10px;
}

.breadcrumbs__item--active {
    color: var(--color-gray-900);
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .breadcrumbs {
        padding: 8px 0;
        margin-top: 60px;
        /* Reduced mobile header offset */
    }

    .breadcrumbs__item--active {
        display: none;
    }

    .post-hero {
        padding: 40px 0 60px;
        /* Reduced hero padding */
    }

    .post-hero__badge {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .author-bio {
        flex-direction: column;
        text-align: center;
    }

    .post-nav {
        grid-template-columns: 1fr;
    }

    .post-hero__title {
        font-size: 2rem !important;
    }

    .post-main {
        padding: 24px 0 60px;
    }
}