/* ============================================================
   Sli Software — glassmorphism, professionalized.
   Frosted glass, refined with a blue/orange
   palette, IBM Plex type, and editorial accents.
   ============================================================ */
:root {
    --bg-top: #eaf1fb;
    --bg-btm: #ffffff;
    --ink: #0f172a;
    --muted: #4a5769;
    --brand: #0e51a3;      /* deep blue */
    --brand-2: #1c6fd0;    /* lighter blue */
    --accent: #e8842a;     /* orange */
    --accent-2: #d9761d;   /* orange hover */
    --success: #0e7a4b;
    --danger: #b91c1c;
    --line: rgba(255, 255, 255, .6);
    --hair: rgba(15, 23, 42, .10);
    --glass-bg: rgba(255, 255, 255, .55);
    --glass-brd: rgba(255, 255, 255, .72);
    --glass-shadow: 0 4px 14px rgba(15, 23, 42, .06);
    --glass-shadow-hover: 0 8px 22px rgba(15, 23, 42, .09);
    --radius: 8px;
    --radius-lg: 8px;
    --wrap: 1180px;
    --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }

body {
    margin: 0;
    background-color: var(--bg-btm);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ===== Base wash + soft blooms behind everything ===== */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(80% 60% at 50% -20%, #e3edfb 0%, rgba(227, 237, 251, 0) 60%),
        linear-gradient(180deg, var(--bg-top), var(--bg-btm));
    background-repeat: no-repeat;
    background-size: 140% 120%, 100% 100%;
    transform: translateZ(0);
}
@media (min-width: 768px) { body::before { background-attachment: fixed; } }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

/* ===== Layout ===== */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip:focus { position: fixed; inset: auto auto 16px 16px; padding: 8px 12px; background: #fff; border: 1px solid var(--hair); border-radius: 8px; z-index: 1000; }

/* ===== Glass ===== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid var(--glass-brd);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    transition: box-shadow .22s ease, transform .22s ease;
}
.card.glass:hover { box-shadow: var(--glass-shadow-hover); transform: translateY(-3px); }
.sheen { position: absolute; inset: 0; border-radius: inherit; opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.card.glass:hover .sheen { opacity: 1; }
.sheen::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit;
    background:
        radial-gradient(140px 80px at 12% -10%, rgba(255,255,255,.6), rgba(255,255,255,0)),
        radial-gradient(200px 100px at 100% 0%, rgba(255,255,255,.3), rgba(255,255,255,0));
}

/* ===== Typography ===== */
h1, h2, h3 { font-weight: 300; letter-spacing: -0.02em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(36px, 5.2vw, 58px); letter-spacing: -0.03em; }
h2 { font-size: clamp(27px, 3.6vw, 40px); letter-spacing: -0.025em; }
h3 { font-size: clamp(19px, 2vw, 23px); font-weight: 400; }
p { margin: 0; }
.muted { color: var(--muted); }

.eyebrow {
    font-family: var(--mono); text-transform: uppercase; font-size: 12px;
    font-weight: 400; letter-spacing: 0.16em; color: var(--muted); margin: 0 0 14px;
}
.eyebrow.accent { color: var(--accent); }
.lead { font-size: clamp(16px, 1.5vw, 18px); color: var(--muted); max-width: 640px; line-height: 1.65; }

/* ===== Buttons ===== */
.btn, .btn-secondary {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 12px 20px; border-radius: 8px; font-family: var(--sans);
    font-size: 15.5px; font-weight: 600; cursor: pointer; border: 1px solid transparent;
    transition: background .16s ease, border-color .16s ease, box-shadow .18s ease, transform .05s ease;
    white-space: nowrap;
}
.btn:active, .btn-secondary:active { transform: translateY(1px); }
.btn { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 3px 10px rgba(14,81,163,.20); }
.btn:hover { background: var(--brand-2); border-color: var(--brand-2); box-shadow: 0 5px 14px rgba(14,81,163,.26); }
.btn:disabled { opacity: .75; cursor: progress; }
.btn-secondary {
    background: var(--glass-bg); color: var(--ink); border-color: var(--glass-brd);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--glass-shadow);
}
.btn-secondary:hover { background: rgba(255,255,255,.78); box-shadow: var(--glass-shadow-hover); }
.arw { transition: transform .16s ease; }
.btn:hover .arw, .btn-secondary:hover .arw { transform: translateX(3px); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* ===== Header / Nav (floating glass) ===== */
body > header { position: fixed; inset: 0 0 auto 0; z-index: 50; } /* the site header only; an article's <header> stays in the page */
.nav-wrap { margin-top: 12px; }
#nav-shell { border-radius: 8px; }
.navbar { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; gap: 14px; }
.brand { display: inline-flex; align-items: baseline; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; color: var(--ink); }
.brand b { color: var(--brand); font-weight: 700; }
.nav-links { display: none; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); font-size: 15px; transition: color .15s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-links .btn { color: #fff; }

.menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.menu-btn .icon { width: 26px; height: 26px; }
.menu-btn .icon line { transition: transform .22s ease, opacity .1s ease; transform-box: fill-box; transform-origin: 50% 50%; stroke-linecap: round; }
.menu-btn.is-active .icon line:nth-of-type(2) { opacity: 0; }
.menu-btn.is-active .icon line:nth-of-type(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn.is-active .icon line:nth-of-type(3) { transform: translateY(-6px) rotate(-45deg); }

/* visibility keeps the collapsed menu's links out of the keyboard tab order */
.mobile { overflow: hidden; max-height: 0; opacity: 0; visibility: hidden; transition: max-height .25s ease, opacity .2s ease, visibility .25s; border-top: 1px solid transparent; }
.mobile.open { max-height: 420px; opacity: 1; visibility: visible; border-top-color: var(--line); }
.mobile .stack { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px 16px; }
.mobile a { padding: 11px 4px; color: var(--ink); font-size: 16px; border-bottom: 1px solid var(--hair); }
.mobile a:last-child { border-bottom: 0; }
.mobile .btn { justify-content: center; margin-top: 10px; }

/* ===== Sections ===== */
main { padding-top: 82px; }
section { padding-block: clamp(40px, 6vw, 64px); }
section[id] { scroll-margin-top: 64px; } /* keep in-page anchors clear of the fixed header */
.section-head { max-width: 760px; margin-bottom: 26px; }
.section-head h2 { margin-bottom: 14px; }

/* ===== Hero ===== */
.hero { padding-top: clamp(18px, 3vw, 34px); padding-bottom: clamp(36px, 5vw, 64px); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 26px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.08fr 0.92fr; gap: 42px; } }
.hero-copy h1 { max-width: 16ch; margin-top: 8px; }
.hero-copy .lead { margin-top: 20px; }
.hero-cta { margin-top: 28px; display: flex; gap: 13px; flex-wrap: wrap; }

/* Hero "at a glance" proof panel */
.hero-panel { position: relative; padding: 26px 26px 24px; overflow: hidden; }
.hero-panel:hover { transform: none; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat-num { font-size: clamp(26px, 3.2vw, 34px); font-weight: 500; color: var(--brand); letter-spacing: -0.03em; line-height: 1; }
.stat-lbl { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); line-height: 1.35; }
.hero-quote { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--hair); }
.hero-quote p { font-size: 15px; color: var(--ink); line-height: 1.55; margin: 0; }
.hero-quote .qm { color: var(--accent); }
.hero-quote-by { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 10px; letter-spacing: .03em; }

/* ===== Grids ===== */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card { position: relative; padding: 24px; overflow: hidden; }
.card .num { font-family: var(--mono); font-size: 13px; letter-spacing: .1em; color: var(--brand); font-weight: 500; }
.card h3 { margin: 12px 0 0; }
.list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 11px; }
.list li { position: relative; padding-left: 24px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 13px; height: 2px; background: var(--accent); }

/* ===== Products ===== */
.products-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 859.98px) { .products-grid { grid-template-columns: 1fr; } }
.product-card { position: relative; padding: 30px 24px 26px; display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: var(--ink); overflow: hidden; }
.product-logo { position: relative; height: 92px; width: 100%; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.product-logo-img { max-height: 76px; max-width: 82%; object-fit: contain; }
.product-logo-fallback {
    display: none; width: 74px; height: 74px; border-radius: 8px; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(14, 81, 163, .15), rgba(232, 132, 42, .12));
    color: var(--brand); font-family: var(--mono); font-weight: 500; font-size: 25px; letter-spacing: .04em;
}
.product-logo.no-logo .product-logo-fallback { display: flex; }
.product-name { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.product-tag { color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 8px; max-width: 32ch; }
.product-cta { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-top: 18px; display: inline-flex; align-items: center; gap: 6px; }
.product-cta .arw { transition: transform .16s ease; }
.product-card:hover .product-cta .arw { transform: translateX(3px); }
.product-card.soon .product-cta { color: var(--muted); }

/* ===== Work / case studies carousel ===== */
.work-carousel { position: relative; }
.work-viewport { position: relative; overflow: hidden; border-radius: var(--radius-lg); }
.work-deck { display: flex; transition: transform .5s cubic-bezier(.4,0,.2,1); will-change: transform; }
.work-tile { flex: 0 0 100%; min-width: 100%; position: relative; overflow: hidden; }
.work-card { display: grid; grid-template-columns: 1fr; }
@media (min-width: 820px) { .work-card.has-image { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
/* Text-only cards span the full width, so keep their copy clear of the carousel arrows. */
@media (min-width: 820px) and (hover: hover) { .work-card:not(.has-image) .work-body { padding-inline: 76px; } }
.case-img { position: relative; overflow: hidden; min-height: 240px; background: #dde7f4; }
@media (min-width: 820px) { .case-img { min-height: 100%; } }
.case-slide {
    position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
    object-fit: cover; object-position: center;
    opacity: 0; transition: opacity .7s cubic-bezier(.4,0,.2,1);
}
.case-slide.is-active { opacity: 1; }
.case-img::after {
    content: ""; position: absolute; inset: -10%; z-index: 2; pointer-events: none;
    background: linear-gradient(115deg, rgba(255,255,255,0) 40%, rgba(255,255,255,.5) 50%, rgba(255,255,255,0) 60%);
    transform: translateX(-110%) skewX(-12deg); opacity: 0;
}
.case-img.is-shining::after { animation: case-shine 900ms cubic-bezier(.25,.1,.25,1) forwards; }
@keyframes case-shine { 0%{transform:translateX(-110%) skewX(-12deg);opacity:0} 20%{opacity:1} 80%{opacity:1} 100%{transform:translateX(110%) skewX(-12deg);opacity:0} }
.work-body { padding: 26px; }
.work-eyebrow { font-family: var(--mono); text-transform: uppercase; font-size: 11.5px; letter-spacing: .14em; color: var(--muted); margin: 0 0 10px; }
.work-title { margin: 0; font-weight: 300; font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -0.02em; line-height: 1.16; }
.work-meta { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0,1fr)); margin-top: 20px; }
@media (max-width: 640px) { .work-meta { grid-template-columns: 1fr; } }
.work-label { font-family: var(--mono); text-transform: uppercase; font-size: 10.5px; letter-spacing: .12em; color: var(--muted); margin: 0 0 6px; display: inline-flex; align-items: center; gap: 7px; }
.work-label::before { content: ""; width: 12px; height: 2px; background: var(--accent); flex: none; }
.work-meta p:not(.work-label) { font-size: 14.5px; color: var(--ink); line-height: 1.5; }
.work-tags { margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.work-tags .badge {
    font-family: var(--mono); font-size: 12px; color: var(--ink);
    background: rgba(255,255,255,.6); border: 1px solid var(--glass-brd);
    border-radius: 8px; padding: 4px 10px;
}

.work-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; border: 1px solid var(--glass-brd); background: rgba(255,255,255,.85);
    backdrop-filter: blur(8px); color: var(--ink); cursor: pointer; box-shadow: var(--glass-shadow); opacity: .92;
    transition: background .16s ease, transform .16s ease, opacity .16s ease;
}
.work-arrow svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.work-arrow.prev { left: 12px; } .work-arrow.next { right: 12px; }
.work-arrow:hover { background: #fff; opacity: 1; transform: translateY(-50%) scale(1.06); }
@media (hover: none), (max-width: 819.98px) { .work-arrow { display: none; } }
.work-pager { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.work-dot { width: 8px; height: 8px; padding: 0; border-radius: 999px; border: 0; background: rgba(15,23,42,.22); cursor: pointer; transition: background .2s ease, width .2s ease; }
.work-dot:hover { background: rgba(15,23,42,.45); }
.work-dot.is-active { background: var(--accent); width: 24px; }

/* ===== Testimonial ===== */
.quote-card { position: relative; padding: 40px clamp(28px, 4vw, 52px); overflow: hidden; background: linear-gradient(135deg, rgba(14,81,163,.10), rgba(255,255,255,.55)); }
.quote-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.quote-card::after {
    content: "\201D"; position: absolute; right: clamp(16px, 3vw, 44px); top: -24px; z-index: 0;
    font-family: Georgia, "Times New Roman", serif; font-weight: 700; line-height: 1;
    font-size: clamp(150px, 24vw, 300px); color: rgba(14, 81, 163, .07);
    pointer-events: none; user-select: none;
}
.quote { position: relative; z-index: 1; font-weight: 300; font-size: clamp(21px, 2.7vw, 32px); line-height: 1.34; letter-spacing: -0.015em; margin: 0; max-width: 46ch; }
.quote .qm { color: var(--accent); }
.quote-by { position: relative; z-index: 1; font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 22px; letter-spacing: .04em; }
.quote-by a { color: var(--brand); border-bottom: 1px solid rgba(14,81,163,.35); transition: border-color .15s ease; }
.quote-by a:hover { border-color: var(--brand); }

/* ===== Process ===== */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(5, minmax(0,1fr)); }
@media (max-width: 900px) { .timeline { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .timeline { grid-template-columns: 1fr; } }
.step { padding: 20px; }
.step .num { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--accent); font-weight: 500; }
.step h3 { font-size: 18px; font-weight: 500; margin: 8px 0 0; }
.step p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 8px 0 0; }

/* ===== About ===== */
.about-grid { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 820px) { .about-grid { grid-template-columns: 330px 1fr; gap: 26px; } }
.about-figure { margin: 0; padding: 8px; border-radius: var(--radius-lg); }
.about-portrait { width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; border-radius: 8px; display: block; }
.about-name { font-weight: 500; }
.about-role { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 6px; letter-spacing: .03em; }
.about-bio { color: var(--muted); font-size: 16px; line-height: 1.6; margin-top: 16px; }
.about-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 18px; }
@media (max-width: 640px) { .about-cards { grid-template-columns: 1fr; } }
.about-cards .card { padding: 18px; }
.about-cards .list { margin-top: 12px; }
.about-cards .card-title { font-family: var(--mono); text-transform: uppercase; font-size: 11px; letter-spacing: .12em; color: var(--muted); }
.about-person + .about-person { margin-top: 16px; }
@media (min-width: 820px) {
    .about-grid.reverse { grid-template-columns: 1fr 330px; }
    .about-grid.reverse > aside { order: 2; }
}
/* Portrait monogram fallback (put data-monogram="XX" on the figure when there's no photo) */
.about-figure[data-monogram] { position: relative; }
.about-figure[data-monogram]::after {
    content: attr(data-monogram); position: absolute; inset: 8px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--mono); font-size: clamp(30px, 6vw, 44px); letter-spacing: .06em; color: var(--brand);
    background: linear-gradient(135deg, rgba(14, 81, 163, .16), rgba(232, 132, 42, .12));
    border-radius: 8px;
}

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 0.9fr 1.1fr; gap: 22px; } }
.contact-grid.single { grid-template-columns: minmax(0, 560px); } /* form switched off: just the info card */
.contact-info { padding: 28px; }
.contact-info .form-status { margin-top: 18px; }
.contact-sub { margin-top: 8px; font-size: 14.5px; }
.contact-line { font-family: var(--mono); font-size: 14px; color: var(--ink); margin-top: 20px; }
.contact-line span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 6px; }
.contact-line a { transition: color .15s ease; }
.contact-line a:hover { color: var(--brand); }
form.contact-form { position: relative; padding: 28px; display: grid; gap: 15px; scroll-margin-top: 96px; }
.field label { display: block; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 7px; }
.field input, .field textarea {
    width: 100%; font-family: var(--sans); font-size: 16px; color: var(--ink);
    background: rgba(255,255,255,.92); border: 1px solid var(--hair); border-radius: 8px;
    padding: 12px 14px; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14,81,163,.12); }
