/* =======================================
   NAVBAR (Flotante y centrado en píldora)
======================================= */
#nav-placeholder {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9998;
    pointer-events: none; /* Deja interactuar con la página a los costados */
    padding-top: 0.75rem;
    display: flex;
    justify-content: center;
}
.menu-principal {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;

    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;

    width: max-content;
    max-width: 95vw;
    box-sizing: border-box;
    padding: 0.35rem 0.6rem;

    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    transition: background 0.25s ease, border-color 0.25s ease;
}

@media (max-width: 600px) {
    .menu-principal {
        top: 0;
        left: 0;
        transform: none;
        width: 100vw;
        max-width: 100vw;
        border-radius: 0;
        border-top: none;
        border-left: none;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 0.6rem 0.5rem;
        justify-content: space-around;
        background: var(--nav-bg);
    }
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.95rem;
    border-radius: 0px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-main);
    background-color: rgba(69, 56, 82, 0.08);
    text-decoration: none;
}

/* Estado Activo común */
.nav-link.active {
    font-weight: 700;
    border-radius: 3px;
}

/* Modo Oscuro (por defecto) */
.nav-link.active {
    color: #ffffff !important;
    background: rgb(0, 0, 0);
    border: 1px solid rgb(11, 1, 21);
    box-shadow: 0 0 14px rgba(1, 0, 2, 0.857), inset 0 0 8px rgba(168, 85, 247, 0.2);
    text-shadow: 0 0 8px rgba(13, 0, 26, 0.8);
}

/* Modo Claro: Fondo sólido violeta y texto blanco, o fondo lila con texto violeta legible */
[data-theme="light"] .nav-link.active {
    color: var(--accent) !important;
    background: rgba(126, 34, 206, 0.12);
    border: 1px solid rgba(126, 34, 206, 0.35);
    box-shadow: 0 2px 8px rgba(126, 34, 206, 0.15);
    text-shadow: none;
}

.btn-theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 32px;
    height: 32px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.25rem;
    transition: all 0.2s ease;
}

.btn-theme-toggle:hover {
    border-color: var(--accent);
    transform: scale(1.05);
}
/* =======================================
   FOOTER: Redes en fila horizontal
======================================= */
.redes-nav {
    display: flex;
    flex-direction: row;        /* En fila horizontal */
    flex-wrap: wrap;            /* Baja si no entra en pantallas muy chicas */
    align-items: center;
    gap: 1rem;               /* Separación entre cada botón */
    margin-top: 1rem;
    margin-bottom: 2.5rem;
}

.link-icono {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.link-icono:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);    /* Flota sutilmente hacia arriba */
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
    text-decoration: none;
}

.icono {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    padding-bottom: 3.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}


/* =====================================   CSS ESTILO PAGINA ACTIVAAAAA  =====================================*/
/* =======================================
   ESTADO ACTIVO NAVBAR (con Glow Neón)
======================================= */
.nav-link {
    position: relative;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.25s ease;
}

/* Cuando el link está activo */
.nav-link.active {
    color: #ffffff;
    font-weight: 700;
    background: rgba(168, 85, 247, 0.15); /* Fondo tenue violeta */
    border: 1px solid rgba(168, 85, 247, 0.4); /* Borde sutil */
    /* Resplandor galáctico neón */
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.35), 
                inset 0 0 8px rgba(168, 85, 247, 0.2);
    text-shadow: 0 0 8px rgba(168, 85, 247, 0.8);
}

/*================================= BADGES ESTILO TERMINAL ==================================*/
.badge-terminal {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background-color: rgba(168, 85, 247, 0.08);
    color: var(--accent);
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-right: 0.4rem;
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
    font-weight: 600;
}

.badge-terminal::before {
    content: "[";
    color: var(--text-muted);
}

.badge-terminal::after {
    content: "]";
    color: var(--text-muted);
}
/* =======================================
   SHARED CARD COMPONENT (Used in index, portfolio, taller)
======================================= */
.card-proyecto, .card-reparacion, .card-bento {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-proyecto:hover, .card-reparacion:hover {
    box-shadow: 0 8px 24px rgba(126, 34, 206, 0.12);
}

/* Contenedor del link con la imagen */
.link-imagen-proyecto {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 6px;
    overflow: hidden; /* Corta el zoom para que no se salga de los bordes */
    margin-top: 0.75rem;
    border: 1px solid var(--border-color);
    background-color: #0b0f14;
}

/* La imagen base con transición */
.img-proyecto {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* El cartelito que aparece arriba */
.overlay-proyecto {
    position: absolute;
    inset: 0; /* Ocupa todo el alto y ancho */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(15, 20, 28, 0.75); /* Fondo oscuro semitransparente */
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0; /* Oculto por defecto */
    transition: opacity 0.3s ease;
}

/* EFECTO HOVER: al pasar el cursor por el link */
.link-imagen-proyecto:hover .img-proyecto {
    transform: scale(1.05); /* Zoom sutil */
    filter: brightness(0.8);
}

.link-imagen-proyecto:hover .overlay-proyecto {
    opacity: 1; /* Muestra el texto */
}
