/* ==========================================================================
   Rishi Praseeth Krishnan — portfolio
   colin.cv-style system: pill nav, canvas hero, folder work cards,
   stacked testimonial cards, particle footer.
   ========================================================================== */

/* ---- Reset & base ---- */

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

html {
  height: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  background: var(--background);
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--text-primary);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: var(--font-size-3);
  line-height: 1.6;
  transition: background 0.2s, color 0.2s;
  overflow-x: clip;
  padding-top: env(safe-area-inset-top);
}

a { color: inherit; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
img { max-width: 100%; display: block; }

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

/* ---- Skip link ---- */

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 300;
  background: var(--card-bg);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: var(--radius-2);
  border: 1px solid var(--border-color);
  text-decoration: none;
  font-size: var(--font-size-2);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

/* ==========================================================================
   NAV — floating pill
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  margin-top: calc(var(--space-6) + env(safe-area-inset-top));
  z-index: 200;
  display: grid;
  grid-template-columns: 1fr minmax(auto, 720px) 1fr;
  pointer-events: none;
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.44, 0, 0.56, 1);
  will-change: transform;
}
.site-header.header-hidden {
  transform: translateY(calc(-100% - var(--space-6) - env(safe-area-inset-top) - 8px));
}

.nav-wrap {
  grid-column: 2;
  background: var(--nav-bg);
  border: 1px solid var(--border-color);
  border-radius: 22px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: all;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin: 0 var(--space-6);
}

.nav-inner {
  padding: 0 7px 0 var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
}

.nav-logo {
  font-size: var(--font-size-2);
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: var(--font-size-2);
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.nav-btn:hover {
  color: var(--text-primary);
  background: var(--accent-subtle);
}

.arrow-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.nav-divider {
  width: 1px;
  height: 16px;
  background: var(--border-color);
  margin: 0 4px;
}

.theme-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color 0.15s ease, background 0.15s ease;
  margin-left: 4px;
}
.theme-btn:hover {
  color: var(--text-primary);
  background: var(--accent-subtle);
}
.theme-btn svg { width: 16px; height: 16px; }

/* one icon at a time — default (light UI showing) offers the moon */
.theme-btn .icon-sun { display: none; }
.theme-btn .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  .theme-btn .icon-sun { display: block; }
  .theme-btn .icon-moon { display: none; }
}
:root[data-theme="dark"] .theme-btn .icon-sun { display: block; }
:root[data-theme="dark"] .theme-btn .icon-moon { display: none; }
:root[data-theme="light"] .theme-btn .icon-sun { display: none; }
:root[data-theme="light"] .theme-btn .icon-moon { display: block; }

/* Mobile: collapse text links into expanding panel inside the pill */
.nav-menu-btn {
  display: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}
.nav-menu-btn:hover { color: var(--text-primary); background: var(--accent-subtle); }
.nav-menu-panel {
  display: none;
  flex-direction: column;
  padding: 4px 10px 12px;
  gap: 2px;
}
.nav-menu-panel .nav-btn { padding: 10px 10px; font-size: var(--font-size-3); }

@media (max-width: 600px) {
  .site-header { margin-top: var(--space-3); }
  .nav-links { display: none; }
  .nav-menu-btn { display: flex; }
  .nav-wrap.menu-open .nav-menu-panel { display: flex; }
}

/* ==========================================================================
   HERO — particle canvas only
   ========================================================================== */

.hero {
  position: relative;
  height: 100dvh;
  overflow: hidden;
  background: var(--background);
}

.scene-container {
  position: absolute;
  top: 44px;
  left: 0; right: 0; bottom: 0;
  z-index: 0;
}
.scene-container canvas { display: block; width: 100%; height: 100%; }

.hero-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}
.hero-fallback .hero-fallback-name {
  font-size: var(--font-size-8);
  font-weight: 500;
  letter-spacing: -0.035em;
  color: var(--text-primary);
}
.hero-fallback .accent { color: var(--accent); font-family: var(--font-serif); font-style: italic; font-weight: 400; }

/* Symbol caption: names the project the particles are drawing, links to its
   card. icon-particles.js sets --label-top from the camera so it sits under
   the symbol at any height, and swaps the name while the particles morph. */
.hero-label {
  position: absolute;
  left: 50%;
  top: var(--label-top, 78%);
  z-index: 2;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.6ch;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--font-size-3);
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, opacity 0.22s ease;
}
.hero-label-prompt { color: var(--accent); }
.hero-label:hover,
.hero-label:focus-visible { color: var(--text-primary); background: var(--accent-subtle); }
.hero-label.is-swapping { opacity: 0; }
.hero-fallback-on .hero-label { display: none; }
.work-card { scroll-margin-top: 96px; }

/* Memory status line — the session narrator */
.hero-status {
  position: absolute;
  left: max(24px, var(--gutter));
  bottom: 32px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: var(--font-size-2);
  color: var(--text-tertiary);
  display: flex;
  align-items: baseline;
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100vw - 48px);
  overflow: hidden;
}
.hero-status-cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  margin-left: 3px;
  background: var(--accent);
  opacity: 0.8;
  align-self: center;
  animation: status-blink 1.1s steps(1) infinite;
}
@keyframes status-blink {
  50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-status-cursor { animation: none; }
}

