/* the blog as a spacecraft datasheet: a white sheet on a star chart, condensed titles,
   numbered sections, thin-ruled tables, one signal-yellow accent, and a few orbits.
   The island uses the same colour variables. */

@font-face { font-family: "Barlow Condensed"; src: url("/static/fonts/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/static/fonts/barlow-condensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/static/fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/static/fonts/barlow-400-ext.woff2") format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; src: url("/static/fonts/barlow-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/static/fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/static/fonts/barlow-600.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/static/fonts/jetbrains-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --body: "Barlow", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --title: "Barlow Condensed", "Arial Narrow", var(--body);
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --text: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /* the island's labels */
  --sheet: 54rem;

  --paper: #eeede8;   /* the desk */
  --card: #ffffff;    /* the sheet */
  --ink: #17191e;
  --quiet: #5d626d;
  --pen: #f5c400;     /* signal yellow: fills, stripes, borders */
  --pen-ink: #7a5c00; /* the accent as text: yellow is unreadable on white, so a dark ochre */
  --on-pen: #17191e;  /* text on a yellow fill */
  --rule: #d6d4cc;
  --zebra: #f6f5f1;
  --grid: #e2e0d9;
  --ok: #1d8a5a;
  --strip: #17191e; --on-strip: #f2f0ea; /* the header strip: dark either way */
  --star: #a9a697;    /* light: a printed star chart */
  --orbit: #c9c6ba;
  --planet-a: #e9e6dc; --planet-b: #d9d5c7;
  --pen-soft: color-mix(in srgb, var(--pen) 12%, transparent);
  --sky-top: #a9d8ff; --sky-bottom: #f1ecff;
  --shadow: 0 1px 2px #1c20300d, 0 8px 24px -8px #1c203026;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #07080c; --card: #15181e; --ink: #e8e6e0; --quiet: #9399a4; --pen: #ffd02e; --pen-ink: #ffd02e; --on-pen: #0f1114;
    --rule: #2c3038; --zebra: #1a1d24; --grid: #0e1016; --ok: #4cc38a; --strip: #08090b;
    --star: #dfe3ff; --orbit: #2a2f3d; --planet-a: #2b2540; --planet-b: #141824;
    --sky-top: #070b22; --sky-bottom: #2b2352; --shadow: 0 1px 2px #0006, 0 8px 24px -8px #000a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #07080c; --card: #15181e; --ink: #e8e6e0; --quiet: #9399a4; --pen: #ffd02e; --pen-ink: #ffd02e; --on-pen: #0f1114;
  --rule: #2c3038; --zebra: #1a1d24; --grid: #0e1016; --ok: #4cc38a; --strip: #08090b;
    --star: #dfe3ff; --orbit: #2a2f3d; --planet-a: #2b2540; --planet-b: #141824;
  --sky-top: #070b22; --sky-bottom: #2b2352; --shadow: 0 1px 2px #0006, 0 8px 24px -8px #000a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 17px/1.6 var(--body); -webkit-font-smoothing: antialiased;
  background-color: var(--paper);
  /* a few layers of stars, each tiled at an odd size so they don't line up, over a faint grid */
  background-image:
    radial-gradient(1.2px 1.2px at 23px 41px, var(--star) 50%, transparent 52%),
    radial-gradient(1px 1px at 151px 97px, var(--star) 50%, transparent 52%),
    radial-gradient(1.6px 1.6px at 87px 183px, var(--star) 50%, transparent 52%),
    radial-gradient(1px 1px at 205px 12px, var(--star) 50%, transparent 52%),
    radial-gradient(2px 2px at 61px 129px, var(--star) 50%, transparent 52%),
    linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 211px 197px, 263px 241px, 331px 307px, 173px 229px, 467px 433px, 24px 24px, 24px 24px;
}
/* a second, sparser layer that twinkles */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(1.6px 1.6px at 40px 60px, var(--star) 50%, transparent 52%), radial-gradient(1.2px 1.2px at 130px 20px, var(--star) 50%, transparent 52%);
  background-size: 389px 353px, 293px 277px;
  animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .15; } to { opacity: 1; } }

