/* ==========================================================================
   style.css
   --------------------------------------------------------------------------
   Dead simple: an off-white page, one typeface at one size, black and grey.
   What you can click is grey; where you are is black. Hierarchy comes from
   spacing, never from size or decoration. The text is Figtree; the index
   (the menu down the side) is Nunito, a little rounder and smaller. The
   handwriting is kept to a few notebook touches: the signature, a few
   titles (Reenie Beanie) and notes such as the labels on the Sounds Of map
   (Waiting for the Sunrise).

    1. Fonts            5. Navigation         9. Placeholders
    2. Tokens           6. Content           10. Tablet (< 1100px)
    3. Base & links     7. Media             11. Mobile (< 760px)
    4. Layout           8. Footer & pager
   ========================================================================== */


/* 1. Fonts (self-hosted, SIL Open Font License; see assets/fonts/)
   ========================================================================== */

/* The text, with Medium (500) for headings and bold */
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* The index */
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Reenie Beanie";
  src: url("../fonts/reenie-beanie-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* A second hand, a lot like Reenie Beanie but rounder and easier to read,
   for notes: the labels on the Sounds Of map and the quote on About Me (so
   not everything is written in the same hand) */
@font-face {
  font-family: "Waiting for the Sunrise";
  src: url("../fonts/waiting-for-the-sunrise-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}


/* 2. Tokens
   ========================================================================== */

:root {
  --bg: #fafafa;       /* off-white */
  --fg: #0a0a0a;
  --muted: #737373;     /* links and secondary text (4.5:1 on --bg) */
  --faint: #f0f0f0;     /* placeholder boxes */
  --on-faint: #616161;  /* text on placeholder boxes (5.5:1) */
  --draft: #a85555;     /* washed-out red: "placeholder" notes, for now */
  --track: #cfcfcf;
  --rule: #e4e4e4;      /* the faint line above each section */
  --pencil: #949494;    /* the Sounds Of map's coastline (about 3:1 on --bg) */

  --font: "Figtree", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-nav: "Nunito", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-hand: "Reenie Beanie", "Bradley Hand", "Segoe Print", cursive;
  --font-note: "Waiting for the Sunrise", "Reenie Beanie", "Bradley Hand", "Segoe Print", cursive;
  --size: 1.0625rem;    /* 17px, everywhere */
  --line: 1.42;         /* lines of links stay 24px apart, easy to tap */
  --gap: 1.42em;        /* one blank line */

  --top: 30px;
  --pad: 26px;
  --nav-w: 16rem;       /* index column */
  --col-gap: 2rem;
  --text-w: 35rem;      /* reading column */
  --fig-w: 15rem;       /* images beside the text */
}


/* 3. Base & links
   ========================================================================== */

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

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--size);
  font-weight: 400;
  line-height: var(--line);
  letter-spacing: 0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
blockquote,
address {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
}

b,
strong {
  font-weight: 500;
}

address {
  font-style: normal;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

img,
video {
  height: auto;
}

/* Grey until you point at it */
a {
  color: var(--muted);
  text-decoration: none;
}

a:hover {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 3px;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--pad);
  z-index: 10;
  padding: 4px 8px;
  background: var(--fg);
  color: var(--bg);
}

.skip-link:focus {
  top: 8px;
}

.skip-link:hover {
  color: var(--bg);
}

.main:focus {
  outline: none;
}


/* 4. Layout
   --------------------------------------------------------------------------
   [ signature ]
   [ index     ][ text            ][ images ][ empty ]
   [ footer                                           ]
   ========================================================================== */

.page {
  display: grid;
  grid-template-columns:
    minmax(var(--nav-w), max-content)
    minmax(0, var(--text-w))
    var(--fig-w)
    1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "header .    .    ."
    "nav    main main ."
    "footer footer footer footer";
  column-gap: var(--col-gap);
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--top) var(--pad) var(--pad);
}

.site-header {
  grid-area: header;
  padding-bottom: 14px;
}

/* The Menu button: phones only (section 11) */
.menu-toggle {
  display: none;
}

/* The signature: the one handwritten mark */
.signature {
  font-family: var(--font-hand);
  font-size: 2.25rem;
  line-height: 1;
  letter-spacing: 0;
}

.signature a {
  color: var(--fg);
}

.signature a:hover {
  text-decoration: none;
}

.site-nav {
  grid-area: nav;
  position: sticky;
  top: var(--top);
  align-self: start;
}

.main {
  grid-area: main;
  display: grid;
  grid-template-columns: minmax(0, var(--text-w)) var(--fig-w);
  column-gap: var(--col-gap);
  align-items: start;
  min-width: 0;
}

.content {
  min-width: 0;
}

.figures {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Wide pages (Sounds Of, Travel: `wide: true` at the top of the page) run on
   into the empty space on the right, for the map and the photos. Their text
   still keeps to the reading width. */
.page--wide {
  grid-template-areas:
    "header .    .    ."
    "nav    main main main"
    "footer footer footer footer";
}

.page--wide .main {
  grid-template-columns: minmax(0, 1fr);
}

.page--wide .content > :not(.wide) {
  max-width: var(--text-w);
}


/* 5. Navigation
   ========================================================================== */

.site-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The index is in Nunito, a little smaller than the page and all in lower
   case (the pages' own names keep their capitals everywhere else). Its
   lines stay 24px apart, easy to tap. */
.site-nav {
  font-family: var(--font-nav);
  font-size: 0.9375rem;
  line-height: 1.6;
  text-transform: lowercase;
}

/* Sections (Me, Work) and the closing pair are separated by a blank line.
   A section's label is black and isn't a link. */
.nav-section + li {
  margin-top: var(--gap);
}

.nav-label {
  display: block;
  color: var(--fg);
}

/* Headings, subheadings, sub-pages: each level steps in a little */
.site-nav .nav-section > ul {
  padding-left: 1em;
}

/* Where you are is black */
.site-nav a[aria-current="page"],
.site-nav a.is-section {
  color: var(--fg);
}

.site-nav a:hover {
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  cursor: default;
}

.nav-group__head {
  display: flex;
  align-items: baseline;
}

/* The dropdown's "+" (only shown when JavaScript is running; without it the
   sub-pages are simply always listed) */
.nav-toggle {
  display: none;
}

.js .nav-toggle {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 1.75em;
  height: 1.5em;
  margin: -0.1em 0 -0.1em 0.1em;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle:hover {
  color: var(--fg);
}

.nav-toggle__icon::before {
  content: "+";
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before {
  content: "\2013";
}

/* Sound Design isn't a page: its name is the button that opens its list, with
   the + / – after it. Without JavaScript it's just a label over the list. */
.nav-toggle--label {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  line-height: inherit;
  text-align: left;
  text-transform: inherit; /* (buttons don't take it up by themselves) */
}

.js .nav-toggle--label {
  display: inline-flex;
  align-items: baseline;
  width: auto;
  height: auto;
  margin: 0;
  line-height: inherit;
}

.nav-toggle--label .nav-toggle__icon {
  display: none;
}

.js .nav-toggle--label .nav-toggle__icon {
  display: inline-block;
  width: 1.75em;
  margin-left: 0.1em;
  text-align: center;
}

.nav-toggle--label.is-section {
  color: var(--fg);
}

.nav-sub {
  padding-left: 1em !important;
}

.js .nav-group[data-open="false"] > .nav-sub {
  display: none;
}


/* 6. Content
   --------------------------------------------------------------------------
   Everything is one size. A heading is a bold line with a blank line above
   it; the text follows straight underneath. Page titles are hidden where
   the index is beside the page (it shows where you are), but still there
   for screen readers; on phones they're handwritten at the top (section 11).
   ========================================================================== */

.page-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.standfirst {
  margin-bottom: var(--gap);
  color: var(--muted);
}

/* The grey line at the top of each page is all in lower case, like the
   index (its words keep their capitals in the page itself) */
.content > .standfirst:first-of-type {
  text-transform: lowercase;
}

.content h2,
.content h3 {
  margin-top: var(--gap);
  font-weight: 500;
}

/* No word left on its own at the end of a paragraph, and headings split
   evenly over their lines (in browsers that can) */
.content p,
.content li,
.content dd,
figcaption {
  text-wrap: pretty;
}

.content h1,
.content h2,
.content h3 {
  text-wrap: balance;
}

.content h1 + h2,
.content .standfirst + h2 {
  margin-top: 0;
}

/* Sections: each one starts with its heading, a size up from the text,
   with a faint line and some room above it, so it's clear where one
   section ends and the next begins. (Sub-headings, h3, stay text-sized.) */
.content > h2,
.content > .ph > h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.45rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--rule);
  font-size: 1.25rem;
  line-height: 1.3;
}

.content > h1 + h2,
.content > .standfirst + h2 {
  margin-top: 0.5rem;
}

.content p,
.content ul,
.content ol,
.content dl,
.content .table-scroll,
.content blockquote,
.content > .figure {
  margin-bottom: var(--gap);
}

.content ul,
.content ol {
  padding: 0;
  list-style: none;
}

/* A list of longer points (<ul class="points">): each starts with a dash,
   and lines that wrap stay indented, so it's clear where each one begins */
.content .points {
  padding-left: 1.1em;
}

.content .points > li {
  position: relative;
}

.content .points > li + li {
  margin-top: 0.3em;
}

.content .points > li::before {
  content: "\2013";
  position: absolute;
  left: -1.1em;
}

/* ...except a last line that just rounds the list off ("and more") */
.content .points > li.plain::before {
  content: none;
}

.content dd {
  margin-bottom: 0.6em;
}

.content dd:last-child {
  margin-bottom: 0;
}

/* Roles (Experience): the years down the side, like the credits below it,
   then the role and a line about it. The side column is wide enough for a
   month and year ("Nov 2026–") to sit clear of the text. */
.content .roles > li {
  display: grid;
  grid-template-columns: 5.75rem minmax(0, 1fr);
  column-gap: 1rem;
}

.content .roles > li + li {
  margin-top: 1em;
}

.roles__when {
  color: var(--muted);
}

.content .roles p {
  margin: 0;
}

/* Headline numbers (Social Media Production): side by side, each number
   black and two sizes up, with what it counts under it in grey, and a faint
   line above. Where there isn't room for all three in a row (under 30rem),
   one under the other, never two and one. */
.content .stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.5rem;
  margin-top: 0.45rem;
}

.content .stats > li {
  flex-grow: 1;
  flex-basis: calc((30rem - 100%) * 999);
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
}

/* ...and a number on its own (the Sounds Of views) stays small, as wide as
   its words, not the whole row */
.content .stats > li:only-child {
  flex: 0 1 auto;
  min-width: 9rem;
}

.stats__n {
  display: block;
  color: var(--fg);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.25;
}

/* Sound Design's projects: a small picture beside each name, its year and
   a line about it. Names in black, faintly underlined, so it's clear they're links. The
   picture gets smaller when the list is narrow (a phone, or a tablet held
   upright), so the text beside it has room */
.content .projects {
  margin-bottom: var(--gap);
  container-type: inline-size;
}

.projects > li {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.projects > li + li {
  margin-top: 1.5rem;
}

.projects__pic {
  display: block;
}

.projects__pic img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--faint);
  transition: opacity 0.15s ease;
}

.projects__pic:hover img {
  opacity: 0.85;
}

.content .projects__name {
  margin: -0.15em 0 0.15em;
  font-size: inherit;
  font-weight: 500;
}

.projects__name a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--track);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.projects__name a:hover {
  text-decoration-color: currentColor;
}

