/* =========================================
   1. CONFIGURACIÓN BASE & VARIABLES
   ========================================= */
:root {
    --bg-color: #ffffff;
    --text-primary: #0a0a0a;
    --text-secondary: #555555;
    --accent-color: #0056FF; /* Azul Eléctrico */
    --font-main: 'Open Sans', sans-serif;
    --font-display: 'Mulish', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    font-size: 16px;
}

a { text-decoration: none; color: inherit; transition: opacity 0.3s; }
ul { list-style: none; }

/* =========================================
   2. NAVBAR & MENU (Global)
   ========================================= */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    padding: 1.2rem 4%;
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.brand-signature {
    /*width: 180px;*/ height: 40px;
    display: flex; align-items: center; z-index: 1002;
}
.brand-signature img {
    width: 100%; height: 100%; object-fit: contain; object-position: left;
}

.nav-links { display: flex; gap: 2rem; align-items: center; }

.nav-item {
    font-family: var(--font-display);
    font-size: 0.85rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    position: relative;
}
.nav-item.active { color: var(--accent-color); }
.nav-item:hover { color: var(--accent-color); }

/* Botón de Idioma (EN/ES) */
.lang-btn {
    border: 1px solid #ccc;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    background: transparent;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-primary);
    transition: all 0.3s ease;
    margin-left: 1rem; /* Un poco de aire extra */
}

.lang-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Menú Hamburguesa */
/* .hamburger {
    display: none; flex-direction: column; cursor: pointer; gap: 6px; z-index: 1002;
}
.bar {
    width: 25px; height: 3px; background-color: var(--text-primary); transition: 0.3s;
} */
 .hamburger {
    display: none; flex-direction: column; cursor: pointer; gap: 6px; z-index: 1002;
}
.bar {
    width: 25px; height: 3px; background-color: var(--text-primary); transition: 0.3s;
}
/* =========================================
   ANIMACIÓN DE HAMBURGUESA A "X" MINIMALISTA (SOPHISTICATED)
   ========================================= */

.hamburger {
    display: none; 
    flex-direction: column; 
    cursor: pointer; 
    gap: 6px; 
    z-index: 1002;
    padding: 10px; /* Aumentamos el área de clic para mejor usabilidad */
}

/* 1. Suavizamos la transición de las barras */
.bar {
    width: 28px; /* Un poco más anchas para presencia */
    height: 2px; /* Más finas para elegancia (antes eran 3px) */
    background-color: var(--text-primary); 
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); 
    border-radius: 2px;
}

/* 2. ESTADOS ACTIVOS (La Magia de la X) */

/* BARRA DEL MEDIO: Desaparece rápido */
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(10px); /* Se va hacia la derecha suavemente */
}

/* BARRA DE ARRIBA: Baja y rota */
.hamburger.active .bar:nth-child(1) {
    /* translateY(8px) -> Baja para encontrarse con la otra.
       rotate(45deg) -> Gira.
    */
    transform: translateY(8px) rotate(45deg);
    background-color: var(--text-primary); 
}

/* BARRA DE ABAJO: Sube y rota */
.hamburger.active .bar:nth-child(3) {
    /* translateY(-8px) -> Sube para encontrarse con la otra.
       rotate(-45deg) -> Gira al revés.
    */
    transform: translateY(-8px) rotate(-45deg);
    background-color: var(--text-primary);
}

/* Hover sutil 

.hamburger:hover .bar {
    background-color: var(--accent-color);
}
    */

/* =========================================
   RESPONSIVE NAV (FULL SCREEN MODE)
   ========================================= */
