body {
    margin: 0;
    font-family: 'Nunito', sans-serif; /* Asegúrate de que esta fuente esté enlazada en tu HTML */
    background-color: #121212;
    color: #fff;
    scroll-behavior: smooth;
    text-align: center;
}

/* --- Barra de navegación --- */
header.navbar {
    position: fixed;
    background: rgba(18,18,18,0.95);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 85px;
    padding: 5px 5%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
}

#main-title {
    font-size: 6rem;
    text-align: center;
    margin-top: 50px;
    color: white;
    font-weight: bold;
    word-wrap: break-word;
}

@media (max-width: 1024px) {
    #main-title {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
    #main-title {
        font-size: 2.8rem;
    }
}

@media (max-width: 480px) {
    #main-title {
        font-size: 2rem;
    }
}


.navbar .logo {
    font-weight: bold;
    font-size: 1.4em;
    color: #81b8b2;
    cursor: pointer;
}

.navbar nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.navbar nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px;
    justify-content: flex-end;
    align-items: center;
}

.navbar nav ul li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar nav ul li a {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    transition: color 0.3s, transform 0.3s;
    cursor: pointer;
}

.navbar nav ul li a:hover {
    color: #81b8b2;
    transform: scale(1.05);
    cursor: pointer;
}

/* 🔧 Arreglo para que los enlaces del navbar sean clickeables */
nav {
  position: relative;
  z-index: 1000;
}

#nav-links a {
  pointer-events: auto;
  position: relative;
  z-index: 1001;
}

header {
  position: relative;
  z-index: 1002;
}

/* Si tienes un overlay o menú móvil abierto, asegúrate de esto: */
.menu-toggle {
  position: relative;
  z-index: 1100;
}


/* Hamburger icon */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

.hamburger div {
    width: 28px;
    height: 3px;
    background-color: white;
    margin: 4px 0;
    transition: 0.4s;
}

/* --- Responsive navbar (móviles) --- */
@media (max-width: 768px) {
    .navbar {
        flex-direction: row;
        padding: 10px 5%;
    }

    .navbar nav {
        flex-grow: 1;
        justify-content: flex-end;
        position: static;
    }

    .navbar nav ul {
        flex-direction: column;
        align-items: center;
        max-height: 0;
        overflow: hidden;
        background-color: #1c1c1c;
        width: 100%;
        position: absolute;
        top: 85px;
        left: 0;
        padding: 0;
        margin: 0;
        transition: max-height 0.5s ease-out, padding 0.5s ease-out;
        z-index: 999;
    }

    .navbar nav ul.show {
        max-height: 600px;
        padding: 10px 0;
    }

    .navbar nav ul li {
        width: 90%;
        text-align: center;
        padding: 8px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .navbar nav ul li:last-child {
        border-bottom: none;
    }

    .navbar nav ul li a {
        display: block;
        width: 100%;
        padding: 10px 0;
    }

    .hamburger {
        display: flex;
    }
}

/* --- Sección Hero (Presentación Personal) --- */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    text-align: center;
    background-color: #121212;
}

.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.5;
    filter: brightness(0.6);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: white;
    padding: 0 20px;
    max-width: 800px;
    margin-top: 85px;
}

.hero h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.2em;
    line-height: 1.5;
    margin-bottom: 20px;
}

.hero img {
    border-radius: 50%;
    margin-top: 20px;
    width: 200px;
    height: 200px;
    object-fit: cover;
    border: 3px solid #81b8b2;
}

/* --- Animaciones de scroll para todas las secciones --- */
section {
    padding: 100px 20px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Ajustes generales para títulos de sección (h2) --- */
section h2 {
    font-size: 2.8em; /* Tamaño ajustado para pantallas grandes */
    margin-bottom: 40px;
    color: #81b8b2;
    text-align: center;
}

/* --- Sección Sobre Mí --- */
.about-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    flex-wrap: wrap;
}

.about-text {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    text-align: justify;
}

