/* drumlinerobot.com — a sibling of culbreath.net: the same dark base and type
   families, its own accents. Two accents carry meaning, one per pillar:
   hickory (the stick's wood) for the robot and anything measured, signal blue
   for the agent loop. */

:root {
  --night: #0b0c13;
  --surface: #141620;
  --surface-2: #1b1e2a;
  --rule: #2a2d39;
  --ink: #ece6dc;
  --ink-2: #b9b3a9;
  --ink-3: #8a857d;
  --hickory: #d6a46a;
  --hickory-soft: rgba(214, 164, 106, 0.14);
  --signal: #8db7d8;
  --signal-soft: rgba(141, 183, 216, 0.13);

  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* A classical scale: 14 16 18 24 36 48 */
  --t-small: 0.875rem;
  --t-ui: 0.9375rem;
  --t-body: 1.0625rem;
  --t-h3: 1.25rem;
  --t-h2: 1.75rem;
  --t-h1: clamp(2.1rem, 5.2vw, 3.4rem);

  --measure: 40rem;
  --wide: 68rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--t-body);
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}
img, svg, audio { max-width: 100%; }
a { color: inherit; text-decoration-color: rgba(236, 230, 220, 0.35);
    text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--hickory); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--night);
        padding: .5rem 1rem; font-family: var(--sans); }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

/* ---------- masthead ---------- */
.masthead { border-bottom: 1px solid var(--rule); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between;
                  gap: 1.5rem; flex-wrap: wrap; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.wordmark { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--serif);
            font-weight: 700; font-size: 1.05rem; text-decoration: none; letter-spacing: .01em; }
.wordmark svg { width: 1.35rem; height: 1.35rem; fill: var(--hickory); }
.wordmark svg circle + circle { opacity: .7; }
.masthead nav { display: flex; gap: 1.6rem; flex-wrap: wrap; font-family: var(--sans);
                font-size: var(--t-ui); }
.masthead nav a { text-decoration: none; color: var(--ink-2); padding: .2rem 0;
                  border-bottom: 1px solid transparent; }
.masthead nav a:hover { color: var(--ink); }
.masthead nav a[aria-current] { color: var(--ink); border-bottom-color: var(--hickory); }
.page-loop .masthead nav a[aria-current] { border-bottom-color: var(--signal); }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.2; margin: 0; }
h1 { font-size: var(--t-h1); letter-spacing: -0.01em; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
p { margin: 0 0 1.1em; }
.prose { max-width: var(--measure); }
/* A .wrap that is also .prose keeps the page's left edge and gutter; only its
   children take the reading measure. */
.wrap.prose { max-width: var(--wide); }
.wrap.prose > * { max-width: var(--measure); }
.prose h2 { margin: 3.2rem 0 1rem; }
.prose h3 { margin: 2.2rem 0 .6rem; }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--ink-3); }
.lede { font-size: 1.2rem; line-height: 1.65; color: var(--ink); max-width: 38rem; }
.note, figcaption, .fine, .caption {
  font-family: var(--sans); font-size: var(--t-small); line-height: 1.6; color: var(--ink-2);
}
.dim { color: var(--ink-3); }
.math { font-style: italic; white-space: nowrap; }
code { font-size: .88em; }

/* ---------- page head ---------- */
.pagehead { padding-top: clamp(3rem, 8vw, 5.5rem); padding-bottom: 1.5rem; }
.pagehead h1 { max-width: 20ch; margin-bottom: 1.4rem; }
section.block { padding: 2.5rem 0; }
section.block > .wrap > h2 { margin-bottom: 1.1rem; }