@media (max-width: 768px) {
    .hamburger { display: flex; }
    
    .nav-links {
        position: fixed; top: 0; right: -100%;
        height: 100vh; 
        width: 100%; /* Ocupa todo el ancho */
        background: rgba(255, 255, 255, 0.98); /* Blanco casi puro */
        backdrop-filter: blur(10px); /* Desenfoque sutil detrás */
        
        flex-direction: column; 
        justify-content: center; /* Centra los items verticalmente */
        align-items: center; /* Centra los items horizontalmente */
        
        padding-left: 0; 
        gap: 3rem; /* Mucho aire entre links */
        
        transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1); /* Animación "Swish" premium */
        z-index: 999; 
    }
    
    /* Hacemos la letra más grande y elegante */
    .nav-links .nav-item {
        font-size: 1.5rem; /* Texto grande */
        font-weight: 300; /* Letra más fina (light) */
        letter-spacing: 2px;
        color: var(--text-primary);
    }
    
    .nav-links .nav-item.active {
        font-weight: 700; /* Solo el activo se pone negrita */
        color: var(--accent-color);
    }
    
    .nav-links.active { right: 0; }

    /* ESTO VA ADENTRO DEL @MEDIA (max-width: 768px) */
    
    .lang-btn {
        margin-left: 0; /* Quitamos el margen lateral para que se centre perfecto */
        margin-top: 1rem; /* Opcional: le damos un poco más de aire arriba */
        font-size: 1.2rem; /* Lo hacemos un poquito más grande para que acompañe el tamaño de los links */
        padding: 8px 20px; /* Botón más fácil de tocar con el dedo */
    }
}

/* Responsive Nav */

/* =========================================
   @media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-links {
        position: fixed; top: 0; right: -100%;
        height: 100vh; width: 75%;
        background: white;
        flex-direction: column; justify-content: center; align-items: flex-start;
        padding-left: 2rem;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.4s ease;
    }
    .nav-links.active { right: 0; }
}
   ========================================= */
/* Responsive Nav */
/* Responsive Nav */
@media (max-width: 768px) {
    .hamburger { display: flex; }
    
    .nav-links {
        position: fixed; top: 0; right: -100%;
        height: 100vh; 
        width: 100%; /* Ocupa todo el ancho */
        background: white; /* O podés probar var(--bg-color) */
        
        flex-direction: column; 
        justify-content: center; /* Centra los items verticalmente */
        align-items: center; /* Centra los items horizontalmente */
        
        padding-left: 0; /* Sin padding lateral porque va centrado */
        gap: 2.5rem; /* Más espacio entre cada link */
        
        transition: right 0.4s ease;
        z-index: 999; 
    }
    
    /* Hacemos la letra un poco más grande en este modo para más impacto */
    .nav-links .nav-item {
        font-size: 1.2rem;
    }
    
    .nav-links.active { right: 0; }
}
/* =========================================
   3. ESTILOS DE INDEX (Home)
   ========================================= */
.hero {
    min-height: 85vh;
    display: flex; flex-direction: column; justify-content: center;
    padding: 100px 4% 8rem 4%;
}
.hero h1 {
    /* Mínimo 2.8rem (Entra perfecto en mobile) - Máximo 7.5rem */
    font-size: clamp(2.8rem, 10vw, 7.5rem); 
    
    line-height: 1.1; /* Le di un pelito más de aire para que no se pegue al achicarse */
    font-weight: 800;
    letter-spacing: -2px; 
    margin-bottom: 2rem;
}
.gradient-text {
    background: linear-gradient(to right, #000000 0%, #777777 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.highlight {
    color: var(--accent-color); -webkit-text-fill-color: var(--accent-color); display: inline-block;
}
.hero-sub {
    font-family: var(--font-display); font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--text-secondary); max-width: 550px; line-height: 1.6;
    margin-top: 1rem; border-left: 4px solid var(--accent-color); padding-left: 20px;
}

/* Grilla Masonry Index */
.work-section { width: 100%; padding: 0; }
.masonry-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    grid-auto-flow: dense; gap: 0;
}
.grid-item {
    position: relative; display: block; width: 100%; height: 100%;
    overflow: hidden; background: #f4f4f4; aspect-ratio: 1 / 1;
}
.grid-item.wide { grid-column: span 2; aspect-ratio: 2 / 1; }
.grid-item.tall { grid-row: span 2; aspect-ratio: 1 / 2; }
.grid-item.big { grid-column: span 2; grid-row: span 2; aspect-ratio: 1 / 1; }

.grid-item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); filter: grayscale(100%);
}
.grid-item:hover img { transform: scale(1.03); filter: grayscale(0%); }
.item-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 86, 255, 0.7); opacity: 0;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.3s ease; color: white;
    font-weight: 800; font-size: 1.5rem; text-transform: uppercase; letter-spacing: 2px;
}
.grid-item:hover .item-overlay { opacity: 1; }

