/* john-maccallum.com
   One typeface, a readable measure, black on white, dark mode from the
   system setting. Nothing animated. */

:root {
  --text: #111;
  --muted: #555;
  --bg: #fff;
  --rule: #d8d8d8;
  --link: #111;
  --link-underline: #999;
  --panel: #f3f3f1;
  --measure: 38rem;
  --wide: 48rem;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  font-size: 112.5%;
  line-height: 1.6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8e6e3;
    --muted: #a8a49e;
    --bg: #161616;
    --rule: #3a3a3a;
    --link: #e8e6e3;
    --link-underline: #777;
    --panel: #222;
  }
}

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

body {
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
  max-width: calc(var(--wide) + 2rem);
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover, a:focus { text-decoration-color: currentColor; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--bg); padding: 0.25rem 0.5rem; }

/* Header. The one survival of the old site: a dashed rule, drawn in CSS,
   never inside the words. */
.site-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px dashed var(--rule);
}
.site-name {
  font-size: 2rem;
  font-weight: normal;
  line-height: 1.2;
  margin: 0;
  letter-spacing: 0.01em;
}
.site-name a { text-decoration: none; }
.site-tagline { margin: 0.25rem 0 0; color: var(--muted); }

nav ul {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-size: 0.9rem;
}

main > section { margin-bottom: 3.5rem; }
main p, main ul, main dl, figcaption { max-width: var(--measure); }

h2 {
  font-size: 1.35rem;
  font-weight: normal;
  margin: 0 0 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rule);
}
h3 { font-size: 1.1rem; font-weight: normal; margin: 1.75rem 0 0.5rem; }
h3 .year, .meta, .support, .lede, figcaption, .site-footer { color: var(--muted); }

.bio p { font-size: 1.05rem; }
.lede { font-size: 0.95rem; }
.support { font-size: 0.9rem; }

/* Featured works */
.featured { margin-top: 2.25rem; }
.featured h3 { margin-top: 0.75rem; font-style: italic; }
.featured h3 .year { font-style: normal; }
.featured p { margin: 0.4rem 0; }

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--panel);
  max-width: var(--wide);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-pending {
  aspect-ratio: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border: 1px dashed var(--rule);
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}
.video-pending p { margin: 0; }

/* Audio */
.audio { margin: 0; }
.audio iframe { border: 0; width: 100%; max-width: var(--measure); height: 120px; display: block; }
figcaption { font-size: 0.9rem; margin-top: 0.5rem; }

/* Works index: one line per work where the screen allows */
.works { list-style: none; padding: 0; margin: 0.75rem 0 0; }
.works > li {
  padding: 0.3rem 0;
  border-bottom: 1px dotted var(--rule);
}
.works .meta { font-size: 0.85rem; margin-left: 0.35rem; }

/* Links */
.links dt { margin-top: 1rem; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.links dd { margin: 0.2rem 0 0; }

.site-footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--rule);
  font-size: 0.85rem;
}

.credit { font-size: 0.9rem; color: var(--muted); }
.list-head { margin-top: 3rem; }
div.list-head .filters { margin: 0; }
#software dd, #sites dd { margin-bottom: 0.5rem; }
#software dt, #sites dt { text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--text); }

/* Page headings (pages other than the front page) */
main > h1, .work-head h1 { font-size: 1.75rem; font-weight: normal; line-height: 1.25; margin: 0 0 0.5rem; }
.work-head h1 .year { font-style: normal; color: var(--muted); }
.work-head { margin-bottom: 2.5rem; }
.work-head p { margin: 0.25rem 0; }
.forces { font-size: 1.05rem; }
.commission { color: var(--muted); font-size: 0.95rem; }
.work section { margin-bottom: 2.5rem; }
.media { margin: 0 0 1.25rem; max-width: var(--wide); }
.media.audio iframe { border: 0; width: 100%; max-width: var(--measure); display: block; }
.note blockquote { margin: 0 0 1.5rem; padding-left: 1rem; border-left: 1px dashed var(--rule); font-style: italic; }
.note blockquote cite { display: block; font-style: normal; color: var(--muted); font-size: 0.9rem; }
.note blockquote cite i { font-style: italic; }
.note h2 { border-top: 0; font-size: 1.1rem; margin-top: 2rem; }
.materials, .perfs { padding-left: 1.1rem; }
.materials li, .perfs li { margin: 0.3rem 0; }
.perfs { font-size: 0.95rem; }
.perfs .date { white-space: nowrap; }
.premiere { color: var(--muted); }
.back { margin-top: 3rem; font-size: 0.9rem; }

