/* FONT FAMILY */
@import url('https://fonts.googleapis.com/css2?family=Abhaya+Libre:wght@400&family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400;1,700&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    width: 100%;
    font-family: "Atkinson Hyperlegible", sans-serif;
    color: #442F2A;
}

h1,
h2,
.footer-col h3,
.project a:not(:last-child) {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    color: #442F2A;
}


/* NAV DESKTOP */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff7ec80;
    margin: 20px;
    padding: 15px 20px;
    border: 2px solid #442F2A;
    border-radius: 40px;
    position: sticky;
    top: 20px;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

nav .logo {
    width: 12rem;
}

nav .nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 10px;
}

.nav-links a {
    text-decoration: underline 1px solid #442F2A;
    color: #442F2A;
    font-size: 1rem;
    padding: 10px 8px;
    transition: 0.3s;
}

.nav-links a:hover {
    background-color: #F5CBD7;
    padding: 10px 12px;
    border-radius: 10px;
}

.menu-open,
.menu-close {
    display: none;
}

.breadcrumbs{
    text-decoration: underline 1px solid #442F2A;
    color: #442F2A;
    padding: 12px;
}


/* NAV TABLET */
@media (min-width: 769px) and (max-width: 1024px) {
    nav {
        margin: 10px 20px;
        padding: 14px 20px 10px;
    }

    nav .logo {
        width: 10rem;
    }

    .nav-links a {
        font-size: 0.9rem;
    }
}


/* NAV MOBILE */
@media (max-width: 768px) {
    nav{
        margin: 10px 8px 10px 16px;
        padding: 15px 20px 10px;
    }

    nav:has(#menu-mobile:target) {
        margin: 0;
        top: 0;
        backdrop-filter: none;
        border: none;
        background-color: transparent;
        border-radius: 0;
    }

    .menu-open {
        display: block;
        font-size: 2.5rem;
        color: #442F2A;
        cursor: pointer;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: #442F2A;
        z-index: 9999;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-end;
        padding: 0 50px;
        gap: 30px;
        transition: opacity 0.4s ease;
    }

    .nav-links:target {
        height: 100%;
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links li {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    .nav-links a {
        color: #FFF7EC;
        font-size: 2.5rem;
        text-align: right;
        text-decoration: none;
        padding: 10px 0;
    }

    .menu-close {
        display: block;
        position: absolute;
        top: 30px;
        right: 30px;
        font-size: 3rem;
        color: #FFF7EC;
        z-index: 10000;
    }
}



/* POPUP CONTACTO */

.bubble-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 997;
}

/* ==================== FLECHAS ANIMADAS BUBBLE MODIFICADAS ==================== */

.bubble-arrows {
    display: flex;
    align-items: center;
    position: absolute;
    top: 50%;
    left: -50px; /* Las ubica a la izquierda de la burbuja */
    transform: translateY(-50%);
    gap: 2px;
    pointer-events: none;
    /* Animación de deslizamiento horizontal constante */
    animation: arrowsSlide 0.8s infinite ease-in-out alternate;
}

/* Diseño de la flecha delgada dibujada con CSS */
.bubble-arrows span {
    display: block;
    width: 14px;
    height: 14px;
    border-right: 2.5px solid #442F2A; /* Grosor de la línea */
    border-top: 2.5px solid #442F2A;   /* Grosor de la línea */
    transform: rotate(45deg); /* Crea la forma de flecha apuntando a la derecha */
}

/* Si el popup está abierto, ocultamos las flechas */
body:has(#contact-popup:target) .bubble-arrows {
    display: none;
}

/* ANIMACIÓN: Movimiento lateral suave */
@keyframes arrowsSlide {
    0% {
        transform: translateY(-50%) translateX(0);
    }
    100% {
        transform: translateY(-50%) translateX(10px);
    }
}

/* Resto del CSS del popup se mantiene igual */

.bubble-close-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    z-index: 998;
    display: none; 
}

body:has(#contact-popup:target) .bubble-close-overlay {
    display: block;
}

.contact-bubble {
    display: flex;
    width: 65px;
    height: 65px;
    background-color: #442F2A;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.bubble-icon-img {
    width: 2.5rem; 
    height: auto;
}
/* ... seguir con el resto de tus estilos ... */

.contact-bubble:hover {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}


body:has(#contact-popup:target) .contact-bubble {
    transform: scale(1);
    background-color: #442F2A;
}

.contact-popup {
    position: fixed;
    bottom: 110px; 
    right: 30px;
    width: 300px;
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 996;
    transform: scale(0);
    transform-origin: bottom right;
    transition: all 0.4s ease;
    opacity: 0;
    pointer-events: none;
}


#contact-popup:target {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}


