:root {
  --bg: #121416;
  --bg-raised: #1b1e21;
  --text: #e3e3e0;
  --muted: #9a9d9f;
  --link: #8fd3e6;
  --link-hover: #c8f2ff;
  --line: #2c3034;
  --body-font: "Avenir Next", Avenir, "Nunito Sans", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--body-font); font-size: 17px; line-height: 1.55;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3, .site-name, .site-nav, .home-nav { font-family: var(--heading-font); font-weight: 500; letter-spacing: .01em; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 1.2rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 .8rem; }
h3 { font-size: 1.15rem; }
strong { font-weight: 700; }
blockquote { margin: 1.2rem 0; padding-left: 1rem; border-left: 2px solid var(--line); }

/* header */
.site-header {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem 2rem;
  padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--line);
}
.site-name { font-size: 1.35rem; color: var(--text); }
.site-name:hover { color: var(--text); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font-size: 1rem; }
.site-nav a { color: var(--muted); }
.site-nav a:hover { color: var(--link-hover); }

/* pages */
main { padding: 2rem 1.5rem 4rem; }
.page { max-width: 46rem; margin: 0 auto; }
.page-title { text-transform: none; }
.breadcrumb { margin: 0 0 .4rem; color: var(--muted); font-size: .95rem; }
.page p { margin: 0 0 1.1rem; }

/* home */
.home .site-header { border-bottom: none; }
.home .site-nav { display: none; }
.home main { padding-top: .5rem; }
.hero { max-width: 70rem; margin: 0 auto; }
.hero-img { display: block; width: 100%; max-height: 72vh; object-fit: cover; }
.placeholder {
  aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg-raised); color: var(--muted); border: 1px dashed var(--line); text-align: center;
}
.home-nav {
  max-width: 70rem; margin: 2rem auto 0; display: flex; flex-wrap: wrap; justify-content: center;
  gap: .6rem 2rem; font-size: 1.3rem;
}

/* preview-only font picker */
.fontpicker { position: fixed; right: 1rem; bottom: 1rem; background: var(--bg-raised); border: 1px solid var(--line);
  padding: .5rem .8rem; font-size: .85rem; color: var(--muted); border-radius: 6px; }
.fontpicker select { margin-left: .4rem; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .site-header { padding: .9rem 1rem; }
  main { padding: 1.4rem 1rem 3rem; }
  h1 { font-size: 1.6rem; }
  .home-nav { font-size: 1.15rem; gap: .5rem 1.4rem; }
}

/* "(back)" links on the writings pages */
.page h1 + div, .page div > div:first-child { margin-bottom: 1.1rem; }

/* home page: line up the name with the left edge of the photo */
.home .site-header { max-width: calc(70rem + 3rem); margin: 0 auto; }

/* CDs page: covers in a grid */
.page:has(.cd-grid) { max-width: 70rem; }
.cd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 2.2rem 1.8rem; margin: 1.5rem 0 2.5rem; }
.cd img, .cd-noimg { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: var(--bg-raised); }
.cd p { margin: .7rem 0 0; font-size: .92rem; line-height: 1.45; }
@media (max-width: 600px) { .cd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 1rem; } .cd p { font-size: .85rem; } }

/* images page: photos with space between them */
.page:has(.photo-row) { max-width: 70rem; }
.photo-row { display: flex; flex-wrap: wrap; gap: 1.4rem; margin: 0 0 2.5rem; }
.photo-row img { height: 250px; width: auto; }
@media (max-width: 600px) { .photo-row { gap: .9rem; } .photo-row img { height: 150px; } }

/* video page: cards with embedded players */
.page:has(.video-grid) { max-width: 70rem; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 2.2rem 1.8rem; margin: 1.5rem 0 2.5rem; }
@media (max-width: 600px) { .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 1rem; } .vid p { font-size: .85rem; } .vframe .play { transform: scale(.75); } }
.vframe { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--bg-raised); border: 0; padding: 0; overflow: hidden; }
.vframe iframe, .vframe img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.vframe.yt { cursor: pointer; }
.vframe .play { position: absolute; left: 50%; top: 50%; width: 64px; height: 44px; margin: -22px 0 0 -32px; border-radius: 10px; background: rgba(0,0,0,.7); transition: background .2s; }
.vframe .play::after { content: ""; position: absolute; left: 26px; top: 12px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent #fff; }
.vframe.yt:hover .play { background: #c00; }
.novid { display: flex; align-items: center; justify-content: center; color: var(--muted, #888); font-size: .85rem; }
.vid p { margin: .7rem 0 0; font-size: .92rem; line-height: 1.45; }
.vid { display: flex; flex-direction: column; }
.vframe.yt { margin: 0; font: inherit; color: inherit; }
.page .vid > .vframe { margin: 0; }
/* works pages: links to CDs and videos */
.xl { font-size: .9em; color: var(--muted); }
/* jump-to targets on CDs and video pages */
.cd:target, .vid:target { outline: 2px solid var(--link); outline-offset: 6px; }
.cd, .vid { scroll-margin-top: 2rem; }
.seealso { margin: .2rem 0 1.2rem; }
a.wl { color: inherit; text-decoration: underline; text-decoration-color: var(--link); text-underline-offset: 3px; }
a.wl:hover { color: var(--link); }
p[id^="w-"] { scroll-margin-top: 2rem; }
p[id^="w-"]:target { outline: 2px solid var(--link); outline-offset: 6px; }
/* CDs page: square cover box that works on every browser */
.cover { display: block; position: relative; width: 100%; height: 0; padding-top: 100%; background: var(--bg-raised); overflow: hidden; }
.cover img, .cd .cover img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
.cd-noimg { height: 0; padding-top: 100%; aspect-ratio: auto; }
