/* -------------------------------- */
/* 1. Reset básico y configuración */
/* -------------------------------- */
html {
    scroll-padding-top: 80px; /* Ajuste del desplazamiento para evitar ocultar contenido tras la barra de navegación */
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    height: 100%; /* Ocupar toda la pantalla */
    width: 100%;
    overflow-x: hidden; /* Evitar scroll horizontal */
    font-family: 'Arial', sans-serif; /* Fuente principal */
}

/* Estilos para la barra de desplazamiento */
::-webkit-scrollbar {
    width: 12px; /* Ancho de la barra de desplazamiento */
}

::-webkit-scrollbar-track {
    background: #f1f1f1; /* Color del fondo de la barra de desplazamiento */
}

::-webkit-scrollbar-thumb {
    background: #d89857; /* Color del "pulgar" de la barra de desplazamiento */
    border-radius: 10px; /* Bordes redondeados */
}

::-webkit-scrollbar-thumb:hover {
    background: #8a6603; /* Color del "pulgar" cuando se pasa el mouse */
}

/* Contenedor principal */
.main-container {
    padding-top: 60px; /* Para evitar que el contenido esté cubierto */
    overflow-y: auto; /* Asegúrate de que la barra de desplazamiento sea visible */
}


/* -------------------------------- */
/* 2. Modos Día y Noche */
/* -------------------------------- */
/* Animación de desplazamiento del fondo */
@keyframes scrollBackground {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

body {
    background-image: url('assets/fondo.png');
    background-size: cover;
    background-attachment: fixed; /* Hace que la imagen siga desplazándose al hacer scroll */
    background-repeat: no-repeat;
    animation: scrollBackground 100s linear infinite; /* Movimiento continuo */
    transition: background-image 0.5s;
}

body.dark-mode {
    background-image: url('assets/fondooscuro.png');
    animation: scrollBackground 90s linear infinite; /* Reutiliza la animación */
}

.section {
    background-color: #f8f9fa;
}
.section.dark-mode {
    background-color: #3b260e;
}

/* Encabezado - Modo Día */

#nombre-highlight {
    color: rgb(136, 64, 5); /* Marrón claro */
}

body.dark-mode #nombre-highlight {
    color: #d4c2b2; /* Marrón claro para el modo oscuro */
}

@keyframes backgroundMove {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 0%;
    }
    100% {
        background-position: 0% 0%;
    }
}

header {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(247, 229, 204, 0.85);
    backdrop-filter: blur(5px);
    color: #1f1e1e;
    border-radius: 15px;
    padding: 20px;
    margin: 20px;
    animation: backgroundMove 230s linear infinite;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: background-color 0.5s ease;
}
/* Fondo para el modo oscuro */
body.dark-mode header {
    background-color: rgba(32, 32, 32, 0.8); /* Fondo más oscuro con transparencia */
    color: #a3a1a1;
}

/* -------------------------------- */
/* 3. Botón de cambio de modo */
/* -------------------------------- */
#mode-toggle {
    margin-left: auto;
    margin-right: 1pc;
    padding: 10px 20px;
    background-color: #855336;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}
#mode-toggle:hover {
    background-color: #382115;
}

/* Botón minimalista */
.mode-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 15px;
    margin-left: auto;
    padding: 3px;
    transition: transform 0.3s;
}
.mode-btn:active {
    transform: scale(0.9);
}
body.dark-mode #icon-toggle {
    content: '🌙'; /* Cambia al ícono de luna */
}

/* -------------------------------- */
/* 4. Estilos del encabezado */
/* -------------------------------- */

/* Estilo del botón de descarga */
.download-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    background-color: #884302;
    color: white;
    text-decoration: none;
    font-size: 18px;
    border-radius: 8px;
    transition: background-color 0.3s, transform 0.2s;
    cursor: pointer;
}

/* Efecto al pasar el mouse */
.download-btn:hover {
    background-color: #7c4c03;
    transform: scale(1.05);
}

/* Efecto al hacer clic */
.download-btn:active {
    transform: scale(0.95);
}

.profile-pic {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    margin-bottom: 20px; /* Asegura espacio entre la imagen y el texto */
}
.description {
    margin-top: 10px;
    text-align: center;
    font-size: 20px;
}

/* -------------------------------- */
/* 5. Animación de texto */
/* -------------------------------- */
#typing-text {
    font-size: 40px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    max-width: 90%;
    padding: 10px 20px;
    border-right: 3px solid rgb(31, 2, 2); /* Efecto de cursor de escritura */
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
    animation: blink 0.75s step-end infinite; /* Cursor parpadeante */
}