/* Seen marker — the site knows what you've read */
.seen-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 7px;
  vertical-align: 1px;
}

/* ==========================================================================
   WORK — folder cards
   ========================================================================== */

.work-section {
  padding: 80px 0 0;
  background: var(--background);
}

.work-inner {
  max-width: 100%;
  margin: 0;
  padding: 0 var(--gutter);
}

.work-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-7);
  margin-bottom: 128px;
}

.work-title {
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--text-primary);
  margin: 0 0 var(--space-2);
}
.work-title .accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.work-sub {
  font-size: var(--font-size-4);
  color: var(--text-secondary);
  margin: 0;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 96px;
  align-items: start;
  /* bleed 24px past the page margin so 24px-padded labels align with the header */
  margin: 0 -24px;
}

.work-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  cursor: pointer;
}

.wc-visual {
  position: relative;
  height: 260px;
  overflow: visible;
  transition: transform 0.4s var(--ease-pop);
  transform-origin: center bottom;
}

.wc-bg {
  position: absolute;
  inset: 0;
  background: var(--card-bg);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(42,26,14,0.10), 0 1px 3px rgba(42,26,14,0.06);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
  z-index: 0;
}
.work-card:hover .wc-bg {
  box-shadow: 0 16px 56px rgba(42,26,14,0.18), 0 4px 16px rgba(42,26,14,0.10);
  border-color: color-mix(in oklab, var(--accent) 15%, transparent);
}

/* Folder shape — sinks on hover, revealing the fan of cards above it */
.wc-folder {
  position: absolute;
  bottom: -2px;
  left: -1px;
  right: -1px;
  width: auto;
  height: 158px;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
  border-radius: 0 0 24px 24px;
}
.wc-folder svg {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.38s var(--ease-smooth);
}
.wc-folder path {
  fill: var(--card-bg);
  transition: fill 0.2s;
}
.work-card:hover .wc-folder svg { transform: translateY(41px); }

/* Company label rides the folder tab */
.wc-tab-label {
  position: absolute;
  top: 106px;
  left: 24px;
  padding: 16px 0 0;
  z-index: 7;
  pointer-events: none;
  transition: top 0.38s var(--ease-smooth);
  font-size: var(--font-size-2);
  font-weight: 500;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.work-card:hover .wc-tab-label { top: 147px; }

/* Pop-out mini screens */
.wc-img {
  position: absolute;
  overflow: hidden;
  transition: transform 0.4s var(--ease-pop), left 0.4s var(--ease-pop);
}

.wc-img-c {
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  z-index: 1;
}

.wc-img-l, .wc-img-m, .wc-img-r {
  width: 137px;
  height: 253px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(42,26,14,0.14), 0 2px 6px rgba(42,26,14,0.07);
  z-index: 0;
}
.wc-img-m { left: calc(50% - 69px); }

/* Card 1 — default fan */
.work-grid .work-card:nth-child(3n+1) .wc-img-l { top: -24px; left: calc(50% - 113px); transform: rotate(-1deg); }
.work-grid .work-card:nth-child(3n+1) .wc-img-m { top: -24px; transform: rotate(4deg); }
.work-grid .work-card:nth-child(3n+1) .wc-img-r { top: -24px; left: calc(50% - 25px); transform: rotate(-1deg); }
.work-card:nth-child(3n+1):hover .wc-img-l { left: -16px; transform: rotate(-8deg) translateY(-40px); }
.work-card:nth-child(3n+1):hover .wc-img-m { transform: rotate(4deg) translateY(-76px); }
.work-card:nth-child(3n+1):hover .wc-img-r { left: calc(100% - 123px); transform: rotate(6deg) translateY(-96px); }

/* Card 2 — raised 24px */
.work-grid .work-card:nth-child(3n+2) .wc-img-l { top: -48px; left: calc(50% - 129px); transform: rotate(-1deg); }
.work-grid .work-card:nth-child(3n+2) .wc-img-m { top: -48px; left: 50%; transform: translateX(-50%) rotate(4deg); }
.work-grid .work-card:nth-child(3n+2) .wc-img-r { top: -48px; left: calc(50% + 7px); transform: rotate(-1deg); }
.work-card:nth-child(3n+2):hover .wc-img-l { left: -12px; transform: rotate(-3deg) translateY(-96px); }
.work-card:nth-child(3n+2):hover .wc-img-m { transform: translateX(-50%) rotate(-3deg) translateY(-108px); }
.work-card:nth-child(3n+2):hover .wc-img-r { left: calc(100% - 113px); transform: rotate(10deg) translateY(-44px); }

/* Card 3 — tighter stack */
.work-grid .work-card:nth-child(3n) .wc-img-l { top: -8px; left: calc(50% - 97px); transform: rotate(-3deg); }
.work-grid .work-card:nth-child(3n) .wc-img-m { top: -8px; transform: rotate(2deg); }
.work-grid .work-card:nth-child(3n) .wc-img-r { top: -8px; left: calc(50% - 9px); transform: rotate(12deg); }
.work-card:nth-child(3n):hover .wc-img-l { left: 12px; transform: rotate(-10deg) translateY(-96px); }
.work-card:nth-child(3n):hover .wc-img-m { left: calc(50% - 53px); transform: rotate(12deg) translateY(-80px) translateX(12px); }
.work-card:nth-child(3n):hover .wc-img-r { left: calc(100% - 47px); transform: rotate(19deg) translateY(-24px); }

/* focus-visible mirrors hover */
.work-card:focus-visible .wc-folder svg { transform: translateY(41px); }
.work-card:focus-visible .wc-tab-label { top: 147px; }
.work-card:focus-visible .wc-bg {
  box-shadow: 0 16px 56px rgba(42,26,14,0.18), 0 4px 16px rgba(42,26,14,0.10);
  border-color: color-mix(in oklab, var(--accent) 15%, transparent);
}
.work-card:nth-child(3n+1):focus-visible .wc-img-l { left: -16px; transform: rotate(-8deg) translateY(-40px); }
.work-card:nth-child(3n+1):focus-visible .wc-img-m { transform: rotate(4deg) translateY(-76px); }
.work-card:nth-child(3n+1):focus-visible .wc-img-r { left: calc(100% - 123px); transform: rotate(6deg) translateY(-96px); }
.work-card:nth-child(3n+2):focus-visible .wc-img-l { left: -12px; transform: rotate(-3deg) translateY(-96px); }
.work-card:nth-child(3n+2):focus-visible .wc-img-m { transform: translateX(-50%) rotate(-3deg) translateY(-108px); }
.work-card:nth-child(3n+2):focus-visible .wc-img-r { left: calc(100% - 113px); transform: rotate(10deg) translateY(-44px); }
.work-card:nth-child(3n):focus-visible .wc-img-l { left: 12px; transform: rotate(-10deg) translateY(-96px); }
.work-card:nth-child(3n):focus-visible .wc-img-m { left: calc(50% - 53px); transform: rotate(12deg) translateY(-80px) translateX(12px); }
.work-card:nth-child(3n):focus-visible .wc-img-r { left: calc(100% - 47px); transform: rotate(19deg) translateY(-24px); }

/* Title inside the folder */
.wc-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px 24px 22px;
  z-index: 10;
}
.wc-name {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--text-primary);
  margin: 0;
}

