/* ============================================================
   Blog multitenant — Neural Cyan
   Rajdhani (titulares/marca) + Manrope (cuerpo)
   ============================================================ */

:root {
    --font-heading: "Rajdhani", "Manrope", sans-serif;
    --font-subheading: "Rajdhani", "Manrope", sans-serif;
    --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-ui: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-brand: "Rajdhani", "Manrope", sans-serif;
    --bg: #05070d;
    --bg-2: #0a0f1a;
    --panel: rgba(15, 22, 38, 0.72);
    --panel-border: rgba(21, 217, 255, 0.18);
    --header-bg: rgba(5, 7, 13, 0.65);
    --header-ink: #e7eefc;
    --header-link: #a9b7d0;
    --header-link-hover: #15d9ff;
    --ink: #e7eefc;
    --ink-soft: #a9b7d0;
    --ink-dim: #6d7c98;
    --cyan: #15d9ff;
    --teal: #00f0b5;
    --violet: #7b6cff;
    --glow: 0 0 24px rgba(21, 217, 255, 0.35);
    --radius: 16px;
    --maxw: 1160px;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

body.theme-hitech {
    --bg: #060816;
    --bg-2: #0d1024;
    --panel: rgba(18, 22, 48, 0.74);
    --panel-border: rgba(56, 189, 248, 0.22);
    --ink: #eef4ff;
    --ink-soft: #b8c5e1;
    --ink-dim: #7b88a8;
    --cyan: #38bdf8;
    --teal: #f472b6;
    --violet: #a855f7;
    --glow: 0 0 28px rgba(168, 85, 247, 0.34);
}

body.theme-classic {
    --bg: #f7f1e3;
    --bg-2: #efe4cf;
    --panel: rgba(255, 250, 239, 0.86);
    --panel-border: rgba(111, 78, 55, 0.18);
    --ink: #1d1b18;
    --ink-soft: #514940;
    --ink-dim: #7a6d61;
    --cyan: #b7791f;
    --teal: #6f4e37;
    --violet: #8b5e34;
    --glow: 0 0 24px rgba(183, 121, 31, 0.24);
    --shadow: 0 18px 45px rgba(68, 46, 24, 0.16);
    --header-bg: rgba(255, 250, 239, 0.86);
    --header-ink: #1d1b18;
    --header-link: #514940;
    --header-link-hover: #b7791f;
}

body.theme-minimal {
    --bg: #f8fafc;
    --bg-2: #eaf0f8;
    --panel: rgba(255, 255, 255, 0.88);
    --panel-border: rgba(37, 99, 235, 0.16);
    --ink: #0f172a;
    --ink-soft: #475569;
    --ink-dim: #64748b;
    --cyan: #2563eb;
    --teal: #14b8a6;
    --violet: #6366f1;
    --glow: 0 0 22px rgba(37, 99, 235, 0.20);
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --header-bg: rgba(255, 255, 255, 0.84);
    --header-ink: #0f172a;
    --header-link: #475569;
    --header-link-hover: #2563eb;
}

body.theme-noir {
    --bg: #080706;
    --bg-2: #17110d;
    --panel: rgba(24, 19, 15, 0.78);
    --panel-border: rgba(245, 215, 161, 0.20);
    --ink: #f8efe0;
    --ink-soft: #d9c6aa;
    --ink-dim: #9a8267;
    --cyan: #f5d7a1;
    --teal: #c47c48;
    --violet: #a65f3a;
    --glow: 0 0 26px rgba(245, 215, 161, 0.24);
}

body.theme-calm {
    --bg: #f4f1e8;
    --bg-2: #e7deca;
    --panel: rgba(255, 252, 244, 0.86);
    --panel-border: rgba(102, 143, 106, 0.20);
    --ink: #203229;
    --ink-soft: #4b5f52;
    --ink-dim: #728071;
    --cyan: #668f6a;
    --teal: #c18f59;
    --violet: #8e735b;
    --glow: 0 0 24px rgba(102, 143, 106, 0.22);
    --shadow: 0 18px 45px rgba(50, 62, 47, 0.13);
    --header-bg: rgba(255, 252, 244, 0.84);
    --header-ink: #203229;
    --header-link: #4b5f52;
    --header-link-hover: #668f6a;
}

body.theme-paper {
    --bg: #fbf6ea;
    --bg-2: #efe6d3;
    --panel: rgba(255, 252, 244, 0.88);
    --panel-border: rgba(49, 90, 124, 0.18);
    --header-bg: rgba(255, 252, 244, 0.86);
    --header-ink: #182033;
    --header-link: #435067;
    --header-link-hover: #315a7c;
    --ink: #182033;
    --ink-soft: #435067;
    --ink-dim: #747d8f;
    --cyan: #315a7c;
    --teal: #d09a2d;
    --violet: #8d4f3a;
    --glow: 0 0 24px rgba(208, 154, 45, 0.22);
    --shadow: 0 18px 45px rgba(48, 37, 23, 0.13);
}

body.theme-mediterraneo {
    --bg: #fff8ed;
    --bg-2: #f1dfc8;
    --panel: rgba(255, 252, 246, 0.88);
    --panel-border: rgba(29, 122, 140, 0.20);
    --header-bg: rgba(255, 252, 246, 0.86);
    --header-ink: #123f5c;
    --header-link: #3e6274;
    --header-link-hover: #c56b45;
    --ink: #123f5c;
    --ink-soft: #3e6274;
    --ink-dim: #748895;
    --cyan: #1d7a8c;
    --teal: #c56b45;
    --violet: #d9a441;
    --glow: 0 0 24px rgba(197, 107, 69, 0.22);
    --shadow: 0 18px 45px rgba(63, 47, 29, 0.14);
}

body.theme-graphite {
    --bg: #111318;
    --bg-2: #1c2028;
    --panel: rgba(31, 35, 44, 0.78);
    --panel-border: rgba(255, 138, 61, 0.20);
    --header-bg: rgba(17, 19, 24, 0.76);
    --header-ink: #f3f0e8;
    --header-link: #c3c8d0;
    --header-link-hover: #ff8a3d;
    --ink: #f3f0e8;
    --ink-soft: #c3c8d0;
    --ink-dim: #8ea1b8;
    --cyan: #ff8a3d;
    --teal: #8ea1b8;
    --violet: #f2c14e;
    --glow: 0 0 26px rgba(255, 138, 61, 0.24);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
}

body.theme-bordeaux {
    --bg: #2b0f18;
    --bg-2: #421826;
    --panel: rgba(70, 29, 43, 0.76);
    --panel-border: rgba(216, 167, 95, 0.22);
    --header-bg: rgba(43, 15, 24, 0.78);
    --header-ink: #fff1df;
    --header-link: #ead2bd;
    --header-link-hover: #d8a75f;
    --ink: #fff1df;
    --ink-soft: #ead2bd;
    --ink-dim: #c79bad;
    --cyan: #d8a75f;
    --teal: #b65f72;
    --violet: #f0c9a5;
    --glow: 0 0 26px rgba(216, 167, 95, 0.24);
    --shadow: 0 18px 50px rgba(24, 6, 12, 0.38);
}

body.theme-polar {
    --bg: #f5fbff;
    --bg-2: #e7f4fb;
    --panel: rgba(255, 255, 255, 0.88);
    --panel-border: rgba(58, 167, 201, 0.20);
    --header-bg: rgba(255, 255, 255, 0.86);
    --header-ink: #102033;
    --header-link: #536578;
    --header-link-hover: #3aa7c9;
    --ink: #102033;
    --ink-soft: #536578;
    --ink-dim: #78899b;
    --cyan: #3aa7c9;
    --teal: #6b7cff;
    --violet: #254f75;
    --glow: 0 0 22px rgba(58, 167, 201, 0.20);
    --shadow: 0 18px 45px rgba(16, 32, 51, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Canvas de fondo neural */
#neural-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    display: block;
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(1100px 600px at 80% -10%, rgba(21, 217, 255, 0.10), transparent 60%),
        radial-gradient(900px 500px at 0% 110%, rgba(123, 108, 255, 0.10), transparent 60%),
        linear-gradient(180deg, rgba(5, 7, 13, 0.4), rgba(5, 7, 13, 0.86));
}
body.theme-classic::after,
body.theme-minimal::after,
body.theme-calm::after,
body.theme-paper::after,
body.theme-mediterraneo::after,
body.theme-polar::after {
    background:
        radial-gradient(1100px 600px at 80% -10%, color-mix(in srgb, var(--cyan) 12%, transparent), transparent 60%),
        radial-gradient(900px 500px at 0% 110%, color-mix(in srgb, var(--teal) 12%, transparent), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.70));
}

h1, h2, h3, .btn, .eyebrow, nav a {
    font-family: var(--font-heading);
    letter-spacing: 0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; margin: 0 0 .5em; font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; margin: 0 0 .6em; }
h3 { font-family: var(--font-subheading); font-size: 1.25rem; font-weight: 600; margin: 0 0 .4em; }
p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: var(--cyan); text-decoration: none; transition: color .2s; }
a:hover { color: var(--teal); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 3px;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 2000;
    transform: translateY(-180%);
    padding: .7rem 1rem;
    border-radius: 999px;
    background: var(--cyan);
    color: #04121a;
    font-weight: 800;
    box-shadow: var(--shadow);
}
.skip-link:focus {
    transform: translateY(0);
    color: #04121a;
}

