:root {
    /* Paleta Cyberpunk */
    --cp-yellow: #fced46; /* Cyberpunk Yellow */
    --cp-blue: #00f0ff; /* Neon Blue */
    --cp-red: #ff003c;  /* Neon Red/Pink */
    --cp-dark: #050505; /* Black */
    --cp-gray: #111111;
    --cp-text: #e0e0e0;
    
    /* Tipografías */
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
    
    --transition: all 0.25s ease-out;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--cp-dark);
}

body {
    background-color: var(--cp-dark);
    color: var(--cp-text);
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* Patrón de cuadrícula de fondo */
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Efecto de TV CTR (Scanlines) */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.15) 50%, rgba(0,0,0,0.15));
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.8;
}

/* Tipografía Básica */
h1, h2, h3 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    color: var(--cp-text);
}

/* Efecto Glitch para Texto */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--cp-dark);
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--cp-red);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--cp-blue);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(20px, 9999px, 91px, 0); }
    5% { clip: rect(62px, 9999px, 12px, 0); }
    10% { clip: rect(100px, 9999px, 83px, 0); }
    15% { clip: rect(4px, 9999px, 10px, 0); }
    20% { clip: rect(72px, 9999px, 35px, 0); }
    25% { clip: rect(100px, 9999px, 53px, 0); }
    30% { clip: rect(25px, 9999px, 20px, 0); }
    35% { clip: rect(49px, 9999px, 60px, 0); }
    40% { clip: rect(12px, 9999px, 73px, 0); }
    45% { clip: rect(85px, 9999px, 2px, 0); }
    50% { clip: rect(51px, 9999px, 93px, 0); }
    55% { clip: rect(31px, 9999px, 12px, 0); }
    60% { clip: rect(74px, 9999px, 50px, 0); }
    65% { clip: rect(6px, 9999px, 85px, 0); }
    70% { clip: rect(43px, 9999px, 23px, 0); }
    75% { clip: rect(98px, 9999px, 18px, 0); }
    80% { clip: rect(15px, 9999px, 72px, 0); }
    85% { clip: rect(55px, 9999px, 49px, 0); }
    90% { clip: rect(100px, 9999px, 30px, 0); }
    95% { clip: rect(33px, 9999px, 55px, 0); }
    100% { clip: rect(66px, 9999px, 70px, 0); }
}

/* Barra de Navegación */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.95);
    border-bottom: 2px solid var(--cp-blue);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cp-yellow);
    text-decoration: none;
    letter-spacing: 1px;
}

.logo span {
    color: var(--cp-text);
}

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

.nav-links a {
    white-space: nowrap;
    font-family: var(--font-mono);
    color: var(--cp-blue);
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--cp-yellow);
    text-shadow: 0 0 8px var(--cp-yellow);
}

/* Botones Cyberpunk con Clip-Path */
.btn-cyberpunk {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--cp-dark);
    background-color: var(--cp-yellow);
    text-decoration: none;
    text-transform: uppercase;
    position: relative;
    border: none;
    cursor: pointer;
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-cyberpunk:hover {
    background-color: var(--cp-blue);
    transform: translate(-2px, -2px);
}

.btn-small {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
}

/* Decoración pseudo-elemento del botón */
.btn-cyberpunk::after {
    content: 'R26';
    position: absolute;
    bottom: -15px;
    right: 0;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--cp-yellow);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    font-family: var(--font-mono);
    color: var(--cp-yellow);
    background: transparent;
    border: 2px solid var(--cp-yellow);
    text-decoration: none;
    clip-path: polygon(20% 0, 100% 0, 100% 80%, 80% 100%, 0 100%, 0 20%);
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--cp-yellow);
    color: var(--cp-dark);
}

/* Layout Principal */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 8rem 0;
    position: relative;
}

/* Sección Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
    position: relative;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 10;
}

.terminal-badge {
    font-family: var(--font-mono);
    color: var(--cp-blue);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.hero-title {
    font-size: clamp(4rem, 8vw, 6.5rem);
    color: var(--cp-yellow);
    margin-bottom: 0;
    line-height: 1;
}

.hero-subtitle {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--cp-blue);
    margin-bottom: 2rem;
    text-shadow: 2px 2px 0px var(--cp-red);
}

.hero-desc {
    font-size: 1.25rem;
    color: #a0a0a0;
    margin-bottom: 3rem;
    max-width: 600px;
    border-left: 4px solid var(--cp-red);
    padding-left: 1.5rem;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.blinking-cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Sección Habilidades */
.section-header {
    margin-bottom: 4rem;
    border-bottom: 1px solid var(--cp-gray);
    padding-bottom: 1rem;
}

.section-header h2 {
    font-size: 3rem;
    color: var(--cp-yellow);
}

.section-header p {
    font-family: var(--font-mono);
    color: var(--cp-blue);
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--cp-gray);
    padding: 2.5rem;
    position: relative;
    border: 1px solid #222;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 25px), calc(100% - 25px) 100%, 0 100%);
    transition: var(--transition);
}

.skill-card:hover {
    border-color: var(--cp-blue);
    background: #151515;
    box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.1);
}

.card-deco-top {
    position: absolute;
    top: 0; left: 0; width: 40px; height: 3px;
    background: var(--cp-red);
}

.card-deco-bottom {
    position: absolute;
    bottom: 0; right: 0; width: 40px; height: 3px;
    background: var(--cp-blue);
}

.skill-icon {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    color: var(--cp-yellow);
    margin-bottom: 1.5rem;
}

.skill-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--cp-text);
}

.skill-card p {
    color: #999;
    font-size: 1.05rem;
}

