/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

ul{
    padding-left: 20px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #2d5a27 0%, #4a7c59 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Contenedor principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    padding: 40px;
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: #2d5a27;
    font-size: 3em;
    margin-bottom: 15px;
}

/* Items de portafolio */
.proy-item {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #52b788;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.proy-item:nth-child(1) { animation-delay: 0.2s; }
.proy-item:nth-child(2) { animation-delay: 0.4s; }

.proy-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left-color: #2d5a27;
}

/* Contenido de cada proyecto */
.proy-content {
    display: flex;
    gap: 30px;
}

.left-column {
    flex: 2;
}

.right-column {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Imágenes de proyectos */
.project-image {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.project-image:hover {
    transform: scale(1.03);
}

/* Barra de lenguajes - CORREGIDA */
.languages-bar {
    margin-top: 25px;
    width: 100%;
}

.languages-main-bar {
    height: 8px;
    background: #e1e4e8;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    margin-bottom: 12px;
    width: 100%;
    position: relative;
}

.language-segment {
    height: 100%;
    width: 0%;
    transition: width 1.5s ease-in-out;
    transition-delay: 0.5s;
}

/* Inicializar las barras con width 0 por defecto */
.language-segment:not(.animated) {
    width: 0% !important;
}

.language-segment.html-segment {
    background: #e34c26;
}

.language-segment.css-segment {
    background: #1572b6;
}

.language-segment.js-segment {
    background: #f1e05a;
}

.languages-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85em;
}

.language-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.language-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.language-dot.html-dot {
    background: #e34c26;
}

.language-dot.css-dot {
    background: #1572b6;
}

.language-dot.js-dot {
    background: #f1e05a;
}

.language-text {
    color: #586069;
    font-weight: 500;
}

/* Botón de regreso */
.return {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #52b788;
    color: white;
    text-decoration: none;
    border: none;
    padding: 15px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(82, 183, 136, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
}

.return:hover {
    background: #2d5a27;
    transform: scale(1.1);
}

/* Indicador de dispositivo */
.device-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: bold;
    color: #2d5a27;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    backdrop-filter: blur(10px);
    font-size: 0.8em;
}

/* Estilos responsivos */
@media (max-width: 1023px) {
    .container {
        padding: 30px;
    }
    
    .header h1 {
        font-size: 2.5em;
    }
    
    .proy-content {
        flex-direction: column;
    }
    
    .right-column {
        order: -1;
        margin-bottom: 20px;
    }
    
    .project-image {
        max-height: 250px;
    }
    
    .return {
        bottom: 20px;
        right: 20px;
        padding: 12px;
    }
    
    .languages-bar {
        margin-top: 20px;
    }
    
    .languages-labels {
        gap: 8px;
        font-size: 0.8em;
    }
}

@media (max-width: 767px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px;
        border-radius: 15px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .proy-item {
        padding: 16px;
    }
    
    .return {
        bottom: 15px;
        right: 15px;
        padding: 12px;
        font-size: 13px;
    }
    
    .languages-bar {
        margin-top: 15px;
    }
    
    .languages-labels {
        gap: 6px;
        font-size: 0.75em;
    }
    
    .language-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .proy-item {
        padding: 14px;
    }
    
    .return {
        padding: 10px;
        font-size: 12px;
    }
}