.eyebrow {
    display: inline-block;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .22em;
    color: var(--cyan);
    margin-bottom: .8rem;
    font-weight: 600;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    background: var(--header-bg);
    border-bottom: 1px solid var(--panel-border);
}
.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.brand {
    font-family: var(--font-brand);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--header-ink);
    display: flex;
    align-items: center;
    gap: .55rem;
}
.brand.is-compact { font-size: 1.15rem; }
.brand.is-prominent { font-size: 1.65rem; }
.brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    object-fit: cover;
    flex: 0 0 auto;
    background: color-mix(in srgb, var(--panel) 82%, var(--bg));
    border: 1px solid var(--panel-border);
    box-shadow: var(--glow);
}
.brand.is-compact .brand-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
}
.brand.is-prominent .brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
}
nav.main-nav { display: flex; gap: 1.05rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; font-family: var(--font-ui); }
nav.main-nav a { color: var(--header-link); font-size: .98rem; font-weight: 600; }
nav.main-nav a:hover { color: var(--header-link-hover); }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .8rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1.02rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .15s, box-shadow .2s, background .2s;
    font-family: var(--font-ui);
}
.btn-primary {
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    color: #04121a;
    box-shadow: var(--glow);
}
.btn-primary:hover { transform: translateY(-2px); color: #04121a; }
.btn-ghost {
    background: transparent;
    border-color: var(--panel-border);
    color: var(--ink);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- Hero ---------- */
.hero { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 3rem;
    align-items: center;
}
.hero p.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 40ch; }
.brand-positioning {
    color: var(--cyan);
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
    font-weight: 700;
    letter-spacing: .02em;
    margin: -1rem 0 1rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero-visual {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
    background: var(--bg-2);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-terminal {
    width: 100%;
    height: 100%;
    padding: 1rem;
    background:
        radial-gradient(320px 220px at 78% 18%, color-mix(in srgb, var(--cyan) 14%, transparent), transparent 68%),
        linear-gradient(145deg, color-mix(in srgb, var(--panel) 88%, var(--bg)), var(--bg-2));
}
.terminal-bar {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem .9rem;
    border: 1px solid var(--panel-border);
    border-bottom: 0;
    border-radius: calc(var(--radius) - 4px) calc(var(--radius) - 4px) 0 0;
    background: color-mix(in srgb, var(--bg) 72%, transparent);
}
.terminal-dots {
    display: inline-flex;
    gap: .35rem;
}
.terminal-dots i {
    width: .58rem;
    height: .58rem;
    border-radius: 50%;
    background: var(--ink-dim);
}
.terminal-dots i:nth-child(1) { background: var(--violet); }
.terminal-dots i:nth-child(2) { background: var(--teal); }
.terminal-dots i:nth-child(3) { background: var(--cyan); box-shadow: var(--glow); }
.terminal-title {
    color: var(--ink-soft);
    font-family: var(--font-ui);
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .8rem;
}
.terminal-screen {
    height: calc(100% - 3rem);
    padding: 1.1rem;
    border: 1px solid var(--panel-border);
    border-radius: 0 0 calc(var(--radius) - 4px) calc(var(--radius) - 4px);
    background: color-mix(in srgb, var(--bg) 84%, transparent);
    box-shadow: inset 0 0 28px color-mix(in srgb, var(--cyan) 8%, transparent);
    font-family: var(--font-ui);
    font-size: clamp(1rem, 2.4vw, 1.28rem);
    line-height: 1.65;
    cursor: text;
    caret-color: transparent;
    user-select: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}
.terminal-screen:focus { outline: none; }
.terminal-screen::-webkit-scrollbar { display: none; }
.terminal-screen p {
    margin: 0 0 .32rem;
    color: var(--ink-soft);
    white-space: nowrap;
    min-height: 1.45em;
}
.terminal-input-line { color: var(--ink); }
.terminal-screen .prompt {
    color: var(--cyan);
    text-shadow: var(--glow);
}
.terminal-cursor {
    display: inline-block;
    width: .55em;
    height: 1.05em;
    margin-left: .12em;
    vertical-align: -.18em;
    border: 1px solid var(--cyan);
    background: transparent;
    box-shadow: none;
    animation: none;
}
.terminal-screen.is-booting .terminal-cursor,
.terminal-screen.is-focused .terminal-cursor {
    background: var(--cyan);
    box-shadow: var(--glow);
    animation: terminal-cursor .9s infinite;
}
.terminal-screen.is-ready .terminal-cursor {
    background: transparent;
    box-shadow: none;
    opacity: .82;
}
@keyframes terminal-cursor {
    0%, 45% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 0; }
}

/* ---------- Secciones ---------- */
section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-head { margin-bottom: 2rem; }
.section-cta {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.discovery-panel {
    display: grid;
    gap: 1.2rem;
    margin: 0 0 2rem;
    padding: clamp(1.1rem, 3vw, 1.5rem);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}
.search-form {
    display: grid;
    gap: .65rem;
}
.search-form label,
.discovery-dropdown summary {
    color: var(--ink);
    font-weight: 800;
    font-family: "Rajdhani", "Manrope", sans-serif;
    font-size: 1.08rem;
    margin: 0;
}
.search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .75rem;
}
.search-row input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 68%, transparent);
    color: var(--ink);
    font: inherit;
    padding: .8rem 1rem;
}
.search-row input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 20%, transparent);
}
.discovery-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.discovery-dropdown {
    position: relative;
    min-width: 0;
}
.discovery-dropdown summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    min-height: 48px;
    padding: .7rem 1rem;
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 60%, transparent);
    cursor: pointer;
    list-style: none;
}
.discovery-dropdown summary::-webkit-details-marker { display: none; }
.discovery-dropdown summary::after {
    content: "";
    width: .55rem;
    height: .55rem;
    border-right: 2px solid var(--cyan);
    border-bottom: 2px solid var(--cyan);
    transform: rotate(45deg) translateY(-2px);
    transition: transform .18s ease;
    flex: 0 0 auto;
}
.discovery-dropdown[open] summary {
    border-color: color-mix(in srgb, var(--cyan) 55%, var(--panel-border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 12%, transparent);
}
.discovery-dropdown[open] summary::after {
    transform: rotate(225deg) translate(-2px, -1px);
}
.discovery-dropdown summary strong {
    margin-left: auto;
    min-width: 2rem;
    padding: .12rem .5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--cyan) 14%, transparent);
    color: var(--cyan);
    font-size: .82rem;
    line-height: 1.3;
    text-align: center;
}
.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}
.discovery-chip-list {
    max-height: min(280px, 46vh);
    margin-top: .75rem;
    padding: .85rem;
    overflow-y: auto;
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--bg) 72%, transparent);
}

