/**
 * Convención de iconos (Lucide) — reemplazo de emojis en <h3> de tarjetas.
 *
 * En vez de anteponer un emoji (ej. "📊 Pilar 1: ...") al texto de un <h3>,
 * usar un icono SVG real de Lucide así:
 *   <h3><i data-lucide="bar-chart-3" class="card-icon"></i> Pilar 1: ...</h3>
 *
 * Requisitos para que funcione:
 *   1) Cargar el script de Lucide (versión pineada, no @latest) antes de js/main.js:
 *      <script src="https://unpkg.com/lucide@0.469.0/dist/umd/lucide.js"></script>
 *   2) js/main.js llama a lucide.createIcons() en DOMContentLoaded, lo cual
 *      convierte cada <i data-lucide="..."> en un <svg> real.
 *   3) El estilo visual del icono (tamaño, color, alineación) lo controla la
 *      clase .card-icon definida más abajo en este archivo.
 *
 * NOTA: el reemplazo real de los emojis dentro de cada <h3> es tarea de copy/
 * contenido y se hace en un paso posterior — este bloque solo documenta la
 * convención para que sea consistente en toda la migración.
 */

:root {
    --bg-0: #050505;
    --bg-1: #0d1014;
    --bg-2: #151a22;
    --line: #262d38;
    --ink-0: #f2f5f8;
    --ink-1: #a9b3c4;
    --accent: #22d3ee;
    --accent-2: #84cc16;
    --font-display: "Space Grotesk", sans-serif;
    --font-code: "JetBrains Mono", monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.site-shell {
    margin: 0;
    min-height: 100vh;
    color: var(--ink-0);
    background:
        radial-gradient(circle at 12% 18%, rgba(34, 211, 238, 0.14) 0, transparent 36%),
        radial-gradient(circle at 88% 0%, rgba(132, 204, 22, 0.16) 0, transparent 32%),
        linear-gradient(150deg, #030303 0%, #0c1017 45%, #080a0f 100%);
    font-family: var(--font-display);
    line-height: 1.45;
    overflow-x: hidden;
}

/* ============================================
   DATA TABLE — tabla de datos elegante
   (tarjetas grandes evitadas a propósito para
   mostrar cifras/comparativas: ver DESIGN.md)
   ============================================ */

.data-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin: 1.2rem 0 1.6rem;
    background: var(--bg-1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 560px;
}

.data-table caption {
    text-align: left;
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--ink-1);
    padding: 0.6rem 0.9rem 0;
}

.data-table th {
    text-align: left;
    font-family: var(--font-code);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #081015;
    background: var(--accent);
    padding: 0.65rem 0.9rem;
    white-space: nowrap;
}

.data-table td {
    padding: 0.6rem 0.9rem;
    border-top: 1px solid var(--line);
    color: var(--ink-0);
    vertical-align: top;
}

.data-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.data-table td.num,
.data-table th.num {
    font-family: var(--font-code);
    text-align: right;
    white-space: nowrap;
}

.data-table tfoot td {
    border-top: 1px solid var(--accent);
    font-weight: 600;
    color: var(--accent);
}

.noise-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.08;
    background-image: radial-gradient(rgba(255, 255, 255, 0.85) 0.45px, transparent 0.45px);
    background-size: 4px 4px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid rgba(132, 148, 171, 0.2);
    backdrop-filter: blur(8px);
    background: rgba(6, 10, 14, 0.7);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
}

.brand {
    font-family: var(--font-code);
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink-0);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.top-nav a {
    color: var(--ink-1);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    transition: color 0.25s ease;
}

.top-nav a:hover {
    color: var(--ink-0);
}

.pill-link {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.32rem 0.72rem;
}

.layout-stack {
    position: relative;
    z-index: 2;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-top: 1.2rem;
}

/* Hero de una sola columna (index.html: el terminal se movió a su propia
   sección de ancho completo al fondo de la página) */
.hero-grid-single,
#home .hero-grid-single {
    grid-template-columns: 1fr !important;
}

.panel {
    background: linear-gradient(165deg, rgba(20, 25, 34, 0.9), rgba(10, 12, 18, 0.95));
    border: 1px solid rgba(56, 68, 84, 0.95);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.38);
}

