*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/*Variables Boostrap*/

/*nav*/
.nav-link {
    color: white;
    font-size: 1.5em;
}
.nav-link:hover {
    color: rgba(224, 1, 1, 0.836);
    border-radius: 5px;
}
.active {
    color: rgba(224, 1, 1, 0.836);
    border-radius: 5px;;
}

/*Card*/

.card-dark {
    background-color: rgb(26, 26, 26);
    color: white;
    transition: ease-in-out 0.3s;
}

.card-dark:hover {
    box-shadow: 0 0 80px rgba(161, 0, 0, 0.877);
    transform: scale(1.05);
}
.card-dark svg {
    margin-top: 2vh;
    align-self: center;
    margin-bottom: 2vh;
}

.skills svg {
    margin-left: 2vh;
}
.skills {
    text-align: center;
    padding: auto;
    margin:auto;
    display: flex;
    flex-direction: row;
    transition: ease-in-out 0.3s;
}

.skills:hover {
    box-shadow: 0 0 80px rgba(161, 0, 0, 0.877);
    transform: scale(1.1);
}

.skills:hover p {
    color: rgba(255, 255, 255, 0.636);
    transition: ease-in-out 0.3s;
    text-shadow: 0 0 15px rgb(255, 255, 255);;
}

.low {color: rgb(192, 82, 42); margin :auto;}
.mid {color: rgb(4, 82, 185); margin: auto;}
.high{color: rgb(0, 189, 0); margin: auto;}

.skill-name{
    font-size: 2vh;
    font-weight: bold;
}

.offcanvas-title{
    font-size: 3vh;
    font-weight: bold;
    text-align: center;
    color: white;
    text-shadow: 0 0 10px rgb(255, 255, 255);
    
}

/* --- Estructura ---- */
body {
    background-color: rgba(27, 27, 27, 0.932);
    font-family: 'Times New Roman';
    display: grid;
    justify-items: center;
    min-height: 100vh;
    line-height: 1.5;
    font-size: 16px;
}

header {
    background-color: rgb(24, 24, 24);
    color: white;
    padding: 1em;
    display: flex;
    flex-direction: column;
    width: 100%;
}

footer {
    background-color: rgba(24, 24, 24);
    color: white;
    padding: 1em;
    display: flex;
    flex-direction: column;
    width: 100%;
    text-align: center;
    font-size: 2vh;
}

hr {
    border: 1px solid rgba(255, 255, 255, 0.274);
    width: 80%;
    margin: auto;
}

/* Contenedores */
.txt-cont{
    text-align: justify;
    width: 80%;
    margin: auto;
    color: white;
    font-size: 1.5em;   
}

.txt-cont span{text-shadow: 0 0 10px rgb(255, 255, 255);}

.cont-lateral{
    display: flex;
    justify-content: center;
    gap: 2em;
    flex-wrap: wrap;
    margin: 2em 0;
    /* AÑADE ESTO: Fuerza a los items (cards) a estirarse a la misma altura */
    align-items: stretch;
}

.cont-skills{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.yuuruii {
    background-color: rgba(27, 27, 27, 0.678);
    border-radius: 5px;
    width: 95%;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 2rem 1rem;
}

.yuuruii h1{
    text-align: center;
    font-size: 3em;
    font-weight: bold;
    margin: 0.5em 0;
    font-family: 'Times New Roman';
    text-shadow: 0 0 8px rgba(161, 0, 0, 0.973);
    text-decoration: underline;
    color: white;
}
.yuuruii h2{
    text-align: center;
    font-size: 2em;
    font-weight: bold;
    margin: 0.5em 0;
    font-family: 'Times New Roman';
    text-shadow: 0 0 8px rgba(161, 0, 0, 0.973);
    text-decoration: underline;
    color: white;
}

.offcanvas{
    background-color: rgb(24, 24, 24);
    color: white;
}

/* Tarjetas de projectos y emprendimientos*/
.tarjeta{
    background-color: rgba(27, 27, 27, 0.678);
    border-radius: 5px;
    width: 300px;
    height: 350px;
    transition: ease-in-out 0.3s;
    display: flex;
    flex-direction: column;
}

.tarjeta:hover{
    box-shadow: 0 0 80px rgba(161, 0, 0, 0.877);
    transform: scale(1.05);
}

.tarjeta h3 {
    text-align: center;
    font-size: 2em;
    font-weight: bold;
    margin: 0.5em 0;
    font-family: 'Times New Roman';
    text-shadow: 0 0 8px rgba(161, 0, 0, 0.973);
    text-decoration: underline;
    color: white;
}

.projectos{
    height: 280px;
    width: 200px;
    font-size: 1vh;
}

.projectos-title{
    text-decoration: underline;
    font-size: 1.5em;
    font-weight: bold;
}

/*Elementos*/

#icono {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: auto;
    box-shadow: 0 0 120px rgba(161, 0, 0, 0.877);
}

