/* ============ Blog Article ============ */
.blog-article {
    background: var(--color-bg);
}

/* The header used to be a "band": #050505 on the body's #000000, closed by a
   1px rule at 5% white. Neither was perceptible, so the only thing that read
   was the padding stacking either side of an invisible edge. One continuous
   surface instead, with a short cyan rule doing the separating - a mark you
   can actually see earns the space around it. */
.blog-article-header {
    padding: 2.75rem 0 0;
}

.blog-article-header-inner {
    width: 92%;
    max-width: 800px;
    margin: 0 auto;
}

.blog-back-link {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 1.75rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.blog-back-link:hover {
    opacity: 1;
    color: var(--color-cyan);
    text-decoration: none;
}

/* Own line, as an eyebrow above the title, rather than trailing the back link
   on the same line where the two read as one muddled string. */
.blog-article-header .news-tag {
    display: block;
    margin-bottom: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.blog-article-header h1 {
    font-size: clamp(1.9rem, 1.45rem + 1.9vw, 2.5rem);
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: -0.02em;
    text-wrap: balance;
    margin-bottom: 0.85rem;
}

.blog-article-meta {
    display: flex;
    gap: 0.7rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    align-items: center;
}

.blog-article-meta span:last-child {
    color: var(--color-cyan);
}

.blog-meta-sep {
    color: var(--color-text-muted);
    opacity: 0.45;
}

.blog-article-header-inner::after {
    content: "";
    display: block;
    width: 2.75rem;
    height: 2px;
    margin-top: 1.5rem;
    background: var(--color-cyan);
    border-radius: 2px;
}

.blog-article-body {
    width: 92%;
    max-width: 800px;
    margin: 0 auto;
    /* Matches the 1.5rem above the accent rule, so it sits centred in its own
       space rather than being pushed around by two unequal paddings. */
    padding: 1.5rem 0 5rem;
}

/* Headings carry a top margin to separate sections; at the very start of the
   article that margin just stacks onto the header's padding. Posts opening
   with a heading were getting 2.5rem more dead space than posts opening with a
   paragraph or image. */
.blog-article-body > *:first-child {
    margin-top: 0;
}

.blog-article-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-cyan);
}

.blog-article-body h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.blog-article-body h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.blog-article-body p {
    color: var(--color-text-body);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.blog-article-body a {
    color: var(--color-cyan);
    text-decoration: underline;
    word-break: break-word;
}

.blog-article-body a:hover {
    text-decoration: none;
}

.blog-article-body ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.blog-article-body ul li {
    color: var(--color-text-body);
    font-size: 0.92rem;
    line-height: 1.7;
    padding-left: 1.25rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.blog-article-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    background: var(--color-cyan);
    border-radius: 50%;
}

.blog-figure {
    margin: 2rem auto;
    text-align: center;
}

/* Per-image size presets (see `size` in the article image blocks). A `width`
   value on the block sets max-width inline and overrides these. Full = default
   (whole column), so it needs no class. */
.blog-figure-small {
    max-width: 320px;
}

.blog-figure-medium {
    max-width: 480px;
}

.blog-figure-large {
    max-width: 640px;
}

.blog-figure img {
    max-width: 100%;
    max-height: 70vh;
    height: auto;
    width: auto;
    display: inline-block;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

/* Left-align the code itself, not the whole figure: putting text-align on
   .blog-code overrode .blog-figure's centring for the <figcaption> too, so
   code captions sat left while image captions sat centred. */
.blog-code-pre {
    text-align: left;
}

.blog-code-pre {
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin: 0;
    overflow-x: auto;
    max-width: 100%;
}

.blog-code-pre code {
    font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.55;
    color: #e6edf3;
    white-space: pre;
    tab-size: 4;
}

.blog-figure figcaption {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-top: 0.75rem;
    font-style: italic;
    line-height: 1.5;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.blog-video video {
    max-width: 100%;
    max-height: 70vh;
    height: auto;
    width: auto;
    display: inline-block;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--color-bg);
}

/* What's New page styles */
.news-section {
    background: var(--color-bg);
    padding: 5rem 0;
}

.news-layout {
    width: 92%;
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 3rem;
    align-items: start;
}

.news-heading {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
}

.news-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.news-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
}

.news-card-link:hover {
    opacity: 1;
}

.news-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    border-color: var(--color-cyan);
    box-shadow: 0 0 20px rgba(0, 168, 232, 0.1);
}

