/* importamos la fuente */
@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@300;400;500;800&display=swap');

:root {
    --bg-color: #f6fafc;
    --bg-gradient: linear-gradient(to right, #f8f9fa, #e9ecef);
    --text-color: #333;
    --text-color-light: #666;
    --primary-color: #0284c7;
    --primary-hover: #0369a1;
    --card-bg: #fff;
    --header-bg: rgba(255, 255, 255, 0.95);
    --skill-bg: #f0f0f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --bg-gradient: linear-gradient(to right, #1a1a1a, #2a2a2a);
    --text-color: #fff;
    --text-color-light: #ccc;
    --primary-color: #0ea5e9;
    --primary-hover: #0284c7;
    --card-bg: #2a2a2a;
    --header-bg: rgba(26, 26, 26, 0.95);
    --skill-bg: #333;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'M PLUS Rounded 1c', sans-serif;
}

html{
    scroll-behavior: smooth;
}

body{
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* SECCION I N I C I O */
.inicio {
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.contenedor-inicio {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px var(--shadow-color);
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.1);
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--text-color);
    font-weight: 700;
}

#nav {
    display: flex;
    gap: 2rem;
}

#nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

#nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

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

#nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.redes {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.redes a, .theme-toggle {
    color: var(--text-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.redes a:hover, .theme-toggle:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.redes a {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.redes a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.hero-section {
    margin-top: 100px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 4rem 0;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-content h2 {
    font-size: 3rem;
    color: var(--text-color);
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-color-light);
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-primary, .btn-secondary {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(2, 132, 199, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: rgba(2, 132, 199, 0.1);
    transform: translateY(-2px);
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
}

/* Menú responsive */
#icono-nav {
    display: none;
    width: 35px;
    height: 35px;
    background: transparent;
    position: relative;
    cursor: pointer;
    z-index: 200;
}

#icono-nav i {
    color: var(--text-color);
    font-size: 1.5rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

#icono-nav:hover i {
    color: var(--primary-color);
}

@media screen and (max-width: 768px) {
    .header {
        padding: 1rem;
    }

    #nav {
        position: fixed;
        top: 0;
        left: -100%;
        height: auto;
        min-height: 300px;
        background: rgba(0, 0, 0, 0.98);
        width: 250px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
        transition: all 0.4s ease-in-out;
        z-index: 100;
        padding: 2rem;
        border-radius: 0 15px 15px 0;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
    }

    #nav.responsive {
        left: 0;
    }

    #nav a {
        color: var(--text-color);
        font-size: 1.1rem;
        font-weight: 500;
        letter-spacing: 0.5px;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease;
        text-transform: uppercase;
        position: relative;
        padding: 8px 15px;
    }

    #nav.responsive a {
        opacity: 1;
        transform: translateY(0);
    }

    #nav a::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(2, 132, 199, 0.1);
        border-radius: 4px;
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.3s ease;
        z-index: -1;
    }

    #nav a:hover::before {
        transform: scaleX(1);
        transform-origin: left;
    }

    #nav a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background: var(--primary-color);
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.3s ease;
    }

    #nav a:hover::after {
        transform: scaleX(1);
        transform-origin: left;
    }

    #nav a:hover {
        color: var(--primary-color);
        text-shadow: 0 0 5px rgba(2, 132, 199, 0.3);
        transform: scale(1.03);
    }

    #icono-nav {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #nav.responsive ~ #icono-nav i {
        color: var(--text-color);
    }

    /* Animación secuencial de los enlaces */
    #nav.responsive a:nth-child(1) { transition-delay: 0.1s; }
    #nav.responsive a:nth-child(2) { transition-delay: 0.2s; }
    #nav.responsive a:nth-child(3) { transition-delay: 0.3s; }
    #nav.responsive a:nth-child(4) { transition-delay: 0.4s; }
    #nav.responsive a:nth-child(5) { transition-delay: 0.5s; }

    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 2rem 0;
        margin-top: 20px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-content h2 {
        font-size: 2.5rem;
    }

    .redes {
        display: none;
    }
}

