/* assets/css/main.css — ESTILO VILLO (ANCHO 1300PX RESPONSIVO) */
:root {
    --bg-color: #0d0e10;
    --card-bg: #141619;
    --accent-neon: #ccff00; /* Amarillo Neón identitario de Villo */
    --text-color: #ffffff;
    --text-muted: #8e95a0;
    --border-line: #22262c;
    --font-title: 'Syne', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
}

[data-theme="light"] {
    --bg-color: #f4f4f0;
    --card-bg: #ffffff;
    --accent-neon: #aacc00;
    --text-color: #0d0e10;
    --text-muted: #555d68;
    --border-line: #e0e0d8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}

/* Contenedor central amplio (1300px max) */
.villo-wrapper {
    width: 100%;
    max-width: 1300px;
    padding: 2rem 1.5rem;
}

/* Navigation Header con Centrado Perfecto del Logo */
.villo-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* 3 columnas: izquierda, centro (logo) y derecha */
    align-items: center;
    padding: 1rem 0 2rem;
    position: relative;
    width: 100%;
}

.nav-icon {
    justify-self: start; /* Alinea el menú a la izquierda */
    display: flex;
    align-items: center;
}

.nav-toggle {
    justify-self: end; /* Alinea el switch de tema a la derecha */
    display: flex;
    align-items: center;
}

/* Container del Logo "Luis" + Monograma */
.nav-logo-wrapper {
    justify-self: center; /* Centra perfectamente el logo en la columna central */
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    height: 96px; /* Tamaño del logo */
    max-width: 100%;
}

.nav-logo-luis-monogram {
    height: 100%;
    width: auto;
    overflow: visible;
    color: var(--accent-neon); /* Amarillo Neón de Villo (#ccff00) */
}

/* Ajustes Responsivos para Pantallas Pequeñas / Móviles */
@media (max-width: 600px) {
    .villo-nav {
        padding: 0.5rem 0 1.5rem;
    }

    .nav-logo-wrapper {
        height: 64px; /* Ajuste suave proporcional en teléfonos para evitar desbordes */
    }
}

/* Animación secuencial de los trazos */
.sig-part-luis {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLuisText 3.2s cubic-bezier(0.42, 0, 0.25, 1) infinite alternate;
}

.sig-luis-dot {
    animation: dotLuisPulse 3.2s ease-in-out infinite alternate;
}

.sig-part-symbol {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: drawSymbol 3.2s cubic-bezier(0.42, 0, 0.25, 1) infinite alternate;
}

