/* ─── The home page ───
   One column: the name, one line, the work as a list, the way out to the
   shelf, and the same dark footer as the shelf. Doing less, better: no washes, no collage, no grain on this sheet
   (body.is-quiet), and the native cursor. The one mark kept is the orange
   pass out of register behind the name. */

body.is-quiet::before,
body.is-quiet::after {
  content: none;
}

.index {
  width: 100%;
  max-width: 52rem;
  margin-inline: auto;
  padding: clamp(9rem, 26vh, 15rem) var(--gutter) var(--space-5xl);
  display: flex;
  flex-direction: column;
}

/* ─── Hero ─── */
.hero {
  margin-bottom: clamp(4rem, 12vh, 7rem);
}

/* Ensure hero content is visible even if GSAP fails */
.hero__name,
.hero__tagline {
  opacity: 1;
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  position: relative;
  isolation: isolate;
}

/* Misregistered ghost behind the name — a bad silkscreen pass */
.hero__name::before {
  content: attr(data-text);
  position: absolute;
  top: 3px;
  left: 4px;
  color: var(--orange);
  opacity: 0.1;
  pointer-events: none;
  z-index: -1;
}

.hero__name .accent {
  color: var(--orange);
}

.hero__tagline {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.5;
  color: var(--ink);
  max-width: 34rem;
  opacity: 0.72;
}

/* ─── The work ─── */
.work-index {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(26, 26, 26, 0.12);
}

.work-index li {
  max-width: none;
  border-bottom: 1px solid rgba(26, 26, 26, 0.12);
}

.work-index__row {
  display: grid;
  grid-template-columns: 2.25rem 11rem 1fr auto;
  column-gap: var(--space-lg);
  align-items: baseline;
  padding: 1.15rem 0;
  color: var(--ink);
  position: relative;
}

.work-index__no,
.work-index__year {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}

.work-index__title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color var(--duration-fast) var(--ease-out);
}

.work-index__line {
  font-size: var(--text-sm);
  line-height: 1.5;
  opacity: 0.62;
  transition: opacity var(--duration-fast) var(--ease-out);
}

/* The title takes the interaction red and steps in on a spring — the line
   beside it comes up to full ink. Nothing else in the row moves. */
.work-index__title,
.work-index__line {
  transform: translateX(0);
  transition-property: color, opacity, transform;
  transition-duration: var(--duration-fast), var(--duration-fast), var(--duration-normal);
  transition-timing-function: var(--ease-out), var(--ease-out), var(--ease-spring);
}

.work-index__row:hover .work-index__title,
.work-index__row:focus-visible .work-index__title {
  color: var(--red);
  transform: translateX(4px);
}

.work-index__row:hover .work-index__line,
.work-index__row:focus-visible .work-index__line {
  opacity: 0.9;
  transform: translateX(4px);
}

.work-index__row:focus-visible {
  outline: 1px solid var(--orange);
  outline-offset: 4px;
}

/* ─── The way out to the shelf — the page's one italic ─── */
.index__shelf {
  align-self: flex-start;
  margin-top: var(--space-xl);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--ink);
  opacity: 0.8;
  transition: color var(--duration-fast) var(--ease-out), opacity var(--duration-fast) var(--ease-out);
}

.index__shelf span {
  display: inline-block;
  font-style: normal;
  transition: transform var(--duration-normal) var(--ease-spring);
}

.index__shelf:hover {
  color: var(--red);
  opacity: 1;
}

.index__shelf:hover span {
  transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
  .work-index__title,
  .work-index__line,
  .index__shelf span {
    transition-property: color, opacity;
  }

  .work-index__row:hover .work-index__title,
  .work-index__row:hover .work-index__line,
  .index__shelf:hover span {
    transform: none;
  }
}

/* ─── Phones: the line drops under the title ─── */
@media (max-width: 640px) {
  .work-index__row {
    grid-template-columns: 2rem 1fr auto;
    row-gap: 0.3rem;
  }

  .work-index__line {
    grid-column: 2 / -1;
    grid-row: 2;
  }

}
