:root {
    --bg: #0D0D0D;
    --text: #F5F5F7;
    --grey: #8E8E93;
    --accent: #FFFFFF;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Efecto de Grano */
.grain {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.05; pointer-events: none; z-index: 9999;
}

/* Navegación */
.navbar {
    position: fixed; top: 0; width: 100%; padding: 30px 50px;
    z-index: 1000; mix-blend-mode: difference;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 600; letter-spacing: 2px; font-size: 14px; }

.menu-toggle {
    background: none; border: none; cursor: pointer; width: 30px; height: 20px;
    display: flex; flex-direction: column; justify-content: space-between;
}
.menu-toggle span { width: 100%; height: 1px; background: white; transition: 0.4s; }

/* Menú Overlay */
.menu-overlay {
    position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
    background: #000; z-index: 900; display: flex; align-items: center;
    justify-content: center; transition: 0.6s cubic-bezier(0.85, 0, 0.15, 1);
}
.menu-overlay.active { right: 0; }
.nav-links { list-style: none; text-align: center; }
.nav-links li a {
    font-size: 8vh; color: white; text-decoration: none; font-weight: 200;
    transition: 0.3s; display: block;
}
.nav-links li a:hover { opacity: 0.5; transform: skewX(-10deg); }

/* Perfil & Hero */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 0 10%; }
.profile-container { margin-bottom: 40px; }
.profile-img {
    width: 120px; height: 120px; border-radius: 50%;
    overflow: hidden; border: 1px solid var(--grey);
    filter: grayscale(100%); transition: 0.5s;
}
.profile-img:hover { filter: grayscale(0%); transform: scale(1.05); }
.profile-img img { width: 100%; height: 100%; object-fit: cover; }

h1 { font-size: clamp(3rem, 8vw, 6rem); font-weight: 600; letter-spacing: -4px; line-height: 0.9; }
.subtitle { color: var(--grey); font-size: 1.2rem; margin-top: 20px; font-weight: 200; }
.bio-text { max-width: 600px; margin-top: 40px; font-size: 1.1rem; line-height: 1.6; color: #ccc; }

/* Proyectos */
.section-label { font-size: 12px; color: var(--grey); text-transform: uppercase; letter-spacing: 4px; margin-bottom: 60px; }
section { padding: 150px 10%; border-bottom: 1px solid #222; }

.project-card { display: grid; grid-template-columns: 1fr 1.2fr; gap: 80px; margin-bottom: 120px; align-items: center; }
.project-card.reverse { direction: rtl; }
.project-card.reverse .p-content { direction: ltr; }

.p-category { font-size: 12px; color: var(--grey); }
h3 { font-size: 2.5rem; font-weight: 400; margin: 20px 0; }
.p-tags { display: flex; gap: 15px; margin-top: 30px; }
.p-tags span { border: 1px solid #444; padding: 5px 15px; border-radius: 20px; font-size: 10px; }

.mockup {
    background: #1a1a1a; aspect-ratio: 16/10; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; color: #444;
    position: relative; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

/* Timeline */
.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; }
.timeline-item { padding: 30px; background: #111; border-radius: 2px; }
.time { color: var(--grey); font-size: 12px; }
.timeline-item h4 { margin: 15px 0; font-weight: 400; }

/* Contacto */
.big-mail { font-size: clamp(1.5rem, 5vw, 4rem); color: white; text-decoration: none; border-bottom: 2px solid white; transition: 0.4s; }
.big-mail:hover { color: var(--grey); border-color: var(--grey); }
.final-cta { margin-bottom: 20px; font-weight: 200; }

/* Responsive */
@media (max-width: 900px) {
    .project-card { grid-template-columns: 1fr; gap: 40px; }
    .hero { padding-top: 150px; }
    h1 { font-size: 3.5rem; }
    .nav-links li a { font-size: 5vh; }
}

/* Animación Reveal */
.reveal { opacity: 0; transform: translateY(50px); transition: 1s all ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* SECCIÓN DOWNLOAD */
#archive {
    border-bottom: 1px solid #222;
}

.download-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111; /* Un gris muy oscuro para separar del fondo negro */
    padding: 60px;
    border-radius: 4px;
    gap: 40px;
}

.dl-text h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 400;
}

.dl-text p {
    color: var(--grey);
    max-width: 450px;
    font-size: 1rem;
}

/* Botón de Lujo */
.btn-download {
    text-decoration: none;
    color: white;
    border: 1px solid #444;
    padding: 20px 40px;
    position: relative;
    overflow: hidden;
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.btn-inner {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
    position: relative;
}

.btn-text {
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-download::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 0%; height: 100%;
    background: white;
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1;
}

.btn-download:hover::before {
    width: 100%;
}

.btn-download:hover .btn-text, 
.btn-download:hover .btn-icon {
    color: black;
}

/* Responsive para el CV */
@media (max-width: 768px) {
    .download-box {
        flex-direction: column;
        padding: 40px 20px;
        text-align: center;
    }
    .dl-text p {
        margin-bottom: 30px;
    }
}
        
/* CONTACTO ACTUALIZADO */
footer {
    padding: 150px 10% 50px 10%;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-header {
    margin-bottom: 80px;
}

.final-cta {
    font-size: 1.5rem;
    font-weight: 200;
    color: var(--grey);
}

.contact-links-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.contact-block {
    display: flex;
    flex-direction: column;
}

.contact-type {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--grey);
    margin-bottom: 15px;
}

.big-link {
    font-size: clamp(2rem, 6vw, 4.5rem);
    color: white;
    text-decoration: none;
    font-weight: 300;
    letter-spacing: -3px;
    line-height: 1;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    width: fit-content;
}

.big-link:hover {
    color: var(--grey);
    transform: translateX(20px); /* Efecto de desplazamiento al hover */
}

.footer-bottom {
    margin-top: 100px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 40px;
    border-top: 1px solid #222;
    font-size: 12px;
    color: var(--grey);
}

/* Ajuste Mobile */
@media (max-width: 768px) {
    .big-link {
        font-size: 2.2rem;
        letter-spacing: -1px;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}