/* Portafolio de Jhon Ramos · estilo "papel de partitura" */

:root {
  --bg: #f3efe6;
  --bg-alt: #ebe6da;
  --card: #fbf8f1;
  --ink: #181613;
  --muted: #6b655b;
  --line: #d9d2c3;
  --acento: #a8321f;
  --acento-tinta: #ffffff;
  --onda: #b9b1a1;
  --sombra: 0 1px 2px rgba(24, 22, 19, .06), 0 12px 32px -12px rgba(24, 22, 19, .18);
  --serif: "Newsreader", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    --bg: #12110f; --bg-alt: #181613; --card: #1c1a17; --ink: #ece7dc; --muted: #9b9484;
    --line: #2d2a25; --acento: #e2654d; --acento-tinta: #1a0d09; --onda: #4a453c;
    --sombra: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-tema="oscuro"] {
  --bg: #12110f; --bg-alt: #181613; --card: #1c1a17; --ink: #ece7dc; --muted: #9b9484;
  --line: #2d2a25; --acento: #e2654d; --acento-tinta: #1a0d09; --onda: #4a453c;
  --sombra: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.contenedor { width: min(1120px, 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; z-index: 50; }
.saltar:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 3px; border-radius: 4px; }

/* Cabecera */
.cabecera { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.cabecera-in { width: min(1120px, 100% - 40px); margin-inline: auto; display: flex; align-items: center; gap: 20px; height: 60px; }
.marca { font: 500 20px/1 var(--serif); text-decoration: none; margin-right: auto; }
.nav { display: flex; gap: 22px; font-size: 14.5px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { text-decoration: none; color: var(--muted); white-space: nowrap; padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--ink); border-color: var(--acento); }
.tema { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 50%; cursor: pointer; }
.tema:hover { border-color: var(--acento); }
.tema .i-sol { display: none; }
:root[data-tema="oscuro"] .tema .i-sol { display: block; }
:root[data-tema="oscuro"] .tema .i-luna { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) .tema .i-sol { display: block; }
  :root:not([data-tema="claro"]) .tema .i-luna { display: none; }
}

/* Botones y textos */
.etiqueta { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--acento); font-weight: 600; margin-bottom: 14px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border: 1px solid var(--ink); border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 15px; transition: background .15s, color .15s; }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn-primario { background: var(--acento); border-color: var(--acento); color: var(--acento-tinta); }
.btn-primario:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.enlace { color: var(--acento); text-decoration: none; font-weight: 500; font-size: 15px; }
.enlace:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Notas que caen (portada) */
.hero-vis { margin: 0; }
.panel-notas { background: #15130f; border-radius: 20px; overflow: hidden; box-shadow: var(--sombra); border: 1px solid var(--line); aspect-ratio: 4 / 3.3; }
.panel-notas canvas { width: 100%; height: 100%; display: block; }
.hero-vis figcaption { font-size: 14px; color: var(--muted); margin-top: 12px; }
.hero-vis figcaption em { font-family: var(--serif); }

/* Pestañas partitura/video */
.pestanas { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 999px; margin-bottom: 14px; }
.pestanas button { border: 0; background: none; font: 500 14px var(--sans); color: var(--muted); padding: 7px 18px; border-radius: 999px; cursor: pointer; }
.pestanas button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.vista-video video { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #000; box-shadow: var(--sombra); display: block; }
.vista-video[hidden], .vista-partitura[hidden] { display: none; }
.portada-mini { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; max-width: 220px; border-radius: 8px; box-shadow: var(--sombra); margin-bottom: 22px; }

/* Inicio */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 88px); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(46px, 8vw, 104px); letter-spacing: -.03em; }
.alias { display: block; font-style: italic; font-weight: 400; color: var(--acento); font-size: .42em; letter-spacing: 0; margin-top: .25em; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 34em; margin: 28px 0 34px; }
.acciones { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-nota { margin: 0; color: var(--ink); }
.hero-nota svg { width: 100%; height: auto; }
.pie-nota { font: italic 13px var(--serif); fill: var(--muted); }

/* Secciones */
.seccion { padding: clamp(64px, 9vw, 112px) 0; }
.seccion.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.sec-cab { margin-bottom: 40px; }
.sec-cab h2 { font-size: clamp(36px, 5.5vw, 64px); }
.prov { font: italic 400 .3em var(--serif); color: var(--muted); letter-spacing: 0; vertical-align: middle; margin-left: .6em; }
.sub { font: italic 400 clamp(18px, 2vw, 22px) var(--serif); color: var(--muted); margin: 12px 0 0; }
.dos-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; margin-top: 56px; align-items: start; }

