:root {
    /* Paleta de Colores Tecnológicos */
    --bg-deep: #05050a;
    --bg-surface: rgba(15, 23, 42, 0.6);
    --bg-surface-hover: rgba(30, 41, 59, 0.8);
    
    --neon-cyan: #00f0ff;
    --neon-cyan-dim: rgba(0, 240, 255, 0.15);
    
    --neon-violet: #8a2be2;
    --neon-violet-dim: rgba(138, 43, 226, 0.15);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-code: #38bdf8;
    
    --border-color: rgba(148, 163, 184, 0.1);
    --border-glow: rgba(0, 240, 255, 0.3);

    /* Tipografía */
    --font-main: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-code: 'Fira Code', monospace;
    
    /* Transiciones */
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* === RESET Y BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Seleccion de texto */
::selection {
    background: var(--neon-cyan-dim);
    color: var(--neon-cyan);
}

/* === FONDOS TECNOLÓGICOS (TECH GRID Y GLOWS) === */
.tech-grid-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -10;
    /* Efecto de desvanecimiento hacia arriba y abajo */
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    pointer-events: none;
}

.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -5;
    pointer-events: none;
    opacity: 0.15;
}
.glow-cyan {
    width: 60vw; height: 60vw;
    background: var(--neon-cyan);
    top: -20%; left: -20%;
    animation: slow-drift 30s ease-in-out infinite alternate;
}
.glow-violet {
    width: 50vw; height: 50vw;
    background: var(--neon-violet);
    bottom: -10%; right: -20%;
    animation: slow-drift 25s ease-in-out infinite alternate-reverse;
}

@keyframes slow-drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(10%, 10%); }
}

/* === NAVEGACIÓN STICKY === */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    padding: 20px 0;
    background: rgba(5, 5, 10, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-logo {
    font-family: var(--font-code);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--neon-cyan);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.nav-links {
    display: flex;
    gap: 30px;
}
.nav-link {
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}
.nav-link:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan-dim);
}
.nav-btn-primary {
    background: var(--neon-violet-dim);
    color: #fff;
    border: 1px solid var(--neon-violet);
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-btn-primary:hover {
    background: var(--neon-violet);
    box-shadow: 0 0 20px var(--neon-violet-dim);
    transform: translateY(-2px);
}

/* === MAIN LAYOUT === */
.main-content {
    max-width: 1000px;
    margin: 120px auto 0;
    padding: 0 40px;
}
/* Reusable Section Headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
}
.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}
.section-header .num {
    font-family: var(--font-code);
    color: var(--neon-cyan);
    font-weight: 400;
    font-size: 1.5rem;
    margin-right: 10px;
}
.section-header .line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-color), transparent);
}

/* === HERO SECTION === */
.hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 80px;
}
.hero-content {
    flex: 1;
}
.code-comment {
    font-family: var(--font-code);
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 15px;
}
.glitch {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.1;
    letter-spacing: -0.05em;
    position: relative;
    text-shadow: 0 0 10px rgba(0,240,255,0.2);
}
.typing-container {
    font-family: var(--font-code);
    font-size: 1rem;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--neon-violet);
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    line-height: 1.5;
}
.keyword { color: #f43f5e; }
.variable { color: #38bdf8; }
.string { color: #a3e635; }
.pulse-text { 
    animation: flash 2s infinite; 
}
@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; text-shadow: 0 0 10px #a3e635; }
}
.hero-bio {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 35px;
    max-width: 550px;
}
.hero-cta {
    display: flex;
    gap: 20px;
}
.btn {
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}
.btn-primary {
    background: var(--neon-cyan);
    color: var(--bg-deep);
    border: 1px solid var(--neon-cyan);
    box-shadow: 0 0 15px var(--neon-cyan-dim);
}
.btn-primary:hover {
    box-shadow: 0 0 30px rgba(0,240,255,0.4);
    transform: translateY(-3px);
}
.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    border-color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.hero-visual {
    position: relative;
}
.hexagon-container {
    width: 320px; height: 320px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hex-border {
    position: absolute;
    inset: 0;
    border: 2px solid var(--neon-cyan);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 8s ease-in-out infinite;
    z-index: 0;
    box-shadow: inset 0 0 20px var(--neon-cyan-dim), 0 0 20px var(--neon-cyan-dim);
}
@keyframes morph {
    0%   { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50%  { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}
.hero-avatar {
    width: 280px; height: 280px;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    position: relative;
    z-index: 1;
    animation: morph 8s ease-in-out infinite reverse;
    border: 4px solid var(--bg-deep);
}

/* === ABOUT SECTION === */
.about-section {
    padding: 100px 0;
}
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 40px;
}

/* Terminal Window */
.terminal-window {
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.terminal-header {
    background: rgba(255,255,255,0.05);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}
.btn-close, .btn-min, .btn-max {
    width: 12px; height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}
.btn-close { background: #ef4444; }
.btn-min { background: #f59e0b; }
.btn-max { background: #10b981; }
.terminal-title {
    margin-left: 20px;
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.terminal-body {
    padding: 25px;
    font-family: var(--font-code);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
}
.prompt { color: var(--neon-cyan); margin-right: 8px; }
.output { color: var(--text-secondary); margin: 15px 0 20px; }
.cursor-blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Stats */
.about-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 16px;
    transition: var(--transition);
}
.stat-card:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-glow);
    transform: translateX(10px);
}
.stat-card i {
    font-size: 2rem;
    color: var(--neon-violet);
    margin-bottom: 15px;
}
.stat-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #fff;
}
.stat-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* === PROJECTS SECTION === */
.projects-section {
    padding: 100px 0;
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}
.project-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    position: relative;
    transition: var(--transition);
    overflow: hidden;
}
.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-violet));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}
.project-card:hover {
    transform: translateY(-8px);
    background: var(--bg-surface-hover);
    border-color: rgba(0, 240, 255, 0.2);
    box-shadow: 0 15px 30px rgba(0,0,0,0.6), 0 0 40px var(--neon-cyan-dim);
}
.project-card:hover::before {
    transform: scaleX(1);
}

.project-icon {
    font-size: 2.5rem;
    color: var(--neon-cyan);
    margin-bottom: 20px;
}
.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}
.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.6;
}
.project-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin-bottom: 30px;
}
.project-tech-list li {
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: var(--text-code);
}
.project-links {
    display: flex;
    gap: 15px;
}
.project-links a {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: var(--transition);
}
.project-links a:hover {
    color: var(--neon-cyan);
    transform: scale(1.1);
}

