:root {
    --primary-color: #2563eb;
    --secondary-color: #1d4ed8;
    --text-color: #1f2937;
    --light-text: #4b5563;
    --background: #f9fafb;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --hover-color: #dbeafe;
}

/* Estilos para Certificaciones */
.certificates-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.certificate-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.certificate-icon {
    width: 50px;
    height: 50px;
    background-color: var(--hover-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.certificate-content {
    flex: 1;
}

.certificate-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-color);
}

.certificate-issuer {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 5px;
}

.certificate-date {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.certificate-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.certificate-link:hover {
    text-decoration: underline;
}

/* Estilos para el modal de certificados */
.certificate-lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.certificate-lightbox.show {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 98%;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox-content.show {
    transform: scale(1);
}

.lightbox-close {
    position: fixed;
    top: 25px;
    right: 25px;
    color: var(--card-bg);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 1001;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

/* Media queries para responsividad */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 92%;
        max-height: 88vh;
    }

    .lightbox-close {
        font-size: 30px;
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .lightbox-content {
        max-width: 90%;
        max-height: 85vh;
    }

    .lightbox-close {
        font-size: 25px;
        top: 10px;
        right: 10px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px;
    background-color: var(--text-color);
}

#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 60px;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.hero-text h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.hero-text p {
    color: var(--light-text);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.cta-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.cta-btn:hover {
    background-color: var(--secondary-color);
}

.profile-image {
    flex: 1;
    text-align: center;
}

.profile-image img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--card-bg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: var(--text-color);
}

.section-subtitle {
    text-align: center;
    margin-bottom: 50px;
    font-size: 1.2rem;
    color: var(--light-text);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Habilidades */
.skills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.skill-category {
    margin-bottom: 40px;
    width: 100%;
}

.skill-category h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.skill-item {
    background-color: var(--card-bg);
    border-radius: 5px;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.skill-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.skill-info {
    flex: 1;
}

.skill-name {
    font-weight: 500;
}

.skill-level {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background-color: var(--primary-color);
}

/* Proyectos */
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
}

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

.project-image img {
    width: 100%;
    height: 100%;
    border-bottom: var(--text-color) 5px solid;
    transition: transform 0.5s;
}

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

.project-content {
    padding: 20px;
}

/* Estilos para el encabezado de la tarjeta */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}

.project-title {
    font-size: 1.5rem;
    color: #000000;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.project-tag {
    background-color: var(--hover-color);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
}

.project-description {
    color: var(--light-text);
    margin-bottom: 20px;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.project-link:hover {
    text-decoration: underline;
}

/* Etiqueta de estado "En Desarrollo" */
.project-status {
    background-color: #fef3c7;
    color: #d97706;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 10px;
}

/* Contenedor para múltiples enlaces de repositorio */
.project-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.preview-btn {
    background-color: var(--primary-color);
    color: var(--card-bg);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.preview-btn:hover {
    background-color: var(--secondary-color);
}

/* Ajustar los enlaces para que sean más compactos */
.project-link {
    font-size: 0.9rem;
}

/* Responsividad para pantallas pequeñas */
@media (max-width: 576px) {
    .project-links {
        flex-direction: column;
        gap: 10px;
    }
}

/* Educación y Experiencia */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--card-bg);
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    top: 15px;
    z-index: 1;
}

/* Estilo para la lista de responsabilidades en la línea de tiempo */
.timeline-description ul {
    list-style: none;
    padding-left: 20px;
    margin-top: 10px;
}

.timeline-description li {
    position: relative;
    margin-bottom: 10px;
    color: var(--light-text);
    font-size: 0.95rem;
}

.timeline-description li::before {
    content: '•';
    position: absolute;
    left: -20px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::after {
    right: -10px;
}

.right::after {
    left: -10px;
}

.timeline-content {
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.timeline-date {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 10px;
}

.timeline-title {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.timeline-subtitle {
    color: var(--light-text);
    margin-bottom: 15px;
    font-style: italic;
}

.timeline-description {
    color: var(--light-text);
}

/* Estilos para el modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

/* Contenido del modal */
.modal-content {
    background-color: #fff;
    margin: 5vh auto;
    padding: 1rem;
    border-radius: 8px;
    width: 90vw;
    height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Botón para cerrar el modal */
.close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* Estilos para el iframe */
.modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Contacto */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-form {
    flex: 2;
    min-width: 300px;
}

.contact-item {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--hover-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.contact-details h4 {
    margin-bottom: 5px;
}

.contact-details p, .contact-details a {
    color: var(--light-text);
    text-decoration: none;
}

.contact-details a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: var(--hover-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: all 0.3s;
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: var(--secondary-color);
}

/* Footer */
footer {
    background-color: var(--text-color);
    color: white;
    padding: 40px 0 20px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: white;
}

.footer-section p {
    color: #d1d5db;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid #374151;
}

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.scroll-to-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-text, .profile-image {
        flex: auto;
    }

    .profile-image img {
        width: 250px;
        height: 250px;
        margin-bottom: 30px;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item::after {
        left: 21px;
    }

    .right {
        left: 0;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        flex-direction: column;
        background-color: var(--card-bg);
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .hamburger {
        display: block;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text h2 {
        font-size: 1.2rem;
    }

    .profile-image img {
        width: 200px;
        height: 200px;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .project-title {
        font-size: 1rem;
    }

    .lightbox-content {
        max-width: 90%;
        max-height: 85vh;
    }

    .lightbox-close {
        font-size: 25px;
        top: 10px;
        right: 10px;
    }
}

/* Estilos para el modal lightbox con carrusel */
.project-lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-lightbox.show {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 98%;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    background-color: var(--card-bg);
    padding: 10px;
}

.lightbox-content.show {
    transform: scale(1);
}

.lightbox-close {
    position: fixed;
    top: 25px;
    right: 25px;
    color: var(--card-bg);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 1001;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

/* Estilos para el carrusel dentro del modal */
#lightboxCarousel {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

#lightboxCarousel .carousel-images {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

#lightboxCarousel .carousel-image {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#lightboxCarousel .carousel-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 10px;
}

#lightboxCarousel .carousel-btn {
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--card-bg);
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

#lightboxCarousel .carousel-btn:hover {
    background-color: var(--primary-color);
}

#lightboxCarousel .carousel-dots {
    position: absolute;
    bottom: 10px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
}

#lightboxCarousel .carousel-dot {
    width: 10px;
    height: 10px;
    background-color: var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

#lightboxCarousel .carousel-dot.active {
    background-color: var(--primary-color);
}
