:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #38bdf8;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    --gradient-3: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    overflow-x: hidden;
    background: var(--light);
}

html {
    scroll-behavior: smooth;
}

/* ========== NAVBAR ========== */
.navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    color: var(--secondary) !important;
    transform: scale(1.05);
}

.navbar-brand i {
    color: var(--secondary);
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: var(--secondary) !important;
}

/* ========== HERO SECTION ========== */
.hero-section {
    min-height: 100vh;
    background: #0a0f1e;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

/* Fondo animado con gradientes */
.hero-section::before {
    content: '';
    position: absolute;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    animation: pulse-glow 6s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
    animation: pulse-glow 8s ease-in-out infinite reverse;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
}

/* Grid de puntos decorativos */
.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
}

/* Líneas decorativas animadas */
.hero-particles::before {
    content: '';
    position: absolute;
    top: 20%;
    right: 5%;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 50%;
    animation: spin-slow 20s linear infinite;
}

.hero-particles::after {
    content: '';
    position: absolute;
    top: 15%;
    right: 8%;
    width: 200px;
    height: 200px;
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 50%;
    animation: spin-slow 14s linear infinite reverse;
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
}

/* Layout hero en dos columnas */
.hero-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    flex-wrap: wrap;
}

.hero-text-col {
    flex: 1;
    min-width: 280px;
    text-align: left;
}

.hero-image-col {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
}

/* Foto con efecto glow */
.profile-image-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto;
}

.profile-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.5) 0%, transparent 70%);
    animation: pulse-glow 4s ease-in-out infinite;
    z-index: 0;
}

.profile-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #2563eb, #38bdf8, #818cf8, #2563eb);
    padding: 4px;
    animation: rotate 6s linear infinite;
    z-index: 1;
}

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

.profile-image {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #0a0f1e;
    animation: floatImage 6s ease-in-out infinite;
}

/* Badges flotantes alrededor de la foto */
.hero-floating-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hero-floating-badge i {
    font-size: 1rem;
    color: var(--secondary);
}

.badge-top-left {
    top: 10%;
    left: -30%;
    animation: floatBadge1 5s ease-in-out infinite;
}

.badge-bottom-right {
    bottom: 10%;
    right: -30%;
    animation: floatBadge2 6s ease-in-out infinite;
}

.badge-bottom-left {
    bottom: 20%;
    left: -35%;
    animation: floatBadge1 7s ease-in-out infinite reverse;
}

@keyframes floatBadge1 {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    50% { transform: translateY(-8px) translateX(4px); }
}

@keyframes floatBadge2 {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    50% { transform: translateY(8px) translateX(-4px); }
}

@keyframes floatImage {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* Texto hero */
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(37, 99, 235, 0.4);
    border-radius: 50px;
    padding: 0.4rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-eyebrow span {
    width: 8px;
    height: 8px;
    background: var(--secondary);
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, #60a5fa, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.05rem;
    max-width: 560px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
}

/* Pills de especialidades */
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    margin: 0.25rem;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.badge-pill:hover {
    background: rgba(37, 99, 235, 0.3);
    border-color: rgba(56, 189, 248, 0.5);
    transform: translateY(-2px);
}

.hero-pills {
    margin-bottom: 2rem;
}

/* Botones */
.hero-buttons .btn {
    padding: 0.85rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.hero-buttons .btn-primary {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    border: none;
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4);
}

.hero-buttons .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.6);
}

.hero-buttons .btn-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.hero-buttons .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
    color: white;
}

/* Stats rápidos */
.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-stat-item {
    text-align: left;
}

.hero-stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.hero-stat-number span {
    color: var(--secondary);
}

.hero-stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.2rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-indicator a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.8rem;
    animation: bounce 2s infinite;
    text-decoration: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Responsive hero */
@media (max-width: 991px) {
    .hero-row {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-text-col {
        text-align: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-floating-badge {
        display: none;
    }

    .profile-image-wrapper {
        width: 220px;
        height: 220px;
    }
}

@media (max-width: 575px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        gap: 1.2rem;
    }

    .hero-stat-number {
        font-size: 1.4rem;
    }
}

/* ========== SECTIONS ========== */
.section-padding {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    position: relative;
    display: inline-block;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: var(--gradient-2);
    margin: 1rem auto;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
}

/* ========== PERFIL CARD ========== */
.profile-card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.profile-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
}

.profile-card .card-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--gray);
}

.profile-card .lead {
    color: var(--dark);
    font-weight: 500;
}

/* ========== SKILL CARDS ========== */
.skill-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.15);
}

.skill-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    color: white;
}

.skill-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: #eef2ff;
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

/* ========== EDUCATION CARDS ========== */
.bg-dark {
    background: var(--dark) !important;
}

.education-card {
    background: var(--dark-light);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.education-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(56, 189, 248, 0.2);
    border-color: var(--secondary);
}

.education-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: white;
}

.education-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #93c5fd;
    margin-bottom: 0.5rem;
}

.education-degree {
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

.education-institution {
    color: #cbd5e1;
    margin-bottom: 0.3rem;
}

.education-period {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.education-description {
    color: #e2e8f0;
    line-height: 1.7;
}

.education-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.education-list li {
    color: #e2e8f0;
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.education-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-size: 1.2rem;
}

/* ========== PROJECT CARDS ========== */
.project-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.15);
}

.project-badges {
    margin-bottom: 1rem;
}

.project-badges .badge {
    margin-right: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1rem;
}

.project-description {
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.project-highlights {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.project-highlights li {
    padding: 0.5rem 0;
    color: var(--gray);
}

.project-highlights i {
    color: var(--primary);
    margin-right: 0.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-badge {
    background: #eef2ff;
    color: var(--primary);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ========== CONTACT SECTION ========== */
.bg-gradient-dark {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
}

.contact-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 2.5rem 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(56, 189, 248, 0.2);
}

.contact-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.contact-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.8rem;
}

.contact-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    word-break: break-all;
    overflow-wrap: anywhere;
    display: block;
    font-size: 0.9rem;
    line-height: 1.4;
}

.contact-link:hover {
    color: white;
}

/* ========== FOOTER ========== */
.footer {
    background: var(--dark);
    color: white;
    padding: 2rem 0;
}

.footer p {
    margin: 0;
    font-size: 0.95rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 991px) {
    .section-title {
        font-size: 2rem;
    }
    
    .section-padding {
        padding: 60px 0;
    }
}

@media (max-width: 767px) {
    .hero-description {
        font-size: 1rem;
    }
    
    .badge-pill {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
    }
    
    .hero-buttons .btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .skill-card,
    .education-card,
    .project-card {
        padding: 1.5rem;
    }
}

@media (max-width: 575px) {
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
}
