/* ==========================================
   VARIABLES Y RESET
   ========================================== */
   :root {
    --c-purple: #7B2FF7;
    --c-green: #00F5A0;
    --c-dark: #050505;
    --c-light: #ffffff;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Oculta cursor por defecto */
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--c-dark);
    color: var(--c-light);
    font-family: var(--font-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--c-purple);
    color: var(--c-light);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.section-padding {
    padding: 10rem 0;
}

/* ==========================================
   CURSOR PERSONALIZADO
   ========================================== */
.custom-cursor {
    position: fixed;
    top: 0; left: 0;
    width: 20px; height: 20px;
    background-color: transparent;
    border: 2px solid var(--c-green);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    mix-blend-mode: difference;
}

.custom-cursor.hovered {
    width: 60px; height: 60px;
    background-color: rgba(123, 47, 247, 0.4);
    border-color: transparent;
    backdrop-filter: blur(4px);
}

.custom-cursor.view-project {
    width: 90px; height: 90px;
    background-color: var(--c-green);
    border-color: transparent;
    mix-blend-mode: normal;
}
.custom-cursor.view-project::after {
    content: 'VER';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: var(--c-dark);
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 2px;
}

/* ==========================================
   NAVBAR
   ========================================== */
.navbar {
    position: fixed;
    top: 0; width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(5,5,5,0.9) 0%, transparent 100%);
    backdrop-filter: blur(5px);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--c-light);
    text-decoration: none;
}

.nav-links a {
    color: var(--c-light);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}
.nav-links a:hover { color: var(--c-green); }

/* ==========================================
   1. HERO SECTION (Texto Centrado y Nueva Imagen)
   ========================================== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center; /* Centra el contenido horizontalmente */
    padding: 0 5%;
    position: relative;
    overflow: hidden;
    text-align: center; /* Alinea el texto al medio */
}

/* Nueva imagen abstracta 3D oscura + Filtro */
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Nueva imagen tecnológica y elegante */
    background: url('https://images.unsplash.com/photo-1614850523459-c2f4c699c52e?q=80&w=2564&auto=format&fit=crop') center/cover;
    z-index: -2;
    filter: brightness(0.35); /* Oscurecida para máximo contraste */
}

/* Overlay modificado: la luz ahora nace desde el centro */
.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 40%, rgba(123, 47, 247, 0.35), transparent 60%),
                radial-gradient(circle at 50% 100%, rgba(0, 245, 160, 0.15), transparent 50%),
                linear-gradient(to bottom, transparent 0%, var(--c-dark) 100%);
    z-index: -1;
    mix-blend-mode: screen;
}

.hero-content {
    max-width: 950px;
    /* El truco: añadimos 8rem de margen arriba para compensar la navbar */
    margin: 8rem auto 0; 
    display: flex;
    flex-direction: column;
    align-items: center; 
    animation: fadeUp 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title {
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
}

.hero-title span {
    background: linear-gradient(to right, #ffffff 20%, #7B2FF7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: #a0a0a0;
    margin-bottom: 3.5rem;
    max-width: 700px;
    line-height: 1.6;
}

/* El botón se mantiene igual, pero ahora se heredará el centrado */
.cta-btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: transparent;
    color: var(--c-light);
    border: 1px solid rgba(123, 47, 247, 0.5);
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.1rem;
    position: relative;
    transition: all 0.4s ease;
    overflow: hidden;
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(45deg, var(--c-purple), var(--c-green));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.cta-btn:hover {
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow: 0 15px 30px rgba(123, 47, 247, 0.4), 0 0 20px rgba(0, 245, 160, 0.2);
}
.cta-btn:hover::before { opacity: 1; }

@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(50px) scale(0.98); filter: blur(10px); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
/* ==========================================
   3. QUIÉNES SOMOS (Layout 2 Columnas)
   ========================================== */
.about-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem; /* Espacio entre el texto y el logo */
}

.about-content {
    flex: 1; /* Toma el espacio disponible */
    max-width: 800px;
    text-align: left; /* Alineamos el texto a la izquierda para mejor lectura */
}

.about-content .section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: -1px;
}

.about-text {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    line-height: 1.6;
    color: #a0a0a0;
}

.about-text strong {
    color: var(--c-light);
    font-weight: 600;
}

/* Contenedor del logo a la derecha */
.about-logo-container {
    flex-shrink: 0; /* Evita que el logo se aplaste */
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-logo {
    width: 240px; /* Logo más grande para equilibrar la columna */
    height: auto;
    animation: floatGlow 6s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(123, 47, 247, 0.3));
}

/* Animación de levitación y cambio de luz (Violeta <-> Verde) */
@keyframes floatGlow {
    0% { transform: translateY(0px); filter: drop-shadow(0 0 15px rgba(123, 47, 247, 0.4)); }
    50% { transform: translateY(-20px); filter: drop-shadow(0 0 30px rgba(0, 245, 160, 0.6)); }
    100% { transform: translateY(0px); filter: drop-shadow(0 0 15px rgba(123, 47, 247, 0.4)); }
}

