/*======== RESET ========*/
*{
margin:0;
padding:0;
box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
    background:var(--color-background);
    overscroll-behavior-y:contain;
}

body{
background:var(--color-background);
color:var(--color-primary);
font-family:var(--font-text);
overflow-x:hidden;
overscroll-behavior-y:contain;
}

img{
display:block;
max-width:100%;
}

a{
text-decoration:none;
color:inherit;
}

ul{
list-style:none;
}

/*======== HEADER ========*/
.container{
width:min(90%, var(--container));
margin:auto;
}

/*======== CONTAINER ========*/
.header{
position:fixed;
top:0;
left:0;
width:100%;
z-index:999;
padding:1.4rem 0;
background:rgba(10, 10, 11, 0.55);
backdrop-filter:blur(12px);
-webkit-backdrop-filter:blur(12px);
transition:background .35s ease;
}

.navbar{
display:flex;
justify-content:space-between;
align-items:center;
}

.header.light-navbar{
    background:rgba(248, 249, 250, 0.6);
}

.logo img{
height:60px;
}

.nav-menu{
display:flex;
gap:3rem;
}

.nav-menu a{
    font-size:.95rem;
    color:var(--color-secondary);
    transition:var(--transition);
}

.nav-menu a:hover{
    color:#ffffff;
}

/*======== NAVBAR SOBRE FONDO CLARO ========*/
.header.light-navbar .nav-menu a{
    color:#3A3B3D;
}

.header.light-navbar .nav-menu a:hover{
    color:#000000;
}

.header.light-navbar .logo img{
    filter:brightness(0);
}

/*======== HERO ========*/
.hero{
min-height:100vh;
display:flex;
align-items:center;
}

.hero-content{
max-width:760px;
}

.hero h3{
font-size:1.2rem;
font-weight:400;
margin-bottom:1rem;
color:var(--color-secondary);
}

.hero h1{
font-family:var(--font-title);
font-size:var(--h1);
line-height:1.1;
margin-bottom:2rem;
}

.hero p{
font-size:1.15rem;
line-height:1.8;
max-width:650px;
color:var(--color-secondary);
margin-bottom:3rem;
}

.btn{
display:inline-block;
padding:18px 36px;
border:1px solid var(--color-border);
transition:var(--transition);
}

.btn:hover{
background:white;
color:black;
}

/*======== SOBRE MI ========*/
.about{
    background:var(--color-bg-alt);
    color:var(--color-text-dark);
    padding:var(--space-xxl) 0 0;
    
    min-height:100vh;

}

.about-grid{
    display:grid;
    grid-template-columns:1.17fr 1.3fr;
    gap:var(--space-xl);
    align-items:center;
}

.about-image img{
    width:100%;
    border-radius:8px;
    filter:grayscale(100%);
    transition:var(--transition);
}

.about-content h3{
    font-size:1.1rem;
    font-weight:500;
    color:var(--color-secondary);
    margin-bottom:.8rem;
}

.about-content h2{
    font-family:var(--font-title);
    font-size:var(--h2);
    line-height:1.25;
    margin-bottom:1.5rem;
}

.about-content p{
    font-size:1.05rem;
    line-height:1.8;
    color:#3A3B3D;
    margin-bottom:2rem;
    max-width:600px;
}

.about-image img:hover{
    filter:grayscale(0%);
}

.tech-stack{
    display:flex;
    flex-direction:column;
    gap:1.2rem;
}

.tech-label{
    display:block;
    font-size:.75rem;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:.08em;
    color:var(--color-secondary);
    margin-bottom:.6rem;
}

.tech-pills{
    display:flex;
    flex-wrap:wrap;
    gap:.6rem;
}

.tech-pills span{
    padding:.5rem 1.1rem;
    border:1px solid var(--color-text-dark);
    border-radius:30px;
    font-size:.9rem;
    transition:var(--transition);
}

.tech-pills span:hover{
    background:var(--color-text-dark);
    color:var(--color-bg-alt);
}

/*======== LO QUE HAGO ========*/
.services{
    background:var(--color-background);
    color:var(--color-primary);
    padding:var(--space-xxl) 0;

    min-height:100vh;
    display:flex;
    align-items:center;
}

.services > .container{
    width:min(90%, var(--container));
}

.services h3{
    font-size:1.1rem;
    font-weight:500;
    color:var(--color-secondary);
    margin-bottom:.8rem;
}

.services > .container > h2{
    font-family:var(--font-title);
    font-size:var(--h2);
    margin-bottom:var(--space-xl);
    max-width:700px;
}

.services-grid{
    display:grid;
    grid-template-columns:repeat(2, 1fr);
    gap:var(--space-lg) var(--space-xl);
}

.service-item{
    padding-top:var(--space-md);
    border-top:1px solid var(--color-border);
}

.service-number{
    display:block;
    font-family:var(--font-title);
    font-size:1.1rem;
    color:var(--color-secondary);
    margin-bottom:1rem;
}