.wc-reveal {
  height: 72px;
  margin-top: 38px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wc-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.42;
  margin: 0;
}

/* ---- Mini-screen contents (CSS-built, no screenshots) ---- */

.mini {
  width: 100%;
  height: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 9px;
  line-height: 1.5;
  color: var(--text-secondary);
  overflow: hidden;
}
.mini-dots { display: flex; gap: 4px; margin-bottom: 2px; }
.mini-dots i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border-color);
}
.mini-line {
  height: 5px;
  border-radius: 3px;
  background: var(--surface);
}
.mini-line.w40 { width: 40%; }
.mini-line.w60 { width: 60%; }
.mini-line.w80 { width: 80%; }
.mini-line.accent { background: var(--accent-subtle); }
.mini-chip {
  align-self: flex-start;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-subtle);
  color: var(--accent);
  font-size: 8px;
  font-weight: 500;
}
.mini-code {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-tertiary);
  white-space: pre;
  overflow: hidden;
}
.mini-code .tok { color: var(--accent); }
.mini-stat {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.mini-stat small {
  display: block;
  font-size: 8px;
  font-weight: 400;
  color: var(--text-tertiary);
  letter-spacing: 0;
}
.mini-bar {
  height: 20px;
  border-radius: 5px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.mini-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--accent);
  opacity: 0.65;
  border-radius: 5px;
}

/* Center visual — full-card scene behind the folder */
.wc-scene {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 30px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.8;
}
/* every project scene is the same night window: soot to ash, dust text, amber prompt */
.wc-scene-hcr, .wc-scene-fmp, .wc-scene-vdk, .wc-scene-crv, .wc-scene-fci,
.wc-scene-sen, .wc-scene-cvb, .wc-scene-nt, .wc-scene-tq, .wc-scene-rp,
.wc-scene-tx {
  background: linear-gradient(160deg, oklch(0.17 0.008 75), oklch(0.27 0.012 75));
  color: oklch(0.74 0.016 75);
}
.wc-scene .prompt { color: oklch(0.80 0.13 70); }
.wc-scene pre { font-family: inherit; margin: 0; }

/* ==========================================================================
   ALSO BUILT — minimal list
   ========================================================================== */

