/* ── index.css ──────────────────────────────────────────────────────────────
   The index itself. A short body of work is not a grid of cards — it is a set
   of channels you tune between, so the page is one tube and each project is a
   station on it. Only the tuned record reaches the reserved white. */

.tube {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Head ───────────────────────────────────────────────────────────────── */

.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 44px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--c-line);
}

.mark {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.wordmark {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--c-text);
}

/* Every control and caption on the page reads as the same kind of thing. */
.label {
  font-size: 10px;
  line-height: 14px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--c-dim);
}

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

button.label,
a.label {
  background: none;
  border: 0;
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: color 120ms linear;
}

button.label:hover,
a.label:hover {
  color: var(--c-text);
}

.rule {
  width: 1px;
  height: 10px;
  background: var(--c-line);
}

/* ── Records ────────────────────────────────────────────────────────────── */

/* ── Operator ───────────────────────────────────────────────────────────────
   Who is transmitting. It sits above the channels and stays quiet: the tuning
   is the only thing on this page allowed to be loud. */

/* Two columns, two children: the plate and everything it identifies. */
.operator {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: start;
  column-gap: 20px;
  padding: 22px 12px 20px;
  border-bottom: 1px solid var(--c-line);
}

/* The portrait is composited into the medium rather than pasted on top of it:
   on the tube the black plate is screened away, so the figure reads as light
   the tube is emitting; on paper it is inverted and multiplied, so it reads as
   ink laid into the stock. Same two rules the rest of the instrument follows. */
.portrait {
  position: relative;
  width: 96px;
  height: 96px;
  padding: 5px;
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: screen;
  /* Held just under the interface white, which belongs to the tuned record. */
  filter: grayscale(1) contrast(1.08) brightness(0.9);
}

:root[data-theme='light'] .portrait img {
  mix-blend-mode: multiply;
  filter: grayscale(1) invert(1) contrast(1.05);
}

/* The eyebrow row is the record `.foot` pattern reused, so the operator reads
   as one more entry in the same catalogue rather than a different kind of
   thing — but it leads here, so it carries no top margin. */
.operator .foot {
  margin-top: 0;
}

.operator p {
  max-width: 58ch;
  margin-top: 10px;
  color: var(--c-dim);
}

.operator .creed {
  margin-top: 6px;
}

.who {
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--c-text);
}

.creed {
  color: var(--c-land);
}

.records {
  flex: 1;
  padding: 20px 0 40px;
  list-style: none;
}

.record {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 0 16px;
  padding: 16px 12px;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
}

.record + .record {
  margin-top: 2px;
}

/* The channel number is a keyboard address, not an ornament: press it to
   tune. It only lights up on the station you are actually on. */
.channel {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--c-land);
  padding-top: 2px;
}

.name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--c-text);
  transition:
    color 140ms linear,
    text-shadow 140ms linear;
}

.etym {
  color: var(--c-dim);
  margin-left: 12px;
  letter-spacing: 0.02em;
}

.desc {
  max-width: 52ch;
  margin-top: 6px;
  color: var(--c-dim);
  transition: color 140ms linear;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-top: 10px;
}

.addr {
  font-size: 11px;
  color: var(--c-land);
  transition: color 140ms linear;
}

.state {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: start;
  padding-top: 3px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-land);
  flex-shrink: 0;
}

/* ── Tuned ──────────────────────────────────────────────────────────────────
   Hover and keyboard land in the same state, because they mean the same
   thing. This is the only place white is spent. */
.record.tuned {
  border-color: var(--c-line);
  background: var(--c-panel);
}

.record.tuned .channel {
  color: var(--c-text);
}

.record.tuned .name {
  color: var(--c-strike);
  text-shadow: 0 0 10px var(--bloom-hot);
}

.record.tuned .desc {
  color: var(--c-text);
}

.record.tuned .addr {
  color: var(--c-text);
}

.record.tuned .tick {
  opacity: 1;
}

.record .tick {
  opacity: 0;
  transition: opacity 140ms linear;
}

/* A station that is on air keeps a slow idle beat, so a quiet page reads as
   running rather than as dead. */
.record[data-status='live'] .dot {
  background: var(--c-text);
}

.record.tuned[data-status='live'] .dot {
  background: var(--c-strike);
  box-shadow: 0 0 8px var(--bloom-hot);
}

.record[data-status='building'] .dot {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--c-land);
}

/* Not on air and not meant to be: it runs on your own machine. The round
   indicator belongs to things being received, so this one is square. */
.record[data-status='local'] .dot {
  border-radius: 0;
  background: var(--c-land);
}

.record.tuned[data-status='local'] .dot {
  background: var(--c-text);
}

/* ── Vacant ─────────────────────────────────────────────────────────────────
   An unassigned channel is not filler: it is what the set does with a station
   that has not been built yet, and it says where the next one goes. */
.record.vacant {
  cursor: default;
}

.record.vacant .name {
  color: var(--c-line);
  letter-spacing: 0.14em;
  font-weight: 400;
  font-size: 11px;
  text-transform: uppercase;
}

.record.vacant .channel {
  color: var(--c-line);
}

/* ── Foot ───────────────────────────────────────────────────────────────── */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  height: 40px;
  border-top: 1px solid var(--c-line);
}

.keys {
  display: flex;
  gap: 12px;
}

.keys kbd {
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--c-land);
}

@media (max-width: 620px) {
  /* The plate stays beside the text at every width; it only gets smaller. */
  .operator {
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 14px;
    padding: 18px 10px 16px;
  }

  .portrait {
    width: 72px;
    height: 72px;
  }

  .record {
    grid-template-columns: 24px 1fr;
    gap: 0 12px;
    padding: 14px 10px;
  }

  .state {
    grid-column: 2;
    padding-top: 10px;
  }

  .etym {
    display: block;
    margin-left: 0;
  }

  .keys {
    display: none;
  }
}
