@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800&display=swap');

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    text-decoration:none;
    border:none;
    outline:none;
    font-family:'Poppins', sans-serif;
}

html{
    font-size:62.5%;
    scroll-behavior:smooth;
}

body{
    width:100%;
    min-height:100vh;
    overflow-x:hidden;
    background:#000;
    color:#fff;
}

/* ================= HEADER ================= */

header{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    padding:1.5rem 9%;
    display:flex;
    justify-content:flex-end; /* menú alineado a la derecha */
    align-items:center;
    z-index:1000;
    background:rgba(0,0,0,0.85);
    backdrop-filter:blur(8px);
}

.logo{
    display:none; /* oculta el texto "Dani" */
}

nav{
    display:flex;
    flex-wrap:wrap;
    gap:1rem;
}

nav a{
    font-size:1.6rem;
    color:#fff;
    padding:.5rem 1rem;
    border-bottom:3px solid transparent;
    transition:.3s ease;
}

nav a:hover,
nav a.active{
    color:#b74b4b;
    border-bottom:3px solid #b74b4b;
}

/* ================= MAIN ================= */

main{
    padding:10rem 9% 6rem;
    min-height:100vh;
}

/* ================= HOME ================= */

.home{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10rem;
    min-height:calc(100vh - 10rem);
}

.home-content{
    max-width:720px;
}

.home-img img{
    width:32vw;
    max-width:380px;
    border-radius:50%;
    border:4px solid #b74b4b;
    box-shadow:0 0 30px rgba(183,75,75,.6);
}

.home-content h1{
    font-size:5.6rem;
    line-height:1.2;
    margin-bottom:1rem;
}

.home-content h1 span{
    color:#b74b4b;
}

h2{
    font-size:4.2rem;
    margin-bottom:2rem;
    color:#b74b4b;
}

h3{
    font-size:3rem;
    margin-bottom:1.5rem;
}

.typing-text{
    font-size:3rem;
    margin-bottom:1.5rem;
    font-weight:600;
}

.typing-text span{
    position:relative;
    color:#b74b4b;
}

.typing-text span::before{
    content:"Desarrollador Web";
    color:#b74b4b;
    animation:words 12s infinite;
}

.typing-text span::after{
    content:"";
    position:absolute;
    top:0;
    right:-8px;
    width:2px;
    height:100%;
    background:#b74b4b;
    animation:cursor .8s infinite;
}

.home-content p,
p,
li{
    font-size:1.7rem;
    line-height:1.8;
    color:#ddd;
}

.home-content p{
    max-width:850px;
    margin-bottom:3rem;
}

/* ================= BOTONES ================= */

.hero-buttons{
    display:flex;
    gap:1.5rem;
    flex-wrap:wrap;
    margin-bottom:2.5rem;
}

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:1.2rem 3rem;
    border-radius:4rem;
    border:2px solid #b74b4b;
    color:#b74b4b;
    font-size:1.6rem;
    font-weight:600;
    letter-spacing:.2rem;
    transition:.3s ease;
}

.btn:hover{
    background:#b74b4b;
    color:#000;
    transform:translateY(-4px) scale(1.05);
    box-shadow:0 0 25px #b74b4b;
}

/* ================= CONTACTO ================= */

.contacto-hero{
    margin-top:1rem;
}

.contact-links{
    display:flex;
    align-items:center;
    gap:2.5rem;
    flex-wrap:wrap;
}

.contact-links a{
    display:inline-flex;
    align-items:center;
    gap:.6rem;
    font-size:1.8rem;
    color:#fff;
    transition:.3s ease;
}

.contact-links a i{
    color:#b74b4b;
}

.contact-links a:hover{
    color:#b74b4b;
    transform:translateY(-2px);
}

/* ================= TARJETAS ================= */

.card{
    background:#111;
    border:1px solid rgba(183,75,75,.35);
    border-radius:2rem;
    padding:3rem;
    box-shadow:0 0 25px rgba(183,75,75,.08);
}

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

/* ================= LISTAS ================= */

.list{
    padding-left:2rem;
}

.list li{
    margin-bottom:1rem;
}

.contact-item{
    font-size:1.8rem;
    margin-bottom:1.5rem;
}

/* ================= SOCIAL ICONS ================= */

.social-icons a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:4.5rem;
    height:4.5rem;
    margin:3rem 1.5rem 3rem 0;
    border-radius:50%;
    border:.2rem solid #b74b4b;
    color:#b74b4b;
    font-size:2rem;
    transition:.3s ease;
}

.social-icons a:hover{
    background:#b74b4b;
    color:#000;
    transform:translateY(-4px) scale(1.05);
    box-shadow:0 0 25px #b74b4b;
}

/* ================= REVEAL ================= */

.reveal{
    opacity:0;
    transform:translateY(40px);
    transition:all .8s ease;
}

.reveal.visible{
    opacity:1;
    transform:translateY(0);
}

/* ================= FOOTER ================= */

.footer{
    text-align:center;
    padding:3rem 2rem;
    border-top:1px solid rgba(183,75,75,.2);
    background:#000;
}

.footer p{
    font-size:1.4rem;
    color:#888;
}

/* ================= ANIMACIONES ================= */

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

@keyframes words{
    0%, 20%{
        content:"Desarrollador Web";
    }
    21%, 40%{
        content:"Estudiante DAW";
    }
    41%, 60%{
        content:"Técnico Informático";
    }
    61%, 80%{
        content:"Desarrollador Full Stack";
    }
    81%, 100%{
        content:"Apasionado por la Tecnología";
    }
}

/* ================= RESPONSIVE ================= */

@media(max-width:995px){
    html{
        font-size:56%;
    }

    .home{
        flex-direction:column;
        text-align:center;
        gap:4rem;
    }

    .home-img img{
        width:70vw;
        max-width:320px;
    }

    nav{
        justify-content:center;
    }

    .hero-buttons,
    .contact-links{
        justify-content:center;
    }
}