#tarjeta-img {
    width: 299px;
    height: 280px;
    border-radius: 5px 5px 0 0;
}
.projectos-img {
    width: 199px;
    height: 200px;
    border-radius: 5px 5px 0 0;
    align-self: center;
    margin-top: 1vh;
}

#services {
    text-align: center;
    font-weight: bold;
    font-size: 2.5vh;
    margin-bottom: 1vh;
    text-decoration: underline;
    text-decoration-color: white;
}

/* Iconos de redes sociales*/

/* ===== ICONOS DE REDES SOCIALES ===== */
.icons {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.icons a {
    transition: all 0.3s ease;
    display: inline-block;
    padding: 10px;
    border-radius: 50%;
    background: var(--glass-effect);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.icons a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.icons a:hover::before {
    transform: translateX(100%);
}

.icons a:hover {
    transform: translateY(-5px) scale(1.1);
    background: var(--glass-effect-hover);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(188, 188, 188, 0.2);
}

.icons img {
    display: block;
    filter: 
        brightness(0.8) 
        contrast(1.1)
        grayscale(20%);
    transition: filter 0.3s ease;
}

.icons a:hover img {
    filter: 
        brightness(1.2) 
        contrast(1.3)
        grayscale(0%);
}

/* Mejoras para las tarjetas de habilidades */
.skills {
    background-color: rgb(26, 26, 26);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
    height: 120px; /* Altura fija para todas las tarjetas */
}

.skills svg {
    min-width: 64px; /* Evita que el SVG se encoja */
    height: 64px;
    margin: 0;
    color: rgba(161, 0, 0, 0.95);
    transition: all 0.3s ease;
}

.skill-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    flex-grow: 1;
    text-align: left;
}

/* Niveles con mejor espaciado */
.high, .mid, .low {
    margin-left: auto; /* Empuja el nivel al extremo derecho */
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.3rem 0;
}

/* Hover effects mejorados */
.skills:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(161, 0, 0, 0.3);
}

.skills:hover svg {
    transform: scale(1.1);
}

/* Estilos modernizados para las skills cards */
.skills {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border: 1px solid rgba(255, 0, 0, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    height: 120px;
    position: relative;
    overflow: hidden;
}

.skills::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(161, 0, 0, 0.05) 0%,
        rgba(161, 0, 0, 0) 100%);
    z-index: 1;
}

.skills svg {
    min-width: 64px;
    height: 64px;
    color: rgba(161, 0, 0, 0.95);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 8px rgba(161, 0, 0, 0.3));
}

.skill-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    flex-grow: 1;
    text-align: left;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(161, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

/* Niveles con estilo moderno */
.high, .mid, .low {
    margin-left: auto;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    position: relative;
    z-index: 2;
}

.high {
    background: linear-gradient(45deg, #1a472a, #2d8653);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(45, 134, 83, 0.3);
}

.mid {
    background: linear-gradient(45deg, #1a365d, #2b6cb0);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(43, 108, 176, 0.3);
}

.low {
    background: linear-gradient(45deg, #822727, #c53030);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(197, 48, 48, 0.3);
}

/* Efectos hover mejorados */
.skills:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(161, 0, 0, 0.2);
    border-color: rgba(161, 0, 0, 0.3);
}

.skills:hover::before {
    background: linear-gradient(45deg, 
        rgba(161, 0, 0, 0.1) 0%,
        rgba(161, 0, 0, 0.05) 100%);
}

.skills:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 12px rgba(161, 0, 0, 0.5));
}

/* Contenedor de emprendimientos */
.emprendimientos-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 1rem;
    margin: 0 auto;
}

