/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    color: white;
    overflow: hidden;
    padding-bottom: 2rem;
    min-height: 95vh; 
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* Partículas animadas de fondo */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float-particle 20s linear infinite;
}

.particle:nth-child(1) { width: 4px; height: 4px; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { width: 6px; height: 6px; left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { width: 3px; height: 3px; left: 30%; animation-delay: 4s; }
.particle:nth-child(4) { width: 5px; height: 5px; left: 40%; animation-delay: 6s; }
.particle:nth-child(5) { width: 4px; height: 4px; left: 50%; animation-delay: 8s; }
.particle:nth-child(6) { width: 7px; height: 7px; left: 60%; animation-delay: 10s; }
.particle:nth-child(7) { width: 3px; height: 3px; left: 70%; animation-delay: 12s; }
.particle:nth-child(8) { width: 5px; height: 5px; left: 80%; animation-delay: 14s; }
.particle:nth-child(9) { width: 4px; height: 4px; left: 90%; animation-delay: 16s; }

@keyframes float-particle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    animation: slideInFromLeft 1s ease-out;
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    animation: slideInFromLeft 1s ease-out 0.2s both;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    animation: slideInFromLeft 1s ease-out 0.4s both;
}

.hero-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2.5rem;
    animation: slideInFromLeft 1s ease-out 0.6s both;
}

.tech-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    animation: bounceIn 0.6s ease-out;
}

.tech-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    animation: slideInFromLeft 1s ease-out 0.8s both;
}

/* Botones con efectos */
.btn-custom-primary {
    background: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 100%);
    border: none;
    padding: 15px 35px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-custom-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.5s;
}

.btn-custom-primary:hover::before {
    left: 100%;
}

.btn-custom-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: white;
}

.btn-custom-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #8b5cf6;
    border: 2px solid rgba(255, 255, 255, 0.9);
    padding: 15px 35px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-custom-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    transition: left 0.5s;
}

.btn-custom-secondary:hover::before {
    left: 100%;
}

.btn-custom-secondary:hover {
    background: #8b5cf6;
    color: white;
    border-color: #8b5cf6;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

/* Hero Image con efectos */
.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: slideInFromRight 1s ease-out 0.5s both;
}

.image-container {
    width: clamp(260px, 25vw, 380px);
    aspect-ratio: 4 / 5; 
    border-radius: 28px;  
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    position: relative;
}

.image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.image-container:hover::before {
    opacity: 1;
}

.image-container:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.3);
    border-color: rgba(6, 182, 212, 0.5);
}

.hero-section .hero-image .image-container img {
    object-fit: cover;
    image-rendering: auto; 
    transform: none;      
    -webkit-transform: none;
    backface-visibility: visible;
    transition: all 0.4s ease;
    position: relative;
    z-index: 0;
}

.image-container:hover img {
    transform: scale(1.05);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 255, 255, 0.5);
    }
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-indicator a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    text-decoration: none;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* About Section */
.about-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.about-content .lead {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--secondary-color);
}

.about-image-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-image img {
    transition: var(--transition);
}

.about-image img:hover {
    transform: scale(1.05);
}

/* Tech Stack */
.tech-stack {
    margin-top: 2rem;
}

.tech-badges .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
}

.timeline-content {
    padding-left: 1rem;
}

.experience-tech {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Projects Section */
.project-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-placeholder {
    color: white;
    font-size: 3rem;
    text-align: center;
}

.project-tech {
    margin-top: 1rem;
}

.project-tech .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

/* Contact Section */
#contacto {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    color: white;
}

.contact-item {
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.3s ease;
    overflow: hidden;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.contact-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
}

.contact-link:hover {
    color: white;
    text-decoration: none;
}

.contact-link:hover i {
    color: #06b6d4 !important;
    transform: translateY(-3px);
    transition: all 0.3s ease;
}

.contact-link:hover h5 {
    color: #8b5cf6;
    transition: all 0.3s ease;
}

.contact-link:hover .contact-text {
    color: #06b6d4;
    transition: all 0.3s ease;
}

