/* ==========================================================
   style.css — estilos personalizados del portafolio
   (Tailwind CSS se carga por CDN en index.html y cubre todas
   las clases utilitarias; aquí solo va lo que Tailwind no
   resuelve con clases por defecto: fondos, animaciones,
   efectos y componentes con nombre propio)
   ========================================================== */

html {
    scroll-behavior: smooth;
}

body {
    background-color: #070d24;
    background-image:
        radial-gradient(circle at 15% 10%, rgba(91, 141, 239, 0.10), transparent 40%),
        radial-gradient(circle at 85% 25%, rgba(46, 230, 214, 0.08), transparent 40%),
        linear-gradient(180deg, #070d24 0%, #0a1330 100%);
    background-attachment: fixed;
}

::selection {
    background: #2ee6d6;
    color: #050a1a;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a1330;
}

::-webkit-scrollbar-thumb {
    background: #1a2a5e;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2ee6d6;
}

/* Grid de fondo en el hero */
.grid-overlay {
    background-image:
        linear-gradient(rgba(46, 230, 214, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(46, 230, 214, 0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 40%, transparent 100%);
}

/* Texto con degradado cian -> azul */
.text-gradient {
    background: linear-gradient(90deg, #2ee6d6 0%, #5b8def 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Tarjetas generales (about stats, skills, projects, timeline) */
.card {
    background: linear-gradient(180deg, rgba(16, 28, 68, 0.7) 0%, rgba(10, 19, 48, 0.7) 100%);
    border: 1px solid rgba(91, 141, 239, 0.15);
    backdrop-filter: blur(6px);
}

/* Subrayado animado de los links del navbar */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, #2ee6d6, #5b8def);
    transition: width .25s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: #2ee6d6;
}

/* Animación de aparición al hacer scroll (activada desde script.js) */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Cursor parpadeante de la terminal */
.blink-cursor {
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Tarjetas de proyectos */
.project-card {
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -20px rgba(46, 230, 214, 0.25);
    border-color: rgba(46, 230, 214, 0.4);
}

/* Chips de habilidades */
.skill-chip {
    transition: transform .2s ease, border-color .2s ease, color .2s ease;
}

.skill-chip:hover {
    transform: translateY(-3px);
    border-color: #2ee6d6;
    color: #2ee6d6;
}

/* Anillo giratorio del avatar en "Sobre mí" */
.avatar-ring {
    background: conic-gradient(from 0deg, #2ee6d6, #5b8def, #2ee6d6);
    animation: spin 6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Respeta preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {

    .avatar-ring,
    .blink-cursor {
        animation: none !important;
    }

    .reveal {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Línea del timeline de experiencia */
.timeline-line {
    background: linear-gradient(180deg, #2ee6d6 0%, rgba(46, 230, 214, 0) 100%);
}