/* Tarjetas de emprendimientos */
.emprendimiento-card {
    background-color: rgb(26, 26, 26);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    height: 100%;
}

.emprendimiento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(161, 0, 0, 0.5);
}

.emprendimiento-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.emprendimiento-card h3 {
    padding: 1rem;
    margin: 0;
    text-align: center;
    color: white;
    font-size: 1.5rem;
}

/* Contenedor de proyectos */
.projects-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 1rem;
    margin: 0 auto;
}

/* Tarjetas de proyectos */
.project-card {
    background-color: rgb(26, 26, 26);
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(161, 0, 0, 0.5);
}

.project-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
    text-decoration: underline;
    text-decoration-color: rgba(161, 0, 0, 0.95);
}

.project-description {
    color: #ffffff;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-link {
    align-self: flex-start;
    background-color: rgba(161, 0, 0, 0.95);
    color: white;
    padding: 0.5rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.project-link:hover {
    background-color: rgba(224, 1, 1, 0.836);
    transform: translateY(-2px);
}

/* Ajustes del contenedor principal para móvil */
.yuuruii {
    width: 100%;
    padding: 1rem 0.5rem;
    margin: 1rem 0;
}

/* Contenedor de habilidades ajustado */
.cont-skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    padding: 0.5rem;
    width: 95%;
    margin: 0 auto;
}

/* Tarjetas de habilidades optimizadas */
.skills {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border: 1px solid rgba(255, 0, 0, 0.1);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 110px;
    width: 100%;
    margin: 0 auto;
}

/* Ajustes responsive mejorados */
@media (max-width: 768px) {
    .cont-skills {
        grid-template-columns: 1fr;
        width: 90%;
        max-width: 450px;
        gap: 1rem;
    }
    
    .skills {
        height: 100px;
        padding: 1rem;
    }
    
    .skill-name {
        font-size: 1.1rem;
    }
    
    .high, .mid, .low {
        font-size: 0.9rem;
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    .cont-skills {
        width: 92%;
        padding: 0.5rem;
    }
    
    .skills {
        height: 90px;
    }
    
    .skills svg {
        min-width: 42px;
        height: 42px;
    }
    
    .skill-name {
        font-size: 1rem;
    }
}

/* Ajustes específicos para pantallas muy pequeñas */
@media (max-width: 360px) {
    .cont-skills {
        width: 95%;
    }
    
    .skills {
        height: 85px;
        padding: 0.75rem;
    }
    
    .skills svg {
        min-width: 36px;
        height: 36px;
    }
}

/* Ajustes adicionales para mejor simetría */
.card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.75rem;
}

.card-title {
    margin-bottom: 0.5rem;
    text-align: center;
    width: 100%;
}

.card-text {
    text-align: center;
    margin: 0;
}

/* Ajustes para el contenedor de tarjetas */
.row {
    width: 100%;
    margin: 0 auto;
}

/* Estilos para las tarjetas */
.tarjeta {
    background-color: rgb(26, 26, 26);
    border-radius: 10px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    height: 100%;
    max-width: 400px;
    margin: 0 auto;
}

#tarjeta-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.tarjeta h3 {
    text-align: center;
    margin: 1rem 0;
    color: white;
}

.tarjeta .txt-cont {
    text-align: center;
}

/* Projects section styling */
#p {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

#projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem;
    width: 100%;
    margin: 0 auto;
}

.project-card {
    background-color: rgb(26, 26, 26);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
}

.project-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-content {
    padding: 1.25rem;
}

.project-title {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
}

.project-description {
    color: #ffffff;
    text-align: center;
    margin-bottom: 1.25rem;
}

.project-link {
    display: block;
    width: fit-content;
    margin: 0 auto;
    padding: 0.5rem 1.5rem;
    background-color: rgba(161, 0, 0, 0.95);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.project-link:hover {
    background-color: rgba(224, 1, 1, 0.836);
    transform: translateY(-2px);
}

/* Media queries */
@media (max-width: 768px) {
    #projects-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .project-card {
        max-width: 320px;
    }
    
    .project-img {
        height: 180px;
    }
}

@media (max-width: 576px) {
    #p {
        padding: 0.5rem;
    }
    
    #projects-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .project-card {
        max-width: 300px;
    }
}