/* ---------- home: the hero ---------- */
.hero { padding-top: clamp(3rem, 9vw, 6.5rem); }
.film { margin: calc(-1 * clamp(1.5rem, 5vw, 4rem)) auto clamp(1.5rem, 4vw, 2.5rem); }
.film video { display: block; width: 100%; height: auto; aspect-ratio: 12 / 5; background: var(--night); }
.hero h1 { max-width: 19ch; margin-bottom: 1.5rem; }
.trace { margin-top: clamp(2rem, 5vw, 3.5rem); margin-bottom: 0; }
.hero-trace { display: block; width: 100%; height: auto; overflow: visible; }
.hero-trace .head { stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hero-trace .trace { fill: none; stroke: var(--ink); stroke-width: 2.2;
                     vector-effect: non-scaling-stroke; stroke-linejoin: round;
                     stroke-dasharray: 1; stroke-dashoffset: 0; }
.hero-trace .hit { fill: var(--hickory); }
@media (prefers-reduced-motion: no-preference) {
  .hero-trace .trace { animation: draw 2.4s cubic-bezier(.45, 0, .2, 1) .3s both; }
  .hero-trace .hit { animation: land .3s ease-out both; }
  .hero-trace .hit:nth-of-type(1) { animation-delay: 1.15s; }
  .hero-trace .hit:nth-of-type(2) { animation-delay: 1.75s; }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes land { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }
.hero-trace .hit { transform-box: fill-box; transform-origin: center; }
.trace figcaption { margin-top: .9rem; }
.listen { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 1.4rem;
          align-items: center; padding: 1.6rem var(--gutter) 0; }
.listen p { margin: 0; }
audio { width: 100%; height: 40px; color-scheme: dark; }

/* ---------- home: the story ---------- */
.story { padding-top: clamp(3.5rem, 8vw, 5.5rem); }
.story h2 { margin-bottom: 1rem; }

/* ---------- home: the two pillars ---------- */
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem);
           padding-top: clamp(3.5rem, 8vw, 5.5rem); padding-bottom: 1rem; }
.pillar { border-top: 2px solid var(--hickory); padding-top: 1.4rem; }
.pillar.loop { border-top-color: var(--signal); }
.pillar h2 { margin-bottom: .9rem; }
.pillar h2 a { text-decoration: none; }
.pillar .more { font-family: var(--sans); font-size: var(--t-ui); margin: 0; }
.pillar .more a { color: var(--hickory); text-decoration: none; }
.pillar.loop .more a { color: var(--signal); }
.pillar .more a:hover { text-decoration: underline; }

/* ---------- figures ---------- */
figure { margin: 2rem 0; }
figure.wide { max-width: var(--wide); }
figure img, figure object { display: block; width: 100%; height: auto; }
figure.panel img { background: #f6f2ea; border-radius: 6px; }
.figure-doubles { background: var(--surface); border-radius: 8px; padding: clamp(1rem, 3vw, 1.8rem); }
.figure-doubles figcaption { max-width: var(--measure); margin-top: 1rem; }

/* ---------- the hardware list ---------- */
.spec { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .2rem 1.6rem;
        margin: 1.4rem 0 0; max-width: 46rem; }
.spec dt { font-family: var(--sans); font-size: var(--t-ui); font-weight: 500; color: var(--hickory);
           padding-top: .9rem; border-top: 1px solid var(--rule); }
.spec dd { margin: 0; padding-top: .8rem; border-top: 1px solid var(--rule); color: var(--ink-2); }
.spec dd p { margin: 0 0 .9rem; }

/* ---------- takes ---------- */
.takes { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.8rem;
         max-width: 46rem; }
.takes h3 { margin-bottom: .35rem; }
.takes p { color: var(--ink-2); margin: 0 0 .7rem; }
figure.take { margin: 1.5rem 0; }
figure.take figcaption { margin-top: .5rem; }

/* ---------- goals table ---------- */
.tablewrap { overflow-x: auto; margin: 1.4rem 0; }
table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: var(--t-ui);
        font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .7rem 1rem .7rem 0; border-bottom: 1px solid var(--rule);
         vertical-align: top; }
thead th { color: var(--ink-3); font-weight: 500; font-size: var(--t-small); }
tbody th { font-weight: 500; color: var(--ink); }
tbody td { color: var(--ink-2); }
table.goals { min-width: 36rem; }

/* ---------- the loop ---------- */
.credit { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem);
          margin: 1.6rem 0 0; }
