/* =============================================
   ESTILOS GENERALES Y VARIABLES
   ============================================= */

:root {
    /* Colores modo claro */
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --body-bg: #ffffff;
    --text-color: #333333;
    --card-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] {
    /* Colores modo oscuro */
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --body-bg: #121212;
    --text-color: #e0e0e0;
    --card-bg: #1e1e1e;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --light-color: #2d2d2d;
    --dark-color: #f8f9fa;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-color);
    background-color: var(--body-bg);
    transition: background-color 0.3s ease, color 0.3s ease;
    padding-top: 76px; /* Para compensar navbar fija */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

/* =============================================
   NAVBAR
   ============================================= */

.navbar {
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* =============================================
   HERO SECTION
   ============================================= */

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6610f2 100%);
    color: white;
    border-radius: 0 0 20px 20px;
    margin-bottom: 2rem;
}

.hero-section h1, 
.hero-section h2,
.hero-section p {
    color: white;
}

.profile-pic {
    width: 250px;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-pic:hover {
    transform: scale(1.05);
}

/* =============================================
   SECCIONES GENERALES
   ============================================= */

section {
    padding: 80px 0;
}

.section-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 40px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* =============================================
   TARJETAS DE CONTACTO
   ============================================= */

.contact-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    background-color: var(--card-bg);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-color) !important;
}

.contact-card i {
    transition: transform 0.3s ease;
}

.contact-card:hover i {
    transform: scale(1.2);
}

/* =============================================
   ICONOS SOCIALES
   ============================================= */

.social-icon {
    color: var(--primary-color);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    color: var(--warning-color);
    transform: translateY(-3px);
}

/* =============================================
   TIMELINE EXPERIENCIA
   ============================================= */

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -38px;
    top: 15px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 4px solid var(--body-bg);
    z-index: 1;
}

.timeline-date {
    position: absolute;
    left: -180px;
    top: 10px;
    font-weight: 600;
    color: var(--primary-color);
    width: 140px;
    text-align: right;
}

.timeline-content {
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(10px);
}

/* =============================================
   HABILIDADES
   ============================================= */

.skill-item {
    transition: transform 0.3s ease;
}

.skill-item:hover {
    transform: translateX(10px);
}

.progress {
    background-color: var(--light-color);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background-color: var(--primary-color);
    transition: width 1s ease-in-out;
}

.soft-skill {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background-color: var(--card-bg);
}

.soft-skill:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

/* =============================================
   FORMULARIO DE CONTACTO
   ============================================= */

#contactForm .form-control {
    border: 1px solid var(--secondary-color);
    background-color: var(--card-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
}

#contactForm .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

#contactForm .form-label {
    font-weight: 500;
}

/* =============================================
   ANIMACIONES
   ============================================= */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   EFECTOS DE COLOR (para botón de cambio de color)
   ============================================= */

.color-scheme-1 {
    --primary-color: #007bff;
}

.color-scheme-2 {
    --primary-color: #28a745;
}

.color-scheme-3 {
    --primary-color: #dc3545;
}

.color-scheme-4 {
    --primary-color: #6f42c1;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */

@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 40px 0;
    }
    
    .profile-pic {
        width: 200px;
        height: 200px;
        margin-bottom: 20px;
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .timeline-item::before {
        left: -23px;
    }
    
    .timeline-date {
        position: relative;
        left: 0;
        text-align: left;
        margin-bottom: 10px;
        width: auto;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    body {
        padding-top: 70px;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2.2rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    section {
        padding: 60px 0;
    }
}

/* =============================================
   UTILIDADES
   ============================================= */

.shadow {
    box-shadow: 0 4px 6px var(--shadow-color) !important;
}

.shadow-sm {
    box-shadow: 0 2px 4px var(--shadow-color) !important;
}

.bg-light {
    background-color: var(--light-color) !important;
}

.bg-dark {
    background-color: var(--dark-color) !important;
}

.card {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.badge.bg-primary {
    background-color: var(--primary-color) !important;
}