﻿/* VARIABLES */
:root {
    --bg-color: #ffffff;
    --primary-color: #0000ff;
    --text-color: #0000ff;
    --transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
}

html { 
    scroll-behavior: smooth; 
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

/* CURSOR PERSONALIZADO COLOR AZUL
 Autor: IA de Google (Gemini)
 Fecha: Mayo 2026
 Descripción: Implementación de cursor con transiciones suaves y mix-blend-mode.
 */
#custom-cursor {
    width: 12px;
    height: 12px;
    background-color: var(--primary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                height 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 0.3s ease,
                opacity 0.3s ease;
}

#custom-cursor.cursor-hover {
    width: 50px;
    height: 50px;
    background-color: #ffff00;
    opacity: 0.6;
    mix-blend-mode: difference;
}

/*NAV */
.navbar {
    position: fixed;
    top: 0; 
    width: 100%;
    height: 90px;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background-color: #ffffff; 
    border-bottom: 1px solid rgba(0, 0, 255, 0.05);
}

.navbar ul { 
    display: flex; 
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar a { 
    text-decoration: none; 
    color: var(--text-color);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
}

.navbar a:hover {
    opacity: 0.4;
}

.logo {
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/*MENÚ HAMBURGUESA
 Autor: IA de Google (Gemini)
 Fecha: Mayo 2026
 Descripción: "Implementación de un menú de hamburguesa que solo aparece en el móvil, y para cerrarlo implementa una x"
 */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 10px;
    position: relative; 
    z-index: 2000;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.is-open span:nth-child(2) {
    opacity: 0;
}
.hamburger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* MENÚ PARA MÓVIL*/
.mobile-menu {
    display: none;
    position: fixed;
    top: 90px;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid rgba(0,0,255,0.1);
    flex-direction: column;
    padding: 30px 5%;
    gap: 24px;
    z-index: 999;
}

.mobile-menu.is-open {
    display: flex;
}

.mobile-menu a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/*HERO*/
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 5% 0 5%;
}

.hero-container {
    width: 100%;
    text-align: center;
}

.main-title {
    font-size: 25vw;
    line-height: 0.8;
    text-transform: lowercase;
    letter-spacing: -0.06em;
    font-weight: 900;
    margin-top: 20px;
    width: 100%;
    text-align: center;
}

/* SOBRE MI */
.sobre-mi-section {
    padding: 120px 5%;
    border-top: 1px solid rgba(0, 0, 255, 0.12);
}

.sobre-mi-section .section-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.45;
    margin-bottom: 60px;
    display: block;
}

.sobre-mi-content {
    display: flex; 
    flex-direction: row;
    gap: 60px;
    align-items: start;
    max-width: 100%; 
}

.sobre-mi-img-wrapper {
    width: 180px; 
    height: auto;
    aspect-ratio: 3/4;
    overflow: hidden;
    flex-shrink: 0;
    position: sticky; 
    top: 150px;
}

.sobre-mi-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    box-shadow: 20px 20px 0px 0px var(--primary-color);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sobre-mi-text {
    padding-top: 8px;
    flex: 1; 
}

/* Implementado con asistencia de: Gemini (Google AI)
   Prompt: "Cómo configurar tipografía responsiva usando la función clamp 
   para títulos y párrafos en la sección Sobre Mi" */

.sobre-mi-text .reveal-text:first-child {
    font-size: clamp(3rem, 7vw, 10rem); 
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin-bottom: 40px;
    text-transform: uppercase;
    width: 100%;
}

.sobre-mi-text p.reveal-text {
    font-size: clamp(1.5rem, 3.5vw, 4rem); 
    line-height: 1.1;
    opacity: 0.8;
    margin-bottom: 1.5rem;
    max-width: 100%;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sobre-mi-skills {
    margin-top: 60px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    border-top: 1px solid var(--primary-color);
    padding-top: 40px;
}

.skill-tag {
    border: 1px solid var(--primary-color);
    padding: 8px 18px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.55;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    opacity: 1;
    background: var(--primary-color);
    color: white;
}

/*PROYECTOS*/
.portfolio-section {
    padding: 100px 5%;
}

.section-heading {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.45;
    margin-bottom: 60px;
    display: block;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 100px 50px;
}

.project-item {
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(60px);
    transition: var(--transition);
}

.project-item.is-visible, .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.full-width {
    grid-column: span 2;
}

.project-img-wrapper {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #eee;
    margin-bottom: 20px;
}

.project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-item:hover img {
    transform: scale(1.08);
}

.project-meta {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    align-items: center;
    border-top: 1px solid var(--primary-color);
    padding-top: 15px;
}

.index { font-size: 12px; font-weight: 800; }
.title { font-size: 1.5rem; text-transform: uppercase; font-weight: 700; }
.category { font-size: 12px; opacity: 0.6; }

/*CONTACTO */
.contact-section {
    padding: 150px 5%;
    text-align: center;
    border-top: 1px solid var(--primary-color);
    margin-top: 50px;
    overflow: hidden;
}

.contact-title {
    font-size: 10vw;
    text-transform: none;
    letter-spacing: -0.04em;
    margin-bottom: 30px;
    font-weight: 900;
}

.contact-email {
    font-size: 3vw;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
    display: block;
    overflow-wrap: break-word;
    padding: 0 5%;
}

.contact-email:hover {
    opacity: 0.4;
}

/*REDES SOCIALES*/
.social-links {
    margin-top: 80px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-item {
    text-decoration: none;
    color: var(--primary-color);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    border: 1px solid var(--primary-color);
    padding: 12px 25px;
    border-radius: 50px;
    transition: all 0.4s var(--transition);
}

.social-item:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    transform: translateY(-5px);
}

/* REVEAL */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: var(--transition);
}

