/* Paleta profesional:
   Fondo principal: #181818
   Texto principal: #e0e0e0
   Texto secundario: #b0b0b0
   Color de acento: #007bff

Tipografias usadas::after

Titulos y navs
    -Montserrat

Textos
    -Roboto


   */

* {
    margin: 0;
    padding: 0;
}

body {
    background-color: #181818;
    color: #e0e0e0;
}

/* Títulos y navegación */
h1, h2, h3, .nav-brand, .nav-links a {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
}

/* Textos generales */
body, p, li, label, span, button {
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
}

/* Color de texto general para mejor contraste */
body,
h1, h2, h3, h4, h5, h6,
p,
li,
label,
span,
a,
button {
    color: #e0e0e0;
}

/* Texto secundario */
.project-info p,
.bienvenida-container p,
.sobreMi,
.form-contacto label,
.form-contacto input::placeholder,
.form-contacto textarea::placeholder {
    color: #b0b0b0;
}

/* Excepciones para enlaces activos y hover */
.nav-links a:hover,
.nav-links a.active {
    color: #007bff;
}

/* Para modo claro, el texto vuelve a oscuro */
body.light-mode,
body.light-mode h1, 
body.light-mode h2, 
body.light-mode h3, 
body.light-mode h4, 
body.light-mode h5, 
body.light-mode h6,
body.light-mode p,
body.light-mode li,
body.light-mode label,
body.light-mode span,
body.light-mode a,
body.light-mode button {
    color: #181818;
}



/* Estilos del nav responsive */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 80%;
    margin: 0 auto;
    padding: 1rem 0;
}

.nav-brand p {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.nav-links {
    display: flex;
    flex-direction: row;
    list-style: none;
    font-size: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0 15px;
}

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

/* Botón hamburguesa */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    z-index: 1000;
    
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #e0e0e0;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Animación del hamburguesa */
.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}



/* Estilos para la sección Hero */
.hero {
    height: 70vh;
    margin: 6.5rem auto;
    justify-content: center;
    padding: 0 20px;
    width: 80%;
    
    /* border: 2px solid red; */
}

.heroIndex{
    width: 95%;
    margin: 0 auto;
}


.sobreMi{
    /* border: 2px solid green; */
    font-size: 2rem;
    width:30%;
    align-self: center;
    margin-left: 2rem;
    padding-top: 3rem;
}
.hero-content{
    text-align: center;
    /* border: 2px solid blue; */
    width:40%;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    padding-left: 1.6rem;
    
}

.hero-content p {
    font-size: 1.5rem;
}

.fotoPerfil{
    width: 60%;
    border-radius: 10rem;
}

.icono {
    width: 2rem;
    height: 2rem;
    vertical-align: middle;
    
}

.iconosDecoracion{
    text-align: right;
}
.iconos{
    width: 4rem;
    height: 4rem;
    vertical-align: middle;
    
}

/* Grid de Proyectos */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    margin-right: 5rem;
    margin-left: 5rem;
    justify-content: center;
}

/* Restaurar margen superior y quitar centrado vertical */
#proyectos {
    margin-top: 5.5rem;
    min-height: unset;
    display: block;
    align-items: unset;
}

#proyectos .container {
    width: 100%;
    display: block;
    flex-direction: unset;
    justify-content: unset;
}

.project-card {
    background: #181818;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.6);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, box-shadow 0.25s;
}

/* Ajustar hover para que no se salga del viewport */
.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(255, 255, 255, 0.7);
}

