/* === RESET & BASE === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

body {
    font-family: "Inter", sans-serif;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden
}

img,
svg {
    display: block;
    max-width: 100%
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem
}

/* === BOTÓN CTA === */
.btn-primary {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    background: #4f5bd5;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: .3s
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: #3c46b3;
}

/* === HERO === */
.hero {
    background: linear-gradient(135deg, #0d1127 0%, #0b1d3a 50%, #06172d 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, .12) 0, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, .12) 0, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 219, 255, .12) 0, transparent 50%);
    animation: float 20s ease-in-out infinite
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-25px)
    }
}


.hero-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
    align-items: center;
    z-index: 2
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem
}

.hero-description {
    font-size: 1rem;
    color: #d1d9e6;
}

.hero-visual {
    justify-self: center
}

.laptop-container {
    position: relative;
    transform: perspective(1000px) rotateX(15deg) rotateY(-10deg);
    animation: floatLaptop 6s ease-in-out infinite
}



@keyframes floatLaptop {

    0%,
    100% {
        transform: perspective(1000px) rotateX(15deg) rotateY(-10deg) translateY(0)
    }

    50% {
        transform: perspective(1000px) rotateX(15deg) rotateY(-10deg) translateY(-10px)
    }
}

.laptop {
    width: 300px;
    height: 200px;
    background: #2c3e50;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .3)
}

.screen {
    position: absolute;
    top: 15px;
    left: 20px;
    width: 260px;
    height: 160px;
    background: #1a1a2e;
    border-radius: 10px;
    overflow: hidden
}

.code-lines {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px
}

.line {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #00d4ff, #7b68ee, #ff6b6b);
    animation: typewriter 2s ease-in-out infinite
}

@keyframes typewriter {

    0%,
    50% {
        width: 0;
        opacity: 0
    }

    100% {
        opacity: 1
    }
}

.line:nth-child(odd) {
    width: 75%
}

.line:nth-child(even) {
    width: 55%
}

.keyboard {
    position: absolute;
    bottom: 0;
    left: 10px;
    width: 280px;
    height: 15px;
    background: linear-gradient(45deg, #34495e, #2c3e50);
    border-radius: 0 0 15px 15px
}

.floating-elements {
    position: absolute;
    inset: 0;
    pointer-events: none
}

.floating-card {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    animation: floatCard 4s ease-in-out infinite
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-15px)rotate(5deg)
    }
}

.card-1 {
    top: -30px;
    left: -40px;
    color: #61dafb;
    animation-delay: .2s
}

.card-2 {
    top: -20px;
    right: -50px;
    color: #f7df1e;
    animation-delay: 1s
}

.card-3 {
    bottom: -40px;
    left: -30px;
    color: #3776ab;
    animation-delay: 1.8s
}

.card-4 {
    bottom: -30px;
    right: -40px;
    color: #fff;
    animation-delay: 2.6s
}

/* Separador curva */
.curve-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0
}

/* === SECCIÓN PROYECTOS === */
.projects {
    background: #f8f9fa;
    padding: 6rem 0
}

.section-title {
    font-size: 2.4rem;
    text-align: center;
    color: #2c3e50;
    margin-bottom: .5rem
}

.section-subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 3rem
}

.projects-grid {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr))
}

.project-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .1);
    transform: translateY(50px);
    opacity: 0;
    transition: .3s
    
}

.project-card.animate-in {
    animation: slideInUp .8s forwards
}

@keyframes slideInUp {
    to {
        transform: translateY(0);
        opacity: 1
    }
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .15)
}

.project-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%)
}

.project-mockup {
    width: 200px;
    height: 140px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center
}

.mockup-content {
    width: 100%;
    padding: 1rem;
    text-align: center
}

.mockup-header {
    font-size: 12px;
    color: #666;
    margin-bottom: .5rem
}

.mockup-title {
    font-weight: 700
}

.mockup-body h3 {
    font-size: 18px;
    color: #333
}

.project-info {
    padding: 2rem
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: .6rem;
    color: #2c3e50
}

.project-info p {
    color: #7f8c8d;
    margin-bottom: 1.2rem
}

.project-links {
    display: flex;
    gap: 12px;
    margin-top: auto
}

.project-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f4f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    text-decoration: none;
    transition: .3s
}

.project-link:hover {
    background: #667eea;
    color: #fff;
    transform: translateY(-2px)
}

.project-link.disabled {
    cursor: default;
    opacity: .4
}

/* === FOOTER === */
.footer {
    background: #1a1a2e;
    color: #fff;
    padding: 2rem 0;
    text-align: center
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem
}

.social-links {
    display: flex;
    gap: 1rem
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: .3s
}

.social-link:hover {
    background: rgba(255, 255, 255, .2);
    transform: translateY(-2px)
}

/* === RESPONSIVE === */
@media(max-width:768px) {
    .hero-title {
        font-size: 2.2rem
    }

    .projects {
        padding: 4rem 0
    }
}

@media(max-width:480px) {
    .projects-grid {
        grid-template-columns: 1fr
    }
}

/* === HERO chips y botones extra === */
.skill-chips {
    margin: 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem
}

.chip {
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff;
    padding: .35rem .75rem;
    border-radius: 9999px;
    font-size: .85rem
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem
}


/* ---------- mejoras botones sociales ---------- */
:root {
    --gh: #8b5cf6;
    /* morado para GitHub (juego con tu primario)  */
    --li: #0a66c2;
    /* azul oficial LinkedIn                       */
}

/* base */
.btn-social {
    display: inline-flex;
    margin-top: 2rem;
    align-items: center;
    gap: .5rem;
    padding: .55rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: .3s;
    backdrop-filter: blur(4px);
    background: rgba(255, 255, 255, .03);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: #3c46b3;
}


/* icono */
.btn-social i {
    font-size: 1.2rem;
    transition: .3s
}

/* GitHub */
.btn-social.github {
    border: 2px solid var(--gh);
    color: var(--gh);
}

.btn-social.github:hover {
    background: var(--gh);
    color: #fff;
    transform: translateY(-3px);
}

/* LinkedIn */
.btn-social.linkedin {
    border: 2px solid var(--li);
    color: var(--li);
}

.btn-social.linkedin:hover {
    background: var(--li);
    color: #fff;
    transform: translateY(-3px);
}

/* foco claro para accesibilidad */
.btn-social:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px
}