/* jonrice.com: near-black, acid lime, chunky blocks and big Anton capitals. */
@font-face {
  font-family: Anton;
  src: url('fonts/anton-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url('fonts/inter-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url('fonts/inter-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url('fonts/inter-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url('fonts/inter-latin-900-normal.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}

:root {
  --bg: #0b0b0c;
  --surface: #141416;
  --tile: #1c1c1f;
  --line: #3a3a3e;
  --rule: #f4f4f0;
  --text: #f4f4f0;
  --soft: #d6d6d2;
  --muted: #a3a3a0;
  --accent: #c6ff3d;
  --accent-soft: rgba(198, 255, 61, 0.14);
  --shadow: none;
  --measure: 42rem;
  --wide: 85rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 0;
  --display: Anton, Impact, 'Arial Narrow', sans-serif;
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: var(--sans);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter) 4rem;
}

a {
  color: var(--text);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

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

img {
  max-width: 100%;
  height: auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 900;
}

.skip:focus {
  left: 1rem;
}

/* Header: name on the left, boxed menu on the right. */
.site-header {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.5rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-header::after {
  content: '';
  flex-basis: 100%;
  height: 4px;
  margin-top: 0.5rem;
  background: var(--rule);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font: 400 1.75rem/1 var(--display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
}

.brand-mark {
  width: 1rem;
  height: 1rem;
  background: var(--accent);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.9rem;
  padding: 0 1rem;
  border: 3px solid var(--rule);
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  border-color: var(--accent);
  color: var(--accent);
}

.site-nav .nav-dj,
.site-nav .nav-dj:hover,
.site-nav .nav-dj[aria-current='page'] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

/* Front page: the big name, bio and contact links. */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 2.5rem;
  padding: clamp(2rem, 5vw, 3.5rem) 0 4rem;
}

.hero-name {
  flex: 999 1 36rem;
  min-width: 0;
}

.roles {
  margin: 0 0 1.25rem;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font: 400 clamp(5.5rem, 17vw, 16.25rem) / 0.84 var(--display);
  text-transform: uppercase;
}

.outline {
  color: transparent;
  -webkit-text-stroke: 3px var(--text);
}

.dot {
  color: var(--accent);
}

.hero-side {
  flex: 1 1 20rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bio {
  margin: 0 0 1rem;
  color: var(--soft);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.45;
}

.contact-label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contacts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 3rem;
  padding: 0 1rem;
  border: 3px solid var(--rule);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}

.contact span {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.contact-main {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.contact:hover {
  border-color: var(--accent);
}

.contact-main:hover {
  color: var(--bg);
  background: var(--text);
  border-color: var(--text);
}

.bio-more {
  margin: -0.5rem 0 1rem;
}

.bio-more a {
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* The About Jon page: a big opening line, then one row per decade. */
.about-lead {
  max-width: 56rem;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.25;
}

.about-lead p {
  margin: 0 0 1rem;
}

.timeline {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
}

.era {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 2.5rem;
  padding: 2rem 0;
  border-top: 4px solid var(--rule);
}

.era:last-child {
  border-bottom: 4px solid var(--rule);
}

.era-title {
  flex: 0 0 14rem;
  margin: 0;
  color: var(--accent);
  font: 400 clamp(3.5rem, 8vw, 6.5rem) / 0.9 var(--display);
}

.era-text {
  flex: 1 1 22rem;
  min-width: 0;
  color: var(--soft);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.5;
}

.era-text p {
  margin: 0 0 1rem;
}

.era-text p:last-child {
  margin-bottom: 0;
}

/* Lists on the About page (such as the Bucket List), marked with small lime squares. */
.era-text ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.era-text li {
  position: relative;
  margin: 0 0 0.6rem;
  padding-left: 1.4rem;
}

.era-text li::before {
  content: '';
  position: absolute;
  top: 0.6em;
  left: 0;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent);
}

/* The band of words between the name and the rest of the page. */
.ticker {
  margin: 0 calc(-1 * var(--gutter));
  overflow: hidden;
  white-space: nowrap;
  background: var(--accent);
  color: var(--bg);
  font: 400 2.5rem/1 var(--display);
  text-transform: uppercase;
  padding: 0.75rem 0;
}

.ticker span {
  display: inline-block;
  animation: ticker 40s linear infinite;
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker span {
    animation: none;
  }
}

/* Section headings: big capitals over a thick rule, with an "All ..." link. */
.home-section {
  padding: 4rem 0 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  border-bottom: 4px solid var(--rule);
}

.section-head h1,
.section-head h2 {
  margin: 0;
  font: 400 clamp(3rem, 7vw, 6rem) / 0.9 var(--display);
  text-transform: uppercase;
}

.more {
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-intro {
  padding-top: clamp(2rem, 5vw, 3.5rem);
}

.page-intro .post-meta {
  margin-bottom: 0.5rem;
}

.empty {
  color: var(--muted);
  font-size: 1.1rem;
}

.mix-title {
  margin: 0 0 1rem;
  font: 400 clamp(2rem, 4vw, 2.75rem) / 1 var(--display);
  text-transform: uppercase;
}

.mix-title a {
  text-decoration: none;
}

.home-section .player {
  max-width: none;
  margin-top: 0;
}

/* Writing and mixes as rows. */
.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.row a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 2rem;
  padding: 1.75rem 0;
  border-bottom: 2px solid var(--line);
  text-decoration: none;
}

.row-meta {
  flex: 0 0 8.5rem;
  display: flex;
  flex-direction: column;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.row-meta span {
  color: var(--muted);
  font-weight: 700;
}

.row-title {
  flex: 1 1 20rem;
  font: 400 clamp(2rem, 3.6vw, 3rem) / 1 var(--display);
  text-transform: uppercase;
}

.row-summary {
  flex: 1 1 18rem;
  color: #c9c9c5;
  line-height: 1.5;
}

.row-arrow {
  color: var(--accent);
  font-size: 1.75rem;
  font-weight: 900;
}

.row a:hover .row-title {
  color: var(--accent);
}

/* Photo galleries as tall tiles. */
.tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.75rem;
}

.tile a {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 4px solid var(--rule);
  background: var(--tile);
  text-decoration: none;
}

.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tile a:hover {
  border-color: var(--accent);
}

.tile a:hover img {
  transform: scale(1.04);
}

.tile-text {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}

.has-photo .tile-text {
  background: linear-gradient(transparent, rgba(11, 11, 12, 0.92) 45%);
  padding-top: 3rem;
}

.tile-no {
  color: var(--accent);
  font: 400 3rem/1 var(--display);
}

.tile-title {
  font-size: 1.15rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tile-count {
  color: var(--soft);
  font-size: 0.85rem;
}

/* A single piece: writing, gallery or mix. */
.post-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.post-meta a {
  color: var(--accent);
  text-decoration: none;
}

.post-header {
  max-width: var(--measure);
  margin: clamp(2rem, 5vw, 3.5rem) auto 1.5rem;
}

.post-header h1 {
  margin: 0.5rem 0 0;
  font: 400 clamp(3rem, 8vw, 5.5rem) / 0.92 var(--display);
  text-transform: uppercase;
}

.post-summary {
  margin: 1rem 0 0;
  color: var(--soft);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.45;
}

.prose {
  max-width: var(--measure);
  margin: 0 auto;
  font-size: 1.125rem;
}

.prose > * {
  margin-top: 0;
}

.prose h2 {
  margin: 2.5rem 0 0.75rem;
  font: 400 2.25rem/1 var(--display);
  text-transform: uppercase;
}

.prose h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 900;
}

.prose blockquote {
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 6px solid var(--accent);
  color: var(--soft);
  font-size: 1.3rem;
  font-weight: 500;
}

.prose code {
  padding: 0.1em 0.35em;
  background: var(--surface);
  font-size: 0.9em;
}

.prose pre {
  overflow-x: auto;
  padding: 1rem;
  background: var(--surface);
}

.prose pre code {
  padding: 0;
  background: none;
}

.prose hr {
  margin: 3rem 0;
  border: 0;
  border-top: 4px solid var(--rule);
}

.prose table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
}

.prose th,
.prose td {
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid var(--line);
  text-align: left;
}

.tags {
  max-width: var(--measure);
  margin: 2.5rem auto 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tags a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.9rem;
  border: 3px solid var(--rule);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.tags a:hover {
  border-color: var(--accent);
}

.photo.hero {
  max-width: var(--wide);
  margin: clamp(1.25rem, 4vw, 2.5rem) auto 0;
}

/* Keeps a tall photo from filling more than most of the screen. */
.photo.hero img {
  max-height: 70vh;
  object-fit: cover;
}

.has-hero .post-header {
  padding-top: clamp(1.5rem, 5vw, 3rem);
}

@media (max-width: 640px) {
  .photo.hero {
    margin: 0 -1.25rem;
  }

  .photo.hero img {
    border-radius: 0;
  }
}

}

/* Photos: wider than the text on big screens, edge to edge on phones. */
.photo {
  margin: 2.2rem 0;
}

.photo-link {
  display: block;
  cursor: zoom-in;
}

.photo img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  background: var(--surface);
}

.photo figcaption {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem;
  margin: 2.2rem 0;
}

.gallery .photo {
  margin: 0;
}

.gallery .photo img {
  aspect-ratio: 1;
  object-fit: cover;
}

@media (max-width: 640px) {
  .prose > .photo,
  .prose > .gallery {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
  }

  .prose > .photo img,
  .prose > .gallery img {
    border-radius: 0;
  }

  .photo figcaption {
    padding: 0 1.25rem;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
    gap: 3px;
  }

  /* An odd photo out at the end fills the row instead of leaving a gap. */
  .gallery .photo:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .gallery .photo:last-child:nth-child(odd) img {
    aspect-ratio: 3 / 2;
  }
}

@media (min-width: 1000px) {
  .prose > .photo,
  .prose > .gallery {
    --bleed: min(var(--wide) - 2.5rem, 100vw - 3.5rem);
    width: var(--bleed);
    margin-left: calc((100% - var(--bleed)) / 2);
  }
}

/* "snapshots" style: galleries become a board of pinned-up instant photos. */
.style-snapshots .prose > .gallery {
  display: block;
  columns: 3 15rem;
  column-gap: 1.75rem;
  padding: 1rem 0.5rem;
}

.style-snapshots .gallery .photo {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 2rem;
  padding: 0.7rem 0.7rem 0;
  break-inside: avoid;
  background: #f7f4ee;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25), 0 14px 28px rgba(0, 0, 0, 0.3);
  transform: rotate(-2deg);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.3, 1.2), box-shadow 0.35s ease;
}

.style-snapshots .gallery .photo:nth-child(3n + 2) {
  transform: rotate(1.6deg);
}

.style-snapshots .gallery .photo:nth-child(3n) {
  transform: rotate(-0.7deg);
}

.style-snapshots .gallery .photo:nth-child(4n + 1) {
  transform: rotate(2.4deg);
}

/* A strip of tape holding each photo up. */
.style-snapshots .gallery .photo::before {
  content: '';
  position: absolute;
  top: -0.7rem;
  left: 50%;
  width: 5.5rem;
  height: 1.5rem;
  background: rgba(240, 180, 91, 0.45);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transform: translateX(-50%) rotate(-3deg);
}

.style-snapshots .gallery .photo:hover {
  z-index: 1;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25), 0 24px 48px rgba(0, 0, 0, 0.4);
  transform: rotate(0) scale(1.04);
}

.style-snapshots .gallery .photo img {
  aspect-ratio: auto;
  border-radius: 2px;
}

.style-snapshots .gallery .photo figcaption {
  margin: 0;
  padding: 0.7rem 0.25rem 0.85rem;
  color: #2b2824;
  font: 1.15rem/1.3 'Segoe Print', 'Bradley Hand', 'Marker Felt', 'Comic Sans MS', cursive;
  text-align: center;
}

@media (max-width: 640px) {
  .style-snapshots .prose > .gallery {
    margin-left: 0;
    margin-right: 0;
    padding: 1rem 0.75rem;
  }

  .style-snapshots .prose > .gallery img {
    border-radius: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .style-snapshots .gallery .photo {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* Photo viewer: a bordered card that grows over the page (see assets/lightbox.js). */
.lightbox {
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: none;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(5, 5, 6, 0.86);
  animation: lb-fade 0.3s ease both;
}

.lb-card {
  position: relative;
  padding: 0.75rem;
  border-radius: 16px;
  background: #f7f4ee;
  color: #2b2824;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  animation: lb-grow 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}

.lb-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-width: min(18rem, 80vw);
  min-height: 12rem;
  border-radius: 8px;
  background: #e9e5dd;
  overflow: hidden;
}

.lb-img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(92vw - 1.5rem, 82rem);
  max-height: calc(100vh - 11rem);
  max-height: calc(100dvh - 11rem);
  transition: opacity 0.25s ease;
}

.lb-switching .lb-img {
  opacity: 0;
}

/* Arrows: a big tap area on each half of the photo, the arrow shows on hover. */
.lb-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 35%;
  border: 0;
  background: none;
  color: #fff;
  font: 300 3.5rem/1 var(--sans);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lb-prev {
  left: 0;
  padding-left: 1rem;
  text-align: left;
}

.lb-next {
  right: 0;
  padding-right: 1rem;
  text-align: right;
}

.lb-stage:hover .lb-arrow,
.lb-arrow:focus-visible {
  opacity: 1;
}

.lb-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  max-width: min(92vw - 1.5rem, 82rem);
  padding: 0.8rem 0.25rem 0.1rem;
}

.lb-caption {
  margin: 0;
  font: 1.2rem/1.3 'Segoe Print', 'Bradley Hand', 'Marker Felt', 'Comic Sans MS', cursive;
}

.lb-count {
  margin: 0.2rem 0 0;
  color: #77726a;
  font: 500 0.75rem var(--mono);
  letter-spacing: 0.08em;
}

.lb-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.lb-share-label {
  margin-right: 0.2rem;
  color: #77726a;
  font: 500 0.7rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lb-share-link {
  padding: 0.3rem 0.65rem;
  border: 1px solid #d6d0c5;
  border-radius: 999px;
  background: none;
  color: #2b2824;
  font: 500 0.78rem var(--sans);
  text-decoration: none;
  cursor: pointer;
}

.lb-share-link:hover {
  border-color: #a4561a;
  color: #a4561a;
}

/* The X sits on the card's corner. */
.lb-close {
  position: absolute;
  top: -0.9rem;
  right: -0.9rem;
  z-index: 1;
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid #f7f4ee;
  border-radius: 50%;
  background: #2b2824;
  color: #f7f4ee;
  font: 400 1.5rem/1 var(--sans);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, background 0.2s ease;
}

.lb-close:hover {
  background: #a4561a;
  transform: rotate(90deg);
}

.lb-closing .lb-card {
  animation: lb-shrink 0.25s ease-in both;
}

.lb-closing::backdrop {
  animation: lb-fade 0.25s ease reverse both;
}

@keyframes lb-grow {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
}

@keyframes lb-shrink {
  to {
    opacity: 0;
    transform: scale(0.8);
  }
}

@keyframes lb-fade {
  from {
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .lb-card {
    padding: 0.5rem;
    border-radius: 12px;
  }

  .lb-img {
    max-width: calc(100vw - 2rem);
    max-height: calc(100dvh - 14rem);
  }

  .lb-bar {
    max-width: calc(100vw - 2rem);
  }

  .lb-close {
    top: -0.75rem;
    right: -0.5rem;
  }

  /* No hover on phones: show the arrows faintly so people know they can move on. */
  .lb-arrow {
    opacity: 0.7;
    font-size: 2.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lb-card,
  .lightbox::backdrop {
    animation: none;
  }

  .lb-img {
    transition: none;
  }
}

/* Music player card at the top of a music post (see assets/player.js). */
.player {
  position: relative;
  max-width: 52rem;
  margin: clamp(1.25rem, 4vw, 2.5rem) auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: player-rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.player-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 1.75rem);
  align-items: center;
  padding: clamp(1rem, 3vw, 1.5rem);
  background: linear-gradient(135deg, var(--accent-soft), transparent 60%);
}

.player-art img,
.player-art-blank {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.player-art-blank {
  background: linear-gradient(135deg, var(--accent), var(--line));
}

.player-body {
  min-width: 0;
}

.player-artist {
  margin: 0.5rem 0 0;
  color: var(--accent);
  font: 600 clamp(1.1rem, 3vw, 1.5rem) / 1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.player-controls {
  display: none;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.player.is-ready .player-controls {
  display: flex;
}

.player.is-ready .player-audio {
  display: none;
}

.player-audio {
  width: 100%;
  margin-top: 1rem;
}

.player-play {
  flex: none;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  box-shadow: 0 0 0 0 var(--accent-soft);
  transition: transform 0.15s ease, box-shadow 0.3s ease;
}

.player-play:hover {
  transform: scale(1.06);
  box-shadow: 0 0 0 8px var(--accent-soft);
}

.player-play svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}

.player-play .icon-pause,
.player.is-playing .player-play .icon-play {
  display: none;
}

.player.is-playing .player-play .icon-pause {
  display: block;
}

.player.is-loading .player-play {
  animation: player-pulse 1s ease-in-out infinite;
}

/* The waveform: grey bars, with the part already played drawn on top in the accent colour. */
.player-wave {
  position: relative;
  flex: 1;
  height: 4.5rem;
  cursor: pointer;
  touch-action: none;
}

.wave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.wave-base {
  fill: var(--muted);
  opacity: 0.4;
}

.player {
  --wave-hue: 280;
  --wave-light: 62%;
}

/* The played part fades through the rainbow as the music plays (see assets/player.js). */
.wave-played {
  fill: hsl(var(--wave-hue) 85% var(--wave-light));
  clip-path: inset(0 100% 0 0);
  transition: fill 0.4s linear;
}

/* The graphic equalizer, full width along the bottom of the card (see assets/player.js). */
.player-eq {
  display: none;
  width: calc(100% - 2 * clamp(1rem, 3vw, 1.5rem));
  height: clamp(5rem, 14vw, 7.5rem);
  margin: 0 auto clamp(1rem, 3vw, 1.5rem);
}

.player.is-ready .player-eq {
  display: block;
}

/* The download button under the waveform. */
.player-download {
  margin: 1rem 0 0;
}

/* Share links under the waveform. */
.player-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
}

.share-label {
  margin-right: 0.2rem;
  color: var(--muted);
  font: 500 0.7rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.share-link {
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--text);
  font: 500 0.78rem var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.share-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.share-link[hidden] {
  display: none;
}

.player-wave:hover .wave-base {
  opacity: 0.6;
}

.player-time {
  display: none;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.5rem 0 0;
  color: var(--muted);
  font: 500 0.75rem/1.4 var(--mono);
  letter-spacing: 0.04em;
}

.player.is-ready .player-time {
  display: flex;
  padding-left: 4.5rem;
}

.player-now {
  overflow: hidden;
  color: var(--text);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The tracklist opens and closes under the card. */
.player-tracklist {
  position: relative;
  border-top: 1px solid var(--line);
}

.player-tracklist summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 3vw, 1.5rem);
  font: 600 0.8rem/1.4 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  list-style: none;
  cursor: pointer;
}

.player-tracklist summary::-webkit-details-marker {
  display: none;
}

.player-tracklist summary::after {
  content: '+';
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.25s ease;
}

.player-tracklist[open] summary::after {
  transform: rotate(45deg);
}

.player-tracklist summary:hover {
  color: var(--accent);
}

.player-count {
  margin-left: auto;
  color: var(--muted);
  font-weight: 500;
}

.tracks {
  margin: 0;
  padding: 0 clamp(0.5rem, 2vw, 1rem) 1rem;
  list-style: none;
}

.player-tracklist[open] .tracks {
  animation: player-unfold 0.3s ease both;
}

.track-jump {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: baseline;
  width: 100%;
  padding: 0.55rem 0.5rem;
  border-radius: 8px;
}

.track {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.55rem 0.5rem;
  border-radius: 8px;
}

.track + .track {
  border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

.track:has(.track-jump) {
  display: block;
  padding: 0;
}

.track-jump {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.track-jump:hover,
.track.is-current .track-jump {
  background: var(--accent-soft);
}

.track.is-current .track-title {
  color: var(--accent);
}

.track-no,
.track-time {
  color: var(--muted);
  font: 500 0.75rem/1.4 var(--mono);
}

.track-name {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.6rem;
  min-width: 0;
}

.track-title {
  font-weight: 600;
}

.track-artist {
  color: var(--muted);
  font-size: 0.92rem;
}

/* On the home page, music posts say so. */
.listen {
  color: var(--accent);
}

.has-player .player {
  margin-bottom: 2.5rem;
}

@media (max-width: 640px) {
  .player {
    margin: 1rem -0.5rem 0;
  }

  .player-card {
    grid-template-columns: 6.5rem minmax(0, 1fr);
    align-items: start;
  }

  .player-controls,
  .player.is-ready .player-controls {
    grid-column: 1 / -1;
  }

  .player-body {
    display: contents;
  }

  .player-body > .post-meta,
  .player-artist {
    grid-column: 2;
  }

  .player-art {
    grid-row: 1 / span 2;
  }

  .player-share {
    grid-column: 1 / -1;
    margin-top: 0;
  }

  .player-body > .post-meta {
    align-self: end;
  }

  .player-artist {
    align-self: start;
  }

  .player-time,
  .player-audio {
    grid-column: 1 / -1;
  }

  .player.is-ready .player-time {
    padding-left: 0;
  }

  .player-controls,
  .player-time,
  .player-audio {
    margin-top: 0;
  }

  .player-wave {
    height: 3.5rem;
  }
}

@keyframes player-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}

@keyframes player-unfold {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes player-pulse {
  50% {
    box-shadow: 0 0 0 8px var(--accent-soft);
  }
}

@media (prefers-reduced-motion: reduce) {
  .player,
  .player-tracklist[open] .tracks,
  .player.is-loading .player-play {
    animation: none;
  }
}

/* jonrice.com touches on the shared pieces above: square corners, thick rules, Anton. */
.back {
  max-width: var(--measure);
  margin: 3.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 4px solid var(--rule);
  font: 900 0.9rem var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.back a {
  color: var(--accent);
}

.site-footer {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 var(--gutter) 3rem;
  color: var(--muted);
  font: 700 0.9rem var(--sans);
  text-align: left;
}

.site-footer::before {
  content: '';
  flex-basis: 100%;
  height: 4px;
  margin-bottom: 0.5rem;
  background: var(--rule);
}

.site-footer p {
  margin: 0;
}

.player {
  border: 4px solid var(--rule);
}

.player-card {
  background: none;
}

.player-art img,
.player-art-blank {
  box-shadow: none;
}

.player-play,
.player-play:hover {
  border-radius: 0;
}

.player-artist {
  font: 400 clamp(1.5rem, 3.5vw, 2.25rem) / 1 var(--display);
  letter-spacing: 0.02em;
}

.lb-card,
.share-link,
.lb-share-link {
  border-radius: 0;
}

@media (max-width: 640px) {
  .player {
    margin: 1rem 0 0;
  }

  .hero h1 {
    font-size: clamp(5rem, 28vw, 9rem);
  }

  .outline {
    -webkit-text-stroke-width: 2px;
  }
}
