/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #fff;
    background: #1f242d;
    overflow-x: hidden;
    position: relative;
}

/* Fondo animado profesional */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #1f242d, #0077b6, #005f99, #1f242d, #0ef);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -2;
}

/* Partículas flotantes */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(0, 238, 255, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(0, 119, 182, 0.4), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(0, 238, 255, 0.2), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(0, 119, 182, 0.3), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(0, 238, 255, 0.2), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: particlesFloat 20s linear infinite;
    z-index: -1;
    opacity: 0.6;
}

/* Animaciones */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes particlesFloat {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
    }
}

/* Efecto de ondas en el hero */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 238, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 119, 182, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0, 238, 255, 0.05) 0%, transparent 50%);
    animation: waveEffect 8s ease-in-out infinite;
    z-index: 0;
}

@keyframes waveEffect {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1) rotate(180deg);
        opacity: 0.6;
    }
}

/* Variables con los colores del sitio principal */
:root {
    --primary: #0077b6;
    --secondary: #005f99;
    --accent: #0ef;
    --success: #10b981;
    --dark: #1f242d;
    --header-bg: #000000;
    --light: #f8fafc;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --radius: 0.75rem;
    --transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    position: relative;
    z-index: 1;
}

/* Header con el mismo estilo que Términos y Condiciones */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 238, 255, 0.2);
}

.back-arrow {
    color: #fff;
    font-size: 24px;
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
    z-index: 1001;
}

.back-arrow:hover {
    color: #0ef;
    text-shadow: 0 0 10px rgba(0, 238, 255, 0.5);
}

.logo {
    margin-left: auto;
    position: relative;
    z-index: 1001;
}

.logo img {
    height: 40px;
    filter: drop-shadow(0 0 10px rgba(0, 238, 255, 0.3));
}

/* Hero con efectos mejorados */
.hero {
    padding: 6rem 0 3rem;
    background: rgba(31, 36, 45, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-image {
    position: relative;
    animation: floatImage 6s ease-in-out infinite;
}

.hero-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(45deg, rgba(0, 238, 255, 0.3), rgba(0, 119, 182, 0.3));
    border-radius: var(--radius);
    animation: pulseGlow 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes floatImage {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

.hero-image img {
    width: 180px;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: 
        0 0 30px rgba(0, 238, 255, 0.4),
        0 0 60px rgba(0, 119, 182, 0.2);
    border: 4px solid rgba(0, 238, 255, 0.3);
    transition: var(--transition);
}

.hero-image img:hover {
    transform: scale(1.05);
    box-shadow: 
        0 0 40px rgba(0, 238, 255, 0.6),
        0 0 80px rgba(0, 119, 182, 0.3);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 238, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 238, 255, 0.3);
    animation: badgeGlow 4s ease-in-out infinite;
}

@keyframes badgeGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 238, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 238, 255, 0.5);
    }
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 238, 255, 0.3);
    animation: titleSlide 1s ease-out;
}

@keyframes titleSlide {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.highlight {
    color: #0ef;
    text-shadow: 0 0 15px rgba(0, 238, 255, 0.5);
    animation: highlightPulse 3s ease-in-out infinite;
}

@keyframes highlightPulse {
    0%, 100% {
        text-shadow: 0 0 15px rgba(0, 238, 255, 0.5);
    }
    50% {
        text-shadow: 0 0 25px rgba(0, 238, 255, 0.8);
    }
}

.hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    color: #fff;
    animation: subtitleFade 1.2s ease-out 0.3s both;
}

@keyframes subtitleFade {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 0.9;
        transform: translateY(0);
    }
}

.contact-quick {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    animation: contactSlide 1.5s ease-out 0.6s both;
}

@keyframes contactSlide {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.contact-item:hover {
    background: rgba(0, 238, 255, 0.1);
    transform: translateX(10px);
}

.contact-item i {
    color: #0ef;
    width: 20px;
    text-align: center;
    animation: iconSpin 4s linear infinite;
}

@keyframes iconSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    animation: actionsSlide 1.8s ease-out 0.9s both;
}

@keyframes actionsSlide {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(45deg, #0077b6, #0ef);
    color: white;
    padding: 12px 24px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 
        0 0 20px rgba(0, 119, 182, 0.4),
        0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #005f99, #00d4ff);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 0 30px rgba(0, 238, 255, 0.6),
        0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 238, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid #0ef;
    border-radius: 50%;
    font-size: 18px;
    color: #0ef;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.social-media a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 238, 255, 0.3), transparent);
    transform: scale(0);
    transition: transform 0.3s;
}

.social-media a:hover::before {
    transform: scale(1);
}

.social-media a:hover {
    background: #0ef;
    color: #1f242d;
    box-shadow: 0 0 25px rgba(0, 238, 255, 0.6);
    transform: translateY(-3px) rotate(360deg);
}

/* Sección principal con efectos mejorados */
.main-content {
    padding: 3rem 0;
    background: linear-gradient(180deg, 
        rgba(31, 36, 45, 0.95) 0%, 
        rgba(31, 36, 45, 0.8) 10%, 
        rgba(255, 255, 255, 0.95) 30%, 
        rgba(255, 255, 255, 0.98) 100%);
    backdrop-filter: blur(10px);
    color: #333;
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(0, 238, 255, 0.3);
}

/* Agregar efecto de transición suave */
.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(180deg, 
        rgba(0, 238, 255, 0.1) 0%, 
        transparent 100%);
    z-index: -1;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: start;
}

.profile-card,
.education-card,
.experience-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(0, 119, 182, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 238, 255, 0.2);
    border-left: 4px solid #0077b6;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.profile-card::before,
.education-card::before,
.experience-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 119, 182, 0.05), rgba(0, 238, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

.profile-card:hover::before,
.education-card:hover::before,
.experience-card:hover::before {
    opacity: 1;
}

.profile-card:hover,
.education-card:hover,
.experience-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 30px rgba(0, 119, 182, 0.2);
}

/* Footer con efectos */
.footer {
    background: rgba(31, 36, 45, 0.95);
    backdrop-filter: blur(15px);
    color: white;
    padding: 2rem 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #0ef, transparent);
    animation: lineGlow 3s ease-in-out infinite;
}

@keyframes lineGlow {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 5rem 0 2rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    .hero-image img {
        width: 150px;
        height: 180px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .contact-quick {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 4rem 0 1.5rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .profile-card,
    .education-card,
    .experience-card {
        padding: 1.5rem;
    }
}

/* Mejorar el hero para mejor transición */
.hero {
    padding: 6rem 0 1rem;
    background: rgba(31, 36, 45, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid rgba(0, 238, 255, 0.3);
}

/* Agregar efecto de transición en la parte inferior del hero */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(0, 238, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.1) 100%);
    z-index: 1;
}