/* Home v6 — editorial rows sized for real content (a few strong pieces, not a 12-card grid).
   Replaces the oversized "Selected work / Projects / DJ Sets" headings with a slim index bar,
   removes the dead space around them, and fills the width with big image + story rows. */

/* ---- Page frame: tighter, so content starts at the top of the screen ---- */
.mode-panel,
.archive-list.home-section {
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: clamp(20px, 2.6vw, 40px) clamp(20px, 3.6vw, 56px) clamp(56px, 6vw, 96px);
}

.home-section {
  padding-block: 0;
  border: 0;
}

/* ---- Index bar: a quiet label + count in place of a giant headline ---- */
.index-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin: 0;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.index-label {
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 800;
}

.index-more {
  display: flex;
  justify-content: flex-end;
  margin: 24px 0 0;
  font-size: 12px;
  font-weight: 800;
}

/* ================= PROJECTS ================= */
.work-list {
  display: grid;
}

.work-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
  gap: clamp(24px, 3.6vw, 56px);
  align-items: stretch;
  padding: clamp(22px, 2.6vw, 36px) 0;
  border-bottom: 1px solid var(--line);
}

.work-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--portfolio-light);
  border: 1px solid var(--line);
  text-decoration: none;
}

.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter 260ms ease, transform 520ms var(--ease-site);
}

.work-row:hover .work-media img,
.work-row:focus-within .work-media img {
  filter: grayscale(.1);
  transform: scale(1.015);
}

.work-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--portfolio-mid);
  font-size: clamp(56px, 9vw, 140px);
}

.work-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  min-width: 0;
}

.work-copy {
  flex: 1;
}

.work-title {
  margin: 0;
  font-size: clamp(28px, 3.1vw, 46px);
  line-height: 1.02;
  letter-spacing: -.05em;
  font-weight: 650;
  text-wrap: balance;
}

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

/* The whole row is one click target; real links inside stay above it. */
.work-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.work-excerpt {
  max-width: 54ch;
  margin: 18px 0 0;
  color: var(--portfolio-dim);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-foot {
  display: grid;
  gap: 18px;
}

.work-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-skills li {
  padding: 4px 8px;
  border: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.3;
}

.work-skills-more {
  color: var(--portfolio-dim);
}

.work-link {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 8px 0;
  border-bottom: 1px solid currentColor;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.work-link [aria-hidden="true"] {
  transition: transform 180ms var(--ease-site);
}

.work-row:hover .work-link [aria-hidden="true"],
.work-link:focus-visible [aria-hidden="true"] {
  transform: translateX(5px);
}

.work-title a:focus-visible,
.work-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* ================= INDEPENDENT PROJECTS ================= */
.home-independent {
  margin-top: clamp(44px, 5.5vw, 84px);
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(20px, 2.4vw, 32px);
  padding-top: clamp(22px, 2.6vw, 36px);
}

.project-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--portfolio-paper, transparent);
  transition: border-color 160ms ease, transform 260ms var(--ease-site);
}

.project-tile:hover,
.project-tile:focus-within {
  border-color: currentColor;
  transform: translateY(-2px);
}

.tile-media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--portfolio-light);
  text-decoration: none;
}

.tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter 260ms ease, transform 520ms var(--ease-site);
}

.project-tile:hover .tile-media img,
.project-tile:focus-within .tile-media img {
  filter: grayscale(.1);
  transform: scale(1.02);
}

.tile-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--portfolio-mid);
  font-size: clamp(40px, 5vw, 72px);
}

.tile-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}

.tile-title {
  margin: 0;
  font-size: clamp(20px, 1.9vw, 26px);
  line-height: 1.08;
  letter-spacing: -.04em;
  font-weight: 650;
}

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

/* Whole tile is one click target; the real links inside stay above it. */
.tile-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.tile-excerpt {
  margin: 0;
  color: var(--portfolio-dim);
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tile-body .work-skills {
  margin-top: auto;
}

.tile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin: 0;
}