.panel-lead h1 {
    margin: 0.65rem 0;
    font-size: clamp(1.5rem, 2.8vw, 2.45rem);
    line-height: 1.15;
}

.panel-lead p {
    margin: 0;
    color: var(--ink-1);
    max-width: 58ch;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(34, 211, 238, 0.45);
    background: rgba(34, 211, 238, 0.12);
    border-radius: 999px;
    padding: 0.28rem 0.72rem;
    font-size: 0.74rem;
    font-family: var(--font-code);
}

.cta-row {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn-solid,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    font-family: var(--font-code);
    font-size: 0.82rem;
    line-height: 1.4;
    border-radius: 10px;
    padding: 0.58rem 0.9rem;
    text-wrap: pretty;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-solid {
    color: #081015;
    background: var(--accent);
    border: 1px solid var(--accent);
}

.btn-ghost {
    color: var(--ink-0);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.btn-solid:hover,
.btn-ghost:hover {
    transform: translateY(-1px);
}

.panel-terminal {
    font-family: var(--font-code);
    padding: 0;
    overflow: hidden;
}

/* Elemento a 100% de ancho de página, sin importar el max-width de .container
   (rompe el padding del padre siempre que el padre no tenga overflow:hidden) */
.full-bleed {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Banner de nodos/topología a todo lo ancho, arriba de la página */
#hero-visual-banner {
    height: 340px;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 0%, rgba(34, 211, 238, 0.08), transparent 65%), var(--bg-0);
    border-bottom: 1px solid var(--line);
}

#network-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

@media (max-width: 640px) {
    #hero-visual-banner {
        height: 240px;
    }
}

/* Texto superpuesto al banner: nombre tecleado + lema, abajo a la izquierda */
.hero-banner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    text-align: left;
    pointer-events: none;
    padding: 1.5rem;
    z-index: 2;
}

.hero-banner-title {
    font-family: var(--font-code);
    font-weight: 700;
    font-size: clamp(2.4rem, 9vw, 5.5rem);
    line-height: 1;
    margin: 0;
    color: rgba(242, 245, 248, 0.55);
    text-shadow: 0 0 24px rgba(34, 211, 238, 0.35), 0 0 60px rgba(34, 211, 238, 0.15);
    letter-spacing: -0.02em;
}

.hero-banner-cursor {
    display: inline-block;
    color: rgba(34, 211, 238, 0.7);
    animation: blink 0.8s steps(1, end) infinite;
}

.hero-banner-cursor[hidden] {
    display: none;
}

.hero-banner-tagline {
    margin: 0.6rem 0 0 0;
    font-family: var(--font-code);
    font-size: clamp(0.85rem, 2vw, 1.15rem);
    color: rgba(169, 179, 196, 0.7);
    min-height: 1.4em;
}

/* El texto del hero ahora ocupa el ancho completo, debajo del banner */
.panel-lead-full {
    max-width: none;
}

.panel-lead-full p {
    max-width: 72ch;
}

.terminal-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    border-bottom: 1px solid var(--line);
    background: #0a0d12;
    padding: 0.62rem 0.8rem;
}

.terminal-head span {
    width: 0.52rem;
    height: 0.52rem;
    border-radius: 50%;
    background: #243244;
}

.terminal-head p {
    margin: 0 0 0 auto;
    font-size: 0.72rem;
    color: #91a0b4;
}

.terminal-body {
    padding: 0.8rem;
    font-size: 0.8rem;
}

.terminal-body p {
    margin: 0.3rem 0;
    color: #afbacb;
}

.terminal-body strong {
    color: var(--accent);
}

.terminal-body .ok {
    color: #9de272;
}

.terminal-body .warn {
    color: #fbbf24;
}

.cursor::after {
    content: "_";
    margin-left: 0.1rem;
    animation: blink 0.8s steps(1, end) infinite;
}

.compact-section {
    padding: 1.5rem 0;
}

.section-title {
    margin: 0 0 1.2rem;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 600;
    color: var(--ink-0);
}

.service-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.compact-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 19, 27, 0.88);
    padding: 1.2rem;
}

.compact-card h2,
.compact-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.6rem 0;
    color: var(--accent);
    transition: all 0.3s ease;
}