.project-img {
    position: relative;
    overflow: hidden;
    max-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-img img {
    width: 85%;
    height: 180px;
    object-fit: contain;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.project-card:hover .project-img img {
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.project-info p {
    color: #b0b0b0;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.project-links {
    margin-top: auto;
    display: flex;
    gap: 1rem;
}

.btn {
    background: #007bff;
    color: #e0e0e0;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.25s cubic-bezier(.4,0,.2,1), 
                color 0.25s cubic-bezier(.4,0,.2,1), 
                box-shadow 0.25s cubic-bezier(.4,0,.2,1), 
                transform 0.12s cubic-bezier(.4,0,.2,1);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.btn:hover, .btn:focus {
    background: #0056b3;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,123,255,0.18);
    transform: translateY(-2px) scale(1.03);
    outline: none;
}

.btn:active {
    background: #003d80;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    transform: translateY(1px) scale(0.98);
}

.btn-secondary {
    background: #232323;
    color: #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background 0.25s, color 0.25s, box-shadow 0.25s, transform 0.12s;
}

.btn-secondary:hover, .btn-secondary:focus {
    background: #444;
    color: #fff;
    box-shadow: 0 4px 16px rgba(176,176,176,0.12);
    transform: translateY(-2px) scale(1.03);
    outline: none;
}

.btn-secondary:active {
    background: #181818;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    transform: translateY(1px) scale(0.98);
}


/* Todo Container */
.todo-container {
    margin: 4rem auto 0 auto;
    max-width: 500px;
    background: #181818;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    padding: 2rem 2.5rem 2.5rem 2.5rem;
    text-align: center;
}

.todo-container h1 {
    color: #e0e0e0; /* antes #fff */
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
}

#todo-input {
    width: 70%;
    padding: 0.9rem 1rem;
    border-radius: 0.5rem;
    border: none;
    background: #232323;
    color: #e0e0e0;
    font-size: 1.1rem;
    margin-right: 0.5rem;
    outline: none;
    transition: background 0.2s;
}

#todo-input:focus {
    background: #292929;
}

#add-btn {
    padding: 0.7rem 1.2rem;
    border-radius: 0.5rem;
    border: none;
    background: #007bff;
    color: #e0e0e0;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

#add-btn:hover {
    background: #0056b3;
}

#todo-list {
    list-style: none;
    margin-top: 2rem;
    padding: 0;
    text-align: left;
}

#todo-list li {
    background: #232323;
    color: #e0e0e0;
    padding: 0.9rem 1.2rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

#todo-list li:hover {
    background: #007bff;
    color: #fff;
    text-decoration: line-through;
}

#clear-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem auto 0 auto;
    background: #007bff;
    color: #e0e0e0;
    border: none;
    border-radius: 0.5rem;
    padding: 0.7rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

#clear-btn:hover {
    background: #0056b3;
}



.piano-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 4rem;
    width: 100%;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.piano-container h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.piano-keys {
    position: relative;
    display: flex;
    gap: 0;
    margin-top: 2rem;
    height: 320px; /* antes 200px */
    width: 100%;
    max-width: 640px;
    justify-content: center;
}

.piano-key {
    position: relative;
    width: 80px;    /* antes 50px */
    height: 290px;  /* antes 180px */
    background: #e0e0e0;
    border: 1px solid #b0b0b0;
    border-bottom: 4px solid #bbb;
    border-radius: 0 0 8px 8px;
    font-size: 1.5rem; /* antes 1.1rem */
    color: #181818;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    margin-right: -6px;
    z-index: 1;
    transition: background 0.15s, transform 0.08s;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 18px; /* antes 10px */
    user-select: none;
}

.piano-key:last-child {
    margin-right: 0;
}

.piano-key:active {
    background: #e6f0ff;
    transform: translateY(2px);
}

/* Teclas negras */
.piano-key.black {
    background: #232323;
    color: #e0e0e0;
    border: 1px solid #181818;
    width: 50px;    /* antes 32px */
    height: 180px;  /* antes 110px */
    position: absolute;
    top: 0;
    z-index: 2;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    font-size: 1.2rem; /* antes 0.9rem */
    padding-bottom: 10px; /* antes 6px */
}

/* Posicionamiento de teclas negras - Versión original/desktop */
#keyCs { left: 70px; }
#keyDs { left: 145px; }
#keyFs { left: 295px; }
#keyGs { left: 373px; }
#keyAs { left: 450px; }

.botonVolver{
    display: flex;
    justify-content: center;
    margin-top: 4rem;
}

.btn {  font-family: Arial, Helvetica, sans-serif;
      text-transform: uppercase;}  
      
.btn:hover .btn-slide-show-text1 {  
    margin-left: 65px;}  
    
.btn-rect-to-round { 
     height: 90px;  
     width: 240px;  
     font-size: 20px;  
     font-weight: 600;  
     background: transparent;  
     cursor: pointer;  
     transition: 0.5s ease-in,
                 box-shadow 0.25s cubic-bezier(.4,0,.2,1),
                 transform 0.12s cubic-bezier(.4,0,.2,1); 
     box-shadow: 0 2px 8px rgba(0,0,0,0.10);
} 
     
