/* ═══════════════════════════════════════════════════════
   POST.CSS — Individual Blog Post Page Styles
   Biotech AI AG · Editorial Precision Theme
   ═══════════════════════════════════════════════════════ */

/* ─── BREADCRUMB ─── */
.post-breadcrumb {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.post-breadcrumb a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: color 0.2s;
}

.post-breadcrumb a:hover {
    color: var(--white);
}

.post-breadcrumb-separator {
    color: rgba(255,255,255,0.5);
    margin: 0 12px;
    font-size: 9px;
}

.post-breadcrumb-current {
    color: var(--cyan);
}

/* ─── POST META (within page-hero) ─── */
.post-meta {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.post-category-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    color: var(--cyan);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: rgba(79,209,197,0.08);
    border: 1px solid rgba(79,209,197,0.2);
    padding: 6px 14px;
    line-height: 1;
}

.post-meta-separator {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    margin: 0 16px;
    flex-shrink: 0;
}

.post-date,
.post-reading-time {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 300;
    color: rgba(255,255,255,0.8);
    letter-spacing: 0.04em;
}

/* Extended hero headline for posts — slightly narrower */
.page-hero .post-headline {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(32px, 4.5vw, 56px);
    font-weight: 400;
    color: var(--white);
    line-height: 1.12;
    letter-spacing: -0.02em;
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.page-hero .post-subtitle {
    font-size: 18px;
    font-weight: 300;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    max-width: 720px;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

/* ─── POST HERO IMAGE ─── */
.post-hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

/* ─── AUTHOR / SHARE ROW ─── */
.post-author-row {
    background: var(--light-bg);
    border-bottom: 1px solid var(--border);
}

.post-author-row .section-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    padding-bottom: 20px;
}

.post-author-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.post-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.post-author-avatar span {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.05em;
}

.post-author-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--navy);
}

.post-author-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: var(--grey);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.post-share {
    display: flex;
    align-items: center;
    gap: 16px;
}

.post-share-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: var(--grey);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.post-share-link {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grey);
    text-decoration: none;
    font-size: 13px;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.post-share-link:hover {
    border-color: var(--teal);
    color: var(--teal);
    background: rgba(31,163,163,0.04);
}

/* ─── ARTICLE BODY ─── */
.post-article {
    padding: 40px 0 100px;
    background: var(--white);
}

.post-content {
    max-width: 990px;
    margin: 0 auto;
    padding: 0 48px;
}

/* ── Typography System ── */
.post-content p {
    font-size: 17px;
    font-weight: 300;
    color: #4B5563;
    line-height: 1.9;
    margin-bottom: 24px;
}

.post-content h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 28px;
    font-weight: 400;
    color: var(--navy);
    line-height: 1.25;
    margin-top: 64px;
    margin-bottom: 20px;
    padding-top: 8px;
    position: relative;
}

.post-content h2::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--teal);
    opacity: 0.4;
}

.post-content h2:first-child {
    margin-top: 0;
}

.post-content h2:first-child::before {
    display: none;
}

.post-content h3 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.35;
    margin-top: 44px;
    margin-bottom: 16px;
}

.post-content h4 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    color: var(--teal);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 36px;
    margin-bottom: 14px;
}

/* ── Links ── */
.post-content a {
    color: var(--teal);
    text-decoration: none;
    border-bottom: 1px solid rgba(31,163,163,0.25);
    transition: border-color 0.2s, color 0.2s;
}

.post-content a:hover {
    color: var(--navy);
    border-bottom-color: var(--navy);
}

/* ── Bold / Strong ── */
.post-content strong {
    font-weight: 500;
    color: var(--navy);
}

/* ── Lists ── */
.post-content ul,
.post-content ol {
    margin-bottom: 28px;
    padding-left: 0;
    list-style: none;
}

.post-content ul li,
.post-content ol li {
    font-size: 17px;
    font-weight: 300;
    color: #4B5563;
    line-height: 1.8;
    padding-left: 28px;
    position: relative;
    margin-bottom: 10px;
}

.post-content ul li::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 12px;
    width: 6px;
    height: 6px;
    border: 1.5px solid var(--teal);
    border-radius: 1px;
    transform: rotate(45deg);
}

.post-content ol {
    counter-reset: post-ol;
}

.post-content ol li {
    counter-increment: post-ol;
}

.post-content ol li::before {
    content: counter(post-ol);
    position: absolute;
    left: 2px;
    top: 0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    color: var(--teal);
    line-height: 1.8;
}

/* ── Blockquotes ── */
.post-content blockquote {
    margin: 40px 0;
    padding: 0 0 0 28px;
    border-left: 3px solid var(--teal);
    position: relative;
}

.post-content blockquote p {
    font-size: 18px;
    font-weight: 300;
    font-style: italic;
    color: var(--navy);
    line-height: 1.8;
    margin-bottom: 0;
}

.post-content blockquote p + p {
    margin-top: 16px;
}

.post-content blockquote cite {
    display: block;
    margin-top: 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-style: normal;
    color: var(--grey);
    letter-spacing: 0.06em;
}

/* ── Code ── */
.post-content code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    background: var(--light-bg);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 2px;
    color: var(--navy);
}

.post-content pre {
    margin: 32px 0;
    background: #0D1B2E;
    border: 1px solid rgba(79,209,197,0.12);
    padding: 28px 32px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.post-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    line-height: 1.7;
}

/* ── Horizontal Rule ── */
.post-content hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 56px 0;
}