.compact-card:hover h2,
.compact-card:hover h3 {
    color: #5eead4;
    text-shadow: 0 0 10px rgba(94, 234, 212, 0.6);
}

.compact-card p {
    margin: 0 0 0.5rem 0;
    color: var(--ink-1);
    text-wrap: pretty;
}

.compact-card {
    transition: all 0.3s ease;
    cursor: default;
}

.compact-card:hover {
    border-color: var(--accent);
    background: rgba(15, 19, 27, 0.95);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.2), inset 0 0 20px rgba(34, 211, 238, 0.05);
}

/* Efecto neon on hover */
.neon-hover {
    transition: all 0.3s ease;
    cursor: pointer;
}

.neon-hover:hover {
    color: var(--accent);
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.6), 0 0 20px rgba(34, 211, 238, 0.4);
    transform: scale(1.05);
}

/* Bullet icons para listas */
ul, ol {
    list-style: none;
    padding-left: 1.5rem;
}

ul li, ol li {
    margin-bottom: 0.4rem;
    transition: all 0.25s ease;
    position: relative;
    padding-left: 0.5rem;
}

ul li::before {
    content: "\25b8";
    color: var(--accent);
    position: absolute;
    left: -1.2rem;
    font-weight: bold;
    font-size: 1.1em;
}

ol li::before {
    content: counter(list-item, decimal);
    color: var(--accent);
    position: absolute;
    left: -1.2rem;
    font-weight: 600;
    font-size: 0.9em;
}

.compact-card ul li,
.compact-card ol li,
.split-card ul li,
.split-card ol li {
    transition: all 0.25s ease;
}

.compact-card ul li:hover,
.compact-card ol li:hover,
.split-card ul li:hover,
.split-card ol li:hover {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.4);
    transform: translateX(4px);
}

/* Hover para links */
a {
    transition: all 0.25s ease;
}

.compact-card a,
.split-card a {
    position: relative;
}

.compact-card a:hover,
.split-card a:hover {
    color: #5eead4;
    text-shadow: 0 0 10px rgba(94, 234, 212, 0.5);
}

.split-card > div {
    text-align: justify;
}

.split-card h2,
.split-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    transition: all 0.3s ease;
}

.split-card:hover h2,
.split-card:hover h3 {
    color: #5eead4;
    text-shadow: 0 0 10px rgba(94, 234, 212, 0.6);
}

.split-card h2 {
    text-align: left;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    transition: all 0.3s ease;
}

.split-card > div p {
    text-align: justify;
    line-height: 1.6;
}

.split-card {
    transition: all 0.3s ease;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.split-card:hover {
    border-color: var(--accent);
    background: rgba(15, 19, 27, 0.95);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.2), inset 0 0 20px rgba(34, 211, 238, 0.05);
}

.signal-list {
    padding-left: 1.1rem;
    color: var(--ink-1);
}

.signal-list li {
    margin-bottom: 0.35rem;
}

.contact-box > div p {
    text-align: justify;
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.contact-box > div h2 {
    text-align: left;
    margin-bottom: 1rem;
}

.site-footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--line);
    margin-top: 1.2rem;
    padding: 0.9rem 0;
    color: #8492a5;
    font-size: 0.8rem;
}

.launch-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 0.75rem;
}

.contact-box {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: 1fr;
    align-items: start;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55);
}

.contact-box .cta-row {
    margin-top: 0.5rem;
}

@media (max-width: 767px) {
    .contact-box .btn-solid {
        align-self: start;
        width: auto;
    }
}

.launch-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid #263142;
    background: #090f17;
}

.launch-modal-head p {
    margin: 0;
    font-family: var(--font-code);
    font-size: 0.78rem;
    color: #95aac8;
}

.launch-modal-close {
    border: 1px solid #2c3c52;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink-0);
    font-family: var(--font-code);
    font-size: 0.72rem;
    padding: 0.3rem 0.72rem;
    cursor: pointer;
}

.launch-modal-frame {
    width: 100%;
    height: calc(100% - 45px);
    border: 0;
    display: block;
}