.more-section {
  padding: 152px 0 0;
  background: var(--background);
}
.more-inner { padding: 0 var(--gutter); }
.more-title {
  font-size: var(--font-size-6);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
}
.more-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-color);
}
.more-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-2);
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  border-radius: var(--radius-1);
  transition: background 0.15s ease;
}
.more-row:hover { background: var(--accent-subtle); }
.more-row-name {
  font-size: var(--font-size-4);
  font-weight: 500;
  color: var(--text-primary);
  min-width: 110px;
}
.more-row-desc {
  font-size: var(--font-size-3);
  color: var(--text-secondary);
  flex: 1;
}
.more-row .arrow-icon {
  color: var(--text-tertiary);
  align-self: center;
  transition: color 0.15s ease, transform 0.2s ease;
}
.more-row:hover .arrow-icon {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ==========================================================================
   EXPERIENCE — quiet rows
   ========================================================================== */

.exp-section { padding: 152px 0 0; background: var(--background); }
.exp-inner { padding: 0 var(--gutter); }
.exp-title {
  font-size: var(--font-size-6);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
}
.exp-list { display: flex; flex-direction: column; gap: var(--space-7); }
.exp-item { display: grid; grid-template-columns: 150px 1fr; gap: var(--space-6); }
.exp-date {
  font-size: var(--font-size-2);
  color: var(--text-tertiary);
  padding-top: 3px;
  white-space: nowrap;
}
.exp-role {
  font-size: var(--font-size-4);
  font-weight: 500;
  color: var(--text-primary);
}
.exp-org {
  font-size: var(--font-size-2);
  color: var(--text-tertiary);
  margin-bottom: var(--space-2);
}
.exp-desc {
  font-size: var(--font-size-3);
  color: var(--text-secondary);
  max-width: 52ch;
}

@media (max-width: 600px) {
  .exp-item { grid-template-columns: 1fr; gap: var(--space-1); }
}

/* ==========================================================================
   TESTIMONIALS — stacked card deck ("what the systems say")
   ========================================================================== */

.testimonials-section {
  background: var(--background);
  display: flex;
  align-items: center;
  padding: 152px 0 60px;
}
.testimonials-inner {
  display: grid;
  grid-template-columns: 1fr 430px;
  grid-template-rows: auto auto;
  column-gap: 100px;
  padding: 0 var(--gutter);
  width: 100%;
}
.testimonials-left { align-self: center; }
.testimonials-title {
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin: 0 0 var(--space-4);
  line-height: 1.15;
}
.testimonials-title .accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.testimonials-sub {
  font-size: var(--font-size-3);
  color: var(--text-secondary);
  max-width: 40ch;
}

.testimonials-right-wrap { position: relative; }
.testimonials-right {
  position: relative;
  height: 260px;
}
.ts-card {
  position: absolute;
  top: 0; left: 0; right: 0;
  cursor: pointer;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-4);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(42,26,14,0.10), 0 1px 3px rgba(42,26,14,0.06);
  will-change: transform, opacity;
  transform-origin: top center;
  transition: transform 400ms ease, opacity 400ms ease;
}
.testimonial-quote {
  font-size: var(--font-size-4);
  line-height: 1.65;
  color: var(--text-primary);
  margin-bottom: var(--space-5);
  flex: 1;
}
.testimonial-author { display: flex; align-items: center; gap: var(--space-3); }
.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--font-size-2);
  color: var(--accent);
}
.author-name { font-size: 15px; font-weight: 500; color: var(--text-primary); }
.author-role {
  font-size: var(--font-size-2);
  color: var(--text-tertiary);
  letter-spacing: 0.01em;
}

.ts-nav {
  grid-column: 2;
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  padding-top: var(--space-4);
}
.ts-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}
.ts-btn:hover { color: var(--text-primary); background: var(--accent-subtle); }
.ts-btn svg { width: 16px; height: 16px; }

/* ==========================================================================
   FOOTER — particle send-off + floating pill
   ========================================================================== */

.footer-particle-section {
  height: 40vh;
  min-height: 280px;
  position: relative;
  overflow: hidden;
  background: var(--background);
  margin-top: 152px;
}

/* Set by js/lastfm.js only on the page that mounts the music card. The footer
   stops being a fixed 40vh strip and grows around the card, so the particle
   canvas — absolute inset:0 — covers it and the drift passes behind it.
   The bottom padding is large because .footer-float and .footer-credit are
   absolutely positioned and reserve no flow space of their own: the pill
   bottoms out at 72px and stands ~46px tall, so ~118px of that padding is
   already spoken for before any gap below the card. */
.footer-particle-section.has-lfm {
  height: auto;
  min-height: 40vh;
  padding: 140px 0 318px;
  margin-top: 0;
}
@media (max-width: 700px) {
  .footer-particle-section.has-lfm { padding: 72px 0 236px; }
}
#footer-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.footer-float {
  position: absolute;
  bottom: 72px;
  left: 0; right: 0;
  display: grid;
  grid-template-columns: 1fr minmax(auto, 720px) 1fr;
  pointer-events: none;
  z-index: 10;
}
.footer-nav-wrap {
  grid-column: 2;
  background: var(--nav-bg);
  border: 1px solid var(--border-color);
  border-radius: 22px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: all;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin: 0 var(--space-6);
}
.footer-nav-inner {
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
}
.footer-nav-group { display: flex; align-items: center; gap: 2px; }
.footer-nav-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: var(--font-size-2);
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.footer-nav-btn:hover { color: var(--text-primary); background: var(--accent-subtle); }

