/* josephfus.co — minimal, fast, no build step */

:root {
  color-scheme: light;
  --bg: #f6f1e5;
  --fg: #23201a;
  --muted: #6f6758;
  --accent: #b8420f;
  --border: #ddd4bf;
  --card: #efe8d6;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/AtkinsonHyperlegible-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/AtkinsonHyperlegible-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/AtkinsonHyperlegible-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--fg);
  font-family: "Atkinson Hyperlegible", Verdana, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Masthead */
.site-header {
  padding: 1.5rem 0 1rem;
  margin-bottom: 0.75rem;
}
.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.site-name {
  font-weight: 700;
  color: var(--fg);
  letter-spacing: 0;
}
.site-nav a {
  color: var(--muted);
  margin-left: 1.25rem;
  font-size: 0.9375rem;
}
.site-nav a[aria-current="page"] { color: var(--fg); }

/* Hero */
.hero { padding: 2.25rem 0 1rem; }
.hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: 0;
  margin: 0 0 1rem;
}
.hero p.lede {
  font-size: 1.0625rem;
  color: var(--muted);
  margin: 0;
}
.hero p.lede strong { color: var(--fg); font-weight: 600; }

/* Email capture */
.signup {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin: 1.75rem 0;
}
.signup h2 { margin: 0 0 0.375rem; font-size: 1.1875rem; letter-spacing: 0; }
.signup p { margin: 0 0 1.125rem; color: var(--muted); font-size: 0.9688rem; }
.signup form {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
}
.signup input[type="email"] {
  flex: 1 1 14rem;
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--fg);
}
.signup button {
  padding: 0.7rem 1.3rem;
  font-size: 1rem;
  font-weight: 600;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.signup button:hover { filter: brightness(1.08); }
.signup .fine { font-size: 0.8125rem; margin: 0.75rem 0 0; }

/* Sections */
section.block { padding: 0.75rem 0 0.25rem; }
section.block > h2 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-align: left;
  margin: 0 0 0.875rem;
}

/* Work list */
.work { list-style: none; margin: 0; padding: 0; }
.work li {
  padding: 1.125rem 0;
}
.work h3 { margin: 0 0 0.25rem; font-size: 1.0625rem; letter-spacing: 0; }
.work h3 a { color: var(--fg); }
.work h3 a:hover { color: var(--accent); text-decoration: none; }
.work p { margin: 0; color: var(--muted); font-size: 0.9688rem; }
.work .tag {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  color: var(--accent);
  margin-left: 0.5rem;
  font-weight: 400;
}

/* Post list */
.posts { list-style: none; margin: 0; padding: 0; }
.posts li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.625rem 0;
}
.posts a { color: var(--fg); font-weight: 500; }
.posts a:hover { color: var(--accent); }
.posts time {
  color: var(--muted);
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  white-space: nowrap;
}

/* Article / prose pages */
.prose { padding: 2.5rem 0 1rem; }
.prose h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: 0;
  margin: 0 0 0.5rem;
}
.prose .meta {
  color: var(--muted);
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  margin: 0 0 2rem;
}
.prose h2 { font-size: 1.375rem; letter-spacing: 0; margin: 2.25rem 0 0.75rem; }
.prose code {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}
.prose pre {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
}
.prose pre code { background: none; border: 0; padding: 0; }
.prose ul { padding-left: 1.25rem; }

/* Product card */
.product {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  margin: 1.5rem 0;
}
.product h2 { margin: 0 0 0.25rem; font-size: 1.25rem; letter-spacing: 0; }
.product .price {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  color: var(--muted);
  font-size: 0.875rem;
}
.product ul { color: var(--muted); font-size: 0.9688rem; padding-left: 1.25rem; }

/* Footer */
.site-footer {
  margin-top: 2.5rem;
  padding: 2rem 0 3rem;
  font-size: 0.9375rem;
  color: var(--muted);
}
/* The close is a block anchored bottom right, read left to right
   inside, like the address block on a letter */
.letter-close { width: fit-content; margin-left: auto; text-align: left; }
/* Signed just past the text column's edge, never off in the margin
   of a wide sheet */