.animated-in {
    animation: riseIn 0.6s ease-out both;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Launch page */
.launch-body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
    color: var(--ink-0);
    background:
        radial-gradient(circle at 20% 30%, rgba(34, 211, 238, 0.15), transparent 32%),
        radial-gradient(circle at 80% 70%, rgba(132, 204, 22, 0.14), transparent 36%),
        #030406;
    font-family: var(--font-code);
}

.launch-shell {
    width: min(100%, 760px);
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(9, 12, 18, 0.9);
    padding: 1rem;
}

.launch-terminal-head {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    border: 1px solid #213045;
    border-radius: 10px;
    background: rgba(7, 10, 16, 0.95);
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.8rem;
}

.launch-terminal-head span {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #2d415b;
}

.launch-terminal-head p {
    margin: 0 0 0 auto;
    color: #95aac8;
    font-size: 0.72rem;
}

.launch-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.launch-head h1 {
    margin: 0;
    font-size: clamp(1rem, 3vw, 1.4rem);
}

.launch-progress {
    border: 1px solid #213045;
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
    margin-bottom: 0.8rem;
    background: rgba(13, 19, 29, 0.7);
}

.launch-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    margin-bottom: 0.45rem;
    color: #96a8bf;
    font-size: 0.76rem;
}

.launch-progress-track {
    width: 100%;
    height: 0.5rem;
    border-radius: 999px;
    background: #0a121d;
    border: 1px solid #1d2c40;
    overflow: hidden;
}

.launch-progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #5eead4, var(--accent-2));
    transition: width 0.45s ease;
}

.launch-feed {
    display: grid;
    gap: 0.48rem;
    max-height: 52vh;
    overflow: auto;
    padding-right: 0.25rem;
}

.launch-line {
    opacity: 0;
    transform: translateY(8px);
    border: 1px solid #223045;
    background: rgba(16, 24, 35, 0.78);
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
    color: #9cc3ff;
}

.launch-line .time {
    color: #73b7ff;
    margin-right: 0.45rem;
}

.launch-line.is-visible {
    animation: lineIn 0.45s ease forwards;
}

.launch-line.is-final {
    border-color: rgba(132, 204, 22, 0.45);
    color: #b9f785;
}

.launch-actions {
    margin-top: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.launch-actions a {
    text-decoration: none;
}

@keyframes lineIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer Styles */
.footer-section {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(9, 12, 18, 0.3), rgba(5, 5, 5, 0.8));
    padding: 2rem 0;
    margin-top: 2.5rem;
    position: relative;
    z-index: 2;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(56, 68, 84, 0.5);
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.brand-footer {
    font-family: var(--font-code);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink-0);
    margin: 0;
    letter-spacing: 0.02em;
}

.footer-contact,
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-contact p,
.footer-links p {
    text-align: justify;
    line-height: 1.6;
}
1.5rem 0;
    margin-top: 2rem;
    position: relative;
    z-index: 2;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(56, 68, 84, 0.5);
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.brand-footer {
    font-family: var(--font-code);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink-0);
    margin: 0;
    letter-spacing: 0.02em;
}

.footer-contact,
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-contact a,
.footer-links a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contact a:hover,
.footer-links a:hover {
    color: #5eead4;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-bottom {
    text-align: center;
    color: #6b7a8f;
    font-size: 0.75rem;
}

#home .panel-lead p {
    text-align: justify;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

#home .panel-lead .chip {
    border: 1px solid rgba(34, 211, 238, 0.6);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(34, 211, 238, 0.08));
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.1);
}

#home .btn-solid {
    background: linear-gradient(135deg, var(--accent), #5eead4);
    border: 1px solid rgba(34, 211, 238, 0.5);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.2);
    font-weight: 600;
}

#home .btn-solid:hover {
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.35);
    transform: translateY(-2px);
}

#home .btn-ghost {
    border: 1.5px solid var(--accent);
    background: rgba(34, 211, 238, 0.06);
    color: var(--accent);
}

#home .btn-ghost:hover {
    background: rgba(34, 211, 238, 0.12);
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.15);
}

#home .panel-terminal {
    padding: 1.8rem;
}

#home .panel-lead {
    background: linear-gradient(150deg, rgba(34, 211, 238, 0.06), rgba(20, 25, 34, 0.95));
    border: 1.5px solid rgba(34, 211, 238, 0.35);
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.08), 0 14px 42px rgba(0, 0, 0, 0.38);
    padding: 1.4rem;
}

