body {
    font-family: 'Inter', sans-serif;
    color: #e2e8f0;
    background-color: #0a0a0a; /* Color de respaldo */
    position: relative;
    overflow-x: hidden;
    /* Fondo de rejilla con efecto Parallax (controlado por JS) */
    background-image: 
        linear-gradient(to right, rgba(30, 41, 59, 0.2) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(30, 41, 59, 0.2) 1px, transparent 1px);
    background-size: 40px 40px;
    background-attachment: fixed;
}

/* Color de acento para botones y enlaces */
.accent-color {
    background-color: #7c3aed; /* Violeta Eléctrico */
}
.accent-color-hover:hover {
    background-color: #6d28d9;
}
.border-color {
    border-color: #1e293b; /* Borde gris oscuro azulado */
}

/* Estilo de tarjeta con borde gradiente */
.card-bg {
    background-color: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(5px);
}

/* Estilos para el slider */
.slider-button.hidden {
    display: none;
}

/* Estilo de resplandor para el nombre */
.name-glow {
    text-shadow: 0 0 8px rgba(226, 232, 240, 0.2); /* Resplandor blanco sutil */
}

.name-glow:hover {
    text-shadow: 0 0 16px rgba(124, 58, 237, 0.8); /* Resplandor violeta intenso */
}

/* Clase para la fuente cursiva del nombre */
.font-cursive {
    font-family: 'Dancing Script', cursive;
}

/* Clase para títulos principales (Jerarquía Visual) */
.font-heading {
    font-family: 'Poppins', sans-serif;
}

/* Clase para la fuente monoespaciada */
.font-mono {
    font-family: 'Roboto Mono', monospace;
    letter-spacing: -0.025em;
}

/* Estilo de resplandor para títulos de sección */
.section-title {
    text-shadow: 0 0 12px rgba(124, 58, 237, 0.3);
    letter-spacing: 0.025em; /* Espaciado de letra ligeramente más amplio */
}

/* --- EFECTO 3D Y ANIMACIÓN PARA EL TÍTULO HERO --- */
.hero-title-effect {
    /* Efecto de texto con gradiente animado */
    background: linear-gradient(90deg, #6d28d9, #a78bfa, #6d28d9); /* Gradiente Violeta */
    background-size: 200% auto; /* Tamaño del fondo para la animación */
    color: #fff; /* Color de texto base */
    background-clip: text;
    -webkit-background-clip: text; /* Para compatibilidad con Chrome/Safari */
    -webkit-text-fill-color: transparent; /* Hace el texto transparente para mostrar el fondo */
    animation: text-shimmer 5s linear infinite; /* Animación del brillo */
}

@keyframes text-shimmer {
    to {
        background-position: -200% center;
    }
}

/* --- ANIMACIONES Y EFECTOS --- */

/* Animación de entrada para secciones */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Transición suave para el efecto de elevación */
.card-lift {
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
    border: 1px solid #1e293b; /* Borde sutil y oscuro */
    background-color: rgba(17, 24, 39, 0.5); /* Fondo oscuro semi-transparente */
    backdrop-filter: blur(10px);
    overflow: hidden; /* Para contener el efecto de spotlight */
}

.card-lift::before {
    content: '';
    position: absolute;
    /* Posición controlada por JS con variables CSS */
    left: var(--x, 50%);
    top: var(--y, 50%);
    width: 300px; /* Tamaño del resplandor */
    height: 300px;
    background: radial-gradient(circle closest-side, rgba(124, 58, 237, 0.3), transparent);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

/* Efecto de elevación en tarjetas al pasar el cursor */
.card-lift:hover {
    transform: translateY(-8px);
    border-color: rgba(124, 58, 237, 0.4);
}

.card-lift:hover::before {
    opacity: 1;
}

/* --- EFECTO DE CURSOR AVANZADO --- */
body, a, button, select {
    cursor: none;
}

#cursor-glow {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.5) 0%, rgba(124, 58, 237, 0) 60%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    will-change: transform;
}

/* Transición para el efecto magnético */
.magnetic-effect {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Estilo para el texto de descripción de proyectos */
.project-description {
    line-height: 1.75; /* Aumenta el espacio entre líneas para facilitar la lectura */
    color: #cbd5e1;    /* Un gris ligeramente más claro (slate-300) para mejor contraste */
}

/* Estilo para las etiquetas de tecnología */
.tech-tag {
    background-color: rgba(124, 58, 237, 0.15);
    color: #c4b5fd; /* Violeta claro */
    font-family: 'Roboto Mono', monospace;
    padding: 0.2rem 0.6rem; /* Ligeramente más pequeño */
    border-radius: 9999px;
    font-size: 0.75rem; /* Texto más pequeño para jerarquía */
    font-weight: 500;
    border: 1px solid rgba(124, 58, 237, 0.3); /* Borde sutil */
    transition: all 0.2s ease;
}

.tech-tag:hover {
    background-color: rgba(124, 58, 237, 0.3);
    transform: scale(1.05);
    color: #fff;
}

/* --- SECCIÓN CTA (CIERRE FUERTE) --- */
.cta-section {
    /* Gradiente radial suave desde abajo para resaltar los botones */
    background: radial-gradient(circle at center bottom, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
    border-top: 1px solid rgba(124, 58, 237, 0.2); /* Borde sutil violeta */
    position: relative;
}

/* Efecto de luz superior en el centro del borde */
.cta-section::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.8), transparent);
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.5);
}

/* --- LIGHTBOX (ZOOM DE IMÁGENES) --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.3); /* Sombra violeta sutil */
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: #7c3aed; /* Accent color */
}

/* Cursor para imágenes ampliables */
.cursor-zoom-in {
    cursor: zoom-in;
}

/* --- ANIMACIONES FLOTANTES (HERO) --- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.animate-float-slow {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float 7s ease-in-out infinite 2s; /* Retraso para que no se muevan igual */
}

/* --- ESTILOS DE ACORDEÓN PARA PROYECTOS --- */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.accordion-item.active .accordion-content {
    max-height: 1000px; /* Suficiente para el contenido */
    opacity: 1;
    padding-bottom: 1rem;
}

.accordion-item.active .chevron-icon {
    transform: rotate(180deg);
}

/* --- ESTILO DE LA INSIGNIA AI --- */
.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(124, 58, 237, 0.1);
    color: #a78bfa;
    border: 1px solid rgba(124, 58, 237, 0.3);
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.1);
}

/* --- CHATBOT STYLES --- */
.chat-msg {
    max-width: 80%;
    padding: 0.75rem;
    border-radius: 1rem;
    line-height: 1.4;
}
.msg-ai {
    align-self: flex-start;
    background: rgba(30, 41, 59, 0.7);
    color: #e2e8f0;
    border-bottom-left-radius: 0.2rem;
}
.msg-user {
    align-self: flex-end;
    background: #7c3aed;
    color: white;
    border-bottom-right-radius: 0.2rem;
}

/* --- ENLACES ESTILIZADOS (REEMPLAZO DE BOTONES) --- */
.stylish-link {
    background: transparent !important;
    border: none !important;
    color: #cbd5e1; /* slate-300 */
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease, transform 0.3s ease;
}

.stylish-link:hover {
    color: #a78bfa; /* Violeta claro */
}

.stylish-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #7c3aed;
    transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

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