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

.rows > li {
  border-bottom: 1px solid var(--line);
}

.row {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 1.5rem;
  margin-inline: -1rem;
  padding: 1.35rem 3rem 1.4rem 1rem;
  border-radius: 10px;
}

.row::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgb(var(--accent-rgb) / 0.05), transparent 70%),
    radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.03), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.row:hover::before,
.row:focus-visible::before {
  opacity: 1;
}

.row:focus-visible {
  outline-offset: -2px;
}

.row-title {
  font-size: var(--step-1);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.row-year {
  font: 400 var(--mono-s) / 1 var(--font-mono);
  color: var(--muted);
}

.row-desc {
  grid-column: 1 / -1;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: var(--step-0);
  line-height: 1.55;
}

.row-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 0.7rem;
  font: 400 var(--mono-s) / 1.4 var(--font-mono);
  color: var(--muted);
}

.row-arrow {
  position: absolute;
  right: 1rem;
  top: 1.75rem;
  width: 12px;
  height: 12px;
  color: var(--muted);
  transition: transform 0.35s var(--ease-out), color 0.2s ease;
}

.row:hover .row-arrow,
.row:focus-visible .row-arrow {
  color: var(--text);
  transform: translate(3px, -3px);
}

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

.pub {
  padding-block: 1.4rem;
  border-bottom: 1px solid var(--line);
}

.pub-title {
  max-width: var(--measure);
  font-size: var(--step-1);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.pub-authors {
  margin-top: 0.45rem;
  color: var(--muted);
}

.pub-authors .me {
  color: var(--text);
  font-weight: 600;
}

.pub-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  margin-top: 0.75rem;
  font: 400 var(--mono-s) / 1.4 var(--font-mono);
  color: var(--muted);
}

.tag {
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
}

.pub-links {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.75rem;
  font-size: var(--mono-s);
}

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

.tl-item {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  column-gap: 1.5rem;
}

.tl-dates {
  padding-top: 1.6rem;
  font: 400 var(--mono-s) / 1.4 var(--font-mono);
  color: var(--muted);
}

.tl-body {
  position: relative;
  padding: 1.35rem 0 1.5rem 1.75rem;
  border-left: 1px solid var(--line);
}

.tl-body::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 1.85rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--muted);
}

.tl-item:first-child .tl-body::before {
  border-color: var(--accent);
  background: var(--accent);
}

.tl-role {
  font-size: var(--step-1);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.tl-org {
  margin-top: 0.15rem;
  font: 400 var(--mono-s) / 1.5 var(--font-mono);
  color: var(--muted);
}

.tl-line {
  margin-top: 0.5rem;
  max-width: var(--measure);
  color: var(--muted);
}

.contact-lede {
  max-width: var(--measure);
  font-size: var(--step-1);
  font-weight: 300;
  line-height: 1.6;
}

.contact-list {
  margin-top: 2.25rem;
  border-top: 1px solid var(--line);
}

.contact-list > div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  align-items: baseline;
  column-gap: 1.5rem;
  padding-block: 0.95rem;
  border-bottom: 1px solid var(--line);
}

.contact-list dt {
  font: 400 var(--mono-s) / 1.5 var(--font-mono);
  color: var(--muted);
}

.contact-list dd {
  min-width: 0;
  font-size: var(--mono-m);
  overflow-wrap: anywhere;
}

.contact-list address {
  font-family: var(--font-mono);
  font-style: normal;
}

.legend {
  display: flex;
  align-items: center;
}

.legend-dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.legend-dot .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 10px -1px var(--c);
  transition: opacity 0.25s ease, transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}

.legend-all .dot {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: none;
}

.legend.is-filtering .legend-dot:not(.is-lit) .dot {
  opacity: 0.3;
}

.legend-dot.is-lit .dot {
  transform: scale(1.25);
}

.legend-dot[aria-pressed='true']:not(.legend-all) .dot {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--c), 0 0 12px var(--c);
}

.legend-label {
  margin-left: 0.6rem;
  font: 400 var(--mono-s) / 1 var(--font-mono);
  color: var(--muted);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.legend-label.is-visible {
  opacity: 1;
}

.legend-label b {
  font-weight: 500;
  color: var(--text);
}

.mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 32px;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 8, 11, 0.55);
  font: 400 var(--mono-s) / 1 var(--font-mono);
  color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.mode-toggle:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.mode-toggle .i-star {
  width: 10px;
  height: 10px;
  transition: color 0.2s ease, transform 0.4s var(--ease-out);
}

.mode-toggle[aria-pressed='true'] {
  color: var(--text);
}

.mode-toggle[aria-pressed='true'] .i-star {
  color: var(--accent);
  transform: rotate(45deg);
}

.rocket {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem 0.6rem;
  border-radius: 12px;
  color: var(--accent);
}