/*ENLACES*/
.project-link, a {
    text-decoration: none;
    color: inherit;
}

/* SUBPAGINAS*/
.project-page .project-container {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 100px;
    padding: 180px 5% 100px;
    align-items: start; 
}

.project-page .project-info {
    position: -webkit-sticky;
    position: sticky;
    top: 150px;
}

.project-page .project-title {
    font-size: 8vw;
    line-height: 0.9;
    font-weight: 900;
    text-transform: none;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.project-page .project-intro {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 400px;
    margin-top: 60px;
    color: var(--primary-color);
    margin-bottom: 40px;
}

.project-page .project-gallery-column {
    display: flex;
    flex-direction: column;
    gap: 80px;
    align-items: flex-end;
    padding-bottom: 100px;
}

.project-page .full-img {
    width: 100%;
    max-width: 750px;
    height: auto;
    display: block;
}

.project-page a.back-button, 
.project-page .project-intro + a { 
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: #ffffff;
    text-decoration: none;
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    border-radius: 50px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.project-page a.back-button:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

/*ANIMACIÓN REVEAL Implementada con asistencia de: Gemini (Google AI)
   Prompt: "Cómo preparar el CSS para que el texto aparezca palabra por palabra, 
   haciendo que cada palabra esté en su propio hueco invisible para que luego 
   pueda subir con una animación sin que se corte" */

.reveal-text {
    visibility: visible !important; 
    opacity: 1;
}

.word {
    display: inline-flex;
    overflow: hidden; 
    vertical-align: top;
    margin-right: 0.15em; 
    line-height: 1.1;
}

.reveal-text .word {
    will-change: transform, opacity;
}

/*RESPONSIVE*/
@media (max-width: 1024px) {

    #custom-cursor { display: none !important; }
    * { cursor: auto !important; }

    .main-title { font-size: 20vw; }
    .sobre-mi-content { gap: 40px; }
    .sobre-mi-img-wrapper { width: 140px; }
}

@media (max-width: 768px) {
    .navbar { height: 70px; }
    .navbar ul { display: none; }
    .hamburger { display: flex; }

    .mobile-menu { top: 70px; }

    .main-title { font-size: 20vw; }
    .portfolio-grid { grid-template-columns: 1fr; gap: 60px; }
    .full-width { grid-column: span 1; }
    
    /*TEXTOS CATEGORIAS MOVIL */
    .project-meta {
        grid-template-columns: 35px 1fr;
        align-items: flex-start;
        gap: 0;
        padding-top: 12px;
    }

    .project-meta .title {
        font-size: 1.1rem;
        line-height: 1.2;
        grid-column: 2;
        margin-bottom: 4px;
    }

    .project-meta .category {
        font-size: 9px;
        letter-spacing: 0.8px;
        opacity: 0.5;
        grid-column: 2;
        text-transform: uppercase;
        font-weight: 700;
        display: block;
    }

    .project-meta .index {
        font-size: 10px;
        padding-top: 3px;
    }

    /* SOBRE MI */
    .sobre-mi-content {
        flex-direction: column;
        align-items: center; 
        gap: 40px;          
    }

    .sobre-mi-img-wrapper {
        position: relative; 
        top: 0;              
        margin-bottom: 20px;
        width: 100px;
    }
    
    .sobre-mi-text {
        text-align: center; 
    }
    .sobre-mi-text .reveal-text:first-child { font-size: 15vw; }
    .sobre-mi-text p.reveal-text { font-size: 8vw; }

    /* SUBPÁGINAS */
    .project-page .project-container { grid-template-columns: 1fr; gap: 40px; }
    .project-page .project-info { position: relative; top: 0; }
    .project-page .project-title { font-size: 15vw; }
}