/* Tags on a work */
.tags { margin: 0.3rem 0 0; font-size: 0.8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.tags a { color: var(--muted); text-decoration-style: dotted; }
.works .tags { margin-top: 0.1rem; }

/* Browse by tag (front page and works index) */
.filters { margin: 1rem 0 2.5rem; padding: 0.9rem 1rem; background: var(--panel); font-size: 0.9rem; max-width: var(--wide); }
.filter-intro { margin: 0 0 0.5rem; color: var(--muted); }
.filter-group { display: grid; grid-template-columns: 4.5rem 1fr; align-items: baseline; margin: 0.25rem 0; }
.filter-label { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.filter-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; }
.filters a[aria-current] { text-decoration: none; border-bottom: 2px solid currentColor; }
.filter-status { margin: 0.75rem 0 0; }
@media (max-width: 30rem) {
  .filter-group { display: block; margin-top: 0.5rem; }
  .filter-label { display: block; margin-bottom: 0.15rem; }
}
.works-group { margin-bottom: 3rem; }
.works-group[hidden], .works > li[hidden] { display: none; }

.ext { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
main > section .filters { margin: 0.5rem 0 1rem; }

/* Software and writing */
.sw { margin-bottom: 2.5rem; }
.sw h2 .year, .pub .year { color: var(--muted); font-size: 0.9rem; }
.sw-links, .sw-refs { font-size: 0.9rem; }
.sw-refs { color: var(--muted); }
ul.plain { list-style: none; padding: 0; }
ul.plain li { margin: 0.4rem 0; }
.pub { margin: 0 0 1.75rem; }
.pub h3 { margin: 0 0 0.2rem; font-size: 1.05rem; line-height: 1.4; }
.pub p { margin: 0.1rem 0; font-size: 0.92rem; }
.pub-authors, .pub-links { color: var(--muted); }
.pub details { margin-top: 0.3rem; font-size: 0.92rem; }
.pub summary { cursor: pointer; color: var(--muted); }
.pub details p { margin-top: 0.4rem; }
.courses { padding-left: 1.1rem; }
.courses li { margin: 0.45rem 0; }
.courses strong { font-weight: 600; }
#courses h3 { margin-top: 2rem; margin-bottom: 0; }
#courses h3 + .meta { margin: 0.1rem 0 0.5rem; font-size: 0.9rem; }
.about p { max-width: var(--measure); }
.iterations { padding-left: 1.1rem; font-size: 0.95rem; }
.iterations li { margin: 0.45rem 0; }

/* One-line Bandcamp players in the works lists */
.slim { display: block; border: 0; width: 100%; max-width: var(--measure); height: 42px; margin: 0.35rem 0 0.15rem; }
.slim-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .slim-light { display: none; }
  .slim-dark { display: block; }
}

/* Front page, framing quotes, contact */
.home-bio p { font-size: 1.15rem; max-width: var(--measure); }
.portrait { display: block; width: 100%; max-width: 20rem; height: auto; margin: 0 0 1.5rem; }
.framing { margin: 0 0 2.5rem; padding-left: 1rem; border-left: 1px dashed var(--rule); max-width: var(--measure); }
.framing p { margin: 0; font-style: italic; }
.contact-email { font-size: 1.2rem; }
#elsewhere dt, #sites dt { text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--text); }
.link-rows { display: grid; grid-template-columns: 11rem 1fr; gap: 0.35rem 1rem; max-width: var(--measure); }
.link-rows dt { grid-column: 1; color: var(--muted); font-size: 0.95rem; }
.link-rows dd { grid-column: 2; margin: 0; }
@media (max-width: 30rem) {
  .link-rows { display: block; }
  .link-rows dt { margin-top: 0.9rem; }
}
