/* VARIABLES DE COLOR */
:root {
    --morado: #000000;        
    --morado-claro: #5b5963;  
    --morado-oscuro: #000000; 
    --gris-claro: rgba(255, 255, 255, 0.92);
    --blanco: #ffffff;
    --texto: #2c2c2c;
}

/* RESET GENERAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* BODY */
body {
    font-family: Arial, sans-serif;
    background-image: url("../IMG/fondo.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--texto);
}

/* CONTENEDOR PRINCIPAL */
.contenedor-principal {
    display: flex;
    max-width: 1200px;
    margin: 3rem auto;
    gap: 1rem;
    padding: 2rem;
    border-radius: 40px;
    box-shadow: 
        0 0 0 2px rgba(255,255,255,0.4),
        0 25px 60px rgba(0,0,0,0.15);
}

/* SIDEBAR */
.sidebar {
    flex: 1;
    background: linear-gradient(160deg, var(--morado), var(--morado-claro));
    color: white;
    padding: 2.5rem 4rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 50px;
    box-shadow: 
        0 20px 40px rgba(124, 58, 237, 0.25),
        inset 0 0 0 10px rgb(73, 73, 73);
    border: 0px solid rgba(0, 0, 0, 0.2);
}

/* IMAGEN PERFIL */
.sidebar img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 
        0 15px 35px rgba(0,0,0,0.3),
        0 0 0 6px rgba(255,255,255,0.08);
    margin-bottom: 1.5rem;
}

/* TITULOS */
.sidebar h1 {
    font-size: 1.8rem;
    margin-top: 1rem;
    font-weight: 700;
}

.sidebar p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 3rem;
}

/* REDES */
.redes {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.redes a {
    display: flex;             
    justify-content: center;   
    align-items: center;       

    height: 50px;
    width: 300px;
    text-decoration: none;
    background: rgba(255,255,255,0.2);
    color: white;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 
        0 15px 35px rgba(0,0,0,0.3),
        0 0 0 6px rgba(255,255,255,0.08);
    margin-bottom: 1.5rem;

    padding: 0; 
}

.redes a:hover {
    background: white;
    color: var(--morado);
    transform: translateY(-4px);
}

/* CONTENIDO DERECHO */
.contenido {
    flex: 3;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.12);
}

/* SECCIONES */
section {
    margin-bottom: 2.5rem;
}

h2 {
    border-left: 5px solid var(--morado);
    padding-left: 0.8rem;
    margin-bottom: 1.2rem;
    font-size: 1.4rem;
    font-weight: 700;
}

/* GRID */
.grid-2 {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

/* CARDS */
.card {
    flex: 1 1 45%;
    background: var(--gris-claro);
    padding: 1.2rem;
    border-radius: 15px;
    transition: 0.4s ease;
}

/* IMAGENES DENTRO DE LAS CARDS RESPONSIVAS */
.card img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    object-fit: cover;
    display: block;
    margin-bottom: 15px;
    margin-top: 15px;
}

/* EFECTO HOVER EN CARDS */
.card:hover {
    background-image: url("../IMG/fondo.jpg");
    background-size: cover;
    background-position: center;
}

/* ENLACE DENTRO DE CARD */
.card a {
    display: inline-block;
    margin-top: 0.5rem;
    text-decoration: none;
    color: white;
    background: var(--morado);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: 0.3s;
}

.card a:hover {
    background: var(--morado-oscuro);
}

/* SKILLS */
.skill {
    margin-bottom: 1.2rem;
}

/* BARRA DE PROGRESO */
.barra {
    background: rgba(0,0,0,0.1);
    height: 10px;
    border-radius: 20px;
    overflow: hidden;
}

.progreso {
    height: 100%;
    background: linear-gradient(90deg, var(--morado), var(--morado-claro));
    border-radius: 20px;
}

.w80 { width: 80%; }
.w70 { width: 70%; }

/* TAGS */
.habilidades {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(0, 0, 0, 0.333);
    color: var(--morado-oscuro);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 500;
    transition: 0.3s;
}

.tag:hover {
    background: var(--morado);
    color: white;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 1.5rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: black; 
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .contenedor-principal {
        flex-direction: column;
        gap: 2rem;
        margin: 2rem;
    }

    .sidebar,
    .contenido {
        width: 100%;
    }

    /* TARJETAS OCUPAN ANCHO COMPLETO EN MÓVIL */
    .card {
        flex: 1 1 100%;
    }
}