/* style.css — polished bright theme with animations */

:root {
    --accent-1: #4f46e5;
    --accent-2: #06b6d4;
    --muted: #6b7280;
    --glass: rgba(255, 255, 255, 0.8);
    --card: #ffffff;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
    --radius: 14px;
    --transition: 400ms cubic-bezier(.2, .9, .3, 1);
    --header-height: 3rem;
    --font-semi: 600;
    /*===== Colores =====*/
    /*Purple 260 - Red 355 - Blue 224 - Pink 340*/
    /* HSL color mode */
    --hue-color: 255;
    --first-color: hsl(var(--hue-color), 89%, 60%);
    --second-color: #3467cc;
    /*===== Fuente y tipografia =====*/
    --body-font: "Poppins", sans-serif;
    --big-font-size: 2rem;
    --h2-font-size: 1.25rem;
    --normal-font-size: .938rem;
    --smaller-font-size: .75rem;
    /*===== Margenes =====*/
    --mb-2: 1rem;
    --mb-4: 2rem;
    --mb-5: 2.5rem;
    --mb-6: 3rem;
    /*===== z index =====*/
    --z-back: -10;
    --z-fixed: 100;
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    background-color: #0f172a;
}


/* Brand square */

.brand-square {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    display: inline-block;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.12);
}


/* HERO */

.hero-section {
    position: relative;
    padding: 64px 0 48px;
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    right: -10%;
    top: -20%;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle at 20% 20%, rgba(79, 70, 229, 0.14), transparent 20%), radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.12), transparent 20%);
    filter: blur(48px);
    transform: translate3d(0, 0, 0);
    animation: float 9s ease-in-out infinite;
    z-index: 0;
}

@keyframes float {
    0% {
        transform: translateY(0)
    }
    50% {
        transform: translateY(-14px)
    }
    100% {
        transform: translateY(0)
    }
}

.hero-inner {
    position: relative;
    z-index: 1
}

.name-gradient {
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    color: transparent
}

.hero-title {
    letter-spacing: -0.02em
}


/* Cards */

.card-glass {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(15, 23, 42, 0.03);
}


/* Avatars / placeholders */

.avatar-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eef2ff, #e6fff7);
    box-shadow: inset 0 -8px 18px rgba(0, 0, 0, 0.02);
}

.avatar-large {
    width: 96px;
    height: 96px;
    border-radius: 16px;
    margin: 0 auto;
    background: linear-gradient(135deg, #eef2ff, #e6fff7);
}


/* stats */

.quick-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start
}

.stat-num {
    font-weight: 700;
    font-size: 1.15rem
}

.stat-small {
    font-size: 0.7rem;
    margin-left: 4px;
    color: var(--muted)
}

.stat-label {
    font-size: 0.85rem;
    color: var(--muted)
}


/* SKILLS */

.skill-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem
}

.skill-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .75rem;
    border-radius: 5px;
    background: #f1f5f9;
    border: 1px solid #e6edf6;
    font-weight: 600;
    font-size: .88rem;
    color: #0f172a;
    transform: translateY(6px);
    opacity: 0;
    transition: all var(--transition);
}

.skill-chip:hover {
    transform: scale(1.3)
}

.skill-chip.visible {
    transform: translateY(0) scale(1);
    opacity: 1;
    animation: pop .55s cubic-bezier(.2, .9, .3, 1)
}

@keyframes pop {
    0% {
        transform: scale(.86)
    }
    60% {
        transform: scale(1.06)
    }
    100% {
        transform: scale(1)
    }
}


/* skill meters */

.skill-meter {
    margin-bottom: .6rem
}

.meter-label {
    font-size: .85rem;
    color: var(--muted);
    margin-bottom: 6px
}

.meter {
    height: 9px;
    background: #eef3ff;
    border-radius: 999px;
    overflow: hidden
}

.meter-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    width: var(--value, 100%);
    /* transition: width 900ms cubic-bezier(.2, .9, .3, 1) */
}


/* TIMELINE */

.timeline {
    position: relative;
    padding-left: 18px
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent-1), var(--accent-2));
    border-radius: 6px;
    opacity: .25
}

.timeline-item {
    position: relative;
    padding-left: 18px
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 14px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.12)
}


/* PROJECT CARDS */

.project-card {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition)
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2)
}

.placeholder-img {
    height: 240px;
    width: 240px;
    background: linear-gradient(135deg, #f1f5f9, #eef2ff);
    display: block;
}

.project-card .p-3 {
    padding: 1rem
}


/* reveal animations */

.reveal-up {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 700ms ease, transform 700ms ease
}

.reveal-left {
    opacity: 0;
    transform: translateX(-36px);
    transition: opacity 700ms ease, transform 700ms ease
}

.reveal-up.visible,
.reveal-left.visible {
    opacity: 1;
    transform: none
}


/* small helpers */

.small {
    font-size: .9rem
}

.lead {
    color: #334155
}


/* back-to-top */

#backToTop {
    position: fixed;
    right: 20px;
    bottom: 22px;
    z-index: 999;
    border-radius: 10px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: opacity 280ms ease, transform 280ms ease;
    opacity: 0;
    pointer-events: none
}

#backToTop.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-6px)
}


/* responsive tweaks */

@media (max-width:991px) {
    .hero-inner {
        text-align: left
    }
    .hero-section {
        padding: 48px 0
    }
}

.footer {
    background-color: var(--second-color);
    color: #fff;
    text-align: center;
    font-weight: var(--font-semi);
    padding: 1rem 0;
}

.footer__title {
    font-size: 2rem;
    margin-bottom: var(--mb-4);
}

.footer__copy {
    font-size: var(--smaller-font-size);
}

@media print {
    header .links,
    footer {
        display: none;
    }
    /* hide buttons and footer */
    body {
        background: white;
        color: black;
    }
}

.footer-gradient {
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
}

#cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
}