/* ===== VARIABLES CSS ===== */
:root {
    --primary-color: #6c5ce7;
    --primary-dark: #5f3dc4;
    --secondary-color: #74b9ff;
    --accent-color: #fd79a8;
    --dark-bg: #0d1117;
    --dark-surface: #161b22;
    --dark-card: #21262d;
    --dark-border: #30363d;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --success-color: #238636;
    --warning-color: #f85149;
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Bebas Neue', cursive;
}

/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== NAVIGATION ===== */
.navbar {
    background-color: var(--dark-surface) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--dark-border);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary) !important;
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

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

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

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

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0d1117 100%);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    padding-top: 80px; /* Espacio para el navbar fijo */
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(108, 92, 231, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(116, 185, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(253, 121, 168, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem 0;
}

.hero-badge {
    display: inline-block;
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.3);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    backdrop-filter: blur(10px);
}

.badge-text {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 500px;
}

.hero-social {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: transparent;
}

.social-link.facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
}

.social-link.whatsapp:hover {
    background: #25d366;
    border-color: #25d366;
}

.social-link i {
    font-size: 1.2rem;
}

.social-link span {
    font-weight: 500;
    font-size: 0.9rem;
}

.hero-buttons .btn {
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.hero-buttons .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.3);
}

.hero-buttons .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(108, 92, 231, 0.4);
}

.hero-buttons .btn-outline-light:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.3);
}

/* ===== HERO IMAGE ===== */
.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 500px;
}

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

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 3px solid rgba(108, 92, 231, 0.2);
}

.image-container:hover .hero-img {
    transform: scale(1.05);
    box-shadow: 0 25px 80px rgba(108, 92, 231, 0.2);
}

/* ===== FLOATING ELEMENTS ===== */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    animation: float 3s ease-in-out infinite;
}

.floating-icon i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.icon-1 {
    top: 10%;
    right: -10%;
    animation-delay: 0s;
}

.icon-2 {
    top: 30%;
    left: -15%;
    animation-delay: 0.5s;
}

.icon-3 {
    bottom: 20%;
    right: -5%;
    animation-delay: 1s;
}

.icon-4 {
    bottom: 10%;
    left: -10%;
    animation-delay: 1.5s;
}

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

/* ===== SECTIONS ===== */
.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--text-primary);
    position: relative;
    margin-bottom: 3rem;
    letter-spacing: 1px;
}

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

/* ===== ABOUT SECTION ===== */
.about-card {
    background: var(--dark-card);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--dark-border);
    transition: all 0.3s ease;
    height: 100%;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.about-card h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.about-card p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

.personal-info {
    background: var(--dark-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--dark-border);
}

.personal-info h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.personal-info p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* ===== GALLERY SECTION ===== */
#gallery {
    background: var(--dark-surface);
}

.nav-pills .nav-link {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--dark-border);
    margin: 0 0.5rem;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

/* Tabs de galería mejor organizados en móviles */
@media (max-width: 576px) {
    #gallery .nav-pills {
        flex-wrap: wrap;
        gap: 8px;
    }
    #gallery .nav-pills .nav-item { width: 100%; }
    #gallery .nav-pills .nav-link {
        width: 100%;
        text-align: center;
        margin: 0;
    }
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
    color: white;
}

.nav-pills .nav-link:hover:not(.active) {
    background: var(--dark-card);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.gallery-image {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.gallery-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(108, 92, 231, 0.8));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: 15px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}

.gallery-overlay p {
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.gallery-item:hover .play-button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* ===== PROJECTS SECTION ===== */
.project-card {
    background: var(--dark-card);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--dark-border);
    transition: all 0.3s ease;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

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

.project-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.3s ease;
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(108, 92, 231, 0.8));
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.3s ease;
}

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

.project-content {
    padding: 1.5rem;
}

.project-content h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.technologies .badge {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
}

.features h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.features ul li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

/* ===== SKILLS SECTION ===== */
#skills {
    background: var(--dark-surface);
}

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

.skill-item {
    background: var(--dark-card);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--dark-border);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.skill-icon {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.skill-content p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ===== CONTACT SECTION ===== */
#contact {
    background: var(--dark-surface);
}

.contact-item {
    text-align: center;
    padding: 2rem;
    background: var(--dark-card);
    border-radius: 15px;
    border: 1px solid var(--dark-border);
    transition: all 0.3s ease;
    height: 100%;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.contact-item h5 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Evitar desborde de textos largos (como emails) */
.contact-item p,
.contact-item .text-break {
    word-break: break-word;
}

.social-links .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Botones de redes en contacto mejorados para móviles */
@media (max-width: 576px) {
    .social-links {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .social-links .btn { width: 100%; }
}

.social-links .btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* ===== FOOTER ===== */
footer {
    border-top: 1px solid var(--dark-border);
}

/* ===== MODAL ===== */
.modal-content {
    background-color: var(--dark-card);
    border: 1px solid var(--dark-border);
}

.modal-header {
    border-bottom: 1px solid var(--dark-border);
}

.modal-title {
    color: var(--text-primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .profile-image img {
        width: 250px;
        height: 250px;
    }
    
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .hero-buttons .btn { width: 100%; }
    
    .hero-buttons .btn:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .profile-image img {
        width: 200px;
        height: 200px;
    }
    
    .gallery-image img {
        height: 200px;
    }
    
    .project-image img {
        height: 150px;
    }
    .social-links .btn,
    .hero-social .social-link {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== SCROLL BEHAVIOR ===== */
html {
    scroll-behavior: smooth;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
