/* Trulli blogs. Mostly white with blue hues, dark used as an accent. No side highlight bars anywhere. */
:root {
  --blue: #4a7cf6;
  --blue-600: #3563e9;
  --blue-700: #2449c4;
  --blue-50: #eef3ff;
  --blue-100: #dde7ff;
  --ink: #0d1424;
  --ink-2: #364055;
  --ink-3: #66708a;
  --line: #e5e9f2;
  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --navy: #0b1530;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(13, 20, 36, .04), 0 8px 28px rgba(13, 20, 36, .06);
  --shadow-lg: 0 2px 4px rgba(13, 20, 36, .05), 0 24px 60px rgba(36, 73, 196, .14);
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-700); }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } body { font-size: 16.5px; } }

/* progress bar */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; background: transparent; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), #7aa2ff); transition: width .1s linear; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; border-radius: 999px; padding: 13px 22px; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-block { width: 100%; justify-content: center; white-space: normal; text-align: center; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(74, 124, 246, .35); }
.btn-primary:hover { background: var(--blue-600); color: #fff; box-shadow: 0 10px 26px rgba(74, 124, 246, .45); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { color: var(--blue-700); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.btn-ghost-light { border: 1px solid rgba(255, 255, 255, .3); color: #fff; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .08); color: #fff; }

/* header */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .82); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid rgba(229, 233, 242, .7); }
.topbar-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand img { height: 30px; width: auto; }
.topnav { display: flex; gap: 22px; margin-right: auto; }
.topnav a { color: var(--ink-2); font-size: 15px; font-weight: 500; }
.topnav a:hover { color: var(--ink); }
@media (max-width: 640px) { .topnav { display: none; } .topbar-in { justify-content: space-between; height: 60px; } .brand img { height: 26px; } .topbar .btn-sm { padding: 8px 13px; font-size: 13px; } }

/* blog index hero */
.blog-hero { position: relative; overflow: hidden; padding: 88px 0 56px; background: radial-gradient(1200px 500px at 15% -10%, var(--blue-100), transparent 60%), linear-gradient(180deg, var(--blue-50), #fff 85%); }
.blog-hero-in { position: relative; z-index: 1; max-width: 860px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12.5px; font-weight: 600; color: var(--blue-600); margin: 0 0 14px; }
.blog-hero h1 { font-size: clamp(36px, 5.6vw, 64px); line-height: 1.04; letter-spacing: -.035em; font-weight: 600; margin: 0 0 18px; }
.lede { font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); max-width: 680px; margin: 0 0 28px; }
.orbs span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.orbs span:nth-child(1) { width: 420px; height: 420px; background: #b9ccff; right: -80px; top: -120px; }
.orbs span:nth-child(2) { width: 300px; height: 300px; background: #d6e2ff; right: 22%; top: 140px; animation-duration: 22s; }
.orbs span:nth-child(3) { width: 220px; height: 220px; background: #9fb9ff; right: 8%; bottom: -100px; animation-duration: 26s; opacity: .35; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-60px, 40px, 0) scale(1.12); } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; font-size: 13px; font-weight: 500; padding: 6px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); transition: all .2s ease; }
.chip:hover, .chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 28px 0 8px; }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; gap: 22px; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease, border-color .35s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--blue-100); }
.card-img { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--blue-50); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 20px 22px 24px; }
.card h3 { font-size: 19px; line-height: 1.3; letter-spacing: -.01em; margin: 10px 0 8px; font-weight: 600; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--blue-700); }
.dek { color: var(--ink-3); font-size: 15px; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3); margin: 0; }
.meta .chip { padding: 3px 10px; font-size: 12px; }
.card-big { display: grid; grid-template-columns: 1.25fr 1fr; margin-top: -8px; }
.card-big .card-img { aspect-ratio: auto; min-height: 340px; }
.card-big .card-body { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.card-big h3 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.02em; }
@media (max-width: 860px) { .card-big { grid-template-columns: 1fr; } .card-big .card-img { min-height: 220px; aspect-ratio: 16 / 9; } .card-big .card-body { padding: 24px; } }
.empty { color: var(--ink-3); padding: 40px 0; }

/* post hero */
.post-hero { position: relative; overflow: hidden; color: #fff; background: var(--navy); }
.post-hero-bg { position: absolute; inset: -20px; background-size: cover; background-position: center; transform: scale(1.06); animation: slowzoom 24s ease-out forwards; }
.post-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, rgba(11, 21, 48, .94) 0%, rgba(11, 21, 48, .82) 45%, rgba(36, 73, 196, .55) 100%); }
@keyframes slowzoom { to { transform: scale(1); } }
.post-hero-in { position: relative; z-index: 1; padding: 72px 24px 64px; max-width: 980px; margin-left: max(0px, calc((100vw - 1200px) / 2)); }
.post-hero h1 { font-size: clamp(32px, 4.8vw, 54px); line-height: 1.08; letter-spacing: -.03em; font-weight: 600; margin: 14px 0 22px; text-wrap: balance; }
.crumbs { display: flex; gap: 10px; font-size: 14px; }
.crumbs a { color: rgba(255, 255, 255, .78); }
.crumbs a:hover { color: #fff; }
.crumbs span { color: rgba(255, 255, 255, .4); }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: rgba(255, 255, 255, .82); font-size: 14.5px; margin: 0; }
.avatar img { width: 28px; height: 28px; border-radius: 8px; }
.dot { opacity: .5; }
@media (max-width: 640px) { .post-hero-in { padding: 44px 16px 40px; } }

