/* Estilos generales */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #000000;
    color: #333;
}

/* Fondo dinámico de estrellas */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(assets/images/stardust.png) repeat;
    opacity: 0.5;
    z-index: -1;
    animation: moveStars 100s linear infinite;
}

@keyframes moveStars {
    from {
        background-position: 0 0;
    }
    to {
        background-position: -10000px 5000px;
    }
}

/* Navbar */
.navbar {
    background-color: #333;
    color: white;
    padding: 40px 20px;  /* Reducido el padding para acercar al inicio */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo con animación */
#name-logo {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    cursor: default;
    display: flex;
    gap: 3px;
}

#name-logo span {
    display: inline-block;
    transition: color 0.3s ease, transform 0.3s ease;
}

#name-logo span:hover {
    color: #66b3ff;
    transform: translateY(-5px);
}

/* Menú de Navegación */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    padding-right: 20px;
    white-space: nowrap;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.nav-links li {
    white-space: nowrap;
}

.nav-links li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-links li a:hover {
    color: #00aaff;
}

/* Botón de Cambio de Idioma */
.language-switcher {
    position: relative;
    cursor: pointer;
}

.language-switcher img {
    width: 30px;
    height: 20px;
    border: 1px solid white;
    border-radius: 4px;
    transition: transform 0.3s ease;
    display: block;
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #333;
    border: 1px solid white;
    padding: 5px 0;
    border-radius: 4px;
    z-index: 1000;
    flex-direction: column;
}

.language-switcher:hover .dropdown,
.dropdown:hover {
    display: flex;
    align-items: center;
}

.dropdown .flag {
    width: 30px;
    height: 20px;
    margin: 2px 0;
    cursor: pointer;
    transition: transform 0.3s ease;
    border: 1px solid white;
    border-radius: 4px;
}

.dropdown .flag:hover {
    transform: scale(1.1);
}

/* Sección de Inicio */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: transparent;
    color: white;
    padding: 5px 10px;  /* Reducido el padding para acercar al navbar */
    min-height: 40vh;  /* Reducción de altura mínima */
    margin: 0;
}

.hero-content {
    max-width: 600px;
    margin: 0;
}

/* Texto Estático */
.static-text {
    font-size: 18px;
    margin: 0;
    color: #ccc;
}

/* Nombre Principal */
.dynamic-name {
    font-size: 48px;
    font-weight: bold;
    background: linear-gradient(90deg, #8a2be2, #00bfff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 5px 0;
}

/* Texto Dinámico */
.dynamic-text {
    font-size: 24px;
    font-weight: 500;
    color: #f4f4f4;
    margin: 5px 0;
    transition: opacity 0.5s ease-in-out;
}

/* Iconos de Redes Sociales */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

/* Contenedor de cada icono */
.icon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

/* Iconos */
.icon-container img {
    width: 50px;
    height: 50px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.9;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
}

.icon-container img:hover {
    transform: scale(1.15);
    opacity: 1;
}

/* Leyenda debajo de los iconos */
.icon-label {
    font-size: 14px;
    color: white;
    margin: 0;
    font-weight: bold;
    text-align: center;
}

/* Otras Secciones */
.section {
    max-width: 800px;
    margin: 10px auto;  /* Reducción del margen para acercar secciones */
    background-color: transparent;
    padding: 50px;  /* Menor padding para acercar el contenido */
    border-radius: 0;
    box-shadow: none;
    color: white;
}

/* Reducción del espacio entre Inicio y Sobre Mí */
#inicio+#sobre-mi {
    margin-top: 0;  /* Elimina el espacio entre secciones */
}

/* Títulos y Subtítulos */
h1,
h2,
p {
    margin: 3px 0;
    text-align: center;
}

/* Estilos para pantallas de hasta 768px (móviles y tablets en modo vertical) */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 10px;
    }

    #name-logo {
        justify-content: center;
        font-size: 18px;
    }

    .nav-menu {
        flex-direction: column;
        align-items: center;
        padding: 0;
    }

    .nav-links {
        flex-direction: column;
        gap: 10px;
        padding: 10px 0;
    }

    .language-switcher {
        margin-top: 10px;
    }

    .hero-content {
        max-width: 90%;
        padding: 10px;
    }

    .dynamic-name {
        font-size: 32px;
    }

    .dynamic-text {
        font-size: 20px;
    }

    .social-icons {
        gap: 15px;
    }

    .icon-container img {
        width: 40px;
        height: 40px;
    }

    .section {
        margin: 5px 10px;
        padding: 10px;
    }
}

/* Estilos para pantallas muy pequeñas (hasta 480px) */
@media (max-width: 480px) {
    .dynamic-name {
        font-size: 26px;
    }

    .dynamic-text {
        font-size: 18px;
    }

    .nav-links li a {
        font-size: 16px;
    }

    .icon-container img {
        width: 35px;
        height: 35px;
    }
}

/* Estilos CSS para la sección de habilidades */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.skill-card {
    position: relative;
    width: 120px;
    height: 140px;
    background-color: #333;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.skill-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
}

.skill-card p {
    color: white;
    font-size: 14px;
    font-weight: bold;
    margin: 0;
}

/* Efecto de luz en los bordes */
.skill-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, #8a2be2, #00bfff, transparent);
    animation: rotateLight 4s linear infinite;
    transform-origin: center;
    z-index: 0;
}