#home .panel-lead h1 {
    font-size: clamp(2rem, 3.2vw, 2.8rem);
    background: linear-gradient(135deg, var(--ink-0), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -0.015em;
}

@media (min-width: 768px) {
    #home .hero-grid {
        padding-top: 2.5rem;
    }

    #home .panel-lead {
        padding: 2.5rem;
    }

    .split-card {
        grid-template-columns: 1.05fr 0.95fr;
        gap: 1.5rem;
    }

    .service-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.2rem;
    }

    .project-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }

    .contact-box {
        grid-template-columns: 1.1fr 0.9fr;
        align-items: center;
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    #home .hero-grid {
        grid-template-columns: 1fr 1fr;
    }

    #home .panel-lead {
        padding: 2.5rem;
    }

    .split-card {
        grid-template-columns: 1.05fr 0.95fr;
        gap: 1.5rem;
    }

    .service-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }

    .project-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }

    .contact-box {
        grid-template-columns: 1.1fr 0.9fr;
        align-items: center;
        gap: 1.5rem;
    }
}

/* ============================================
   CHATBOT WIDGET
   ============================================ */

.chatbot-widget {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 60;
}

.chatbot-toggle {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #081015;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(34, 211, 238, 0.25);
    transition: transform 0.2s ease;
}

.chatbot-toggle:hover {
    transform: translateY(-2px);
}

.chatbot-panel[hidden] {
    display: none;
}

.chatbot-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.75rem);
    width: min(320px, 86vw);
    max-height: min(420px, 70vh);
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    z-index: 61;
}

.chatbot-head {
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--ink-1);
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-2);
}

.chatbot-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent-2);
    display: inline-block;
}

.chatbot-body {
    padding: 0.9rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.chatbot-msg {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--ink-0);
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    white-space: pre-line;
}

.chatbot-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.3rem;
}

.chatbot-option-btn {
    font-family: var(--font-code);
    font-size: 0.78rem;
    text-align: left;
    color: var(--accent);
    background: rgba(34, 211, 238, 0.06);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.chatbot-option-btn:hover {
    border-color: var(--accent);
    background: rgba(34, 211, 238, 0.12);
}

@media (max-width: 480px) {
    .chatbot-panel {
        width: 90vw;
        right: -0.5rem;
    }

    .site-footer {
        padding-bottom: 4.5rem;
    }
}

.chatbot-msg-user {
    align-self: flex-end;
    background: rgba(34, 211, 238, 0.12);
    border-color: var(--accent);
    color: var(--ink-0);
}

.chatbot-input-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    border-top: 1px solid var(--line);
    background: var(--bg-2);
}

.chatbot-input {
    flex: 1;
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: var(--ink-0);
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
}

.chatbot-input:focus {
    outline: none;
    border-color: var(--accent);
}

.chatbot-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #081015;
    cursor: pointer;
    flex-shrink: 0;
}

/* Icono Lucide dentro de <h3> de tarjetas (ver convención documentada arriba) */
.card-icon {
    width: 1.1em;
    height: 1.1em;
    display: inline-block;
    vertical-align: -0.15em;
    margin-right: 0.35em;
    color: var(--accent);
    stroke-width: 2;
}

/* Tarjeta destacada: oferta de entrada de bajo riesgo (servicios.html) */
.compact-card-highlight {
    border-color: var(--accent);
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.08), transparent 60%);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.15);
}

/* Foto de perfil (skills.html) */
.profile-photo {
    border: 1px solid var(--line);
    background: var(--bg-2);
}

/* Header de "Sobre mí": foto circular a la izquierda + texto a la derecha */
.profile-header {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.profile-header-photo {
    flex-shrink: 0;
    margin: 0;
}

.profile-header-text {
    flex: 1;
    min-width: 220px;
}

.profile-below-row {
    margin-top: 1.25rem;
}

@media (max-width: 480px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Accesibilidad: enlace "saltar al contenido", oculto hasta recibir foco */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: var(--bg-1);
    color: var(--ink-0);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--accent);
    font-family: var(--font-code);
    font-size: 0.85rem;
    text-decoration: none;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

/* Accesibilidad: estado de foco visible en toda la página */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
