/* =========================================================
   garrett michaud — reading pages (field notes, and later scripts)
   Same look as the main page: white, Helvetica, blue.
   Anything long-form that is mostly TEXT should use this file.
   ========================================================= */

:root {
  --blue: rgba(8, 0, 255, 0.47);   /* the see-through blue (big headings only) */
  --blue-solid: #0800ff;           /* links + small text, so it stays readable */
  --ink: #111;
  --dim: #6b6b6b;
  --line: #e6e6e6;
  --sans: "Helvetica Neue", Helvetica, "Nimbus Sans", Arial, sans-serif;
  --edge: 8.4vw;                   /* left/right margin, same as the name on the main page */
}
@media (max-width: 760px) { :root { --edge: 5vw; } }

*, *::before, *::after { box-sizing: border-box; }

html { background: #fff; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--blue-solid); color: #fff; }
a { color: var(--blue-solid); }
:focus-visible { outline: 2px solid var(--blue-solid); outline-offset: 3px; }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 2.4vw, 1.75rem) var(--edge) 0;
}
.topbar a {
  display: inline-block;
  padding: 9px 6px;                /* tap area 44px+ for thumbs... */
  margin: -9px -6px;               /* ...without moving the text */
  text-decoration: none;
}
.topbar a:hover,
.topbar a:focus-visible { text-decoration: underline; text-underline-offset: 0.25em; }

/* ---------- big page title (the list page) ---------- */
.page-title {
  margin: 0;
  padding: clamp(2rem, 6vw, 5rem) var(--edge) 0;
  font-weight: 400;
  font-size: clamp(3.5rem, 13vw, 14rem);
  line-height: 1;
  letter-spacing: -0.085em;        /* squeezed like the main page, but loose enough that "field" stays readable */
  color: var(--blue);
}

/* ---------- list of notes ---------- */
.notes {
  list-style: none;
  margin: clamp(2rem, 5vw, 4rem) 0 0;
  padding: 0 var(--edge) clamp(3rem, 8vw, 6rem);
}
.notes li { border-top: 1px solid var(--line); }
.notes li:last-child { border-bottom: 1px solid var(--line); }
.notes a {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.4rem 2rem;
  align-items: baseline;
  padding: 1.4rem 0;
  color: inherit;
  text-decoration: none;
}
.notes time {
  color: var(--dim);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.notes .t {
  display: block;
  font-size: clamp(1.5rem, 3.2vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  transition: color 0.2s;
}
.notes .s { display: block; margin-top: 0.5rem; max-width: 38rem; color: var(--dim); }
.notes a:hover .t,
.notes a:focus-visible .t { color: var(--blue-solid); }
@media (max-width: 600px) { .notes a { grid-template-columns: 1fr; } }

/* "no notes yet" disappears by itself as soon as there is at least one note */
.empty { margin: 0; padding: 0 var(--edge) 6rem; color: var(--dim); }
.notes:has(li) + .empty { display: none; }

/* ---------- a single note (or, later, a single script page) ---------- */
.note { padding: clamp(2rem, 6vw, 5rem) var(--edge) clamp(3rem, 8vw, 6rem); }
.note > * { max-width: 40rem; }                    /* comfortable reading width */
.note > .note-head,
.note > figure,
.note > .video { max-width: 64rem; }               /* photos + video can run wider than the text */

.note .meta { margin: 0 0 0.6rem; color: var(--dim); font-size: 0.9rem; letter-spacing: 0.02em; }
.note h1 {
  margin: 0 0 1.2em;
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 6rem);
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--blue);
}
.note h2 {
  margin: 2.2em 0 0.6em;
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--blue-solid);
}
.note p { margin: 0 0 1.3em; }

.note figure { margin: 2.5em 0; }
.note figure img { display: block; width: 100%; height: auto; }
.note figcaption { margin-top: 0.6rem; max-width: 40rem; color: var(--dim); font-size: 0.9rem; }

.note blockquote {
  margin: 2em 0;
  padding-left: 1.2rem;
  border-left: 3px solid var(--blue);
  font-size: 1.5rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.note blockquote p { margin: 0; }

.note .video { position: relative; aspect-ratio: 16 / 9; margin: 2.5em 0; background: #000; }
.note .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- bottom links ---------- */
.postnav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem var(--edge) 2.5rem;
  border-top: 1px solid var(--line);
}
.postnav a {
  display: inline-block;
  padding: 9px 6px;
  margin: -9px -6px;
  text-decoration: none;
}
.postnav a:hover,
.postnav a:focus-visible { text-decoration: underline; text-underline-offset: 0.25em; }