/* orbits behind the sheet, with a satellite going round (see base.html) */
.orbits { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.orbits .ring { fill: none; stroke: var(--orbit); stroke-width: 1.2; stroke-dasharray: 2 7; }
.orbits .ring.solid { stroke-dasharray: none; }
.orbits .planet { fill: url(#planet-shade); }
.orbits .sat { fill: var(--pen); }
.orbits .sat-trail { fill: none; stroke: var(--pen); stroke-width: 1.5; opacity: .5; }
/* moving stars, linked when they come close (graph.js) */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } .orbits animateMotion { display: none; } }
::selection { background: var(--pen); color: var(--on-pen); }

a { color: inherit; text-decoration: underline; text-decoration-color: var(--pen); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--pen-ink); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--title); font-weight: 700; line-height: 1.1; letter-spacing: .01em; }
h1 { font-size: 3rem; margin: 0 0 .5rem; text-transform: uppercase; }
h2 { font-size: 1.5rem; margin: 2.5rem 0 .8rem; text-transform: uppercase; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1rem; }
.quiet { color: var(--quiet); }
.accent { color: var(--pen-ink); }
.mono, code, kbd, .when, time { font-family: var(--mono); }

/* status: ● active */
.badge { font: 500 .72rem var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--quiet); white-space: nowrap; margin-left: .5rem; vertical-align: middle; }
.badge::before { content: "●"; margin-right: .3em; }
.badge.on { color: var(--ok); }
.badge.away { color: var(--pen-ink); }

/* the header strip, across the top of the desk */
.strip { background: var(--strip); color: var(--on-strip); border-bottom: 3px solid var(--pen); }
.strip .bar { max-width: var(--sheet); margin: 0 auto; padding: .55rem 1.5rem; display: flex; align-items: center; gap: 1.25rem; }
.mark { display: flex; align-items: center; gap: .55rem; margin-right: auto; text-decoration: none; color: inherit; }
.mark:hover { color: inherit; }
/* T+ 2158d 04:12:09 */
.clock { font: .72rem var(--mono); letter-spacing: .04em; opacity: .7; white-space: nowrap; }
.clock b { color: var(--pen); font-weight: 400; }
.mark b { font: 700 1.25rem var(--title); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.strip nav { display: flex; gap: .1rem; }
.strip nav a { font: 600 .95rem var(--title); text-transform: uppercase; letter-spacing: .06em; color: inherit; opacity: .75; text-decoration: none; padding: .2rem .55rem; white-space: nowrap; }
.strip nav a:hover { opacity: 1; color: inherit; }
.strip nav a.here { opacity: 1; box-shadow: inset 0 -2px 0 var(--pen); }
.strip .theme { font: .72rem var(--mono); text-transform: uppercase; letter-spacing: .04em; color: inherit; opacity: .75; background: none; border: 1px solid currentColor; padding: .15rem .5rem; cursor: pointer; white-space: nowrap; }
.strip .theme:hover { opacity: 1; }

/* the sheet */
main.sheet {
  max-width: var(--sheet); margin: 2rem auto 0; padding: 2.5rem 3rem 3rem; background: var(--card);
  border: 1px solid var(--rule); box-shadow: 0 18px 40px -28px #0005; counter-reset: section;
}
/* the running head at the top of each sheet */
.running { display: flex; justify-content: space-between; gap: 1rem; font: .72rem var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--quiet); border-bottom: 1px solid var(--rule); padding-bottom: .5rem; margin-bottom: 2rem; }

footer { max-width: var(--sheet); margin: 0 auto 2rem; padding: .9rem 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; font: .75rem var(--mono); color: var(--quiet); }
footer p { margin: 0; }
footer a { text-decoration-thickness: 1px; }

/* numbered sections: 1 WRITING ——— all of it → */
.section { margin-top: 3rem; }
.section-head { display: flex; align-items: baseline; gap: .8rem; border-bottom: 2px solid var(--ink); padding-bottom: .3rem; margin-bottom: 1rem; }
.section-head h2 { margin: 0; flex: 1; }
.section-head h2::before { counter-increment: section; content: counter(section); display: inline-block; min-width: 1.6em; color: var(--pen-ink); }
.section-head a { font: .75rem var(--mono); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; text-decoration: none; color: var(--quiet); }
.section-head a:hover { color: var(--pen-ink); }

