/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Beautiful Blue-Purple Gradient Palette */
    --primary-purple: #667eea;      /* Beautiful Purple */
    --primary-blue: #8911E0;        /* Vibrant Purple */
    --accent-blue: #2563eb;         /* Bright Blue */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #8911E0 100%);
    --gradient-accent: linear-gradient(135deg, #2563eb 0%, #667eea 100%);
    --gradient-hover: linear-gradient(135deg, #1d4ed8 0%, #8911E0 100%);
    
    /* Clean Background Colors */
    --bg-primary: #ffffff;          /* White Background */
    --bg-secondary: #f9fafb;        /* Light Gray Background */
    --bg-card: #ffffff;             /* Card Background */
    --bg-dark: #1f2937;             /* Dark Background */
    
    /* Text Colors */
    --text-primary: #1f2937;        /* Dark Gray Text */
    --text-secondary: #4b5563;      /* Medium Gray Text */
    --text-muted: #6b7280;          /* Muted Gray Text */
    --text-light: #ffffff;          /* White Text */
    --text-gradient: #ffffff;       /* White for gradient text */
    
    /* Border and Shadow */
    --border-color: #e5e7eb;        /* Light Border */
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 {
    font-size: 3rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px var(--shadow-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    flex-direction: column;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.brand-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: -0.2rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-blue);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

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

.lang-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.lang-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    color: var(--accent-primary);
}

/* Hero Section */
.hero {
    padding: 100px 0 40px;
    background: linear-gradient(135deg, #667eea 0%, #8911E0 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
    min-height: 350px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 3;
}

.hero-content {
    animation: fadeInUp 1s ease-out;
    color: #ffffff !important;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: #ffffff !important;
}

.greeting {
    display: block;
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: #ffffff !important;
}

.name {
    display: block;
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #ffffff !important;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #ffffff !important;
    line-height: 1.6;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease-out 0.3s both;
}

.profile-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.profile-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 3rem;
    color: white;
    overflow: hidden;
    position: relative;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.1);
}

.profile-info h3 {
    margin-bottom: 0.5rem;
    color: white;
}

.profile-info p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--accent-blue);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: var(--text-light);
    color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

/* Section Styles */
section {
    padding: 40px 0;
}

section:nth-child(even) {
    background: var(--bg-secondary);
}

section:nth-child(odd) {
    background: var(--bg-primary);
}

.section-title {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    color: var(--text-primary);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

/* About Section */
.about {
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: center;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.about-stats {
    display: grid;
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

/* Projects Section */
.projects {
    background: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.2);
    border-color: var(--accent-primary);
}

.project-image {
    background: var(--gradient-accent);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-primary);
    min-height: 150px;
}

.project-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.project-description {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.6;
}

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

.tech-tag {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-features {
    margin-bottom: 1.5rem;
}

.project-features ul {
    list-style: none;
    padding: 0;
}

.project-features li {
    padding: 0.5rem 0;
    color: #4b5563;
    position: relative;
    padding-left: 1.5rem;
}

.project-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

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

.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #1d4ed8;
}

/* Skills Section */
.skills {
    background: #f9fafb;
}

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

.skill-category {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.2);
}

.skill-category h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.skill-items {
    display: grid;
    gap: 1rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.skill-item:hover {
    background: var(--bg-primary);
    transform: translateX(5px);
    border-color: var(--accent-primary);
}

.skill-item i {
    font-size: 1.5rem;
    color: var(--accent-primary);
    width: 24px;
    text-align: center;
}

.skill-item span {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Experience Section */
.experience {
    background: white;
}

.experience-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

.experience-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 80px;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: 21px;
    top: 10px;
    width: 18px;
    height: 18px;
    background: var(--accent-primary);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 3px var(--border-color);
}

.experience-date {
    position: absolute;
    left: -60px;
    top: 0;
    background: var(--gradient-accent);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.experience-content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.experience-content h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.experience-content h4 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.experience-content ul {
    list-style: none;
    padding: 0;
}

.experience-content li {
    padding: 0.5rem 0;
    color: #4b5563;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.6;
}

.experience-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #2563eb;
    font-weight: bold;
}

/* Certifications Section */
.certifications {
    background: #f9fafb;
}

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

.certification-item {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.certification-item:hover {
    transform: translateY(-5px);
}

.cert-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.certification-item h3 {
    color: #1f2937;
    font-size: 1.1rem;
    line-height: 1.4;
}

/* Contact Section */
.contact {
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    display: grid;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-3px);
}

.contact-item i {
    font-size: 1.5rem;
    color: #2563eb;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.contact-item h3 {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: #6b7280;
    margin: 0;
}

.contact-form {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 20px;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: #6b7280;
    transition: all 0.3s ease;
    pointer-events: none;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -0.5rem;
    left: 0.5rem;
    font-size: 0.8rem;
    color: #2563eb;
    background: white;
    padding: 0 0.5rem;
}

/* Footer */
.footer {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-text p {
    margin: 0;
    color: var(--text-secondary);
}

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

.footer-links a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

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

/* Critical elements - ensure immediate visibility */
.hero, .navbar, .hero-content, .hero-image {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .project-card {
        min-height: auto;
    }
    
    .project-image {
        padding: 2rem;
        font-size: 3rem;
        min-height: 150px;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .experience-timeline::before {
        left: 15px;
    }
    
    .experience-item {
        padding-left: 50px;
    }
    
    .experience-item::before {
        left: 6px;
    }
    
    .experience-date {
        left: -10px;
        top: 50px;
        position: static;
        display: inline-block;
        margin-bottom: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Fix para asegurar que el hero tenga el gradiente correcto */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #8911E0 100%) !important;
}

.hero, .hero *, .hero *::before, .hero *::after {
    color: #ffffff !important;
}

.hero-description {
    color: rgba(255, 255, 255, 0.9) !important;
}
