/* Pelican Tech blog post + index styling.
 * Loaded only on /blog/* pages — keeps the homepage CSS budget clean. */

/* Tag pill — used on post header and on the index card. */
.blog-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    color: #c8d0dd;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    letter-spacing: 0.02em;
    transition: border-color 200ms ease, color 200ms ease;
}

.blog-tag:hover {
    border-color: rgba(239, 153, 15, 0.5);
    color: #fff;
}

/* Long-form prose container. We don't pull Tailwind's typography plugin in
 * just for the blog — the rules below cover what we need with no extra
 * dependency. */
.blog-prose {
    font-size: 1.075rem;
    line-height: 1.78;
    color: #cdd4e0;
    max-width: 70ch;
    margin: 0 auto;
}

.blog-prose > *:first-child {
    margin-top: 0;
}

.blog-prose p {
    margin: 0 0 1.4em 0;
    color: #cdd4e0;
}

.blog-prose strong {
    color: #f4f5f8;
    font-weight: 600;
}

.blog-prose em {
    color: #d8dde7;
    font-style: italic;
}

.blog-prose h2 {
    margin: 2.2em 0 0.8em;
    font-size: 1.7rem;
    line-height: 1.2;
    color: #ffffff;
    letter-spacing: -0.015em;
    font-weight: 700;
}

.blog-prose h3 {
    margin: 1.8em 0 0.6em;
    font-size: 1.3rem;
    line-height: 1.25;
    color: #fff;
    font-weight: 600;
}

.blog-prose h2 + h3 {
    margin-top: 1.2em;
}

.blog-prose ul,
.blog-prose ol {
    margin: 0 0 1.4em 0;
    padding-inline-start: 1.4em;
    color: #cdd4e0;
}

.blog-prose li {
    margin-bottom: 0.55em;
    padding-inline-start: 0.25em;
}

.blog-prose li::marker {
    color: #EF990F;
}

.blog-prose a {
    color: #EF990F;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(239, 153, 15, 0.4);
    transition: text-decoration-color 200ms ease, color 200ms ease;
}

.blog-prose a:hover {
    color: #ffb945;
    text-decoration-color: #EF990F;
}

.blog-prose blockquote {
    margin: 1.4em 0;
    padding: 0.6em 1.4em;
    border-inline-start: 3px solid rgba(239, 153, 15, 0.6);
    color: #d4dae4;
    font-style: italic;
}

.blog-prose code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.92em;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 1px 6px;
    color: #f0f3f9;
    /* Code spans always read LTR even inside RTL paragraphs. */
    direction: ltr;
    unicode-bidi: isolate;
}

.blog-prose pre {
    margin: 1.4em 0;
    padding: 1em 1.2em;
    background: #0b0e14;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow-x: auto;
    direction: ltr;
    unicode-bidi: isolate;
}

.blog-prose pre code {
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 0.88em;
    line-height: 1.6;
}

.blog-prose hr {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(239, 153, 15, 0.25), transparent);
    margin: 2.4em 0;
}

.blog-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.9rem;
    margin: 1.6em auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.blog-prose-rtl {
    text-align: right;
}

/* Mixed Hebrew + Latin + punctuation in titles (e.g., "NIS2 ב-2026: Playbook…")
 * triggers Unicode bidi-resolver edge cases where a colon ends up adjacent
 * to the wrong run. Telling the H1 to be `bidi-isolate` keeps each Latin
 * island intact and stops neutrals from drifting into the surrounding
 * Hebrew direction. The breadcrumb gets the same treatment because it
 * embeds the post title verbatim. */
html[dir="rtl"] article h1,
html[dir="rtl"] nav[aria-label="Breadcrumb"] {
    unicode-bidi: isolate;
}

/* Index page: card grid */
.blog-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(17, 20, 31, 0.92) 0%, rgba(11, 14, 21, 0.92) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: transform 280ms ease, border-color 280ms ease, box-shadow 280ms ease;
    box-shadow: 0 20px 40px -28px rgba(0, 0, 0, 0.85);
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(239, 153, 15, 0.45);
    box-shadow: 0 28px 50px -32px rgba(0, 0, 0, 0.92), 0 14px 28px -22px rgba(239, 153, 15, 0.35);
}

.blog-card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0b0e14;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 600ms ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.04);
}

.blog-card-body {
    padding: 1.4rem 1.4rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.blog-card-meta {
    color: #8b94a5;
    font-size: 0.78rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: center;
}

.blog-card h2,
.blog-card h3 {
    font-size: 1.18rem;
    line-height: 1.32;
    color: #fff;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

.blog-card p {
    color: #b3bbc8;
    font-size: 0.94rem;
    line-height: 1.55;
    margin: 0;
    flex: 1;
}

.blog-card a.blog-card-link {
    color: inherit;
    text-decoration: none;
    display: contents;
}