.site-footer .wrap { max-width: 54rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

@media (max-width: 480px) {
  .site-header .wrap { flex-direction: column; gap: 0.25rem; }
  .site-nav a { margin-left: 0; margin-right: 1.25rem; }
}

/* Prose extras for legacy post content */
.prose img { max-width: 100%; height: auto; border-radius: 6px; }
/* A quotation is an exhibit: a clipped excerpt laid on the letter,
   same stationery as the colophon slip, popped past the text edge */
.prose blockquote {
  margin: var(--lh) calc(var(--lh) * -1);
  padding: calc(var(--lh) * 0.5 - 1px) var(--lh);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--fg);
}
.prose blockquote p { margin: 0; }
.prose blockquote p + p { margin-top: var(--lh); }
@media (max-width: 720px) {
  .prose blockquote { margin-left: 0; margin-right: 0; }
}
.prose hr { border: 0; margin: var(--lh) 0; }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; }
.prose .highlight pre { margin: 1rem 0; }

/* Post prev/next */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9375rem;
  margin-top: var(--lh);
}

/* ---- Life layer: motifs recycled from codepen.io/fusco ---- */

/* Hero kicker: face + presence (the iMessage typing pen, all grown up) */
.field-note .status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-family: Georgia, serif;
  font-style: italic;
}
.presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6f8f52;
}
.presence-dot.tick { animation: presence-pulse 2.6s ease-in-out 1; }
/* Icons are icons; the dotted underline belongs to the words alone */
.tool-glyph { display: inline-block; }
@keyframes presence-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47,191,113,0.45); }
  55% { box-shadow: 0 0 0 7px rgba(47,191,113,0); }
}
.typing {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing-bounce 1.3s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: 0.16s; }
.typing span:nth-child(3) { animation-delay: 0.32s; }
@keyframes typing-bounce {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* Angled edges (the angled-edges Sass library, as a signature) */
.angled {
  position: relative;
  background: transparent;
  border: 0;
}
.angled::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transform: skewY(-1.1deg);
  z-index: -1;
}



/* The full stop takes the accent — quiet signature, no theatrics */
.flame { color: var(--accent); }



/* ---- HACF pen: glowing streaks and the comet ---- */

/* Streaks and comet retired — HACF survives only in the button glow below */

/* Button hover: the HACF glow */
.signup button:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 12px rgba(184, 66, 15, 0.3);
}



/* ---- Kodak moment: a miniature of the SLR from the old camera-flash pen ---- */
.camera {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  vertical-align: -5px;
  width: 28px;
  height: 19px;
  padding: 0;
  margin: 0 0 0 0.5rem;
  background: #3a342a;
  border: 1px solid #6f6758;
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.15s;
}
/* the shutter button depresses, exactly like the pen's */
.camera::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 4px;
  width: 6px;
  height: 4px;
  background: #6f6758;
  border-radius: 2px 2px 0 0;
  transition: top 0.09s ease-in-out;
}
.camera:active::before { top: -1px; }
/* the flash unit, top-right of the body */
.camera::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 3px;
  width: 6px;
  height: 4px;
  background: #ddd4bf;
  border-radius: 1px;
}
.camera:active::after {
  box-shadow: 0 0 10px 4px rgba(255, 255, 255, 0.8);
}
/* ringed lens with a glass glint */
.camera-lens {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #6f6758;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.55) 0 1.5px, rgba(255,255,255,0.12) 3.5px, #23201a 65%);
  transition: border-color 0.15s;
}
.camera:hover { border-color: var(--accent); }
.camera:hover .camera-lens { border-color: var(--accent); }
.camera:active { transform: translateY(1px); }

/* the flash */
.cheese {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #fff;
  color: #bf9a69;
  font-family: cursive;
  font-size: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease-out;
}
.camera:active + .cheese {
  opacity: 1;
  transition: opacity 0.05s ease-in;
}



