html, body {
    margin: 0 !important;
    padding: 0 !important;
    height: 100vh;
    width: 100vw;
    overflow-x: hidden;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --accent-red: #dc2626;
    --accent-red-light: #ef4444;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --glass: rgba(255,255,255,0.05);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Inter', sans-serif; 
    background: 
        radial-gradient(ellipse farthest-corner at 10% 90%, rgba(220,38,38,0.12) 0%, transparent 50%),
        radial-gradient(ellipse farthest-corner at 90% 10%, rgba(220,38,38,0.12) 0%, transparent 50%),
        linear-gradient(135deg, #0f0a0a 0%, #1a0f0f 50%, #0a0a0a 100%);
    background-attachment: fixed;
    color: var(--text-primary); 
    scroll-behavior: smooth;
}

.navbar { 
    position: fixed; top: 0; width: 100vw; 
    background: rgba(10,10,10,0.98); 
    backdrop-filter: blur(20px); 
    z-index: 1000; 
    padding: 1rem 0; 
    box-shadow: 0 4px 20px rgba(220,38,38,0.1);
}
.nav-container { max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 2rem; }
.nav-logo { font-size: 1.8rem; font-weight: 800; background: linear-gradient(45deg, var(--accent-red), #ffffff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-decoration: none; }
.nav-menu { display: flex; list-style: none; gap: 2.5rem; }
.nav-menu a { color: var(--text-secondary); text-decoration: none; font-weight: 500; transition: all 0.3s ease; display: flex; align-items: center; gap: 0.5rem; }
.nav-menu a:hover { color: var(--accent-red); text-shadow: 0 0 15px var(--accent-red-light); }

.hero { 
    height: 100vh; 
    display: flex; align-items: center; justify-content: center; 
    text-align: center; padding: 0 2rem; 
    position: relative;
}
.particles { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.hero-photo { width: 180px; height: 180px; border-radius: 50%; border: 4px solid var(--accent-red); margin-bottom: 2rem; box-shadow: 0 20px 40px rgba(220,38,38,0.3); animation: float 6s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-10px);} }
.hero-content h1 { font-size: 4.5rem; font-weight: 800; margin-bottom: 1rem; background: linear-gradient(45deg, var(--accent-red), #ffffff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-content h2 { font-size: 1.8rem; margin-bottom: 1rem; opacity: 0.9; }
.hero-content p { font-size: 1.3rem; margin-bottom: 3rem; opacity: 0.8; }
.btn-primary, .btn-secondary { 
    padding: 1.2rem 2.5rem; margin: 0 1rem; 
    text-decoration: none; border-radius: 50px; 
    font-weight: 600; font-size: 1.1rem; 
    transition: all 0.4s cubic-bezier(0.25,0.46,0.45,0.94); 
    position: relative; overflow: hidden;
}
.btn-primary { 
    background: linear-gradient(45deg, var(--accent-red), var(--accent-red-light)); 
    color: white; box-shadow: 0 10px 30px rgba(220,38,38,0.4);
}
.btn-primary:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 20px 40px rgba(220,38,38,0.6); }
.btn-secondary { 
    border: 2px solid var(--accent-red); 
    color: var(--accent-red); background: transparent;
}
.btn-secondary:hover { background: var(--accent-red); color: white; transform: translateY(-3px); }
.hero-badges { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.badge { background: rgba(220,38,38,0.2); color: var(--accent-red); padding: 0.5rem 1.5rem; border-radius: 25px; font-size: 0.9rem; font-weight: 500; border: 1px solid rgba(220,38,38,0.3); }

section { padding: 6rem 2rem; max-width: 1400px; margin: 0 auto; }
h2 { font-size: 3.5rem; text-align: center; margin-bottom: 5rem; position: relative; }
h2::after { content: ''; position: absolute; bottom: -1rem; left: 50%; transform: translateX(-50%); width: 80px; height: 4px; background: linear-gradient(90deg, var(--accent-red), transparent); }

.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2.5rem; }
.skill-item { text-align: center; padding: 3rem 2rem; background: var(--glass); backdrop-filter: blur(20px); border-radius: 25px; border: 1px solid rgba(220,38,38,0.2); transition: all 0.4s ease; cursor: pointer; }
.skill-item:hover { transform: translateY(-15px) rotateX(5deg); box-shadow: 0 30px 60px rgba(220,38,38,0.2); border-color: var(--accent-red); }
.skill-item i { font-size: 4rem; color: var(--accent-red); margin-bottom: 1.5rem; }
.skill-item h3 { font-size: 1.5rem; margin-bottom: 1rem; }

.proyectos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 3rem; }
.proyecto-card { 
    background: var(--glass); backdrop-filter: blur(20px); 
    border-radius: 25px; padding: 3rem; 
    border: 1px solid rgba(220,38,38,0.15); 
    transition: all 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
    position: relative; overflow: hidden;
}
.proyecto-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--accent-red), transparent); }
.proyecto-card:hover { 
    transform: translateY(-20px) rotateX(8deg) scale(1.02); 
    box-shadow: 0 40px 80px rgba(220,38,38,0.25); 
    border-color: var(--accent-red);
}
.card-header h3 { color: white; font-size: 1.8rem; margin-bottom: 1rem; }
.tech-tags { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.tech-tags span { background: rgba(220,38,38,0.2); color: var(--accent-red); padding: 0.3rem 1rem; border-radius: 20px; font-size: 0.85rem; font-weight: 500; }
.card-links { display: flex; gap: 1rem; margin-top: 2rem; }
.git-link, .demo-link { 
    color: var(--accent-red); text-decoration: none; 
    font-weight: 600; display: flex; align-items: center; gap: 0.5rem;
    transition: all 0.3s;
}
.git-link:hover, .demo-link:hover { color: white; text-shadow: 0 0 15px var(--accent-red); transform: translateX(5px); }

.timeline { position: relative; max-width: 1000px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; left: 50%; width: 3px; height: 100%; background: linear-gradient(to bottom, var(--accent-red), transparent); transform: translateX(-50%); }
.timeline-item { position: relative; margin: 4rem 0; }
.timeline-item.right { left: 0; }
.timeline-item.left { left: 50%; }
.timeline-content { 
    background: var(--glass); padding: 2.5rem; 
    border-radius: 20px; border: 1px solid rgba(220,38,38,0.2);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    max-width: 450px; position: relative;
}
.timeline-item.right .timeline-content { margin-left: 50px; }
.timeline-item.left .timeline-content { margin-left: -50px; margin-right: 50px; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin: 3rem 0; }
.contact-item { 
    display: flex; align-items: center; gap: 1.5rem; 
    padding: 2rem; background: var(--glass); 
    border-radius: 20px; text-decoration: none; 
    border: 1px solid rgba(220,38,38,0.2); 
    transition: all 0.3s; color: var(--text-primary);
}
.contact-item:hover { 
    background: rgba(220,38,38,0.1); 
    border-color: var(--accent-red); 
    transform: translateY(-5px); box-shadow: 0 15px 30px rgba(220,38,38,0.2);
}
.contact-item i { font-size: 2.5rem; color: var(--accent-red); width: 60px; text-align: center; }
.footer { text-align: center; opacity: 0.7; font-size: 0.9rem; margin-top: 3rem; }

@media (max-width: 768px) {
    .hero-content h1 { font-size: 3rem; }
    .nav-menu { display: none; }
    .timeline::before { left: 20px; }
    .timeline-item.left { left: 0; }
    .timeline-item.right .timeline-content { margin-left: 60px; }
}