.breadcrumbs {
    display: flex;
    gap: .55rem;
    align-items: center;
    flex-wrap: wrap;
    color: var(--ink-dim);
    font-size: .9rem;
    margin-bottom: 1.6rem;
}
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--cyan); }

.authority-strip { padding-top: 0; }
.authority-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.authority-card,
.conversion-card,
.author-box,
.authority-aside,
.professional-section {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.authority-card {
    padding: 1.4rem;
}
.authority-card h2,
.conversion-card h2,
.author-box h2,
.authority-aside h2,
.professional-section h2 {
    font-size: 1.35rem;
    margin-bottom: .45rem;
}
.authority-card p { margin: 0; }

.conversion-card {
    padding: clamp(1.4rem, 4vw, 2.2rem);
    max-width: 920px;
    margin: 0 auto;
}

.professional-page {
    padding: clamp(2rem, 6vw, 4.5rem) 24px;
}
.professional-hero {
    max-width: 860px;
    margin-bottom: 2rem;
}
.professional-hero .lead {
    color: var(--ink-soft);
    font-size: 1.18rem;
    max-width: 58ch;
}
.professional-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 1.5rem;
    align-items: start;
}
.professional-content {
    display: grid;
    gap: 1.25rem;
}
.professional-section {
    padding: clamp(1.25rem, 3vw, 1.8rem);
}
.professional-section p:last-child,
.authority-aside p:last-child,
.author-box p:last-child { margin-bottom: 0; }
.professional-list {
    display: grid;
    gap: .65rem;
    padding-left: 1.25rem;
    color: var(--ink-soft);
}
.professional-list li::marker { color: var(--cyan); }
.authority-aside {
    position: sticky;
    top: 92px;
    padding: 1.4rem;
}
.aside-actions,
.author-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.2rem;
}
.aside-photo {
    margin: 0 0 1.2rem;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--panel-border);
}
.aside-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
.aside-socials {
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--panel-border);
}
.about-page-content a { color: var(--cyan); }
.about-page-content h2:not(:first-child),
.about-page-content h3:not(:first-child) { margin-top: 1.4rem; }
.page-books {
    margin-top: 1rem;
}