.contact-text {
    margin: 0;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.contact-link h5 {
    margin: 0.5rem 0;
    transition: all 0.3s ease;
}

.contact-link i {
    transition: all 0.3s ease;
}

/* RESPONSIVE DESIGN */

/* Tablet y desktop pequeño */
@media (max-width: 992px) {
    .hero-section {
        min-height: 85vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .image-container {
        width: 280px;
        height: 280px;
    }

    .about-image-section {
        margin-top: 2rem;
        padding: 1rem;
    }

    .tech-badges .badge {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
}

/* MÓVIL */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 1rem; 
        padding-bottom: 4rem;
        min-height: 90vh; 
        justify-content: center;
    }

    .hero-title {
        font-size: 2.2rem;
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
        text-align: center;
        margin-bottom: 2rem;
    }

    .hero-description {
        text-align: center;
        font-size: 1.1rem;
        margin-bottom: 2.5rem;
    }

    .hero-technologies {
        justify-content: center;
        margin-bottom: 3rem;
    }

    /* Botones */
    .hero-buttons {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 15px !important;
        margin-bottom: 3rem;
        width: 100% !important;
        padding: 0 !important;
    }

    .btn-custom-primary,
    .btn-custom-secondary {
        width: 80% !important;
        max-width: 300px !important;
        min-width: 250px !important;
        padding: 15px 30px !important;
        text-align: center !important;
        font-size: 1rem !important;
        display: block !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

      .image-container {
        width: 280px;
        height: 280px;
        margin: 1rem auto;
        transform: translateY(8px);
    }

    /* Reorganizar contenido en móvil */
    .hero-section .container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
    }
    
    .hero-section .row {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .hero-section .col-lg-6.order-1.order-lg-2 {
        order: 1; 
        margin-bottom: 2rem;
        display: flex;
        justify-content: center;
    }
    
      .hero-section .col-lg-6.order-2.order-lg-1 {
        order: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: 2.5rem;
    }

    .about-image-section {
        margin-top: 2rem;
        padding: 0.5rem;
    }

    .timeline {
        padding-left: 20px;
    }

    .timeline::before {
        left: 10px;
    }

    .tech-badges .badge {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .scroll-indicator {
        bottom: 25px;
    }
}

/* MÓVILES PEQUEÑOS */
@media (max-width: 576px) {
    .hero-section {
        padding-top: 1rem;
        padding-bottom: 4rem;
        min-height: 90vh;
    }

    .hero-title {
        font-size: 1.9rem;
        margin-bottom: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-technologies {
        margin-bottom: 2.5rem;
    }

    .hero-buttons {
        margin-bottom: 3rem;
        gap: 15px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
    }

    .btn-custom-primary,
    .btn-custom-secondary {
        padding: 12px 25px !important;
        font-size: 0.95rem !important;
        width: 85% !important;
        max-width: 280px !important;
        min-width: 240px !important;
        display: block !important;
        margin: 0 auto !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

     .image-container {
        width: 240px;
        height: 240px;
        transform: translateY(12px);
    }

    .tech-badge {
        font-size: 0.8rem;
        padding: 5px 12px;
    }

    .about-image-section {
        margin-top: 2rem;
        padding: 0.5rem;
    }

    .about-content {
        padding: 1.5rem;
        margin-top: 2rem;
    }

    .timeline-content {
        padding-left: 0.5rem;
    }
    
    .scroll-indicator {
        bottom: 30px;
    }
}


.project-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    background: white;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139, 92, 246, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.project-card:hover .image-overlay {
    opacity: 1;
}

.overlay-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.overlay-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: scale(1.1);
}

/* Placeholder mejorado */
.project-placeholder {
    height: 100%;
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

.project-placeholder::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="code-pattern" width="20" height="20" patternUnits="userSpaceOnUse"><text x="10" y="15" font-family="monospace" font-size="8" fill="rgba(255,255,255,0.1)" text-anchor="middle">&lt;/&gt;</text></pattern></defs><rect width="100" height="100" fill="url("#code-pattern#code-pattern")"/></svg>');
    opacity: 0.3;
}

.placeholder-icon {
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
}

.placeholder-icon i {
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
}

.placeholder-content {
    position: relative;
    z-index: 1;
}

.placeholder-content h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.placeholder-tech {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Contenido de la tarjeta */
.project-card .card-body {
    padding: 1.5rem;
}

.project-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.project-card .card-text {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-tech {
    margin-bottom: 1.5rem;
}

.project-tech .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    font-weight: 500;
    border-radius: 12px;
}

.project-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.project-actions .btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-actions .btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    border: none;
    flex-grow: 1;
}

.project-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.3);
}

.project-actions .btn-outline-secondary {
    border-color: #dee2e6;
    color: #6c757d;
}

.project-actions .btn-outline-secondary:hover {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

/* Mensaje sin proyectos */
.no-projects-message {
    background: white;
    padding: 4rem 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin: 2rem 0;
}

.no-projects-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    position: relative;
}

.no-projects-icon::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 50%;
    animation: pulse-ring 2s ease-in-out infinite;
}

.no-projects-icon i {
    color: white;
    font-size: 2.5rem;
}

.no-projects-message h4 {
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.no-projects-message .lead {
    color: #666;
    margin-bottom: 2rem;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* RESPONSIVE para proyectos */
@media (max-width: 768px) {
    .project-image {
        height: 200px;
    }
    
    .project-placeholder {
        padding: 1.5rem 1rem;
    }
    
    .placeholder-icon i {
        font-size: 2.5rem;
    }
    
    .placeholder-content h6 {
        font-size: 1rem;
    }
    
    .placeholder-tech {
        font-size: 0.8rem;
    }
    
    .project-actions {
        flex-direction: column;
    }
    
    .project-actions .btn {
        width: 100%;
    }
    
    .no-projects-message {
        padding: 3rem 2rem;
    }
    
    .no-projects-icon {
        width: 80px;
        height: 80px;
    }
    
    .no-projects-icon i {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .project-image {
        height: 180px;
    }
    
    .project-card .card-body {
        padding: 1.25rem;
    }
    
    .project-card .card-title {
        font-size: 1.1rem;
    }
    
    .project-tech .badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    .no-projects-message {
        padding: 2rem 1.5rem;
    }
}
