/* Lemar Kotiff. Centred link stack, 500px max. */

:root {
  --bg:     #000000;
  --card:   #060606;
  --fg:     #ffffff;
  --mid:    #d4d4d4;
  --dim:    #6e6e6e;
  --line:   #1c1c1c;
  --accent: #ff1a00;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--fg);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.4;
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ── page ─────────────────────────────────────────────── */

.page {
  width: min(500px, 100% - 2.5rem);
  padding: clamp(2.5rem, 8vh, 4.5rem) 0 clamp(2.5rem, 8vh, 4rem);
  display: grid;
  justify-items: center;
}

.avatar { display: block; line-height: 0; }

.avatar img {
  display: block;
  width: clamp(108px, 30vw, 128px);
  height: auto;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.3);   /* the picture is black on black: the ring outlines it */
  border-radius: 1000px;
  object-fit: cover;
}

.name {
  margin: clamp(1.35rem, 3.5vh, 1.85rem) 0 clamp(2.25rem, 6vh, 3.5rem);
  font-family: "Instrument Serif", "Times New Roman", Times, serif;
  font-size: clamp(1.75rem, 5.5vw, 2.125rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.002em;
}

/* ── preview ──────────────────────────────────────────── */

.player {
  --p: 0%;
  width: 100%;
  margin-bottom: 0.5rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 1.15rem;
  row-gap: 0.75rem;
  align-items: center;
  padding: 1.15rem 1.6rem 1.25rem 1.15rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.player__btn {
  grid-row: span 2;
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 1000px;
  background: var(--fg);
  color: var(--bg);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.player__btn:active { transform: scale(0.94); }
.player__btn:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

.player__pause,
.is-playing .player__play { display: none; }
.is-playing .player__pause { display: block; }

.player__meta {
  margin: 0;
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.25;
}

.player__name { min-width: 0; text-wrap: balance; }
.player__title { color: var(--fg); font-weight: 500; letter-spacing: 0.005em; }
.player__tag { margin-left: 0.25rem; color: var(--dim); }

.player__time {
  flex: none;
  color: var(--dim);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.player__wave {
  position: relative;
  height: 2.5rem;
  cursor: pointer;
  touch-action: pan-y;
  border-radius: 4px;
}

.player__wave:focus-visible { outline: 2px solid var(--fg); outline-offset: 6px; }

.player__onda {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  fill: var(--dim);
}

.player__onda--sonada {
  fill: var(--fg);
  clip-path: inset(0 calc(100% - var(--p)) 0 0);
}

.player__cabezal {
  position: absolute;
  top: -0.3rem;
  bottom: -0.3rem;
  left: var(--p);
  width: 2px;
  margin-left: -1px;
  border-radius: 1px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.is-started .player__cabezal { opacity: 1; }

/* ── link stack ───────────────────────────────────────── */

.links {
  width: 100%;
  display: grid;
  gap: 0.5rem;
}

.row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.15rem;
  min-height: 5.5rem;
  padding: 1rem 1.6rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--mid);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.row:hover,
.row:focus-visible {
  border-color: var(--fg);
  color: var(--fg);
  outline: none;
}

.row__ico { display: grid; place-items: center; line-height: 0; }

.row__label {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.005em;
}

.row__go { display: grid; place-items: center; line-height: 0; color: var(--fg); }

/* ── narrow ───────────────────────────────────────────── */

@media (max-width: 26rem) {
  .row { min-height: 4.75rem; padding: 0.9rem 1.25rem; gap: 0.9rem; }
  .player { padding: 0.95rem 1.25rem 1.05rem 0.95rem; column-gap: 0.9rem; row-gap: 0.6rem; }
  .player__btn { grid-row: 1 / span 3; width: 2.9rem; height: 2.9rem; }

  /* En móvil el título ocupa la fila entera y el tiempo baja bajo la onda: transcurrido a la izquierda, total a la derecha. */
  .player__meta { display: contents; }
  .player__name { grid-column: 2; grid-row: 1; }
  .player__wave { grid-column: 2; grid-row: 2; }
  .player__time { grid-column: 2; grid-row: 3; display: flex; justify-content: space-between; font-size: 0.75rem; }
  .player__sep { display: none; }
}
