/* Variables y Reset */
:root {
    --bg-color: #ffffff;
    --text-color: #2b2b2b;
    --text-light: #777777;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; display: block; border-radius: 4px; }

/* Header */
.header {
    position: fixed; top: 0; width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 100; padding: 1.5rem 0;
    transition: var(--transition);
}

.header.scrolled { box-shadow: 0 2px 10px rgba(0,0,0,0.03); }

.header-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 2rem;
    display: flex; justify-content: space-between; align-items: center;
}

.logo {
    font-family: var(--font-heading); font-size: 1.5rem;
    font-weight: 600; text-transform: uppercase; 
    letter-spacing: 2px; display: block; line-height: 1; 
}

.site-tagline {
    margin: 4px 0 0; font-size: 1.2rem;
    font-weight: 300; color: #666; 
}

/* Menú: Redujimos el gap y permitimos que bajen de línea si la pantalla es muy pequeña */
.nav-list { display: flex; list-style: none; gap: 1.5rem; flex-wrap: wrap; justify-content: flex-end; }

.nav-link {
    font-size: 0.85rem; text-transform: uppercase;
    letter-spacing: 1.5px; color: var(--text-light);
    font-weight: 500; font-family: var(--font-heading);
}
.nav-link:hover { color: var(--text-color); }

.menu-toggle {
    display: none; background: none; border: none;
    cursor: pointer; flex-direction: column; gap: 5px;
}
.menu-toggle span {
    width: 25px; height: 2px;
    background-color: var(--text-color); transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 60vh; height: auto; display: flex; 
    align-items: center; justify-content: center;
    text-align: center; padding: 2rem; 
    margin-top: 80px; overflow: hidden; 
}

.hero-container {
    display: flex;
    flex-direction: column; /* Apila las imágenes verticalmente, una debajo de otra */
    gap: 4rem; /* <-- AQUÍ ESTÁ EL AIRE. Puedes subirlo a 6rem o bajarlo a 2rem según tu gusto */
    width: 100%;
    align-items: center; /* Asegura que ambas imágenes estén perfectamente centradas */
}

.hero img {
    max-width: 500px; width: 100%; height: auto;
    display: block; margin: 0 auto; object-fit: contain; 
}

/* =========================================
/* =========================================
   PORTAFOLIO (Galería Natural sin recortes)
========================================= */
/* =========================================
   PORTAFOLIO (Formato Editorial / Una por fila)
========================================= */
.portfolio { 
    padding: 3rem 2rem 1rem 2rem; 
    max-width: 600px; 
    margin: 0 auto; 
}

.gallery {
    display: flex; 
    flex-direction: column; /* ¡LA CLAVE! Esto apila las imágenes una debajo de la otra */
    align-items: center; /* Centra todas las obras en medio de la pantalla */
    gap: 6rem; /* AIRE: El espacio en blanco vertical entre una obra y la siguiente */
}

/* Aplicamos los cambios a todas las imágenes, anulando los rectángulos/cuadrados antiguos */
.gallery-img, .img-square, .img-rect {
    width: 100%; /* La imagen crece a lo ancho... */
    max-width: 800px; /* ...pero le ponemos un límite para que no se vea exageradamente gigante en monitores de PC */
    height: auto; /* La altura se calcula sola para que no se deforme */
    object-fit: contain; /* Garantía de CERO recortes */
    
    flex: none;
    aspect-ratio: auto;
    
    cursor: pointer; 
    filter: brightness(0.95);
    transition: filter 0.4s ease, transform 0.6s ease;
}

.gallery-img:hover, .img-square:hover, .img-rect:hover { 
    filter: brightness(1); 
    transform: scale(1.02); 
}

/* Sobre mí */
.about { padding: 6rem 2rem; background-color: #fafafa; margin-top: 3rem; }
.about-grid {
    max-width: 600px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr; gap: 4rem; align-items: center;
}
.about-img { max-width: 100%; height: auto; margin: 0 auto; }

.section-title {
    font-family: var(--font-heading); font-size: 1.25rem; 
    font-weight: 500; margin-bottom: 2rem; letter-spacing: 2px; 
}
.text-center { text-align: center; }
.about-content p {
    margin-bottom: 1.5rem; color: var(--text-light); font-size: 1.05rem;
}

/* Contacto */
.contact { padding: 8rem 2rem; max-width: 1000px; margin: 0 auto; }
.contact-wrapper { display: grid; grid-template-columns: 1fr; gap: 4rem; margin-top: 3rem; }
.contact-info p { color: var(--text-light); margin-bottom: 2rem; }

.email {
    display: block; font-family: var(--font-heading); font-size: 1.5rem;
    color: var(--text-color); margin-bottom: 0; line-height: 1.1;   
    padding-bottom: 0; font-weight: 500;
}

.socials { display: flex; gap: 1.5rem; }
.socials a { font-family: var(--font-heading); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-light); font-weight: 600;}
.socials a:hover { color: var(--text-color); }

.contact-form { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-form input, .contact-form textarea {
    width: 100%; padding: 1rem 0; border: none; border-bottom: 1px solid #e0e0e0;
    background: transparent; font-family: var(--font-body); font-size: 1rem;
    outline: none; transition: border-color 0.3s ease;
}
.contact-form input:focus, .contact-form textarea:focus { border-bottom-color: var(--text-color); }

.btn {
    align-self: flex-start; padding: 1rem 2.5rem; background-color: transparent;
    color: var(--text-color); border: 1px solid var(--text-color);
    font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 1.5px;
    font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: var(--transition); margin-top: 1rem;
    border-radius: 4px;
}
.btn:hover { background-color: var(--text-color); color: var(--bg-color); }

/* Footer */
.footer { text-align: center; padding: 4rem 2rem; font-size: 0.85rem; color: var(--text-light); border-top: 1px solid #f0f0f0; }

/* Media Queries (Ajustes para Celular) */
@media (min-width: 768px) {
    .about-grid, .contact-wrapper { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    
    .nav {
        position: absolute; top: 100%; left: 0; width: 100%;
        background-color: var(--bg-color); padding: 2rem 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.05);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
    }
    .nav.active { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
    .nav-list { flex-direction: column; align-items: center; gap: 1.5rem; }

    /* Ajuste de las nuevas galerías para celulares */

/* Ajuste de las galerías para celulares (Columna Única) */
    .gallery {
        gap: 4rem; /* Reducimos un poco el aire entre imágenes para que no haya que deslizar tanto en el celular */
    }
    
    .gallery-img, .img-square, .img-rect { 
        width: 100%; /* En celular, la imagen ocupa el 100% del ancho de la pantalla */
        max-width: 100%;
        height: auto;
        max-height: none;
    }