@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800;900&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&display=swap');

:root {
    --bg-color: #0a0c0a;
    --text-primary: #eaf2ea;
    --text-secondary: #9fb0a2;
    --accent: #4ade80;
    --accent-hover: #6eee8a;
    --brutal-border: 1px solid rgba(110, 238, 138, 0.16);
    
    --font-serif: 'Montserrat', sans-serif;
    --font-sans: 'DM Sans', sans-serif;
    
    /* Hexa Pixel Identity */
    --hexa-green: #4ade80;
    --hexa-dark: #1A1A1A;
    --hexa-font: 'Montserrat', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Noise (Awwwards texture trick) */
.noise-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 50;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4vw;
}

/* --------------------
   NAVBAR BRUTALISTA
   -------------------- */
.brutal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(14, 13, 12, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brutal-nav .logo {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
    align-items: center;
}

.nav-links a, .nav-links a:visited {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

.btn-outline {
    border: 1px solid var(--accent);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    color: var(--accent) !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
}
.btn-outline:hover {
    background: var(--text-primary);
    color: var(--bg-color) !important;
}

/* --------------------
   HERO INMENSO
   -------------------- */
.brutal-hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
    padding-top: 8rem;
    padding-bottom: 4rem;
}

.hero-top-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    padding-top: 1rem;
}

.massive-text {
    font-family: var(--font-serif);
    font-size: clamp(4rem, 11vw, 12rem);
    line-height: 0.85;
    font-weight: 400;
    text-transform: uppercase;
    margin-bottom: 4rem;
}

.outline-text {
    background: linear-gradient(100deg, var(--text-primary) 0%, var(--accent) 50%, var(--text-primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    background-size: 200% auto;
    animation: gradientFlow 6s ease-in-out infinite;
    font-style: italic;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-bottom-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    border-top: var(--brutal-border);
    padding-top: 2rem;
}

.hero-bottom-info p {
    max-width: 400px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.hero-scroll {
    text-align: right;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
}

/* --------------------
   CASOS DE ESTUDIO (Hover Reveal)
   -------------------- */
.projects-brutal {
    position: relative;
    padding: 8rem 0;
    border-top: var(--brutal-border);
    overflow: hidden;
}

/* Fondo Dinámico */
.projects-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), background-image 0.2s;
    z-index: 0;
}
.projects-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-color);
    opacity: 0.9;
    z-index: 1;
    transition: opacity 0.6s ease;
}

.projects-brutal.is-hovering .projects-bg {
    opacity: 1;
}
.projects-brutal.is-hovering .projects-overlay {
    opacity: 0.4;
}

.section-header-brutal h2 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 400;
    margin-bottom: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: var(--brutal-border);
    padding-bottom: 1rem;
}
.section-header-brutal h2 span {
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-secondary);
}

.project-list-brutal {
    list-style: none;
}

.project-item {
    border-bottom: var(--brutal-border);
    padding: 3rem 0;
    position: relative;
    cursor: pointer;
    transition: padding 0.4s ease;
}

.project-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    pointer-events: none; /* Let hover hit the li */
}

.project-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 400;
    line-height: 1;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s;
}

.project-category {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.project-details {
    width: 100%;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-secondary);
}

.project-item:hover {
    padding: 4rem 2rem;
    box-shadow: 0 0 50px rgba(184, 102, 124, 0.1);
    background: rgba(255,255,255,0.01);
    border-radius: 8px;
}

.project-item:hover .project-title {
    transform: translateX(20px);
    color: #fff;
}

.project-item:hover .project-details {
    opacity: 1;
    max-height: 1500px; /* Suficientemente grande para todo el texto */
    margin-top: 2rem;
}

/* --------------------
   PROBLEM / SOLUTION BOXES
   -------------------- */