.news-card-thumb {
    width: 100%;
    height: 0;
    padding-bottom: 50%;
    position: relative;
    overflow: hidden;
    background: #0a0a0a;
    flex-shrink: 0;
}

.news-card-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.news-card:hover .news-card-thumb img {
    transform: scale(1.05);
}

.news-card-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-tag {
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: var(--color-cyan);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.news-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.news-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.78rem;
    color: var(--color-cyan);
    margin-bottom: 1rem;
    align-items: center;
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.news-excerpt {
    font-size: 0.88rem;
    color: var(--color-text-muted, #aaa);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-cyan);
    color: #000;
    transition: background 0.3s;
    flex-shrink: 0;
    align-self: flex-start;
}

.news-arrow:hover {
    background: #0090c5;
    opacity: 1;
}

/* Sidebar */
.news-sidebar {
    position: sticky;
    top: 5rem;
}

.news-sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.news-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-category-list li {
    margin-bottom: 0.25rem;
}

.news-category-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-family: var(--font-main);
    font-size: 0.88rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.news-category-btn:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.05);
}

.news-category-btn.active {
    color: var(--color-cyan);
    background: rgba(0, 168, 232, 0.1);
    font-weight: 600;
}

/* Local review bar (only rendered when SHOW_UNREVIEWED is on) */
.review-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.review-bar-draft {
    background: rgba(217, 154, 0, 0.12);
    border: 1px solid #d99a00;
    color: #ffce55;
}

.review-bar-published {
    background: rgba(31, 157, 99, 0.12);
    border: 1px solid #1f9d63;
    color: #4ade80;
}

.review-publish-btn {
    flex-shrink: 0;
    background: var(--color-cyan);
    color: #0a0a0a;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.review-publish-btn:hover {
    opacity: 0.88;
}

/* ---------- Attached file (papers, datasheets) --------------------------- */

.blog-article-body a.blog-download,
.blog-download {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2.25rem 0;
    padding: 1rem 1.25rem;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.blog-article-body a.blog-download:hover,
.blog-article-body a.blog-download:focus-visible,
.blog-download:hover,
.blog-download:focus-visible {
    border-color: var(--color-cyan);
    background: rgba(0, 168, 232, 0.08);
    opacity: 1;
    text-decoration: none;
}

.blog-download-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    color: var(--color-cyan);
}

.blog-download-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.blog-download-label {
    text-decoration: none;
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
}

.blog-download-meta {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.blog-download-cta {
    flex: 0 0 auto;
    color: var(--color-cyan);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@media (max-width: 30rem) {
    .blog-download { flex-wrap: wrap; }
    .blog-download-cta { width: 100%; text-align: right; }
}

/* ---------- Author sign-off ---------------------------------------------- */
/* Scoped under .blog-article-body throughout: the body's generic `p` and `h2`
   rules are class+element (0,1,1) and would otherwise win over a bare class. */

.blog-article-body .blog-author {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    margin: 3.5rem 0 0;
    padding: 1.5rem 1.75rem;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
}

.blog-article-body .blog-author-text {
    flex: 1 1 auto;
    min-width: 0;
}

.blog-article-body .blog-author-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-cyan);
    line-height: 1.4;
}

.blog-article-body .blog-author-name {
    margin: 0 0 0.6rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.25;
}