.projects__year {
  margin-left: 0.3em;
  color: var(--muted);
  font-weight: 400;
}

.content .projects p {
  margin: 0;
}

@container (max-width: 479px) {
  .projects > li {
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: 1rem;
  }
}

@container (max-width: 319px) {
  .projects > li {
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: 0.85rem;
  }
}

/* About Me's greeting, handwritten, as the page's title */
.content .greeting {
  margin: -0.1em 0 0.35em;
  font-family: var(--font-hand);
  font-size: 3rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

/* About Me's highlights: three things to look at first, one under the
   other, each a link to its page. What it is, in black and a size up, and
   beside it (under it, on a phone) a line about it, grey like any link;
   a faint line between them. Pointing at one turns it all black. */
.content .highlights {
  margin: calc(var(--gap) * 1.25) 0 calc(var(--gap) * 1.25);
  border-bottom: 1px solid var(--rule);
}

.highlights a {
  display: grid;
  grid-template-columns: 10.5rem minmax(0, 1fr);
  column-gap: 1rem;
  align-items: baseline;
  padding: 0.7rem 0;
  border-top: 1px solid var(--rule);
  color: var(--muted);
}

.highlights a:hover {
  color: var(--fg);
  text-decoration: none;
}

.highlights__big {
  color: var(--fg);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
}

blockquote {
  padding-left: 1em;
}

/* A quote, with who said it underneath. Both in black: grey on this site
   means a link. */
.quote {
  padding-left: 0;
}

.content .quote p {
  margin-bottom: 0;
}

.quote__by {
  color: var(--fg);
}

/* The same, written by hand */
.quote--hand {
  max-width: 30rem;
  margin-top: calc(var(--gap) * 2);
  font-family: var(--font-note);
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.quote--hand .quote__by {
  margin-top: 0.35em;
}

/* A quote that signs a page off (`signoff:` at the top of the page, About
   Me): small, in the bottom right-hand corner of the page, however tall the
   window (on a phone, after everything else, still on the right). The page
   runs on to the right-hand edge for it, while the text keeps to the
   reading width. */
.signoff {
  max-width: 17rem;
  font-size: 1rem;
}

@media (min-width: 760px) {
  .main--signoff {
    grid-template-rows: auto 1fr auto;
  }

  .main--signoff .signoff {
    grid-row: 3;
    grid-column: 1 / -1;
    justify-self: end;
    align-self: end;
  }

  .page--signoff .content {
    max-width: var(--text-w);
  }
}

@media (min-width: 1100px) {
  .page--signoff {
    grid-template-areas:
      "header .    .    ."
      "nav    main main main"
      "footer footer footer footer";
  }

  .page--signoff .main {
    grid-template-columns: minmax(0, var(--text-w)) var(--fig-w) 1fr;
  }
}

@media (min-width: 760px) and (max-width: 1099.98px) {
  .page--signoff {
    grid-template-areas:
      "header .    ."
      "nav    main main"
      "footer footer footer";
  }
}

@media (max-width: 759.98px) {
  .signoff {
    max-width: 15rem;
    margin-left: auto;
  }
}

.table-scroll {
  overflow-x: auto;
  container-type: inline-size;
}

table {
  border-collapse: collapse;
}

th,
td {
  padding: 0 1.25em 0 0;
  font-weight: 400;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
}

thead th {
  padding-bottom: 0.15em;
}

caption {
  color: var(--muted);
  text-align: left;
}

/* A table with its labels down the side (gear, project details): a little
   room between rows, so a value that runs onto a second line still reads
   as one row */
tbody th[scope="row"],
tbody th[scope="row"] ~ td {
  padding-bottom: 0.3em;
}

/* A name that shouldn't break at its hyphen (NV-GS180) */
.nowrap {
  white-space: nowrap;
}

/* Credits (Music): year, artist, song, role. Full width; the year never
   breaks, the rest wraps. A note under a song (where it was played) is grey */
.credits {
  width: 100%;
}

.credits th,
.credits td {
  padding-right: 1em;
}

.credits td {
  padding-bottom: 0.4em;
}

.credits td:first-child {
  white-space: nowrap;
}

.credits th:nth-child(2) {
  width: 20%;
}

.credits th:last-child,
.credits td:last-child {
  width: 30%;
  padding-right: 0;
}

.credits__note {
  display: block;
  color: var(--muted);
}

/* All credits (Qualifications): grouped, each group under a black heading
   row; the year never breaks */
.credit-list {
  width: 100%;
}

.credit-list td {
  padding-bottom: 0.4em;
}

.credit-list td:first-child {
  white-space: nowrap;
}

.credit-list td:last-child,
.credit-list thead th:last-child {
  padding-right: 0;
}

.credit-list tbody th {
  padding: var(--gap) 0 0.25em;
  color: var(--fg);
  font-weight: 500;
}

.credit-list tbody:first-of-type th {
  padding-top: 0.5em;
}

/* Where four columns won't fit (phones, narrow windows), each credit stacks
   up beside its year. Music: the artist in bold, then the song and the role.
   Qualifications: the project, the role, then the studio or client in grey */
@container (max-width: 519px) {
  .credits,
  .credits tbody,
  .credits tr,
  .credits td,
  .credit-list,
  .credit-list tbody,
  .credit-list tr,
  .credit-list td,
  .credit-list tbody th {
    display: block;
  }

  .credits thead,
  .credit-list thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .credits tr,
  .credit-list tr {
    position: relative;
    padding-bottom: 0.6em;
  }

  .credit-list tbody tr:first-child {
    padding-bottom: 0;
  }

  .credits td,
  .credits td:last-child,
  .credit-list td,
  .credit-list td:last-child {
    width: auto;
    padding: 0 0 0 5em;
  }

  .credits td:first-child,
  .credit-list td:first-child {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0;
  }

  .credits td:nth-child(2) {
    font-weight: 500;
  }

  .credit-list td:last-child {
    color: var(--muted);
  }

  /* a word in place of a year ("unreleased") is too wide for the year's
     column, so it goes above the project instead, in grey */
  .credit-list td.is-word {
    position: static;
    padding-left: 5em;
    color: var(--muted);
  }
}

/* A label down the side (gear, project details) stays on one line when
   there's room, so the labels line up */
@container (min-width: 420px) {
  tbody th[scope="row"] {
    white-space: nowrap;
  }
}

/* A wide table (the credits on Qualifications and Music) runs on into the
   column on the right when there are no pictures in it, or (.is-clear,
   from site.js) when it starts below them */
@media (min-width: 1100px) {
  .main:not(:has(> .figures)) .table-wide,
  html:not(.show-ph) .main:not(:has(> .figures > :not(.is-ph), > .figures > .is-ph-image)) .table-wide,
  .table-wide.is-clear {
    width: calc(100% + var(--col-gap) + var(--fig-w));
  }
}

/* A long list folded away (<details class="more">), opened with a click,
   with a + or – like the index's */
.more {
  margin-bottom: var(--gap);
}

.more > summary {
  display: inline-block;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.more > summary::-webkit-details-marker {
  display: none;
}

.more > summary::after {
  content: "+";
  display: inline-block;
  width: 1em;
  margin-left: 0.6em;
}

.more[open] > summary::after {
  content: "\2013";
}

.more > summary:hover {
  color: var(--fg);
}

.more[open] > summary {
  margin-bottom: 0.6em;
}

/* Sounds Of's episodes: date, artist, where. Where there isn't room for
   three columns, each episode stacks beside its date: the artist, then
   where */
.episodes {
  width: 100%;
}

.episodes td {
  padding-bottom: 0.2em;
}

.episodes td:first-child {
  width: 6em;
  white-space: nowrap;
}

.episodes td.is-word {
  color: var(--muted);
}

.episodes th:last-child,
.episodes td:last-child {
  padding-right: 0;
}

/* where there's room, a place stays on one line */
@container (min-width: 460px) {
  .episodes td:last-child {
    white-space: nowrap;
  }
}

@container (max-width: 459px) {
  .episodes,
  .episodes tbody,
  .episodes tr,
  .episodes td {
    display: block;
  }

  .episodes thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .episodes tr {
    position: relative;
    padding: 0 0 0.55em 4.25em;
  }

  .episodes td,
  .episodes td:first-child {
    width: auto;
    padding: 0;
  }

  .episodes td:first-child {
    position: absolute;
    top: 0;
    left: 0;
  }

  .episodes td.is-word {
    position: static;
  }
}

/* Music's releases: a grid of covers, each with its title (a link, black
   and faintly underlined, as in .projects) and its year and format in grey.
   As many across as fit at 7rem or more: four beside the index, two on a
   phone or a tablet held upright */
.content .covers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: 1.25rem 1rem;
  margin-bottom: var(--gap);
}

.covers a {
  display: block;
  color: var(--fg);
}

.covers img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  margin-bottom: 0.5em;
  background: var(--faint);
  transition: opacity 0.15s ease;
}

.covers a:hover img {
  opacity: 0.85;
}

.covers__title {
  display: block;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-color: var(--track);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.covers a:hover .covers__title {
  text-decoration-color: currentColor;
}

.covers__meta {
  display: block;
  margin-top: 0.2em;
  color: var(--muted);
}

/* Release lists (Music): the same columns in every table, so they line up */
.releases {
  width: 100%;
}

.releases th:first-child,
.releases td:first-child {
  width: 3.75em;
}

.releases th:last-child,
.releases td:last-child {
  width: 4.5em;
  padding-right: 0;
}


/* 7. Media
   ========================================================================== */

.figure img {
  display: block;
  width: 100%;
  height: auto;
}

/* A picture that opens bigger in a popup (see site.js) */
.figure__zoom {
  display: block;
  cursor: zoom-in;
}

figcaption {
  margin-top: 0.45em;
  font-size: 0.875rem;
  line-height: 1.35;
}

.media {
  margin-bottom: var(--gap);
}

.media__frame {
  position: relative;
  width: 100%;
  background: var(--fg);
}

.media__frame--embed {
  background: none;
}

/* (without JavaScript the <noscript> copy of a player is used instead) */
html:not(.js) .media__frame > iframe[data-src] {
  display: none;
}

/* A faint grey where a player will be, until it loads */
.js .media__frame--embed:has(> iframe[data-src]) {
  background: var(--faint);
}

.media__frame > iframe,
.media__frame > noscript > iframe,
.media__frame > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.audio {
  margin-bottom: 1em;
}

.audio figcaption {
  margin: 0 0 0.4em;
  font-size: inherit;
  line-height: inherit;
}

.audio__detail {
  color: var(--muted);
}

.audio audio {
  display: block;
  width: 100%;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 1.25rem 1rem;
  margin-bottom: var(--gap);
}

/* A YouTube video before it's played: its picture and a round play button
   (site.js swaps in the player when it's pressed) */
.yt {
  position: absolute;
  inset: 0;
  display: block;
  background: var(--fg);
}

.yt img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid var(--fg);
  border-radius: 50%;
  background: var(--bg);
  color: var(--fg);
  transform: translate(-50%, -50%);
}

.yt__play svg {
  margin-left: 4px; /* a triangle looks centred a little right of centre */
  fill: currentColor;
}

.yt:hover .yt__play,
.yt:focus-visible .yt__play {
  border-color: var(--bg);
  background: var(--fg);
  color: var(--bg);
}

/* Short clips two across, where there's room */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  column-gap: 1rem;
}

