
:root {
    /* Paleta Azul / Morado (Modo Claro por defecto) */
    --primary-color: #3b82f6;   /* Morado vibrante */
    --secondary-color: #6a11cb; /* Azul brillante */
    --accent-color: #00d4ff;    /* Cian para detalles */
    
    /* Fondos y Textos */
    --bg-body: #ffffff;
    --bg-light: #f4f6fa;        /* Lavanda muy claro */
    --bg-card: #ffffff;
    --text-color: #1a1a2e;
    --text-light: #666666;
    
    --shadow: 0 5px 15px rgba(106, 17, 203, 0.1); /* Sombra morada suave */
    --transition: all 0.3s ease;
}

/* Variables para el MODO OSCURO (Se activan con la clase en el body) */
body.dark-mode {
    --primary-color: #8b5cf6;   /* Morado más claro para fondo oscuro */
    --secondary-color: #3b82f6; /* Azul neón */
    
    --bg-body: #0f172a;         /* Azul marino muy oscuro */
    --bg-light: #1e293b;        /* Azul grisáceo oscuro */
    --bg-card: #1e293b;         /* Mismo que bg-light para tarjetas */
    
    --text-color: #e2e8f0;      /* Blanco humo */
    --text-light: #94a3b8;      /* Gris azulado */
    
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* --- AJUSTES GENERALES PARA QUE FUNCIONE EL CAMBIO --- */
body {
    background-color: var(--bg-body);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Actualizamos clases de fondo para usar variables */
.bg-light { background-color: var(--bg-light) !important; }
.bg-dark { background-color: #111; } /* El footer se queda oscuro siempre o puedes usar var(--bg-light) */

/* Actualizamos las tarjetas para que cambien de color */
.card, .project-card, .testimonial-card {
    background: var(--bg-card);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.05); /* Borde sutil en modo oscuro */
}

/* Un toque degradado bonito para el Hero y Botones */
.hero-text h1 span.accent {
    background: -webkit-linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
}

/* Estilo del botón de cambio de tema */
.theme-btn {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 20px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    background: var(--primary-color);
    color: white;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- UTILIDADES --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section { padding: 80px 0; }
.bg-light { background-color: var(--light-bg); }
.bg-dark { background-color: var(--secondary-color); color: var(--white); }

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.text-white { color: var(--white); }

/* --- BOTONES --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-left: 10px;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* --- NAVBAR --- */
.navbar {
    position: sticky;
    top: 0;
    background: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { font-weight: 500; transition: var(--transition); }
.nav-links a:hover { color: var(--primary-color); }

.btn-nav {
    background: var(--primary-color);
    color: rgb(255, 255, 255) !important;
    padding: 8px 20px;
    border-radius: 20px;
}

.menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; }

/* --- HERO SECTION --- */
.hero {
    height: 100vh; /* Pantalla completa */
    display: flex;
    align-items: center;
    background: linear-gradient(to right, #fff 50%, var(--light-bg) 50%);
}

.hero-content {
    display: flex;
    align-items: center;
    width: 100%;
}

.hero-text { flex: 1; padding-right: 50px; }
.hero-text h1 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 10px; }
.hero-text h2 { font-size: 1.5rem; color: #666; margin-bottom: 20px; }
.hero-text p { margin-bottom: 30px; font-size: 1.1rem; }
.accent { color: var(--primary-color); }

.hero-image { flex: 1; text-align: center; }
.hero-image img {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 20px 20px 0px var(--primary-color);
}

/* --- SOBRE MI & TIMELINE --- */
.about-content { display: flex; gap: 50px; justify-content: center; }
.about-text { max-width: 800px; text-align: center; }

.timeline {
    display: flex;
    justify-content: space-around;
    margin-top: 40px;
    border-top: 2px solid #ddd;
    padding-top: 20px;
}

.timeline-item { text-align: center; position: relative; }
.timeline-item::before {
    content: '';
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
}
.year { font-weight: 700; color: var(--primary-color); display: block; }

/* --- EXPERIENCIA (CARDS) --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.card:hover { transform: translateY(-5px); }
.card h3 { margin-bottom: 5px; }
.role { display: block; font-weight: 600; color: var(--primary-color); margin-bottom: 5px; }
.date { display: block; font-size: 0.9rem; color: #888; margin-bottom: 15px; }
.card ul { padding-left: 20px; list-style: disc; }

/* --- HABILIDADES --- */
.skills-container { display: flex; flex-wrap: wrap; gap: 50px; }
.skills-column { flex: 1; min-width: 300px; }
.skills-column h3 { margin-bottom: 20px; border-left: 4px solid var(--primary-color); padding-left: 10px; }

.skill-box { margin-bottom: 20px; }
.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    margin-top: 5px;
    overflow: hidden;
}
.progress { height: 100%; background: var(--primary-color); border-radius: 5px; }

.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
    background: var(--light-bg);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- PORTAFOLIO --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.project-card:hover { transform: scale(1.02); }
.project-card img { width: 100%; height: 200px; object-fit: cover; }
.project-info { padding: 20px; }
.project-info h3 { margin-bottom: 10px; }
.project-info p { margin-bottom: 20px; font-size: 0.9rem; color: #666; }
.btn-link { color: var(--primary-color); font-weight: 600; }
.btn-link i { margin-left: 5px; transition: var(--transition); }
.btn-link:hover i { transform: translateX(5px); }

/* --- TESTIMONIOS --- */
.testimonials-grid { display: flex; gap: 30px; flex-wrap: wrap; justify-content: center; }
.testimonial-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    max-width: 500px;
    position: relative;
    border: 1px solid #eee;
}
.testimonial-card p { font-style: italic; margin-bottom: 20px; }
.author { display: flex; align-items: center; gap: 15px; }
.avatar-circle {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* --- CONTACTO --- */
.contact-wrapper { max-width: 600px; margin: 0 auto; text-align: center; }
.contact-form { margin-bottom: 40px; }
.input-group { margin-bottom: 20px; }
.input-group input, .input-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    transition: var(--transition);
}
.input-group input:focus, .input-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}
.full-width { width: 100%; }

.social-links { margin-top: 30px; }
.social-links h3 { margin-bottom: 15px; color: #bbb; }
.social-links a {
    font-size: 1.5rem;
    color: var(--white);
    margin: 0 15px;
    transition: var(--transition);
}
.social-links a:hover { color: var(--primary-color); transform: translateY(-3px); }

/* --- FOOTER --- */
footer { background: #111; color: #888; text-align: center; padding: 20px 0; font-size: 0.9rem; }

/* --- ANIMACIONES CSS (Auxiliar) --- */
.fade-in { opacity: 0; transform: translateY(20px); transition: all 0.6s ease-out; }
.fade-in.show { opacity: 1; transform: translateY(0); }

/* --- ESTILOS NUEVOS PARA CONTACTO DIRECTO --- */
.contact-cards-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.contact-box {
    background: var(--bg-card); /* Se adapta al modo oscuro */
    padding: 30px;
    border-radius: 15px;
    width: 300px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, border 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.contact-box:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.icon-box {
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: background 0.3s ease;
}

.contact-box:hover .icon-box {
    background: var(--primary-color);
    color: white;
}

.contact-box h3 { margin-bottom: 10px; font-size: 1.2rem; }
.contact-box p { color: var(--text-light); margin-bottom: 20px; font-size: 0.9rem; }

.btn-text {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .hero { height: auto; padding: 100px 0; background: var(--white); }
    .hero-content { flex-direction: column-reverse; text-align: center; }
    .hero-text { padding-right: 0; margin-top: 30px; }
    .hero-image img { width: 250px; height: 250px; }
    
    .nav-links { display: none; } /* Aquí se implementaría menú móvil JS */
    .menu-toggle { display: block; }
    
    .timeline { flex-direction: column; gap: 20px; align-items: center; }
    .timeline-item::before { left: -20px; top: 5px; }
}