.problem-solution-box {
    border: var(--brutal-border);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
}
.problem-solution-box h4 {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.problem-solution-box p {
    margin-bottom: 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

.metrics-grid {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.metric {
    display: flex;
    flex-direction: column;
}
.metric strong {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1;
}
.metric span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}


/* --------------------
   SERVICIOS
   -------------------- */
.services-brutal {
    padding: 8rem 0;
}

.services-grid-brutal {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}

.services-header h2 {
    font-family: var(--font-serif);
    font-size: 4rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.services-header p {
    color: var(--text-secondary);
    max-width: 300px;
}

.service-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.s-card {
    border: var(--brutal-border);
    padding: 2.5rem;
    background: rgba(255,255,255,0.015);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.s-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(184, 102, 124, 0.12), 0 0 15px rgba(184, 102, 124, 0.05);
    border-color: rgba(184, 102, 124, 0.4);
}

.s-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 500;
}
.s-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --------------------
   FOOTER MASSIVE
   -------------------- */
.footer-brutal {
    padding: 6rem 0 2rem 0;
    border-top: var(--brutal-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6rem;
}

.massive-text-small {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 8rem);
    line-height: 0.9;
    font-weight: 400;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: right;
}

.hover-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    position: relative;
    display: inline-block;
}
.hover-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}
.hover-link:hover::after {
    width: 100%;
}

.footer-bottom {
    border-top: var(--brutal-border);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

/* RESPONSIVE MOVED TO BOTTOM */

/* --------------------
   SCROLL TOP BADGE
   -------------------- */
.distinctive-badge {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 100;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
    mix-blend-mode: difference;
}

.distinctive-badge.show {
    opacity: 1;
    visibility: visible;
}

.distinctive-badge:hover {
    transform: scale(1.1);
}

.distinctive-badge svg {
    animation: rotate 15s linear infinite;
    fill: var(--text-primary);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.badge-center {
    position: absolute;
    font-size: 1.5rem;
    color: var(--text-primary);
}

/* --------------------
   SOBRE MI
   -------------------- */
.about-brutal {
    padding: 8rem 0;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}

.about-header h2 {
    font-family: var(--font-serif);
    font-size: 4rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.about-header p {
    color: var(--text-secondary);
    max-width: 300px;
}

.about-content p {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    max-width: 600px;
}

/* --------------------
   HEXA PIXEL
   -------------------- */
.hexa-pixel-section {
    background-color: var(--hexa-dark);
    border-top: 1px solid rgba(80, 200, 120, 0.2);
    border-bottom: 1px solid rgba(80, 200, 120, 0.2);
    padding: 6rem 0;
    margin-top: 4rem;
    font-family: var(--hexa-font);
}

.hexa-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.hexa-brand {
    text-align: center;
}

.hexa-logo {
    max-width: 180px;
    margin-bottom: 1rem;
}

.hexa-by {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hexa-content h2 {
    font-size: 2.5rem;
    color: var(--hexa-green);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hexa-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 2rem;
    max-width: 600px;
}

.btn-hexa {
    display: inline-block;
    background-color: var(--hexa-green);
    color: var(--hexa-dark) !important;
    padding: 1rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-hexa:hover {
    background-color: #3eb566;
    transform: translateY(-2px);
}

/* --------------------
   MARQUEE (CARRUSEL)
   -------------------- */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    border-top: var(--brutal-border);
    border-bottom: var(--brutal-border);
    padding: 2.5rem 0;
    margin: 2rem 0 6rem 0;
    display: flex;
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
    display: inline-flex;
    animation: marqueeScroll 25s linear infinite;
    gap: 5rem;
    align-items: center;
    padding-left: 5rem;
}

.marquee-container:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-track span {
    font-size: 1.5rem;
    font-family: var(--font-sans);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
}

.marquee-track span:hover {
    color: var(--accent);
    transition: color 0.3s ease;
    cursor: default;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --------------------
   RESPONSIVE
   -------------------- */
@media (max-width: 900px) {
    .nav-links {
        display: none; /* Simple fallback para móviles */
    }
    
    /* En móviles no hay hover, mostrar proyectos por defecto */
    .project-details {
        opacity: 1 !important;
        max-height: 2000px !important;
        margin-top: 1.5rem !important;
    }
    .project-item {
        padding: 2rem 0 !important;
    }
    .project-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .hero-bottom-info {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .services-grid-brutal {
        grid-template-columns: 1fr;
    }
    
    .service-cards {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 3rem;
    }
    .contact-links {
        text-align: left;
    }
    
    /* Arreglo exclusivo para la sección Perfil (Estratega) */
    .about-brutal {
        grid-template-columns: 1fr;
    }
    
    .hexa-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hexa-content p {
        margin: 0 auto 2rem auto;
    }
}