/* Reproductor */
.reproductor { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--sombra); }
.lista-pistas { list-style: none; margin: 0 0 18px; padding: 0; }
.lista-pistas button { display: grid; grid-template-columns: 38px 1fr auto; align-items: baseline; gap: 8px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 11px 6px; font: inherit; color: var(--ink); cursor: pointer; }
.lista-pistas li:last-child button { border-bottom: 0; }
.lista-pistas .num { font: italic 500 17px var(--serif); color: var(--muted); }
.lista-pistas .tit { font: 500 19px var(--serif); }
.lista-pistas .dur { font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lista-pistas button:hover .tit { color: var(--acento); }
.lista-pistas button[aria-current="true"] .num, .lista-pistas button[aria-current="true"] .tit { color: var(--acento); }
.onda { position: relative; height: 84px; cursor: pointer; touch-action: none; border-radius: 8px; }
.onda canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.controles { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.btn-play { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--acento); color: var(--acento-tinta); cursor: pointer; }
.btn-play:hover { filter: brightness(1.08); }
.btn-play .i-pausa, .reproductor.sonando .btn-play .i-play { display: none; }
.reproductor.sonando .btn-play .i-pausa { display: block; }
.ahora { flex: 1; min-width: 0; font: 500 18px var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ahora-num { font-style: italic; color: var(--muted); margin-right: 4px; }
.tiempo { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tiempo b { color: var(--ink); font-weight: 500; }
.reproductor-solo { margin-bottom: 40px; }
.reproductor-solo .onda { height: 110px; }

.mirada-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.partitura { margin: 0; }
.papel { background: #fff; border-radius: 6px; box-shadow: var(--sombra); overflow: hidden; border: 1px solid var(--line); }
.papel img { width: 100%; height: auto; transition: opacity .25s; }
.partitura figcaption, .destacado-partitura figcaption { font-size: 14px; color: var(--muted); margin-top: 12px; }
.partitura figcaption a { color: var(--acento); }

.nota { margin: 0; padding-left: 24px; border-left: 2px solid var(--acento); font: italic 400 19px/1.6 var(--serif); }
.nota footer { font: 600 12.5px var(--sans); font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 14px; }
.ficha h3 { font-size: 24px; margin-bottom: 14px; }
.ficha dl, .creditos { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 15px; }
.ficha dt, .creditos dt { color: var(--muted); }
.ficha dd, .creditos dd { margin: 0; }

/* Forma */
.forma { margin: 0 0 8px; }
#forma-svg { width: 100%; height: auto; overflow: visible; }
#forma-svg text { font: 600 13px var(--sans); fill: var(--ink); }
#forma-svg .peq { font: 400 11.5px var(--sans); fill: var(--muted); }
.forma figcaption { font-size: 14.5px; color: var(--muted); margin-top: 8px; max-width: 46em; }
.texto p { font-size: 17.5px; }
.etiquetas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.etiquetas li { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px; font-size: 14px; }

/* Software */
.tarjetas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.tarjeta { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--sombra); }
.tarjeta-vis { background: var(--bg-alt); padding: 18px 20px 6px; color: var(--ink); border-bottom: 1px solid var(--line); }
.tarjeta-vis svg { width: 100%; height: auto; max-height: 150px; }
.svg-etq { font: italic 12.5px var(--serif); fill: var(--acento); }
.tarjeta-cuerpo { padding: 24px 26px 26px; }
.tarjeta-cuerpo h3 { font-size: 32px; margin-bottom: 12px; }
.tarjeta-cuerpo p { font-size: 16px; }
.tarjeta-meta { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px !important; }
.tarjeta-estado { color: var(--acento); font-weight: 500; font-size: 14.5px !important; margin-bottom: 14px !important; }
.tarjeta-sola { grid-column: 1 / -1; }
.tester { border-top: 1px solid var(--line); padding-top: 14px; font-size: 15px; }
.tester summary { cursor: pointer; font-weight: 600; color: var(--acento); }
.tester ol { margin: 12px 0 0; padding-left: 20px; }
.tester li { margin-bottom: 6px; }
.tester a { color: var(--acento); }

/* Arreglos y covers */
.destacado { display: grid; grid-template-columns: 1.1fr .9fr; grid-template-areas: "video texto" "score score"; gap: 28px 44px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--sombra); }
.yt-col { grid-area: video; }
.destacado-texto { grid-area: texto; }
.destacado-texto h3 { font-size: 34px; }
.destacado .de, .cover .de { color: var(--muted); font-size: 15px; margin: 6px 0 14px; }
.destacado-partitura { grid-area: score; margin: 0; max-width: 720px; justify-self: center; }
.destacado-partitura img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.destacado-partitura figcaption a { color: var(--acento); }
.creditos { margin-top: 18px; }
.yt-col { display: flex; flex-direction: column; gap: 10px; }
.yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer; color: #fff; }
.yt img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s, opacity .3s; opacity: .92; }
.yt:hover img { transform: scale(1.03); opacity: 1; }
.yt-play { position: absolute; inset: 0; margin: auto; width: 62px; height: 62px; border-radius: 50%; background: var(--acento); color: var(--acento-tinta); display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); }
.yt-dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, .78); font-size: 12px; padding: 2px 7px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.subtit { font-size: 28px; margin: 56px 0 20px; }
.subtit.chico { margin-top: 0; font-size: 24px; }
.covers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cover h4 { font-size: 24px; margin: 14px 0 0; }
.cover-ancho { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 28px; align-items: center; }
.aparte { font-size: 14.5px; color: var(--muted); margin-top: 20px; }
.aparte a { color: var(--acento); }