/* ── Images ── */
.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 40px 0;
    border: 1px solid var(--border);
}

.post-content figcaption {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--grey);
    letter-spacing: 0.04em;
    margin-top: -28px;
    margin-bottom: 32px;
    padding-top: 12px;
}

/* ─── CALLOUT BOX ─── */
.post-callout {
    background: var(--light-bg);
    border-left: 3px solid var(--teal);
    padding: 28px 32px;
    margin: 40px 0;
    position: relative;
}

.post-callout::before {
    content: 'Key Takeaway';
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    color: var(--teal);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.post-callout p {
    font-size: 15px;
    font-weight: 400;
    color: var(--navy);
    line-height: 1.75;
    margin-bottom: 0;
}

.post-callout p + p {
    margin-top: 12px;
}

/* ─── TABLES ─── */
.post-table-wrap {
    margin: 36px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 560px;
}

.post-content thead {
    background: var(--navy);
}

.post-content thead th {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: left;
    padding: 14px 20px;
    border-bottom: 2px solid rgba(79,209,197,0.3);
    white-space: nowrap;
}

.post-content tbody td {
    padding: 14px 20px;
    color: #4B5563;
    font-weight: 300;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.6;
}

.post-content tbody tr:last-child td {
    border-bottom: none;
}

.post-content tbody tr:hover {
    background: rgba(245,247,250,0.6);
}

.post-content tbody td:first-child {
    font-weight: 500;
    color: var(--navy);
}

/* ─── REFERENCES ─── */
.post-references {
    margin-top: 64px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.post-references h2 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    color: var(--teal);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 24px;
    margin-top: 0;
}

.post-references h2::before {
    display: none;
}

.post-references ol {
    counter-reset: ref-ol;
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.post-references ol li {
    counter-increment: ref-ol;
    font-size: 14px;
    font-weight: 300;
    color: var(--grey);
    line-height: 1.6;
    padding-left: 28px;
    position: relative;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(229,231,235,0.5);
}

.post-references ol li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.post-references ol li::before {
    content: counter(ref-ol);
    position: absolute;
    left: 0;
    top: 0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    color: var(--teal);
    opacity: 0.6;
}

.post-references a {
    color: var(--teal);
    text-decoration: none;
    border-bottom: 1px solid rgba(31,163,163,0.2);
    transition: color 0.2s, border-color 0.2s;
    font-weight: 400;
}

.post-references a:hover {
    color: var(--navy);
    border-bottom-color: var(--navy);
}

.post-references .ref-annotation {
    display: block;
    font-size: 13px;
    color: var(--grey);
    margin-top: 4px;
    font-weight: 300;
}

/* ─── BACK TO BLOG ─── */
.post-back {
    max-width: 990px;
    margin: 0 auto;
    padding: 48px 48px 0;
}

.post-back a {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 400;
    color: var(--teal);
    text-decoration: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: color 0.2s, gap 0.25s;
}

.post-back a:hover {
    color: var(--navy);
    gap: 14px;
}

.post-back-arrow {
    font-size: 16px;
    transition: transform 0.25s;
}

.post-back a:hover .post-back-arrow {
    transform: translateX(-4px);
}

/* ─── RELATED POSTS ─── */
.related-posts {
    padding: 100px 0;
    background: var(--light-bg);
    border-top: 1px solid var(--border);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 40px;
}

.related-card {
    background: var(--white);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    text-decoration: none;
    display: block;
    color: inherit;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(11,31,58,0.07);
}

.related-card-thumb {
    height: 140px;
    background: var(--light-bg);
    position: relative;
    overflow: hidden;
}

.related-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.related-card:hover .related-card-thumb img {
    transform: scale(1.04);
}

.related-card-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(11,31,58,0.04), rgba(31,163,163,0.04));
    pointer-events: none;
}

.related-card-body {
    padding: 22px 24px 26px;
}

.related-card-category {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 400;
    color: var(--teal);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.related-card-title {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.4;
    margin-bottom: 10px;
}

.related-card-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    color: var(--grey);
}

/* ─── PROGRESS BAR (reading progress) ─── */
.post-progress {
    position: fixed;
    top: 72px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--cyan);
    z-index: 99;
    transition: width 0.1s linear;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 860px) {
    .post-content {
        padding: 0 24px;
    }

    .post-back {
        padding: 36px 24px 0;
    }

    .post-content h2 {
        font-size: 24px;
        margin-top: 48px;
    }

    .post-content h3 {
        font-size: 18px;
    }

    .post-content p,
    .post-content ul li,
    .post-content ol li {
        font-size: 16px;
        line-height: 1.85;
    }

    .post-content blockquote p {
        font-size: 16px;
    }

    .page-hero .post-headline {
        font-size: clamp(28px, 6vw, 40px);
    }

    .post-hero-image {
        height: 240px;
    }

    .post-meta {
        flex-wrap: wrap;
        gap: 8px;
    }

    .post-meta-separator {
        display: none;
    }

    .post-author-row .section-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .post-callout {
        padding: 24px;
    }

    .post-content pre {
        padding: 20px;
        margin-left: -24px;
        margin-right: -24px;
        border-left: none;
        border-right: none;
    }

    .post-table-wrap {
        margin-left: -24px;
        margin-right: -24px;
        border-left: none;
        border-right: none;
    }
}

@media (max-width: 480px) {
    .post-content h2 {
        font-size: 22px;
    }

    .post-content p,
    .post-content ul li,
    .post-content ol li {
        font-size: 15px;
    }
}