@media screen and (max-width: 800px) {
    .header {
        position: fixed;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        background: var(--header-bg);
        backdrop-filter: blur(10px);
        z-index: 1000;
    }

    .logo {
        flex: 1;
    }

    .redes {
        display: flex;
        align-items: center;
        order: 2;
        position: relative;
        z-index: 1001;
    }

    .redes a {
        display: none;
    }

    .theme-toggle {
        display: block;
        margin: 0;
        padding: 0.5rem;
    }

    #icono-nav {
        order: 3;
        position: relative;
        margin: 0;
        padding: 0.5rem;
        z-index: 1001;
        background: transparent;
        border: none;
    }

    #nav {
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        width: 100%;
        background: var(--header-bg);
        backdrop-filter: blur(10px);
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 999;
        transition: left 0.3s ease;
    }

    #nav.responsive {
        left: 0;
        display: flex;
    }

    #nav.responsive a {
        font-size: 24px;
        margin: 1rem 0;
        color: var(--text-color);
    }

    .inicio {
        padding-top: 60px;
        height: auto;
    }
    .inicio .fila {
        display: block;
    }
    .inicio .fila .col {
        width: 100%;
        text-align: center;
    }
    .inicio .fila .col h2 {
        margin-top: 20px;
    }
    .inicio .fila .col .contenedor-img {
        width: 50%;
        margin-top: 30px;
    }
}

/* SECCION S E R V I C I O S */
.servicios {
    padding: 60px 0;
    background: var(--card-bg);
}

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

.servicios h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-color);
}

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

.servicio-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 3px 15px var(--shadow-color);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.servicio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.servicio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.servicio-card:hover::before {
    transform: scaleX(1);
}

.servicio-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.servicio-icon i {
    color: #fff;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.servicio-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(2, 132, 199, 0.3);
}

.servicio-card h3 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

.servicio-card p {
    color: var(--text-color-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

@media screen and (max-width: 768px) {
    .servicios {
        padding: 40px 0;
    }
    
    .servicios-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .servicio-card {
        padding: 25px;
    }
    
    .servicio-icon {
        width: 70px;
        height: 70px;
    }
    
    .servicio-icon i {
        font-size: 1.75rem;
    }
}

/* SECCIÓN HABILIDADES */
.habilidades {
    padding: 40px 0;
    background: var(--bg-color);
}

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

.habilidades h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.skill-category {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 3px 10px var(--shadow-color);
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.skill-category h3 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h3 i {
    color: var(--primary-color);
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skill-item {
    width: 100%;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--text-color-light);
}

.progress-bar {
    height: 8px;
    background: var(--skill-bg);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 1s ease-in-out;
    width: 0;
}

@media screen and (max-width: 768px) {
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .skill-category {
        padding: 20px;
    }
}

/* SECCION T R A B A J O S */
.trabajos {
    padding: 40px 0;
    background: var(--bg-color);
}

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

.trabajos h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-color);
}

.filtros {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filtro-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 25px;
    background: var(--card-bg);
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px var(--shadow-color);
}

.filtro-btn:hover, .filtro-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,222,239,0.3);
}

.proyectos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.proyecto-item {
    border-radius: 15px;
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: 0 3px 10px var(--shadow-color);
    transition: all 0.3s ease;
}

.proyecto-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.proyecto-contenido {
    position: relative;
}

.proyecto-contenido img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.proyecto-info {
    padding: 20px;
}

.proyecto-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

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

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

.tecnologias span {
    padding: 4px 12px;
    background: var(--skill-bg);
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--text-color-light);
}

.proyecto-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.proyecto-link:hover {
    color: #007be5;
    gap: 12px;
}

@media screen and (max-width: 768px) {
    .filtro-btn {
        padding: 6px 15px;
        font-size: 0.8rem;
    }
    
    .proyectos-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
}

/* SECCIÓN C O N T A C T O */
.contacto {
    padding: 40px 20px;
    background: var(--bg-color);
}

.contacto h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow-color);
    background: var(--primary-color);
    color: white;
}

.contact-item i {
    font-size: 1.5rem;
}

.contact-item span {
    font-size: 1rem;
    font-weight: 500;
}

@media screen and (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .contact-item {
        padding: 12px;
    }
    
    .contact-item i {
        font-size: 1.2rem;
    }
    
    .contact-item span {
        font-size: 0.9rem;
    }
}