/* ---- The personal loader, promoted to wordmark ---- */
.site-name {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.site-mark {
  width: 21px;
  height: 21px;
  flex: none;
}
.site-mark rect {
  width: 100px;
  height: 100px;
  fill: var(--muted);
  stroke: var(--bg);
  stroke-width: 4;
}
/* The wave runs only when you hover the wordmark */
.site-name:hover .site-mark rect,
.site-name:focus-visible .site-mark rect {
  animation: mark-shift 1.4s infinite;
}
.site-mark rect:nth-child(1) { animation-delay: 0.64s; } /* the original's quirk: child 1 fires as if it were 8th */
.site-mark rect:nth-child(2) { animation-delay: 0.16s; }
.site-mark rect:nth-child(3) { animation-delay: 0.24s; }
.site-mark rect:nth-child(4) { animation-delay: 0.32s; }
.site-mark rect:nth-child(5) { animation-delay: 0.40s; }
.site-mark rect:nth-child(6) { animation-delay: 0.48s; }
.site-mark rect:nth-child(7) { animation-delay: 0.56s; }
.site-mark rect:nth-child(8) { animation-delay: 0.64s; }
.site-mark rect:nth-child(9) { animation-delay: 0.72s; }
.site-mark rect:nth-child(10) { animation-delay: 0.80s; }
.site-mark rect:nth-child(11) { animation-delay: 0.88s; }
@keyframes mark-shift {
  12% { fill: var(--accent); }
}

/* The name stays still; the shimmer from the pen appears only on hover */
.site-name-text {
  font-weight: 700;
  letter-spacing: 0;
  color: var(--fg);
}
.site-name:hover .site-name-text,
.site-name:focus-visible .site-name-text {
  background-image: linear-gradient(to right, var(--fg), var(--fg) 40%, var(--accent) 50%, var(--fg) 60%, var(--fg));
  background-size: 250% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: name-shimmer 2.5s linear infinite;
}
@keyframes name-shimmer {
  to { background-position: -250% center; }
}

  .site-name:hover .site-name-text { background-image: none; -webkit-text-fill-color: var(--fg); }


/* ---- Presence: other readers as crosshairs ---- */
.presence-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
}
.peer-cursor {
  position: absolute;
  top: 0;
  left: 0;
  margin: -9px 0 0 -9px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--peer-color, var(--accent));
  will-change: transform;
}
.peer-cursor span {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.03em;
  color: currentColor;
  background: var(--bg);
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
}
.status [data-presence-count] {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
}

/* ---- Blueprint mode: the site as its own schematic ---- */
/* Footer tools read as links, not chips */
.presence-toggle, .blueprint-toggle, .colophon-toggle {
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  margin-right: 1.25rem;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.presence-toggle:hover, .colophon-toggle:hover { color: var(--fg); border-color: var(--muted); }
.blueprint-toggle:hover, .blueprint-toggle[aria-pressed="true"] { color: #4d94ff; border-color: #4d94ff; }
.presence-toggle[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.colophon-toggle { anchor-name: --colophon-btn; }

html[data-blueprint] body {
  background-image:
    repeating-linear-gradient(to bottom, transparent 0 7px, rgba(77, 148, 255, 0.06) 7px 8px),
    repeating-linear-gradient(to right, transparent 0 99px, rgba(77, 148, 255, 0.06) 99px 100px);
}
html[data-blueprint] [data-spec] {
  outline: 1px dashed rgba(77, 148, 255, 0.5);
  outline-offset: 5px;
  position: relative;
}
html[data-blueprint] [data-spec]::after {
  content: attr(data-spec);
  position: absolute;
  top: -1.5rem;
  right: 0;
  z-index: 10;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: #4d94ff;
  background: var(--bg);
  padding: 0.05rem 0.35rem;
}

/* ---- Cutting edge, quietly: cross-page morphs + scroll-driven reveals ---- */
@view-transition { navigation: auto; }
.site-mark { view-transition-name: site-mark; }

@supports (animation-timeline: view()) {
  .posts li {
    animation: rise both;
    animation-timeline: view();
    animation-range: entry 0% entry 55%;
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
  }
}

  .peer-cursor { transition: none; }



/* ---- Presence states: what the other side is doing ---- */
.peer-cursor .typing { display: none; margin-left: 2px; }
.peer-cursor.state-typing .typing { display: inline-flex; }
.peer-cursor.state-idle { opacity: 0.15; filter: grayscale(0.6); }
.peer-cursor.state-away { opacity: 0.05; }
.peer-cursor.state-away svg circle { stroke-dasharray: 2 3; }


/* ---- 2026 platform layer ---- */

/* Typographic precision */
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
.signup input[type="email"] { field-sizing: content; }

/* Masthead is static — pages begin at the beginning */
.site-header-bg { display: none; }

/* Colophon: native popover, anchored to its button, @starting-style entry */

#colophon {
  max-width: 21rem;
  rotate: -1.1deg;
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1rem 1.25rem;
  box-shadow: 0 10px 24px -18px rgba(35, 28, 18, 0.5);
  font-size: 0.8125rem;
  line-height: 1.55;
}
#colophon h2 { margin: 0 0 0.5rem; font-size: 1rem; letter-spacing: 0; }
#colophon p { margin: 0 0 0.75rem; color: var(--muted); }
#colophon p:last-child { margin-bottom: 0; }

@supports (anchor-name: --a) {
  #colophon {
    position: fixed;
    position-anchor: --colophon-btn;
    position-area: top span-left;
    position-try-fallbacks: top span-right, bottom span-left, top, bottom;
    margin: 0.5rem 0;
  }
}

/* Popover entry/exit with @starting-style — no keyframes, no JS */
#colophon {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    overlay 0.22s ease allow-discrete,
    display 0.22s ease allow-discrete;
}
#colophon:popover-open {
  opacity: 1;
  transform: none;
}
@starting-style {
  #colophon:popover-open {
    opacity: 0;
    transform: translateY(6px);
  }
}