.skill-card::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    background: #333;
    border-radius: 10px;
    z-index: 1;
}

.skill-card img,
.skill-card p {
    position: relative;
    z-index: 2;
}

@keyframes rotateLight {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Sección Sobre Mí con el mismo borde */
.about-card {
    position: relative;
    width: calc(5 * 120px + 4 * 20px);
    margin: 20px auto;
    padding: 20px;
    background-color: #333;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    text-align: center;
    color: white;
}

/* Efecto de luz en el borde */
.about-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, #8a2be2, #00bfff, transparent);
    animation: rotateLight 4s linear infinite;
    transform-origin: center;
    z-index: 0;
}

.about-card::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    background: #333;
    border-radius: 10px;
    z-index: 1;
}

.about-card p {
    position: relative;
    z-index: 2;
}

/* Estilos para el pie de página */
.footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 15px 20px;
    margin-top: 40px;
    font-size: 14px;

    width: 100%;  /* Asegura que ocupe todo el ancho */
    box-sizing: border-box;  /* Incluye padding en el ancho total */
}


.footer a {
    color: #00bfff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #8a2be2;
}

/* Estilos para la línea de tiempo */
.timeline {
    max-width: 800px;
    margin: 0 auto;
}

.timeline-item {
    padding: 20px;
    position: relative;
    width: 50%;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-content {
    padding: 20px;
    background-color: #333;
    color: white;
    border-radius: 6px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
}

.timeline-content h3 {
    text-align: center;
    margin-top: 0;
    font-size: 20px;
    color: #00bfff;
}

.timeline-content p {
    margin: 5px 0 0;
}

@media (max-width: 768px) {
    .timeline-item {
        width: 100%;
        left: 0;
    }
} 

/* Tarjetas de Proyectos */
.project-card {
    position: relative;
    width: calc(5 * 120px + 4 * 20px);
    margin: 20px auto;
    display: flex;
    background-color: #333;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    overflow: hidden;  /* Asegura que nada se salga del borde */
    color: white;
    align-items: center;
}

/* Haces de luz en morado */
.project-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, #8a2be2, #8a2be2, transparent);
    animation: rotateLight 6s linear infinite;  /* Movimiento más suave */
    transform-origin: center;
    z-index: 0;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    background: #333;
    border-radius: 10px;
    z-index: 1;
}

/* Imagen más pequeña y con zoom */
.project-card img {
    width: 25%;  /* Imagen más pequeña */
    height: 100%;
    object-fit: cover;
    margin-left: 15px;  /* Desplaza la imagen hacia la derecha */
    border-radius: 10px;  /* Mantiene las esquinas redondeadas */
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;  /* Efecto de zoom */
}

.project-card img:hover {
    transform: scale(1.1);  /* Zoom al pasar el cursor */
}

/* Descripción del Proyecto */
.project-description {
    padding: 20px;
    z-index: 2;
    width: 75%;  /* Ajuste al tamaño reducido de la imagen */
}

.project-description h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #8a2be2;
}

.project-description p {
    font-size: 16px;
    line-height: 1.5;
}

/* Animación de luz */
@keyframes rotateLight {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.divider {
    width: 80%;
    height: 4px;
    background: linear-gradient(90deg, #8a2be2, #00bfff);
    margin: 40px auto;
    border-radius: 5px;
    animation: expand 1s ease-in-out;
}

@keyframes expand {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 80%;
        opacity: 1;
    }
}

#inicio {
    scroll-margin-top: 140px;  /* Ajusta este valor según el tamaño de tu navbar */
}

/* Estilos para el formulario de contacto */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: calc(5 * 120px + 4 * 20px);
    margin: 0 auto;
    padding: 20px;
    background-color: #333;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px 0px;
    margin-bottom: 15px;
    border: 2px solid #8a2be2;
    border-radius: 8px;
    background-color: #222;
    color: white;
    font-size: 16px;
}

.contact-form textarea {
    resize: none;
    height: 150px;
}

.contact-form button {
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(90deg, #8a2be2, #00bfff);
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.contact-form button:hover {
    background: linear-gradient(90deg, #00bfff, #8a2be2);
}

/* Estilo de los avisos */
.input-group {
    margin-bottom: 20px;
    position: relative;
}

input, textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
    border-color: #007bff;
}

.input-error {
    border-color: #ff4d4d; /* Borde rojo en campos con error */
}

.error-message {
    color: #ff4d4d;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none; /* Ocultos por defecto */
}

.show-error {
    display: block; /* Se muestran cuando hay error */
}

.about-content {
    display: flex;
    align-items: center; /* Alinea verticalmente la imagen y el texto */
    gap: 20px; /* Espacio entre la imagen y el texto */
}

.profile-pic {
    width: 120px;            /* Tamaño de la imagen */
    height: 120px;
    border-radius: 50%;      /* Imagen redonda */
    object-fit: cover;       /* Evita deformaciones */
    display: block;          /* Asegura la correcta visualización */
    
    /* Efecto de zoom al pasar el cursor */
    transition: transform 0.3s ease; 
}

/* Efecto de zoom al pasar el cursor */
.profile-pic:hover {
    transform: scale(1.1);  /* Zoom de 10% */
}



.about-card {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.about-content {
    position: relative;
    z-index: 10; /* Asegura que la imagen esté por encima de otros elementos */
}