.rocket-svg {
  width: 28px;
  height: 44px;
  overflow: visible;
  transition: transform 0.4s var(--ease-out);
}

.rocket-flame {
  opacity: 0;
}

/* only the footer flame uses css transforms. the launch flame is animated by gsap, whose svg
   matrices assume the default view-box, and fill-box would shift that flame up into the body */
.rocket .rocket-flame {
  transform-box: fill-box;
  transform-origin: 50% 0;
}

.rocket:hover .rocket-svg,
.rocket:focus-visible .rocket-svg {
  transform: translateY(-3px);
}

.rocket:hover .rocket-flame,
.rocket:focus-visible .rocket-flame {
  animation: flicker 0.16s ease-in-out infinite alternate;
}

@keyframes flicker {
  from {
    opacity: 0.45;
    transform: scaleY(0.75);
  }

  to {
    opacity: 0.85;
    transform: scaleY(1.1);
  }
}

.rocket-caption {
  font: 400 var(--mono-s) / 1 var(--font-mono);
  color: var(--muted);
  transition: color 0.2s ease;
}

.rocket:hover .rocket-caption,
.rocket:focus-visible .rocket-caption {
  color: var(--text);
}

.linktree ul {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

/* the link cards: dark glass over the narrow view's sky, a hairline border and a faint lit top edge */
.linktree a:not(.np-play) {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 52px;
  padding: 0.85rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(10 12 17 / 0.55);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  font-size: 1rem;
  line-height: 1.2;
  /* the glass already parts the text from the sky; webkit would draw main's dark halo as boxes on it */
  text-shadow: none;
  transition: background-color 0.2s ease, border-color 0.18s ease, transform 0.18s ease;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .linktree a:not(.np-play) {
    background: #0b0d12;
  }
}

.linktree a:not(.np-play)::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: linear-gradient(90deg, rgb(255 255 255 / 0.14), rgb(255 255 255 / 0) 75%);
  pointer-events: none;
}

.linktree a .i {
  flex: none;
  width: 12px;
  height: 12px;
  color: var(--muted);
  transition: transform 0.18s ease, color 0.18s ease;
}

.linktree a:not(.np-play):active {
  border-color: var(--accent);
  transform: scale(0.99);
}

.linktree a:not(.np-play):active .i {
  color: var(--accent);
  transform: translate(1.5px, -1.5px);
}

@media (hover: hover) {
  .linktree a:not(.np-play):hover {
    background: rgb(16 19 25 / 0.62);
    border-color: var(--line-strong);
  }
}

@media (prefers-reduced-motion: reduce) {
  .linktree a:not(.np-play):active,
  .linktree a:not(.np-play):active .i {
    transform: none;
  }
}

/* the spotify card: one height in every state, so nothing moves when the track arrives */
.np-card {
  position: relative;
}

/* as tall as the card with a track in it, so the plain card holds the same space */
.linktree a.np-main {
  min-height: 86px;
}

.np-now {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.np-now[hidden] {
  display: none;
}

/* spotify artwork rules: square, 4px corners, never cropped or covered */
.np-art {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  object-fit: contain;
  background: var(--surface-2);
}

.np-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  text-align: left;
}

/* the top line leaves room for spotify's logo in the card's corner */
.np-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-right: 80px;
  font: 400 var(--mono-s) / 1.4 var(--font-mono);
  color: var(--muted);
}

.np-title,
.np-artists {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.np-title {
  font-size: 0.9375rem;
  line-height: 1.3;
  color: var(--text);
}

.np-artists {
  font-size: 0.8125rem;
  line-height: 1.3;
  color: var(--muted);
}

.np-eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 8px;
}

.np-card.is-playing .np-eq {
  display: inline-flex;
}

.np-eq i {
  display: block;
  width: 2px;
  height: 100%;
  border-radius: 1px;
  background: var(--accent);
  transform-origin: 50% 100%;
  animation: eq 1.1s ease-in-out infinite alternate;
}

.np-eq i:nth-child(2) {
  animation-duration: 0.8s;
  animation-delay: -0.3s;
}

.np-eq i:nth-child(3) {
  animation-duration: 1.3s;
  animation-delay: -0.6s;
}

/* spotify's full logo, the attribution, links to the track; its tap area is 44px tall */
.np-play {
  position: absolute;
  top: 0;
  right: calc(1.15rem + 22px);
  z-index: 1;
  display: flex;
  align-items: flex-start;
  height: 44px;
  padding-top: 12px;
}

.np-play[hidden] {
  display: none;
}

.np-play img {
  display: block;
  width: 70px;
  height: auto;
}

@media (prefers-reduced-motion: reduce) {
  .np-eq i {
    animation: none;
    transform: scaleY(0.7);
  }
}

