/* Minimalist Redesign for erreefe */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --text-muted: #888888;
    --accent-color: #000000;
    --sidebar-width: 280px;
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --transition-speed: 0.4s;
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
    --divider-line: #f0f0f0;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Vertical Sidebar Navigation */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--bg-color);
    z-index: 1000;
    border-right: 1px solid #f0f0f0;
}

.logo-container {
    text-decoration: none;
    color: var(--text-color);
    margin-bottom: 4rem;
}

.logo-container h1 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: capitalize; /* Ricardo Fernández with only initials capitalized */
    margin-bottom: 0.2rem;
}

.logo-container .aka {
    font-size: 1.5rem; /* Reduced from 2rem by 25% */
    color: #666666;    /* 60% gray */
    font-weight: 300;
    letter-spacing: 0.05em;
    display: block;
    margin-top: 0.5rem;
}

.main-nav {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 3rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color var(--transition-speed) var(--ease);
}

.main-nav a:hover, .main-nav a.active {
    color: var(--accent-color);
}

.site-footer {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Main Content Area */
.page-content {
    margin-left: var(--sidebar-width);
    padding: 0;
    max-width: 100%;
}

.page-section {
    padding: 6rem 4rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.page-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 1.5rem; /* Reduced by 25% from 2rem */
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 4rem;
    color: var(--text-color);
    text-transform: lowercase;
    scroll-margin-top: 100px; /* Account for fixed headers */
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-color);
    transition: transform var(--transition-speed) var(--ease);
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img, .gallery-item video {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 4/3;
    margin-bottom: 1rem;
    filter: grayscale(100%);
    transition: filter var(--transition-speed) var(--ease);
}

.gallery-item:hover img, .gallery-item:hover video {
    filter: grayscale(0%);
}

/* Premium Award Zoom Effect */
.gallery-item.premium-award:hover img {
    transform: scale(1.3);
    z-index: 10;
}

/* Premium Lightbox Effect */
.gallery-item.premium-award.clicked-zoom {
    cursor: zoom-out;
    z-index: 10000; /* Ensure container is above everything */
    position: relative;
}

.gallery-item.premium-award.clicked-zoom img {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) !important;
    width: auto;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 10001; /* Above backdrop */
    filter: grayscale(0%);
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    border-radius: 4px;
}

/* Glassmorphism Backdrop when zoomed */
.gallery-item.premium-award.clicked-zoom::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
}

.gallery-item.premium-award {
    overflow: visible;
    cursor: zoom-in;
}

/* Evolution Comparison Labels */
.evolution-comparison {
    position: relative;
}

.evolution-comparison .labels {
    position: absolute;
    top: -2.5rem;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    font-size: 0.63rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--light);
}

.evolution-comparison .labels span {
    width: 50%;
    text-align: center;
}

.evolution-comparison img {
    margin-top: 1rem;
}

.gallery-item .title {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: none; /* Mayúsculas y minúsculas */
    color: #333333; /* 80% negro (aprox #333) */
    letter-spacing: 0.05em;
}

/* Subpage Specific */
.subpage .project-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
}

.subpage .project-gallery-grid, .subpage .project-gallery-grid-2 {
    display: grid;
    gap: 2rem;
    width: 100%;
    margin: 0 auto;
}

.subpage .project-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
}

.subpage .project-gallery-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.subpage .project-gallery-grid .gallery-item, .subpage .project-gallery-grid-2 .gallery-item {
    width: 100%;
    margin: 0 auto; /* Ensure smaller grid items are centered */
}

.subpage .gallery-item {
    width: 35%; /* Reduced by additional 30% from 50% */
    margin: 0 auto;
}

.subpage .gallery-item.mini-image {
    width: 26%; /* 75% of 35% */
}

/* Specific Scaling Classes */
.subpage .gallery-item.scale-50 { width: 17.5%; } /* 50% of 35% */
.subpage .gallery-item.scale-40 { width: 14%; }   /* 40% of 35% */
.subpage .gallery-item.scale-30 { width: 10.5%; } /* 30% of 35% */
.subpage .gallery-item.scale-20 { width: 7%; }    /* 20% of 35% */
.subpage .gallery-item.scale-80 { width: 28%; }   /* 20% reduction (80%) of 35% */
.subpage .gallery-item.scale-75 { width: 26.25%; } /* 25% reduction (75%) of 35% */
.subpage .gallery-item.scale-70 { width: 24.5%; } /* 30% reduction (70%) of 35% */
.subpage .gallery-item.scale-90 { width: 31.5%; } /* 10% reduction (90%) of 35% */
.subpage .gallery-item.scale-85 { width: 29.75%; } /* 15% reduction (85%) of 35% */
.subpage .gallery-item.scale-115 { width: 40.25%; } /* 15% enlargement (115%) of 35% */
.subpage .gallery-item.scale-130 { width: 45.5%; } /* 30% enlargement (130%) of 35% */

.subpage .gallery-item.full-width {
    width: 100% !important;
}

.subpage .gallery-item.width-75 {
    width: 75% !important;
}

.subpage .gallery-item.width-90 {
    width: 90% !important;
}

.subpage .gallery-item.width-80 {
    width: 80% !important;
}

.subpage .gallery-item.width-85 {
    width: 85% !important;
}

.subpage .gallery-item.width-68 {
    width: 68% !important;
}

.subpage .gallery-item.width-50 {
    width: 50% !important;
}

.rotate-180 {
    transform: rotate(180deg);
}

.subpage .gallery-item img, .subpage .gallery-item video {
    aspect-ratio: auto; /* Preserve original aspect ratio */
    filter: none; /* Clear view on subpages */
}

.project-text {
    max-width: 800px;
    margin: 0 auto 4rem auto;
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-color);
    font-weight: 300;
}

/* Bio Section */
.bio-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}

.bio-container img {
    border-radius: 4px;
    width: 180px; /* Reduced from 300px by 40% */
    align-self: flex-start;
}

.bio-sidebar img {
    width: 100%;
    height: auto;
    filter: grayscale(100%);
}

.bio-text {
    max-width: 600px;
}

.bio-text p {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-weight: 300;
}

.contact-info {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-info a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid transparent;
    width: max-content;
    transition: border-color var(--transition-speed) var(--ease);
}

.contact-info a:hover {
    border-bottom-color: var(--text-color);
}

/* Services */
.services-list {
    list-style: none;
}

.services-list li {
    font-size: 1.5rem; /* Reduced by 25% from 2rem */
    font-weight: 300;
    margin-bottom: 1rem;
    color: var(--text-color);
}

/* Responsive */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 0px;
    }

    .site-header {
        position: relative;
        width: 100%;
        height: auto;
        padding: 2rem;
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }

    .logo-container {
        margin-bottom: 0;
    }

    .main-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .site-footer {
        display: none;
    }

    .page-content {
        margin-left: 0;
    }

    .page-section {
        padding: 4rem 2rem;
        min-height: auto;
    }

    .bio-container {
        grid-template-columns: 1fr;
    }
}