/* Estilos para pantallas grandes */
@media screen and (min-width: 1200px) {
    .contacto {
        padding: 100px 40px;
    }
    .contacto .contenedor-contacto .fila {
        gap: 60px;
    }
    .contacto .contenedor-contacto .info {
        padding: 30px;
    }
    .contacto input, .contacto textarea {
        padding: 20px;
    }
    .contacto .btn {
        padding: 20px 50px;
    }
}

/* Estilos para pantallas portátiles */
@media screen and (max-width: 1024px) {
    .contacto {
        padding: 60px 20px;
    }
    .contacto .contenedor-contacto .fila {
        gap: 30px;
    }
    .contacto .contenedor-contacto .info {
        padding: 15px;
    }
    .contacto input, .contacto textarea {
        padding: 12px;
    }
    .contacto .btn {
        padding: 12px 30px;
    }
}

/* Estilos para dispositivos móviles */
@media screen and (max-width: 768px) {
    .contacto {
        padding: 40px 15px;
    }
    .contacto .contenedor-contacto .fila {
        flex-direction: column;
        align-items: center;
    }
    .contacto .contenedor-contacto .fila .col {
        width: 100%;
        max-width: 400px;
    }
    .contacto .contenedor-contacto .info {
        padding: 15px;
        margin-bottom: 25px;
    }
    .contacto .contenedor-contacto .info h3 {
        font-size: 16px;
    }
    .contacto .contenedor-contacto .info p {
        font-size: 14px;
    }
    .contacto input, .contacto textarea {
        margin-bottom: 15px;
        padding: 12px;
    }
    .contacto .btn {
        width: 100%;
        max-width: 300px;
        margin: 20px auto 0;
        padding: 12px 30px;
    }
}

/* Estilos para pantallas pequeñas */
@media screen and (max-width: 480px) {
    .contacto {
        padding: 30px 10px;
    }
    .contacto h2 {
        font-size: 28px;
    }
    .contacto .contenedor-contacto .info h3 {
        font-size: 14px;
    }
    .contacto .contenedor-contacto .info p {
        font-size: 12px;
    }
    .contacto input, .contacto textarea {
        padding: 10px;
    }
    .contacto .btn {
        padding: 10px 20px;
    }
}

/* Estilos para dispositivos móviles */
@media screen and (max-width: 800px) {
    .redes{
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    .redes a {
        display: none;
    }
    .theme-toggle {
        display: block;
        margin-right: 3rem;
    }
    #nav{
        display: none;
    }
    #nav.responsive{
        background-color: var(--header-bg);
        backdrop-filter: blur(10px);
        top: 0;
        left: 0;
        height: 100vh;
        width: 100%;
        position: fixed;
        padding: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 999;
    }
    #nav.responsive a{
        font-size: 30px;
    }
    #icono-nav{
        display: block;
    }

    .inicio{
        height: auto;
    }
    .inicio .fila{
        display: block;
    }
    .inicio .fila .col{
        width: 100%;
        text-align: center;
    }
    .inicio .fila .col h2{
        margin-top: 20px;
    }
    .inicio .fila .col .contenedor-img{
        width: 50%;
        margin-top: 30px;
    }

    .servicios{
        position: static;
        padding: 20px;
    }
    .servicios .fila{
        display: block;
        margin-bottom: 0;
    }
    .servicios .fila .col{
        width: 70%;
        margin: auto;
    }
    .servicios .fila .col .card{
        margin-bottom: 20px;
    }
    .habilidades{
        position: static;
    }

    .trabajos nav a{
        margin: 0 5px;
    }

    .contacto .fila{
        display:  block !important;
    }
    .contacto .fila .col{
        text-align: center;
        width: 100% !important;
    }
    .contacto .fila .col .info{
        float: left;
        font-size: 12px;
        width: 25%;
    }
}

footer{
    background-color: #000;
    color: #fff;
    padding: 7px 0;
    font-size: 14px;
    text-align: center;
}

/* SECCION RESPONSIVE */
@media screen and (max-width:1180px){
    .inicio{
        clip-path: none;
    }
}

/* Botón de cambio de tema */
.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle i {
    transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-toggle i {
    transform: rotate(180deg);
}

/* Ajuste para el scroll y anclaje de secciones */
section {
    scroll-margin-top: 100px;
}

.habilidades {
    padding-top: 80px;
    margin-top: -80px;
}