/* ---- Round two ---- */

/* Reading progress: a hairline that fills as you read (scroll timeline, no JS) */
@supports (animation-timeline: scroll()) {
  .read-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform-origin: 0 50%;
    transform: scaleX(0);
    animation: grow-progress linear both;
    animation-timeline: scroll(root);
  }
  @keyframes grow-progress {
    to { transform: scaleX(1); }
  }
}

/* Spring physics for cursors: linear() easing, a slight organic overshoot */
.peer-cursor {
  transition:
    transform 480ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 700ms,
    filter 700ms,
    visibility 700ms;
}
/* sibling-index(): the wordmark stagger becomes arithmetic */
@supports (animation-delay: calc(sibling-index() * 1ms)) {
  .site-name:hover .site-mark rect,
  .site-name:focus-visible .site-mark rect {
    animation-delay: calc(sibling-index() * 0.08s);
  }
  .site-name:hover .site-mark rect:first-child,
  .site-name:focus-visible .site-mark rect:first-child {
    animation-delay: 0.64s; /* the original quirk survives the refactor */
  }
}

  .peer-cursor { transition: none; }


/* Blueprint systems panel: the feature registry, rendered */
.blueprint-systems { display: none; }
html[data-blueprint] .blueprint-systems {
  display: block;
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 300;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  color: #4d94ff;
  background: var(--bg);
  border: 1px dashed rgba(77, 148, 255, 0.5);
  padding: 0.5rem 0.7rem;
  line-height: 1.7;
}
.blueprint-systems b { display: block; font-weight: 600; text-transform: uppercase; margin-bottom: 0.2rem; }
.blueprint-systems i { display: block; font-style: normal; }

/* ---- Reduced motion: one master switch ---- */
@media (prefers-reduced-motion: reduce) {
  .presence-dot, .typing span, .flame,
  .site-mark rect, .site-name-text,
  .posts li, .read-progress { animation: none !important; }
  .read-progress { display: none; }
  .cheese { display: none; }
  .peer-cursor { transition: none; }
  .site-name:hover .site-name-text { background-image: none; -webkit-text-fill-color: var(--fg); }
  #colophon { transition: none; transform: none; opacity: 1; }
}

/* Skip link: first tab stop, visible only when focused */
.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 400;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 6px 6px;
  font-weight: 600;
}
.skip-link:focus {
  top: 0;
  text-decoration: none;
}