.service-item h4{
    font-family:var(--font-title);
    font-size:1.5rem;
    margin-bottom:.8rem;
}

.service-item p{
    font-size:1rem;
    line-height:1.7;
    color:var(--color-secondary);
    max-width:420px;
}

/*======== PROYECTOS ========*/
.projects{
    background:var(--color-bg-alt);
    color:var(--color-text-dark);
    padding:var(--space-xxl) 0;
}

.projects h3{
    font-size:1.1rem;
    font-weight:500;
    color:var(--color-secondary);
    margin-bottom:.8rem;
}

.projects > .container > h2{
    font-family:var(--font-title);
    font-size:var(--h2);
    margin-bottom:var(--space-xl);
}

/* Tarjeta destacada */
.project-featured{
    display:grid;
    grid-template-columns:1.3fr 1fr;
    gap:var(--space-lg);
    align-items:center;
    margin-bottom:var(--space-xl);
    padding-bottom:var(--space-xl);
    border-bottom:1px solid #E0E1E3;
}

.featured-video{
    width:100%;
    aspect-ratio:16/10;
    object-fit:cover;
    border-radius:10px;
}

.project-tag{
    display:inline-block;
    font-size:.75rem;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:.06em;
    color:var(--color-secondary);
    margin-bottom:.8rem;
}

.featured-info h4{
    font-family:var(--font-title);
    font-size:1.8rem;
    margin-bottom:.8rem;
}

.featured-info p{
    font-size:1rem;
    line-height:1.7;
    color:#3A3B3D;
    margin-bottom:1.5rem;
}

.project-link{
    display:inline-block;
    font-weight:600;
    border-bottom:1px solid var(--color-text-dark);
    padding-bottom:2px;
    transition:var(--transition);
}

.project-link:hover{
    color:var(--color-secondary);
    border-color:var(--color-secondary);
}

/* Grid de proyectos */
.projects-grid{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:var(--space-lg);
}

.project-card video,
.project-logo-wrap{
    width:100%;
    aspect-ratio:4/3;
    object-fit:cover;
    border-radius:8px;
    margin-bottom:1.2rem;
}

.project-logo-wrap{
    background:#EFEFF0;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:var(--space-md);
}

.project-logo-wrap img{
    max-width:100%;
    max-height:100%;
}

.project-card h4{
    font-family:var(--font-title);
    font-size:1.2rem;
    margin-bottom:.5rem;
}

.project-card p{
    font-size:.95rem;
    line-height:1.6;
    color:#3A3B3D;
}

.project-tags{
    display:flex;
    flex-wrap:wrap;
    gap:.5rem;
    margin-top:1rem;
    margin-bottom:1.5rem;
}

.project-tags span{
    padding:.35rem .9rem;
    border:1px solid var(--color-text-dark);
    border-radius:30px;
    font-size:.8rem;
    transition:var(--transition);
}

.project-tags span:hover{
    background:var(--color-text-dark);
    color:var(--color-bg-alt);
}

/*======== OVERLAY DE PROYECTOS ========*/

.project-media{
    position:relative;
    overflow:hidden;
    border-radius:10px;
    margin-bottom:1.2rem;
}

.project-media video{
    margin-bottom:0; 
    display:block;
}

.project-overlay{
    position:absolute;
    inset:0;
    background:rgba(10,10,11,.88);
    padding:1.4rem;
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:.3rem;
    opacity:0;
    transform:translateY(8px);
    transition:opacity .3s ease, transform .3s ease;
    color:var(--color-primary);
}

.project-media:hover .project-overlay{
    opacity:1;
    transform:translateY(0);
}

.overlay-label{
    font-size:.7rem;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:.08em;
    color:var(--color-secondary);
    margin-top:.6rem;
}

.overlay-label:first-child{
    margin-top:0;
}

.project-overlay p{
    font-size:.9rem;
    line-height:1.4;
    color:var(--color-primary);
}

/*======== PROCESO ========*/

.process{
    background:var(--color-background);
    color:var(--color-primary);
    padding:var(--space-xxl) 0;

    min-height:100vh;

    display:flex;
    align-items:center;
}

.process h3{
    font-size:1.1rem;
    font-weight:500;
    color:var(--color-secondary);
    margin-bottom:.8rem;
}

.process > .container > h2{
    font-family:var(--font-title);
    font-size:var(--h2);
    margin-bottom:var(--space-xl);
}

.process-steps{
    display:grid;
    grid-template-columns:repeat(4, 1fr);
    gap:var(--space-lg);
}

.process-step{
    padding-top:var(--space-md);
    border-top:1px solid var(--color-border);
}

.process-step{
    padding-top:var(--space-md);
    border-top:1px solid var(--color-border);
    transition:var(--transition);
}

.process-step:hover{
    border-top-color:var(--color-primary);
}

.process-step:hover .step-number{
    color:var(--color-primary);
}

.step-number{
    display:block;
    font-family:var(--font-title);
    font-size:1.1rem;
    color:var(--color-secondary);
    margin-bottom:1rem;
}

