/* =========================================
   CSS Base & Apple/Readymag Variables
========================================= */
:root {
    --bg-primary: #fafafc;   
    --bg-secondary: #f0f0f5; 
    --text-primary: #1d1d1f;
    --text-muted: #86868b;
    --accent: #2997ff;
    --divider: rgba(0,0,0,0.06);

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
    background-color: #0a0a0b; /* Forzado a negro para evitar franjas blancas en scroll inercial */
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.5;
    overflow-x: hidden;
    cursor: none;
    -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; height: 100vh; }

/* Audio toggle — floating bottom-right */
.audio-toggle {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: rgba(10,10,11,0.85);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    z-index: 9998;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
}
.audio-toggle:hover { transform: scale(1.06); background: #ff4d26; }
.audio-toggle .bar {
    display: block;
    width: 2px;
    border-radius: 2px;
    background: #fff;
    animation: audioBar 1.1s ease-in-out infinite;
    transform-origin: bottom;
}
.audio-toggle .bar:nth-child(1) { height: 6px; animation-delay: 0s; }
.audio-toggle .bar:nth-child(2) { height: 14px; animation-delay: 0.15s; }
.audio-toggle .bar:nth-child(3) { height: 10px; animation-delay: 0.3s; }
.audio-toggle .bar:nth-child(4) { height: 16px; animation-delay: 0.45s; }
@keyframes audioBar {
    0%, 100% { transform: scaleY(0.3); }
    50%      { transform: scaleY(1); }
}
.audio-toggle .muted-slash {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.audio-toggle .muted-slash::before {
    content: '';
    position: absolute;
    top: 50%; left: 10%; right: 10%;
    height: 2px;
    background: #ff4d26;
    border-radius: 2px;
    transform: rotate(-35deg);
    transform-origin: center;
}
.audio-toggle.is-muted .bar { animation-play-state: paused; opacity: 0.35; }
.audio-toggle.is-muted .muted-slash { opacity: 1; }
@media (max-width: 768px) {
    .audio-toggle { right: 1rem; bottom: 1rem; width: 40px; height: 40px; }
}

a, button { cursor: none; text-decoration: none; color: inherit; }

/* Desktop Only Cursor Logic */
@media (pointer: coarse) {
    #cursor-dot, #cursor-ring { display: none !important; }
    a, button { cursor: auto !important; }
}

/* Custom Cursor (Una sola pieza con físicas) */
#cursor-dot { display: none; }

#cursor-ring { 
    position: fixed; top: 0; left: 0; z-index: 99999; pointer-events: none; 
    transform: translate(-50%, -50%);
    opacity: 0; /* Oculto hasta moverse */
    mix-blend-mode: difference; 
    width: 14px; height: 14px; /* Punto sólido por defecto */
    border-radius: 50px;
    background-color: #fff;
    border: none;
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                height 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 0.35s ease, 
                border-radius 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease; 
}

/* Hover over interactive elements */
body.cursor-hover #cursor-ring { 
    width: 60px; height: 60px; 
    background-color: rgba(255,255,255,0.15); 
}

/* Caret Mode (Text hovering) */
body.cursor-text #cursor-ring {
    width: 3px; border-radius: 2px;
    height: var(--caret-h, 24px);
    background-color: rgba(255,255,255,0.95);
}

/* Navigation - Centered Liquid Glass Pill */
.nav-bar {
    position: fixed; 
    top: 1.5rem; 
    left: 0; 
    width: 100%; 
    padding: 0 1rem; 
    z-index: 1000;
    display: flex; 
    justify-content: center;
    pointer-events: none;
    transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s ease;
}

.nav-bar.scrolled {
    top: 1rem;
    transform: scale(0.98);
}

.nav-container { 
    pointer-events: auto;
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 1.5rem;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    background: rgba(18, 18, 20, 0.85); /* Dark solid glass */
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    color: #fff;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-logo { 
    font-size: 1.1rem; 
    font-weight: 800; 
    letter-spacing: -0.02em; 
    position: relative; 
    z-index: 10; 
    color: #fff;
}

.nav-links { display: flex; gap: 0.2rem; align-items: center; position: relative; padding: 0.2rem; }
@media (max-width: 850px) { 
    .nav-bar { padding: 0 0.2rem; }
    .nav-container { padding: 0.25rem 0.1rem; gap: 0; width: 100%; justify-content: center; }
    .nav-logo { font-size: 0.65rem; margin-left: 0.2rem; margin-right: 0.1rem; flex-shrink: 0; }
    
    .nav-links { 
        display: flex;
        gap: 0;
        padding-right: 0.1rem;
    }
    
    .nav-tab { 
        padding: 0.35rem 0.2rem; 
        font-size: 0.52rem; 
        white-space: nowrap; 
        font-weight: 600; 
        letter-spacing: -0.04em; 
    }
    .nav-contact-btn { 
        padding: 0.35rem 0.4rem; 
        font-size: 0.52rem; 
        margin-left: 0.1rem; 
    }
}

/* Extra small devices fix */
@media (max-width: 400px) {
    .nav-logo { display: none; } /* Hide logo on ultra narrow to save space */
    .nav-tab { font-size: 0.5rem; padding: 0.35rem 0.15rem; }
    .nav-contact-btn { font-size: 0.5rem; padding: 0.35rem 0.3rem; }
}

.nav-pill {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.nav-tab { 
    position: relative;
    z-index: 2;
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem; 
    font-weight: 500; 
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease; 
}
.nav-tab:hover { color: #fff; }

.nav-contact-btn { 
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    margin-left: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05); 
    transition: all 0.3s ease; 
}
.nav-contact-btn:hover { 
    background-color: #fff; 
    color: #000; 
    border-color: #fff; 
    box-shadow: 0 4px 15px rgba(255,255,255,0.2);
}

/* =========================================
   PRELOADER (Cinematic Collapse)
 ========================================= */
#preloader {
    position: fixed;
    inset: 0;
    background-color: #000;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transform-origin: center center;
}

.preloader-content {
    position: relative;
    z-index: 10001;
}

.preloader-logo {
    display: flex;
    gap: 0.1em;
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    color: #fff;
    font-family: 'Inter', sans-serif;
}

.p-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
}

/* =========================================
   HERO / MARQUEE
========================================= */
.hero-pinned { 
    height: 250vh; 
    position: relative; 
    background-color: #000; /* Fondo negro cinematográfico */
    transition: background-color 0.8s ease;
    overflow: hidden;
}