.btn-rect-to-round:hover {  
    border-radius: 60px; 
     color: rgb(255, 255, 255) !important;
     box-shadow: 0 4px 16px rgba(0,123,255,0.18);
     transform: translateY(-2px) scale(1.03);
     outline: none;
} 
     
.btn-rect-to-round:active {
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    transform: translateY(1px) scale(0.98);
}

/* Mejor feedback para el botón volver negro */
.btn-rect-to-round--black {
      border: 2px solid rgb(51, 51, 51); 
       color: #e0e0e0 !important;
       background: #232323;
       box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
.btn-rect-to-round--black:hover, .btn-rect-to-round--black:focus {
    background: #007bff;
    color: #fff !important;
    border-color: #007bff;
    box-shadow: 0 4px 16px rgba(0,123,255,0.18);
    outline: none;
    transform: translateY(-2px) scale(1.03);
}
.btn-rect-to-round--black:active {
    background: #003d80;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    transform: translateY(1px) scale(0.98);
}

/* Estilos para el dado virtual */
.dice-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 4rem;
}

.dice {
    margin-top: 2rem;
    width: 120px;
    height: 120px;
    background: white;
    color: #181818;
    border: 4px solid #b0b0b0;
    border-radius: 1.5rem;
    font-size: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.dice.rolling {
    animation: shake 0.4s;
}

@keyframes shake {
    0% { transform: rotate(0deg) scale(1); }
    20% { transform: rotate(-10deg) scale(1.1);}
    40% { transform: rotate(10deg) scale(1.1);}
    60% { transform: rotate(-10deg) scale(1.1);}
    80% { transform: rotate(10deg) scale(1.1);}
    100% { transform: rotate(0deg) scale(1);}
}

/* Cambiador de Tema */
.theme-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 4rem;
}

.theme-btn {
    margin-top: 2rem;
    font-size: 1.3rem;
    padding: 0.8rem 2rem;
    border-radius: 1.5rem;
    border: none;
    background: #007bff;
    color: #e0e0e0;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.theme-btn:hover {
    background: #007bff;

    color: #fff;
}



/* Modo Claro- siempre debe ser blanco... */
body.light-mode {
    background-color: white;
    color: #181818;
}
body.light-mode .nav-links a,
body.light-mode .nav-links p {
    color: #181818;
}
body.light-mode .nav-links a:hover,
body.light-mode .nav-links a.active {
    color: #007bff;
}
body.light-mode .project-card,
body.light-mode .todo-container,
body.light-mode .dice,
body.light-mode .piano-key,
body.light-mode .modal-content {
    background: #fff;
    color: #181818;
    border-color: #b0b0b0;
}
body.light-mode .piano-key.black {
    background: #b0b0b0;
    color: #181818;
    border-color: #181818;
}
body.light-mode .btn-rect-to-round--black {
    background: #b0b0b0;
    color: #181818 !important;
    border: 2px solid #b0b0b0;
}
body.light-mode .btn-rect-to-round--black:hover {
    background: #007bff;
    color: #fff !important;
    border-color: #007bff;
}
body.light-mode .form-contacto label {
    color: #181818;
}
body.light-mode .form-contacto input,
body.light-mode .form-contacto textarea {
    background: #fff;
    color: #181818;
    border: 1px solid #b0b0b0;
}
body.light-mode .form-contacto input:focus,
body.light-mode .form-contacto textarea:focus {
    border: 1.5px solid #007bff;
}

/* Modal de contacto */
.modal-contacto {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    transition: opacity 0.25s cubic-bezier(.4,0,.2,1);
    opacity: 0;
    pointer-events: none;
}

.modal-contacto.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    animation: modal-fade-in 0.3s cubic-bezier(.4,0,.2,1);
}

@keyframes modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #181818;
    color: #e0e0e0;
    padding: 2rem 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    min-width: 320px;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    animation: modal-pop-in 0.25s cubic-bezier(.4,0,.2,1);
}

@keyframes modal-pop-in {
    from { transform: scale(0.96) translateY(30px); opacity: 0.7; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.2rem;
    cursor: pointer;
    color: #e0e0e0;
    transition: color 0.2s, background 0.2s, box-shadow 0.2s;
    border-radius: 50%;
    padding: 0.2em 0.5em;
    line-height: 1;
}

.close-modal:hover, .close-modal:focus {
    color: #fff;
    background: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.15);
    outline: none;
}