#nombre-highlight {
    color: rgb(136, 64, 5); /* Cambia esto al color que desees */
}
/* Ajustes para pantallas pequeñas */
@media (max-width: 768px) {
    .profile-pic {
        width: 150px;
        height: 150px;
    }

    #typing-text {
        font-size: 24px;
        padding: 5px 10px;
    }
}


@keyframes blink {
    50% {
        border-color: transparent;
    }
}
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* -------------------------------- */
/* 6. Navegación */
/* -------------------------------- */
nav {
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 8px 20px;
    background-color: rgba(247, 210, 168, 0.95); /* Fondo semitransparente */
    transition: background-color 0.5s;
}

/* Estilo del menú en modo noche */
body.dark-mode nav {
    background-color: rgba(78, 63, 50, 0.9);
}

/* Ajuste para evitar que el contenido se oculte debajo del menú */
body {
    padding-top: 70px;
}

/* Estilo del botón del menú hamburguesa */
.menu-toggle {
    display: none;
}

.menu-btn {
    background: transparent;
    border: none;
    color: rgb(136, 64, 5);
    font-size: 24px;
    cursor: pointer;
    margin-right: 20px;
}

body.dark-mode .menu-btn {
    color: #f1f1f1;
}

/* Estilo del menú desplegable */
#nav-menu {
    display: none;
    position: absolute;
    top: 50px;
    left: 50;
    background-color: rgba(126, 61, 1, 0.9);
    border-radius: 15px;
    padding: 10px;
    z-index: 1000;
}

/* Mostrar el menú cuando el checkbox está seleccionado */
.menu-toggle:checked + .menu-btn + #nav-menu {
    display: block;
}

#nav-menu a {
    color: rgb(255, 255, 255);
    padding: 10px;
    text-decoration: none;
    display: block;
}

body.dark-mode #nav-menu a {
    color: #f1f1f1;
}

#nav-menu a:hover {
    background-color: #c78904;
}

body.dark-mode #nav-menu a:hover {
    background-color: #d68100;
}

.menu {
    list-style: none;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-grow: 1;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 20px;
    flex-grow: 1;
}

nav ul li {
    margin: 0 10px;
}

nav ul li a {
    text-decoration: none;
    color: rgb(0, 0, 0);
    padding: 10px 20px;
    border-radius: 5px;
}

nav ul li a:hover {
    background-color: #e0b782;
}

body.dark-mode nav ul li a {
    color: #ffffff;
}

body.dark-mode nav ul li a:hover {
    background-color: #7e5116;
}