.blog-article-body .blog-author-bio {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--color-text-muted);
    max-width: 52ch;
}

.blog-article-body .blog-author-photo {
    flex: 0 0 auto;
    width: 140px;
    aspect-ratio: 4 / 5;
    /* Derivatives are already cropped to 4:5; cover is the safety net for any
       photo added later without one. */
    object-fit: cover;
    object-position: 50% 12%;
    border-radius: 8px;
    display: block;
}

@media (max-width: 34rem) {
    /* Photo is last in the DOM, so column-reverse floats it above the text
       where it reads as a portrait rather than a footnote. */
    .blog-article-body .blog-author {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 1.15rem;
        padding: 1.35rem 1.4rem;
    }

    .blog-article-body .blog-author-photo { width: 112px; }
}

/* ---------- Pulled quotes ------------------------------------------------- */
/* Scoped under .blog-article-body: the generic `p` rule is class+element and
   would otherwise win over a bare class. */

.blog-article-body .blog-quote {
    margin: 2.25rem 0;
    padding: 0.1rem 0 0.1rem 1.5rem;
    border-left: 3px solid var(--color-cyan);
    position: relative;
}

.blog-article-body .blog-quote p {
    margin: 0;
    /* Brighter and a touch larger than body copy: the quote is the emphasis,
       so it should not be the same muted grey as the narrative around it. */
    color: var(--color-text);
    font-size: 1.05rem;
    line-height: 1.75;
}

/* A 400-character statement set large becomes a wall; step it back toward
   body size so long quotes stay readable. */
.blog-article-body .blog-quote-long p {
    font-size: 0.98rem;
    line-height: 1.8;
}

.blog-article-body .blog-quote cite {
    display: block;
    margin-top: 0.8rem;
    font-size: 0.82rem;
    font-style: normal;
    font-weight: 500;
    color: var(--color-text-muted);
    letter-spacing: 0.01em;
}

.blog-article-body .blog-quote cite::before {
    content: "";
    display: inline-block;
    width: 1.1rem;
    height: 1px;
    margin-right: 0.55rem;
    vertical-align: middle;
    background: var(--color-text-muted);
    opacity: 0.55;
}

@media (max-width: 34rem) {
    .blog-article-body .blog-quote {
        padding-left: 1.1rem;
        margin: 1.9rem 0;
    }
}

/* ---------- Press-release boilerplate ------------------------------------ */
/* Company descriptions, legal notices and media contacts. Appendix material:
   set apart, stepped down in size and colour, so it reads as reference rather
   than as the end of the story. Scoped under .blog-article-body so the generic
   h2 and p rules do not win on specificity. */

.blog-article-body .blog-boilerplate {
    margin: 3rem 0 0;
    padding: 1.5rem 1.75rem;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
}

.blog-article-body .blog-boilerplate-sec + .blog-boilerplate-sec {
    margin-top: 1.4rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--color-border);
}

.blog-article-body .blog-boilerplate-title {
    margin: 0 0 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-cyan);
    line-height: 1.4;
}

.blog-article-body .blog-boilerplate p {
    margin: 0 0 0.65rem;
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--color-text-muted);
}

.blog-article-body .blog-boilerplate p:last-child {
    margin-bottom: 0;
}

@media (max-width: 34rem) {
    .blog-article-body .blog-boilerplate { padding: 1.25rem 1.3rem; }
}

/* ---------- Display equations -------------------------------------------- */

.blog-equation {
    margin: 1.9rem 0;
    padding: 0.2rem 0;
    text-align: center;
    overflow-x: auto;          /* long expressions scroll, page never does */
    color: var(--color-text);
}

.blog-equation > span {
    display: inline-block;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 1.08rem;
    line-height: 1.9;
    white-space: nowrap;
}

.blog-equation var {
    font-style: italic;
}

.blog-equation sub,
.blog-equation sup {
    font-size: 0.7em;
    line-height: 0;
}