/* Contacto */
.lead-chico { font-size: 19px; color: var(--muted); max-width: 32em; }
.enlaces { list-style: none; margin: 0; padding: 0; }
.enlaces a { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.enlaces a:hover b { color: var(--acento); }
.enlaces span { color: var(--muted); }
.enlaces b { font-weight: 500; }

.pie { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
.pie-in p { margin: 0 0 6px; }
.pie a { color: inherit; }

/* Aparición */
@media (prefers-reduced-motion: no-preference) {
  .rev { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
  .rev.visto { opacity: 1; transform: none; }
}

/* Móvil */
@media (max-width: 900px) {
  .hero-grid, .mirada-grid, .dos-col { grid-template-columns: 1fr; }
  .destacado { grid-template-columns: 1fr; grid-template-areas: "video" "texto" "score"; }
  .hero-nota { max-width: 420px; }
  .tarjetas, .covers { grid-template-columns: 1fr; }
  .cover-ancho { grid-template-columns: 1fr; }
  .dos-col { gap: 32px; margin-top: 40px; }
  .partitura { order: -1; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .cabecera-in { gap: 12px; }
  .nav { gap: 16px; font-size: 13.5px; -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); padding-right: 24px; }
  .marca { display: none; }
  .nav { margin-right: auto; }
  .destacado { padding: 18px; }
  .reproductor { padding: 16px; }
  .lista-pistas button { grid-template-columns: 30px 1fr auto; }
  .lista-pistas .tit { font-size: 17px; }
}