/* post layout */
.post-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; padding-top: 48px; }
@media (max-width: 1020px) { .post-layout { grid-template-columns: 1fr; gap: 0; padding-top: 28px; } .toc { display: none; } }
.toc { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; font-size: 14px; }
.toc-title { font-weight: 600; color: var(--ink); margin: 0 0 10px; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; }
.toc ol { list-style: none; margin: 0 0 22px; padding: 0; counter-reset: t; }
.toc li { margin: 0; }
.toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink-3); line-height: 1.4; transition: background .2s ease, color .2s ease; }
.toc a:hover { color: var(--ink); background: var(--bg-soft); }
.toc a.on { color: var(--blue-700); background: var(--blue-50); font-weight: 500; }
.post { max-width: 760px; min-width: 0; }

/* in short: full soft card, no side bar */
.in-short { background: linear-gradient(135deg, var(--blue-50), #f8faff); border: 1px solid var(--blue-100); border-radius: var(--radius); padding: 22px 26px; margin: 0 0 34px; }
.in-short-label { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-weight: 600; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-700); }
.in-short p:last-child { margin: 0; font-size: 18px; line-height: 1.6; color: var(--ink); }
.spark { width: 10px; height: 10px; border-radius: 3px; background: var(--blue); box-shadow: 0 0 0 4px rgba(74, 124, 246, .18); animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(74, 124, 246, 0); } }

/* prose */
.prose { color: var(--ink-2); }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { color: var(--ink); font-size: clamp(25px, 3vw, 31px); line-height: 1.2; letter-spacing: -.02em; font-weight: 600; margin: 2.2em 0 .7em; scroll-margin-top: 90px; }
.prose h3 { color: var(--ink); font-size: 21px; line-height: 1.3; font-weight: 600; margin: 1.7em 0 .5em; scroll-margin-top: 90px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { text-decoration: underline; text-decoration-color: rgba(74, 124, 246, .35); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--blue); }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.prose code { background: var(--bg-soft); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.prose a.inline-cta { font-weight: 600; }
.table-wrap { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.prose th { background: var(--bg-soft); color: var(--ink); text-align: left; font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.prose td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover td { background: #fbfcff; }
/* callouts: soft full card with a small top label, never an edge bar */
.callout { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; margin: 1.8em 0; color: var(--ink); }
.callout p { margin: 0 0 .6em; }
.callout p:last-child { margin: 0; }
.callout strong:first-child { display: inline-block; color: var(--blue-700); }
.post-foot { font-size: 14px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 18px; margin-top: 40px; }

/* CTA band */
.cta-band { position: relative; overflow: hidden; border-radius: 26px; margin: 64px 0 24px; background: radial-gradient(800px 400px at 85% 0%, rgba(122, 162, 255, .55), transparent 60%), linear-gradient(135deg, #0b1530, #18308a 60%, #3563e9); color: #fff; }
.cta-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 70% 20%, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 70% 20%, #000 20%, transparent 70%); animation: gridmove 20s linear infinite; }
@keyframes gridmove { to { background-position: 44px 44px, 44px 44px; } }
.cta-in { position: relative; padding: 56px; max-width: 720px; }
.cta-band .eyebrow { color: #a9c1ff; }
.cta-band h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -.025em; margin: 0 0 14px; font-weight: 600; }
.cta-band p { color: rgba(255, 255, 255, .82); margin: 0 0 26px; font-size: 17px; }
@media (max-width: 640px) { .cta-in { padding: 32px 22px; } .cta-band { border-radius: 20px; margin-top: 44px; } }

.related { padding: 32px 24px 24px; }
.section-title { font-size: 28px; letter-spacing: -.02em; font-weight: 600; margin: 0; }

/* footer */
.footer { margin-top: 72px; background: var(--navy); color: rgba(255, 255, 255, .72); font-size: 15px; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-top: 64px; padding-bottom: 48px; }
.footer-logo { height: 30px; width: auto; margin-bottom: 16px; }
.footer-brand p { max-width: 300px; margin: 0 0 22px; color: rgba(255, 255, 255, .8); font-family: var(--serif); font-size: 22px; line-height: 1.3; font-style: italic; }
.footer h3 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; margin: 4px 0 14px; font-weight: 600; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin: 0 0 10px; }
.footer a { color: rgba(255, 255, 255, .72); }
.footer a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 22px; padding-bottom: 34px; font-size: 13px; color: rgba(255, 255, 255, .5); }
.footer-bottom p { margin: 0; max-width: 760px; }
.footer-bottom a { margin-left: 16px; }
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } .footer-bottom { flex-direction: column; } .footer-bottom a { margin: 0 16px 0 0; } }

/* reveal on scroll (content is visible without JS; JS only adds the motion) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Archive: older posts still served by the main site */
.archive { margin: 56px auto 8px; }
.archive-sub { color: var(--ink-3); margin: 8px 0 24px; }
.archive-grid { columns: 3 300px; column-gap: 40px; }
.archive-col { break-inside: avoid; margin: 0 0 28px; }
.archive-col h3 { font-size: 15px; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 10px; color: var(--ink); }
.archive-col ul { list-style: none; margin: 0; padding: 0; }
.archive-col li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.archive-col li a { color: var(--ink); text-decoration: none; font-weight: 500; line-height: 1.35; }
.archive-col li a:hover { text-decoration: underline; }
.archive-col li span { font-size: 13px; color: var(--ink-3); }