.about-image {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* --- Tarjeta Uiverse agrandada y adaptada --- */
.card {
    width: 350px;
    height: 450px;
    background: #171717;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0px 0px 3px 1px #00000088;
    cursor: pointer;
}

.card .content {
    border-radius: 5px;
    background: #171717;
    width: 346px;
    height: 446px;
    z-index: 1;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.card .content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}


/* Efectos originales */
.content::before {
    opacity: 0;
    transition: opacity 300ms;
    content: " ";
    display: block;
    background: white;
    width: 5px;
    height: 50px;
    position: absolute;
    filter: blur(50px);
    overflow: hidden;
}

.card:hover .content::before {
    opacity: 1;
}

.card::before {
    opacity: 0;
    content: " ";
    position: absolute;
    display: block;
    width: 80px;
    height: 360px;
    background: linear-gradient(#ff2288, #387ef0);
    transition: opacity 300ms;
    animation: rotation_9018 8000ms infinite linear;
    animation-play-state: paused;
}

.card:hover::before {
    opacity: 1;
    animation-play-state: running;
}

.card::after {
    position: absolute;
    content: " ";
    display: block;
    width: 350px;
    height: 460px;
    background: #17171733;
    backdrop-filter: blur(50px);
}

@keyframes rotation_9018 {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* --- Media Query para la sección Sobre Mí (en pantallas grandes) --- */
@media (min-width: 769px) {
    .about-content {
        flex-direction: row;
        justify-content: space-between;
    }

    .about-text {
        order: 1;
        padding-right: 40px;
    }

    .about-image {
        order: 2;
    }
}

/* --- Ajuste para móviles en la sección Sobre Mí --- */
@media (max-width: 768px) {
    .about-text {
        padding-right: 0;
    }
    .about-text h2 {
        text-align: center;
    }
    .about-text p {
        text-align: left;
    }
}

/* --- Carrusel de programas --- */
.software-carousel {
    overflow: hidden;
    position: relative;
    padding: 120px;
}

.carousel-track {
    display: flex;
    animation: scroll 30s linear infinite;
    white-space: nowrap;
    width: fit-content;
    justify-content: center;
    align-items: center;
}

.carousel-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 60px;
    flex-shrink: 0;
}

.carousel-item img {
    max-height: 40px; /* Tamaño de logos de programas */
    /* Los logos blancos originales se vuelven negros y atenuados */
    filter: grayscale(100%) brightness(0.7) invert(100%);
    transition: filter 0.3s ease;
}

.carousel-item img:hover {
    /* Deshace la inversión y aplica el color #81b8b2 */
    filter:
        invert(100%)         /* Desinvierte para volver al blanco original */
        grayscale(0%)          /* Quita la escala de grises */
        sepia(100%)            /* Aplica un filtro sepia para un tono cálido */
        hue-rotate(140deg)     /* Rota el tono para acercarse al azul/verde de #81b8b2 */
        saturate(200%);        /* Aumenta la saturación */
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Clientes / logos --- */
.clients {
    padding: 80px 20px;
    background-color: #1a1a1a; /* Fondo igual que la sección "Sobre Mí" */
}
.client-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    filter: invert(100%);
    /* ELIMINADO: filter que estaba aquí, debe ir en las imágenes individuales */
}

/* Estilo para los enlaces de los logos de clientes */
.client-logos a {
    text-decoration: none; /* Elimina el subrayado */
    display: inline-block; /* Permite aplicar transformaciones y espaciado si es necesario */
}

.clients img {
    height: 80px; /* Altura fija para los logos, el ancho se ajusta automáticamente */
    width: auto; /* Ancho automático para mantener la proporción */
    filter: grayscale(100%); /* Efecto blanco y negro por defecto */
    transition: filter 0.3s, transform 0.3s;
}

.clients img:hover {
    filter: grayscale(0%); /* Color original al pasar el mouse */
    transform: scale(1.05);
}

/* --- CTA por Categoría (Tarjetas) --- */
.cta-categories {
    padding: 80px 20px;
}
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px 40px;
    justify-items: center;
    padding: 20px 0;
    margin-top: 40px;
}

.category-card {
    background: #1f1f1f;
    padding: 30px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, border 0.3s;
    text-align: center;
    width: 100%;
    max-width: 300px;
    box-sizing: border-box;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ESTILO PARA LOS ÍCONOS DE GOOGLE */
.category-card .material-symbols-outlined {
    font-size: 60px; /* Tamaño del ícono */
    color: #81b8b2; /* Color de tu marca para los íconos */
    margin-bottom: 10px; /* Margen inferior para separar del título */
    line-height: 1; /* Elimina espacio extra de línea */
}

.category-card:hover {
    transform: translateY(-10px);
    background: #2a2a2a;
    border: 1px solid #81b8b2;
    box-shadow: 0 0 10px rgba(129,184,178,0.2);
}

/* --- Contacto --- */
.contact {
    padding: 80px 20px;
    background-color: #1a1a1a;
}
.contact p {
    margin: 10px 0;
    font-size: 1.1em;
}
.contact a {
    color: #81b8b2;
    margin: 0 10px;
    text-decoration: none;
}

.contact a:hover {
    text-decoration: underline;
}

/* --- Ajustes Responsive Generales --- */
@media (max-width: 768px) {
    section {
        padding: 60px 15px;
    }

    section h2 {
        font-size: 1.8em; /* Tamaño de títulos de sección más pequeño para móviles */
    }

    .hero h1 {
        font-size: 2em;
    }

    .hero p {
        font-size: 1em;
    }

    .hero img {
        width: 150px;
        height: 150px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .software-carousel .carousel-item {
        margin: 0 30px;
    }
    .software-carousel .carousel-item img {
        max-height: 45px;
    }
    .carousel-track {
        animation: scroll 20s linear infinite;
    }
}

/* --- Blur animation tipo Reactbits.dev adaptada a Vanilla JS --- */
h2.blur-text span {
    display: inline-block;
    filter: blur(10px);
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
    will-change: transform, filter, opacity;
}

h2.blur-text.visible span {
    filter: blur(0);
    opacity: 1;
    transform: translateY(0);
}

/*RUIDO*/

.noise-overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

/* Fondo oscuro y blur cuando se activa el lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 20px #7bafaa;
}

.close-lightbox {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.close-lightbox:hover {
  color: #bbb;
}



