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

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-bg: #ecf0f1;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navegación */
.navbar {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Sección Hero */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 100px 0;
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: slideInDown 0.8s ease;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    animation: slideInUp 0.8s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Botones */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background-color: var(--accent-color);
    color: var(--white);
    font-size: 0.9rem;
    padding: 8px 16px;
}

.btn-secondary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

/* Secciones */
.section {
    padding: 80px 0;
}

.section-alt {
    background-color: var(--light-bg);
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--secondary-color);
}

/* Grid de Proyectos */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.project-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.description {
    font-size: 0.95rem;
    margin: 1rem 0 !important;
    padding: 1rem;
    background-color: var(--light-bg);
    border-left: 4px solid var(--primary-color);
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
    list-style: none;
}

.tech-list li {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Grid de Habilidades */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.skill-group {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.skill-group h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-group ul {
    list-style: none;
}

.skill-group li {
    padding: 0.5rem 0;
    color: var(--text-dark);
    position: relative;
    padding-left: 20px;
}

.skill-group li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Formulario de Contacto */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--secondary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.social-links {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}

.social-link {
    display: inline-block;
    margin: 0 1rem;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.social-link:hover {
    color: var(--secondary-color);
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section h2 {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* Modo Oscuro */
[data-theme="dark"] {
    --primary-color: #60a5fa;
    --secondary-color: #1e293b;
    --accent-color: #f97316;
    --light-bg: #1e293b;
    --white: #0f172a;
    --text-dark: #f1f5f9;
    --text-light: #94a3b8;
}

.theme-toggle {
    margin-left: 1rem;
}

.theme-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s;
}

.theme-btn:hover {
    transform: rotate(15deg);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Estadísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
    margin-top: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 1rem;
}

/* Testimonios */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-content {
    font-style: italic;
    margin-bottom: 1rem;
    color: var(--text-dark);
    line-height: 1.6;
}

.testimonial-author {
    border-top: 2px solid var(--primary-color);
    padding-top: 1rem;
}

.testimonial-author strong {
    display: block;
    color: var(--primary-color);
}

.testimonial-author span {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Barra de progreso */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    z-index: 1000;
    transition: width 0.3s;
}

/* Animaciones al scroll */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Filtros de proyectos */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--white);
    border: 2px solid var(--primary-color);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-dark);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Botón de descarga CV */
.cv-download {
    text-align: center;
    margin-top: 2rem;
}