.field textarea { min-height: 130px; resize: vertical; }
.field .input-validation-error { border-color: var(--danger); }
.field-error { display: block; margin-top: 6px; font-size: 13.5px; color: var(--danger); }
.field-error:empty { display: none; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.copy-check { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted); }
.copy-check input { width: 16px; height: 16px; accent-color: var(--brand); }
.form-status { margin: 0; padding: 11px 14px; border-radius: 8px; font-family: var(--mono); font-size: 14px; line-height: 1.5; }
.form-status:focus { outline: none; }
.form-status.is-success { color: var(--success); background: rgba(14,122,75,.08); border: 1px solid rgba(14,122,75,.22); }
.form-status.is-error { color: var(--danger); background: rgba(185,28,28,.06); border: 1px solid rgba(185,28,28,.2); }
.form-status a { text-decoration: underline; }
.form-hint { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.cf-turnstile { min-height: 65px; } /* reserve the widget's height so the form doesn't jump when it loads */
/* Honeypot: off-screen for people, still a normal-looking field to bots */
.hp-field { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; }

/* ===== Error page ===== */
.error-page { min-height: 55vh; display: flex; flex-direction: column; justify-content: center; }
.error-page h1 { margin-bottom: 18px; }
.error-page .lead a { color: var(--brand); border-bottom: 1px solid rgba(14,81,163,.35); }
.error-ref { margin-top: 24px; font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ===== Blog: list, search, tags ===== */
.blog-head { padding-bottom: 22px; }
.blog-head h1 { font-size: clamp(30px, 3.8vw, 44px); }
.blog-head .section-head { margin-bottom: 22px; }
.blog-head .eyebrow a { color: inherit; }
.blog-head .lead a, .blog-status a { color: var(--brand); border-bottom: 1px solid rgba(14,81,163,.35); }
.blog-search { display: flex; gap: 10px; max-width: 560px; }
.blog-search input {
    flex: 1; min-width: 0; font-family: var(--sans); font-size: 16px; color: var(--ink);
    background: rgba(255,255,255,.92); border: 1px solid var(--hair); border-radius: 8px;
    padding: 11px 14px; transition: border-color .15s ease, box-shadow .15s ease;
}
.blog-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14,81,163,.12); }
.blog-status { margin-top: 14px; font-family: var(--mono); font-size: 13.5px; color: var(--muted); }
.blog-posts { padding-bottom: clamp(40px, 6vw, 64px); }
.blog-empty { padding: 24px 26px; color: var(--muted); }
.post-list { display: grid; gap: 16px; }
.post-card { padding: 24px 26px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .03em; color: var(--muted); }
.post-meta a { color: var(--brand); }
.post-card-title { margin-top: 10px; font-size: clamp(22px, 2.4vw, 28px); font-weight: 400; letter-spacing: -0.02em; line-height: 1.2; }
.post-card-title a { transition: color .15s ease; }
.post-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* the whole card is the link */
.post-card:hover .post-card-title a { color: var(--brand); }
.post-summary { margin-top: 10px; color: var(--muted); max-width: 72ch; }
.tag-list { position: relative; z-index: 2; list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; } /* above the card link */
.tag {
    display: inline-block; font-family: var(--mono); font-size: 12px; color: var(--ink);
    background: rgba(255,255,255,.6); border: 1px solid var(--glass-brd); border-radius: 8px;
    padding: 3px 10px; transition: color .15s ease, border-color .15s ease;
}
.tag:hover { color: var(--brand); border-color: rgba(14,81,163,.35); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.pager-info { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.pager-prev:hover .arw { transform: translateX(-3px); }

/* ===== Blog: a post ===== */
.post-article { max-width: 780px; margin-inline: auto; padding-block: clamp(20px, 3vw, 34px) clamp(40px, 6vw, 64px); }
.draft-banner { margin-bottom: 22px; color: #8a4b0f; background: rgba(232,132,42,.10); border: 1px solid rgba(232,132,42,.35); }
.post-edit { margin-left: auto; }
.post-header h1 { margin-top: 12px; font-size: clamp(28px, 3.2vw, 38px); font-weight: 400; line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance; }
.post-header .lead { margin-top: 14px; }

/* Post content (also styles the editor's preview). Body headings start at h2, since the title is the page's h1;
   an h1 typed as raw HTML gets the h2 size. */
.post-body { margin-top: 34px; font-size: 17px; line-height: 1.75; overflow-wrap: break-word; }
.post-body > * + * { margin-top: 1.15em; }
.post-body h1, .post-body h2, .post-body h3, .post-body h4 { font-weight: 400; letter-spacing: -0.01em; line-height: 1.3; text-wrap: balance; }
.post-body h1, .post-body h2 { font-size: clamp(21px, 2.2vw, 25px); margin-top: 1.8em; }
.post-body h3 { font-size: clamp(18px, 1.8vw, 20px); font-weight: 500; margin-top: 1.6em; }
.post-body h4 { font-size: 17px; font-weight: 600; margin-top: 1.4em; }
.post-body section { padding-block: 0; } /* footnotes; the site's section padding is for page sections */
.post-body [id] { scroll-margin-top: 90px; }
.post-body a { color: var(--brand); border-bottom: 1px solid rgba(14,81,163,.35); transition: border-color .15s ease; }
.post-body a:hover { border-color: var(--brand); }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li + li, .post-body li > ul, .post-body li > ol { margin-top: .4em; }
.post-body blockquote { margin-inline: 0; padding: 2px 0 2px 20px; border-left: 3px solid var(--accent); color: var(--muted); }
.post-body img { height: auto; margin-inline: auto; border-radius: 8px; box-shadow: var(--glass-shadow); }
.post-body hr { border: 0; border-top: 1px solid var(--hair); margin-block: 2.2em; }
.post-body mark { background: rgba(232,132,42,.22); border-radius: 3px; padding: 0 .15em; }
.post-body kbd { font-family: var(--mono); font-size: .85em; background: #fff; border: 1px solid var(--hair); border-bottom-width: 2px; border-radius: 5px; padding: .05em .4em; }
.post-body :not(pre) > code { font-family: var(--mono); font-size: .88em; background: rgba(14,81,163,.07); border: 1px solid rgba(14,81,163,.10); border-radius: 5px; padding: .1em .35em; }
/* Code blocks: dark, matching the Prism "Tomorrow" theme, whether or not a language was given. */
.post-body pre, .post-body pre[class*="language-"] {
    margin-bottom: 0; padding: 16px 18px; overflow-x: auto; border-radius: 8px;
    background: #2d2d2d; color: #ccc; font-size: 14px; line-height: 1.6;
}
.post-body pre code, .post-body pre[class*="language-"], .post-body code[class*="language-"] { font-family: var(--mono); }
.post-body table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 15px; }
.post-body th, .post-body td { border: 1px solid var(--hair); padding: 8px 12px; text-align: left; }
.post-body th { background: rgba(14,81,163,.06); font-weight: 600; }
/* Table column alignment, which the sanitizer turns from inline styles (blocked by the CSP) into classes */
.post-body .align-left { text-align: left; }
.post-body .align-center { text-align: center; }
.post-body .align-right { text-align: right; }
.post-body .task-list-item { list-style: none; margin-left: -1.3em; }
.post-body .task-list-item input { margin: 0 .5em 0 0; accent-color: var(--brand); }
.post-body .footnotes { margin-top: 2.6em; font-size: 14.5px; color: var(--muted); }
.post-footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--hair); }

/* ===== Sign-in pages ===== */
.auth-page { display: flex; justify-content: center; padding-block: clamp(28px, 6vw, 70px); }
.auth-card { width: min(100%, 440px); padding: 30px 28px; display: grid; gap: 16px; }
.auth-card h1 { font-size: clamp(30px, 3.6vw, 38px); }
.auth-card .eyebrow { margin-bottom: 10px; }
.auth-card .btn { justify-content: center; }
.auth-intro { margin-top: 10px; font-size: 15px; }
.auth-links { font-size: 14px; color: var(--muted); }
.auth-links a { color: var(--brand); border-bottom: 1px solid rgba(14,81,163,.35); }

/* ===== Footer ===== */
body > footer { padding: 30px 0 40px; margin-top: 20px; }
.foot-inner { border-top: 1px solid var(--hair); padding-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.foot-brand .copy { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.foot-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-nav a { font-size: 14px; color: var(--muted); transition: color .15s ease; }
.foot-nav a:hover { color: var(--ink); }

/* ===== Responsive ===== */
@media (min-width: 860px) {
    .nav-links { display: flex; }
    .menu-btn { display: none; }
    .mobile { display: none !important; }
}
@media (max-width: 859.98px) {
    .grid-3 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    input, textarea, select, button { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .case-slide, .work-deck, .mobile, .menu-btn .icon line, .card.glass { transition: none; }
    .case-img.is-shining::after { animation: none; }
}