.tile-visit {
  position: relative;
  z-index: 2;
  color: var(--portfolio-dim);
  font-size: 12px;
  font-weight: 800;
}

/* ---- Category pages ---- */
.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 18px 0 4px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease;
}

.category-chip:hover,
.category-chip:focus-visible {
  border-color: currentColor;
}

.category-chip.is-active {
  background: var(--portfolio-black, #000);
  border-color: var(--portfolio-black, #000);
  color: var(--portfolio-paper, #fff);
}

.archive-intro {
  max-width: 62ch;
  margin: 18px 0 0;
  color: var(--portfolio-dim);
  font-size: 14px;
  line-height: 1.7;
}

.archive-intro p {
  margin: 0;
}

/* ================= DJ SETS ================= */
.set-list {
  display: grid;
}

.set-row {
  position: relative;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 28px);
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--music-line, rgba(17, 17, 17, .18));
}

.set-cover {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--music-coral);
  border: 1px solid var(--music-line, rgba(17, 17, 17, .18));
  text-decoration: none;
}

.set-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms var(--ease-site);
}

.set-row:hover .set-cover img {
  transform: scale(1.03);
}

.set-cover-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #111;
  font-size: clamp(22px, 3vw, 40px);
  font-weight: 800;
  letter-spacing: -.06em;
}

.set-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 24px;
  align-items: center;
  min-width: 0;
}

.set-info > * {
  grid-column: 1;
}

.set-info > .set-actions {
  grid-column: 2;
  grid-row: 1 / span 4;
  justify-self: end;
}

.set-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin: 0 0 8px;
  color: var(--music-soft, #444);
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 800;
}

.set-badge {
  padding: 3px 7px;
  background: var(--music-cyan);
  color: #111;
}

.set-title {
  margin: 0;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.05;
  letter-spacing: -.045em;
  font-weight: 650;
}

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

.set-title a:hover,
.set-title a:focus-visible {
  text-decoration: underline;
  text-underline-offset: .14em;
}

.set-excerpt {
  max-width: 60ch;
  margin: 8px 0 0;
  color: var(--music-soft, #444);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.set-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin: 0;
  font-size: 12px;
  font-weight: 800;
}

.set-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid #111;
  background: var(--music-yellow);
  color: #111;
  text-decoration: none;
  transition: background-color 160ms ease;
}

.set-button:hover,
.set-button:focus-visible {
  background: var(--music-coral);
}