/* Print: the words, not the machinery */
@media print {
  .site-header, .site-footer, .signup, .presence-layer,
  .read-progress, .cheese, .skip-link, .post-nav { display: none !important; }
  body { font-size: 11pt; }
  .prose a::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; }
}

/* ---- Pre-AI layer: the 2011 personal site, kept ---- */

/* Nameplate */
.site-name-text { font-size: 1.5rem; letter-spacing: 0; }
.site-mark { width: 30px; height: 30px; }
.site-header .wrap { align-items: center; }
.site-nav a { font-size: 1rem; }

/* One voice everywhere, form controls included */
:where(button, input) { font-family: inherit; }


/* Links underline; visited links remember (the old web kept score) */
.prose a, .lede a, .work p a, #colophon p a {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.prose a:visited { color: #7d5185; }

/* Posts: dates hang in the left margin, archive-style */
.posts li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  column-gap: 1rem;
  align-items: baseline;
  padding: 0;
}
.posts time { grid-column: 1; grid-row: 1; }
.posts a { grid-column: 2; grid-row: 1; }

/* ---- Motion governor: nobody's mouse becomes someone else's problem ---- */
.peer-cursor.jump { transition-duration: 0s, 700ms, 700ms, 700ms; }
.presence-layer.no-anim .peer-cursor { transition: none !important; }

/* ============================================================
   Rhythm layer: one baseline governs everything.
   Unit: --lh = 1.75rem (28px). All type sits on it; all vertical
   space is a multiple of it (halves allowed: 0.875rem).
   Dividers subtract their own border from adjacent padding so
   the grid never drifts. Mono is demoted: at rest the page is
   serif + form controls; mono exists only in code, the x-ray,
   and live cursor labels.
   ============================================================ */

:root { --lh: 1.75rem; }

body { line-height: var(--lh); }

/* Masthead: 1 unit above, half below (minus the 4px double rule) */
.site-header {
  padding: var(--lh) 0 0;
  margin-bottom: 0.875rem;
}
.site-name-text { font-size: 1.375rem; line-height: var(--lh); }
.site-nav a { font-size: 1rem; line-height: var(--lh); }

/* Hero */
.hero { padding: var(--lh) 0 0; }

.field-note .status {
  font-family: inherit;
  font-style: italic;
  font-size: 0.9375rem;
  line-height: var(--lh);
}
.status [data-presence-count] { font-family: inherit; font-size: inherit; }
.hero h1 {
  font-size: 2.75rem;
  line-height: calc(var(--lh) * 2);
  margin: 0 0 0.875rem;
  letter-spacing: 0;
}
.hero p.lede {
  font-size: 1.125rem;
  line-height: var(--lh);
  margin: 0 0 var(--lh);
}

/* Proof: one serif italic line between hairlines, on the grid */

/* Sections */
section.block { padding: 0.875rem 0 0; }
section.block > h2 {
  line-height: var(--lh);
}

/* Signup card: bordered box, grid inside and out */
.signup {
  margin: var(--lh) 0;
  padding: calc(var(--lh) - 1px) 1.75rem;
}
.signup h2 { font-size: 1.125rem; line-height: var(--lh); margin: 0; }
.signup p { font-size: 1rem; line-height: var(--lh); margin: 0 0 0.875rem; }
.signup form { gap: 0.875rem; }
.signup input[type="email"] {
  font-size: 1rem;
  line-height: var(--lh);
  padding: calc(0.4375rem - 1px) 0.875rem;
}
.signup button {
  font-size: 1rem;
  line-height: var(--lh);
  padding: 0.4375rem 1.3125rem;
}
.signup .fine {
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: var(--lh);
  margin: 0.875rem 0 0;
}

/* Work list */
.work li { padding: 0.875rem 0; }
.work h3 { font-size: 1rem; line-height: var(--lh); margin: 0; }
.work p { font-size: 1rem; line-height: var(--lh); }
.work .tag {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
  margin-left: 0.5rem;
}

