/* --- Variables Globales --- */
:root {
    --bg-color: #0a0a0a;         /* Negro profundo */
    --surface-color: #16161a;    /* Gris muy oscuro para tarjetas */
    --primary-color: #7f5af0;    /* Morado vibrante */
    --secondary-color: #2cb67d;  /* Verde (opcional para contrastes de código) */
    --text-color: #fffffe;       /* Blanco */
    --gray-text: #94a1b2;        /* Gris para texto secundario */
}

/* --- Reset Básico --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* --- Navegación (Efecto Glassmorphism) --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.8); /* Transparencia */
    backdrop-filter: blur(10px);        /* Desenfoque */
    border-bottom: 1px solid rgba(127, 90, 240, 0.2);
}

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

.logo span {
    color: var(--primary-color);
}

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

.nav-links li {
    margin-left: 30px;
}

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

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color); /* Efecto Neón */
}

/* --- Sección Hero --- */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10%;
    gap: 50px;
    background: radial-gradient(circle at top right, rgba(127, 90, 240, 0.15), transparent 40%);
}

.hero-content {
    flex: 1;
}

.hero-content h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--gray-text);
    margin-bottom: 30px;
    max-width: 500px;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s ease;
}

.primary {
    background-color: var(--primary-color);
    color: var(--text-color);
    box-shadow: 0 0 20px rgba(127, 90, 240, 0.5); /* Sombra morada */
}

.primary:hover {
    background-color: #6246ea;
    transform: translateY(-3px);
}

.secondary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    margin-left: 15px;
}

.secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
}

/* --- Visual Decorativo (Simulación de Editor de Código) --- */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.profile-container {
    width: 350px;
    height: 350px;
    border-radius: 50%; /* Esto hace que la foto sea redonda */
    overflow: hidden;   /* Oculta lo que se salga del círculo */
    border: 4px solid var(--surface-color); /* Borde gris oscuro */
    
    /* El efecto de resplandor morado */
    box-shadow: 0 0 40px rgba(127, 90, 240, 0.4),
                inset 0 0 20px rgba(127, 90, 240, 0.2);
    
    /* Animación de flotación */
    animation: float 6s ease-in-out infinite;
}

.profile-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que la foto no se deforme/estire */
}

/* Animación Keyframes (Pégalo al final de tu CSS) */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px); /* Sube un poco */
    }
    100% {
        transform: translateY(0px);
    }
}

