:root {
    --bg: #050d1a;
    --bg-alt: #081528;
    --panel: #0c1d36;
    --line: #17304f;
    --text: #d6e2f0;
    --muted: #8aa0ba;
    --acc: #00aff1;
    --acc-2: #3ee0c4;
    --radius: 14px;
    --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 17px/1.7 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0; color: #fff; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; }
.h-sm { font-size: 1.7rem; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.eyebrow { font: 700 .8rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--acc); margin: 0 0 .8rem; }
.acc { color: var(--acc); }
.center { text-align: center; margin-top: 2rem; }
.lead { font-size: 1.15rem; color: var(--muted); margin-top: 1.2rem; }

/* Botones */
.btn {
    display: inline-block; cursor: pointer;
    padding: .85rem 1.7rem; border-radius: 999px; border: 1px solid var(--acc);
    background: var(--acc); color: #02121f; font: 700 .95rem 'Inter', sans-serif;
    transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 28px rgb(0 175 241 / .35); }
.btn--ghost { background: transparent; color: #fff; border-color: #2a4a6e; }
.btn--ghost:hover { background: rgb(0 175 241 / .12); border-color: var(--acc); }
.btn--sm { padding: .45rem 1.1rem; font-size: .85rem; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.actions--center { justify-content: center; }

/* Navegación */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgb(5 13 26 / .82); backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.is-stuck { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font: 700 1rem var(--mono); color: #fff; letter-spacing: .06em; }
.brand span { color: var(--acc); }
.brand:hover { text-decoration: none; }
.nav__menu { display: flex; align-items: center; gap: 1.6rem; }
.nav__menu a:not(.btn) { color: var(--text); font-size: .92rem; font-weight: 600; }
.nav__menu a:not(.btn):hover { color: var(--acc); text-decoration: none; }
.nav__toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav__toggle i { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .25s; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 9vw, 7rem) 0; }
.hero__glow {
    position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
    background: radial-gradient(circle, rgb(0 175 241 / .28), transparent 62%); pointer-events: none;
}
.hero::before {
    content: ''; position: absolute; inset: 0; opacity: .5; pointer-events: none;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%);
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero h1 { font: 800 clamp(2.6rem, 7vw, 5.4rem)/1 'Inter', sans-serif; letter-spacing: -.03em; }
.hero__sub { font: 400 1.25rem var(--mono); color: var(--acc-2); margin: 1.4rem 0 1.2rem; }
.hero__desc { color: var(--muted); max-width: 58ch; margin: 0 0 1rem; }
.hero__cover { display: grid; place-items: center; perspective: 1200px; }
.hero__cover img {
    width: min(100%, 380px);
    border-radius: 6px;
    transform: rotateY(-12deg) rotateX(3deg);
    box-shadow: 30px 40px 80px rgb(0 0 0 / .6), 0 0 90px rgb(0 175 241 / .25);
    transition: transform .5s;
}
.hero__cover img:hover { transform: rotateY(0) rotateX(0) scale(1.02); }

/* Secciones */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.two-col { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.two-col--wide { grid-template-columns: 1.5fr 1fr; }
.prose p { margin: 0 0 1.1rem; color: var(--text); }

.quote { padding: clamp(3rem, 7vw, 5rem) 20px; text-align: center; background: linear-gradient(135deg, #04365a, #052a47 60%, #031c33); }
.quote p { max-width: 900px; margin: 0 auto; font-size: clamp(1.3rem, 2.8vw, 2rem); font-weight: 300; color: #dcebf7; line-height: 1.5; }
.quote strong { color: var(--acc-2); font-weight: 700; }

.video-frame { margin-top: 2rem; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 80px rgb(0 0 0 / .45); }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Capítulos */
.chapters { list-style: none; margin: 2.2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.chapters li {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.1rem 1.3rem; transition: border-color .2s, transform .2s;
}
.chapters li:hover { border-color: var(--acc); transform: translateY(-3px); }
.chapters span { display: block; font: 700 .75rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--acc); margin-bottom: .3rem; }
.chapters strong { font-weight: 600; color: #fff; line-height: 1.35; display: block; }

/* Prensa */
.section-head { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: end; justify-content: space-between; margin-bottom: 2rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip {
    cursor: pointer; padding: .45rem 1rem; border-radius: 999px; border: 1px solid var(--line);
    background: transparent; color: var(--text); font: 600 .85rem 'Inter', sans-serif; transition: .2s;
}
.chip small { opacity: .6; margin-left: .25rem; }
.chip:hover { border-color: var(--acc); }
.chip.is-on { background: var(--acc); border-color: var(--acc); color: #02121f; }
.press { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
.card {
    display: flex; flex-direction: column; gap: .7rem;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.3rem; transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--acc); transform: translateY(-3px); }
.card[hidden] { display: none; }
.card__top { display: flex; gap: .9rem; align-items: center; }
.card__logo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #1b3354; flex: none; }
.card__meta { margin: .2rem 0 0; font-size: .8rem; color: var(--muted); line-height: 1.35; }
.card h3 { font-size: 1.08rem; font-weight: 600; line-height: 1.35; }
.card__who { margin: 0; color: var(--muted); font-size: .88rem; flex: 1; }
.card audio { width: 100%; height: 38px; }
.card__cta {
    cursor: pointer; align-self: flex-start; padding: .55rem 1.1rem; border-radius: 8px;
    border: 1px solid #2a4a6e; background: transparent; color: #fff; font: 600 .88rem 'Inter', sans-serif; transition: .2s;
}
.card__cta:hover { background: var(--acc); border-color: var(--acc); color: #02121f; text-decoration: none; }
.tag { display: inline-block; padding: .1rem .6rem; border-radius: 6px; font: 700 .68rem var(--mono); letter-spacing: .1em; text-transform: uppercase; background: #123a5c; color: var(--acc); }
.tag--y { background: #3a1730; color: #ff7aa8; }
.tag--r { background: #0f3a33; color: var(--acc-2); }
.empty { padding: 2rem; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

/* Autor */
.author { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.6rem; }
.author img { width: 96px; height: 96px; border-radius: 50%; border: 3px solid var(--acc); }
.author .eyebrow { margin-bottom: .2rem; }
.talks { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; position: sticky; top: 90px; }
.talks h3 { font-size: 1.5rem; }
.talks__sub { color: var(--acc); font: 700 .75rem var(--mono); letter-spacing: .14em; text-transform: uppercase; margin: .3rem 0 1rem; }
.talks ul { list-style: none; margin: 0; padding: 0; }
.talks li { padding: .9rem 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .15rem; }
.talks li strong { color: #fff; font-weight: 600; font-size: .98rem; line-height: 1.35; }
.talks__date { font-size: .82rem; color: var(--muted); }
.talks li a { font-size: .85rem; }

/* Comprar */
.buy { padding: clamp(3rem, 7vw, 4.5rem) 0; text-align: center; background: linear-gradient(135deg, #04365a, #031c33); }
.buy h2 { font-size: clamp(1.4rem, 2.8vw, 2rem); max-width: 28ch; margin: 0 auto; }

/* Contacto */
address { font-style: normal; margin: 1.4rem 0; line-height: 1.9; }
.mail { font: 700 1.05rem var(--mono); word-break: break-all; }
.twitter { min-height: 200px; }

/* CTE */
.cte { background: #0b4a63; padding: clamp(2rem, 5vw, 3rem) 0; }
.cte__inner { display: flex; gap: 2rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cte__inner > div { flex: 1 1 520px; }
.cte h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.cte p { margin: .8rem 0 0; color: #d3eaf3; }

.footer { padding: 1.6rem 0; background: #030913; font-size: .88rem; color: var(--muted); }
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .8rem; }

/* Lightbox */
.lightbox {
    width: min(1100px, 94vw); height: min(86vh, 900px); max-width: none; padding: 0; margin: auto;
    background: #0a1830; color: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: 0 40px 120px rgb(0 0 0 / .7);
}
.lightbox[open] { display: flex; flex-direction: column; animation: lb-in .25s ease-out; }
.lightbox::backdrop { background: rgb(2 6 14 / .86); backdrop-filter: blur(4px); }
.lightbox__bar { display: flex; align-items: center; gap: 1rem; padding: .7rem 1rem .7rem 1.3rem; border-bottom: 1px solid var(--line); }
.lightbox__bar strong { flex: 1; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lightbox__open { font-size: .85rem; white-space: nowrap; }
.lightbox__close { cursor: pointer; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #17304f; color: #fff; font-size: 1.5rem; line-height: 1; transition: background .2s; }
.lightbox__close:hover { background: var(--acc); color: #02121f; }
.lightbox__body { flex: 1; min-height: 0; background: #000; }
.lightbox__body iframe, .lightbox__body object { width: 100%; height: 100%; border: 0; display: block; }
@keyframes lb-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* Responsive */
@media (max-width: 900px) {
    .hero__grid, .two-col, .two-col--wide { grid-template-columns: 1fr; }
    .hero__cover { order: -1; }
    .hero__cover img { width: min(70%, 280px); transform: none; }
    .talks { position: static; }
    .nav__toggle { display: block; }
    .nav__menu {
        position: absolute; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
        background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem 20px 1.2rem;
        display: none;
    }
    .nav__menu.is-open { display: flex; }
    .nav__menu a:not(.btn) { padding: .8rem 0; border-bottom: 1px solid var(--line); }
    .nav__menu .btn { margin-top: 1rem; text-align: center; }
    .lightbox { width: 100vw; height: 100dvh; border-radius: 0; max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; animation: none !important; }
}

/* Formulario de contacto */
.form { display: grid; gap: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 2rem); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); }
.form label small { float: right; font-weight: 400; }
.form input:not([type=radio]), .form textarea {
    display: block; width: 100%; margin-top: .35rem; padding: .75rem .9rem; border-radius: 10px;
    border: 1px solid var(--line); background: #06111f; color: #fff; font: inherit; font-size: .98rem;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--acc); outline-offset: 1px; border-color: var(--acc); }
.form textarea { resize: vertical; }
.form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; align-items: center; }
.form legend { font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: .4rem; padding: 0; float: left; width: 100%; }
.form .radio { display: inline-flex; align-items: center; gap: .45rem; color: var(--text); font-weight: 400; font-size: .95rem; }
.form button { justify-self: start; }
.form button:disabled { opacity: .6; cursor: wait; }
.form__msg { margin: 0; min-height: 1.4em; font-weight: 600; }
.form__msg.ok { color: var(--acc-2); }
.form__msg.err { color: #ff7a8a; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }

/* Paginado de conferencias */
.talks li[hidden] { display: none; }
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.pager .chip:disabled { opacity: .35; cursor: default; }
.contact-links { display: flex; flex-wrap: wrap; gap: .6rem; }

/* ===== Refinamientos de diseño v3 ===== */
body {
    background:
        radial-gradient(ellipse 80% 50% at 10% 0%, rgb(0 175 241 / .07), transparent 60%),
        var(--bg);
}
h2 { background: linear-gradient(90deg, #fff 30%, #9fdcff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow::before { content: ''; display: inline-block; width: 28px; height: 2px; background: var(--acc); vertical-align: middle; margin-right: .7rem; }
.btn { background: linear-gradient(135deg, #00c2ff, #0089d6); border-color: transparent; color: #fff; }
.btn--ghost { background: rgb(255 255 255 / .03); border: 1px solid #2a4a6e; }
.nav { background: rgb(5 13 26 / .7); }
.brand { text-shadow: 0 0 18px rgb(0 175 241 / .5); }

/* Hero */
.hero__glow { animation: pulse 7s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; transform: scale(1.08); } }
.hero h1 { background: linear-gradient(180deg, #fff 40%, #7fd4ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero h1 .acc { -webkit-text-fill-color: var(--acc); }
.hero__cover img { animation: float 6s ease-in-out infinite; }
.hero__cover img:hover { animation: none; }
@keyframes float { 50% { translate: 0 -12px; } }

/* Tarjetas con brillo */
.chapters li, .card, .talks, .form {
    background: linear-gradient(160deg, rgb(20 45 80 / .75), rgb(9 22 42 / .85));
    box-shadow: 0 1px 0 rgb(255 255 255 / .05) inset, 0 12px 30px rgb(0 0 0 / .25);
}
.chapters { counter-reset: cap; }
.chapters li:hover, .card:hover { box-shadow: 0 1px 0 rgb(255 255 255 / .08) inset, 0 18px 40px rgb(0 100 160 / .3); }

/* Citas */
.quote { position: relative; overflow: hidden; }
.quote::before { content: '“'; position: absolute; top: -.2em; left: 5%; font: 800 14rem/1 Georgia, serif; color: rgb(255 255 255 / .05); }
.quote p { position: relative; }

/* Autor colapsable */
.collapsible { position: relative; max-height: 24rem; overflow: hidden; transition: max-height .6s ease; }
.collapsible::after { content: ''; position: absolute; inset: auto 0 0 0; height: 8rem; background: linear-gradient(transparent, var(--bg)); pointer-events: none; transition: opacity .3s; }
.collapsible.is-open { max-height: 130rem; }
.collapsible.is-open::after { opacity: 0; }
#bio-toggle { margin-top: 1rem; }
.no-collapse { max-height: none; }
.no-collapse::after { display: none; }

/* Aparición al scroll */
.js .reveal { opacity: 0; translate: 0 26px; transition: opacity .7s ease, translate .7s ease; }
.js .reveal.is-in { opacity: 1; translate: 0 0; }

/* Botón de comprar */
.buy { background: radial-gradient(ellipse at 50% 120%, rgb(0 175 241 / .35), transparent 60%), linear-gradient(135deg, #04365a, #031c33); }
.buy .btn--ghost { padding: .9rem 2rem; }

@media (max-width: 900px) { .collapsible { max-height: 20rem; } }