/* ---------- Cards de post ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover {
    transform: translateY(-4px);
    border-color: rgba(21, 217, 255, 0.5);
    box-shadow: var(--shadow);
}
.card .cover {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(21,217,255,.12), rgba(123,108,255,.12));
    overflow: hidden;
}
.card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card .tag {
    align-self: flex-start;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--teal);
    font-weight: 700;
}
.card h3 { margin: 0; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--cyan); }
.card .excerpt { color: var(--ink-dim); font-size: .95rem; flex: 1; }
.card .meta { font-size: .82rem; color: var(--ink-dim); margin-top: .4rem; }

.featured-flag {
    position: absolute; top: 12px; left: 12px;
    background: rgba(0, 240, 181, 0.16);
    color: var(--teal);
    border: 1px solid rgba(0,240,181,.4);
    padding: .2rem .6rem; border-radius: 999px;
    font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700;
}
.card { position: relative; }

/* ---------- Libros ---------- */
.books { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.book {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 1.1rem;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 1.3rem;
}
.book-cover-link { display: block; align-self: start; }
.book .book-cover {
    width: 112px; height: 164px; border-radius: 0;
    background: transparent;
    display: flex; align-items: center; justify-content: center;
    color: #04121a; font-family: "Rajdhani"; font-weight: 700; text-align: center; padding: 0;
    overflow: hidden;
}
.book .book-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; display: block; }
.book .book-cover span {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--violet), var(--cyan));
    padding: .4rem;
}
.book h3 { margin-bottom: .3rem; }
.book .btn { margin-top: .55rem; }
.book-detail {
    max-width: 920px;
    margin: 0 auto;
}
.book-detail-hero {
    display: grid;
    grid-template-columns: minmax(180px, 230px) 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}