/* Short vertical videos (Social Media Production): side by side where
   there's room (the page runs on to the right for them), one under the
   other on a phone. Their players are made for 325px or so. */
.reels {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  align-items: flex-start;
  max-width: 700px;
}

.reels > .media {
  width: 326px;
  max-width: 100%;
}


.reels .media__frame {
  background: #fff;
}

/* A tall picture in the text that needn't be as wide as the text (also on
   the wide pages, whose text otherwise keeps to the reading width) */
.content .narrow,
.page--wide .content > .narrow {
  max-width: 24rem;
  margin-bottom: var(--gap);
}

/* Something that belongs beside a part of the text (Music's Melonade
   video, beside the band's releases): in the pictures' column, level with
   that part, where the column is beside the text (wide screens); elsewhere
   it sits in the text, where it is in the page. It floats out past the
   text's right-hand edge, across the gap, into the column, so the text
   doesn't wrap round it. */
@media (min-width: 1100px) {
  .content .aside {
    float: right;
    clear: right;
    width: var(--fig-w);
    margin-right: calc((var(--fig-w) + var(--col-gap)) * -1);
  }

  .content .aside .media {
    margin-bottom: 0;
  }
}

/* A player beside the text, in place of a picture: the width its player
   is made for */
.figures > .media {
  width: 240px;
  max-width: 100%;
  margin-bottom: 0;
}