/* Estilos para el formulario del modal de contacto */
.form-contacto {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    width: 25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    width: 100%;
    padding-right: 1.5rem;
}

.form-contacto label {
    font-size: 1rem;
    font-weight: 600;
    color: #e0e0e0;
    
}

.form-contacto input,
.form-contacto textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border-radius: 0.4rem;
    border: 1px solid #444;
    background: #232323;
    color: #e0e0e0;
    font-size: 1rem;
    resize: none;
    outline: none;
    transition: border 0.2s;
}

.form-group label {
    padding-left: .25rem;
}

.form-contacto input:focus,
.form-contacto textarea:focus {
    border: 1.5px solid #007bff;
}

/* Agregar estilos para botones de formulario y mensajes de estado */
.form-buttons {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 1rem;
    padding-right: 1.5rem;
}

.form-status {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
}

.success-message {
    color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.1);
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #4CAF50;
}

.error-message {
    color: #f44336;
    background-color: rgba(244, 67, 54, 0.1);
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #f44336;
}

/* Estilos para estado de envío */
.form-contacto input:required:invalid,
.form-contacto textarea:required:invalid {
    border-color: #f44336;
}

.form-contacto input:focus:valid,
.form-contacto textarea:focus:valid {
    border-color: #4CAF50;
}


.habilidadesContainer{
    display: flex;
    flex-direction: row;     
    margin: 4rem auto;
    background-color: #222;
    width: 70%;
    height: 70vh;
    color: white;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.6);
    gap: 3rem;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.contenidoHabilidadesWeb{
    width: 50%;
    display: flex;
    flex-direction: column;   
    align-items: center;

    background: rgba(30, 30, 30, 0.98);
    border-radius: 1.5rem;
    box-shadow: 0 4px 24px rgba(0,123,255,0.10);
    padding: 2.5rem 2rem 2rem 2rem;
    margin: 0 1rem;
    /* Para que no se peguen al borde */
}   

.contenidoHabilidadesPropias h1, .contenidoHabilidadesWeb h1{
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    font-size: 2rem;
}

.contenidoHabilidadesPropias{
    width: 50%;
    display: flex;
    flex-direction: column;   
    align-items: center;
    padding: 20px;
    background: rgba(30, 30, 30, 0.98);
    border-radius: 1.5rem;
    box-shadow: 0 4px 24px rgba(0,123,255,0.10);
    padding: 2.5rem 2rem 2rem 2rem;
    margin: 0 1rem;
    /* Para que no se peguen al borde */
}

.contenidoHabilidadesWeb button,
.contenidoHabilidadesPropias button {
    margin: 1rem 0;
    width: 80%;
    box-sizing: border-box;
    display: block;
}



.btn-habilidad-slide-bottom {
    display: block;
    border: none;
    text-align: center;
    overflow: hidden;
    font-weight: 700;
    font-size: 15px;
    background-color: rgb(51, 51, 51);
    padding: 17px 45px;
    transition: 0.5s ease-in-out;
    color: rgb(255, 255, 255) !important;
    margin: 1.5rem 0;
    position: relative;
}

.btn-habilidad-slide-bottom span {
    position: relative;
    z-index: 1;
    font-size: 1.5rem;
}

.icono-habilidad {
    width: 32px;
    height: 32px;
    margin-left: 0.6rem;
    vertical-align: middle;
}
.icono-habilidad2 {
    width: 32px;
    height: 32px;
    margin-left: 0.45rem;
    vertical-align: middle;
}



@media (max-width: 900px) {


    .piano-container h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .piano-keys {
        height: 180px;
        max-width: 320px;
    }
    
    .piano-key {
        width: 40px;
        height: 145px;
        font-size: 0.9rem;
        padding-bottom: 6px;
    }
    
    .piano-key.black {
        width: 26px;
        height: 85px;
        font-size: 0.7rem;
        padding-bottom: 2px;
    }


    
}

.heroIndex{
    height: 70vh;
    display: flex ;

}

.contenidoHero{
    display: flex;
    flex-direction: row;
    height: 100%;
    /* border: 2px solid yellow; */
    justify-content: center;
    background: rgba(24,24,24,0.95);
    border-radius: 2rem;
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.6);

}

