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

:root {
    --primary-color: #0ea5e9;
    /* Sky blue */
    --secondary-color: #0284c7;
    /* Blue 600 */
    --accent-color: #06b6d4;
    /* Cyan 500 */
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-dark: #1a202c;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.15);
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-accent: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
}

/* Header y Navegación */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 2s ease-in-out infinite alternate;
}

@keyframes shimmer {
    from {
        filter: brightness(1);
    }

    to {
        filter: brightness(1.2);
    }
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background: var(--gradient);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

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

/* Botón menú móvil */
.mobile-menu-toggle {
    display: none;
}

/* Secciones */
.section {
    min-height: 80vh;
    padding: 6rem 5% 4rem;
    max-width: 1200px;
    margin: 0 auto;
    display: none;
    animation: fadeIn 0.6s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Inicio */
#inicio {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    /* background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1)); */
}

.hero-content {
    
    flex: 1;
}

.hero-title {
    padding-top: 10vh;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: slideInUp 0.8s ease 0.2s both;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    line-height: 1.8;
    animation: slideInUp 0.8s ease 0.4s both;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    animation: slideInUp 0.8s ease 0.6s both;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.hero-image {
    flex: 1;
    text-align: center;
}

.profile-img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--gradient);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: white;
    box-shadow: var(--shadow-hover);
    animation: float 3s ease-in-out infinite;
}
/* Estilos para la imagen dentro */
.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 👈 IMPORTANTE: mantiene proporción sin deformar */
    object-position: center; /* 👈 Centra la imagen */
    border-radius: 50%;
}
@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Curriculum */
.cv-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.cv-sidebar {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 20px;
    height: fit-content;
}

.cv-main {
    space-y: 3rem;
}

.cv-section {
    margin-bottom: 3rem;
}

.cv-section h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cv-item {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.cv-item:hover {
    transform: translateX(5px);
    border-left-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.cv-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.cv-item .company {
    color: var(--primary-color);
    font-weight: 600;
}

.cv-item .date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.skill-item {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-size: 12px;
}

.skill-item img{
    height: 20px;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

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

.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.project-image {
    height: 200px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
}

.project-content {
    padding: 2rem;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: var(--bg-secondary);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-link.primary {
    background: var(--gradient);
    color: white;
}

.project-link.secondary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.project-link:hover {
    transform: translateY(-2px);
}

/* Contacto */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    space-y: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(5px);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Títulos de sección */
.section-title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Animaciones adicionales */
.fade-in {
    animation: fadeIn 0.6s ease;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.8s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Efectos de scroll */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ===== CONTROL DE VISIBILIDAD DE SECCIONES ===== */

/* Ocultar hero content cuando no estés en inicio */
body:not(.showing-inicio) #inicio {
    display: none !important;
}

/* Cuando no estés en inicio, las secciones empiezan más arriba */
body:not(.showing-inicio) .section.active {
    padding-top: 6rem;
    min-height: calc(100vh - 80px);
}


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

/* Menú móvil */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow);
        z-index: 999;
    }
    
    .nav-links.mobile-active {
        display: flex !important;
    }
    
    .mobile-menu-toggle {
        display: block !important;
        background: none;
        border: none;
        font-size: 1.8rem;
        cursor: pointer;
        color: var(--text-primary);
        padding: 0.5rem;
    }
    
    .nav-links li {
        margin: 0.5rem 0;
    }
    
    .nav-links a {
        font-size: 1.2rem;
        padding: 1rem;
        border-radius: 10px;
        transition: all 0.3s ease;
        display: block;
        text-align: center;
    }
    
    .nav-links a:hover {
        background: rgba(14, 165, 233, 0.1);
    }

    #inicio {
        flex-direction: column;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .cv-container {
        grid-template-columns: 1fr;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

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

    .section {
        padding: 4rem 5% 2rem;
    }
}
