/* ============================================
   RESET Y VARIABLES GLOBALES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #000000;
    --white: #FFFFFF;
    --grey-10: #1A1A1A;
    --grey-20: #333333;
    --grey-80: #CCCCCC;
    --grey-90: #E5E5E5;
    
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   BASE + GRAIN EFFECT
   ============================================ */
body {
    font-family: var(--font-main);
    background: var(--white);
    color: var(--black);
    font-size: 13px;
    line-height: 1.6;
    font-weight: 400;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        rgba(0, 0, 0, 0.05) 100%
    );
    pointer-events: none;
    z-index: 9998;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.06'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
    opacity: 0.4;
}

/* ============================================
   NAVEGACIÓN VERTICAL IZQUIERDA
   ============================================ */
.main-nav {
    position: fixed;
    top: 50%;
    left: 40px;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.nav-item {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--black);
    text-decoration: none;
    opacity: 0.6;
    transition: var(--transition);
    font-weight: 400;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.nav-item.active,
.nav-item:hover {
    opacity: 1;
    font-weight: 700;
}

/* ============================================
   SECCIONES
   ============================================ */
.section {
    min-height: 100vh;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    display: none;
    padding: 60px 120px 60px 140px;
}

.section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   HOME - HERO
   ============================================ */
.hero-container {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    max-width: 1800px;
    margin: 0 auto;
    padding: 80px 0;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-title {
    font-size: 86px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 0.9;
    color: var(--black);
}

.hero-title span {
    display: block;
    font-weight: 300;
}

.hero-title span:nth-child(2) {
    font-weight: 700;
}

.hero-subtitle {
    font-size: 13px;
    letter-spacing: 0.08em;
    opacity: 0.65;
    max-width: 320px;
    margin-top: 12px;
}

.hero-image {
    position: relative;
    aspect-ratio: 3/4;
    max-width: 700px;
    width: 100%;
    justify-self: end;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1);
}

.image-caption {
    position: absolute;
    bottom: -30px;
    right: 0;
    font-size: 10px;
    letter-spacing: 0.15em;
    opacity: 0.5;
    text-transform: uppercase;
}

/* ============================================
   ABOUT - SOBRE MÍ (CONSISTENTE CON HOME)
   ============================================ */
.about-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 80px 0;
}

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

.about-title {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.4;
    margin-bottom: 60px;
    font-weight: 700;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.about-paragraph {
    font-size: 13px;
    line-height: 1.8;
    opacity: 0.8;
}

.about-details {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 60px;
    padding-top: 60px;
    border-top: 1px solid var(--grey-90);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-label {
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.5;
    font-weight: 700;
    margin-bottom: 8px;
}

.detail-value {
    font-size: 13px;
    line-height: 1.6;
    opacity: 0.8;
}

.detail-subtitle {
    font-size: 11px;
    line-height: 1.6;
    opacity: 0.6;
}

.about-visual {
    position: relative;
    max-width: 700px;
    width: 100%;
    justify-self: end;
}

.visual-card {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.visual-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1);
    transition: var(--transition);
}

.visual-card:hover img {
    filter: grayscale(80%) contrast(1.15);
}

/* ============================================
   WORK - PROYECTOS
   ============================================ */
.work-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 60px 0;
}

.section-title {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.4;
    margin-bottom: 100px;
    font-weight: 700;
}

.project-item {
    display: grid;
    grid-template-columns: 1fr 2.5fr;
    gap: 100px;
    margin-bottom: 140px;
    padding-bottom: 120px;
}

.project-item:not(:last-child) {
    border-bottom: 1px solid var(--grey-90);
}

.project-text {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-number {
    font-size: 12px;
    font-weight: 700;
    opacity: 0.3;
    letter-spacing: 0.1em;
}

.project-title {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.project-type {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.5;
}

.project-description {
    font-size: 13px;
    line-height: 1.7;
    opacity: 0.8;
    margin-top: 8px;
}

.project-year {
    font-size: 10px;
    opacity: 0.4;
    margin-top: auto;
}

.project-visual {
    height: 700px;
    overflow: hidden;
}

.project-visual img,
.project-visual video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1);
    transition: var(--transition);
}

.project-visual iframe {
    width: 100%;
    height: 100%;
    border: none;
    aspect-ratio: 16/9;
}

/* YouTube específico - ASPECT RATIO 16:9 */
.project-visual-youtube {
    height: auto;
    aspect-ratio: 16/9;
}

.project-item:hover .project-visual img,
.project-item:hover .project-visual video {
    transform: scale(1.05);
}

/* ============================================
   PLAYGROUND - CARRUSEL 3D DIAGONAL
   ============================================ */
.playground-header {
    text-align: center;
    margin-bottom: 80px;
}

.playground-title {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.playground-subtitle {
    font-size: 13px;
    opacity: 0.65;
}

.filter-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 100px;
}

