/*
 * Main CSS for Documentary Photography Portfolio
 * No external frameworks. Zero libraries.
 */

:root {
    /* Color Palette - Editorial & Modern */
    --primary-color: #1a1a1a;
    --secondary-color: #ffffff;
    --accent-color: #d42027; /* subtle red for call to action */
    --text-color: #2c2c2c;
    --muted-color: #767676;
    --bg-color: #ffffff;
    --border-color: #eeeeee;
    
    /* Typography - Clean & Premium */
    --font-heading: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Lora', 'Georgia', serif; /* Serif for that editorial look */
    
    /* Layout */
    --container-max-width: 1200px;
    --section-padding: 80px 20px;
    --header-height: 80px;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-color);
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-heading {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER & NAVIGATION --- */
header {
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-slow);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition-fast);
}

.nav-links a:hover::after, 
.nav-links a.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition-fast);
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    background-color: var(--primary-color);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transform: scale(1.05);
    animation: zoomOut 20s linear infinite alternate;
}

@keyframes zoomOut {
    from { transform: scale(1.1); }
    to { transform: scale(1); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    color: white;
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: 20px;
    line-height: 1.1;
    font-weight: 900;
}

.hero-content p {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-cta {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.btn-cta:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-5px);
}

/* --- SECTIONS --- */
section {
    padding: var(--section-padding);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* --- SOBRE MÍ --- */
.about-section {
    background-color: #fcfcfc;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-content h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.about-text {
    font-size: 1.125rem;
    color: var(--text-color);
}

.about-text p {
    margin-bottom: 1.5rem;
}

/* --- MASONRY GALLERY --- */
.masonry-grid {
    column-count: 3;
    column-gap: 20px;
}

.masonry-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.masonry-image {
    width: 100%;
    transition: var(--transition-slow);
}

.masonry-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 20px 20px;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 100%);
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-fast);
}

.masonry-item:hover .masonry-image {
    transform: scale(1.05);
}

.masonry-item:hover .masonry-info {
    opacity: 1;
    transform: translateY(0);
}

.masonry-info h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 5px;
}

.masonry-info p {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* --- BLOG SECTION --- */
.blog-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
}

.blog-card {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 30px;
    transition: var(--transition-fast);
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-card-img {
    height: 250px;
    overflow: hidden;
    margin-bottom: 20px;
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

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

.blog-card-date {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--muted-color);
    margin-bottom: 10px;
    display: block;
}

.blog-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.blog-card p {
    color: var(--muted-color);
    margin-bottom:20px;
}

/* --- INDIVIDUAL GALLERY VIEWER --- */
.gallery-viewer {
    background-color: var(--primary-color);
    min-height: 100vh;
    color: white;
    padding-top: var(--header-height);
}

.viewer-header {
    padding: 40px 0;
    text-align: center;
}

.viewer-header h1 { color: white; margin-bottom: 10px; }

.viewer-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-main-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    cursor: pointer;
}

.viewer-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 15%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-fast);
}

.viewer-nav:hover {
    background: rgba(255,255,255,0.05);
}

.viewer-nav-prev { left: 0; }
.viewer-nav-next { right: 0; }

.viewer-caption {
    margin-top: 30px;
    padding: 20px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* --- FOOTER --- */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand h2 {
    color: white;
    margin-bottom: 20px;
}

.footer-brand p {
    color: rgba(255,255,255,0.6);
}

.footer-links h3, .footer-social h3 {
    color: white;
    font-size: 1rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.footer-links a {
    display: block;
    margin-bottom: 10px;
    color: rgba(255,255,255,0.6);
}

.footer-links a:hover {
    color: white;
}

.footer-social-icons {
    display: flex;
    gap: 20px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .masonry-grid { column-count: 2; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        transition: var(--transition-slow);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .masonry-grid { column-count: 1; }
    .footer-grid { grid-template-columns: 1fr; }
}