.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.8rem;
    color: #442F2A;
    text-decoration: none;
    transition: 0.3s;
}

.popup-close:hover {
    transform: scale(1.1) rotate(2deg);
}


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

.logo-mini {
    background-color: #442F2A;
    padding: 5px;
    width: 35px;
    height: 35px;
    object-fit: contain;
    border-radius: 50%;
}

.popup-logo h2 {
    font-size: 1.1rem;
    color: #442F2A;
    font-family: "Montserrat", sans-serif;
    margin: 0;
}

.popup-divider {
    height: 1px;
    background-color: #f0f0f0;
    margin: 20px 0;
}


.popup-contacts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popup-contacts li {
    margin-bottom: 15px;
}

.popup-contacts a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #442F2A;
    font-family: "Atkinson Hyperlegible", sans-serif;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: 0.3s;
}

.popup-contacts a i {
    font-size: 1.3rem;
}

.popup-contacts a:hover {
    color: #F5CBD7; 
    transform: translateX(5px);
}

/* POPUP TABLET */

@media (min-width: 768px) and (max-width: 1024px) {
    .bubble-wrapper {
        bottom: 8%;
    }

    .contact-popup {
        bottom: 16%;
    }

    .contact-bubble, .bubble-close-overlay {
        width: 65px;
        height: 65px;
    }
    .contact-popup {
        width: 280px;
    }
}

/* POPUP MOBILE */

@media (max-width: 767px) {
    .bubble-wrapper {
        bottom: 15%;
        right: 20px;
    }
    
    .contact-bubble, .bubble-close-overlay {
        width: 55px;
        height: 55px;
    }
    
    .bubble-icon-img {
        width: 1.8rem;
    }
    
    .contact-popup {
        width: 85vw; 
        right: 20px;
        bottom: 22%;
        padding: 20px;
    }

    #projects {
        padding-top: 12px;
    }
}

@media (max-width: 376px) {

 .bubble-wrapper {
        bottom: 12%;
        right: 20px;
    }
}

/* --- SKILL HERO --- */
.skill-hero {
    padding: 120px 5% 60px;
    background: linear-gradient(180deg, #FFF7EC 0%, #FFFFFF 100%);
}

.skill-header-container {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 30px;
}

.skill-main-icon {
    width: 180px;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
}

.skill-intro h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.skill-description {
    max-width: 700px;
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 20px 0px 35px;
}

/* --- ESTILOS DE VALOR CONCRETO --- */
.value-add-section {
    padding: 100px 5%;
    background-color: #442F2A;
    color: #FFF7EC;
    text-align: center;
}

.value-add-section h2 {
    color: #F5CBD7;
    margin-bottom: 60px;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.process-card {
    background: rgba(255, 247, 236, 0.03);
    padding: 40px 30px;
    border-radius: 24px;
    border: 1px solid rgba(245, 203, 215, 0.1);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.process-card:hover {
    background: rgba(255, 247, 236, 0.07);
    border-color: #F5CBD7;
}

.process-card-link{
    text-decoration: none;
    color: inherit;
}

.card-icon-circle {
    width: 70px;
    height: 70px;
    background-color: #F5CBD7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.card-icon-circle i {
    font-size: 2.2rem;
    color: #442F2A;
}

.process-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #F5CBD7;
}

.process-card p {
    font-size: 1rem;
    line-height: 1.5;
    opacity: 0.85;
    font-weight: 400;
}

/* --- REUSABILIDAD DE PROYECTOS --- */
.related-projects {
    padding: 80px 5%;
}

.related-projects h2 {
    text-align: center;
    margin-bottom: 50px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .skill-header-container{
        display: inline-block;
        gap: 20px;
        text-align: left;
    }
    .skill-hero { padding-top: 50px; }
    .process-card { padding: 30px 20px; }
}


/* PROJECTS DESKTOP */
#projects {
    text-align: center;
}

.projects-chips {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 30px auto;
    max-width: 90%;
}

.filter-anchor {
    position: absolute;
    visibility: hidden;
    pointer-events: none;
}

.chip {
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 500;
    transition: 0.3s;
    display: inline-block;
    border: 2px solid #F5CBD7;
    color: #442F2A;
}

#chip-ux,
#filter-ux:target~.chips #chip-ux,
#filter-dev:target~.chips #chip-dev,
#filter-brand:target~.chips #chip-brand,
#filter-davinci:target~.chips #chip-davinci,
#filter-coderhouse:target~.chips #chip-coderhouse {
    background-color: #F5CBD7;
}

#filter-dev:target~.chips #chip-ux,
#filter-brand:target~.chips #chip-ux,
#filter-davinci:target~.chips #chip-ux,
#filter-coderhouse:target~.chips #chip-ux {
    background-color: transparent;
}