@media (max-width: 880px) {
  .tl-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .tl-dates {
    padding-top: 1.25rem;
    padding-left: 1.75rem;
    border-left: 1px solid var(--line);
  }

  .tl-body {
    padding-top: 0.35rem;
  }

  .tl-body::before {
    top: -0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .row-arrow,
  .rocket-svg,
  .legend-dot .dot,
  .mode-toggle .i-star {
    transition: none;
  }

  .row:hover .row-arrow,
  .row:focus-visible .row-arrow,
  .rocket:hover .rocket-svg,
  .rocket:focus-visible .rocket-svg {
    transform: none;
  }

  .rocket:hover .rocket-flame,
  .rocket:focus-visible .rocket-flame {
    animation: none;
    opacity: 0.7;
  }
}

.orbit {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.orbit.is-open {
  z-index: 2;
}

.orbit-path {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
}

.orbit-path ellipse {
  fill: none;
  stroke-width: 1;
  transition: stroke 0.6s ease;
}

.orbit-base {
  stroke: rgba(255, 255, 255, 0.06);
}

.orbit-lit {
  stroke: rgba(255, 255, 255, 0.3);
}

.orbit.is-recent .orbit-base {
  stroke: rgba(255, 255, 255, 0.04);
}

.orbit.is-recent .orbit-lit {
  stroke: rgba(255, 255, 255, 0.16);
}

.satellite {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  pointer-events: auto;
  will-change: transform;
}

.satellite:focus-visible {
  outline-offset: 6px;
  border-radius: 6px;
}

.sat-body {
  display: flex;
  align-items: center;
  gap: 7px;
  transition: opacity 0.5s cubic-bezier(0.37, 0, 0.63, 1);
}

/* depth cue: the tile dims while it passes behind the hero text, never while open */
.orbit.is-behind:not(.is-open) .sat-body {
  opacity: 0.45;
}

/* and takes no pointer input then, so hovers and clicks reach the text. keyboard focus still opens it */
.orbit.is-behind:not(.is-open) .satellite {
  pointer-events: none;
}

/* hover and focus still bring it back at the quicker pace of the label */
.orbit.is-open .sat-body {
  transition-duration: 0.25s;
}

/* spotify artwork rules: square, 4px corners, nothing drawn over it. ring and glow sit outside */
.sat-art {
  display: block;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: var(--surface-2);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px rgb(var(--accent-rgb) / 0.85), 0 0 20px 2px rgb(var(--accent-rgb) / 0.22);
  transition: box-shadow 0.6s ease;
}

.orbit.is-recent .sat-art {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px rgb(var(--accent-rgb) / 0.4);
}

.sat-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.sat-icon {
  display: block;
  width: 22px;
  height: 21px;
}

.sat-eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 8px;
  visibility: hidden;
}

.orbit.is-playing .sat-eq {
  visibility: visible;
}

.sat-eq i {
  display: block;
  width: 2px;
  height: 100%;
  border-radius: 1px;
  background: var(--accent);
  transform-origin: 50% 100%;
  animation: eq 1.1s ease-in-out infinite alternate;
}

.sat-eq i:nth-child(2) {
  animation-duration: 0.8s;
  animation-delay: -0.3s;
}

.sat-eq i:nth-child(3) {
  animation-duration: 1.3s;
  animation-delay: -0.6s;
}

@keyframes eq {
  from {
    transform: scaleY(0.3);
  }

  to {
    transform: scaleY(1);
  }
}

.sat-label {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  width: max-content;
  max-width: 15rem;
  padding: 0.7rem 0.85rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(var(--surface), var(--surface)), rgba(8, 10, 14, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.8);
  opacity: 0;
  visibility: hidden;
  transform: translate(-4px, -50%);
  transition: opacity 0.25s ease, transform 0.35s var(--ease-out), visibility 0s linear 0.25s;
}

.orbit.is-flipped .sat-label {
  left: auto;
  right: calc(100% + 12px);
  transform: translate(4px, -50%);
}

.orbit.is-open .sat-label {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
  transition: opacity 0.25s ease, transform 0.35s var(--ease-out), visibility 0s;
}

.sat-eyebrow {
  font: 400 0.6875rem / 1.3 var(--font-mono);
  color: var(--muted);
}

.sat-track {
  font-size: 0.9375rem;
  line-height: 1.3;
  color: var(--text);
  overflow-wrap: anywhere;
}

.sat-artists {
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.sat-logo {
  display: block;
  width: 70px;
  height: auto;
  margin-top: 0.55rem;
}

@media (max-width: 720px), (max-height: 500px) and (pointer: coarse) and (orientation: landscape) {
  .orbit {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sat-eq i {
    animation: none;
    transform: scaleY(0.7);
  }

  .sat-label,
  .orbit.is-open .sat-label,
  .sat-body,
  .sat-art,
  .orbit-path ellipse {
    transition: none;
  }
}