.book-detail-cover {
    margin: 0;
}
.book-detail-cover img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0;
}
.book-detail-copy h1 { margin-top: .35rem; }
.book-detail-summary { color: var(--ink-soft); font-size: 1.05rem; }
.book-detail-body {
    max-width: 720px;
    margin-top: 2.8rem;
    color: var(--ink-soft);
    font-size: 1.05rem;
    line-height: 1.85;
}
.book-detail-body p { margin: 0 0 1.2rem; }
@media (max-width: 680px) {
    .book-detail-hero { grid-template-columns: 1fr; }
    .book-detail-cover { max-width: 190px; }
}

/* ---------- Redes ---------- */
.socials { display: flex; flex-wrap: wrap; gap: .8rem; }
.social-chip {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .6rem 1.1rem; border-radius: 999px;
    background: var(--panel); border: 1px solid var(--panel-border);
    color: var(--ink); font-weight: 600; font-size: .95rem;
}
.social-chip:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- Fase 2 ---------- */
.phase2 {
    background: var(--panel);
    border: 1px dashed var(--panel-border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
}
.phase2-text {
    max-width: 760px;
    margin: 0 auto;
    text-align: left;
}
.phase2-content {
    max-width: 760px;
    margin: 0 auto;
}
.phase2-photo {
    float: left;
    width: min(280px, 42%);
    margin: 1rem 1.4rem .8rem 0;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--panel-border);
    box-shadow: 0 18px 50px rgba(0,0,0,.24);
}
.phase2-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.phase2-text p {
    margin: 1rem 0 0;
    white-space: normal;
}
.phase2-content::after {
    content: "";
    display: block;
    clear: both;
}
@media (max-width: 720px) {
    .phase2-photo {
        float: none;
        width: 100%;
        margin: 1rem auto 1.4rem;
    }
}