/* Post lists: serif dates, grid lines */
.posts li { padding: 0; line-height: var(--lh); }
.posts a { font-weight: 400; }
.posts time {
  font-family: inherit;
  font-style: italic;
  font-size: 0.9375rem;
  line-height: var(--lh);
}

/* Articles */
.prose { padding: var(--lh) 0 0; }
.prose h1 { font-size: 1.75rem; line-height: calc(var(--lh) * 1.5); margin: 0 0 0.875rem; }
.prose .meta {
  font-family: inherit;
  font-style: italic;
  font-size: 0.9375rem;
  line-height: var(--lh);
  margin: 0 0 var(--lh);
}
.prose h2 { font-size: 1.25rem; line-height: var(--lh); margin: var(--lh) 0 0.875rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 var(--lh); }
.prose pre { margin: 0 0 var(--lh); line-height: var(--lh); }
.post-nav { margin-top: var(--lh); padding-top: 0; line-height: var(--lh); }

/* Footer */
.site-footer {
  margin-top: calc(var(--lh) * 1.5);
  padding: calc(var(--lh) - 1px) 0 calc(var(--lh) * 2);
  font-size: 0.9375rem;
  line-height: var(--lh);
}
.presence-toggle, .blueprint-toggle, .colophon-toggle { font-size: 0.8125rem; line-height: var(--lh); }
.colophon-toggle { margin-right: 0; }
.signature-contacts a:last-child { margin-right: 0; }

/* The x-ray now shows the true baseline: rows are exactly one unit */
html[data-blueprint] body {
  background-image:
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--lh) - 1px), rgba(77, 148, 255, 0.09) calc(var(--lh) - 1px) var(--lh)),
    repeating-linear-gradient(to right, transparent 0 99px, rgba(77, 148, 255, 0.05) 99px 100px);
}

/* ---- The pairing: Georgia for words, Atkinson for structure ----
   Body, prose, asides: Georgia. Headings, nameplate, nav, controls:
   Atkinson Hyperlegible. Mono stays confined to code and the x-ray. */
:root {
  --sans: "Atkinson Hyperlegible", Verdana, system-ui, sans-serif;
}

body {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 1.0625rem;
}

h1, h2, h3, h4,
.site-name-text,
.site-nav,
.presence-toggle, .blueprint-toggle, .colophon-toggle {
  font-family: var(--sans);
}
:where(button, input) { font-family: var(--sans); }

.prose blockquote { font-style: italic; }