.footer-credit {
  position: absolute;
  bottom: 24px;
  left: 0; right: 0;
  text-align: center;
  font-size: var(--font-size-1);
  color: var(--text-tertiary);
  pointer-events: none;
  z-index: 10;
}
.footer-credit a { text-decoration: none; pointer-events: all; }

/* ==========================================================================
   PROJECT DETAIL PAGES
   ========================================================================== */

.project-page { padding: 140px var(--gutter) 96px; }
.project-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-2);
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: var(--space-8);
}
.project-back:hover { color: var(--accent); }
.card-title,
.project-hero-title {
  font-family: var(--font-serif);
  font-size: var(--font-size-8);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: var(--space-3);
}
.project-hero-sub {
  font-size: var(--font-size-5);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  max-width: 56ch;
}
.project-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-9); }
.tag {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: var(--font-size-2);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  background: var(--card-bg);
}
/* text pulled 12% toward ink/bone: plain --accent on its own 8% wash is 4.47:1 in light */
.tag--accent { color: color-mix(in oklab, var(--accent) 88%, var(--text-primary)); border-color: color-mix(in oklab, var(--accent) 25%, transparent); background: var(--accent-subtle); }
.project-section { margin-bottom: var(--space-9); }
.project-section h2 {
  font-size: var(--font-size-6);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}
.project-section p {
  font-size: var(--font-size-4);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-4);
  max-width: 62ch;
}
.project-section ul {
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: var(--font-size-4);
  line-height: 1.7;
}
.project-section li { margin-bottom: var(--space-2); }
.project-section code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-1);
  padding: 1px 6px;
}
/* hero block sits on the same 48px rhythm as the sections below, with or
   without a row of links under the intro */
.project-page > section:first-child { margin-bottom: var(--space-9); }
.project-page > section:first-child > .project-hero-sub:last-child { margin-bottom: 0; }
.project-links { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.project-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  font-size: var(--font-size-3);
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.project-links a:hover { background: var(--accent-subtle); border-color: color-mix(in oklab, var(--accent) 25%, transparent); }

/* ==========================================================================
   RESPONSIVE — work grid
   ========================================================================== */

@media (min-width: 861px) and (max-width: 1590px) {
  .work-grid { gap: 96px 24px; }
}

@media (min-width: 701px) and (max-width: 860px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); gap: 96px 28px; }
  .testimonials-inner {
    column-gap: 40px;
    padding: 0 24px;
    grid-template-columns: 1fr min(430px, calc(100vw - 48px - 140px));
  }
  .testimonials-title { font-size: 30px; }
}

@media (max-width: 700px) {
  .testimonials-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    row-gap: 4px;
    padding: 0 20px;
  }
  .testimonials-left { grid-column: 1; grid-row: 1; margin-bottom: 16px; }
  .testimonials-right-wrap { grid-column: 1; grid-row: 2; }
  .ts-nav { grid-column: 1; grid-row: 3; padding-top: 0; margin-top: -36px; position: relative; z-index: 21; }
  .ts-btn { width: 44px; height: 44px; }
  .ts-btn svg { width: 20px; height: 20px; }
  .testimonials-title { font-size: 30px; }
  .ts-card { border-radius: var(--radius-5); }
  /* no hover choreography on small screens */
  .work-card:hover .wc-folder svg { transform: none; }
  .work-card:hover .wc-tab-label { top: 106px; }
  .work-card:hover .wc-bg { box-shadow: none; border-color: var(--border-color); }
  .wc-img-l, .wc-img-m, .wc-img-r { display: none; }
}

@media (max-width: 600px) {
  .work-section { padding: 0; }
  .work-inner, .more-inner, .exp-inner { padding: 0 20px; }
  .work-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: 52px;
  }
  .work-title { font-size: 30px; }
  .work-grid { grid-template-columns: 1fr; gap: 40px; margin: 0; }
  .more-section, .exp-section, .testimonials-section { padding-top: 96px; }
  .more-row { flex-wrap: wrap; position: relative; padding-right: 36px; row-gap: var(--space-2); }
  .more-row-desc { flex-basis: 100%; }
  /* arrow rides the name line instead of taking a row of its own */
  .more-row .arrow-icon { position: absolute; right: var(--space-3); top: 21px; }
  .project-page { padding: 110px 20px 64px; }
  .card-title, .project-hero-title { font-size: var(--font-size-7); }
}

/* touch: the 30px pill buttons get a 44px-tall hit area without moving the pill */
@media (pointer: coarse) {
  .nav-menu-btn, .theme-btn, .term-btn, .footer-nav-btn { position: relative; }
  .project-links a { min-height: 44px; }
  .nav-menu-btn::after, .theme-btn::after, .term-btn::after, .footer-nav-btn::after {
    content: '';
    position: absolute;
    inset: -7px -2px;
  }
}