/* Bienvenida llamativa para index.html */
.bienvenida-container {
    margin: 5rem auto 0 auto;
    background: rgba(24,24,24,0.95);
    border-radius: 2rem;
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.6);
    padding: 2.5rem 2.5rem 2rem 2.5rem;
    text-align: center;
    width: 80%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}
.bienvenida-container h1 {
    font-size: 3.2rem;
    margin-bottom: 1.2rem;
    color: #fff;
    letter-spacing: 1px;
}
.bienvenida-container p {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    color: #b0b0b0;
}
.bienvenida-container .btn {
    margin: 0.5rem 0.5rem 1.5rem 0.5rem;
}

/* Efecto de escritura (typewriter) */
.typewriter {
    border-right: 2px solid #007bff;
    padding-bottom: 0;
    padding-right: 4px;
    white-space: nowrap;
    font-weight: bold;
    color: #007bff;
    font-size: 1.2em;
    animation: blink-caret 0.8s step-end infinite;
}
@keyframes blink-caret {
    0%, 100% { border-color: #007bff; }
    50% { border-color: transparent; }
}

/* Mejora botón de bienvenida */
.bienvenida-container .btn-rect-to-round {
    margin-top: 1.2rem;
    font-size: 1.2rem;
    padding: 0 2.5rem;
    height: 55px;
    line-height: 55px;
    letter-spacing: 1px;
    width: auto;
    min-width: 200px;
    max-width: 100%;
    white-space: nowrap;
    display: inline-block;
    box-sizing: border-box;
}


/* Footer*/

    .footer {
        display: flex;
        flex-direction: column;
        justify-content: center;
        margin-top: 5rem;
        border-top: 2px solid #b0b0b0;
        height: 14vh;
    }

    .contenedorFooter{
        width: 80%;
        display: flex;
        flex-direction: column;
       align-items: center;
        margin: 1rem auto;
        gap: 1rem;
    }

    .iconosFooter{
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
    .textoFooter{
        font-size: 1.5rem;
    }

    .footerIcono{
        width: 2.3rem; /* 48px */
        height: 2.3rem; /* 48px */
       
    }

    .footerIcono:hover {
        transition: .5s ease;
        background-color: rgb(145, 143, 143);
        border-radius: 1.25rem; /* 20px */
   
}

/* Media queries para responsividad del nav */
@media (max-width: 1024px) {
    .nav-container {
        width: 95%;
        padding: 0.5rem 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: #181818;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 80px;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0,0,0,0.3);
        z-index: 999;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 20px 0;
        width: 100%;
        text-align: center;
    }
    
    .nav-links a {
        display: block;
        padding: 15px 20px;
        font-size: 1.2rem;
        border-bottom: 1px solid #333;
        width: 100%;
        box-sizing: border-box;
    }
    
    .nav-links a:hover {
        background-color: #333;
    }
    
    /* Overlay para cerrar el menú */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Ajustes para el contenido principal */
    .heroIndex {
        margin-top: 1rem;
    }
    
    .bienvenida-container {
        width: 85%;
        margin: 2rem auto 0 auto;
        padding: 1.5rem;
    }
    
    .bienvenida-container h1 {
        font-size: 2.5rem;
    }
    
    .bienvenida-container p {
        font-size: 1.8rem;
        line-height: 1.4;
        word-wrap: break-word;
        max-width: 100%;
    }
    
    .typewriter {
        font-size: 1.1em;
        white-space: normal;
        word-wrap: break-word;
        max-width: 100%;
        display: inline-block;
        min-height: 2.2em;
        line-height: 1.4;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }

    .dice-container h1{
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .dice {
        width: 120px;
        height: 120px;
        font-size: 3.5rem;
    }

    #roll-btn{
        margin-top: 2rem;
        font-size: 1.2rem;
    }

    .botonVolver{
        font-size: 2.5rem;
    }

    /* Botón grande para "volver a mis proyectos" */
    .botonVolver .btn-rect-to-round {
        font-size: 1.5rem;
        padding: 1rem 3rem;
        height: 120px;
        min-width: 380px;
        letter-spacing: 1.5px;
        border-radius: 2.5rem;
        
    }

body.light-mode .nav-links {
    background-color: white;
}

body.light-mode .theme-container button{
    color: white;
}

body.light-mode .hamburger span{
    background-color: #181818;
}

body.light-mode .nav-links a,
body.light-mode .nav-links p {
    color: #181818;
} 

}

.footer{
    height: 20vh;
}


@media (max-width: 768px) {

    .heroIndex{
        height: 75vh !important;
        
       
    }
    .bienvenida-container{
        width: 90% !important;
        padding: 2.5rem !important;
        height: auto; 
        

    }

    

        .form-buttons {
        flex-direction: column-reverse;
        gap: 0.75rem;
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .form-buttons button {
        width: 100%;
    }
    
    .form-status {
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

   
    /* Ajustes específicos para móvil */
    .nav-links {
        width: 85%;
    }

    .modal-content {
        min-width: unset;
        max-width: 92vw;
        width: 92vw;
        margin: 0 auto;
        padding: 1rem 0.5rem;
        border-radius: 1.2rem;
        box-sizing: border-box;
    }
    .form-contacto {
        width: 100%;
        padding: 0;
    }

    .form-group input, .form-group textarea {
        width: 90%;
        margin: 0 auto;
        margin-left: 1rem;
    }

    .form-group label{
        margin-left: .9rem;
    }


    
    .bienvenida-container h1 {
        font-size: 2rem;
    }
    
    .bienvenida-container p {
        font-size: 1.5rem;
        line-height: 1.5;
        word-wrap: break-word;
        max-width: 100%;
        padding-right: .4rem !important;
        padding-left: .5rem !important;
        width: 95%;

    }
    
    .typewriter {
        font-size: 1em;
        white-space: normal;
        word-wrap: break-word;
        max-width: 100%;
        display: inline-block;
        min-height: 2.5em;
        line-height: 1.5;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }
    
    .bienvenida-container .btn-rect-to-round {
        font-size: 1rem;
        padding: 0 1.5rem;
        height: 45px;
        line-height: 45px;
        min-width: 150px;
    }

    .bienvenida-container {
        width: 75%;
    }


    .hero {
        width: 95%;
        margin: 2.7rem auto 0 auto;
        padding: 0 0.5rem;
        height: 75vh !important;
        
    }
    .contenidoHero {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1.5rem;
        width: 100%;
        height: auto;
        margin: 0 auto;
    }
    .hero-content {
        width: 100% !important;
        text-align: center;
        padding-top: .8rem;
    }
    .hero-content h1 {
        font-size: 2rem;
        padding-left: 0;
        margin-bottom: 1rem;
    }
    .fotoPerfil {
        width: 140px;
        max-width: 85vw;
        height: auto;
        margin: 0 auto 1rem auto;
        display: block;
    }
    .sobreMi {
        width: 90% !important;
        max-width: 420px;
        font-size: 1.08rem !important;
        margin: 0 auto;
        padding: 0.5rem 0.5rem 0.5rem 0.5rem;
        text-align: left;
        align-self: center;
        line-height: 1.6;
        word-break: break-word;
        background: none;
        box-sizing: border-box;
    }
    .sobreMi p {
        margin-bottom: 0.7rem;
        /* Elimina saltos de línea forzados en mobile */
        display: block;
        white-space: normal;
        font-size: 1.1rem;
    }
    .iconosDecoracion {
        text-align: center !important;
        margin-top: -1.3rem;
    }
    .iconos {
        width: 2rem !important;
        height: 2rem !important;
        margin: 0 0.3rem;
        vertical-align: middle;
        
    }

    .habilidadesContainer{
        display: flex;
        flex-direction: column;
        width: 95%;
        height: auto;
        
    }

    .contenidoHabilidadesWeb, .contenidoHabilidadesPropias {
        width: 80%;
        padding: 1rem;
    }

    .contenidoHabilidadesPropias h1, .contenidoHabilidadesWeb h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    .contenidoHabilidadesPropias button, .contenidoHabilidadesWeb button {
        width: 100%;
        padding: 0.8rem;
        font-size: 1rem;
    }
        .contenidoHabilidadesPropias span, .contenidoHabilidadesWeb span {
        font-size: 1.2rem;
        margin-bottom: 1.2rem;
    }

        .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 1.5rem 1rem;
    }
    
    #proyectos {
        margin-top: 2rem;
    }
    
    .project-card {
        max-width: 100%;
    }
    
    .project-img {
        max-height: 150px;
    }
    
    .project-img img {
        width: 90%;
        height: 150px;
    }
    
    .project-info h3 {
        font-size: 1.3rem;
    }
    
    .project-links {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .project-links .btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }

    .botonVolver .btn-rect-to-round {
        font-size: 1.2rem;
        padding: 0.8rem 2rem;
        height: 55px;
        min-width: 180px;
    }

    /* Posicionamiento de teclas negras - Versión original/desktop */
#keyCs { left: 45px; }
#keyDs { left: 80px; }
#keyFs { left: 140px; }
#keyGs { left: 172px; }
#keyAs { left: 210px; }

    .btn-rect-to-round {
       
         width: 100%;
    }

    /* todo list*/



#todo-input {
    width: 85%;
}

#todo-input:focus {
    background: #292929;
}

#add-btn {
    margin-top: 1rem;
    padding: 0.7rem 1.2rem;
    border-radius: 0.5rem;
    border: none;
    background: #007bff;
    color: #e0e0e0;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

#add-btn:focus {
    background-color: #007bff;
}