/* Framer Magic Halo Effect */
.hero-halo {
    position: absolute;
    top: 50%; left: 50%;
    width: 90vw; height: 90vw;
    max-width: 1000px; max-height: 1000px;
    background: conic-gradient(
        from 0deg,
        rgba(0, 112, 243, 0.45) 0%,
        rgba(138, 43, 226, 0.35) 25%,
        rgba(16, 185, 129, 0.25) 50%,
        rgba(249, 115, 22, 0.35) 75%,
        rgba(0, 112, 243, 0.45) 100%
    );
    filter: blur(140px);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.35; /* Opacidad bajada a petición del usuario */
    animation: rotateHalo 18s linear infinite;
    mix-blend-mode: screen;
}

@keyframes rotateHalo {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero-text-wrapper {
    position: relative;
    z-index: 2; /* Ensure text sits above the halo */
}

.hero-led {
    position: absolute;
    top: 55%;
    transform: translateY(-50%);
    width: 2px;
    height: 35vh;
    background: #fff;
    z-index: 5;
    /* Resplandor más intenso */
    box-shadow: 0 0 25px #fff, 0 0 50px #fff, 0 0 100px rgba(255,255,255,0.3);
    border-radius: 4px;
    opacity: 0;
}

/* Efecto de 'cono de luz' apuntando al nombre */
.hero-led::after {
    content: '';
    position: absolute;
    top: 50%;
    height: 120%;
    width: 200px;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: translateY(-50%);
    pointer-events: none;
    z-index: -1;
}

.hero-led-left { left: -8vw; }
.hero-led-left::after { left: 0; transform: translateY(-50%) skewX(5deg); }

.hero-led-right { right: -8vw; }
.hero-led-right::after { right: 0; transform: translateY(-50%) skewX(-5deg); }


@media (max-width: 1024px) {
    .hero-led-left { left: -5vw; }
    .hero-led-right { right: -5vw; }
    .hero-led { height: 25vh; }
}

.hero-sticky-content { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; overflow: hidden; }
.hero-text-wrapper { position: relative; z-index: 10; text-align: center; color: #fff; }
.hero-tagline { 
    font-size: 0.85rem; 
    letter-spacing: 0.15em; 
    text-transform: uppercase; 
    font-weight: 500; 
    margin-bottom: 2.5rem; 
    font-family: 'JetBrains Mono', monospace;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 1.2rem; /* Fix height to avoid layout shift */
}

/* Typewriter Cursor */
.hero-tagline::after {
    content: "|";
    display: inline-block;
    color: #fff;
    margin-left: 1px;
    font-weight: 200;
}

.hero-tagline.is-typing::after {
    opacity: 1; /* Solid while typing */
}

.hero-tagline:not(.is-typing)::after {
    animation: blinkCursor 0.8s step-end infinite;
}

@keyframes blinkCursor {
    from, to { opacity: 0; }
    50% { opacity: 1; }
}
.hero-title { 
    font-size: clamp(5rem, 15vw, 13rem); 
    line-height: 0.8; 
    font-weight: 900; 
    letter-spacing: -0.06em; 
    margin-bottom: 3.5rem; 
}
.hero-title .line-wrapper { overflow: hidden; display: block; }

/* Word-split reveal for section titles */
.word-wrap {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding: 0.05em 0;
    line-height: 1;
}
.word-inner {
    display: inline-block;
    will-change: transform;
}

.name-daniel { 
    display: block; 
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
}
.name-bosquet { 
    display: block; 
    margin-top: -5.5rem; 
}

.hero-font-serif { 
    font-family: 'Cormorant Garamond', serif; 
    font-style: italic; 
    font-weight: 400; 
    text-transform: none;
    letter-spacing: -0.02em;
}

@media (max-width: 768px) {
    .hero-tagline { 
        font-size: 0.65rem; 
        letter-spacing: 0.08em; 
        margin-bottom: 1.5rem; 
        width: 100%;
        text-align: center;
    }
    .hero-title { 
        font-size: clamp(3rem, 12vw, 5rem); 
        margin-bottom: 2rem; 
    }
    .name-bosquet { 
        margin-top: -1.2rem; /* Soften the overlap on mobile */
    }
    .hero-sub {
        font-size: 0.9rem;
        padding: 0 5%;
        line-height: 1.4;
    }
}


.gs-reveal {
    opacity: 0;
    filter: blur(15px);
}

.hero-sub-wrapper { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 3rem; }
.hero-sub { 
    font-size: 1.15rem; 
    color: rgba(255,255,255,0.4); 
    font-weight: 400; 
    max-width: 650px; 
    margin: 0 auto; 
    line-height: 1.6; 
    letter-spacing: 0.03em;
}

.marquee-section { padding: 3rem 0; background-color: var(--text-primary); color: var(--bg-primary); overflow: hidden; position: relative; z-index: 20; }
.marquee-track { white-space: nowrap; will-change: transform; transition: transform 0.1s linear; }
.marquee-text { font-size: clamp(3rem, 6vw, 6rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1; }

.container { margin: 0 auto; padding: 0 5%; max-width: 1400px; }
.section-header { margin-bottom: 5rem; }
.section-label { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 1rem; }
.section-title { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }

/* =========================================
   VERTICAL ABOUT 
========================================= */
.about-vertical-section { padding: 15rem 0 8rem 0; background-color: var(--bg-primary); }
.about-grid { display: grid; grid-template-columns: 1.2fr 2fr; gap: 6rem; align-items: start; }
.about-aside { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 2rem; align-items: flex-start; }
.about-image-wrapper { width: 100%; max-width: 260px; aspect-ratio: 3/4; border-radius: 8px; overflow: hidden; background: var(--bg-secondary); }
.about-image-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.about-header { position: relative; top: auto; width: 100%; margin-bottom: 1rem; }
.about-name { font-size: 1.6rem; color: var(--text-primary); margin-top: 1rem; letter-spacing: -0.01em; opacity: 0.8; font-style: italic; }
.about-story { max-width: 800px; }
.story-p { font-size: clamp(1.2rem, 2.5vw, 2.4rem); line-height: 1.5; font-weight: 300; color: var(--text-muted); margin-bottom: 2rem; transition: color 0.4s; }
.story-p:hover { color: var(--text-primary); }
.highlighted-p { color: var(--text-primary); font-weight: 400; }
@media (max-width: 768px) { 
    .about-grid { grid-template-columns: 1fr; gap: 4rem; } 
    .about-aside { position: relative; top: 0; width: 100%; } 
    .about-header { margin-bottom: 2rem; }
}

/* =========================================
   ECOSYSTEMS
========================================= */
.ecosystem-section { padding: 6rem 0 8rem 0; background-color: var(--bg-secondary); }
.tag-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 4rem; }
.tag-group h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 2rem; color: var(--text-primary); border-bottom: 1px solid var(--divider); padding-bottom: 1rem;}
.tech-chips { display: flex; flex-wrap: wrap; gap: 1rem; }
.chip { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1.5rem; background: #fff; border-radius: 40px; font-size: 0.95rem; font-weight: 500; border: 1px solid var(--divider); transition: transform 0.3s, box-shadow 0.3s; }
.chip svg { width: 1.2rem; height: 1.2rem; stroke-width: 1.8; color: var(--text-muted); transition: color 0.3s; }
.chip:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.chip:hover svg { color: var(--text-primary); }
.highlight-chip { background: var(--text-primary); color: #fff; border-color: var(--text-primary); }
.highlight-chip svg { color: #fff; }

/* Agent Infographic Lab (Compact) */
.agent-lab-section { padding: 4rem 0 6rem 0; background-color: var(--bg-secondary); }
.section-header { margin-bottom: 2rem; }

.lab-compact-wrapper { background: #fff; border: 1px solid var(--divider); border-radius: 20px; padding: 2rem 3rem; display: flex; flex-direction: column; gap: 2rem; box-shadow: 0 4px 30px rgba(0,0,0,0.02); }
.lab-navigation { display: flex; gap: 1rem; justify-content: center; }
.toggle-btn { background: var(--bg-secondary); border: 1px solid var(--divider); padding: 0.8rem 2rem; border-radius: 40px; font-size: 0.9rem; font-weight: 500; color: var(--text-muted); cursor: pointer; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.toggle-btn.active { background: var(--text-primary); color: #fff; border-color: var(--text-primary); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

.lab-infographic-area { display: grid; grid-template-columns: 1fr 300px; gap: 4rem; align-items: center; min-height: 600px; }
#infographic-canvas { position: relative; height: 100%; border-right: 1px solid var(--divider); overflow: visible; display: flex; justify-content: center; align-items: center; }
.v-idle-msg { color: var(--text-muted); font-size: 1.1rem; font-weight: 300; opacity: 0.6; }

.infographic-sidebar { display: flex; flex-direction: column; gap: 2rem; }
.info-step { display: flex; gap: 1.5rem; opacity: 0.3; transition: opacity 0.5s; }
.info-step.active { opacity: 1; }
.step-num { font-family: 'SF Mono', monospace; font-size: 0.8rem; color: var(--text-muted); padding-top: 0.2rem; }
.step-content h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; color: var(--text-primary); }
.step-content p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }

/* Diagram Entities */
.i-node { position: absolute; width: 50px; height: 50px; background: #fff; border: 1px solid var(--divider); border-radius: 50%; display: flex; justify-content: center; align-items: center; z-index: 5; box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
.i-node i { width: 22px; height: 22px; color: var(--text-primary); }
.i-node.amber { border-color: #ff9500; background: #fff9f0; }
.i-node.amber i { color: #ff9500; }
.i-node.amber .i-label { color: #ff9500; }
.i-label { position: absolute; top: 55px; font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); white-space: nowrap; }
.i-conn { position: absolute; height: 1px; background: var(--divider); transform-origin: left center; z-index: 2; }
.i-pulse { position: absolute; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 10px var(--accent); z-index: 6; }

@media (max-width: 1024px) {
    .lab-infographic-area { grid-template-columns: 1fr; gap: 2rem; }
    #infographic-canvas { border-right: none; border-bottom: 1px solid var(--divider); padding-bottom: 4rem; min-height: 400px; }
    .lab-compact-wrapper { padding: 2rem; }
    
    /* Responsive Infographic Nodes */
    .i-node { width: 40px; height: 40px; }
    .i-node i { width: 18px; height: 18px; }
    .i-label { font-size: 0.5rem; top: 45px; }
}

@media (max-width: 768px) {
    .hero-name-main { font-size: 5rem; }
    .hero-name-sub { font-size: 4rem; margin-top: -3.5rem; left: 10%; }
    .hero-led.left, .hero-led.right { width: 20vw; filter: blur(60px); opacity: 0.4; }

    .about-grid { grid-template-columns: 1fr; gap: 2rem; }
    .about-header { position: relative; top: auto; margin-bottom: 3rem; }
    .about-image-wrapper { width: 100%; height: 50vh; margin-bottom: 2rem; border-radius: 12px; overflow: hidden; }
    .about-image-wrapper img { width: 100%; height: 100%; object-fit: cover; }
    
    .story-p { font-size: 1.1rem; line-height: 1.6; }
    
    .tag-grid { grid-template-columns: 1fr; }
}

/* Performance Optimizations */
.chip, .project-card, .edu-card, .exp-item, .nav-bar, .toggle-btn, .i-node, .about-image-wrapper { will-change: transform, opacity; }

/* =========================================
   PROJECTS (VAULT) — Glass Clean
========================================= */
.projects-section {
    padding: 12rem 0 10rem 0;
    background-color: var(--bg-primary);
    position: relative;
    overflow: hidden;
}
.projects-section .section-header { margin-bottom: 5rem; position: relative; z-index: 2; }
.section-sub { font-size: 1.1rem; color: var(--text-muted); margin-top: 0.75rem; }

/* Two-track velocity layout */
.projects-tracks {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    counter-reset: proj;
    position: relative;
    z-index: 2;
}
.projects-track {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    will-change: transform;
}
.track-right { margin-top: 7rem; }

@media (max-width: 900px) {
    .projects-tracks { flex-direction: column; }
    .track-right { margin-top: 0; }
}

/* Jardín card — logo treatment */
.project-card.card-jardin {
    background: linear-gradient(140deg, #f4f9f0 0%, #e6f4e2 60%, #d8edd2 100%);
    border-color: rgba(90, 160, 60, 0.25);
}
.project-card.card-jardin .project-img-wrapper {
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
}
.project-card.card-jardin .project-img-wrapper img {
    object-fit: contain;
    height: 240px;
    width: auto;
    max-width: 100%;
    transform: none;
    filter: none;
}
.project-card.card-jardin:hover .project-img-wrapper img {
    transform: scale(1.04);
    filter: none;
}
.project-card.card-jardin .project-info {
    background: rgba(240, 252, 238, 0.7);
}
.project-card.card-jardin::before {
    background: rgba(30, 90, 20, 0.35);
}

/* Card — glass base */
/* Theme Color Palette (Framer Inspired) */
.theme-linklogic { --accent-proj: #00f2ff; --accent-glow: rgba(0, 242, 255, 0.4); }
.theme-jardin { --accent-proj: #00ff88; --accent-glow: rgba(0, 255, 136, 0.4); }
.theme-smartag { --accent-proj: #0047AB; --accent-glow: rgba(0, 71, 171, 0.4); }
.theme-agrosense { --accent-proj: #84cc16; --accent-glow: rgba(132, 204, 22, 0.4); }
.theme-agentlab { --accent-proj: #ff0055; --accent-glow: rgba(255, 0, 85, 0.4); }

.projects-tracks { 
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; 
    perspective: 1500px;
}

.project-card {
    counter-increment: proj;
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    transition: 
        transform 0.1s ease-out, 
        box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.4s ease;
    transform-style: preserve-3d;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Index badge */
.project-card::before {
    content: "0" counter(proj);
    position: absolute; top: 1.5rem; left: 1.5rem; z-index: 15;
    font-size: 0.7rem; font-weight: 800; letter-spacing: 0.2em;
    color: #fff; padding: 0.4rem 0.8rem; border-radius: 99px;
    background: rgba(0, 0, 0, 0.3); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-glare {
    position: absolute; inset: 0; pointer-events: none; z-index: 12;
    background: radial-gradient(circle at var(--gh, 50%) var(--gv, 50%), rgba(255, 255, 255, 0.35) 0%, transparent 80%);
    opacity: 0; transition: opacity 0.4s ease;
}

.project-card:hover {
    border-color: var(--accent-proj);
    box-shadow: 
        0 40px 100px rgba(0, 0, 0, 0.1),
        0 0 50px var(--accent-glow);
}
.project-card:hover .project-glare { opacity: 1; }

.project-img-wrapper { 
    width: 100%; height: auto; overflow: hidden; background: #f8f8fa; 
}
.project-img-wrapper img { 
    width: 100%; height: auto; display: block; object-fit: cover; 
    transition: transform 0.8s ease; 
}
.project-card:hover .project-img-wrapper img { transform: scale(1.05); }

.project-info { 
    padding: 2.2rem; background: rgba(255,255,255,0.4); border-top: 1px solid rgba(255,255,255,0.5);
}
.project-info h3 { 
    font-size: 1.8rem; font-weight: 800; margin-bottom: 0.5rem; 
    color: var(--text-primary); transition: color 0.4s ease;
}
.project-card:hover h3 { color: var(--accent-proj); }
.project-info p { font-size: 1rem; color: var(--text-muted); line-height: 1.6; }

.exp-section { padding: 10rem 0; background-color: var(--bg-secondary); }
.exp-list { display: flex; flex-direction: column; border-top: 1px solid var(--divider); }
.exp-item { 
    display: flex; flex-direction: column; padding: 2rem; 
    border-bottom: 1px solid var(--divider); 
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); 
    border-radius: 20px; 
    cursor: pointer;
    overflow: hidden;
}
.exp-header { 
    display: grid; 
    grid-template-columns: 200px 1fr 250px; 
    align-items: center; 
    width: 100%;
}
.exp-item:hover { background-color: #fcfcfd; }
.exp-item.is-active { 
    background-color: #fff; 
    box-shadow: 0 30px 60px rgba(0,0,0,0.06); 
    border-color: transparent; 
    margin: 1rem 0;
    padding-bottom: 3rem;
}

.exp-item.is-active .exp-role { color: var(--text-primary); }
.exp-item.is-active .exp-arrow { transform: rotate(180deg); opacity: 1; }

.exp-details { 
    display: grid; 
    grid-template-rows: 0fr; 
    transition: grid-template-rows 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
}
.exp-item.is-active .exp-details { grid-template-rows: 1fr; }

.exp-content { 
    overflow: hidden; 
    padding-left: 200px; /* Aligns with the main content column */
    padding-top: 2rem;
    max-width: 800px;
}
.exp-content p { 
    font-size: 1.15rem; line-height: 1.7; color: var(--text-muted); 
    margin-bottom: 2rem; 
}

.exp-features { 
    list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; 
}
.exp-features li { 
    display: flex; align-items: center; gap: 0.8rem; 
    font-size: 0.9rem; font-weight: 600; color: var(--text-primary); 
}
.exp-features li i { width: 16px; height: 16px; color: #10b981; }

@media (max-width: 1024px) {
    .exp-header { grid-template-columns: 150px 1fr 200px; }
    .exp-content { padding-left: 150px; }
}
@media (max-width: 768px) {
    .exp-header { grid-template-columns: 1fr; gap: 0.5rem; text-align: left; }
    .exp-company { text-align: left; justify-content: flex-start; margin-top: 0.5rem; }
    .exp-content { padding-left: 0; }
    .exp-features { grid-template-columns: 1fr; }
    .exp-item.is-active { margin: 0.5rem 0; padding: 2rem 1.5rem; }
}

/* =========================================
   EDUCATION HORIZONTAL GALLERY (ART GALLERY)
========================================= */
.gallery-pinned {
    position: relative;
    background: #000;
    overflow: hidden;
    z-index: 10;
}

/* Luxury Fixture Above each card */
.card-fixture {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 6px;
    background: linear-gradient(to bottom, #333, #111);
    border-radius: 4px;
    z-index: 20;
    box-shadow: 0 4px 10px rgba(0,0,0,1);
}

.card-fixture::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 10%;
    width: 80%;
    height: 2px;
    background: #00f2ff;
    box-shadow: 0 0 15px #00f2ff, 0 0 30px rgba(0,242,255,0.8);
    border-radius: 2px;
}

/* Light Pool Effect on the Card Surface */
.edu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 150%;
    height: 100%;
    background: radial-gradient(circle at top center, rgba(0,242,255,0.15) 0%, transparent 60%);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 1;
    opacity: var(--light-opacity, 0.3); /* Will be controlled by JS */
    transition: opacity 0.4s ease;
}

.gallery-content {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
}

.gallery-header-container { margin-bottom: 4rem; }
.gallery-pinned .section-title, .gallery-pinned .section-label { color: #fff; }

.horizontal-track {
    display: flex;
    gap: 10vw;
    padding: 0 15vw;
    align-items: center;
    width: fit-content;
    will-change: transform;
}

.edu-card { 
    flex-shrink: 0;
    width: 70vw;
    max-width: 800px;
    border-radius: 40px;
    padding: 4rem; 
    backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    box-shadow: 0 40px 100px rgba(0,0,0,0.5);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s;
    user-select: none;
}

.card-1 { border-color: rgba(99, 102, 241, 0.3); }
.card-2 { border-color: rgba(34, 197, 94, 0.3); }
.card-3 { border-color: rgba(59, 130, 246, 0.3); }
.card-4 { border-color: rgba(255, 255, 255, 0.2); }

.edu-card:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 60px 140px rgba(0,0,0,0.7); }

.card-year { font-family: 'SF Mono', monospace; font-size: 0.95rem; color: rgba(255,255,255,0.4); display: block; margin-bottom: 1.5rem; letter-spacing: 0.15em; }
.card-inner h3 { font-size: 3.5rem; margin-bottom: 2rem; font-weight: 800; line-height: 1.1; color: #fff; }

.card-badge { position: absolute; top: 4rem; right: 4rem; padding: 0.6rem 1.5rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 40px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.5); }
.card-badge.highlight { background: #fff; color: #000; border-color: #fff; }

.card-meta { display: flex; flex-wrap: wrap; gap: 2.5rem; align-items: center; margin-bottom: 1rem; }
.inst { display: flex; align-items: center; gap: 0.8rem; font-size: 1.3rem; color: #fff; font-weight: 500; }
.inst i { width: 24px; height: 24px; color: rgba(255,255,255,0.5); }
.footer-spacing { display: none; }

@media (max-width: 768px) {
    .edu-card { width: 85vw; padding: 2.5rem; border-radius: 30px; }
    .card-inner h3 { font-size: 2.2rem; }
    .card-badge { top: 2.5rem; right: 2.5rem; padding: 0.4rem 1rem; font-size: 0.7rem; }
    .inst { font-size: 1.1rem; }
    .horizontal-track { gap: 5vw; padding: 0 7.5vw; }
}

/* =========================================
   CONTACT SECTION: LETS BUILD
========================================= */
.contact-section {
    padding: 5rem 0 3rem 0; /* Padding drásticamente reducido */
    background: #0a0a0b;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.contact-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 700px 500px at 30% 30%, rgba(255,255,255,0.04), transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.contact-container { display: flex; flex-direction: column; gap: 3rem; position: relative; z-index: 1; }

/* Floating decorative pills */
.float-pill {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.8);
    z-index: 2;
    pointer-events: none;
    animation: floatY 6s ease-in-out infinite;
}
.fp-1 { top: 8%; left: 6%; transform: rotate(-6deg); animation-delay: 0s; }
.fp-2 { top: 14%; right: 8%; transform: rotate(5deg); animation-delay: 1.2s; }
.fp-3 { top: 45%; left: 4%; transform: rotate(-3deg); animation-delay: 2.4s; }
.fp-4 { bottom: 22%; right: 6%; transform: rotate(4deg); animation-delay: 0.6s; }
@keyframes floatY {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -12px; }
}

/* Rotating available badge */
.avail-badge {
    position: absolute;
    top: 22%;
    right: 10%;
    width: 140px;
    height: 140px;
    z-index: 3;
    cursor: pointer;
}
.avail-rotate {
    width: 100%; height: 100%;
    animation: spin 18s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.avail-text {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    fill: #fff;
}
.avail-core {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.avail-core::before {
    content: '';
    position: absolute;
    width: 58px; height: 58px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.avail-core i {
    position: relative;
    width: 22px; height: 22px;
    color: #000;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.avail-badge:hover .avail-core::before { transform: scale(1.15); }
.avail-badge:hover .avail-core i { transform: rotate(45deg); }

@media (max-width: 900px) {
    .avail-badge { width: 100px; height: 100px; top: auto; bottom: 2rem; right: 2rem; }
    .float-pill { display: none; }
    .fp-3 { display: inline-flex; top: 2rem; left: 1rem; }
}

/* Status pill */
.contact-status {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1.1rem;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.02);
    backdrop-filter: blur(8px);
}
.status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 0 rgba(74,222,128,0.7);
    animation: statusPulse 2s infinite;
}
@keyframes statusPulse {
    0%   { box-shadow: 0 0 0 0 rgba(74,222,128,0.6); }
    70%  { box-shadow: 0 0 0 10px rgba(74,222,128,0); }
    100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}
.status-sep { opacity: 0.35; }
.status-time { font-variant-numeric: tabular-nums; color: #fff; }

/* Header */
.contact-header { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }

.contact-title {
    font-size: clamp(1.6rem, 5vw, 4.5rem);
    line-height: 1.15;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin: 0;
    text-align: center;
    cursor: default;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    min-height: 1.3em;
    padding: 0 1rem;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.typewriter-text {
    color: rgba(255,255,255,0.92);
    white-space: pre-wrap;
}
.typewriter-caret {
    display: inline-block;
    width: 0.08em;
    height: 0.95em;
    margin-left: 0.08em;
    background: rgba(255,255,255,0.85);
    vertical-align: -0.08em;
    animation: twCaret 1s steps(1) infinite;
}
@keyframes twCaret {
    50% { opacity: 0; }
}
@media (max-width: 560px) {
    .contact-title { font-size: clamp(1.35rem, 6.5vw, 2.2rem); }
}
.contact-title-type {
    font-family: -apple-system, 'SF Pro Rounded', 'SF Pro Display', 'Nunito', system-ui, sans-serif;
    text-transform: none;
    font-weight: 600;
    letter-spacing: -0.035em;
    font-style: normal;
    font-size: clamp(2.2rem, 6.5vw, 5.5rem);
    line-height: 1.1;
}
.contact-title-type .typewriter-text {
    color: #fff;
    background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,0.75) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.contact-title-type .typewriter-caret {
    width: 0.04em;
    height: 0.85em;
    background: rgba(255,255,255,0.7);
}
@media (max-width: 560px) {
    .contact-title-type { font-size: clamp(1.8rem, 8vw, 2.6rem); }
}

.illu-char {
    display: inline-block;
    color: rgba(255, 255, 255, 0.2);
    transition: color 0.1s ease, filter 0.1s ease;
    will-change: color, filter;
}

.illu-char.active {
    color: #fff;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 1));
}


/* Description */
.contact-desc {
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    line-height: 1.5;
    max-width: 540px;
    color: rgba(255,255,255,0.6);
    margin-top: 1rem;
}
.ct-dot { color: rgba(255,255,255,0.35); }

/* Pill grid */
.pill-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.c-pill {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.25rem;
    padding: 1.1rem 1.5rem 1.1rem 1.1rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    transition:
        transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.45s ease,
        border-color 0.45s ease,
        color 0.45s ease;
    will-change: transform;
}
.c-pill:hover {
    transform: translateY(-3px);
    background: #fff;
    color: #000;
    border-color: #fff;
}
.c-pill.c-pill-lg { grid-column: span 2; }
.c-pill.c-pill-cta { grid-column: span 2; }
.c-pill.is-copied { animation: pillPop 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes pillPop {
    0% { transform: scale(1); }
    40% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.c-pill-icon {
    display: inline-flex;
    width: 48px; height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    transition: background 0.45s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.c-pill-icon i { width: 20px; height: 20px; }
.c-pill:hover .c-pill-icon { background: rgba(0,0,0,0.08); transform: rotate(-8deg); }

.c-pill-body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.c-pill-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    opacity: 0.55;
}
.c-pill-value {
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.c-pill-arrow {
    display: inline-flex;
    width: 36px; height: 36px;
    align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: inherit;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), background 0.45s ease;
}
.c-pill-arrow i { width: 14px; height: 14px; }
.c-pill:hover .c-pill-arrow { transform: rotate(45deg); background: #000; color: #fff; }

/* Large pill styling */
.c-pill-lg .c-pill-icon { width: 56px; height: 56px; }
.c-pill-lg .c-pill-icon i { width: 24px; height: 24px; }
.c-pill-lg .c-pill-value { font-size: clamp(1.1rem, 1.7vw, 1.5rem); }

.c-pill-cta { padding: 1.25rem 1.6rem 1.25rem 1.25rem; }
.c-pill-cta .c-pill-value { font-size: clamp(1.15rem, 1.8vw, 1.5rem); font-weight: 600; }

/* =========================================
   SOCIAL BENTO GRID
========================================= */
.social-bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 3.5rem;
    width: 100%;
}

.bento-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 1.8rem;
    text-decoration: none;
    color: #fff;
    min-height: 200px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.06), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.bento-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.25);
    background: #fff;
    color: #000;
}

.bento-card:hover::before { opacity: 1; }

.bento-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

.bento-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bento-arrow {
    opacity: 0.5;
    transition: all 0.4s ease;
}

.bento-card:hover .bento-arrow {
    opacity: 1;
    transform: translate(4px, -4px);
    color: #000;
}

.bento-icon i {
    width: 24px;
    height: 24px;
}

.bento-card:hover .bento-icon {
    transform: scale(1.1) rotate(-6deg);
    background: #000;
    color: #fff;
}

.bento-card.bento-linkedin:hover .bento-icon { background: #0077b5; }
.bento-card.bento-phone:hover .bento-icon { background: #25D366; }

.bento-content {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    position: relative;
    z-index: 2;
}

.bento-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.5);
    transition: color 0.4s ease;
}

.bento-card:hover .bento-label {
    color: rgba(0,0,0,0.5);
}

.bento-value {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
}

/* Mini tags */
.mini-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-start;
}
.mini-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.03);
    font-size: 0.78rem;
    color: rgba(255,255,255,0.7);
    transition: border-color 0.35s ease, color 0.35s ease, background 0.35s ease;
}
.mini-tag:hover {
    border-color: rgba(255,255,255,0.3);
    color: #fff;
    background: rgba(255,255,255,0.06);
}
.mini-tag i { width: 13px; height: 13px; opacity: 0.7; }

/* Copy toast */
.copy-toast {
    position: fixed;
    bottom: 2rem; left: 50%;
    transform: translateX(-50%) translateY(calc(100% + 2rem));
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.4rem;
    background: #fff;
    color: #000;
    border-radius: 999px;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    z-index: 9999;
    pointer-events: none;
}
.copy-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.copy-toast i { width: 14px; height: 14px; }

/* Footer */
.footer-minimal { margin-top: 4rem; }
.footer-line {
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin-bottom: 2rem;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
}
.footer-top {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.55);
    transition: color 0.3s ease, transform 0.3s ease;
}
.footer-top:hover { color: #fff; transform: translateY(-2px); }
.footer-top i { width: 14px; height: 14px; }

@media (max-width: 900px) {
    .pill-grid { grid-template-columns: 1fr; }
    .c-pill.c-pill-lg, .c-pill.c-pill-cta { grid-column: span 1; }
}
@media (max-width: 768px) {
    .contact-section { padding: 6rem 0 2rem 0; }
    .contact-container { gap: 3.5rem; }
    .c-pill { padding: 0.9rem 1.2rem 0.9rem 0.9rem; gap: 0.9rem; }
    .c-pill-icon { width: 44px; height: 44px; }
    .c-pill-icon i { width: 18px; height: 18px; }
    .c-pill-value { font-size: 1rem !important; }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* =========================================
   MODAL & CHATBOT UI
========================================= */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(250, 250, 252, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    z-index: 10000; opacity: 0; pointer-events: none; transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; justify-content: center; align-items: center; padding: 2rem;
}
#certificate-modal.modal-overlay { background: rgba(18, 18, 20, 0.94); backdrop-filter: blur(15px); }
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-close {
    position: absolute; top: 1.5rem; right: 1.5rem; 
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    color: var(--text-primary); border: 1px solid rgba(0,0,0,0.05); 
    width: 36px; height: 36px; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10001; 
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-close i { width: 18px; height: 18px; }
.modal-close:hover { transform: scale(1.1) rotate(90deg); background: #fff; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.modal-close:active { transform: scale(0.95); }

/* =========================================
   PROJECT ROADMAP (Timeline)
 ========================================= */
.roadmap-section { margin-top: 5rem; padding-top: 4rem; border-top: 1px solid var(--divider); }
.roadmap-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-muted); margin-bottom: 3rem; }

.roadmap-container { position: relative; padding-left: 3rem; }
.roadmap-container::before { 
    content: ''; position: absolute; left: 7px; top: 0; bottom: 0; 
    width: 2px; background: var(--divider); 
}

.roadmap-item { position: relative; margin-bottom: 5rem; }
.roadmap-item:last-child { margin-bottom: 0; }

.roadmap-dot { 
    position: absolute; left: -2.35rem; top: 0.5rem; 
    width: 12px; height: 12px; background: #fff; border: 2px solid var(--text-primary); 
    border-radius: 50%; z-index: 2; 
}

.roadmap-label { 
    font-size: 1.8rem; font-weight: 800; color: var(--text-primary); 
    margin-bottom: 1.5rem; display: block; letter-spacing: -0.02em; 
}

.roadmap-card { 
    background: #fcfcfd; border: 1px solid var(--divider); border-radius: 20px; 
    overflow: hidden; padding: 2rem; transition: transform 0.3s ease; 
}
.roadmap-card:hover { transform: translateX(5px); border-color: var(--text-primary); }

.roadmap-media { margin-bottom: 2rem; overflow: hidden; background: #000; width: 100%; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.roadmap-media.is-image { max-width: 100%; }
.roadmap-media.is-video { width: 100%; background: #000; }
.roadmap-media img, .roadmap-media video { max-width: 100%; display: block; height: auto; border-radius: 10px; }

.roadmap-info h4 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.8rem; color: var(--text-primary); }
.roadmap-info p { font-size: 1rem; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* Theme Color Palette */
.theme-linklogic { --accent-proj: #00f2ff; --accent-glow: rgba(0, 242, 255, 0.4); }
.theme-jardin { --accent-proj: #00ff88; --accent-glow: rgba(0, 255, 136, 0.4); }
.theme-smartag { --accent-proj: #ffbb00; --accent-glow: rgba(255, 187, 0, 0.4); }
.theme-agentlab { --accent-proj: #ff0055; --accent-glow: rgba(255, 0, 85, 0.4); }

.projects-tracks { 
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; 
    perspective: 1200px; /* Enable 3D space for cards */
}

.project-card { 
    position: relative;
    background: #fff; border: 1px solid var(--divider); border-radius: 32px; 
    overflow: hidden; cursor: pointer; 
    transition: 
        transform 0.1s ease-out, 
        box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.4s ease;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}


@media (max-width: 768px) {
    .roadmap-container { padding-left: 2rem; }
    .roadmap-dot { left: -1.45rem; }
    .roadmap-label { font-size: 1.4rem; text-align: center; margin-right: 2rem; }
    .roadmap-card { padding: 1.2rem; text-align: center; }
    .roadmap-media { margin: 0 auto 1.5rem; }
}.modal-container { 
    position: relative;
    width: 100%; max-width: 1600px; height: 90vh; background: #fff; border-radius: 30px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.1); overflow: hidden;
    transform: translateY(50px) scale(0.95); transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.active .modal-container { transform: translateY(0) scale(1); }

/* Editorial Scroll Flow */
.modal-body-wrapper { height: calc(100% - 60px); overflow-y: auto; scroll-behavior: smooth; }
.modal-editorial-flow { max-width: 900px; margin: 0 auto; padding: 4rem 2rem; }

.modal-editorial-flow h2 { font-size: 3.5rem; font-weight: 800; letter-spacing: -0.04em; margin: 2rem 0 1rem; color: var(--text-primary); }
.modal-editorial-flow .sub { font-size: 1.25rem; font-weight: 500; color: var(--text-muted); margin-bottom: 3rem; }
.modal-text-content { font-size: 1.15rem; line-height: 1.8; color: var(--text-primary); margin-bottom: 4rem; opacity: 0.9; }

/* Metadata Footer */
.modal-footer-meta { margin-top: 6rem; padding-top: 5rem; border-top: 2px solid var(--divider); display: flex; flex-direction: column; gap: 4rem; }
.meta-section h5 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-muted); margin-bottom: 2rem; }

.project-tags { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.tag-chip { padding: 0.6rem 1.2rem; background: #f5f5f7; border-radius: 50px; font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }

.meta-list { display: flex; flex-wrap: wrap; gap: 3rem; }
.meta-item { display: flex; flex-direction: column; gap: 0.5rem; }
.meta-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.meta-value { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }

.project-cta { 
    display: inline-flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 1.5rem 2rem; background: var(--text-primary); color: #fff;
    text-decoration: none; border-radius: 15px; transition: all 0.3s ease;
    margin-top: 2rem;
}
.project-cta:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.project-cta span { font-size: 1rem; font-weight: 700; }

@media (max-width: 1024px) { 
    .modal-editorial-flow { max-width: 100%; padding: 2rem; }
    .modal-editorial-flow h2 { font-size: 2.5rem; }
}

.modal-mobile-header { display: none; }

/* Mobile-Specific Integration (Deep refinement) */
@media (max-width: 768px) {
    .modal-overlay { padding: 0; align-items: flex-end; }
    .modal-container { 
        height: 100vh; width: 100vw; border-radius: 0; 
        transform: translateY(100%) scale(1);
    }
    .modal-body-wrapper { height: calc(100% - 60px); }
    .modal-overlay.active .modal-container { transform: translateY(0) scale(1); }
    .modal-close { display: none; }
    
    .modal-mobile-header { 
        display: flex; justify-content: space-between; align-items: center;
        position: sticky; top: 0; left: 0; width: 100%;
        height: 60px; padding: 0 1.5rem;
        background: rgba(255, 255, 255, 0.85); 
        backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--divider);
        z-index: 10002;
    }
    .mobile-nav-title { font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-primary); opacity: 0.8; }
    .modal-mobile-close { background: none; border: none; padding: 0.5rem; color: var(--text-primary); cursor: pointer; }
    .modal-mobile-close i { width: 20px; height: 20px; }
}
.modal-info .sub { font-size: 1.4rem; color: var(--text-muted); margin-bottom: 3rem; font-weight: 300; }
.modal-info p { font-size: 1.15rem; line-height: 1.6; margin-bottom: 2rem; color: var(--text-primary); font-weight: 300;}
.modal-info ul { margin-left: 2rem; margin-bottom: 3rem; }
.modal-info li { font-size: 1.15rem; margin-bottom: 1rem; font-weight: 300; }
.modal-info h4 { font-size: 1.8rem; margin-bottom: 1.5rem; margin-top: 3.5rem; letter-spacing: -0.02em; }
.modal-project-img { width: 100%; height: 350px; object-fit: cover; border-radius: 20px; margin-bottom: 4rem; background: var(--bg-secondary); }

/* Sidebar UI */
.modal-sidebar { background: #fafafc; border-left: 1px solid var(--divider); padding: 5rem 3rem; display: flex; flex-direction: column; gap: 3.5rem; overflow-y: auto; }

.sidebar-block h5 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-muted); margin-bottom: 1.5rem; }

.project-tags { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.tag-chip { padding: 0.5rem 1rem; background: #fff; border: 1px solid var(--divider); border-radius: 30px; font-size: 0.85rem; font-weight: 500; color: var(--text-primary); }

.meta-list { display: flex; flex-direction: column; gap: 1.5rem; }
.meta-item { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--divider); padding-bottom: 1rem; }
.meta-label { font-size: 0.9rem; color: var(--text-muted); }
.meta-value { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); }

.project-cta { 
    margin-top: auto; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 1rem; 
    padding: 1.5rem 2rem; 
    background: var(--text-primary); 
    color: #fff; 
    border-radius: 50px; 
    font-size: 1.1rem; 
    font-weight: 600; 
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.project-cta:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.25); filter: brightness(1.1); }
.project-cta i { width: 20px; height: 20px; }


@keyframes popIn {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.cert-container {
    max-width: 1000px; width: 95%;
    height: 88vh;
    padding: 0;
    background: #000; /* Absolute black for the container */
    overflow: hidden;
    border-radius: 32px;
    box-shadow: 0 50px 120px rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.06);
    /* JS-driven entry from click origin */
    opacity: 0;
    transform: scale(0.08);
    will-change: transform, opacity, filter;
}
.modal-overlay.active .cert-container { opacity: 1; }

.cert-viewer {
    height: 100%;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: radial-gradient(circle at top, rgba(255,255,255,0.03) 0%, transparent 80%);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
    user-select: text;
}
.cert-viewer::-webkit-scrollbar { width: 8px; }
.cert-viewer::-webkit-scrollbar-track { background: transparent; }
.cert-viewer::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
.cert-viewer::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }
.cert-viewer, .cert-viewer * { user-select: text; }
.cert-display-title, .cert-subtitle, .cert-summary, .cert-kicker { cursor: text; }

.cert-cinema-view {
    max-width: 850px;
    margin: 0 auto;
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Header */
.cert-header-minimal { margin-bottom: 4.5rem; }
.cert-kicker { 
    font-size: 0.85rem; font-weight: 700; color: rgba(255,255,255,0.4); 
    text-transform: uppercase; letter-spacing: 0.3em; display: block; margin-bottom: 1.2rem;
}
.cert-display-title { 
    font-size: clamp(2.4rem, 6vw, 4.2rem); font-family: var(--font-serif); 
    color: #fff; margin-bottom: 1.5rem; letter-spacing: -0.03em;
    line-height: 1.05;
}
.cert-subtitle { 
    font-size: 1.3rem; color: rgba(255,255,255,0.5); font-weight: 400; 
    max-width: 650px; margin: 0 auto; line-height: 1.5;
}

/* Cinema Hero Image */
.cert-hero-image { width: 100%; margin-bottom: 6rem; position: relative; }
.cert-image-frame {
    width: 100%; max-width: 720px; margin: 0 auto;
    border-radius: 16px; overflow: hidden;
    position: relative;
    box-shadow: 0 40px 100px rgba(0,0,0,0.8);
    background: #000;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.cert-image-glow {
    position: absolute; inset: -20px;
    background: radial-gradient(circle at center, rgba(255,255,255,0.08), transparent 70%);
    z-index: -1; opacity: 0.5;
}
.cert-image-frame img { 
    display: block; width: 100%; height: auto; 
    transition: transform 1.2s ease, filter 0.8s ease;
    filter: brightness(0.9) contrast(1.1);
}
.cert-image-frame:hover img { 
    transform: scale(1.04); 
    filter: brightness(1.1) contrast(1.05);
}

.cert-credential-badge {
    margin-top: 2rem; display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 0.75rem 1.6rem; 
    background: rgba(255,255,255,0.05); 
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px; font-size: 0.85rem; font-weight: 600; color: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
}
.cert-credential-badge i { width: 15px; height: 15px; color: #4ade80; }

/* Content Section */
.cert-description-block { width: 100%; max-width: 750px; }
.cert-summary { 
    font-size: 1.4rem; line-height: 1.8; 
    color: rgba(255,255,255,0.8); 
    margin-bottom: 6rem; 
    font-family: var(--font-serif); font-style: italic;
    opacity: 0.95;
    position: relative;
}
.cert-summary::before {
    content: '"'; position: absolute; left: -2rem; top: -1rem;
    font-size: 4rem; opacity: 0.1; color: #fff;
}

.cert-details-centered {
    display: flex; flex-direction: column; gap: 5.5rem;
    text-align: center; padding-top: 5rem; border-top: 1px solid rgba(255,255,255,0.06);
}

.cert-section-label {
    font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.25em; 
    color: rgba(255,255,255,0.3); margin-bottom: 3.5rem; font-weight: 800;
}

.cert-highlights-stack { display: flex; flex-direction: column; gap: 3rem; align-items: center; }
.cert-highlight { 
    display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
    max-width: 500px;
}
.cert-highlight-icon { 
    width: 48px; height: 48px; border-radius: 14px; 
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
}
.cert-highlight-icon i { width: 22px; height: 22px; color: #fff; }
.cert-highlight-label { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 0.4rem; }
.cert-highlight-text p { font-size: 1rem; line-height: 1.6; color: rgba(255,255,255,0.5); margin: 0; }

.cert-skills-wrap { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }
.cert-skill { 
    padding: 0.7rem 1.4rem; 
    background: rgba(255,255,255,0.03); 
    border: 1px solid rgba(255,255,255,0.08); 
    border-radius: 14px; font-size: 0.9rem; font-weight: 700; color: rgba(255,255,255,0.9);
    transition: all 0.4s ease;
}
.cert-skill:hover { 
    background: #fff; color: #000;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 10px 30px rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
    .projects-tracks { grid-template-columns: 1fr; gap: 2rem; }
    .track-left, .track-right { transform: none !important; }
    
    .cert-cinema-view { padding: 3rem 1.2rem; }
    .cert-display-title { font-size: 2rem; }
    .cert-summary { font-size: 1.1rem; margin-bottom: 4rem; }
    .cert-image-frame { 
        width: 100%; 
        max-width: 100%; 
        height: auto; 
        aspect-ratio: 4 / 3; 
        box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    }
    .cert-image-frame img { object-fit: contain; padding: 5px; }
    .cert-details-centered { gap: 4rem; padding-top: 3rem; }
    
    /* Mostrar X de cierre en móvil para certificados */
    .cert-container .modal-close {
        display: flex !important;
        position: fixed;
        top: 1.5rem;
        right: 1.5rem;
        width: 40px;
        height: 40px;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.15);
        color: #fff;
        border-radius: 50%;
        z-index: 10005;
        justify-content: center;
        align-items: center;
    }
}
@media (max-width: 480px) {
    .cert-display-title { font-size: 1.6rem; }
    .cert-hero-image { margin-bottom: 4rem; }
    .cert-container .modal-close { top: 1rem; right: 1rem; }
}