/* home: laid out like a résumé. A hero card, then a narrow column next to a wide one, then
   the work as cards. Cards are sheets: paper white, an ink edge, square corners. */
/* the home page is wider than a sheet: the header and footer line up with it */
body[data-page="home"] .strip .bar, body[data-page="home"] footer { max-width: 70rem; }
main.home { max-width: 70rem; margin: 2rem auto 0; padding: 0 1.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
main.home > .join { margin: 0; }
.card { background: var(--card); border: 1px solid var(--ink); padding: 1.4rem 1.5rem; min-width: 0; }
.card h2 { display: flex; align-items: center; gap: .6rem; margin: 0 0 1.1rem; font-size: 1.35rem; }
.card h2 .ico { width: 1.9rem; height: 1.9rem; padding: .3rem; flex: none; background: var(--pen); stroke: var(--on-pen); }
.ico { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.card-head h2 { margin: 0; }
.card-links { display: flex; gap: 1rem; flex-wrap: wrap; margin: 0; font: .78rem var(--mono); }
.card-more { margin: 1.2rem 0 0; font: .8rem var(--mono); }

/* the hero */
.hero { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center; background: var(--card); border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--pen); padding: 2rem 2.2rem; }
.hero-photo { width: 9.5rem; aspect-ratio: 1; border: 2px solid var(--ink); background: var(--pen); display: grid; place-items: center; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo span { font: 700 4.2rem/1 var(--title); color: var(--on-pen); letter-spacing: .02em; }
.kicker { display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; font: .76rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--pen-ink); }
.kicker::before { content: ""; width: .55rem; height: .55rem; background: var(--pen); flex: none; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: .95; margin: 0 0 .5rem; }
.hero-line { margin: 0 0 1rem; font-size: 1.15rem; color: var(--quiet); }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1.2rem; }
.chip { font: .8rem var(--mono); text-decoration: none; border: 1px solid var(--rule); background: var(--zebra); padding: .2rem .6rem; }
.chip:hover { border-color: var(--pen); color: var(--pen-ink); }
.hero-go { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; }
.btn.ghost { background: none; color: var(--ink); border: 1px solid var(--ink); }
.btn.ghost:hover { color: var(--ink); border-color: var(--pen); background: var(--pen-soft); filter: none; }

/* the two columns */
.cv { display: grid; grid-template-columns: minmax(15rem, 1fr) 2.3fr; gap: 1.5rem; align-items: start; }
.cv-side, .cv-main { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.about { margin: 0 0 1.1rem; font-size: .98rem; line-height: 1.6; }
.contact { margin: 0; display: grid; gap: .1rem; }
.contact dt { font: .68rem var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--quiet); margin-top: .55rem; }
.contact dd { margin: 0; font-size: .95rem; overflow-wrap: anywhere; }
.now { list-style: none; margin: 0; padding: 0; }
.now li { position: relative; padding: .25rem 0 .25rem 1.1rem; font-size: .95rem; line-height: 1.4; }
.now li::before { content: ""; position: absolute; left: 0; top: .7em; width: .45rem; height: .45rem; background: var(--pen); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.tags span { font: .74rem var(--mono); border: 1px solid var(--rule); background: var(--zebra); padding: .12rem .45rem; }

/* timelines: when on the left, a line with a mark, then what */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1.4rem; position: relative; padding-bottom: 1.4rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 10.2rem; top: .45rem; bottom: -.45rem; width: 1px; background: var(--rule); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: calc(10.2rem - 4px); top: .4rem; width: 9px; height: 9px; background: var(--card); border: 1.5px solid var(--ink); }
.timeline li.now::after { background: var(--pen); }
.tl-when { font: .78rem var(--mono); color: var(--quiet); padding-top: .15rem; text-align: right; }
.timeline li.now .tl-when { color: var(--pen-ink); }
.tl-what { padding-left: 1.2rem; }
.tl-what h3 { margin: 0; font: 600 1.08rem/1.3 var(--body); text-transform: none; letter-spacing: 0; }
.tl-what h3 a { text-decoration: none; }
.tl-what h3 a:hover { text-decoration: underline; text-decoration-color: var(--pen); }
.tl-where { margin: .1rem 0 0; font-size: .92rem; color: var(--quiet); }
.tl-what p:not(.tl-where) { margin: .4rem 0 0; font-size: .95rem; line-height: 1.5; }
.flag { font: .7rem var(--mono); color: var(--pen-ink); border: 1px solid var(--pen); padding: 0 .3rem; vertical-align: middle; }

