/* Bastion landing theme — palette matches marketing/onepager (bastion repo). */
:root {
    --bastion-bg: #0f172a;
    --bastion-bg-deep: #0b1220;
    --bastion-panel: #111c30;
    --bastion-line: #1f2c44;
    --bastion-text: #e7edf5;
    --bastion-muted: #aab8c9;
    --bastion-faint: #6b7c93;
    --bastion-cyan: #38bdf8;
    --bastion-indigo: #6366f1;
    --bastion-green: #86efac;
    --bastion-amber: #fbbf24;
}

.body-bastion {
    background: linear-gradient(180deg, var(--bastion-bg-deep) 0%, var(--bastion-bg) 35%, var(--bastion-bg) 100%);
    background-attachment: fixed;
}

.bastion-landing {
    color: var(--bastion-text);
    font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.25rem 3rem;
}

.bastion-landing section { padding: 2.5rem 0; }

.bastion-landing h1,
.bastion-landing h2,
.bastion-landing h3 { color: var(--bastion-text); }

.bastion-hero { text-align: center; padding-top: 3.5rem; }

.bastion-hero h1 {
    font-size: clamp(1.8rem, 4.5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.bastion-hero h1 .accent { color: var(--bastion-cyan); }

.bastion-subhead {
    color: var(--bastion-muted);
    font-size: clamp(1rem, 2vw, 1.25rem);
    max-width: 46rem;
    margin: 0 auto 1.75rem;
}

.bastion-cta-row {
    display: flex;
    gap: 0.9rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.bastion-btn-primary,
.bastion-btn-secondary {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.bastion-btn-primary {
    background: linear-gradient(135deg, var(--bastion-cyan), var(--bastion-indigo));
    color: #06101f;
}

.bastion-btn-secondary {
    border: 1px solid var(--bastion-line);
    background: var(--bastion-panel);
    color: var(--bastion-text);
}

.bastion-btn-primary:hover,
.bastion-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.25);
    color: #06101f;
}

.bastion-btn-secondary:hover { color: var(--bastion-text); }

.bastion-microcopy { color: var(--bastion-faint); font-size: 0.85rem; }

.bastion-trust-strip {
    border-top: 1px solid var(--bastion-line);
    border-bottom: 1px solid var(--bastion-line);
    color: var(--bastion-muted);
    text-align: center;
    padding: 0.9rem 0;
    margin-top: 2.5rem;
    font-size: 0.95rem;
}

.bastion-trust-strip strong { color: var(--bastion-cyan); }

.bastion-video {
    width: 100%;
    max-width: 860px;
    display: block;
    margin: 0 auto;
    border-radius: 12px;
    border: 1px solid var(--bastion-line);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}

.bastion-kicker {
    color: var(--bastion-cyan);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.bastion-section-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.bastion-lead { color: var(--bastion-muted); max-width: 48rem; }

.bastion-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.bastion-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.bastion-card {
    background: var(--bastion-panel);
    border: 1px solid var(--bastion-line);
    border-radius: 12px;
    padding: 1.25rem;
}

.bastion-card .step-number {
    color: var(--bastion-cyan);
    font-size: 1.4rem;
    font-weight: 800;
}

.bastion-card h3 { font-size: 1.05rem; font-weight: 700; margin: 0.35rem 0; }

.bastion-card p { color: var(--bastion-muted); font-size: 0.95rem; }

.bastion-code-panel {
    background: var(--bastion-bg-deep);
    border: 1px solid var(--bastion-line);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    overflow-x: auto;
}

.bastion-code-panel .panel-label {
    color: var(--bastion-cyan);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.6rem;
}

.bastion-code-panel pre {
    background: transparent;
    color: #c8d3e0;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.55;
    white-space: pre;
    word-wrap: normal;
}

.bastion-code-panel .tok-comment { color: #5b6c84; }
.bastion-code-panel .tok-key { color: #7dd3fc; }
.bastion-code-panel .tok-accent { color: var(--bastion-amber); }
.bastion-code-panel .tok-cmd { color: #34d399; }
.bastion-code-panel .tok-dim { color: #8b9bb0; }

.bastion-terminal {
    max-width: 560px;
    margin: 2rem auto 0;
    text-align: left;
    min-height: 200px;
}

.terminal-dots { display: flex; gap: 6px; margin-bottom: 0.75rem; }

.terminal-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bastion-line);
}

.terminal-dots span:first-child { background: #f87171; }
.terminal-dots span:nth-child(2) { background: var(--bastion-amber); }
.terminal-dots span:nth-child(3) { background: var(--bastion-green); }

.terminal-cursor { color: var(--bastion-cyan); animation: cursorBlink 1.1s steps(1) infinite; }

.terminal-cursor.is-typing { animation: none; }

@keyframes cursorBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.bastion-feature-row { display: flex; gap: 0.75rem; align-items: flex-start; }

.bastion-feature-row .dot {
    width: 9px;
    height: 9px;
    min-width: 9px;
    border-radius: 50%;
    background: var(--bastion-cyan);
    margin-top: 0.45rem;
}

.bastion-feature-row h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.15rem; }

.bastion-feature-row p { color: var(--bastion-muted); font-size: 0.9rem; }

.bastion-shots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.bastion-shots figure { margin: 0; }

.bastion-shots img {
    border-radius: 10px;
    border: 1px solid var(--bastion-line);
    width: 100%;
}

.bastion-shots figcaption {
    color: var(--bastion-faint);
    font-size: 0.82rem;
    margin-top: 0.35rem;
    text-align: center;
}

.bastion-pricing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.bastion-price-card {
    background: var(--bastion-panel);
    border: 1px solid var(--bastion-line);
    border-radius: 12px;
    padding: 1.4rem 1.25rem;
    display: flex;
    flex-direction: column;
}

.bastion-price-card.is-featured { border-color: var(--bastion-indigo); box-shadow: 0 0 0 1px var(--bastion-indigo); }

.bastion-price-card .tier-name { font-size: 1.15rem; font-weight: 800; }

.bastion-price-card .tier-tag { color: var(--bastion-cyan); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

.bastion-price-card ul { color: var(--bastion-muted); font-size: 0.9rem; margin: 0.8rem 0 1.2rem; padding-left: 0; list-style: none; flex-grow: 1; }

.bastion-price-card li { margin-bottom: 0.35rem; }

.bastion-price-card li::before { content: "✓ "; color: var(--bastion-green); }

.bastion-price-card li.is-missing::before { content: "— "; color: var(--bastion-faint); }

.bastion-faq details {
    border: 1px solid var(--bastion-line);
    border-radius: 10px;
    background: var(--bastion-panel);
    padding: 0.9rem 1.1rem;
    margin-bottom: 0.6rem;
}

.bastion-faq summary { color: var(--bastion-text); font-weight: 700; cursor: pointer; }

.bastion-faq p { color: var(--bastion-muted); margin-top: 0.6rem; }

.bastion-final-cta {
    text-align: center;
    border: 1px solid var(--bastion-line);
    border-radius: 16px;
    background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.18), transparent 65%), var(--bastion-panel);
    padding: 3rem 1.5rem;
}

.bastion-footnote { color: var(--bastion-faint); font-size: 0.82rem; margin-top: 0.75rem; }

/* App-shell chrome under the dark theme. Bulma paints navbar/hero/container
   white by default, which covers the dark body and makes the white nav links
   and light hero text invisible — keep these surfaces transparent. */
.body-bastion .navbar,
.body-bastion .navbar-menu,
.body-bastion .navbar-start,
.body-bastion .navbar-item,
.body-bastion .hero,
.body-bastion .hero-body,
.body-bastion .container { background-color: transparent; }
.body-bastion .navbar { box-shadow: none; }
.body-bastion .navbar-item p { font-weight: 600; }
.body-bastion .navbar-item:hover p { color: var(--bastion-cyan) !important; }

/* Burger icon lines — visible on the dark navbar. */
.body-bastion .navbar-burger { color: var(--bastion-text); }
.body-bastion .navbar-burger span { background-color: var(--bastion-text); }

/* Active / hovered / focused nav items: Bulma paints these a light grey
   (and :hover sticks on touch screens, so the tapped item flashes white).
   Force them transparent and keep the label readable. */
.body-bastion .navbar-item,
.body-bastion .navbar-item.is-active,
.body-bastion .navbar-item:hover,
.body-bastion .navbar-item:focus,
.body-bastion .navbar-item:focus-within,
.body-bastion a.navbar-item.is-active,
.body-bastion a.navbar-item:hover {
    background-color: transparent !important;
}
.body-bastion .navbar-item p,
.body-bastion .navbar-item.is-active p { color: var(--bastion-text); }

/* Mobile burger dropdown: solid dark panel so the white links stay readable. */
@media screen and (max-width: 1023px) {
    .body-bastion .navbar-menu,
    .body-bastion .navbar-menu.is-active {
        background-color: var(--bastion-panel) !important;
        box-shadow: none;
        border: 1px solid var(--bastion-line);
        border-radius: 10px;
        margin-top: 0.4rem;
        padding: 0.4rem;
    }
    /* Each row gets its own readable hit area on the dark panel. */
    .body-bastion .navbar-menu.is-active .navbar-item {
        border-radius: 8px;
    }
    .body-bastion .navbar-menu.is-active .navbar-item:hover {
        background-color: var(--bastion-bg-deep) !important;
    }
}

.body-bastion .footer { background: transparent; color: var(--bastion-muted); }
.body-bastion .footer a { color: var(--bastion-cyan); }
.body-bastion .footer .content { color: var(--bastion-muted); }

/* Tech / "Our stack" cards. */
.tech-card { display: block; text-decoration: none; transition: transform 0.12s ease, border-color 0.12s ease; }
.tech-card:hover { transform: translateY(-2px); border-color: var(--bastion-cyan); }
.tech-card-top { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.45rem; }
.tech-icon { font-size: 1.4rem; color: var(--bastion-cyan); width: 1.7rem; text-align: center; }
.tech-name { color: var(--bastion-text); font-weight: 700; font-size: 1.05rem; flex: 1; }
.tech-ext { color: var(--bastion-faint); font-size: 0.78rem; }
.tech-card:hover .tech-ext { color: var(--bastion-cyan); }
.tech-card p { color: var(--bastion-muted); font-size: 0.9rem; margin: 0; }

/* Newsletter embeds (projects page) — keep them inside the viewport on phones. */
.newsletter-embed { max-width: 540px; width: 100%; }

/* ============================================================================
   Dark-theme overrides for the Bulma-based pages (Projects, Labs, CV, and the
   prose components nested inside their cards). These pages render default Bulma
   chrome — white cards, dark titles, light-grey tags — which is invisible on
   the dark body. Re-skin those shared classes once here instead of rewriting
   every nested article component.
   ========================================================================== */

/* Page headings + lead text ("Projects", "sorted desc by date", prose). */
.body-bastion .title { color: var(--bastion-text); }
.body-bastion .subtitle { color: var(--bastion-muted); }
.body-bastion .section > .block { color: var(--bastion-muted); }
.body-bastion .content { color: var(--bastion-muted); }
.body-bastion .content h1,
.body-bastion .content h2,
.body-bastion .content h3,
.body-bastion .content h4,
.body-bastion .content h5,
.body-bastion .content strong { color: var(--bastion-text); }
.body-bastion .content a { color: var(--bastion-cyan); }
.body-bastion .content blockquote { border-left-color: var(--bastion-cyan); background: var(--bastion-bg-deep); color: var(--bastion-muted); }
.body-bastion time { color: var(--bastion-faint); }

/* Cards → dark panels with a soft lift. */
.body-bastion .card,
.body-bastion .box {
    background: var(--bastion-panel);
    border: 1px solid var(--bastion-line);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    color: var(--bastion-text);
}
.body-bastion .card { overflow: hidden; }
.body-bastion .card .card-header { box-shadow: none; border-bottom: 1px solid var(--bastion-line); }
.body-bastion .card .card-header-title { color: var(--bastion-text); }
.body-bastion .card .card-content { color: var(--bastion-muted); }
.body-bastion .card .card-footer { border-top: 1px solid var(--bastion-line); }
.body-bastion .card .card-footer-item { color: var(--bastion-muted); border-color: var(--bastion-line); }
.body-bastion .card .title { color: var(--bastion-text); }
.body-bastion .card .subtitle { color: var(--bastion-muted); }
/* Card image strip: the icons8 PNGs are transparent — drop the white plate. */
.body-bastion .card .card-image { background: transparent; padding: 1.25rem 1.25rem 0; }
.body-bastion .card .card-image img { width: auto; max-height: 72px; }

/* Tags → dark chips with a cyan label. */
.body-bastion .tag:not(.is-link):not(.is-primary) {
    background: var(--bastion-bg-deep);
    color: var(--bastion-cyan);
    border: 1px solid var(--bastion-line);
    font-weight: 600;
}

/* Pagination → dark controls; current page gets the brand gradient. */
.body-bastion .pagination-link,
.body-bastion .pagination-previous,
.body-bastion .pagination-next {
    background: var(--bastion-panel);
    border-color: var(--bastion-line);
    color: var(--bastion-text);
}
.body-bastion .pagination-link.is-current {
    background: linear-gradient(135deg, var(--bastion-cyan), var(--bastion-indigo));
    border-color: transparent;
    color: #06101f;
    font-weight: 700;
}
.body-bastion .pagination-link:hover,
.body-bastion .pagination-previous:hover,
.body-bastion .pagination-next:hover { border-color: var(--bastion-cyan); color: var(--bastion-text); }
.body-bastion .pagination-link[disabled],
.body-bastion .pagination-previous[disabled],
.body-bastion .pagination-next[disabled] { background: transparent; color: var(--bastion-faint); opacity: 0.5; }

/* Bulma tabs (Subscribe / Unsubscribe inside the Bastion card). */
.body-bastion .tabs:not(:last-child) { margin-bottom: 1rem; }
.body-bastion .tabs ul { border-bottom-color: var(--bastion-line); }
.body-bastion .tabs a { color: var(--bastion-muted); border-bottom-color: var(--bastion-line); }
.body-bastion .tabs li.is-active a { color: var(--bastion-cyan); border-bottom-color: var(--bastion-cyan); }

/* Code blocks inside lab/article prose (Bulma paints pre/code light grey). */
.body-bastion .content pre,
.body-bastion pre {
    background: var(--bastion-bg-deep);
    border: 1px solid var(--bastion-line);
    border-radius: 10px;
    color: #c8d3e0;
}
.body-bastion .content pre code,
.body-bastion pre code { background: transparent; color: inherit; }
.body-bastion .content code,
.body-bastion code {
    background: var(--bastion-bg-deep);
    color: var(--bastion-cyan);
    border: 1px solid var(--bastion-line);
    border-radius: 5px;
}

/* Generic Bulma buttons on dark pages (e.g. the code "copy" button). The
   brand CTAs use .bastion-btn-* and are unaffected. */
.body-bastion .button:not(.is-link):not(.is-primary):not(.is-success) {
    background: var(--bastion-panel);
    border-color: var(--bastion-line);
    color: var(--bastion-text);
}
.body-bastion .button:not(.is-link):not(.is-primary):not(.is-success):hover {
    border-color: var(--bastion-cyan);
    color: var(--bastion-cyan);
}

/* ---- CV (/stas) page: skills/languages/hobbies lists in the sidebar ---- */
.body-bastion .list-item-title { color: var(--bastion-text); }
.body-bastion .list { color: var(--bastion-muted); }
.body-bastion .list-item:not(:last-child) { border-bottom: 1px solid var(--bastion-line); }
.body-bastion #skills .title,
.body-bastion #languages .title,
.body-bastion #hobbies .title { color: var(--bastion-text); }
/* Keep the contact card's media block from squeezing text into 1-char wraps. */
.body-bastion .card .media-content { overflow: visible; }

/* ---- Book page ---- */
.book-hero { display: grid; grid-template-columns: minmax(0, 240px) 1fr; gap: 2rem; align-items: center; margin-bottom: 2.5rem; }
.book-hero .book-cover { margin: 0; }
.book-hero .book-cover img { width: 100%; border-radius: 10px; border: 1px solid var(--bastion-line); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5); display: block; }
.book-buy { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 1.25rem; max-width: 22rem; }
.book-narrative { max-width: 46rem; }
.book-narrative p { color: var(--bastion-muted); margin-bottom: 0.85rem; line-height: 1.7; }
.book-narrative strong { color: var(--bastion-text); }
.book-narrative em { color: var(--bastion-text); }
.book-byline { color: var(--bastion-faint); font-size: 0.85rem; }
@media screen and (max-width: 720px) {
    .book-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .book-hero .book-cover { max-width: 220px; }
    .book-buy { margin-left: auto; margin-right: auto; }
}
