* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e0e7ff; /* Un blanco azulado más vibrante, antes era 'white' que ya es claro */
    line-height: 1.6;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo h1 {
    color: #6366f1;
    font-size: 1.5rem;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #a7b7ff; /* Un tono ligeramente más vibrante para los enlaces de navegación */
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-links a:hover {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover::after {
    width: 100%;
}

#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(99,102,241,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #6366f1, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #e0e7ff; /* Hacemos este párrafo más vibrante también */
    min-height: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    color: white; /* Blanco puro para el texto del botón */
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.cta-button:hover::before {
    left: 100%;
}

section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

#about h2, #projects h2, #contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

#about h2::after, #projects h2::after, #contact h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    border-radius: 2px;
}

.skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(45deg, #6366f1, #8b5cf6, #ec4899);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
}

.skill-card:hover::before {
    transform: translateX(0);
}

.skill-card img {
    width: 100%;
    max-width: 150px;
    height: auto;
    border-radius: 10px;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.skill-card:hover img {
    transform: scale(1.05);
}

.skill-card h4 {
    color: #a7b7ff; /* Un azul más claro y vibrante para los títulos de las tarjetas */
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(167, 183, 255, 0.3); /* Sombra sutil para destacar */
}

.skill-card p {
    color: #c9d6f8; /* Un gris azulado más claro y con mejor contraste */
    line-height: 1.6;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
}

.project-card:hover::before {
    opacity: 1;
}

.project-content {
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.project-content h3 {
    color: #a7b7ff; /* Un azul más claro y vibrante para los títulos de proyectos */
    margin-bottom: 1rem;
    font-size: 1.3rem;
    text-shadow: 0 2px 10px rgba(167, 183, 255, 0.3); /* Sombra sutil para destacar */
}

.project-content img {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 15px;
    margin: 1rem 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.project-content:hover img {
    transform: scale(1.02);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.tag {
    background: rgba(99, 102, 241, 0.2);
    color: #9eb2ff; /* Un tono más claro para las etiquetas */
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.tag:hover {
    background: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info h3 {
    color: #a7b7ff; /* Color de título de contacto */
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.contact-info p {
    color: #c9d6f8; /* Color de párrafo de contacto */
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateX(5px);
}

.contact-item i {
    color: #9eb2ff; /* Iconos de contacto más claros */
    width: 20px;
    font-size: 1.2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #e0e7ff; /* Color de texto en inputs y textareas */
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6); /* Placeholder ligeramente más claro */
}

.submit-btn {
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

.submit-btn:hover::before {
    left: 100%;
}

footer {
    background: rgba(15, 23, 42, 0.8);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

footer p {
    color: #c9d6f8; /* Un poco más claro para el texto del footer */
    margin-bottom: 1rem;
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    color: #9eb2ff; /* Iconos sociales más claros */
    font-size: 1.5rem;
    margin: 0 1rem;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    width: 50px;
    height: 50px;
    line-height: 40px;
}

.social-links a:hover {
    color: white;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    transform: translateY(-3px) rotate(5deg);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    }
    to {
        text-shadow: 0 0 30px rgba(99, 102, 241, 0.8), 0 0 40px rgba(139, 92, 246, 0.5);
    }
}

@keyframes floatUp {
    to {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    section {
        padding: 3rem 1rem;
    }
    
    .skills {
        grid-template-columns: 1fr;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
}

/* Efectos adicionales para hacer el diseño más atractivo */
.skill-card, .project-card, .contact-item, .form-group input, .form-group textarea {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #8b5cf6, #ec4899);
}