.filter-btn {
    background: transparent;
    border: none;
    font-family: var(--font-main);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 12px 0;
    transition: var(--transition);
    font-weight: 400;
    color: var(--black);
    opacity: 0.5;
    position: relative;
}

.filter-btn.active {
    font-weight: 700;
    opacity: 1;
}

.filter-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--black);
}

.filter-btn:hover {
    opacity: 1;
}

/* Contenedor del Carrusel 3D */
.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 800px;
    margin-bottom: 80px;
    perspective: 2000px;
    overflow: hidden;
    cursor: grab;
}

.playground-grid {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-item {
    position: absolute;
    left: 50%;
    top: 50%;
    transform-style: preserve-3d;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.photo-item.hidden {
    display: none;
}

.photo-wrapper {
    position: relative;
    background: var(--white);
    box-shadow: 0 30px 80px rgba(0,0,0,0.3);
    transition: all 0.5s ease;
}

.photo-item:hover .photo-wrapper {
    box-shadow: 0 40px 100px rgba(0,0,0,0.4);
}

/* Tamaños por categoría - MÁS GRANDES */
.photo-item[data-category="polas"] .photo-wrapper {
    width: 600px;
    height: 700px;
    padding: 25px 25px 80px 25px;
}

.photo-item[data-category="polas"] .photo-wrapper img {
    width: 100%;
    height: calc(100% - 55px);
    object-fit: cover;
}

.photo-item[data-category="registros"] .photo-wrapper {
    width: 950px;
    height: 700px;
    border: 15px solid var(--white);
}

.photo-item[data-category="registros"] .photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-item[data-category="varios"] .photo-wrapper {
    width: 1050px;
    height: 650px;
    border: 12px solid var(--white);
}

.photo-item[data-category="varios"] .photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-wrapper img {
    filter: grayscale(100%) contrast(1.1);
    transition: all 0.5s ease;
}

.photo-item:hover .photo-wrapper img {
    filter: grayscale(0%) contrast(1.15);
}

.photo-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    letter-spacing: 0.12em;
    opacity: 0.6;
    text-transform: uppercase;
}

/* Controles del Carrusel */
.carousel-controls {
    display: none;
}

.carousel-btn {
    display: none;
}

.scroll-indicator {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    letter-spacing: 0.15em;
    opacity: 0.4;
    text-transform: uppercase;
}

.scroll-indicator::after {
    content: ' · usa scroll o arrastra';
}

/* ============================================
   CONTACT
   ============================================ */
.contact-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 120px 40px;
    text-align: center;
}

.contact-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 24px;
}

.contact-intro {
    font-size: 13px;
    opacity: 0.7;
    margin-bottom: 60px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 50px;
}

.contact-form input,
.contact-form textarea {
    padding: 16px 20px;
    font-family: var(--font-main);
    font-size: 13px;
    background: var(--white);
    border: 1px solid var(--grey-80);
    color: var(--black);
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--black);
}

.submit-btn {
    padding: 18px 40px;
    background: var(--black);
    color: var(--white);
    border: none;
    font-family: var(--font-main);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 700;
}

.submit-btn:hover {
    background: var(--grey-10);
    transform: translateY(-2px);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.contact-links a {
    font-size: 12px;
    letter-spacing: 0.12em;
    color: var(--black);
    text-decoration: none;
    opacity: 0.65;
    transition: var(--transition);
}

.contact-links a:hover {
    opacity: 1;
    font-weight: 700;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .section {
        padding: 40px 60px 40px 100px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-title {
        font-size: 56px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .about-visual {
        justify-self: center;
    }

    .project-item {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .project-visual {
        height: 500px;
    }

    .project-visual-youtube {
        height: auto;
        aspect-ratio: 16/9;
    }

    .carousel-wrapper {
        height: 600px;
    }

    .photo-item[data-category="polas"] .photo-wrapper {
        width: 450px;
        height: 550px;
    }

    .photo-item[data-category="registros"] .photo-wrapper {
        width: 700px;
        height: 520px;
    }

    .photo-item[data-category="varios"] .photo-wrapper {
        width: 800px;
        height: 480px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        left: 20px;
        gap: 20px;
    }

    .section {
        padding: 40px 20px 40px 80px;
    }

    .hero-title {
        font-size: 42px;
    }

    .about-grid {
        gap: 40px;
    }

    .project-visual-youtube {
        height: auto;
        aspect-ratio: 16/9;
    }

    .carousel-wrapper {
        height: 500px;
    }

    .photo-item[data-category="polas"] .photo-wrapper {
        width: 350px;
        height: 450px;
    }

    .photo-item[data-category="registros"] .photo-wrapper {
        width: 500px;
        height: 380px;
    }

    .photo-item[data-category="varios"] .photo-wrapper {
        width: 550px;
        height: 350px;
    }
}
