:root {
    --primary-color: #0291F7;
    --primary-dark: #0278d1;
    --text-color: #333;
    --bg-color: #fff;
    --card-bg: #f8f9fa;
    --border-color: #e1e1e1;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dark-mode {
    --primary-color: #0291F7;
    --primary-dark: #4ab1ff;
    --text-color: #f0f0f0;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --border-color: #333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

/* Estilos del header y navegación */
header {
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links li a:hover {
    color: var(--primary-color);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    bottom: 0;
    left: 0;
    transition: width 0.3s;
}

.nav-links li a:hover::after {
    width: 100%;
}

/* Estilos del toggle de modo oscuro */

.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    z-index: 2;
}

input:checked+.slider {
    background-color: #2196F3;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.slider i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px !important;
    color: white;
    z-index: 1;
}

.slider .fa-sun {
    left: 8px !important;
}

.slider .fa-moon {
    right: 8px !important;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Estilos para las redes sociales en el hero */
.hero-social {
    display: flex;
    gap: 1.2rem;
    margin-top: 1rem;
}

.social-link {
    color: var(--primary-color);
    font-size: 1.4rem;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.social-link:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Efectos específicos para cada red social */
.social-link:nth-child(1):hover {
    color: #0077B5;
}

/* LinkedIn */
.social-link:nth-child(2):hover {
    color: #333;
}

/* GitHub */
.social-link:nth-child(3):hover {
    color: #25D366;
}

/* WhatsApp */
.social-link:nth-child(4):hover {
    color: #D44638;
}

/* Email */

/* Estilos de las secciones */
section {
    padding: 6rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* Estilos del hero */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    padding-top: 80px;
}

.hero-content {
    flex: 1;
    padding-right: 2rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.highlight {
    color: var(--primary-color);
}

.hero-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow);
    max-height: 500px;
}

/* Estilos de botones */
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(2, 145, 247, 0.2);
}

.btn-small {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    flex: 1;
    text-align: center;
}

.btn-small:hover {
    background: var(--primary-dark);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid var(--primary-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.5rem;
}

.service-description {
    flex-grow: 1;
}

.service-description p {
    margin-bottom: 1.5rem;
    text-align: center;
}

.service-techs {
    list-style-type: none;
    padding: 0;
    margin-top: 1.5rem;
}

.service-techs li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.8rem;
    font-size: 0.95rem;
}

.service-techs li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Estilos de la sección Sobre mí */
.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-content p {
    max-width: 800px;
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.skills {
    width: 100%;
}

.skills-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 1.8rem;
    position: relative;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    width: 120px;
}

.skill-item i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Estilos de la sección Experiencia */
.timeline {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-item {
    width: 100%;
    box-sizing: border-box;
}

.timeline-content {
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    border-left: 4px solid var(--primary-color);
}

.timeline-content:hover {
    transform: translateY(-5px);
}

.timeline-content h3 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    line-height: 1.2;
}

.timeline-content h3 span {
    font-weight: bold;
    color: var(--text-color);
}

.timeline-date {
    font-weight: 500;
    color: var(--primary-color);
    flex-shrink: 0;
    margin-left: 15px;
    text-align: right;
    font-size: 0.9rem;
}

.job-description {
    margin-top: 15px;
}

.job-description ul {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

.job-description ul li {
    margin-bottom: 8px;
    color: var(--text-color);
}

/* Estilos de la sección Educación */
.education-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto 3rem;
}

.education-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.education-item h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.institution {
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.date {
    color: #777;
    font-style: italic;
}

/* Estilos para la sección de Certificaciones */
.certifications-section {
    max-width: 1000px;
    margin: 0 auto;
}

.certifications-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 1.8rem;
    position: relative;
}

.certifications-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.certifications-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.certification-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    border-left: 4px solid var(--primary-color);
}

.certification-item:hover {
    transform: translateY(-5px);
}

.certification-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.certification-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.certification-name {
    margin: 0;
    font-size: 1.2rem;
}

.certification-platform {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #777;
}

.certification-date {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.8rem;
}

.certification-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.certification-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Estilos de la sección Proyectos */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 100%;
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card h3 {
    padding: 1rem 1rem 0;
    color: var(--primary-color);
}

.project-card p {
    padding: 0 1rem 1rem;
}

.project-links {
    padding: 0 1rem 1.5rem;
    display: flex;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
    margin-top: auto;
}

.project-links .btn-small {
    flex: 1;
    text-align: center;
}

.project-description {
    text-align: justify;
    line-height: 1.6;
}

.tech-stack {
    list-style-type: none;
    padding: 2px 15px;
    margin: 0;
    border-radius: 8px;
}

.tech-stack li {
    padding: 8px 0;
    position: relative;
    padding-left: 30px;
}

.tech-icon {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 10px;
}

.contact-container {
    display: flex;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--card-bg);
    color: var(--text-color);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Estilos del footer */
footer {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    margin-top: 3rem;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .hero-buttons {
        justify-content: center;
    }

    .hero-social {
        justify-content: center;
    }

    .social-link {
        font-size: 1.2rem;
        width: 35px;
        height: 35px;
    }

    .hero {
        flex-direction: column;
        padding-top: 100px;
        text-align: center;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 3rem;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .timeline-content h3 {
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline-date {
        margin-left: 0;
        margin-top: 0.5rem;
        text-align: left;
    }

    .contact-container {
        flex-direction: column;
    }

    .certifications-container {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 1.5rem;
    }

    .social-icons {
        gap: 1rem;
    }

    .social-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .nav-links {
        display: none;
    }

    .burger {
        display: block;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }
}