/* ---------- Artículo ---------- */
.article { max-width: 760px; margin: 0 auto; padding: clamp(2rem,6vw,4rem) 24px; }
.article-meta-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-top: .7rem;
}
.article .cover { border-radius: var(--radius); overflow: hidden; margin: 1.5rem 0; border: 1px solid var(--panel-border); }
.article .cover img { width: 100%; display: block; }
.article-body {
    font-size: 1.08rem;
    overflow-wrap: anywhere;
}
.article-body p { color: var(--ink); }
.article-body h2, .article-body h3 { color: var(--ink); margin-top: 1.6em; }
.article-body img { max-width: 100%; border-radius: 12px; margin: 1.2rem 0; }
.article-body a { text-decoration: underline; }
.article-body pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 1rem;
    background: color-mix(in srgb, var(--bg) 78%, transparent);
}
.article-body code {
    overflow-wrap: anywhere;
}
.article-body table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 1.4rem 0;
    border: 1px solid var(--panel-border);
    border-radius: 12px;
}
.article-body th,
.article-body td {
    min-width: 9rem;
    padding: .7rem .85rem;
    border: 1px solid var(--panel-border);
    color: var(--ink);
    vertical-align: top;
}
.article-body th {
    background: color-mix(in srgb, var(--cyan) 12%, transparent);
    font-weight: 800;
}
.article-body blockquote {
    border-left: 3px solid var(--cyan);
    margin: 1.2rem 0; padding: .4rem 1.2rem; color: var(--ink-soft);
    background: rgba(21,217,255,.05);
}
.article-body ul, .article-body ol { color: var(--ink); padding-left: 1.3rem; }
.article-discovery-block,
.related-posts {
    margin-top: 2.2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--panel-border);
}
.article-discovery-block h2,
.related-posts h2 {
    font-size: 1.45rem;
}
.source-list {
    display: grid;
    gap: .75rem;
    padding: 0;
    margin: .4rem 0 0;
    list-style: none;
}
.source-list li {
    display: grid;
    gap: .18rem;
    padding: .85rem 1rem;
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--panel) 82%, var(--bg));
}
.source-list span {
    color: var(--ink-dim);
    font-size: .86rem;
}
.compact-grid {
    grid-template-columns: 1fr;
}
.author-box {
    margin-top: 2.2rem;
    padding: clamp(1.25rem, 3vw, 1.8rem);
}
.article-share {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .35rem;
}
.share-button {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 42px;
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    color: var(--ink);
    font: inherit;
    font-weight: 800;
    padding: .55rem .9rem;
    cursor: pointer;
    transition: border-color .2s, color .2s, transform .15s, background .2s;
}
.share-button svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}
.share-button:hover,
.share-button[aria-expanded="true"] {
    transform: translateY(-2px);
    border-color: var(--cyan);
    color: var(--cyan);
}
.share-menu {
    position: absolute;
    top: calc(100% + .55rem);
    right: 0;
    z-index: 30;
    width: min(260px, calc(100vw - 2rem));
    padding: .55rem;
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--bg) 92%, var(--panel));
    box-shadow: var(--shadow);
}
.share-menu[hidden] { display: none; }
.share-menu a,
.share-menu button {
    display: flex;
    width: 100%;
    align-items: center;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    padding: .68rem .8rem;
    text-align: left;
    cursor: pointer;
}
.share-menu a:hover,
.share-menu button:hover {
    background: color-mix(in srgb, var(--cyan) 12%, transparent);
    color: var(--cyan);
}
.share-status {
    min-height: 1.1rem;
    margin: 0;
    color: var(--teal);
    font-size: .78rem;
    text-align: right;
}
.engagement-card {
    margin-top: 2.4rem;
    padding: clamp(1.3rem, 4vw, 2rem);
    border-radius: var(--radius);
    border: 1px solid var(--panel-border);
    background:
        radial-gradient(420px 180px at 100% 0%, color-mix(in srgb, var(--cyan) 15%, transparent), transparent 72%),
        var(--panel);
    box-shadow: var(--shadow);
}
.engagement-copy h2 { margin-bottom: .35rem; }
.engagement-copy p { margin-bottom: 1.2rem; }
.engagement-actions {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .9rem;
    align-items: center;
}
.like-form,
.subscribe-form { margin: 0; }
.like-button {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-height: 50px;
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    color: var(--ink);
    font: inherit;
    font-weight: 800;
    padding: .75rem 1rem;
    cursor: pointer;
    transition: border-color .2s, color .2s, transform .15s, background .2s;
}
.like-button:hover {
    transform: translateY(-2px);
    border-color: var(--teal);
    color: var(--teal);
}
.like-button.is-liked,
.like-button:disabled {
    cursor: default;
    border-color: color-mix(in srgb, var(--teal) 55%, var(--panel-border));
    color: var(--teal);
}
.like-button.is-liked:hover,
.like-button:disabled:hover { transform: none; }
.like-icon { font-size: 1.1rem; line-height: 1; }
.subscribe-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .7rem;
}
.subscribe-form input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 68%, transparent);
    color: var(--ink);
    font: inherit;
    padding: .8rem 1rem;
}
.subscribe-form input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 20%, transparent);
}
.privacy-first-layer {
    color: var(--ink-dim);
    font-size: .86rem;
    line-height: 1.55;
    margin: .1rem 0 0;
}
.privacy-first-layer strong {
    color: var(--ink-soft);
    font-weight: 800;
}
.privacy-first-layer a {
    color: var(--cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.engagement-actions > .privacy-first-layer {
    grid-column: 1 / -1;
    margin-top: -.15rem;
    min-width: 0;
    overflow-wrap: anywhere;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Paginación ---------- */
.pagination { display: flex; gap: .6rem; justify-content: center; margin-top: 2.5rem; }
.pagination a, .pagination span {
    padding: .5rem .9rem; border-radius: 8px;
    border: 1px solid var(--panel-border); color: var(--ink-soft);
}
.pagination a:hover { border-color: var(--cyan); color: var(--cyan); }
.pagination .current { background: var(--cyan); color: #04121a; border-color: var(--cyan); font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--panel-border);
    margin-top: 3rem;
    padding: 2.5rem 0;
    color: var(--ink-dim);
    font-size: .92rem;
}
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.legal-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.legal-links a { color: var(--ink-dim); }
.legal-links a:hover { color: var(--cyan); }
.legal-page { max-width: 820px; margin: 0 auto; padding: clamp(2rem,6vw,4rem) 0; }
.legal-page h1 { margin-bottom: 1.4rem; }
.legal-page h2 { margin-top: 1.8rem; color: var(--ink); }
.legal-page p, .legal-page li { color: var(--ink-soft); }
.legal-page ul { padding-left: 1.3rem; }
.legal-updated { margin-top: 2rem; font-size: .92rem; color: var(--ink-dim); }

/* ---------- Contacto ---------- */
.contact-page { max-width: 820px; margin: 0 auto; padding: clamp(2rem,6vw,4rem) 0; }
.contact-card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(1.4rem, 4vw, 2.2rem);
}
.contact-form { display: grid; gap: 1rem; margin-top: 1.4rem; }
.contact-form .btn { justify-self: start; }
.contact-field { display: grid; gap: .45rem; }
.contact-field label { color: var(--ink); font-weight: 700; }
.contact-field input,
.contact-field select,
.contact-field textarea {
    width: 100%;
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg) 68%, transparent);
    color: var(--ink);
    font: inherit;
    padding: .85rem 1rem;
}
.contact-field textarea { min-height: 170px; resize: vertical; }
.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 20%, transparent);
}
.contact-privacy-note {
    color: var(--ink-dim);
    font-size: .82rem;
    line-height: 1.55;
    margin: .1rem 0 0;
    max-width: 76ch;
    overflow-wrap: anywhere;
}
.contact-privacy-note a { color: var(--cyan); }
.contact-help { font-size: .9rem; color: var(--ink-dim); margin: 0; }
.contact-status {
    border-radius: 12px;
    padding: .9rem 1rem;
    margin: 1rem 0;
    border: 1px solid var(--panel-border);
    background: color-mix(in srgb, var(--panel) 82%, var(--bg));
}
.contact-status.success { border-color: color-mix(in srgb, var(--teal) 55%, var(--panel-border)); }
.contact-status.error { border-color: color-mix(in srgb, #ff6b6b 55%, var(--panel-border)); }
.contact-errors { color: var(--ink-soft); margin: 1rem 0; }
.contact-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Cookie Banner ---------- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--panel-border);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.25);
    padding: 1.25rem 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
}
.cookie-banner p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--header-ink);
    max-width: 760px;
}
.cookie-banner a {
    color: var(--cyan);
    text-decoration: underline;
}
.cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}
.cookie-actions .btn {
    padding: 0.6rem 1.15rem;
    font-size: 0.95rem;
}
.consent-state-granted { color: var(--teal); }
.consent-state-denied { color: #ff6b6b; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual {
        width: calc(100% - 48px);
        margin: 0 auto;
    }
    .engagement-actions,
    .subscribe-form { grid-template-columns: 1fr; }
    .search-row,
    .discovery-filters { grid-template-columns: 1fr; }
    .like-button,
    .search-row .btn,
    .subscribe-form .btn { justify-content: center; width: 100%; }
    nav.main-nav { gap: 1rem; }
    nav.main-nav a { font-size: .95rem; }
    .authority-grid,
    .professional-grid { grid-template-columns: 1fr; }
    .authority-aside { position: static; }
}
@media (max-width: 560px) {
    .brand { font-size: 1.2rem; }
    .site-header .wrap {
        height: auto;
        min-height: 68px;
        padding-top: .7rem;
        padding-bottom: .7rem;
        align-items: flex-start;
    }
    nav.main-nav {
        max-width: 66%;
        gap: .65rem;
    }
    nav.main-nav a:nth-child(n+5) { display: none; }
    .article-meta-row { flex-direction: column; align-items: stretch; }
    .article-share { align-items: stretch; }
    .share-button { justify-content: center; }
    .share-menu { left: 0; right: auto; width: 100%; }
    .share-status { text-align: center; }
    .hero { padding-top: 2rem; }
    .hero-visual {
        width: 100%;
        min-height: 270px;
    }
    .hero-terminal { padding: 1.15rem; }
    .terminal-bar { padding: .7rem .8rem; }
    .terminal-screen {
        height: calc(100% - 3.25rem);
        padding: 1.15rem .95rem;
        font-size: clamp(.84rem, 3.55vw, .96rem);
        line-height: 1.72;
    }
    .terminal-screen p { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    #neural-bg { display: none; }
    body::after {
        background: linear-gradient(180deg, var(--bg), var(--bg-2));
    }
}