/* the work */
.feature { display: grid; grid-template-columns: 1.25fr 1fr; border: 1px solid var(--ink); margin-bottom: 1.2rem; }
.feature-pic { display: block; background: var(--strip); border-right: 1px solid var(--ink); }
.feature-pic img { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 10; max-height: 22rem; object-fit: cover; }
.feature-text { padding: 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .6rem; }
.feature-text h3 { margin: 0; font-size: 1.7rem; }
.feature-text h3 a, .work-text h3 a { text-decoration: none; }
.feature-text h3 a:hover, .work-text h3 a:hover { text-decoration: underline; text-decoration-color: var(--pen); }
.feature-text p { margin: 0; line-height: 1.55; }
.feature-text .feature-caption { font: .78rem/1.5 var(--mono); color: var(--quiet); border-left: 3px solid var(--pen); padding-left: .6rem; }
.feature-text .feature-go { margin-top: auto; padding-top: .4rem; }
.work-meta { display: flex; justify-content: space-between; gap: 1rem; margin: 0; font: .72rem var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--quiet); }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.work-card { display: flex; flex-direction: column; border: 1px solid var(--ink); background: var(--card); transition: transform .15s, box-shadow .15s; }
.work-card:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--pen); }
.work-pic { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--ink); background: var(--strip); }
.work-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* no picture: a scrap of drawing paper with what it's made of */
.work-pic.blank { aspect-ratio: 3 / 1; display: grid; place-items: center; text-decoration: none; background-color: var(--zebra); background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px); background-size: 16px 16px; }
.work-pic.blank span { font: 700 1.05rem var(--title); text-transform: uppercase; letter-spacing: .04em; color: var(--ink); background: var(--card); border: 1px solid var(--ink); padding: .15rem .6rem; box-shadow: 3px 3px 0 var(--pen); }
.work-text { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .4rem; }
.work-text h3 { margin: 0; font-size: 1.2rem; }
.work-text p:not(.work-meta) { margin: 0; font-size: .92rem; line-height: 1.5; color: var(--quiet); }

/* the writing */
.posts { list-style: none; margin: 0; padding: 0; }
.posts li { display: grid; grid-template-columns: auto 1fr auto; gap: .3rem 1rem; align-items: baseline; padding: .6rem 0; border-bottom: 1px solid var(--rule); }
.posts li:last-child { border-bottom: 0; }
.posts a { font-weight: 600; }
.posts span { color: var(--quiet); font-size: .93rem; }
.posts time { font-size: .78rem; color: var(--quiet); }

/* papers & reports, like a publication list */
.papers { list-style: none; margin: 0; padding: 0; }
.papers li { display: grid; grid-template-columns: 4rem 1fr; gap: 1.2rem; padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.papers li:first-child { padding-top: .2rem; }
.papers li:last-child { border-bottom: 0; padding-bottom: 0; }
.papers .tl-when { text-align: left; padding-top: .3rem; }
.papers h3 { margin: 0 0 .25rem; font-size: 1.15rem; }
.papers h3 a { text-decoration: none; }
.papers h3 a:hover { text-decoration: underline; text-decoration-color: var(--pen); }
.papers .authors { margin: 0 0 .45rem; font-size: .93rem; color: var(--quiet); }
.papers .authors b { color: var(--ink); font-weight: 600; }
.paper-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .9rem; font: .78rem var(--mono); color: var(--quiet); }
.paper-meta .doc { color: var(--ink); text-decoration: none; border: 1px solid var(--ink); padding: .05rem .45rem; }
.paper-meta .doc:hover { background: var(--pen-soft); border-color: var(--pen); }
.paper-meta small { font-size: .65rem; opacity: .65; text-transform: uppercase; }