.credit > div { border-top: 2px solid var(--hickory); padding-top: 1.1rem; }
.credit > div.agents { border-top-color: var(--signal); }
.credit h3 { margin-bottom: .7rem; }
.credit ul { padding-left: 1.1rem; margin: 0; color: var(--ink-2); }
.credit li { margin-bottom: .35em; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 2rem 0 0;
         max-width: 46rem; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 2rem 3.6rem; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: .05rem;
  width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--sans); font-size: var(--t-ui); font-weight: 600; color: var(--signal);
  border: 1px solid var(--signal); background: var(--night); z-index: 1;
}
.steps > li::after { content: ""; position: absolute; left: 1.1rem; top: 2.3rem; bottom: .2rem;
                     width: 1px; background: var(--rule); }
.steps > li:last-child::after { display: none; }
.steps > li.bench::before { color: var(--hickory); border-color: var(--hickory); }
.steps h3 { margin-bottom: .35rem; }
.steps p { color: var(--ink-2); margin: 0; }

.lessons { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid;
           grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1.6rem 2.4rem; }
.lessons li { border-left: 2px solid var(--rule); padding-left: 1.1rem; }
.lessons .went { color: var(--ink); margin: 0 0 .5rem; }
.lessons .now { color: var(--ink-2); margin: 0; font-family: var(--sans); font-size: var(--t-ui);
                line-height: 1.6; }
.lessons .now b { color: var(--signal); font-weight: 600; }

.night { list-style: none; padding: 0; margin: 1.8rem 0 0; max-width: 48rem; }
.night li { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr); gap: 1.2rem;
            padding: .85rem 0; border-top: 1px solid var(--rule); }
.night time { font-family: var(--sans); font-variant-numeric: tabular-nums; font-size: var(--t-ui);
              color: var(--signal); padding-top: .15rem; }
.night li.drum time { color: var(--hickory); }
.night p { margin: 0; color: var(--ink-2); }
.night p strong { color: var(--ink); font-weight: 400; }


/* ---------- progress ---------- */
.posts { list-style: none; padding: 0; margin: 1.4rem 0 0; max-width: var(--measure); }
.posts li { padding: 1.2rem 0; border-top: 1px solid var(--rule); }
.posts time { display: block; font-family: var(--sans); font-size: var(--t-small); color: var(--ink-3); }
.posts a { font-size: var(--t-h3); text-decoration: none; }
.posts a:hover { text-decoration: underline; }
.posts p { margin: .35rem 0 0; color: var(--ink-2); }
.empty { font-family: var(--sans); font-size: var(--t-ui); color: var(--ink-2);
         border-left: 2px solid var(--rule); padding-left: 1rem; max-width: var(--measure); }
.latest { padding-top: 3rem; padding-bottom: 2rem; }
.latest h2 { margin-bottom: .4rem; }

.post { padding-top: clamp(2.5rem, 7vw, 4.5rem); padding-bottom: 2rem; }
.post .crumb { font-family: var(--sans); font-size: var(--t-small); margin-bottom: 1.5rem; }
.post .crumb a { color: var(--ink-3); }
.post h1 { font-size: clamp(1.9rem, 4.4vw, 2.7rem); margin-bottom: 1rem; }
.post .dek { font-size: 1.15rem; color: var(--ink-2); }
.post .byline { font-family: var(--sans); font-size: var(--t-small); color: var(--ink-3);
                margin-bottom: 2.4rem; }
.provenance { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.provenance p { font-family: var(--sans); font-size: var(--t-small); color: var(--ink-3); }

/* ---------- media ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
           gap: 2rem; margin-top: 1.5rem; }
.gallery figure { margin: 0; }
.gallery img { border-radius: 6px; background: var(--surface); }
.label-sim { color: var(--signal); }
.label-bench { color: var(--hickory); }

/* ---------- footer ---------- */
.colophon { border-top: 1px solid var(--rule); margin-top: 4rem; padding: 2rem 0 3rem; }
.colophon p { font-family: var(--sans); font-size: var(--t-ui); color: var(--ink-2);
              max-width: 44rem; margin: 0 0 .6rem; }
.colophon .fine { color: var(--ink-3); font-size: var(--t-small); }

@media (max-width: 760px) {
  .pillars, .credit { grid-template-columns: 1fr; }
  .listen { grid-template-columns: 1fr; }
  .spec { grid-template-columns: 1fr; }
  .spec dd { border-top: 0; padding-top: 0; }
  .night li { grid-template-columns: 1fr; gap: .2rem; }
  .masthead nav { gap: 1.1rem; }
}