/* -------------------------------- */
/* 7. Estilos de las secciones */
/* -------------------------------- */
.section {
    background: linear-gradient(145deg, rgba(250, 199, 149, 0.8), rgba(240, 190, 140, 0.9));
    scroll-margin-top: 80px;
    margin-top: 100px;
    padding: 20px;
    width: 70%;
    margin-left: auto;
    margin-right: auto;
    background-color: rgb(202, 207, 206);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(177, 15, 15, 0.1);
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

h2, h3 {
    margin-bottom: 20px;
    color: rgb(136, 64, 5);
}

h2 {
    font-size: 2.5em;
}

h3 {
    font-size: 2em;
}

/* -------------------------------- */
/* 8. Estilos responsivos */
/* -------------------------------- */
@media (max-width: 768px) {
    header {
        padding: 20px;
        text-align: center;
    }

    .profile-pic {
        width: 150px;
        height: 150px;
    }

    #typing-text {
        font-size: 24px;
        max-width: 100%;
    }

    .skills-container {
        grid-template-columns: 1fr; /* Una columna en pantallas pequeñas */
    }

    nav {
        flex-direction: column;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .menu-btn {
        display: block;
    }

    .menu {
        display: none;
    }

    .menu-toggle:checked + .menu-btn + .menu {
        display: flex;
        flex-direction: column;
        width: 100%;
        background-color: rgba(126, 61, 1, 0.9);
        padding: 10px;
        border-radius: 8px;
    }

    .download-btn {
        padding: 10px;
        font-size: 16px;
    }
}

@media (min-width: 769px) {
    .skills-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
}


/* -------------------------------- */
/* 8. Lista de sobre mi */
/* -------------------------------- */
/* Estilo mejorado para la sección "Sobre mí" */
/* Estilo para "Sobre mí" */
.about-me {
    background: linear-gradient(145deg, rgba(250, 199, 149, 0.8), rgba(240, 190, 140, 0.9));
    border-radius: 10px;
    padding: 30px;
    margin: 100px auto;
    max-width: 1500px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    font-family: 'Arial', sans-serif;

    /* Oculto y desplazado inicialmente */
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}



/* Animación cuando aparece */
.about-me.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-me h2 {
    font-size: 2.5em;
    color: rgb(136, 64, 5);
    margin-bottom: 15px;
}

.about-me p {
    font-size: 1.2em;
    color: #333;
    line-height: 1.6;
    margin-bottom: 15px;
}



/* -------------------------------- */
/* 8. Lista de educación */
/* -------------------------------- */
@keyframes titleAnimation {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    50% {
        opacity: 0.5;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated-title {
    background:transparent;
    font-size: 4em;
    text-align: center;
    color: rgb(136, 64, 5); /* Marrón claro */
    letter-spacing: 2px;
    animation: titleAnimation 2s ease-out;
    position: relative;
    overflow: hidden;
}

.animated-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 4px;
    background-color: rgb(136, 64, 5);
    transition: width 0.5s ease, left 0.5s ease;
}

.animated-title:hover::after {
    width: 100%;
    left: 0;
}

body.dark-mode .animated-title {
    color: #7c3c1f; /* Marrón claro para modo oscuro */
}

body.dark-mode .animated-title::after {
    background-color: #ad682b;
}

.education-list {
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 15px;
}
.school-name {
    padding: 15px;
    background-color: #f0ddc4f8;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
}
.school-name span {
    display: block;
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}
.school-name p {
    font-size: 16px;
    color: #555;
    margin: 0;
}
.school-name:hover {
    transform: scale(1.04);
    background-color: #ffeddc;
}
.school-name:active {
    transform: scale(1.02);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.school-name a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}
.school-name a:hover {
    color: #007bff;
}
/* -------------------------------- */
/* -------------------------------- */
/* Sección de habilidades */

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}


.knowledge-title {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 3em;
    letter-spacing: 2px;
    color: rgb(136, 64, 5); /* Marrón claro */
}

body.dark-mode .knowledge-title {
    color: #d4c2b2; /* Marrón claro para modo oscuro */
}




.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.skill-category {
    background-color: rgb(243, 235, 213);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
    margin-bottom: 10px;
    color: rgb(136, 64, 5);
}

.skill-category ul {
    list-style-type: none;
    padding: 0;
}

.skill-category li {
    padding: 5px 0;
    color: rgb(85, 85, 85);
    display: flex;
    align-items: center;
}

.skill-category .emoji {
    width: 20px; /* Ajusta el tamaño del emoticono */
    height: 20px; /* Ajusta el tamaño del emoticono */
    margin-right: 8px; /* Espacio entre el emoticono y el texto */
}

/* Título de habilidades */
#skills h2 {
    font-size: 2.5em;
    color: rgb(136, 64, 5);
    margin-bottom: 30px;
}

.skill-category ul li {
    display: flex;
    align-items: center;
    padding: 5px 0;
    font-size: 18px;
    color: rgb(85, 85, 85);
}

/* Ajuste para los emojis o banderas */
.skill-category ul li img, 
.skill-category ul li::before {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}


/* -------------------------------- */
/*  proyectos
/* -------------------------------- */
/* Sección de proyectos */

#projects {
    background-image: url('assets/fondo_proyectos.png'); /* Cambia la ruta si es necesario */
    background-size: cover; /* Asegúrate de que la imagen cubra toda la sección */
    background-position: center; /* Centra la imagen */
    background-repeat: no-repeat; /* Evita que la imagen se repita */
    background-attachment: fixed; /* Mantiene la imagen fija al hacer scroll */
    padding: 20px; /* Ajusta el padding según sea necesario */
    border-radius: 10px; /* Bordes redondeados si lo deseas */
    box-shadow: 0 0 10px rgba(177, 15, 15, 0.1); /* Sombra opcional */
}

body.dark-mode #projects {
    background-image: url('assets/fondo_proyectos_oscuro.png') /* Fondo para modo oscuro */
}


/* Contenedor principal de proyectos */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
    padding: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Tarjeta de proyecto */
.project-card {
    background: #f7ddcd;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s, box-shadow 0.4s;
    display: flex;
    flex-direction: column;
    position: relative;
}

.project-card:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Imagen de proyecto */
.project-image-container {
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid #000000;
}

.project-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s;
}

.project-image-container:hover .project-image {
    transform: scale(1.1);
}

/* Overlay al hover */
.project-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s;
}

