/* Estilos CSS mejorados */
:root {
    --primary: #ff6b6b;
    --secondary: #4ecdc4;
    --accent: #45b7d1;
    --dark: #0c0c0c;
    --dark-blue: #1a1a2e;
    --darker-blue: #16213e;
    --deep-blue: #0f3460;
    --purple: #533483;
    --light: #ffffff;
    --gray: #f1f1f1;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--light);
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-blue) 25%, var(--darker-blue) 50%, var(--deep-blue) 75%, var(--purple) 100%);
    overflow-x: hidden;
    position: relative;
}

/* Partículas de fondo */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Cursor personalizado */
.cursor-dot, .cursor-outline {
    z-index: 9999;
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--secondary);
    transition: all 0.2s ease-out;
}

body:hover .cursor-dot,
body:hover .cursor-outline {
    opacity: 1;
}

/* Navegacion*/
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-text {
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-dot {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    margin-left: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--light);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    font-weight: 500;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.contact-btn {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    transition: var(--transition);
    font-weight: bold;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--light);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* Sections */
section {
    min-height: 100vh;
    padding: 100px 2rem 50px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--light), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-top: 1rem;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.title-word {
    display: block;
    background: linear-gradient(45deg, var(--light), var(--secondary), var(--primary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glow 2s ease-in-out infinite alternate;
}

.title-word:nth-child(2) {
    animation-delay: 0.5s;
}

.title-word:nth-child(3) {
    animation-delay: 1s;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(78, 205, 196, 0.5); }
    to { text-shadow: 0 0 30px rgba(78, 205, 196, 0.8), 0 0 40px rgba(255, 107, 107, 0.5); }
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn span {
    position: relative;
    z-index: 2;
}

.btn i {
    position: relative;
    z-index: 2;
}

.btn::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: 0.5s;
}

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

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--secondary);
    border: 2px solid var(--secondary);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    background: rgba(78, 205, 196, 0.1);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-card {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    animation: float 6s ease-in-out infinite;
}

.floating-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.card-content {
    position: relative;
    z-index: 2;
}

.code-line {
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
    border-radius: 2px;
}

.code-line:nth-child(1) {
    width: 80%;
}

.code-line:nth-child(2) {
    width: 60%;
}

.code-line:nth-child(3) {
    width: 70%;
}

.floating-icon {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    font-size: 3rem;
    color: var(--secondary);
    animation: pulse 2s infinite;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--light);
    opacity: 0.7;
}

.scroll-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--primary), transparent);
    margin-bottom: 0.5rem;
    animation: scroll-line 2s infinite;
}

@keyframes scroll-line {
    0% { height: 0; opacity: 0; }
    50% { height: 40px; opacity: 1; }
    100% { height: 0; opacity: 0; }
}

/* About Section */
.about {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    margin: 50px 0;
    padding: 4rem 2rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-container {
    position: relative;
    width: 300px;
    height: 300px;
}

.main-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: white;
    position: relative;
    z-index: 2;
}

.floating-element {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--light);
    animation: float 6s ease-in-out infinite;
}

.el-1 {
    top: 0;
    right: 0;
    background: rgba(255, 107, 107, 0.2);
    animation-delay: 0s;
}

.el-2 {
    bottom: 0;
    left: 0;
    background: rgba(78, 205, 196, 0.2);
    animation-delay: 2s;
}

.el-3 {
    bottom: 0;
    right: 0;
    background: rgba(69, 183, 209, 0.2);
    animation-delay: 4s;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.text-highlight {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.stat:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Skills Section */
.skills {
    padding: 4rem 2rem;
}

.skills-container {
    margin-top: 3rem;
}

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

.skill-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    text-align: center;
}

.skill-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.skill-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--light);
}

.skill-card p {
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.skill-level {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.level-bar {
    flex-grow: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.level-progress {
    height: 100%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border-radius: 4px;
    width: 0;
    transition: width 1.5s ease-in-out;
}

.level-percentage {
    font-weight: bold;
    color: var(--secondary);
}

/* Projects Section */
.projects {
    padding: 4rem 2rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.project-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

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

.project-links a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.project-links a:hover {
    transform: scale(1.1);
}

.project-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.project-content {
    padding: 1.5rem;
}

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

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

.tag {
    background: rgba(78, 205, 196, 0.2);
    color: var(--secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid rgba(78, 205, 196, 0.3);
}

/* Contact Section */
.contact {
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    transition: var(--transition);
    text-align: center;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--light);
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 2rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--light);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary);
}

.footer-social {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    text-decoration: none;
    transition: var(--transition);
}

.footer-social a:hover {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

.footer-bottom p {
    opacity: 0.7;
}

.footer-bottom i {
    color: var(--primary);
    margin: 0 0.2rem;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        gap: 2rem;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    section {
        padding: 100px 1rem 50px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .floating-card {
        width: 250px;
        height: 250px;
    }
}