/* Keyframes de dibujado sin efecto neón / resplandor */
@keyframes drawLuisText {
    0% {
        stroke-dashoffset: 1000;
        opacity: 0.15;
    }
    30% {
        opacity: 0.6;
    }
    80%, 100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

@keyframes dotLuisPulse {
    0%, 30% {
        opacity: 0;
        transform: scale(0);
    }
    75%, 100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes drawSymbol {
    0%, 25% {
        stroke-dashoffset: 1200;
        opacity: 0;
    }
    85%, 100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

/* Switch Theme Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #333; transition: .4s; border-radius: 34px;
}
.slider:before {
    position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
    background-color: white; transition: .4s; border-radius: 50%;
}
input:checked + .slider { background-color: var(--accent-neon); }
input:checked + .slider:before { transform: translateX(20px); background-color: #000; }

/* Hero Section */
/* Hero Section */
.villo-hero {
    text-align: center;
    padding: 3rem 0 4rem;
}

.hero-top-text {
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-title-wrapper {
    position: relative;
    display: inline-block;
}

/* Tamaño de título reducido y estilizado */
.hero-giant-title {
    font-family: var(--font-title);
    font-size: clamp(2.8rem, 6.5vw, 5.5rem);
    line-height: 0.95;
    font-weight: 800;
    color: var(--accent-neon);
    text-transform: uppercase;
    letter-spacing: -0.03em;
}

.hero-sparkle {
    color: var(--accent-neon);
    font-size: 1.8rem;
    margin: 1.5rem 0 1rem;
}

.hero-bio {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.scroll-indicator {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--accent-neon);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.scroll-indicator .line {
    width: 1px;
    height: 30px;
    background-color: var(--accent-neon);
}

/* Villo Sections Standard */
.villo-section {
    padding: 5rem 0;
    border-top: 1px solid var(--border-line);
}

.section-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-neon);
    letter-spacing: 0.2em;
    margin-bottom: 2.5rem;
}

/* About & Skill Cards (2 Columnas en escritorio) */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: start;
}

.about-text-col p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.about-skills-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-card-villo {
    background-color: var(--accent-neon);
    color: #000;
    padding: 1.2rem 1.5rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-info h4 {
    font-size: 1.05rem;
    font-weight: 700;
}

.skill-info p {
    font-size: 0.85rem;
    opacity: 0.85;
}

.skill-percent {
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-weight: 800;
}

/* Projects Villo Grid (3 Columnas en escritorio) */
.villo-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.villo-project-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-img-wrapper {
    width: 100%;
    aspect-ratio: 4/3;
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid var(--border-line);
}

.project-img-wrapper svg {
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease;
}

.villo-project-card:hover .project-img-wrapper svg {
    transform: scale(1.05);
}

.project-villo-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.project-villo-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Marquee Infinito */
.marquee-wrapper {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    background-color: var(--accent-neon);
    color: #000;
    padding: 1.5rem 0;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.marquee-track {
    display: flex;
    white-space: nowrap;
    will-change: transform;
    animation: marquee 18s linear infinite;
    font-family: var(--font-title);
    font-weight: 800;
    font-size: 2.8rem;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Experience & Education Grids */
.exp-grid, .edu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3.5rem;
}

.exp-item h4, .edu-item h4 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.exp-meta, .edu-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.6rem; }
.exp-item p, .edu-item p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }

/* Layout del contenedor de métricas */
.villo-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 30px;
}

/* Tarjeta individual (hereda la identidad de .skill-card-villo) */
.metric-card-villo {
    background-color: #141619;
    border: 1px solid #22262c;
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.metric-card-villo:hover {
    border-color: #ccff00;
    transform: translateY(-2px);
}

/* Información textual */
.metric-info h4 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.metric-info p {
    color: #8e95a0;
    font-size: 13px;
    margin: 0;
    line-height: 1.4;
}

/* Número destacado estilo Porcentaje */
.metric-num {
    font-size: 32px;
    font-weight: 800;
    color: #ccff00;
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1;
    margin-left: 16px;
    flex-shrink: 0;
}

/* Contact & Form (2 Columnas en escritorio) */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 { font-size: 1.6rem; margin-bottom: 1rem; }
.contact-info p { font-size: 1rem; color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.6; }
.contact-detail { font-size: 0.9rem !important; margin-bottom: 0.5rem !important; }

.villo-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.villo-form input, .villo-form textarea {
    background-color: var(--card-bg);
    border: 1px solid var(--border-line);
    color: var(--text-color);
    padding: 1rem;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.villo-form input:focus, .villo-form textarea:focus {
    outline: none;
    border-color: var(--accent-neon);
}

.btn-neon {
    background-color: var(--accent-neon);
    color: #000;
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: opacity 0.3s ease;
}

.btn-neon:hover {
    opacity: 0.9;
}

/* Footer Marquee Links */
.villo-footer-marquee {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    background-color: var(--accent-neon);
    padding: 1.5rem 0;
    margin-top: 4rem;
}

.marquee-track-footer {
    display: flex;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
}

.marquee-track-footer a {
    color: #000;
    text-decoration: none;
    font-family: var(--font-title);
    font-weight: 800;
    font-size: 3.5rem;
    margin-right: 2rem;
    transition: opacity 0.2s;
}

.marquee-track-footer a:hover {
    opacity: 0.75;
}

/* Adaptabilidad Responsiva (Breakpoints) */
@media (max-width: 1024px) {
    .villo-projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .exp-grid, .edu-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .villo-metrics {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 600px) {
    .villo-wrapper {
        padding: 1.5rem 1rem;
    }
    .villo-projects-grid {
        grid-template-columns: 1fr;
    }
    .hero-giant-title {
        font-size: 2rem;
    }
    .marquee-track {
        font-size: 2rem;
    }
    .marquee-track-footer a {
        font-size: 2.2rem;
    }
}

/* ==========================================================================
   SIDEBAR & OVERLAY STYLES
   ========================================================================== */

/* Habilitar cursor pointer en icono de menú */
.nav-icon {
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.nav-icon:hover {
    opacity: 0.75;
}

/* Overlay Oscuro */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Contenedor */
.villo-sidebar {
    position: fixed;
    top: 0;
    left: -320px; /* Oculto fuera de la pantalla */
    width: 300px;
    height: 100vh;
    background-color: var(--card-bg);
    border-right: 1px solid var(--border-line);
    z-index: 999;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
}

.villo-sidebar.active {
    transform: translateX(320px); /* Desplazamiento desde la izquierda */
}

/* Header del Sidebar */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-line);
}

.sidebar-title {
    font-family: var(--font-title);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: var(--accent-neon);
}

.sidebar-close-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.sidebar-close-btn:hover {
    color: var(--accent-neon);
}

/* Navegación dentro del Sidebar */
.sidebar-nav {
    margin-top: 2.5rem;
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.sidebar-link {
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-title);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.sidebar-link .nav-num {
    font-size: 0.8rem;
    color: var(--accent-neon);
    font-family: var(--font-body);
}

.sidebar-link:hover {
    color: var(--accent-neon);
    transform: translateX(6px);
}

/* Evitar scroll del cuerpo cuando el sidebar está abierto */
body.sidebar-open {
    overflow: hidden;
}

/* Agrupador para la columna derecha de experiencias */
.exp-col-right {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Asegura alineación uniforme superior */
.exp-grid {
    align-items: start;
}

/* Ajustes para las listas de experiencia y enlaces */
.exp-item strong {
    color: var(--text-color);
}

.exp-item p {
    margin-bottom: 0.6rem;
}

.exp-list {
    list-style: none;
    padding-left: 0;
    margin: 0.4rem 0 1.2rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.exp-list li {
    font-size: 0.85rem;
    color: var(--text-muted);
    background-color: var(--card-bg);
    border: 1px solid var(--border-line);
    padding: 3px 10px;
    border-radius: 6px;
}

.exp-list li a {
    color: var(--accent-neon);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.exp-list li a:hover {
    text-decoration: underline;
    opacity: 0.85;
}

.mb-exp {
    margin-bottom: 2.5rem;
}

.exp-column-right {
    display: flex;
    flex-direction: column;
}