/* ==========================================
   1. VARIABLES DE COLOR Y REINICIO DE ESTILOS
   ========================================== */
:root {
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --primary-red: #ff0033;
    --primary-red-hover: #cc0029;
    --text-light: #ffffff;
    --text-muted: #a0a0a0;
    --border-color: #262626;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-main);
    line-height: 1.6;
    cursor: none; /* Oculta el cursor nativo del navegador */
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-title span {
    color: var(--primary-red);
}

/* ==========================================
   2. CURSOR PERSONALIZADO (LOGOTIPO)
   ========================================== */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 35px;
    height: 35px;
    pointer-events: none; /* Evita bloquear clics en elementos de la página */
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease-out;
}

.custom-cursor img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 5px var(--primary-red));
}

/* ==========================================
   3. NAVEGACIÓN
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo span {
    color: var(--primary-red);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-red);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==========================================
   4. SECCIÓN HERO
   ========================================== */
.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    background: radial-gradient(circle at center, #1f0508 0%, var(--bg-dark) 70%);
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-content h1 span {
    color: var(--primary-red);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0 10px;
}

.btn-primary {
    background-color: var(--primary-red);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: var(--primary-red-hover);
    box-shadow: 0 0 15px rgba(255, 0, 51, 0.5);
}

.btn-secondary {
    border: 2px solid var(--text-light);
    color: var(--text-light);
}

.btn-secondary:hover {
    background-color: var(--text-light);
    color: var(--bg-dark);
}
/* ==========================================
   ANIMACIÓN EXCLUSIVA PARA LA SECCIÓN INICIO (HERO)
   ========================================== */

.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    overflow: hidden;

    /* Fondo animado: luz roja neón central sobre fondo oscuro */
    background: radial-gradient(circle at 50% 50%, rgba(255, 0, 51, 0.25), rgba(10, 10, 10, 0.98) 75%);
    background-size: 180% 180%;
    animation: heroPulse 8s ease-in-out infinite alternate;
}

/* Trama de cuadrícula (Grid) futurista para la portada */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 1;
}

/* Asegura que el título, descripción y botones queden al frente */
.hero-content {
    position: relative;
    z-index: 2;
}

/* Animación de la luz de fondo */
@keyframes heroPulse {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ==========================================
   5. SECCIÓN NOSOTROS Y SERVICIOS
   ========================================== */
.about-section, .services-section, .portfolio-section, .contact-section {
    padding: 6rem 0;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.tech-stack span {
    display: inline-block;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    margin-right: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
     }

.tech-stack i {
    color: var(--primary-red);
    margin-right: 5px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-red);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-red);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-muted);
}

/* ==========================================
   6. SECCIÓN PORTAFOLIO Y CONTACTO
   ========================================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.portfolio-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.portfolio-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-info h3 {
    margin-bottom: 0.5rem;
}

.portfolio-info p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.portfolio-link {
    color: var(--primary-red);
    font-weight: 600;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    border-radius: 4px;
    font-family: inherit;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-red);
}

/* ==========================================
   7. FOOTER
   ========================================== */
footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-links a {
    font-size: 1.2rem;
    margin-left: 1rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-red);
}

/* ==========================================
   CANVAS DE FONDO ANIMADO
   ========================================== */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; /* Mantiene la animación detrás de todo el contenido */
    pointer-events: none;
    background-color: var(--bg-dark); /* Color de fondo base */
}

/* OPCIONAL: Si prefieres poner una imagen fija de fondo con overlay oscuro */
/*
body {
    background: linear-gradient(rgba(10, 10, 10, 0.85), rgba(10, 10, 10, 0.85)), 
                url('imagen-de-fondo.jpg') no-repeat center center fixed;
    background-size: cover;
}
*/

/* ==========================================
   ANIMACIÓN DE FONDO PARA SECCIONES (<section>)
   ========================================== */

/* 1. Fondo animado con degradado suave en movimiento */
.about-section, 
.services-section, 
.portfolio-section, 
.contact-section {
    position: relative;
    padding: 6rem 0;
    overflow: hidden;
    /* Color base oscuro + luz roja difuminada que se mueve */
    background: radial-gradient(circle at 50% 50%, rgba(255, 0, 51, 0.15), rgba(10, 10, 10, 0.95) 70%);
    background-size: 200% 200%;
    animation: gradientMove 10s ease infinite alternate;
}

/* 2. Textura tipo Malla/Grid Tecnológico encima del fondo */
.about-section::before, 
.services-section::before, 
.portfolio-section::before, 
.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dibuja líneas finas que forman una cuadrícula */
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px; /* Tamaño de la cuadrícula */
    pointer-events: none;
    z-index: 0;
}

/* Asegura que el contenido (texto y tarjetas) quede sobre la animación */
.about-section .container,
.services-section .container,
.portfolio-section .container,
.contact-section .container {
    position: relative;
    z-index: 1;
}

/* 3. Keyframes: Movimiento fluido del degradado */
@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}