/* Responsive para que en móviles no se vea roto */
@media (max-width: 992px) {
    .about-wrapper {
        flex-direction: column; /* Apila el texto arriba y el logo abajo */
        text-align: center;
        gap: 3rem;
    }
    
    .about-content {
        text-align: center; /* Centramos el texto de nuevo en móviles */
    }
}
/* ==========================================
   4. PROYECTOS (Reemplazar las clases de imagen por estas)
   ========================================== */
.project-img-wrapper {
    width: 100%; 
    height: 100%;
    overflow: hidden;
    position: relative;
}

.project-img {
    width: 100%; 
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
    /* Efecto inicial oscuro y desaturado */
    filter: grayscale(80%) brightness(0.6); 
}

.project-card:hover .project-img {
    transform: scale(1.08); /* Zoom interno suave */
    /* Recupera todo el color al hacer hover */
    filter: grayscale(0%) brightness(1); 
}

/* ==========================================
   4. PROYECTOS (CARRUSEL)
   ========================================== */
.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
}

.slider-controls {
    display: flex;
    gap: 1rem;
}

.slider-controls button {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--c-light);
    font-size: 1.5rem;
    transition: all 0.4s ease;
}

.slider-controls button:hover {
    border-color: var(--c-green);
    color: var(--c-green);
    transform: translateY(-3px);
}

.projects-slider {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    display: flex;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.projects-slider::-webkit-scrollbar { display: none; }

.projects-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 3rem;
    width: max-content;
    padding: 0 5%;
}

.project-card {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 600px;
    aspect-ratio: 16/10;
    flex-shrink: 0;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #111;
    scroll-snap-align: start;
}

/* Espacio oscuro premium para las imágenes (Placeholders) */
.project-img {
    width: 100%; height: 100%;
    background: linear-gradient(45deg, #1a1a1a, #0d0d0d);
    transition: transform 1s ease;
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

.project-info {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 3rem;
    background: linear-gradient(to top, rgba(5,5,5,0.95), transparent);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s ease;
}

.project-card:hover .project-info {
    transform: translateY(0);
    opacity: 1;
}

.project-info h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--c-purple);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ==========================================
   5. TECNOLOGÍAS (MARQUEE)
   ========================================== */
.tech-stack {
    background: #080808;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-track {
    display: inline-flex;
    gap: 4rem;
    padding-right: 4rem;
    animation: marquee 20s linear infinite;
}

.tech-item {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,0.2);
    text-transform: uppercase;
    transition: all 0.4s ease;
}

.tech-item:hover {
    color: var(--c-green);
    -webkit-text-stroke: 0px;
    text-shadow: 0 0 30px rgba(0, 245, 160, 0.4);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================
   6. COMENTARIOS
   ========================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4rem 3rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: transform 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    border-color: rgba(123, 47, 247, 0.3);
}

.quote {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #d0d0d0;
    margin-bottom: 2rem;
    font-style: italic;
}

.author {
    color: var(--c-green);
    font-weight: 600;
    letter-spacing: 1px;
}

/* ==========================================
   7. CONTACTO
   ========================================== */
.contact-title {
    font-size: clamp(3rem, 7vw, 6rem);
    line-height: 1;
    margin-bottom: 5rem;
}

.contact-title span { color: var(--c-purple); }

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.contact-method span {
    display: block;
    color: #a0a0a0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.big-link {
    display: block;
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: var(--c-light);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    width: max-content;
}

.big-link:hover {
    color: var(--c-green);
    transform: translateX(20px);
}

/* ==========================================
   8. FOOTER
   ========================================== */
footer {
    padding: 3rem 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    color: #a0a0a0;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 2.5rem; 
    align-items: center;
}

/* Alineación de Ícono + Texto */
.link-with-icon {
    display: flex;
    align-items: center;
    gap: 0.6rem; /* Espacio exacto entre el logo y el texto */
    color: var(--c-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.link-with-icon svg {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Animación elástica */
}

.link-with-icon:hover {
    color: var(--c-green);
}

/* El ícono hace un sutil pop-up al hacer hover */
.link-with-icon:hover svg {
    transform: scale(1.15) translateY(-2px);
}

/* Responsive para el Footer */
@media (max-width: 768px) {
    .footer-content { 
        flex-direction: column; 
        gap: 1.5rem; 
        text-align: center; 
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ==========================================
   ANIMACIONES DE SCROLL (REVEAL)
   ========================================== */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 { transition-delay: 0.2s; }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .projects-track { gap: 1.5rem; }
    .project-card { width: 85vw; }
    .testimonials-grid { grid-template-columns: 1fr; }
    .contact-title { margin-bottom: 3rem; }
    .footer-content { flex-direction: column; gap: 1rem; text-align: center; }
}