.btn-center {
    text-align: center;
}
.btn-outline {
    background: transparent;
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}
.btn-outline:hover {
    background: var(--neon-cyan-dim);
    box-shadow: 0 0 20px var(--neon-cyan-dim);
}


/* === SKILLS SECTION === */
.skills-section {
    padding: 100px 0;
}
.wrapper-glass {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 40px;
}
.skill-category {
    margin-bottom: 35px;
}
.skill-category:last-child {
    margin-bottom: 0;
}
.category-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.category-title i {
    color: var(--neon-violet);
}
.tags-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.tech-tag {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 8px;
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}
.tech-tag:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    background: var(--neon-cyan-dim);
    transform: translateY(-2px);
}

/* === LINKS HUB SECTION === */
.links-section {
    padding: 100px 0;
}
.hub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}
.hub-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.hub-card:hover {
    background: var(--bg-surface-hover);
    border-color: rgba(255,255,255,0.2);
    transform: scale(1.02);
}
.hub-card.accent:hover {
    border-color: var(--neon-violet);
    box-shadow: 0 0 30px var(--neon-violet-dim);
}
.hub-icon {
    width: 60px; height: 60px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    color: var(--text-primary);
    transition: var(--transition);
}
.hub-card:hover .hub-icon {
    background: var(--neon-cyan);
    color: var(--bg-deep);
}
.hub-card.accent:hover .hub-icon {
    background: var(--neon-violet);
}
.hub-text h3 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 5px;
}
.hub-text p {
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.hub-arrow {
    margin-left: auto;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: var(--transition);
}
.hub-card:hover .hub-arrow {
    color: var(--neon-cyan);
    transform: translateX(5px);
}
.hub-card.accent:hover .hub-arrow {
    color: var(--neon-violet);
}

/* === FOOTER === */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 80px 40px 40px;
    margin-top: 80px;
    background: rgba(0,0,0,0.5);
    text-align: center;
}
.footer-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #fff;
}
.footer-text {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
}
.contact-box {
    margin-bottom: 40px;
}
.email-link {
    font-family: var(--font-code);
    font-size: 1.5rem;
    color: var(--neon-cyan);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px dashed rgba(0, 240, 255, 0.3);
    padding-bottom: 5px;
    transition: var(--transition);
}
.email-link:hover {
    border-bottom-color: var(--neon-cyan);
    text-shadow: 0 0 15px var(--neon-cyan-dim);
}
.footer-socials {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}
.footer-socials a {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-primary);
    font-size: 1.3rem;
    text-decoration: none;
    transition: var(--transition);
}
.footer-socials a:hover {
    background: var(--neon-violet);
    color: #fff;
    border-color: var(--neon-violet);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--neon-violet-dim);
}
.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}
.copyright span {
    font-family: var(--font-code);
    font-size: 0.8rem;
    opacity: 0.7;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .nav-links { display: none; }
    
    .hero-section {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 60px;
    }
    .hero-cta { justify-content: center; }
    .typing-container { text-align: left; }
    
    .about-grid { grid-template-columns: 1fr; }
    
    .projects-grid { grid-template-columns: 1fr; }
    .hub-grid { grid-template-columns: 1fr; }
    
    .glitch { font-size: 3rem; }
}

@media (max-width: 600px) {
    .main-content { padding: 0 20px; }
    .section-header h2 { font-size: 1.5rem; }
    .hero-cta { flex-direction: column; }
    .glitch { font-size: 2.5rem; }
    .email-link { font-size: 1.2rem; }
}