#projects:not(:has(.filter-anchor:target)) .project:not(.ux),
#filter-ux:target~.projects .project:not(.ux),
#filter-dev:target~.projects .project:not(.dev),
#filter-brand:target~.projects .project:not(.brand),
#filter-davinci:target~.projects .project:not(.davinci),
#filter-coderhouse:target~.projects .project:not(.coderhouse) {
    display: none;
}

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); 
    gap: clamp(15px, 3vw, 30px);
    max-width: 78rem;
    margin: 0 auto;
}

.project {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 38.2rem;
    padding: 15px;
    transition: 0.3s;
    gap: 12px;
}

.project img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 5px;
}

.project a:has(img) {
    border-bottom: none;
    display: block;
    width: 100%;
}

.chip-category {
    display: table;
    padding: 6px 10px;
    border-radius: 10px;
    background-color: #F5CBD7;
    border: 2px solid #F5CBD7;
    color: #442F2A;
    font-size: 0.9rem;
    font-weight: 500;
}

.project a {
    display: table;
    text-decoration: none;
    color: #442F2A;
    border-bottom: 2px solid #442F2A;
    font-weight: 600;
    line-height: 1.4;
    transition: 0.3s;
    margin-top: 2px;
}

.project a:hover {
    transform: scale(0.99);
}

.btn-primary {
    text-decoration: none;
    background-color: #442F2A;
    border: 2px solid #442F2A;
    color: #FFF7EC;
    padding: 15px 20px;
    border-radius: 8px;
    transition: 0.3s;
}

.btn-secondary {
    text-decoration: none;
    border: 2px solid #442F2A;
    color: #442F2A;
    padding: 15px 20px;
    border-radius: 8px;
    transition: 0.3s;
}

.btn-primary:hover,
.btn-secondary:hover {
    background-color: #FFF7EC;
    color: #442F2A;
    border-color: #FFF7EC;
}

/* PROJECTS TABLET */
@media (min-width: 769px) and (max-width: 1024px) {
    .projects {
        gap: 15px;
        padding: 0 10px;
    }

    .project {
        padding: 10px;
    }
}


/* PROJECTS MOBILE */
@media (max-width: 768px) {
    .projects {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 30px;
        padding: 15px 6px 15px 15px;
        width: 100%;
    }

    .project {
        width: 100%;
        padding: 2px;
    }

    .chip-category {
        font-size: 0.8rem;
        padding: 5px 12px;
    }

    .project a {
        font-size: 1.1rem;
        margin-top: 0;
    }

    .project a:last-child {
        font-size: 0.9rem;
        font-weight: 500;
        margin-top: -5px;
    }
}



/* FOOTER DESKTOP */
footer {
    position: relative;
    padding: 5%;
    margin-top: 10px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    gap: 40px;
}

.footer-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-logo {
    width: 180px;
    margin-bottom: 10px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.social-item {
    display: inline-flex;
    align-items: center;
    background-color: #FFF7EC;
    color: #442F2A;
    padding: 8px 20px 8px 12px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: 0.3s;
}

.social-item span {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1.5px;
    display: inline-block;
}

.social-item i {
    margin-right: 8px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
}

.social-item:hover {
    background-color: #F5CBD7;
    transform: translateX(8px);
}

.footer-links a {
    display: table;
    color: #442F2A;
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 1.5px;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 8px;
    transition: 0.3s;
}

.footer-links a:hover {
    opacity: 0.6;
}

.footer-heart-left,
.footer-heart-right {
    position: absolute;
    z-index: 1;
}

.footer-heart-left {
    left: -5%;
    bottom: 10%;
    width: 250px;
    filter: blur(5px);
    opacity: 0.6;
}

.footer-heart-right {
    right: -5%;
    top: 10%;
    width: 300px;
    filter: blur(8px);
    opacity: 0.5;
}


/* FOOTER TABLET */
@media (min-width: 769px) and (max-width: 1024px) {
    .footer-container {
        gap: 20px;
    }

    .footer-logo {
        width: 140px;
    }

    .social-item {
        font-size: 1rem;
        padding: 6px 15px;
    }
}


/* FOOTER MOBILE */
@media (max-width: 768px) {
    footer {
        padding: 20px 20px;
    }

    .footer-container {
        flex-direction: column;
        gap: 50px;
    }

    .footer-logo {
        width: 150px;
    }

    .social-item {
        font-size: 0.95rem;
        padding: 8px 15px;
    }

    .footer-heart-left,
    .footer-heart-right {
        width: 150px;
        opacity: 0.4;
    }

    .social-item span,
    .footer-links a {
        text-underline-offset: 3px;
    }
}


