:root {
    --bg-color: white;
    --text-color: #1f1f1f;
    --header-bg-color: #f1f1f1;
    --link-color: #3498db;
    --link-hover-color: #2980b9;
    --button-bg-color: #2980b9;
    --button-hover-bg-color: #3498db;
    --progress-bg-color: #f1f1f1;
    --progress-fill-color: #2980b9;
}

[data-theme='light'] {
    --bg-color: linear-gradient(to right, #61d0f1, #1c92e0);
    --text-color: #1f1f1f;
    --header-bg-color: #f1f1f1;
    --link-color: #3498db;
    --link-hover-color: #2980b9;
    --button-bg-color: #2980b9;
    --button-hover-bg-color: #3498db;
    --progress-bg-color: #f1f1f1;
    --progress-fill-color: #2980b9;
}

[data-theme='dark'] {
    --bg-color: linear-gradient(to right, #434343, #000000);
    --text-color: #ffffff;
    --header-bg-color: #3e3e3e;
    --link-color: #3498db;
    --link-hover-color: #2980b9;
    --button-bg-color: #3498db;
    --button-hover-bg-color: #2980b9;
    --progress-bg-color: #ffffff;
    --progress-fill-color: #3498db;

    /* Cambiar el color del texto en about */
    .about-content p {
        color: #bdc3c7;
    }

    /* Cambiar el color del texto en los proyectos */
    .subtitle {
        color: #bdc3c7;
    }
}




body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
}

header {
    background-color: var(--header-bg-color);
    padding: 10px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    color: var(--link-hover-color);
    font-size: 1.5em;
}

.theme-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.theme-toggle img {
    width: 24px;
    height: 24px;
    transition: transform 0.3s;
}

nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

nav a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 1em;
}

nav a:hover {
    color: var(--link-hover-color);
}

.main {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-color);
    padding-top: 70px;
}

.main h2 {
    color: #e74c3c;
    font-size: 3em;
    margin: 0;
}

.main p {
    color: var(--text-color);
    font-size: 1.2em;
}

.main button {
    background-color: var(--button-bg-color);
    color: var(--text-color);
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.main button:hover {
    background-color: var(--button-hover-bg-color);
}

.about, .projects, .skills, .contact {
    padding: 50px 20px;
    text-align: center;
}

.about h2, .projects h2, .skills h2, .contact h2 {
    color: #bdc3c7;
    margin-bottom: 30px;
    font-size: 2em;
}

.about-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.about-content img {
    border-radius: 50%;
    width: 150px;
    height: 150px;
    margin-bottom: 20px;
}

.about-content p {
    max-width: 600px;
    text-align: center;
    padding: 0 20px;
}

.project-cards {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.project-card {
    background-color: var(--header-bg-color);
    width: 100%;
    max-width: 300px;
    margin: 10px;
    padding: 20px;
    border-radius: 10px;
    transition: transform 0.3s;
}

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

.project-card img {
    width: 100%;
    border-radius: 10px;
}

.project-card h3 {
    color: var(--link-hover-color);
    margin-top: 15px;
}

.project-card p {
    color: var(--text-color);
}

.project-card a {
    color: var(--link-hover-color);
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
    transition: color 0.3s;
}

.project-card a:hover {
    color: var(--button-hover-bg-color);
}

.skills-list {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.skill {
    background-color: var(--header-bg-color);
    width: 100%;
    max-width: 300px;
    margin: 10px;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s;
}

.skill:hover {
    transform: scale(1.1);
}

.skill img {
    width: 50px;
    margin-bottom: 10px;
}

.skill h3 {
    margin-bottom: 10px;
}

.progress-bar {
    background-color: var(--progress-bg-color);
    border-radius: 5px;
    overflow: hidden;
    margin: 10px 0;
    height: 20px;
    width: 100%;
}

.progress-bar div {
    height: 100%;
    background-color: var(--progress-fill-color);
    text-align: right;
    padding-right: 10px;
    line-height: 20px;
    color: white;
}

.contact form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact input, .contact textarea {
    width: 100%;
    max-width: 500px;
    padding: 10px;
    margin: 10px 0;
    border: none;
    border-radius: 5px;
    background-color: var(--header-bg-color);
    color: var(--text-color);
}

.contact button {
    background-color: var(--button-bg-color);
    color: var(--text-color);
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.contact button:hover {
    background-color: var(--button-hover-bg-color);
}

.right-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-left: 20px;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--link-color);
    margin: 4px 0;
    transition: 0.4s;
}

nav.active {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 768px) {
    .main h2 {
        font-size: 2.5em;
    }

    .main p {
        font-size: 1em;
    }

    .project-card, .skill {
        width: 45%;
    }

    .about-content {
        flex-direction: column;
    }

    .about-content img {
        margin-bottom: 20px;
    }

    nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    nav.active {
        display: flex;
    }
}

@media (max-width: 480px) {
    .main h2 {
        font-size: 2em;
    }

    .main p {
        font-size: 0.9em;
    }

    .project-card, .skill {
        width: 100%;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 20px;
    }

    header h1 {
        font-size: 1.2em;
        margin-bottom: 10px;
    }

    .right-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    border-radius: 150px;
    text-align: center;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.whatsapp-float img {
    width: 50px;
    height: 50px;
}


/* Estilos para el footer */
.footer {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
    width: 100%;
    text-align: center;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.footer-left p {
    margin: 0;
}

.footer-right a {
    margin: 0 10px;
    display: inline-block;
}

.footer-right img {
    width: 24px;
    height: 24px;
    /* filter: invert(1); */
}

/* Estilos para el menú */
.nav__menu {
    display: flex;
    gap: 15px;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    margin: 4px 0;
    background-color: #333;
}

@media screen and (max-width: 768px) {
    .nav__menu {
        display: none;
        flex-direction: column;
        background-color: #333;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        z-index: 1000;
    }

    .nav__link {
        padding: 15px;
        border-bottom: 1px solid #444;
        color: #fff;
        text-align: center;
    }

    .nav__link:hover {
        background-color: #444;
    }

    .nav__menu.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }
}