.figures > .media .media__frame {
  background: #fff;
}

/* An app, pictured on a phone (Climbing): the screen with rounded corners,
   linking to the app itself */
.app-shot {
  width: 13rem;
  max-width: 100%;
  margin-bottom: var(--gap);
}

.app-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.25rem;
  background: #0d0d0d;
  transition: opacity 0.15s ease;
}

.app-shot a:hover img {
  opacity: 0.9;
}

/* Photos side by side, all the same height (Outside Work): each takes a
   share of the row in proportion to its shape (--ratio, its width over its
   height, from {% image %}), so their tops and bottoms line up */
.photo-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: var(--gap);
}

.photo-row > .figure {
  flex: var(--ratio, 1.333) 1 0;
  min-width: 0;
}

/* "can you keep a secret?" (Music): handwritten, like a note in the
   margin, with yes / no underneath */
.secret {
  margin-bottom: var(--gap);
  font-family: var(--font-note);
  font-size: 1.5rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.content .secret p {
  margin: 0;
}

.secret button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.secret button:hover {
  color: var(--fg);
}

/* ...and the popup it opens: the album's cover, a line and the demos */
.secret-box {
  width: min(24rem, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 46px 16px 6px;
  border: 1px solid var(--fg);
  background: var(--bg);
  color: var(--fg);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.secret-box::backdrop {
  background: rgba(250, 250, 250, 0.92);
}

.secret-box__close {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--fg);
  border-left: 1px solid var(--fg);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.secret-box .figure {
  margin-bottom: 1em;
}

/* The demos are untitled: their names are kept for screen readers only */
.secret-box .audio figcaption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* "demos to come", pencilled, until they're in */
.content .secret-box__soon {
  margin: 0 0 0.8em;
  color: var(--on-faint);
  font-family: var(--font-note);
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: 0;
}


/* 8. The end of the page & pager
   ========================================================================== */

/* No footer: just some room after the last thing on a page (but not on
   About Me, whose quote sits right down in the bottom corner) */
.main:not(.main--signoff) {
  padding-bottom: 3.5rem;
}

/* ← previous / next → between project pages */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25em 2em;
  margin-top: calc(var(--gap) * 2);
  padding-top: 0.85rem;
  border-top: 1px solid var(--rule);
}


/* 9. Placeholders
   --------------------------------------------------------------------------
   Things still to fill in: text marked class="ph", and pictures, videos and
   players with no file yet (class="is-ph", from the shortcodes). Pictures
   still to come show to everyone, as grey boxes saying what they'll be,
   with "photo to come" pencilled on them; visitors don't see the rest.
   Previewing with ?placeholders (or `showPlaceholders` in
   src/_data/site.json) shows everything, with a small pencil note,
   "placeholder", in washed-out red; media placeholders are grey boxes.
   ========================================================================== */

html:not(.show-ph) .ph,
html:not(.show-ph) .is-ph:not(.is-ph-image),
html:not(.show-ph) .ph-note {
  display: none !important;
}

/* ...nor a strip or row of pictures that are all hidden placeholders */
html:not(.show-ph) .figures:not(:has(> :not(.is-ph), > .is-ph-image)),
html:not(.show-ph) .thumbs:not(:has(> :not(.is-ph), > .is-ph-image)),
html:not(.show-ph) .media-grid:not(:has(> :not(.is-ph), > .is-ph-image)) {
  display: none;
}

/* "photo to come", pencilled on a picture still to come (the red note
   instead, when previewing) */
.ph-soon {
  font-family: var(--font-note);
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: 0;
}

.show-ph .ph-soon {
  display: none;
}

.ph > :last-child {
  margin-bottom: 0;
}

/* Tables start below the note rather than squeezing in beside it */
.ph > .table-scroll {
  clear: both;
}

div.ph {
  margin-bottom: var(--gap);
}

.show-ph div.ph::before,
.ph-note {
  color: inherit;
  font-family: var(--font-hand);
  font-size: 1.375rem;
  font-style: normal;
  line-height: 1;
  letter-spacing: 0;
}

.show-ph div.ph::before {
  content: "placeholder";
  color: var(--draft);
  float: right;
  margin: -0.12em 0 0.2em 1em;
}

/* The word "placeholder" is written in washed-out red; the text itself
   stays as it will look when finished */
.show-ph .ph-note {
  color: var(--draft);
}

.ph-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.35em;
  width: 100%;
  max-width: 100%;
  padding: 12px;
  background: var(--faint);
  color: var(--on-faint);
  font-size: 0.875rem;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}

.ph-play {
  fill: currentColor;
}

.ph-box--video .ph-play {
  margin-bottom: 0.35em;
  color: var(--fg);
}

.ph-audio {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 14px;
  background: var(--faint);
  color: var(--on-faint);
}

.ph-audio .ph-play {
  flex: none;
  color: var(--fg);
}

.ph-audio__track {
  flex: 1;
  min-width: 40px;
  height: 1px;
  background: var(--track);
}

.ph-audio__time {
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}


/* 9b. The Sounds Of map
   --------------------------------------------------------------------------
   A hand-drawn Australia (the coast is drawn twice and roughened with an SVG
   filter, like Reenie Beanie's pen), muted markers, a popup with the video,
   and a timeline. The route is drawn faintly; the black ink on top grows as
   you go (see assets/js/sounds-of-map.js).
   ========================================================================== */

.sm {
  margin: 0 0 var(--gap);
}

.sm__stage {
  --zoom: 1;
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  touch-action: pan-y; /* pinch is handled by the map; swipes still scroll the page */
}

.sm.is-zoomed .sm__stage {
  touch-action: none;
  cursor: grab;
}

.sm.is-dragging .sm__stage {
  cursor: grabbing;
}

.sm__map {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* The coast is drawn in pencil grey, so the route (in black ink) stands
   out from it */
.sm__coast,
.sm__echo {
  fill: none;
  stroke: var(--pencil);
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.sm__coast {
  stroke-width: 1.3;
}

.sm__echo {
  stroke-width: 0.9;
  stroke-opacity: 0.45;
}

/* State borders: faint, so they sit behind everything else */
.sm__borders {
  fill: none;
  stroke: var(--pencil);
  stroke-width: 0.8;
  stroke-opacity: 0.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* Sizes divide by --zoom so labels and lines stay the same size on screen */
.sm__labels text {
  fill: #8c8c8c;
  font-family: var(--font-note);
  font-size: calc(27px / var(--zoom));
  letter-spacing: 0.04em;
}

.sm__route path {
  fill: none;
  stroke: var(--fg);
  stroke-linecap: round;
}

/* The whole route as a faint dotted line... */
.sm__route-faint path {
  stroke-opacity: 0.4;
  stroke-width: calc(2.4px / var(--zoom));
  stroke-dasharray: 0 calc(6px / var(--zoom));
}

/* ...and the part travelled so far, in solid black */
.sm__route-ink path {
  stroke-width: calc(2.8px / var(--zoom));
  transition-property: stroke-dashoffset;
  transition-timing-function: ease-in-out;
}

/* A full stop where the road ends, back home */
.sm__home {
  r: calc(4.5px / var(--zoom));
  fill: var(--fg);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sm.is-home .sm__home {
  opacity: 1;
}

.sm__markers {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sm__marker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sm__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 1px rgba(10, 10, 10, 0.35);
  transition: transform 0.15s ease;
}

.sm__marker:hover .sm__dot {
  transform: scale(1.3);
}

.sm__marker.is-current {
  z-index: 1;
}

.sm__marker.is-current .sm__dot {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--fg);
  transform: scale(1.3);
}

/* A place with more than one recording has a dot for each, in a little
   bunch: --dx and --dy say where, in steps of --huddle (two side by side,
   four in a square). The dots touch, so the bunch reads as one place, while
   different places never do. The marker is the size of its bunch (and
   never less than 24px, so it's easy to press); pressing it opens the
   episode whose dot is nearest, and that dot stands out as you point at it
   (sounds-of-map.js). The bunch opens up a little round the chosen
   episode, making room for its ring. */
.sm__markers {
  --huddle: 11.5px;
}

.sm__marker.is-bunch {
  width: max(24px, calc(var(--across) * var(--huddle) + 19px));
  height: max(24px, calc(var(--down) * var(--huddle) + 19px));
  margin: 0;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.sm__marker.is-bunch.is-open {
  --huddle: 15px; /* HUDDLE_OPEN in sounds-of-map.js */
}

.sm__marker.is-bunch .sm__dot {
  position: absolute;
  top: calc(50% + var(--dy) * var(--huddle));
  left: calc(50% + var(--dx) * var(--huddle));
  margin: -5.5px 0 0 -5.5px;
  box-shadow: 0 0 0 1px rgba(10, 10, 10, 0.35);
  transform: none;
  transition: transform 0.15s ease, top 0.2s ease, left 0.2s ease;
}

.sm__marker.is-bunch .sm__dot.is-pointed {
  z-index: 2;
  transform: scale(1.15);
}

/* The chosen one is ringed without growing, so the ring just clears the
   dots beside it */
.sm__marker.is-bunch .sm__dot.is-chosen {
  z-index: 1;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--fg);
  transform: none;
}

/* A stop that isn't an episode (an interview, a visit) or is one still to
   come: a hollow dot, so it stands apart from the episodes, even in a bunch
   beside them */
.sm__marker .sm__dot.is-empty,
.sm__marker.is-bunch .sm__dot.is-empty,
.sm__tick.is-empty .sm__tick-dot {
  background: var(--bg);
  box-shadow: inset 0 0 0 2px var(--c), 0 0 0 1px rgba(10, 10, 10, 0.35);
}

.sm__marker.is-current:not(.is-bunch) .sm__dot.is-empty,
.sm__marker.is-bunch .sm__dot.is-empty.is-chosen,
.sm__tick.is-empty.is-current .sm__tick-dot {
  box-shadow: inset 0 0 0 2px var(--c), 0 0 0 2px var(--bg), 0 0 0 3.5px var(--fg);
}

.sm__marker:focus-visible,
.sm__tick:focus-visible {
  outline-offset: 0;
}

/* The handwritten name of the place you're at, next to its marker */
.sm__place {
  position: absolute;
  margin: 0;
  /* clear of the marker, which is bigger where it holds more than one
     recording (--reach) */
  transform: translate(calc(14px + var(--reach, 0px)), -55%);
  font-family: var(--font-note);
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  pointer-events: none;
}

/* (where it actually goes, clear of the route, is worked out by the map's
   script, which moves it with an inline transform) */

/* It stays on one line (the text's "text-wrap: pretty" would let it wrap) */
.sm__stage .sm__place {
  white-space: nowrap;
  text-wrap: nowrap;
}

.sm__place:empty {
  display: none;
}

/* The popup, inside the map */
.sm__popup {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: min(21rem, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow-y: auto;
  padding: 12px 16px 16px;
  border: 1px solid var(--fg);
  background: var(--bg);
  font-size: 0.9375rem;
  line-height: 1.42;
  overscroll-behavior: contain;
}

.sm__popup.is-left {
  right: auto;
  left: 12px;
}

.sm__popup[hidden] {
  display: none;
}

.sm__close {
  position: absolute;
  top: 2px;
  right: 4px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fg);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.sm__popup .sm__date {
  margin: 0 2.25rem 0 0;
  font-size: 0.8125rem;
}

.sm__popup .sm__name {
  margin: 0 2rem 0 0;
  font-family: var(--font-note);
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: 0;
}

.sm__popup .sm__date[hidden] + .sm__name {
  margin-top: 0.2em;
}

.sm__popup .sm__location {
  margin: 0.2em 0 0.75em;
}

/* "Also recorded here: …", the other recordings that share the marker */
.sm__popup .sm__also {
  margin: -0.5em 0 0.75em;
  color: var(--muted);
}

.sm__also-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--fg);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: var(--track);
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.sm__also-link:hover {
  text-decoration-color: currentColor;
}

/* "No episode here yet.", on a stop with no episode */
.sm__popup .sm__empty {
  margin: -0.4em 0 0.6em;
  color: var(--muted);
}

.sm__video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-bottom: 0.75em;
  background: var(--faint);
}

.sm__video[hidden] {
  display: none;
}

.sm__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.content .sm__description {
  margin-bottom: 0.6em;
}

/* "Along the way" or "Coming soon", over the name of a stop that isn't an
   episode */
.sm__popup .sm__kicker {
  margin: 0 2.25rem 0.1em 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* A stop that isn't an episode: its sound, photo and links (from its
   <template> in sounds-of-map.njk) */
.sm__extra:empty {
  display: none;
}

.sm__extra .audio {
  margin-bottom: 0.75em;
}

.sm__extra .audio figcaption {
  display: none;
}

/* ...unless there's more than one (part 1, part 2) */
.sm__extra:has(.audio + .audio) .audio figcaption {
  display: block;
  font-size: 0.875rem;
}

.sm__extra .figure {
  margin-bottom: 0.75em;
}

/* A short clip on a card (Ballina): upright, so not too tall */
.sm__clip {
  margin: 0 0 0.75em;
}

.sm__clip video {
  display: block;
  max-width: 100%;
  max-height: 340px;
  background: var(--faint);
}

.content .sm__extra ul {
  margin: 0 0 0.6em;
}

.sm__extra li + li {
  margin-top: 0.15em;
}

.content .sm__watch {
  margin: 0;
}

/* Zoom buttons: bottom left, or bottom right when the popup is on the left */
.sm__zoom {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.sm:not(.is-ready) .sm__zoom {
  display: none;
}

.sm__popup.is-left:not([hidden]) ~ .sm__zoom {
  left: auto;
  right: 10px;
  align-items: flex-end;
}

.sm__zoom-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--fg);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.sm__zoom-btn[aria-disabled="true"] {
  border-color: #c8c8c8;
  color: #c8c8c8;
  cursor: default;
}

.sm__zoom-reset {
  display: none;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.sm__zoom-reset:hover {
  color: var(--fg);
}

.sm.is-zoomed .sm__zoom-reset {
  display: block;
}

/* "Hold Ctrl and scroll to zoom" */
.sm__hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  z-index: 3;
  margin: 0;
  padding: 4px 10px;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.8125rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.sm__hint.is-visible {
  opacity: 1;
}

/* The timeline */
.sm__timeline {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 12px;
}

.sm:not(.is-ready) .sm__timeline {
  display: none;
}

.sm__step {
  flex: none;
  height: 26px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.sm__step:hover {
  color: var(--fg);
}

.sm__step[aria-disabled="true"] {
  color: #c8c8c8;
  cursor: default;
}

/* The ends fade, so a stop or a state's name cut off at the edge fades
   away rather than ending in half a letter, and it's clear there's more to
   scroll; the first and last stops sit clear of the fades */
.sm__track {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 18px, #000 calc(100% - 18px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 18px, #000 calc(100% - 18px), transparent);
}


.sm__track::-webkit-scrollbar {
  display: none;
}

.sm__ticks {
  position: relative;
  display: flex;
  margin: 0;
  list-style: none;
}

/* Room below for the states' names, and at the ends to sit clear of the
   fades. As wide as its stops (or the track, if that's wider), so the
   room at the far end scrolls into view too. The extra .sm beats the
   general list spacing in .content */
.sm .sm__ticks {
  width: max-content;
  min-width: 100%;
  margin: 0;
  padding: 0 16px 2.4rem;
}

/* the line: faint end to end, black up to where you are */
.sm__ticks::before,
.sm__ticks::after {
  content: "";
  position: absolute;
  top: 12.5px;
  left: var(--start, 13px);
  height: 1px;
}

.sm__ticks::before {
  width: var(--end, 0px);
  background: rgba(10, 10, 10, 0.18);
}

.sm__ticks::after {
  width: var(--ink, 0px);
  background: var(--fg);
  transition: width 0.4s ease;
}

.sm__ticks > li {
  position: relative;
  display: flex;
  flex: 1 0 26px;
  justify-content: center;
}

.sm__tick {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sm__tick-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 1px rgba(10, 10, 10, 0.3);
  transition: transform 0.15s ease;
}

.sm__tick:hover .sm__tick-dot {
  transform: scale(1.3);
}

.sm__tick.is-current .sm__tick-dot {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--fg);
  transform: scale(1.3);
}

/* The state, handwritten, where the road enters it */
.sm__state {
  position: absolute;
  top: 26px;
  left: 50%;
  max-width: 3.2em;
  color: var(--fg);
  font-family: var(--font-note);
  font-size: 1.125rem;
  line-height: 0.95;
  text-align: center;
  transform: translateX(-50%);
  white-space: pre-line;
  pointer-events: none;
}

.sm__status {
  margin-top: 0.25em;
  font-size: 0.875rem;
}

@media (prefers-reduced-motion: reduce) {
  .sm__route-ink path,
  .sm__ticks::after,
  .sm__marker.is-bunch .sm__dot {
    transition: none !important;
  }
}

/* The page's title, "Sounds Of Australia", handwritten and centred over the
   map. Unlike other pages' titles it shows beside the index too. */
.content .sm-heading {
  margin: 0 0 0.12em;
  font-family: var(--font-hand);
  font-size: 3.5rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
  text-align: center;
}

/* Under it, a grey line to say the dots can be clicked: "Click" with a
   mouse, "Tap" on a touch screen */
.content .sm-hint {
  margin: 0 0 0.6rem;
  text-align: center;
  text-wrap: balance;
}

.sm-hint__touch {
  display: none;
}

@media (hover: none) and (pointer: coarse) {
  .sm-hint__mouse {
    display: none;
  }

  .sm-hint__touch {
    display: inline;
  }
}

/* As big as the window allows, with its title above it and the timeline
   still in view below it (1.067 is the map's width / height). The title is
   as wide as the map, so it's centred over it. */
@media (min-width: 760px) {
  .sm,
  .content .sm-heading,
  .content .sm-hint {
    width: max(min(100%, 32rem), min(100%, calc((100vh - 268px) * 1.067)));
  }
}

/* Phones: the map runs edge to edge, the episode's card sits under the
   timeline instead of over the map (sounds-of-map.js moves it there), so you
   can see where you are while you watch, and lines are drawn a little
   heavier */
@media (max-width: 599.98px) {
  .sm {
    margin-right: calc(var(--pad) * -1);
    margin-left: calc(var(--pad) * -1);
  }

  .sm__timeline,
  .sm__status {
    padding: 0 var(--pad);
  }

  .sm__popup,
  .sm__popup.is-left {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    width: auto;
    max-height: none;
    margin: 2px var(--pad) 12px;
    overflow: visible;
  }

  .sm__route-faint path {
    stroke-width: calc(4px / var(--zoom));
  }

  .sm__route-ink path {
    stroke-width: calc(4.5px / var(--zoom));
  }

  .sm__labels text {
    font-size: calc(40px / var(--zoom));
  }

  .sm__place {
    font-size: 1.125rem;
  }

  /* The zoom buttons side by side, low in the Southern Ocean, clear of the
     south-west corner of WA */
  .sm__zoom {
    flex-direction: row;
    align-items: center;
  }

  /* Just the arrows (the words stay for screen readers) */
  .sm__step,
  .sm__step[aria-disabled="true"] {
    position: relative;
    width: 44px;
    height: 44px;
    margin-top: -9px;
    overflow: hidden;
    color: transparent;
  }

  .sm__step [aria-hidden="true"] {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--muted);
  }

  .sm__step[aria-disabled="true"] [aria-hidden="true"] {
    color: #c8c8c8;
  }
}


/* 9c. Travel gallery
   --------------------------------------------------------------------------
   A tight grid of equal 3:2 photo tiles, four across (three or two on
   smaller screens), running on past the usual right-hand margin. A portrait
   photo takes two tiles, one above the other; a video takes four, two
   across and two down. Every row is the same height, so the blocks line up
   even when a video fills a whole row on a phone. Clicking a photo opens it
   in a popup (.lightbox, below).
   ========================================================================== */

.gallery {
  --tile-gap: 6px;
  display: grid;
  /* Four across when there's room for tiles of at least 10.5rem, then
     three, but never fewer than two */
  grid-template-columns: repeat(auto-fill, minmax(clamp(calc(25% - var(--tile-gap) * 0.75), 10.5rem, calc(50% - var(--tile-gap) / 2)), 1fr));
  grid-auto-rows: 1fr;
  grid-auto-flow: row dense;
  gap: var(--tile-gap);
  max-width: 100rem;
  margin-bottom: var(--gap);
}

.gallery__item {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  aspect-ratio: 3 / 2;
  align-self: stretch;
  overflow: hidden;
  background: var(--faint);
}

.gallery__item--tall {
  grid-row: span 2;
  aspect-ratio: 3 / 4;
}

.gallery__item--video {
  grid-column: span 2;
  grid-row: span 2;
  background: var(--fg);
}

/* The picture or video fills its tile, cropped to fit */
.gallery__item img,
.gallery__item video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* …but full screen shows the whole frame */
.gallery__item video:fullscreen {
  object-fit: contain;
}

.gallery__item video:-webkit-full-screen {
  object-fit: contain;
}

.gallery__item:focus-visible {
  outline-offset: 1px;
}

/* On a big screen: always four across, with each video pinned to its rows
   (src/_data/travel.js works out where) */
@media (min-width: 1100px) {
  .gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .gallery__item--video[style] {
    grid-row: var(--row) / span 2;
    grid-column: var(--column) / span 2;
  }
}

/* Over a video playing silently until the browser allows sound */
.gallery__sound {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 5px 10px;
  border: 0;
  background: rgba(10, 10, 10, 0.78);
  color: #fff;
  font: inherit;
  font-size: 0.8125rem;
  line-height: 1.3;
  cursor: pointer;
}

.gallery__sound[hidden] {
  display: none;
}

/* The photo popup: the photo in an off-white window, with a close button on its
   top-right corner. Click anywhere else (or press Escape) to close it. */
.lightbox {
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 10px;
  border: 1px solid var(--fg);
  background: var(--bg);
  color: var(--fg);
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(250, 250, 250, 0.92);
}

.lightbox__img {
  display: block;
  background: var(--faint) center / cover no-repeat;
}

.lightbox__close {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--fg);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  transform: translate(50%, -50%);
  cursor: pointer;
}

/* ← → to the previous and next picture, halfway down each side */
.lightbox__step {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--fg);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__step[data-step="-1"] {
  left: 0;
  transform: translate(-50%, -50%);
}

.lightbox__step[data-step="1"] {
  right: 0;
  transform: translate(50%, -50%);
}

/* The page stays put behind the popup */
html.has-lightbox {
  overflow: hidden;
  scrollbar-gutter: stable;
}

@media (max-width: 759.98px) {
  .gallery {
    --tile-gap: 4px;
  }
}


/* 9d. Luna, the cat at the bottom of the Cat page
   --------------------------------------------------------------------------
   An ink silhouette (src/_includes/partials/luna.njk). Her eyes follow the
   cursor and her tail flicks now and then (assets/js/luna.js); without
   JavaScript, or for people who'd rather not have motion, she just sits.
   ========================================================================== */

.luna {
  display: flex;
  justify-content: flex-end;
  margin-top: calc(var(--gap) * -1.5);
  pointer-events: none;
}

.luna__cat {
  overflow: visible;
}

.luna__body,
.luna__pupils circle {
  fill: var(--fg);
}

.luna__white path {
  fill: var(--bg);
}

/* White paws, inked round so they show against the page */
.luna__paws ellipse {
  fill: var(--bg);
  stroke: var(--fg);
  stroke-width: 2.2;
}

.luna__tail path {
  fill: none;
  stroke: var(--fg);
  stroke-width: 4.2;
  stroke-linecap: round;
}

/* White eyes, always this size; the black inside them moves */
.luna__eyes > circle {
  fill: var(--bg);
}

.luna__tail {
  transform-box: view-box;
  transform-origin: 86px 196px;
}

.luna.is-awake .luna__tail {
  animation: luna-tail 7s ease-in-out infinite;
}

@keyframes luna-tail {
  0%, 82%, 100% { transform: rotate(0deg); }
  86% { transform: rotate(-8deg); }
  90% { transform: rotate(5deg); }
  94% { transform: rotate(-2deg); }
}


/* 9e. The intro (About Me, on a phone, the first time)
   --------------------------------------------------------------------------
   The quote fills the screen in the note hand and is written out word by
   word, each word drawn in from the left like a pen stroke, then the whole
   thing fades away and leaves the page underneath: 2.8 seconds to write,
   then it holds for 3.5 seconds. A tap skips it. html.show-intro is set by a script in the page's head
   (base.njk), which also decides when it plays. Without JavaScript, on
   bigger screens or after the first visit, none of this shows.
   ========================================================================== */

.intro {
  display: none;
}

.show-intro body {
  overflow: hidden;
}

.show-intro .intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  background: var(--bg);
  color: var(--fg);
  transition: opacity 0.7s ease;
}

.intro.is-leaving {
  opacity: 0;
}

.intro__quote {
  max-width: 21rem;
  font-family: var(--font-note);
  font-size: 1.6rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.intro__quote p {
  margin: 0;
}

.intro__by {
  margin-top: 0.6em !important;
}

.intro__w,
.intro__by {
  display: inline-block;
  clip-path: inset(0 100% 0 0);
}

.intro__by {
  display: block;
}

.intro.is-writing .intro__w,
.intro.is-writing .intro__by {
  animation: intro-write 0.26s ease-out forwards;
  animation-delay: calc(var(--i) * 50ms);
}

@keyframes intro-write {
  to { clip-path: inset(0 0 0 0); }
}

/* For people who'd rather not have motion: the quote, still, then the page */
@media (prefers-reduced-motion: reduce) {
  .intro__w,
  .intro__by {
    clip-path: none;
  }

  .intro.is-writing .intro__w,
  .intro.is-writing .intro__by {
    animation: none;
  }

  .show-intro .intro {
    transition: none;
  }
}


/* 10. Tablet: images go under the text
   ========================================================================== */

@media (max-width: 1099.98px) {
  .page {
    grid-template-columns: minmax(var(--nav-w), max-content) minmax(0, var(--text-w)) 1fr;
    grid-template-areas:
      "header .    ."
      "nav    main ."
      "footer footer footer";
  }

  .main {
    grid-template-columns: minmax(0, 1fr);
  }

  .page--wide {
    grid-template-areas:
      "header .    ."
      "nav    main main"
      "footer footer footer";
  }

  .figures {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 1.25rem 1rem;
    margin-top: var(--gap);
  }
}


/* 11. Mobile: one column
   --------------------------------------------------------------------------
   [ signature           Menu ]  ← tucks away as you scroll down the page
   [ Page title, handwritten  ]
   [ the grey opening line    ]
   [ pictures: a strip to swipe → ]
   [ the page…                ]
   The index opens over the whole page from the Menu button (site.js).
   Without JavaScript it's listed between the signature and the page.
   ========================================================================== */

@media (max-width: 759.98px) {
  :root {
    --pad: 20px;
    --header-h: 58px;
    /* links to a spot on the page land below the header */
    scroll-padding-top: calc(var(--header-h) + 12px);
  }

  .page {
    display: block;
    padding: 0 var(--pad) 24px;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    margin: 0 calc(var(--pad) * -1) 16px;
    padding: 0 var(--pad);
    background: var(--bg);
    transition: transform 0.25s ease;
  }

  .site-header.is-tucked {
    transform: translateY(-100%);
  }

  .signature {
    font-size: 2.125rem;
  }

  .js .menu-toggle {
    display: inline-flex;
    align-items: center;
    height: 44px;
    margin-right: -12px;
    padding: 0 12px;
    border: 0;
    background: none;
    color: var(--fg);
    font: inherit;
    font-family: var(--font-nav); /* like the index it opens */
    text-transform: lowercase;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .menu-toggle__close,
  .menu-toggle[aria-expanded="true"] .menu-toggle__open {
    display: none;
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle__close {
    display: inline;
  }

  /* Without JavaScript, the index sits between the signature and the page */
  .site-nav {
    position: static;
    margin-bottom: calc(var(--gap) * 2);
  }

  /* With it, the index waits behind the Menu button and opens over the page,
     a little bigger, for thumbs */
  .js .site-nav {
    display: none;
  }

  .js.has-menu {
    overflow: hidden;
  }

  .js.has-menu .site-nav {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 20;
    align-self: stretch; /* (not the wider screens' "start": fill the screen, and scroll) */
    margin: 0;
    padding: calc(var(--header-h) + 18px) var(--pad) 48px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--bg);
    font-size: 1.25rem;
    line-height: 1.5;
    animation: menu-in 0.2s ease-out;
  }

  /* Bigger tap targets without spreading the list out */
  .nav-list a {
    display: inline-block;
    padding: 3px 0;
  }

  .js .nav-toggle {
    width: 44px;
    height: 44px;
    margin: -10px 0 -10px 0;
  }

  .js .nav-toggle--label {
    width: auto;
    height: auto;
    margin: 0;
    padding: 3px 0;
  }

  /* The page's title, handwritten (the index isn't there to say where you are) */
  .page-title {
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 0.3em;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
    font-family: var(--font-hand);
    font-size: 3rem;
    line-height: 0.9;
    letter-spacing: 0;
  }

  /* The Sounds Of title, over the map, a little smaller than other pages'
     titles so it fits on one line */
  .content .sm-heading {
    font-size: min(2.75rem, 12vw);
  }

  .main {
    display: block;
  }

  /* The pictures: a strip under the opening line, to swipe through, the
     next one peeking in from the side. Each is at most --strip-h tall and
     at most 86% of the screen wide, whatever its shape (--ratio, its width
     over its height, comes from the image shortcode). --strip-h is about
     the height a wide picture gets at that width, so the pictures in a
     strip all come out much the same height: a tall one doesn't leave a
     gap under the wide ones beside it. */
  .figures {
    --strip-h: min(calc((100vw - 2 * var(--pad)) * 0.86 / 1.6), 300px);
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    margin: 0 calc(var(--pad) * -1) var(--gap);
    padding: 0 var(--pad);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--pad);
    scrollbar-width: none;
  }

  .figures::-webkit-scrollbar {
    display: none;
  }

  .figures > .figure {
    flex: 0 0 auto;
    width: min(86%, calc(var(--strip-h) * var(--ratio, 1.333)));
    scroll-snap-align: start;
  }

  .figures > .media {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  /* One picture on its own (the portrait on About Me) can be bigger */
  .figures > .figure:only-child {
    --strip-h: min(100vw, 420px);
    width: min(100%, calc(var(--strip-h) * var(--ratio, 1.333)));
  }

  /* ← previous / next →: easy to hit with a thumb */
  .pager a {
    padding: 10px 0;
  }

  /* About Me's quote, down in the bottom right-hand corner of the screen */
  .page--signoff {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .page--signoff .main {
    display: flex;
    flex: 1;
    flex-direction: column;
  }

  /* About Me's quote isn't shown on a phone: it's written out by hand
     before the page appears instead, on the first visit (The intro) */
  .page--signoff .signoff {
    display: none;
  }

  /* About Me's highlights: the line about each one under it */
  .highlights a {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.1rem;
  }

  /* Photos side by side: a little closer */
  .photo-row {
    gap: 0.6rem;
  }

  /* Experience's roles: each one's years above it, not beside it, so the
     text has the width */
  .content .roles > li {
    grid-template-columns: minmax(0, 1fr);
  }
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@media (max-width: 759.98px) and (prefers-reduced-motion: reduce) {
  .site-header {
    transition: none;
  }

  .js.has-menu .site-nav {
    animation: none;
  }
}


/* 12. Printing
   --------------------------------------------------------------------------
   Just the page: no index, menu or footer, in black, so a printed page
   (Qualifications, say) works as a CV. Players, videos and the map are left
   out.
   ========================================================================== */

@media print {
  .skip-link,
  .site-header .menu-toggle,
  .site-nav,
  .pager,
  .figures,
  .media,
  .sm,
  .more > summary::after {
    display: none !important;
  }

  .page,
  .main {
    display: block;
    padding: 0;
  }

  .content,
  .page--wide .content > :not(.wide) {
    max-width: none;
  }

  body {
    color: #000;
    font-size: 11pt;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  .content > h2 {
    break-after: avoid;
  }

  tr,
  dd,
  li {
    break-inside: avoid;
  }

  .page-title {
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 0.5em;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
    font-family: var(--font-hand);
    font-size: 2.25rem;
    line-height: 1;
  }
}