@media (hover: none) {
  .work-card:hover .wc-visual { transform: none; }
  .work-card:hover .wc-bg {
    box-shadow: 0 2px 8px rgba(42,26,14,0.10), 0 1px 3px rgba(42,26,14,0.06);
    border-color: var(--border-color);
  }
  .work-card:hover .wc-folder svg { transform: none; }
  .work-card:hover .wc-tab-label { top: 106px; }
  .work-card:nth-child(3n+1):hover .wc-img-l { left: calc(50% - 113px); transform: rotate(-1deg); }
  .work-card:nth-child(3n+1):hover .wc-img-m { transform: rotate(4deg); }
  .work-card:nth-child(3n+1):hover .wc-img-r { left: calc(50% - 25px); transform: rotate(-1deg); }
  .work-card:nth-child(3n+2):hover .wc-img-l { left: calc(50% - 129px); transform: rotate(-1deg); }
  .work-card:nth-child(3n+2):hover .wc-img-m { transform: translateX(-50%) rotate(4deg); }
  .work-card:nth-child(3n+2):hover .wc-img-r { left: calc(50% + 7px); transform: rotate(-1deg); }
  .work-card:nth-child(3n):hover .wc-img-l { left: calc(50% - 97px); transform: rotate(-3deg); }
  .work-card:nth-child(3n):hover .wc-img-m { transform: rotate(2deg); }
  .work-card:nth-child(3n):hover .wc-img-r { left: calc(50% - 9px); transform: rotate(12deg); }
}

/* ==========================================================================
   TERMINAL — press ` anywhere
   ========================================================================== */

.rterm {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translate(-50%, calc(-100% - 24px));
  width: min(640px, calc(100vw - 32px));
  z-index: 300;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-4);
  box-shadow: 0 16px 56px rgba(42, 26, 14, 0.18), 0 4px 16px rgba(42, 26, 14, 0.10);
  font-family: var(--font-mono);
  font-size: var(--font-size-2);
  transition: transform 0.34s var(--ease-pop), opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}
.rterm-open {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}
.rterm-out {
  max-height: 300px;
  overflow-y: auto;
  padding: 16px 18px 8px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.rterm-line { white-space: pre-wrap; word-break: break-word; }
.rterm-echo { color: var(--text-tertiary); }
.rterm-in-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px 14px;
}
.rterm-prompt { color: var(--accent); white-space: nowrap; }
.rterm-in {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: inherit;
  padding: 4px 0;
}
@media (prefers-reduced-motion: reduce) {
  .rterm { transition: opacity 0.15s ease; transform: translate(-50%, 0); }
}

/* ==========================================================================
   GITHUB FRESHNESS — pushed Xd ago chips
   ========================================================================== */

.gh-fresh {
  font-family: var(--font-mono);
  font-size: var(--font-size-1);
  color: var(--text-tertiary);
  white-space: nowrap;
  align-self: center;
}

/* Terminal trigger in the nav pill */
.term-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: color 0.15s ease, background 0.15s ease;
}
.term-btn:hover {
  color: var(--accent);
  background: var(--accent-subtle);
}


/* ==========================================================================
   AUDIO PLAYER — a second pill under the nav. Same glass, same 22px radius,
   same grid column, so it reads as part of the header rather than an overlay.
   Rides the header's hide-on-scroll for free.
   ========================================================================== */

.rplay {
  grid-column: 2;
  grid-row: 2;
  justify-self: stretch;
  margin: var(--space-2) var(--space-6) 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: 40px;
  padding: 0 var(--space-3) 0 6px;
  background: var(--nav-bg);
  border: 1px solid var(--border-color);
  border-radius: 22px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  pointer-events: all;
  transform-origin: top center;
  transform: translateY(-8px) scaleY(0.92);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.32s var(--ease-pop), opacity 0.22s ease, visibility 0s linear 0.32s;
}
.rplay-open {
  transform: translateY(0) scaleY(1);
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

/* play / pause — round to echo the pill, amber only when it matters */
.rplay-toggle {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-subtle);
  transition: background 0.15s ease;
}
.rplay-toggle:hover { background: color-mix(in oklab, var(--accent) 16%, transparent); }

/* triangle by default, two bars while playing — drawn in CSS, no icon swap */
.rplay-glyph {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4.5px 0 4.5px 7.5px;
  border-color: transparent transparent transparent currentColor;
  margin-left: 2px;
}
.rplay-playing .rplay-glyph {
  width: 7px;
  height: 9px;
  margin-left: 0;
  border: none;
  background: currentColor;
  clip-path: polygon(0 0, 2.5px 0, 2.5px 100%, 0 100%, 0 0, 4.5px 0, 7px 0, 7px 100%, 4.5px 100%, 4.5px 0);
}

