/* The header of the home page and the timeline. Self-contained: its colours are its own, so it looks the same on top of
   either page's tokens. Clear over the home hero; .solid once past it, and always on the timeline. */
.top { --t-fg: #f4f5f7; --t-bg: #0d0f12; --t-line: rgb(255 255 255 / .1); --t-gut: clamp(16px, 4vw, 48px); --t-blue: #2b44ff;
  position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 12px 20px; height: 64px; padding: 0 var(--t-gut); padding-top: env(safe-area-inset-top); color: #fff;
  font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif; }
[data-theme="light"] .top { --t-fg: #0d0f12; --t-bg: #f4f5f7; --t-line: rgb(13 15 18 / .12); }
.top::before { content: ''; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--t-bg) 80%, transparent); backdrop-filter: blur(10px) saturate(1.4); -webkit-backdrop-filter: blur(10px) saturate(1.4); border-bottom: 1px solid var(--t-line); opacity: 0; transition: opacity 300ms; }
.top.solid { color: var(--t-fg); }
.top.solid::before { opacity: 1; }
.top a { color: inherit; }
.top .arr { flex: none; vertical-align: -.15em; transition: transform 300ms cubic-bezier(.2, .7, .1, 1); }
.top a:hover .arr { transform: translate(2px, -2px); }
.top-name { font-family: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif; font-weight: 700; font-size: 18px; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.top-links { display: flex; gap: 2px; margin-left: auto; }
.top-links a, .top-pill { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.top-links a:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.top-links a.on { background: color-mix(in srgb, currentColor 14%, transparent); }
.top-links .top-menu-only, .top-menu { display: none; }
.top-tools { display: flex; align-items: center; gap: 8px; }
.top-pill { border: 1px solid color-mix(in srgb, currentColor 30%, transparent); }
.top-pill:hover { background: #fff; color: var(--t-blue); }
.top.solid .top-pill:hover { background: var(--t-fg); color: var(--t-bg); }
.top-theme { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); border-radius: 50%; background: none; color: inherit; cursor: pointer; }
.top-theme:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.top-theme .i-moon, [data-theme="light"] .top-theme .i-sun { display: none; }
[data-theme="light"] .top-theme .i-moon { display: block; }

/* The blog button: the one loud thing in the header. Blue, a sheen that crosses it a few times when the page opens
   (never forever), the post count, and a dot when a post is under 45 days old. Hovering shows the latest post. */
.top-blog-wrap { position: relative; }
.top-blog { position: relative; display: inline-flex; align-items: center; gap: 8px; overflow: hidden; padding: 6px 8px 6px 14px; border-radius: 999px; background: var(--t-blue); color: #fff !important; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .18) inset, 0 8px 24px -8px rgb(43 68 255 / .9); transition: transform 300ms cubic-bezier(.2, .7, .1, 1); }
.top-blog::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 60%; background: linear-gradient(100deg, transparent, rgb(255 255 255 / .45), transparent); transform: translateX(-120%); pointer-events: none; }
.top-blog:hover { transform: translateY(-1px); }
.top-blog-label { display: inline-flex; align-items: center; gap: 7px; }
.top-blog-short { display: none; }
.top-blog-dot { width: 7px; height: 7px; border-radius: 50%; background: #7dffb3; box-shadow: 0 0 0 3px rgb(125 255 179 / .25); }
.top-blog-count { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: #fff; color: var(--t-blue); font: 600 12px 'Geist Mono', ui-monospace, monospace; }
.top-blog .arr { margin-right: 2px; }
.top-blog-card { position: absolute; top: calc(100% + 10px); right: 0; display: grid; gap: 4px; width: 290px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--t-line); background: var(--t-bg); color: var(--t-fg); box-shadow: 0 24px 60px -24px rgb(0 0 0 / .6);
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity 200ms, transform 300ms cubic-bezier(.2, .7, .1, 1); }
.top-blog-card small { font: 500 11px 'Geist Mono', ui-monospace, monospace; letter-spacing: .04em; text-transform: uppercase; opacity: .6; }
.top-blog-card b { font-family: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif; font-size: 17px; line-height: 1.2; }
.top-blog-card span { font-size: 13px; line-height: 1.45; opacity: .7; }
@media (hover: hover) { .top-blog-wrap:hover .top-blog-card, .top-blog-wrap:focus-within .top-blog-card { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .top-blog::after { animation: top-sheen 1.3s cubic-bezier(.4, 0, .2, 1) 1.2s 3; }
  .top-blog:hover::after { animation: top-sheen 900ms cubic-bezier(.4, 0, .2, 1); }
  .top-blog-dot { animation: top-ping 1.6s ease-out 1s 4; }
}
@keyframes top-sheen { to { transform: translateX(260%); } }
@keyframes top-ping { 50% { transform: scale(1.5); } }

/* Narrower screens: the section links fold into a menu under the header. */
@media (max-width: 1100px) {
  .top-wide { display: none; }
  .top-menu { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); border-radius: 50%; background: none; color: inherit; cursor: pointer; }
  .top-tools { margin-left: auto; }
  .top-links { position: absolute; top: calc(100% + 8px); right: var(--t-gut); flex-direction: column; gap: 2px; min-width: 200px; padding: 8px; border-radius: 18px; border: 1px solid var(--t-line); background: var(--t-bg); color: var(--t-fg); box-shadow: 0 24px 60px -24px rgb(0 0 0 / .6);
    opacity: 0; transform: translateY(-6px); visibility: hidden; transition: opacity 200ms, transform 300ms cubic-bezier(.2, .7, .1, 1), visibility 0s 300ms; }
  .top.menu-open .top-links { opacity: 1; transform: none; visibility: visible; transition: opacity 200ms, transform 300ms cubic-bezier(.2, .7, .1, 1); }
  .top-links a { padding: 10px 14px; font-size: 15px; }
  .top-links .top-menu-only { display: inline-flex; }
}
@media (max-width: 420px) {
  .top { gap: 8px; }
  .top-blog-long { display: none; }
  .top-blog-short { display: inline; }
  .top-blog { padding-left: 12px; gap: 6px; }
}
