:root {
  color-scheme: light;
  --ink: #222222;
  --muted: #555555;
  --paper: #fffefc;
  --paper-soft: rgba(255, 254, 252, 0.72);
  --line: rgba(34, 34, 34, 0.18);
  --line-strong: rgba(34, 34, 34, 0.42);
  --glow-green: rgba(154, 220, 173, 0.15);
  --glow-purple: rgba(166, 139, 220, 0.13);
  --page-max: 1240px;
  --page-pad: max(24px, calc((100vw - var(--page-max)) / 2));
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
  scrollbar-width: none;
}

body::-webkit-scrollbar {
  display: none;
}

button,
a {
  color: inherit;
  font: inherit;
}

#signal-field,
.grain,
.cursor-light {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#signal-field {
  z-index: -3;
}

.grain {
  z-index: -2;
  opacity: 0.06;
  background-image:
    linear-gradient(90deg, rgba(34, 34, 34, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(34, 34, 34, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mix-blend-mode: multiply;
}

.cursor-light {
  z-index: -1;
  opacity: 0.48;
  background:
    radial-gradient(circle at var(--cursor-x, 50%) var(--cursor-y, 50%), var(--glow-green), rgba(255, 254, 252, 0.04) 16%, transparent 34%),
    radial-gradient(circle at calc(var(--cursor-x, 50%) + 36px) calc(var(--cursor-y, 50%) - 26px), var(--glow-purple), rgba(255, 254, 252, 0.03) 14%, transparent 32%);
  transition: opacity 200ms ease;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--page-pad);
  background: linear-gradient(rgba(255, 254, 252, 0.92), rgba(255, 254, 252, 0));
}

.wordmark {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: flex-end;
}

.site-nav button,
.filter-button {
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.site-nav button,
.site-nav > a {
  padding: 0 0 3px;
  border-bottom: 1px solid transparent;
  font-size: 16px;
  line-height: 1.35;
  text-decoration: none;
}

.site-nav button:hover,
.site-nav button.is-active,
.site-nav > a:hover,
.site-nav > a.is-active,
.wordmark:hover {
  color: var(--muted);
}

.site-nav button.is-active,
.site-nav > a.is-active {
  border-bottom-color: var(--line-strong);
}

.sound-toggle[aria-pressed="true"],
.animation-toggle[aria-pressed="true"] {
  color: var(--ink);
  border-bottom-color: var(--line-strong);
}

.sound-toggle[aria-pressed="true"]::after,
.animation-toggle[aria-pressed="true"]::after,
.parameters-toggle[aria-expanded="true"]::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 7px;
  border-radius: 999px;
  background: rgba(34, 34, 34, 0.62);
  vertical-align: middle;
}

.sound-controls {
  position: relative;
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.parameters-toggle.hidden,
.parameter-panel.hidden {
  display: none;
}

/* Animation off: the background holds still, and the cursor glow and click ripples go. */
.no-animation .cursor-light,
.no-animation .ripple {
  display: none;
}

.parameters-toggle[aria-expanded="true"] {
  color: var(--ink);
  border-bottom-color: var(--line-strong);
}

.parameter-panel {
  position: absolute;
  top: 30px;
  right: 0;
  width: 260px;
  padding-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.parameter-list {
  display: grid;
  gap: 8px;
}

.parameter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  border-bottom: 1px solid rgba(34, 34, 34, 0.11);
  padding-bottom: 5px;
}

.parameter-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.parameter-value {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 22px;
}

.filter-button {
  padding: 0 0 2px;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.filter-button:hover,
.filter-button.is-active {
  color: var(--ink);
  border-bottom-color: var(--line-strong);
}

.stage {
  min-height: 100vh;
  padding: 116px var(--page-pad) 96px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.content-shell {
  width: min(680px, 100%);
  text-align: left;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

h1,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 24px;
  font-size: 44px;
  line-height: 1.05;
}

p {
  font-size: 16px;
  line-height: 1.62;
}

.year-marker {
  margin: 34px 0 8px;
  font-size: 22px;
  line-height: 1;
}

.year-marker:first-child {
  margin-top: 12px;
}

.projects-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.project-row {
  border-top: 1px solid var(--line);
}

.row-head {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 2px 20px;
  align-items: baseline;
  width: 100%;
  padding: 9px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

button.row-head {
  cursor: pointer;
}

.row-date {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.row-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0 10px;
  align-items: baseline;
  font-size: 15px;
  line-height: 1.4;
}

.row-title {
  font-weight: 700;
}

.row-label {
  color: var(--muted);
}

.project-row.is-selected .row-title,
button.row-head:focus-visible .row-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.project-row.is-selected .row-date {
  color: var(--ink);
}

button.row-head:focus-visible {
  outline: 1px solid var(--line-strong);
  outline-offset: 2px;
}

.project-row.is-featured .row-head {
  padding: 18px 0;
  align-items: center;
}

.project-row.is-featured .row-title {
  font-size: 21px;
  line-height: 1.2;
}

.project-row.is-featured .row-label {
  font-size: 16px;
}

.project-row.has-thumb .row-head {
  grid-template-columns: 210px minmax(0, 1fr) 112px;
}

.row-thumb {
  display: block;
  width: 112px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
}

.project-detail {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 96px - 60px);
  overflow-y: auto;
  padding-left: 32px;
  border-left: 1px solid var(--line);
  scrollbar-width: none;
}

.project-detail::-webkit-scrollbar {
  display: none;
}

.detail-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.project-detail h2 {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.1;
}

.detail-label {
  margin-bottom: 18px;
  color: var(--muted);
}

.detail-hint {
  color: var(--muted);
  font-size: 14px;
}

.project-detail p {
  font-size: 15px;
}

.project-detail .media-list {
  margin: 16px 0;
}

.project-detail .project-links {
  margin-top: 18px;
}

.content-shell p + p,
.project-detail p + p {
  margin-top: 12px;
}

.embed-wrap {
  margin-bottom: 24px;
  padding: 0;
  border: 0;
  background: transparent;
}

.media-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 8px 0 28px;
}

.media-item {
  min-width: 0;
  margin: 0;
}

.media-item.media-youtube,
.media-item.media-soundcloud,
.media-item.media-bandcamp,
.media-item.is-wide,
.media-item:only-child {
  grid-column: 1 / -1;
}

.media-item img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: var(--paper-soft);
}

.media-item:only-child img {
  max-width: 420px;
}

.media-item.is-wide:only-child img {
  max-width: none;
}

.media-item iframe {
  display: block;
  width: 100%;
  border: 0;
}

.embed-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: rgba(34, 34, 34, 0.06);
}

.embed-frame iframe {
  position: absolute;
  inset: 0;
  height: 100%;
}

.media-item figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin: 24px 0 0;
}

.project-links .text-link {
  margin-top: 0;
  font-size: 14px;
}

.text-link {
  display: inline-flex;
  margin-top: 10px;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px var(--page-pad) 14px;
  background: linear-gradient(rgba(255, 254, 252, 0), rgba(255, 254, 252, 0.94) 60%);
  color: var(--muted);
  font-size: 13px;
  pointer-events: none;
}

.site-footer a {
  pointer-events: auto;
}

.ripple {
  position: fixed;
  width: 180px;
  height: 180px;
  margin: -90px 0 0 -90px;
  pointer-events: none;
  z-index: 30;
  opacity: 0.64;
  transform: scale(0.2) rotate(var(--ripple-rotation, 0deg));
  animation: ripple 650ms ease-out forwards;
}

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

.ripple path,
.ripple rect,
.ripple circle,
.ripple line,
.ripple polygon {
  fill: none;
  stroke: rgba(120, 120, 120, 0.7);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.ripple .spectrum-green {
  stroke: rgba(154, 220, 173, 0.52);
}

.ripple .spectrum-purple {
  stroke: rgba(166, 139, 220, 0.46);
}

.ripple .original-ripple path,
.ripple .original-ripple rect,
.ripple .original-ripple circle,
.ripple .original-ripple line,
.ripple .original-ripple polygon {
  stroke: rgba(160, 184, 166, 0.52);
}

.ripple .original-ripple > :nth-child(2n) {
  stroke: rgba(166, 139, 220, 0.42);
}

.ripple .original-ripple > :nth-child(3n) {
  stroke: rgba(150, 150, 146, 0.5);
}

@keyframes ripple {
  to {
    transform: scale(1.08) rotate(var(--ripple-rotation, 0deg));
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .projects-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-detail {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 6px 0 18px;
    border-left: 0;
  }

  .project-detail.is-empty {
    display: none;
  }

  .detail-head {
    display: none;
  }
}

@media (max-width: 760px) {
  :root {
    --page-pad: 16px;
  }

  .site-header {
    position: relative;
    flex-direction: column;
    background: rgba(255, 254, 252, 0.92);
  }

  .site-nav {
    gap: 12px 22px;
    justify-content: flex-start;
  }

  .sound-controls {
    gap: 22px;
  }

  .parameter-panel {
    left: 0;
    right: auto;
    width: min(280px, calc(100vw - 32px));
  }

  .stage {
    min-height: auto;
    padding-top: 44px;
    padding-bottom: 88px;
  }

  h1 {
    font-size: 34px;
  }

  .row-head,
  .project-row.has-thumb .row-head {
    grid-template-columns: 1fr;
  }

  .row-thumb {
    width: 100%;
    max-width: 260px;
    margin-top: 6px;
  }

  .media-list {
    grid-template-columns: 1fr;
  }

  .media-item:only-child img {
    max-width: none;
  }
}

@media (max-width: 460px) {
  .site-footer {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    padding: 0 var(--page-pad) 22px;
    background: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-light {
    transition: none;
  }

  .ripple {
    display: none;
  }
}