/* same face as the nav logo — Satoshi, 13px, 500, matching tracking */
.rplay-title {
  flex: none;
  font-family: var(--font-sans);
  font-size: var(--font-size-2);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  white-space: nowrap;
}
.rplay-time {
  flex: none;
  min-width: 30px;
  font-family: var(--font-mono);
  font-size: var(--font-size-1);
  font-variant-numeric: tabular-nums;
  color: var(--text-tertiary);
}

/* ---- hairline ranges: 2px track, amber fill, square thumb ---- */

.rplay-seek,
.rplay-volrange {
  -webkit-appearance: none;
  appearance: none;
  height: 14px;
  background: transparent;
  cursor: pointer;
  --fill: 0%;
}
.rplay-seek { flex: 1 1 auto; min-width: 40px; }

.rplay-seek::-webkit-slider-runnable-track,
.rplay-volrange::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(to right,
    var(--accent) 0 var(--fill),
    var(--border-color) var(--fill) 100%);
}
.rplay-seek::-moz-range-track,
.rplay-volrange::-moz-range-track {
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(to right,
    var(--accent) 0 var(--fill),
    var(--border-color) var(--fill) 100%);
}
.rplay-seek::-webkit-slider-thumb,
.rplay-volrange::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 3px;
  height: 11px;
  margin-top: -4.5px;
  border-radius: 1px;
  background: var(--accent);
  transition: transform 0.15s ease;
}
.rplay-seek::-moz-range-thumb,
.rplay-volrange::-moz-range-thumb {
  width: 3px;
  height: 11px;
  border: none;
  border-radius: 1px;
  background: var(--accent);
}
/* grows from its own center — transform only, no reflow */
.rplay-seek:hover::-webkit-slider-thumb,
.rplay-volrange:hover::-webkit-slider-thumb {
  transform: scaleY(1.36);
}
.rplay-seek:focus-visible,
.rplay-volrange:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-1);
}

/* ---- volume cluster ---- */

.rplay-mute {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  transition: color 0.15s ease;
}
.rplay-mute:hover { color: var(--accent); }
.rplay-mute svg { width: 15px; height: 15px; display: block; }
.rplay-muted .rplay-wave { opacity: 0.25; }
.rplay-volrange { flex: none; width: 52px; }

.rplay-close {
  flex: none;
  width: 16px;
  height: 16px;
  line-height: 1;
  font-size: 15px;
  color: var(--text-tertiary);
  transition: color 0.15s ease;
}
.rplay-close:hover { color: var(--text-primary); }

/* narrow: the title is the first thing to go, then the volume slider */
@media (max-width: 620px) {
  .rplay { gap: var(--space-2); margin-left: var(--space-4); margin-right: var(--space-4); }
  .rplay-title { display: none; }
}
@media (max-width: 420px) {
  .rplay-volrange { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .rplay { transition: opacity 0.15s ease, visibility 0s; transform: none; }
  .rplay-open { transform: none; }
}

/* ==========================================================================
   LISTENING — Last.fm card, between the testimonials and the footer
   Editorial + technical, matching the rest: hairline rules, no drop shadows,
   mono for data, Satoshi for names. The one flourish is the record sliding
   out of the sleeve — it only turns while something is actually playing, so
   the motion means "live" rather than "decorative".
   ========================================================================== */

/* Centred in the gap between the carousel arrows and the footer. The padding
   is asymmetric on purpose: the testimonials section already contributes ~60px
   below its arrows and the footer ~152px above its content, so symmetric
   padding here lands the card 92px too high. Measured, not guessed. */
/* The band sits inside .footer-particle-section, above the canvas. The footer
   supplies the spacing (see .has-lfm) so the card is centred against the nav
   pill you actually see rather than the footer's invisible box top. */
.lfm-band {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 0 var(--space-4);
}

.lfm {
  width: 100%;
  max-width: 620px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-3);
  background: var(--surface);
  padding: var(--space-5);
  display: grid;
  gap: var(--space-5);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .6s ease, transform .6s ease;
}
.lfm.is-in { opacity: 1; transform: none; }

/* ---- now playing ---- */

.lfm-now {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

/* sleeve + record: the disc sits behind the cover and slides out to the right.
   The sleeve reserves the full travel width so the record can never overlap
   the track title. */
.lfm-sleeve {
  position: relative;
  width: 118px;
  height: 72px;
  flex: none;
}
.lfm-art,
.lfm-sleeve .lfm-art-empty {
  position: absolute;
  left: 0; top: 0;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-1);
  object-fit: cover;
  z-index: 1;
}
.lfm-sleeve .lfm-art-empty { background: var(--accent-subtle); display: block; }

.lfm-disc {
  position: absolute;
  top: 4px;
  left: 26px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%,
      rgba(255,255,255,.055) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 50% 50%,
      var(--accent) 0 13%,
      oklch(0.17 0.008 75) 13% 17%,
      oklch(0.27 0.012 75) 17% 100%);
  transition: left .55s cubic-bezier(.2,.7,.3,1);
}
.lfm-now.is-live .lfm-disc {
  left: 50px;
  animation: lfm-spin 3.4s linear infinite;
}
@keyframes lfm-spin { to { transform: rotate(360deg); } }