@media (max-width: 900px) {
  /* one column: about, then what you did, then the rest of the side column */
  .cv { display: flex; flex-direction: column; }
  .cv-side, .cv-main { display: contents; }
  .cv .card { order: 2; }
  .cv .card.later { order: 3; }
  .cv-side .card:first-child { order: 1; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-template-columns: 1fr; }
  .feature-pic { border-right: 0; border-bottom: 1px solid var(--ink); }
}
@media (max-width: 600px) {
  .papers li { grid-template-columns: 1fr; gap: .2rem; }
  main.home { padding: 0 1rem; margin-top: 1rem; gap: 1rem; }
  .hero { grid-template-columns: 1fr; padding: 1.4rem; gap: 1.2rem; }
  .hero-photo { width: 5.5rem; }
  .hero-photo span { font-size: 2.4rem; }
  .card { padding: 1.1rem 1rem; }
  .work-grid { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: .2rem; padding-left: 1.4rem; }
  .timeline li::before { left: 4px; }
  .timeline li::after { left: 0; }
  .tl-when { text-align: left; }
  .tl-what { padding-left: 0; }
  .posts li { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .work-card { transition: none; } }

/* home: the way into the world, a big yellow plate you can't miss */
.join {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.2rem 1.6rem;
  margin: 2.2rem 0 .6rem; padding: 1.3rem 1.5rem 1.3rem 2.6rem; text-decoration: none; color: var(--on-pen);
  background: var(--pen); border: 2px solid var(--on-pen); box-shadow: 8px 8px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
}
/* hazard stripes down the left edge */
.join::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1.1rem; border-right: 2px solid var(--on-pen);
  background: repeating-linear-gradient(-45deg, var(--on-pen) 0 8px, var(--pen) 8px 16px);
}
.join:hover { color: var(--on-pen); transform: translate(-3px, -3px); box-shadow: 11px 11px 0 var(--ink); }
.join:active { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--ink); }
.join:focus-visible { outline: 3px solid var(--pen); outline-offset: 4px; }
.join-who { display: flex; }
.join-who img { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--on-pen); background: var(--card); object-fit: cover; }
.join-who img + img { margin-left: -16px; }
.join:hover .join-who img { animation: hop .5s cubic-bezier(.3, 1.7, .5, 1); }
.join:hover .join-who img:nth-child(2) { animation-delay: .05s; }
.join:hover .join-who img:nth-child(3) { animation-delay: .1s; }
.join:hover .join-who img:nth-child(4) { animation-delay: .15s; }
.join:hover .join-who img:nth-child(5) { animation-delay: .2s; }
@keyframes hop { 40% { transform: translateY(-9px); } }
.join-text b { display: block; font: 700 2.5rem/1 var(--title); text-transform: uppercase; letter-spacing: .02em; }
.join-text span { display: block; margin-top: .35rem; font-size: 1rem; line-height: 1.4; }
.join-go { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; }
.join-here { font: .78rem var(--mono); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.join-btn { font: 700 1.5rem var(--title); text-transform: uppercase; letter-spacing: .06em; color: var(--pen); background: var(--on-pen); padding: .45rem 1.3rem; white-space: nowrap; }
.join-btn span { display: inline-block; transition: transform .15s; }
.join:hover .join-btn span { transform: translateX(5px); }
@media (max-width: 760px) {
  .join { grid-template-columns: 1fr; padding: 1.2rem 1.2rem 1.2rem 2.4rem; gap: .9rem; }
  .join-text b { font-size: 2rem; }
  .join-go { align-items: stretch; }
  .join-btn { text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .join, .join-btn span { transition: none; } .join:hover .join-who img { animation: none; } }

/* tables, datasheet style */
.spec { width: 100%; border-collapse: collapse; font-size: .95rem; }
.spec th { text-align: left; font: 600 .78rem var(--title); text-transform: uppercase; letter-spacing: .08em; color: var(--quiet); padding: .35rem .6rem; border-bottom: 1px solid var(--ink); }
.spec td { padding: .55rem .6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.spec tbody tr:nth-child(even) { background: var(--zebra); }
.spec tbody tr:hover { background: var(--pen-soft); }
.spec td:first-child, .spec th:first-child { padding-left: .2rem; }
.spec .name a { font-weight: 600; text-decoration: none; }
.spec td.part { white-space: nowrap; }
.spec .name a:hover { text-decoration: underline; text-decoration-color: var(--pen); }
.spec .num { font: .82rem var(--mono); color: var(--quiet); white-space: nowrap; }
.spec .right { text-align: right; }
.spec .desc { color: var(--quiet); }
.spec .stack { font: .75rem var(--mono); color: var(--quiet); }
.table-wrap { overflow-x: auto; }

/* the mission log as a git graph: lanes are lines, steps are commits */
.log { --dot: 1.3rem; --l1: 12px; --l2: 34px; }
.log .lanes-head, .log td.lanes { width: 46px; padding: 0 !important; }
.log td.lanes { position: relative; }
.log td.lanes i { position: absolute; display: block; }
.log td.lanes .main { left: calc(var(--l1) - 1px); width: 2px; top: 0; bottom: 0; background: var(--quiet); }
.log td.lanes.first .main { top: var(--dot); }
.log td.lanes.last .main { bottom: calc(100% - var(--dot)); }
/* the side lane: straight on, or curving in from the main line (fork, below) and back to it (merge, above) */
.log td.lanes .up { left: calc(var(--l2) - 1px); width: 2px; top: 0; height: var(--dot); background: var(--pen); }
.log td.lanes .down { left: calc(var(--l2) - 1px); width: 2px; top: var(--dot); bottom: 0; background: var(--pen); }
.log td.lanes .merge { left: var(--l1); width: calc(var(--l2) - var(--l1)); top: 0; height: var(--dot); border: 2px solid var(--pen); border-left: 0; border-bottom: 0; border-top-right-radius: 14px; margin-left: -1px; }
.log td.lanes .fork { left: var(--l1); width: calc(var(--l2) - var(--l1)); top: var(--dot); bottom: 0; border: 2px solid var(--pen); border-left: 0; border-top: 0; border-bottom-right-radius: 14px; margin-left: -1px; }
.log .commit { position: absolute; left: calc(var(--l1) - 6px); top: calc(var(--dot) - 6px); width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2px solid var(--quiet); z-index: 1; }
.log .commit.side { left: calc(var(--l2) - 6px); border-color: var(--pen); }
.log .commit.head { background: var(--pen); border-color: var(--pen); box-shadow: 0 0 0 3px var(--pen-soft); }
.log tbody tr:nth-child(even) td.lanes .commit { background: var(--zebra); }
.log tbody tr:nth-child(even) td.lanes .commit.head { background: var(--pen); }
/* git-style refs: HEAD → main, exchange */
.ref { display: inline-block; font: .68rem var(--mono); padding: 0 .35rem; margin-right: .45rem; vertical-align: .1em; border: 1px solid var(--quiet); color: var(--quiet); white-space: nowrap; }
.ref.side { border-color: var(--pen); color: var(--pen-ink); }

/* lists of other things (tags) */
.tagbar { display: flex; flex-wrap: wrap; gap: .3rem; margin: 1.25rem 0 1rem; }
.tagbar a { font: .75rem var(--mono); text-transform: uppercase; text-decoration: none; color: var(--quiet); border: 1px solid var(--rule); padding: .1rem .5rem; }
.tagbar a:hover { color: var(--ink); border-color: var(--ink); }
.tagbar a.here { color: var(--on-pen); background: var(--pen); border-color: var(--pen); }
.row-title { margin: 3rem 0 .2rem; font-size: 1.5rem; border-bottom: 2px solid var(--ink); padding-bottom: .3rem; }
.year { font: 600 1.05rem var(--title); text-transform: uppercase; letter-spacing: .05em; margin: 1.5rem 0 .4rem; }
.lead { font-size: 1.2rem; color: var(--quiet); margin-bottom: 1.5rem; }
.doc-title .note { margin: -.75rem 0 1.5rem; font: .8rem/1.5 var(--mono); color: var(--quiet); border-left: 3px solid var(--pen); padding: .2rem 0 .2rem .7rem; }
.aside { font-size: .9rem; color: var(--quiet); }
.more { font: .8rem var(--mono); }

/* a page: title block, then the text */
.doc-title h1 { font-size: 3rem; }
.byline { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 2rem; font: .78rem var(--mono); color: var(--quiet); }
.byline > * { border: 1px solid var(--rule); margin: -1px 0 0 -1px; padding: .2rem .6rem; }
.byline a { text-decoration: none; }
.byline a:hover { color: var(--pen-ink); }
.btn { display: inline-flex; align-items: center; gap: .4rem; font: 500 .85rem var(--mono); text-decoration: none; color: var(--on-pen); background: var(--pen); padding: .35rem .85rem; }
.btn:hover { color: var(--on-pen); filter: brightness(1.08); }
p.go { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn small { font-size: .68rem; opacity: .65; text-transform: uppercase; letter-spacing: .06em; }
.prose { font-size: 1.05rem; line-height: 1.7; }
.prose h2 { font-size: 1.45rem; margin-top: 2.5rem; padding-left: .7rem; border-left: 4px solid var(--pen); }
.prose h3 { font-size: 1.2rem; margin: 2rem 0 .5rem; }
.prose img { max-width: 100%; height: auto; }
.shot { margin: 1.75rem 0; border: 2px solid var(--ink); background: var(--card); box-shadow: 5px 5px 0 var(--pen); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { font: .75rem var(--mono); color: var(--quiet); padding: .4rem .7rem; border-top: 1px solid var(--rule); }
.prose mark { background: var(--pen-soft); color: inherit; padding: 0 .2em; }
.prose blockquote { margin: 1.75rem 0; padding: .6rem 1rem; background: var(--zebra); border-left: 4px solid var(--ink); color: var(--quiet); }
.prose code { font-size: .86em; }
.prose :not(pre) > code { background: var(--zebra); border: 1px solid var(--rule); padding: .05em .35em; }
.prose pre { font-size: .85rem; line-height: 1.55; padding: 1rem 1.2rem; overflow-x: auto; background: var(--zebra); border: 1px solid var(--rule); border-left: 4px solid var(--pen); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
.prose table { border-collapse: collapse; font-size: .9rem; margin: 1.5rem 0; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: .4rem .8rem .4rem 0; border-bottom: 1px solid var(--rule); }
.prose th { font: 600 .78rem var(--title); text-transform: uppercase; letter-spacing: .08em; color: var(--quiet); border-bottom-color: var(--ink); }
.prose li::marker { color: var(--pen-ink); }
.prose ul:has(input[type=checkbox]) { list-style: none; padding-left: 0; }

/* a GitHub README, as an appendix */
.readme { margin-top: 3rem; border: 1px solid var(--rule); }
.readme-head { display: flex; align-items: center; gap: .7rem; margin: 0; padding: .4rem .8rem; background: var(--zebra); border-bottom: 1px solid var(--rule); font: .78rem var(--mono); }
.readme-head span { font: 700 .9rem var(--title); text-transform: uppercase; letter-spacing: .06em; color: var(--pen-ink); }
.readme > .prose, .readme > .quiet { padding: 1rem 1.3rem; margin: 0; }
.readme .prose { font-size: .95rem; overflow-wrap: anywhere; }
.readme .prose h1 { font-size: 1.7rem; }
.readme .prose h2 { font-size: 1.25rem; }
.readme .prose img { display: inline-block; vertical-align: middle; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1rem; border-top: 2px solid var(--ink); font: .8rem var(--mono); }
.pager a { text-decoration: none; }
.pager a:hover { color: var(--pen-ink); }
.pager a:last-child { text-align: right; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .clock { display: none; }
  main.sheet { margin-top: 0; padding: 1.5rem 1.1rem 2.5rem; border-left: 0; border-right: 0; }
  h1, .doc-title h1 { font-size: 2.3rem; }
  .strip .bar { flex-wrap: wrap; gap: .3rem 1rem; padding: .5rem 1.1rem; }
  .strip nav { order: 3; width: 100%; margin-left: -.55rem; overflow-x: auto; scrollbar-width: none; }
  .strip nav::-webkit-scrollbar { display: none; }
  .spec .hide-s { display: none; }
  footer { padding: .9rem 1.1rem; }
}