/* ---- Design page specimens ---- */
.swatches {
  list-style: none;
  margin: 0 0 0.875rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.875rem;
}
.swatches li { display: flex; align-items: center; gap: 0.875rem; line-height: var(--lh); }
.swatch { width: 1.75rem; height: 1.75rem; border-radius: 4px; border: 1px solid var(--border); flex: none; }
.specimen p { margin: 0 0 0.875rem; }
.spec-note { font-family: Georgia, serif; font-style: italic; font-size: 0.9375rem; color: var(--muted); margin-top: 0.875rem; }
.spec-sans { font-family: var(--sans); font-size: 1.5rem; font-weight: 700; line-height: var(--lh); }
.spec-serif { font-family: Georgia, serif; font-size: 1.125rem; }
.spec-italic { font-family: Georgia, serif; font-style: italic; }
.spec-mono { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 0.875rem; }
.components { list-style: none; margin: 0; padding: 0; }
.components li {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  column-gap: 1.75rem;
  align-items: start;
  padding: 0.875rem 0;
}
.components .stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: calc(var(--lh) * 2.5);
}
.components h3 { font-size: 1.0625rem; line-height: var(--lh); margin: 0; }
.components p { margin: 0; }
.components .tag {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: 0.5rem;
}
.stage .demo-cursor, .stage .demo-chip { margin: 0; }
.stage .site-mark { width: 34px; height: 34px; }
.stage img { display: inline-block; }
@media (max-width: 540px) {
  .components li { grid-template-columns: 1fr; row-gap: 0.875rem; }
}
.demo-cursor { display: inline-flex; align-items: center; gap: 6px; color: #4dabf7; margin-right: 0.5rem; vertical-align: middle; }
.demo-chip { display: inline-flex; align-items: center; gap: 0.5rem; font-family: Georgia, serif; font-style: italic; font-size: 0.9375rem; color: var(--muted); margin-right: 0.5rem; }

/* Cursor labels: crosshair at rest, name only when it has something to say */
.peer-cursor .peer-label {
  opacity: 0;
  transition: opacity 0.35s;
}
.peer-cursor.show-label .peer-label { opacity: 1; }

/* The signature follows the prose, like a letter; short pages end early */

/* Copyright line links are prose, not a toolbar */
.site-footer .fineprint a { margin-right: 0; }

/* Say hello */
.signature-email {
  margin: 0;
  font-size: 0.8125rem;
  line-height: var(--lh);
}

/* Writing archive: years as landmarks, dates snug against titles */
.year-label {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1rem;
  color: var(--muted);
  line-height: var(--lh);
  margin: var(--lh) 0 0;
}
.posts li { grid-template-columns: 4.25rem 1fr; column-gap: 1.25rem; }
.posts time { text-align: right; }

/* Now list adopts the stage rail: one pattern shared with /design */
.work li {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  column-gap: 1.75rem;
  align-items: start;
}
.work .stage {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(var(--lh) * 2.5);
  color: var(--muted);
}
.work li:hover .stage { color: var(--accent); }
.work-mark-mono {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.125rem;
}
.work-mark-serif {
  font-family: Georgia, serif;
  font-size: 1.5rem;
}
@media (max-width: 540px) {
  .work li { grid-template-columns: 1fr; row-gap: 0.875rem; }
}

/* Post titles morph as one class, on one clock */
::view-transition-group(.post) {
  animation-duration: 300ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Keyword sizes are animatable from here on */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
}

/* Popover links are prose; the footer's toolbar margins stop at its edge */
#colophon a { margin-right: 0; }

/* The letter signs at the bottom right of the footer */
.letter-close address { font-style: normal; }

/* The hand signs in fountain-pen blue; the type confirms it in ink */
.signature-ink {
  width: 10.5rem;
  margin: calc(var(--lh) * 1.5) 0 0;
  color: #26418f;
}
.signature-ink svg { display: block; width: 100%; height: auto; }
/* The signature is written, not shown: strokes appear in drawing
   order when the footer first enters view, once. JS adds will-sign
   before paint and signing on arrival; without JS it is simply there. */
.signature-ink.will-sign path { opacity: 0; }
.signature {
  font-family: Georgia, "Iowan Old Style", serif;
  font-style: italic;
  font-size: 1rem;
  line-height: var(--lh);
  color: var(--fg);
  margin: 0;
}

/* ---- The footer: same sheet of paper, separated by rhythm alone ---- */
.site-footer {
  color: var(--muted);
  border-top: 0;
  padding-top: var(--lh);
  margin-top: calc(var(--lh) * 2.5);
}

/* ---- The birds come alive: banking, ink trails, perches ---- */
.peer-cursor svg { transition: rotate 280ms ease-out; }

.trail {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: currentColor;
  color: var(--accent);
  pointer-events: none;
  animation: trail-fade 700ms ease-out forwards;
}
@keyframes trail-fade {
  from { opacity: 0.4; }
  to { opacity: 0; scale: 0.3; }
}

/* Departure: the bird dissolves upward */
.peer-cursor.depart {
  opacity: 0 !important;
  translate: 0 -10px;
  transition: opacity 0.5s ease-out, translate 0.5s ease-out;
}

/* Arrival: the seal stirs once */
.site-mark.wave-once rect { animation: mark-shift 1.4s 1; }
@supports (animation-delay: calc(sibling-index() * 1ms)) {
  .site-mark.wave-once rect { animation-delay: calc(sibling-index() * 0.08s); }
  .site-mark.wave-once rect:first-child { animation-delay: 0.64s; }
}

/* The Presence API card demos the live room */
.stage-live {
  position: relative;
  overflow: hidden;
  border: 1px dashed var(--border);
}
.stage-live > svg { opacity: 0.22; }
.mini-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: currentColor;
  color: var(--accent);
  transition: left 480ms cubic-bezier(0.22, 1, 0.36, 1), top 480ms cubic-bezier(0.22, 1, 0.36, 1);
}
.mini-self {
  background: transparent;
  border: 1px solid var(--muted);
}