/* Ajuste Responsivo (Para celulares) */
@media (max-width: 768px) {
    .hero {
        flex-direction: column-reverse; /* Pone la foto arriba en celulares */
        text-align: center;
        height: auto;
        padding: 100px 5%;
    }

    .profile-container {
        width: 250px;
        height: 250px;
        margin-bottom: 30px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
}
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

code {
    color: var(--gray-text);
    display: block;
}

/* --- Sección Habilidades --- */
.skills-section {
    padding: 100px 10%;
    background-color: #050505; /* Un negro ligeramente más profundo para separar secciones */
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 10px auto;
    border-radius: 2px;
}

/* Contenedor Grid (Responsivo) */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Diseño de la Tarjeta */
.skill-card {
    background: var(--surface-color);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

/* Efecto Hover Neón */
.skill-card:hover {
    transform: translateY(-10px); /* Sube la tarjeta */
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(127, 90, 240, 0.2);
}

.card-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

/* Grid interno de etiquetas (Tags) */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Estilo de las etiquetas individuales */
.skills-grid span {
    background: rgba(127, 90, 240, 0.1);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace; /* Estilo código */
    border: 1px solid rgba(127, 90, 240, 0.2);
    transition: 0.3s;
}

/* Hover en las etiquetas */
.skills-grid span:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 10px var(--primary-color);
    cursor: default;
}

/* --- Sección Proyectos --- */
.projects-section {
    padding: 100px 10%;
    background-color: var(--bg-color);
}

.projects-container {
    display: flex;
    flex-direction: column;
    gap: 50px; /* Espacio entre proyectos */
}

.project-card {
    background: var(--surface-color);
    border-radius: 20px;
    overflow: hidden;
    display: flex; /* Diseño horizontal */
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
}

.project-card:hover {
    box-shadow: 0 0 30px rgba(127, 90, 240, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

/* Área de la Imagen (Placeholder) */
.project-image {
    flex: 1; /* Ocupa la mitad del espacio */
    min-height: 300px;
    background: #000;
    position: relative;
    overflow: hidden;
}

/* Simulación de imagen con degradados */
.img-placeholder {
    width: 100%;
    height: 100%;
    transition: 0.5s;
}

.overlay-gradient {
    background: linear-gradient(45deg, #1a1a1a, #2a1b3d);
}

.overlay-gradient-2 {
    background: linear-gradient(45deg, #1a1a1a, #1b3d32); /* Un toque verde oscuro para variar */
}

/* Efecto al pasar el mouse: el "zoom" */
.project-card:hover .img-placeholder {
    transform: scale(1.1);
}

/* Información del Proyecto */
.project-info {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.project-header h3 {
    font-size: 1.8rem;
    color: var(--text-color);
}

.project-tag {
    font-size: 0.8rem;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 5px 10px;
    border-radius: 20px;
}

.project-info p {
    color: var(--gray-text);
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Stack de Tecnologías en Proyecto */
.tech-stack {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tech-stack span {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* Botones pequeños para proyectos */
.btn-small {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: 0.3s;
    font-size: 0.9rem;
}

.btn-small:hover {
    background: #6246ea;
}

.btn-small.outline {
    background: transparent;
    border: 1px solid var(--text-color);
    margin-left: 10px;
}

.btn-small.outline:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

/* Responsive: En celular, la imagen va arriba */
@media (max-width: 900px) {
    .project-card {
        flex-direction: column;
    }
    
    .project-image {
        min-height: 200px;
    }
}

/* --- Estilos del Slider --- */
.slider-container {
    position: relative;
    overflow: hidden; /* Oculta las imágenes que se salen del marco */
    width: 100%;
    height: 100%; /* Toma la altura del padre */
    min-height: 300px;
}

.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.8s ease-in-out; /* Animación suave */
}

.slider-track img {
    min-width: 100%; /* Cada imagen ocupa el 100% del ancho visible */
    height: 100%;
    object-fit: cover; /* Recorta la imagen para llenar el espacio sin deformarse */
    object-position: top; /* Muestra la parte de arriba de la imagen */
}

/* --- Sección Contacto --- */
.contact-section {
    padding: 80px 10% 20px;
    background: linear-gradient(to top, #000, #0a0a0a);
    text-align: center;
}

.contact-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: linear-gradient(to right, var(--text-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; /* Efecto degradado en texto */
}

.contact-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 60px;
}

.contact-btn {
    background: var(--surface-color);
    color: var(--text-color);
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--primary-color);
    transition: 0.3s;
}

.contact-btn:hover {
    background: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
}

.contact-icon {
    font-size: 2rem;
    color: var(--gray-text);
    transition: 0.3s;
}

.contact-icon:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    color: var(--gray-text);
    font-size: 0.9rem;
}

/* --- Ajustes para botones con iconos --- */
.btn {
    display: inline-flex; /* Cambiamos a flex para alinear el icono */
    align-items: center;
    gap: 10px; /* Espacio entre texto e icono */
}

/* --- Estilo del botón CV en la barra de navegación --- */
.cv-btn {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    padding: 8px 18px;
    border-radius: 20px;
    color: var(--primary-color) !important; /* Forza el color */
    transition: 0.3s;
}

.cv-btn:hover {
    background-color: var(--primary-color);
    color: var(--text-color) !important;
    box-shadow: 0 0 15px rgba(127, 90, 240, 0.5);
}

/* Ajuste para móviles en la navegación */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 5%;
    }
    .nav-links li {
        margin-left: 15px;
    }
    .cv-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}