.set-link {
  color: var(--music-soft, #444);
}

.set-tracks,
.set-tracks-more {
  display: none;
}

/* Older sets: quiet text links, so the newest set owns the strong call to action. */
.set-row:not(.set-row-featured) .set-button {
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
}

.set-row:not(.set-row-featured) .set-button:hover,
.set-row:not(.set-row-featured) .set-button:focus-visible {
  background: var(--music-yellow);
}

/* ---- Featured (newest) set ---- */
.set-row-featured {
  grid-template-columns: minmax(220px, 440px) minmax(0, 1fr);
  gap: clamp(24px, 4.5vw, 72px);
  align-items: start;
  padding: clamp(22px, 2.6vw, 36px) 0;
}

.set-row-featured .set-info {
  display: block;
  align-self: stretch;
}

.set-row-featured .set-meta {
  margin-bottom: 18px;
  font-size: 11px;
}

.set-row-featured .set-title {
  font-size: clamp(30px, 3.8vw, 56px);
  line-height: 1;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.set-row-featured .set-excerpt {
  margin-top: 16px;
  font-size: 15px;
  -webkit-line-clamp: 3;
}

.set-row-featured .set-tracks {
  display: block;
  max-width: 560px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: track;
  border-top: 1px solid var(--music-line, rgba(17, 17, 17, .18));
}

.set-row-featured .set-tracks li {
  counter-increment: track;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--music-line, rgba(17, 17, 17, .18));
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.set-row-featured .set-tracks li::before {
  content: counter(track, decimal-leading-zero);
  color: var(--music-coral);
  font-weight: 800;
}

.set-row-featured .set-tracks-more {
  display: block;
  margin: 10px 0 0;
  color: var(--music-soft, #444);
  font-size: 11px;
}

.set-row-featured .set-actions {
  justify-self: start;
  margin-top: 28px;
}

.set-player {
  max-width: 560px;
  margin: 22px 0 0;
  border: 1px solid var(--music-line, rgba(17, 17, 17, .18));
}

.set-player iframe {
  display: block;
  width: 100% !important;
  max-width: 100%;
  min-height: 166px;
  border: 0;
}

.set-row-featured .set-button {
  padding: 13px 20px;
  font-size: 13px;
}

.set-row-featured .set-cover-placeholder {
  font-size: clamp(60px, 9vw, 150px);
}

/* ---- Archives share the same rows ---- */
.archive-list.home-section .music-pagination,
.archive-list.home-section .pagination {
  margin-top: 28px;
}

.empty-state {
  padding: 28px 0;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .mode-panel,
  .archive-list.home-section {
    padding-top: 18px;
  }

  .work-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .work-info {
    gap: 18px;
  }

  .work-copy {
    flex: none;
  }

  .set-row-featured {
    grid-template-columns: 1fr;
  }

  .set-row-featured .set-cover {
    width: min(100%, 360px);
  }
}

@media (max-width: 600px) {
  .set-row {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .set-info {
    grid-template-columns: 1fr;
  }

  .set-info > .set-actions {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-top: 12px;
  }

  .set-excerpt {
    display: none;
  }

  .set-row-featured {
    grid-template-columns: 1fr;
  }

  .set-row-featured .set-excerpt {
    display: -webkit-box;
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-media img,
  .set-cover img,
  .work-link [aria-hidden="true"] {
    transition: none;
  }
}

/* Tracklist: the number inside the cover comes from CSS (no duplicate text for crawlers), and an
   empty Discogs line still holds its height so nothing shifts when it fills in. */
.single-set-entry .track-cover > span::before {
  content: attr(data-n);
}

.track-meta:empty::before {
  content: "\00a0";
}

/* ================= PAGES AND POSTS (About, Contact, blog posts, 404) ================= */
.page-entry .entry-header {
  padding: clamp(28px, 3.5vw, 56px) 0 clamp(22px, 3vw, 40px);
  gap: 14px;
}

.page-entry .entry-header h1 {
  max-width: 22ch;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.entry-date {
  margin: 0;
  color: var(--portfolio-dim);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 800;
}

.page-image {
  margin: 0 0 clamp(28px, 4vw, 56px);
  max-width: 76ch;
  border: 1px solid var(--line);
}

.page-image img {
  width: 100%;
  height: auto;
}

.entry-back {
  margin: clamp(36px, 5vw, 64px) 0 0;
}

/* Body text from the editor */
.prose {
  padding-bottom: clamp(32px, 5vw, 72px);
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.1;
  letter-spacing: -.04em;
}

.prose h3 {
  font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.2;
  letter-spacing: -.03em;
}

.prose h4 {
  font-family: var(--font-mono, monospace);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.prose a {
  text-underline-offset: .18em;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: .45em;
}

.prose blockquote {
  margin-inline: 0;
  padding: .2em 0 .2em 1.1em;
  border-left: 2px solid currentColor;
  font-style: italic;
}

.prose figure {
  margin-inline: 0;
}

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

.prose figcaption {
  margin-top: .6em;
  color: var(--portfolio-dim);
  font-size: 13px;
  line-height: 1.5;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
}

.prose pre,
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
}

.prose pre {
  overflow-x: auto;
  padding: 1em;
  border: 1px solid var(--line);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95em;
}

.prose th,
.prose td {
  padding: .6em .7em;
  border: 1px solid var(--line);
  text-align: left;
}

.archive-row {
  display: grid;
  gap: 8px;
}

.archive-row p {
  margin: 0;
  max-width: 70ch;
  color: var(--portfolio-dim);
  font-size: 14px;
  line-height: 1.65;
}

.archive-row p:last-child {
  margin-top: 6px;
  color: inherit;
}
