:root {
  --ink: #101714;
  --ink-2: #17201c;
  --ivory: #eef1eb;
  --paper: #f8f8f4;
  --text: #17201c;
  --text-soft: #4b5751;
  --on-dark: #eef1ea;
  --on-dark-soft: #cfcabd;
  --accent: #2e5e48;
  --accent-light: #d6b36a;
  --tag: #2e5e48;
  --line: #dce2dc;
  --line-dark: #2a3631;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 1rem/1.65 var(--sans); display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
body.pg-dark { background: var(--ink); }
main { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { font: 600 .75rem/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
.dark .eyebrow, .dark .section-head .eyebrow, .contact-body > .eyebrow { color: var(--accent-light); }
.section-head .eyebrow, .bio-text .eyebrow { color: var(--accent); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ivory); color: var(--ink); padding: 10px 16px; z-index: 200; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Idioma: se muestra solo el bloque del idioma activo */
html[data-lang="es"] [data-l="en"], html[data-lang="en"] [data-l="es"] { display: none !important; }

/* Encabezado */
.top { position: fixed; inset: 0 0 auto; z-index: 100; background: linear-gradient(rgba(16,23,20,.85), rgba(16,23,20,0)); transition: background .3s var(--ease), box-shadow .3s var(--ease); }
.top.solid { background: rgba(16, 23, 20, .94); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--line-dark); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.brand { font: 600 1.35rem/1 var(--serif); color: var(--on-dark); text-decoration: none; letter-spacing: .01em; }
.menu { display: flex; align-items: center; gap: 28px; }
.menu a { color: var(--on-dark); text-decoration: none; font-size: .875rem; font-weight: 500; padding: 10px 0; position: relative; }
.menu a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 4px; height: 1px; background: var(--accent-light); transition: right .25s var(--ease); }
.menu a:hover::after, .menu a.on::after, .menu a[aria-current]::after { right: 0; }
.lang { display: inline-flex; border: 1px solid #4d5d55; border-radius: 999px; padding: 3px; }
.lang button { font: 600 .75rem/1 var(--sans); letter-spacing: .08em; color: var(--on-dark-soft); background: none; border: 0; border-radius: 999px; padding: 9px 12px; min-width: 44px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--on-dark); color: var(--ink); }
.burger { display: none; background: none; border: 0; color: var(--on-dark); width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.burger svg { width: 24px; height: 24px; }

/* Portada */
.hero { background: var(--ink); color: var(--on-dark); display: grid; grid-template-columns: 1.1fr .9fr; min-height: 100svh; }
.hero-text { display: flex; flex-direction: column; justify-content: center; padding: 120px var(--gutter) 72px max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); }
.hero h1 { font-size: clamp(3.2rem, 8vw, 6.6rem); font-weight: 500; line-height: .95; }
.hero h1 em { display: block; font-style: italic; color: var(--accent-light); }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--on-dark-soft); max-width: 34ch; margin: 28px 0 36px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px; font: 600 .9rem/1 var(--sans); text-decoration: none; transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease); }
.btn svg { width: 18px; height: 18px; }
.btn-fill { background: var(--accent-light); color: var(--ink); }
.btn-fill:hover { background: #e6cb8e; }
.btn-line { border: 1px solid #5d6e66; color: var(--on-dark); }
.btn-line:hover { border-color: var(--on-dark); }
.btn:active { transform: scale(.98); }
.hero-photo { position: relative; overflow: hidden; display: flex; justify-content: flex-end; }
.hero-photo img { width: auto; height: 100%; max-width: 100%; aspect-ratio: 1066 / 1600; object-fit: cover;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 92%, transparent); mask-image: linear-gradient(to right, transparent, #000 14%, #000 92%, transparent); }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink) 0, rgba(16,23,20,0) 22%); pointer-events: none; }

/* Logros */
.highlights { background: var(--ink-2); color: var(--on-dark); border-top: 1px solid var(--line-dark); }
.highlights ul { list-style: none; margin: 0 auto; padding: 0 var(--gutter); max-width: var(--max); display: grid; grid-template-columns: repeat(4, 1fr); }
.highlights li { padding: 32px 24px 34px 0; border-right: 1px solid var(--line-dark); margin-right: 24px; }
.highlights li:last-child { border-right: 0; margin-right: 0; }
.highlights strong { display: block; font: 500 1.6rem/1.1 var(--serif); color: var(--accent-light); margin-bottom: 8px; }
.highlights li > span { font-size: .9rem; color: var(--on-dark-soft); line-height: 1.5; display: block; }

/* Secciones */
section { padding: clamp(72px, 10vw, 128px) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
.section-head p { max-width: 46ch; color: var(--text-soft); margin: 0; }
.dark { background: var(--ink); color: var(--on-dark); }
.dark .section-head p { color: var(--on-dark-soft); }

/* Biografía */
.bio { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); padding: 0; }
/* La foto es de bordes casi negros: el panel usa ese mismo tono para que no se note el borde */
.bio-photo { margin: 0; background: #050806; }
.bio-photo img { position: sticky; top: 68px; width: 100%; height: calc(100vh - 68px); height: calc(100svh - 68px); object-fit: contain; object-position: 50% 30%;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent); mask-image: linear-gradient(to bottom, #000 78%, transparent); }
.bio-text { padding: clamp(72px, 10vw, 128px) var(--gutter); max-width: 760px; }
.bio-text h2 { font-size: clamp(2.4rem, 5vw, 3.8rem); margin-bottom: 28px; }
.bio-text .first { font: 500 clamp(1.35rem, 2.2vw, 1.6rem)/1.4 var(--serif); color: var(--text); }
.bio-text p { color: #33403a; max-width: 62ch; }
.short-bio { margin-top: 40px; background: var(--ivory); border: 1px solid var(--line); border-radius: 6px; padding: 24px 24px 20px; }
.short-bio h3 { font: 600 .75rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.short-bio p { margin-bottom: 16px; }
.copy { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid #c5cec7; background: var(--paper); border-radius: 999px; font: 600 .82rem/1 var(--sans); color: var(--text); cursor: pointer; transition: background .2s var(--ease); }
.copy:hover { background: #fff; }
.copy svg { width: 16px; height: 16px; }

/* Destacado Los Jaivas */
.feature { background: var(--ink-2); color: var(--on-dark); padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--line-dark); }
.feature .wrap { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 6vw, 88px); align-items: center; }
.feature .num { margin: 0; font: 500 clamp(6rem, 15vw, 11rem)/1 var(--serif); color: var(--accent-light); }
.feature .num small { display: block; font: 600 .75rem/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark-soft); margin-top: 4px; }
.feature blockquote { margin: 0; max-width: 26ch; font: 500 clamp(1.8rem, 3.4vw, 2.8rem)/1.15 var(--serif); }
.feature cite { display: block; margin-top: 16px; font: 500 .9rem/1.5 var(--sans); font-style: normal; color: var(--on-dark-soft); }

/* Videos */
.videos { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.videos .side { display: grid; gap: 20px; align-content: start; }
.video { margin: 0; }
.video button, .video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 4px; }
.video button { position: relative; padding: 0; cursor: pointer; background: #000; overflow: hidden; }
.video button img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .3s var(--ease), transform .5s var(--ease); }
.video button:hover img { opacity: 1; transform: scale(1.02); }
.play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(238, 241, 234, .92); display: grid; place-items: center; transition: transform .2s var(--ease); }
.play svg { width: 22px; height: 22px; margin-left: 4px; fill: var(--ink); }
.video button:hover .play { transform: scale(1.06); }
.side .play { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
.video figcaption { padding-top: 12px; }
.video figcaption strong { display: block; font: 500 1.3rem/1.25 var(--serif); }
.video figcaption > span { font-size: .85rem; color: var(--on-dark-soft); }
.channel { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.more { color: var(--accent-light); font-weight: 600; font-size: .95rem; text-decoration: none; padding: 12px 0; }
.more:hover { text-decoration: underline; }

/* Repertorio */
#repertorio { padding: 0; }
/* La mitad izquierda de la foto es casi negra (#0f1314): la banda usa ese tono y la foto se funde por la izquierda y arriba */
.rep-intro { background: #0f1314; color: var(--on-dark); display: grid; grid-template-columns: minmax(0, 1fr) min(44vw, 540px); align-items: center; }
.rep-intro-text { padding: 72px var(--gutter) 72px max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); }
.rep-intro-text .eyebrow { color: var(--accent-light); }
.rep-intro-text h1 { font-size: clamp(2.8rem, 6vw, 4.6rem); }
.rep-intro-text p { color: var(--on-dark-soft); max-width: 42ch; margin: 20px 0 0; }
.rep-count { display: flex; gap: 32px; margin-top: 32px; }
.rep-count b { display: block; font: 500 2.4rem/1 var(--serif); color: var(--on-dark); }
.rep-count span { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-soft); }
.rep-photo { margin: 0; align-self: stretch; display: flex; align-items: flex-end; }
.rep-photo img { width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 22%), linear-gradient(to bottom, transparent, #000 14%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent, #000 22%), linear-gradient(to bottom, transparent, #000 14%); mask-composite: intersect; }
.rep-body { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(72px, 10vw, 128px); }
.rep-tools { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font: 500 .85rem/1 var(--sans); color: var(--text); cursor: pointer; transition: background .2s var(--ease), border-color .2s var(--ease); }
.chip:hover { border-color: #aab8af; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
.chip small { color: inherit; opacity: .65; margin-left: 4px; font-size: .78rem; }
.search { position: relative; flex: 0 1 300px; }
.search input { width: 100%; min-height: 44px; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 0 16px 0 40px; font: 400 1rem var(--sans); color: var(--text); }
.search svg { position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--text-soft); }
.rep-group { margin-top: 36px; }
.rep-group h3 { font: 600 .75rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.work { border-bottom: 1px solid var(--line); }
.work summary { list-style: none; display: grid; grid-template-columns: 1fr auto 20px; gap: 16px; align-items: center; padding: 16px 0; cursor: pointer; }
.work summary::-webkit-details-marker { display: none; }
.work .t { font: 500 1.3rem/1.25 var(--serif); }
.work .c { display: block; font-size: .875rem; color: var(--text-soft); margin-top: 2px; }
.work .d { font-size: .82rem; color: var(--text-soft); white-space: nowrap; }
.work .chev { width: 20px; height: 20px; color: var(--text-soft); transition: transform .25s var(--ease); }
.work[open] .chev { transform: rotate(180deg); }
.work .body { padding: 0 0 22px; max-width: 70ch; color: #33403a; }
.work .tag { display: inline-block; font-size: .78rem; font-weight: 600; color: var(--tag); background: #e2ece5; border-radius: 999px; padding: 4px 10px; margin-bottom: 12px; }
.work ol { margin: 8px 0 0; padding-left: 0; list-style: none; }
.work li { padding: 10px 0; border-top: 1px dashed var(--line); }
.work li strong { display: block; font-weight: 600; font-size: .9rem; }
.work li span { font-size: .92rem; }
.work .watch { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .88rem; color: var(--accent); margin-top: 4px; }
.empty { padding: 32px 0; color: var(--text-soft); }

/* Trayectoria */
.cv { background: var(--ivory); }
.cv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); }
.cv-col h3 { font-size: 1.7rem; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid #cfd7d0; }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 86px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; line-height: 1.5; }
.tl time { white-space: nowrap; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; font-size: .85rem; padding-top: 1px; }
.tl b { font-weight: 600; display: block; }
.tl small { color: var(--text-soft); font-size: .85rem; }
.skills { margin-top: 36px; }
.skills dl { margin: 0; display: grid; gap: 10px; }
.skills dt { font-weight: 600; font-size: .9rem; }
.skills dd { margin: 0 0 6px; color: var(--text-soft); font-size: .92rem; }

/* Contacto */
.contact { background: var(--ink); color: var(--on-dark); padding-top: clamp(112px, 12vw, 160px); }
.contact .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.contact-photo { margin: 0; }
.contact-photo img { width: 100%; border-radius: 4px; }
.contact-body { align-self: center; }
.contact-body h1 { font-size: clamp(2.6rem, 5vw, 4rem); margin-bottom: 16px; }
.contact-body > p { color: var(--on-dark-soft); max-width: 40ch; margin-bottom: 32px; }
.links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-dark); }
.links a { display: grid; grid-template-columns: 24px 1fr 20px; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line-dark); text-decoration: none; transition: color .2s var(--ease); min-height: 44px; }
.links a:hover { color: var(--accent-light); }
.links svg { width: 22px; height: 22px; }
.links .k { display: block; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-soft); }
.links .v { font: 500 1.25rem/1.3 var(--serif); word-break: break-word; }
footer { background: var(--ink); color: var(--on-dark-soft); font-size: .8rem; border-top: 1px solid var(--line-dark); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 24px; padding-bottom: 24px; }

/* Enlaces a las otras páginas, al final del inicio */
.next { background: var(--ink); color: var(--on-dark); display: grid; grid-template-columns: 1fr 1fr; }
.next a { display: block; padding: clamp(40px, 6vw, 72px) var(--gutter); text-decoration: none; border-right: 1px solid var(--line-dark); transition: background .25s var(--ease); }
.next a:last-child { border-right: 0; }
.next a:hover { background: var(--ink-2); }
.next strong { display: block; font: 500 clamp(2rem, 4vw, 3rem)/1.1 var(--serif); color: var(--accent-light); margin-bottom: 8px; }
.next a > span { color: var(--on-dark-soft); font-size: .95rem; }
.next a:first-child { padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); }

/* Aparición suave al hacer scroll */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0s !important; }
}

/* Tablet y móvil */
@media (max-width: 980px) {
  .cv-grid { grid-template-columns: 1fr 1fr; }
  .cv-col.edu { grid-column: 1 / -1; }
  .highlights ul { grid-template-columns: 1fr 1fr; }
  .highlights li:nth-child(2) { border-right: 0; margin-right: 0; }
  .highlights li:nth-child(-n+2) { border-bottom: 1px solid var(--line-dark); }
}
@media (max-width: 860px) {
  .burger { display: block; }
  .menu { position: fixed; inset: 68px 0 auto; flex-direction: column; align-items: stretch; gap: 0; background: var(--ink); padding: 8px var(--gutter) 24px; border-bottom: 1px solid var(--line-dark); display: none; max-height: calc(100vh - 68px); max-height: calc(100svh - 68px); overflow-y: auto; }
  .menu.open { display: flex; }
  .menu a { padding: 14px 0; font-size: 1rem; border-bottom: 1px solid var(--line-dark); }
  .menu a::after { display: none; }
  .menu .lang { align-self: flex-start; margin-top: 16px; }
}
/* Una columna solo con la pantalla vertical: girado, el alto no alcanza para apilar foto y texto */
@media (max-width: 860px) and (orientation: portrait), (max-width: 560px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-photo { order: -1; height: min(78svh, 140vw); justify-content: center; }
  .hero-photo img { -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent); }
  .hero-photo::after { background: linear-gradient(0deg, var(--ink) 0, rgba(16,23,20,0) 35%); }
  .hero-text { padding: 8px var(--gutter) 56px; }
  .bio, .videos, .contact .wrap { grid-template-columns: 1fr; }
  .bio-photo img { position: static; height: auto; max-height: 82svh; }
}
/* Pantallas de poco alto: celular girado */
@media (max-height: 500px) {
  .hero-text { padding-top: 88px; padding-bottom: 40px; }
  .rep-intro-text { padding-top: 88px; padding-bottom: 40px; }
  .contact { padding-top: 96px; }
}
@media (max-width: 560px) {
  .rep-intro { grid-template-columns: 1fr; }
  .rep-photo { order: -1; }
  .rep-photo img { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 80%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 80%, transparent); }
  .rep-intro-text { padding: 0 var(--gutter) 56px; margin-top: -40px; position: relative; }
  .feature .wrap { grid-template-columns: 1fr; }
  .next { grid-template-columns: 1fr; }
  .next a { border-right: 0; border-bottom: 1px solid var(--line-dark); }
  .highlights ul { grid-template-columns: 1fr; }
  .highlights li { border-right: 0 !important; margin-right: 0 !important; border-bottom: 1px solid var(--line-dark); padding: 22px 0; }
  .highlights li:last-child { border-bottom: 0; }
  .cv-grid { grid-template-columns: 1fr; }
  .work summary { grid-template-columns: 1fr 20px; }
  .work .d { display: none; }
  .search { flex-basis: 100%; }
  .tl li { grid-template-columns: 82px 1fr; }
}