.project-image-container:hover .project-hover-overlay {
    opacity: 1;
}

/* Botón dentro del overlay */
.view-project-btn {
    background: #ff9800;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 1rem;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}

.view-project-btn:hover {
    background: #e67e22;
}

/* Detalles del proyecto */
.project-details {
    padding: 20px;
    text-align: center;
}

.project-title {
    font-size: 1.6rem;
    color: #333;
    margin-bottom: 10px;
}

.project-date {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 15px;
}

.project-description {
    font-size: 1rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Tecnologías */
.project-technologies {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.project-technologies img {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    transition: transform 0.3s;
}

.project-technologies img:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


/* Responsividad */
@media (min-width: 768px) {
    .projects-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .projects-container {
        grid-template-columns: repeat(3, 1fr);
    }
}




/* -------------------------------- */
/* 9. Imagen de contacto */
/* -------------------------------- */

/* Estilo para el título de contacto */
.contact-title {
    transition: transform 0.9s ease; /* Transición suave */
    display: inline-block; /* Necesario para que funcione el transform */
    margin-left: 10px;
}

/* Efecto hover para el título */
.contact-title:hover {
    transform: scale(1.05); /* Aumenta ligeramente el tamaño al pasar el mouse */
    color: #d89857; /* Cambia el color al pasar el mouse */
}

/* Estilo para el mensaje */
.contact-message {
    font-size: 15px; /* Ajusta el tamaño de la fuente */
    margin-top: 10px; /* Espacio superior */
    color: #555; /* Color base */
}

/* Estilo para la palabra 'contactarme' */
.highlight {
    color: #0e0d0d; /* Color diferente para 'contactarme' */
    font-weight: bold; /* Negrita */
}

/* Caja de contacto */
/* Estilo para el botón de descarga */
.download-button-container {
    text-align: center; /* Centra el botón */
    margin: 35px 0; /* Espaciado vertical */
}

.download-button {
    padding: 10px 20px;
    font-size: 18px;
    color: white;
    background-color: #664405; /* Color verde */
    border: none;
    border-radius: 18px;
    text-decoration: none; /* Elimina el subrayado */
    transition: background-color 0.3s, transform 0.2s;
}

.download-button:hover {
    background-color: #cca832; /* Color verde más oscuro */
    transform: scale(1.05); /* Aumenta ligeramente el tamaño */
}

/* Alineación y organización de los ítems de contacto */
.contact-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center; /* Centra horizontalmente */
}

/* Estilo de los ítems de contacto */
.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Estilo para las tarjetas de contacto */
.contact-card {
    background-color: rgba(250, 199, 149, 0.9); /* Fondo suave */
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    width: 80%; /* Ajusta el ancho de la tarjeta */
    transition: transform 0.3s, box-shadow 0.3s;
}

/* Espaciado específico entre el icono y el texto */
.whatsapp-link, .linkedin-link, .email {
    display: flex;
    align-items: center;
    text-decoration: none; /* Elimina subrayado */
    color: inherit; /* Hereda el color */
    gap: 15px; /* Espaciado entre el icono y el texto */
}


.contact-card:hover {
    transform: translateY(-5px); /* Levanta la tarjeta al pasar el mouse */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); /* Aumenta la sombra */
}



/* Añadiendo animaciones */
.contact-icon {
    width: 40px; /* Ajusta el tamaño */
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.contact-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Aumenta la sombra */
}
.copy-icon {
    width: 20px; /* Ajusta el tamaño de la imagen */
    height: 20px; /* Ajusta el tamaño de la imagen */
}

.copy-btn {
    padding: 0px 0px;
    font-size: 16px;
    color: transparent;
    background-color: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.copy-btn:hover {
    background-color: transparent;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.copy-btn:active {
    transform: scale(0.95);
}


/* -------------------------------- */
/* 10. Encabezados */
/* -------------------------------- */
h2 {
    margin-top: 10px;
}

/* -------------------------------- */
/* 11. Lista de habilidades */
/* -------------------------------- */
.skills-list li {
    background-color: #e2dfdf;
    margin: 5px 0;
    padding: 10px;
    border-radius: 5px;
}

/* -------------------------------- */
/* 11. boton de whatsapps */
/* -------------------------------- */
.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 30px;
    width: 60px;
    height: 60px;
    z-index: 1000;
}

.whatsapp-btn img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


/* -------------------------------- */
/* 12. Pie de página */
/* -------------------------------- */
footer {
    text-align: center;
    padding: 15px;
    background-color: #333;
    color: white;
    margin-top: 20px;
}