@media (max-width: 1024px) { .masonry-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
    .masonry-grid { grid-template-columns: 1fr; }
    .grid-item.wide, .grid-item.tall, .grid-item.big { grid-column: span 1; grid-row: span 1; aspect-ratio: 4/3; }
}

/* =========================================
   4. ESTILOS DE DESTACADOS
   ========================================= */
.page-header { padding: 120px 4% 40px 4%; text-align: center; }
.page-header h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; margin-bottom: 0.5rem; }
.page-header p { font-family: var(--font-display); color: #555; max-width: 600px; margin: 0 auto; }

.category-split { display: grid; grid-template-columns: 1fr 1fr; height: 70vh; width: 100%; }
.cat-card {
    position: relative; display: flex; justify-content: center; align-items: center;
    overflow: hidden; color: white; border: 1px solid white;
}
.cat-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.8s ease; filter: brightness(0.5) grayscale(100%); z-index: 1;
}
.cat-content {
    position: relative; z-index: 2; text-align: center;
    /*border: 2px solid rgba(255,255,255,0.5); padding: 2rem; transition: all 0.3s;*/
}
.cat-card:hover .cat-bg { transform: scale(1.1); filter: brightness(0.4) grayscale(0%); }
.cat-card:hover .cat-content { border-color: var(--accent-color); background: rgba(0,0,0,0.6); }
.cat-title { font-size: 2rem; font-weight: 800; text-transform: uppercase; margin-bottom: 0.5rem; margin-left: 1rem;margin-right: 1rem;letter-spacing: 2px; }
.cat-desc { font-family: var(--font-display); font-size: 0.9rem; letter-spacing: 1px; }

@media (max-width: 768px) {
    .category-split { grid-template-columns: 1fr; height: auto; }
    .cat-card { height: 40vh; }
}

/* =========================================
   5. ESTILOS DE TANGIBLE / INTANGIBLE
   ========================================= */
.work-header { padding: 140px 4% 60px 4%; max-width: 1200px; margin: 0 auto; }
.label-cat {
    color: var(--accent-color); font-weight: 800; text-transform: uppercase;
    letter-spacing: 2px; font-size: 0.9rem; display: block; margin-bottom: 15px;
    padding-left: 10px; border-left: 3px solid var(--accent-color);
}
.work-header h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -1px; }

.projects-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
    padding: 0 4% 100px 4%; max-width: 1400px; margin: 0 auto;
}
.project-card { display: block; position: relative; cursor: pointer; }

/* Wrapper de imagen UNIFICADO */
.img-wrapper { 
    width: 100%; 
    overflow: hidden; 
    background: #f0f0f0; 
    margin-bottom: 20px;
    
    /* ACÁ ESTÁ LA MAGIA: Forzamos la proporción igual para todos */
    aspect-ratio: 4/3; /* Formato rectangular (ideal para webs/apps) */
    /* aspect-ratio: 1/1; <--- Usá este si preferís cuadrados perfectos */
}

/* Estas dos líneas ya no hacen falta si querés que TODO sea igual, 
   pero podés dejarlas si en el futuro querés diferenciar. 
   Lo importante es que .img-wrapper ya tenga un default arriba. */
.project-card.tangible .img-wrapper { aspect-ratio: 4/5; } 
.project-card.intangible .img-wrapper { aspect-ratio: 4/3; }

.img-wrapper img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); filter: grayscale(100%);
}
.project-card:hover .img-wrapper img { transform: scale(1.05); filter: grayscale(0%); }

.p-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 5px; color: var(--text-primary); }
.p-desc { font-family: var(--font-display); color: var(--text-secondary); font-size: 0.95rem; line-height: 1.5; }

@media (max-width: 900px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .projects-grid { grid-template-columns: 1fr; gap: 50px; } }

/* =========================================
   6. FOOTER & EXTRAS
   ========================================= */
footer { padding: 4rem 4%; background: #f9f9f9; text-align: center; border-top: 1px solid #eee; }
.footer-content { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 2rem; padding-right: 80px; text-align: left; }
.cta-container h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); margin-bottom: 10px; }
.email-link { 
    font-size: clamp(1rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--text-primary); 
    position: relative;
    word-break: break-all; /* <-- Esto es magia para links largos en mobile */ 
    }