.lfm-now-meta { min-width: 0; display: grid; gap: 3px; }

.lfm-track {
  font-size: var(--font-size-5);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lfm-artist {
  font-size: var(--font-size-2);
  color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---- shared label ---- */

.lfm-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--font-size-1);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.lfm-now.is-live .lfm-label { color: var(--accent); }

.lfm-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 9px; }
.lfm-eq i { width: 2px; height: 3px; background: currentColor; }
.lfm-now.is-live .lfm-eq i { animation: lfm-eq .9s ease-in-out infinite; }
.lfm-now.is-live .lfm-eq i:nth-child(2) { animation-delay: .15s; }
.lfm-now.is-live .lfm-eq i:nth-child(3) { animation-delay: .3s; }
@keyframes lfm-eq { 0%,100% { height: 3px } 50% { height: 9px } }

/* ---- sections ---- */

.lfm-sec { display: grid; gap: var(--space-3); }
.lfm-sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-color);
}
.lfm-aside {
  font-family: var(--font-mono);
  font-size: var(--font-size-1);
  color: var(--text-tertiary);
  white-space: nowrap;
}

/* ---- week shape ---- */

.lfm-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-2);
}
/* the bar needs a parent with a definite height — a percentage inside an
   auto-sized grid track resolves to zero, which is why these vanished */
.lfm-week-col { display: grid; gap: 6px; justify-items: center; }
.lfm-week-track {
  position: relative;
  width: 100%;
  max-width: 28px;
  height: 40px;
}
.lfm-week-track i {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: var(--accent);
  opacity: .32;
  border-radius: 2px;
}
.lfm-week-track i.is-zero { opacity: .1; }
.lfm-week-col:last-child .lfm-week-track i { opacity: .85; }
.lfm-week-col span {
  font-family: var(--font-mono);
  font-size: var(--font-size-1);
  color: var(--text-tertiary);
}

/* ---- top artists ---- */

.lfm-artists { list-style: none; display: grid; gap: var(--space-2); }
.lfm-artist-row {
  display: grid;
  grid-template-columns: minmax(0, 11rem) 1fr auto;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: inherit;
  padding: 2px 0;
}
.lfm-artist-name {
  font-size: var(--font-size-2);
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lfm-bar { height: 6px; border-radius: 3px; background: var(--accent-subtle); overflow: hidden; }
.lfm-bar i { display: block; height: 100%; background: var(--accent); opacity: .55; border-radius: 3px; }
.lfm-artist-row:hover .lfm-bar i { opacity: .9; }
.lfm-plays {
  font-family: var(--font-mono);
  font-size: var(--font-size-1);
  color: var(--text-tertiary);
  min-width: 2.2ch;
  text-align: right;
}

/* ---- albums ---- */

.lfm-albums { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.lfm-album img,
.lfm-album .lfm-art-empty {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-1);
  display: block;
  background: var(--accent-subtle);
  filter: saturate(.9);
  transition: filter .25s ease, transform .25s ease;
}
.lfm-album:hover img { filter: none; transform: translateY(-2px); }

/* Stands in for a cover that is missing or withheld. Reads as a deliberate
   sleeve rather than a failed image. */
.lfm-album { text-decoration: none; }
.lfm-album .lfm-art-empty {
  display: flex;
  align-items: flex-end;
  padding: var(--space-3);
  aspect-ratio: 1;
  border-radius: var(--radius-1);
  transition: color .25s ease, border-color .25s ease;
  font-family: var(--font-mono);
  font-size: var(--font-size-1);
  line-height: 1.3;
  color: var(--text-tertiary);
  background: var(--accent-subtle);
  border: 1px solid var(--border-color);
  overflow: hidden;
}
.lfm-album:hover .lfm-art-empty {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---- follow ---- */

.lfm-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  border-top: 1px solid var(--border-color);
  padding-top: var(--space-4);
}
.lfm-since {
  font-family: var(--font-mono);
  font-size: var(--font-size-1);
  color: var(--text-tertiary);
  letter-spacing: .04em;
}
.lfm-follow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: var(--font-size-2);
  color: var(--text-secondary);
  text-decoration: none;
  background: transparent;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.lfm-follow:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-subtle);
}
.lfm-follow .arrow-icon { width: 13px; height: 13px; }

/* ---- narrow ---- */

@media (max-width: 560px) {
  .lfm { padding: var(--space-4); }
  .lfm-now { gap: var(--space-4); }
  .lfm-artist-row { grid-template-columns: minmax(0, 8rem) 1fr auto; }
  .lfm-track { font-size: var(--font-size-4); }
}

@media (prefers-reduced-motion: reduce) {
  .lfm { transition: none; }
  .lfm-now .lfm-disc { transition: none; }
  .lfm-now.is-live .lfm-disc { animation: none; }
  .lfm-now.is-live .lfm-eq i { animation: none; height: 6px; }
  .lfm-album:hover img { transform: none; }
}
