/* Variables CSS */
:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #f093fb;
    --accent2: #f5576c;
    --light: #ffffff;
    --dark: #2d3748;
    --gray: #f7fafc;
    --text: #4a5568;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-hero: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 50%, rgba(240, 147, 251, 0.1) 100%);
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--light);
    overflow-x: hidden !important;
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-accent);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.btn:hover::before {
    left: 0;
}

.section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    color: var(--dark);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.logo:hover::after {
    transform: scaleX(1);
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    padding: 10px 0;
}

.nav-link:hover {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23667eea" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    position: relative;
    z-index: 2;
}

.hero-text {
    flex: 1;
    animation: slideInLeft 1s ease-out;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--gradient-accent);
    color: white;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow);
}

.hero-badge i {
    margin-right: 8px;
    color: #ffd700;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 25px;
    color: var(--dark);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    color: var(--text);
    font-weight: 500;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--gradient-primary);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    animation: slideInRight 1s ease-out;
}

/* .hero-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90%;
    height: 90%;
    max-width: 520px;
    max-height: 320px;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    box-shadow: 0 8px 32px 0 rgba(102,126,234,0.10);
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
} */

.hero-image img {
    position: relative;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}



.floating-card {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--light);
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--primary);
    animation: float 4s ease-in-out infinite;
    animation-delay: 1s;
}

.floating-card i {
    font-size: 1.2rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: var(--transition);
}

.scroll-indicator:hover {
    color: var(--secondary);
    transform: translateX(-50%) scale(1.2);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Projects Section */
.projects {
    background: var(--gray);
    position: relative;
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, var(--light), transparent);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.project-card {
    background: var(--light);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px 0 rgba(102,126,234,0.16);
    transition: var(--transition);
    position: relative;
    animation: fadeInUp 0.8s ease-out;
}

.project-card:hover {
    transform: translateY(-20px) scale(1.07);
    box-shadow: 0 32px 80px 0 rgba(102,126,234,0.38), 0 2px 16px 0 rgba(0,0,0,0.10);
    z-index: 3;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.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;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    color: white;
    font-size: 2rem;
}

.project-overlay.no-link {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.7;
}

.project-overlay.no-link:hover {
    background: rgba(102, 126, 234, 0.9);
    color: white;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-content {
    padding: 30px;
}

.project-category {
    display: inline-block;
    padding: 8px 16px;
    background: var(--gradient-accent);
    color: white;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-category i {
    margin-right: 8px;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark);
    font-weight: 700;
}

.project-description {
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.7;
}

.project-tech {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tech-tag {
    padding: 4px 12px;
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contact Section */
.contact {
    background: var(--light);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, var(--gray), transparent);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--light);
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.form-group {
    margin-bottom: 25px;
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    z-index: 2;
}

.input-icon .form-control {
    padding-left: 45px;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--light);
    color: var(--text);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--light);
    padding: 60px 0 30px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-column h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.footer-column h3::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--gradient-primary);
    margin-top: 10px;
    border-radius: 2px;
}

.footer-column p {
    line-height: 1.8;
    color: #a0aec0;
    max-width: 400px;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-link:hover {
    background: var(--gradient-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #4a5568;
    margin-top: 30px;
    color: #a0aec0;
}

.copyright i {
    color: #f5576c;
    animation: heartbeat 2s infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .about-content, .hero-content, .contact-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-image, .about-image {
        order: -1;
    }
    
    .hero-buttons {
        justify-content: center;
    }

    .hero-image img {
        max-width: 350px;
        min-height: 220px;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--light);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 50px;
        transition: var(--transition);
        box-shadow: var(--shadow);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-form {
        padding: 30px 20px;
    }
    
    .floating-card {
        display: none;
    }

    .hero-image img {
        max-width: 220px;
        min-height: 120px;
    }

    .container {
        padding: 0 6px;
    }
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    html, body {
        max-width: 100vw;
        overflow-x: hidden !important;
    }
}