/* ---- The cotton has a tooth: wove grain, two frequencies of it ----
   Fine turbulence for the surface tooth, a broad mottle for the pulp
   formation. Inline SVG noise, seamlessly stitched; no image assets. */
body {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='280'%20height='280'%3E%20%3Cfilter%20id='tooth'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.85'%20numOctaves='2'%20stitchTiles='stitch'%20seed='7'/%3E%3CfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.30%200.30%200.30%200%200'/%3E%3C/filter%3E%20%3Cfilter%20id='pulp'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.045'%20numOctaves='3'%20stitchTiles='stitch'%20seed='11'/%3E%3CfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.32%200.32%200.32%200%200'/%3E%3C/filter%3E%20%3Crect%20width='280'%20height='280'%20filter='url(%23tooth)'%20opacity='0.03'/%3E%20%3Crect%20width='280'%20height='280'%20filter='url(%23pulp)'%20opacity='0.018'/%3E%20%3C/svg%3E");
  background-size: 280px 280px;
}

@media print {
  body { background-image: none; }
}

/* ---- The wire: a US distribution line under the masthead ----
   Readers perch on it as pigeons at their depth in the page;
   left is the top of the document. The birds ride the sag. */
.powerline {
  position: relative;
  height: 3.5rem;
  pointer-events: none;
}
.wire-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--muted);
  opacity: 0.65;
}
.wire-svg path { transition: d 650ms cubic-bezier(0.3, 0.9, 0.35, 1.12); }
.wire-bird {
  position: absolute;
  width: 24px;
  height: 21px;
  margin-left: -11px;
  color: var(--fg);
  opacity: 0.85;
  transition: left 480ms cubic-bezier(0.22, 1, 0.36, 1), top 480ms cubic-bezier(0.22, 1, 0.36, 1);
}
.wire-bird svg { display: block; width: 100%; height: 100%; }

/* Design page wire specimen */
.demo-wire {
  position: relative;
  width: 80%;
  height: 16px;
}
.demo-wire::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  border-bottom: 1px solid var(--muted);
  opacity: 0.7;
}
.demo-wire .wire-bird { top: -15px; }

/* ---- Flight ---- */


/* Empty cursor labels take no space */
.peer-label:empty { display: none; }

/* Airborne: two wing frames alternate like a sprite */
.wire-bird.airborne .w-up { animation: wing-a var(--flapms, 90ms) steps(1) infinite; }
.wire-bird.airborne .w-down { animation: wing-b var(--flapms, 90ms) steps(1) infinite; }
@keyframes wing-a { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes wing-b { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

/* Glide: wings held out, no beat */
.wire-bird.glide .w-up { opacity: 1; animation: none; }
.wire-bird.glide .w-down { opacity: 0; animation: none; }

/* Under the signature, how to reach the signer */
.signature-contacts {
  margin: 0 0 var(--lh);
  font-size: 0.8125rem;
  line-height: var(--lh);
}
.signature-contacts a {
  margin: 0 1.25rem 0 0;
  color: var(--muted);
}
.signature-contacts a:hover { color: var(--accent); }

/* Tools take one short line above the fineprint */
.footer-tools { margin: var(--lh) 0 0; line-height: var(--lh); }

/* The field note: live presence pinned to the page's quiet corner,
   a slip of the same stationery as the colophon */
.field-note {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 250;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.5rem 0.875rem;
  rotate: -1.1deg;
  box-shadow: 0 8px 18px -14px rgba(35, 28, 18, 0.5);
}
.field-note .presence-toggle { margin-right: 0; }
html[data-blueprint] .blueprint-systems { bottom: 6rem; }
@media print {
  .field-note { display: none; }
}

/* Fineprint closes the page, small and quiet, under the signature block */
.site-footer .fineprint { margin-top: 0; font-size: 0.8125rem; }
.site-footer .fineprint a { margin-right: 0; }
