* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8b5cf6;
    --secondary-color: #06b6d4;
    --accent-color: #f59e0b;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark), #1e1b4b);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header/Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.1), transparent 70%);
}

/* Imagen de perfil sin superposición */
.profile-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin: 0 auto 2rem;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
    transition: transform 0.3s ease;
    overflow: hidden;
    position: relative;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-image:hover {
    transform: scale(1.05);
}


.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.hero .subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-info {
    margin: 2rem 0;
}

.contact-info a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 1.1rem;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--primary-color);
}

.social-links {
    margin: 2rem 0;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    margin: 0 10px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 50px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.social-btn i {
    margin-right: 8px;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Section Styles */
section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    color: transparent;
    position: relative;
}

.section-title::after {
    content: '';
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
}

.project-image {
    height: 200px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.project-content {
    padding: 2rem;
}

.project-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: rgba(139, 92, 246, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tech-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-link {
    display: inline-flex;
    align-items: center;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid var(--secondary-color);
    font-size: 0.85rem;
}

.project-link:hover {
    color: white;
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.project-link i {
    margin-right: 5px;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-category {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(139, 92, 246, 0.2);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.skill-item {
    background: rgba(6, 182, 212, 0.1);
    color: var(--secondary-color);
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    border: 1px solid var(--secondary-color);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.skill-item:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(6, 182, 212, 0.3);
}

/* Experience & Education Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 3rem auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin: 2rem 0;
    width: 50%;
}

.timeline-left {
    left: 0;
    padding-right: 2rem;
    text-align: right;
}

.timeline-right {
    left: 50%;
    padding-left: 2rem;
    text-align: left;
}

.timeline-left::before {
    content: '';
    position: absolute;
    right: -8px;
    top: 20px;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--bg-dark);
}

.timeline-right::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 20px;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--bg-dark);
}

.timeline-content {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.timeline-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.timeline-period {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.timeline-description {
    color: var(--text-secondary);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    padding: 15px 0;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(139, 92, 246, 0.1);
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Footer */
footer {
    background: var(--bg-card);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
}

/* Advanced Scroll Animations */
.animate-title {
    opacity: 0;
    transform: translateY(-50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-title.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.animate-fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-fade-up.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.animate-slide-left {
    opacity: 0;
    transform: translateX(-60px) rotate(-5deg);
    transition: all 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-slide-left.animate-in {
    opacity: 1;
    transform: translateX(0) rotate(0deg);
}

.animate-slide-right {
    opacity: 0;
    transform: translateX(60px) rotate(5deg);
    transition: all 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-slide-right.animate-in {
    opacity: 1;
    transform: translateX(0) rotate(0deg);
}

.animate-slide-up {
    opacity: 0;
    transform: translateY(60px) scale(0.9);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-slide-up.animate-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.animate-zoom-in {
    opacity: 0;
    transform: scale(0.8) rotateY(20deg);
    transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-zoom-in.animate-in {
    opacity: 1;
    transform: scale(1) rotateY(0deg);
}

/* Stagger animation delays */
.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.3s; }
.project-card:nth-child(3) { animation-delay: 0.5s; }
.project-card:nth-child(4) { animation-delay: 0.7s; }
.project-card:nth-child(5) { animation-delay: 0.9s; }
.project-card:nth-child(6) { animation-delay: 1.1s; }

.skill-category:nth-child(1) { animation-delay: 0.1s; }
.skill-category:nth-child(2) { animation-delay: 0.2s; }
.skill-category:nth-child(3) { animation-delay: 0.3s; }
.skill-category:nth-child(4) { animation-delay: 0.4s; }
.skill-category:nth-child(5) { animation-delay: 0.5s; }
.skill-category:nth-child(6) { animation-delay: 0.6s; }
.skill-category:nth-child(7) { animation-delay: 0.7s; }

/* Enhanced hover effects with animations */
.project-card {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(139, 92, 246, 0.4);
}

.skill-category {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.2);
}

/* Timeline animation improvements */
.timeline-item {
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.timeline-content {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}

/* Floating animation for scroll indicator */
@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0px); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

.scroll-indicator {
    animation: float 3s ease-in-out infinite;
}

/* Pulse animation for profile image */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 30px rgba(139, 92, 246, 0.5); }
    50% { box-shadow: 0 0 40px rgba(139, 92, 246, 0.8); }
}

.profile-image {
    animation: pulse-glow 4s ease-in-out infinite;
}

/* Responsive adjustments for emojis */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 5px;
    }

    .nav-link {
        padding: 8px 10px;
        font-size: 0.75rem;
        gap: 4px;
    }

    .tech-tag, .skill-item {
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    .project-title {
        font-size: 1.2rem;
        text-align: center;
        justify-content: center;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item,
    .timeline-left,
    .timeline-right {
        width: 100% !important;
        left: 0 !important;
        margin-left: 40px !important;
        text-align: left !important;
        padding: 0 !important;
        padding-left: 2rem !important;
    }

    .timeline-item::before,
    .timeline-left::before,
    .timeline-right::before {
        left: -8px !important;
        right: auto !important;
    }

    .navbar {
        padding: 10px 0;
    }
    
    .nav-links {
        gap: 15px;
        padding: 0 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 0.8rem;
        gap: 4px;
    }
    
    .hero {
        padding-top: 100px;
        min-height: calc(100vh - 100px);
    }
}