.email-link::after { content: ''; display: block; width: 0; height: 4px; background: var(--accent-color); transition: width 0.3s; }
.email-link:hover::after { width: 100%; }

.whatsapp-float {
    position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px;
    background-color: #25d366; color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); z-index: 9999; transition: transform 0.3s;
}
.whatsapp-float:hover { transform: scale(1.1) rotate(10deg); }
.whatsapp-icon { width: 32px; height: 32px; fill: white; }
.back-link { font-weight: 700; border-bottom: 2px solid var(--accent-color); padding-bottom: 2px; }

@media (max-width: 768px) {
    .footer-content { flex-direction: column; padding-right: 0; padding-bottom: 60px; }
}

/* =========================================
   ESTILOS ESPECÍFICOS SOBRE MÍ
   ========================================= */
.about-hero { min-height: 70vh; padding-bottom: 4rem; }

.hero-split {
    display: flex;
    align-items: center;
    gap: 4rem;
    width: 100%;
}

.hero-image-container {
    flex: 1;
    /* max-width: 650px; */
}

.profile-img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    object-position: 50% 25%;
    border-radius: 4px; /* Siguiendo tu estilo limpio */
    filter: grayscale(100%);
    transition: filter 0.5s ease;
    max-height: 80vh; /* Límite de altura para que no se descontrole en monitores gigantes */
}

.profile-img:hover { filter: grayscale(0%); }

.hero-content-about { flex: 1; }

.bento-grid-about {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 80px;
}

.bento-item {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 2px;
}

.process-box {
    background: var(--accent-color);
    color: white;
    padding: 60px 4%;
    border-radius: 4px;
    margin-bottom: 100px;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 40px;
}

.step-item h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.step-item p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Responsive Sobre Mí */
@media (max-width: 768px) {
    .hero-split { flex-direction: column; gap: 2rem; }
    .bento-grid-about, .process-steps { grid-template-columns: 1fr; }
    .hero-image-container { max-width: 100%; }
}

/* =========================================
   7. FOOTER BOTTOM (CREDITS)
   ========================================= */
.footer-bottom {
    margin-top: 3rem; /* Espacio con lo de arriba */
    padding-top: 1.5rem; /* Espacio interno */
    border-top: 1px solid rgba(0, 0, 0, 0.1); /* Línea divisoria sutil */
    text-align: center; /* Centrado */
    font-size: 0.85rem; /* Letra chica pero legible */
    color: var(--text-secondary); /* Gris */
    font-family: var(--font-display);
    opacity: 0.8;
}

/* Ajuste para mobile */
@media (max-width: 768px) {
    .footer-bottom {
        margin-top: 3rem;
        font-size: 0.75rem;
    }
}

/* =========================================
   SCROLL INDICATOR (Brutalist Arrow - Mobile Only)
   ========================================= */

/* Animación de rebote sutil */
@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(15px); }
}

/* Por defecto oculto en desktop */
.scroll-indicator {
    display: none;
}

/* Solo visible en mobile */
@media (max-width: 768px) {
    /* Aseguramos que el padre tenga posición relativa para ubicar la flecha */
    .hero {
        position: relative; 
        /* Si sentís que queda muy pegado el texto arriba, podés aumentar un poco el padding inferior del hero acá:
        padding-bottom: 10rem; */
    }

    .scroll-indicator {
        display: flex;
        justify-content: center;
        align-items: center;
        position: absolute; /* Lo posicionamos "flotando" */
        bottom: 3rem; /* A 3rem del piso del header */
        left: 0;
        width: 100%;
        animation: bob 2s ease-in-out infinite; /* Animación infinita */
        opacity: 0.7; /* Un poco sutil para no competir con el título */
        z-index: 10;
    }

    /* Estilo de la flecha */

    .hero .scroll-indicator svg {
        width: 40px !important;  /* El !important es el "martillazo" para asegurar */
        height: 40px !important;
        max-width: 40px; /* Doble seguridad */
        stroke: var(--text-primary); 
    }
}