#add-btn:hover {
    background: none;
}

    .textoFooter{ font-size: 1.2rem;}

}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero {
        width: 90%;
        margin: 4rem auto 0 auto;
        padding: 0 2rem;
        height: auto;
    
    }
    .contenidoHero {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
        width: 100%;
        height: auto;
    }
    .hero-content {
        width: 100%;
        text-align: center;
        padding: 0;
    }
    .hero-content h1 {
        font-size: 2.3rem;
        padding-left: 0;
        margin-bottom: 1.2rem;
    }
    .fotoPerfil {
        width: 200px;
        max-width: 60vw;
        height: auto;
        margin: 0 auto 1.2rem auto;
        display: block;
    }
    .sobreMi {
        width: 80%;
        max-width: 600px;
        font-size: 1.18rem;
        margin: 0 auto;
        padding: 0.7rem 1.2rem 0.7rem 1.2rem;
        text-align: left;
        align-self: center;
        line-height: 1.7;
        background: none;
        box-sizing: border-box;
    }
    .sobreMi p {
        margin-bottom: 0.9rem;
        display: block;
        white-space: normal;
        font-size: 1.18rem;
    }
    .iconosDecoracion {
        text-align: center;
        margin-top: 0.5rem;
    }
    .iconos {
        width: 2.7rem;
        height: 2.7rem;
        margin: 0 0.5rem;
        vertical-align: middle;
    }

        .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.8rem;
        margin: 2rem 2rem;
    }
    
    .project-img {
        max-height: 180px;
    }
    
    .project-img img {
        width: 82%;
        height: 180px;
    }

    .habilidadesContainer{
        display: flex;
        flex-direction: row;
        width: 85%;
        height: auto    ;
        justify-content: center;
    }

    .contenidoHabilidadesWeb, .contenidoHabilidadesPropias {
        width: 45%;
        padding: 1.5rem;
    }
    .contenidoHabilidadesPropias span, .contenidoHabilidadesWeb span {
        font-size: 1.2rem;
        margin-bottom: 1.2rem;
    }


    /*piano */

    .piano-keys {
        height: 210px;
        max-width: 380px;
    }
    
    .piano-key {
        width: 70px;
        height: 210px;
        font-size: 1.1rem;
        padding-bottom: 6px;
    }
    
    .piano-key.black {
        width: 30px;
        height: 130px;
        font-size: 0.9rem;
        padding-bottom: 2px;
    }

    #keyCs { left: 35px; }
#keyDs { left: 80px; }
#keyFs { left: 175px; }
#keyGs { left: 225px; }
#keyAs { left: 270px; }

}
       
    
    .project-img img {
        width: 82%;
        height: 180px;
    }



    /*piano */

    .piano-keys {
        height: 210px;
        max-width: 380px;
    }
    
    .piano-key {
        width: 70px;
        height: 210px;
        font-size: 1.1rem;
        padding-bottom: 6px;
    }
    
    .piano-key.black {
        width: 30px;
        height: 130px;
        font-size: 0.9rem;
        padding-bottom: 2px;
    }

    #keyCs { left: 35px; }
#keyDs { left: 80px; }
#keyFs { left: 175px; }
#keyGs { left: 225px; }
#keyAs { left: 270px; }