.process-step h4{
    font-family:var(--font-title);
    font-size:1.3rem;
    margin-bottom:.8rem;
}

.process-step p{
    font-size:.95rem;
    line-height:1.7;
    color:var(--color-secondary);
}

/*======== CONTACTO ========*/

.contact{
    background:var(--color-bg-alt);
    color:var(--color-text-dark);
    padding:var(--space-xxl) 0;
}

.contact h3{
    font-size:1.1rem;
    font-weight:500;
    color:var(--color-secondary);
    margin-bottom:.8rem;
}

.contact h2{
    font-family:var(--font-title);
    font-size:var(--h2);
    margin-bottom:1rem;
}

.contact-intro{
    font-size:1.1rem;
    color:#3A3B3D;
    margin-bottom:var(--space-lg);
}

.contact-channels{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:var(--space-lg) var(--space-md);
    margin-bottom:var(--space-xl);
    padding-bottom:var(--space-xl);
    border-bottom:1px solid #E0E1E3;
}

.contact-channel{
    display:flex;
    flex-direction:column;
    gap:.4rem;
    padding-top:var(--space-sm);
    border-top:1px solid var(--color-text-dark);
    transition:var(--transition);
}

.contact-channel:hover{
    opacity:.6;
}

.channel-label{
    font-size:.75rem;
    text-transform:uppercase;
    letter-spacing:.06em;
    color:var(--color-secondary);
}

.channel-value{
    font-size:1rem;
    font-weight:500;
}

.contact-collab{
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    flex-wrap:wrap;
    gap:var(--space-md);
}

.collab-info h4{
    font-family:var(--font-title);
    font-size:1.3rem;
    margin:.4rem 0 .4rem;
}

.collab-info p{
    font-size:.95rem;
    color:#3A3B3D;
}

.collab-links{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:.4rem;
}

.collab-link{
    font-size:.9rem;
    font-weight:500;
    border-bottom:1px solid var(--color-text-dark);
    padding-bottom:1px;
    transition:var(--transition);
}

.collab-link:hover{
    color:var(--color-secondary);
    border-color:var(--color-secondary);
}

/*======== MENU TOGGLE (hamburguesa) ========*/

.menu-toggle{
    display:none;
    flex-direction:column;
    gap:5px;
    background:none;
    border:none;
    cursor:pointer;
    z-index:1001;
}

.menu-toggle span{
    width:26px;
    height:2px;
    background:var(--color-primary);
    transition:var(--transition);
}

.header.light-navbar .menu-toggle span{
    background:var(--color-text-dark);
}

.menu-toggle.active span:nth-child(1){
    transform:translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2){
    opacity:0;
}

.menu-toggle.active span:nth-child(3){
    transform:translateY(-7px) rotate(-45deg);
}

/*======== FOOTER ========*/

.footer{
    background:var(--color-background);
    color:var(--color-primary);
    padding:var(--space-md) 0 var(--space-sm);
}

.footer-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding-bottom:var(--space-md);
    margin-bottom:var(--space-sm);
    border-bottom:1px solid var(--color-border);
}

.footer-logo img{
    height:90px;
}

.footer-tagline{
    font-size:.95rem;
    line-height:1.6;
    color:var(--color-secondary);
    text-align:center;
}

.footer-socials{
    display:flex;
    gap:1.4rem;
}

.footer-socials a{
    color:var(--color-primary);
    display:flex;
    transition:var(--transition);
}

.footer-socials svg{
    width:23px;
    height:23px;
}

.footer-socials a:hover{
    color:var(--color-secondary);
    transform:scale(1.2);
}

.footer-bottom{
    display:flex;
    justify-content:center;
    align-items:center;
    flex-wrap:wrap;
    gap:1rem;
}

.footer-bottom p{
    font-size:.8rem;
    color:var(--color-secondary);
}

.footer-back-top{
    font-size:.8rem;
    color:var(--color-secondary);
    transition:var(--transition);
}

.footer-back-top:hover{
    color:var(--color-primary);
}

/*======== BOTÓN VOLVER ARRIBA ========*/

#back-to-top{
    position:fixed;
    bottom:2rem;
    right:2rem;
    width:38px;
    height:38px;
    border-radius:50%;
    border:1px solid var(--color-border);
    background:var(--color-surface);
    color:var(--color-primary);
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    opacity:0;
    visibility:hidden;
    transform:translateY(10px);
    transition:var(--transition);
    z-index:900;
}

#back-to-top.visible{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
}

#back-to-top:hover{
    background:var(--color-primary);
    color:var(--color-background);
    border-color:var(--color-primary);
}

#back-to-top svg{
    width:18px;
    height:18px;
}

#back-to-top.light{
    background:var(--color-bg-alt);
    color:var(--color-text-dark);
    border-color:#D8D9DB;
}

#back-to-top.light:hover{
    background:var(--color-text-dark);
    color:var(--color-bg-alt);
    border-color:var(--color-text-dark);
}