/* Sección Proyectos */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.project-card {
    background: var(--cp-gray);
    position: relative;
    border: 1px solid #333;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 35px), calc(100% - 35px) 100%, 0 100%);
    transition: var(--transition);
}

.project-card:hover {
    border-color: var(--cp-yellow);
    transform: translateY(-5px);
}

.project-img {
    width: 100%;
    height: 250px;
    position: relative;
    overflow: hidden;
}

/* Placeholder Patterns */
.bg-cyberpunk {
    background: repeating-linear-gradient(45deg, #111, #111 10px, #1a1a1a 10px, #1a1a1a 20px);
}

.bg-cyberpunk-alt {
    background: repeating-linear-gradient(-45deg, #0a192f, #0a192f 10px, #112240 10px, #112240 20px);
}

.overlay-scan {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 240, 255, 0.1);
    border-bottom: 2px solid var(--cp-blue);
}

.project-info {
    padding: 2rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
    background: #222;
    color: var(--cp-yellow);
    border: 1px solid var(--cp-yellow);
}

.project-info h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--cp-blue);
}

.project-info p {
    color: #bbb;
    margin-bottom: 2rem;
}

.project-link {
    font-family: var(--font-mono);
    color: var(--cp-red);
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--cp-yellow);
    text-shadow: 0 0 8px var(--cp-yellow);
}

/* Sección Contacto */
.contact-card {
    background: var(--cp-gray);
    border: 2px solid var(--cp-red);
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    clip-path: polygon(30px 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%, 0 30px);
}

.contact-card h2 {
    font-size: 2.5rem;
    color: var(--cp-blue);
    margin-bottom: 1.5rem;
}

.contact-card p {
    font-family: var(--font-mono);
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.deco-lines {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 150px;
    height: 10px;
    background: repeating-linear-gradient(90deg, var(--cp-red), var(--cp-red) 2px, transparent 2px, transparent 10px);
}

/* Footer */
footer {
    background: #000;
    border-top: 2px solid var(--cp-yellow);
    padding: 2.5rem;
    text-align: center;
    font-family: var(--font-mono);
    color: #666;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Timeline de Experiencia */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background: var(--cp-blue);
    box-shadow: 0 0 10px var(--cp-blue);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: 12px;
    top: 0;
    width: 18px;
    height: 18px;
    background: var(--cp-yellow);
    border: 2px solid var(--cp-dark);
    box-shadow: 0 0 10px var(--cp-yellow);
    transform: rotate(45deg);
}

.timeline-content {
    background: var(--cp-gray);
    padding: 2rem;
    border: 1px solid #333;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 25px), calc(100% - 25px) 100%, 0 100%);
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: var(--cp-red);
}

.timeline-date {
    display: inline-block;
    font-family: var(--font-mono);
    color: var(--cp-blue);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--cp-blue);
}

.timeline-content h3 {
    color: var(--cp-yellow);
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}

.timeline-content h4 {
    color: var(--cp-text);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
}

.timeline-content p {
    color: #bbb;
    font-size: 1rem;
}

/* Animaciones y utilidades (Scroll Reveal) */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsivo */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Ideal para añadir menú lateral después */
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 5rem 0;
    }
    
    .projects-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-tags {
        flex-wrap: wrap;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Sección Odoo Suite */
.odoo-intro {
    max-width: 780px;
    color: #bbb;
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
}

.odoo-intro strong {
    color: var(--cp-yellow);
}

.odoo-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
}

.odoo-stat {
    background: var(--cp-gray);
    border-left: 3px solid var(--cp-blue);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
}

.odoo-stat-num {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--cp-yellow);
    line-height: 1.1;
}

.odoo-stat-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.25rem;
}

.odoo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    gap: 2rem;
}

.odoo-card {
    background: var(--cp-gray);
    border: 1px solid #333;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 35px), calc(100% - 35px) 100%, 0 100%);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.odoo-card:hover {
    border-color: var(--cp-yellow);
    transform: translateY(-5px);
}

.odoo-visual {
    margin: 0;
    padding: 1.5rem;
    min-height: 150px;
    background: repeating-linear-gradient(0deg, #0a0f14, #0a0f14 2px, #0c131a 2px, #0c131a 4px);
    border-bottom: 2px solid var(--cp-blue);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--cp-blue);
    white-space: pre;
    overflow-x: auto;
}

.odoo-visual b {
    color: #39ff88;
    font-weight: normal;
}

.odoo-visual i {
    color: var(--cp-red);
    font-style: normal;
}

.odoo-card .project-tags {
    flex-wrap: wrap;
}

.odoo-card .project-info p {
    margin-bottom: 1rem;
}

.odoo-card .project-info .odoo-stack {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 0;
}

.odoo-cta {
    margin-top: 2.5rem;
    font-family: var(--font-mono);
    color: #888;
}

@media (max-width: 768px) {
    .section-header h2,
    .contact-card h2 {
        font-size: clamp(1.4rem, 7vw, 2.2rem);
        overflow-wrap: anywhere;
    }

    .hero .hero-subtitle {
        font-size: 6vw;
    }

    .section-header p,
    .terminal-badge,
    .contact-card .btn-cyberpunk {
        overflow-wrap: anywhere;
        letter-spacing: 0;
    }

    .contact-card {
        padding: 3rem 1.25rem;
    }

    .contact-card .btn-cyberpunk {
        max-width: 100%;
        white-space: normal;
    }

    .project-info h3 {
        font-size: 1.4rem;
    }

    .odoo-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .odoo-visual {
        font-size: 0.72rem;
        padding: 1rem;
    }
}

.odoo-card .project-link {
    margin-top: 1rem;
}
