/* ===== VARIABLES ===== */
:root {
    --black: #000000;
    --white: #ffffff;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-slower: 0.8s ease;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--black);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== EARTH 3D CANVAS ===== */
.earth-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* ===== LOADER ===== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--black);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-circle {
    width: 60px;
    height: 60px;
    border: 3px solid var(--gray-800);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loader-text {
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 2px 20px rgba(255, 255, 255, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 24px;
    font-weight: 700;
    transition: var(--transition-normal);
}

.logo-bracket {
    color: var(--gray-400);
    transition: var(--transition-normal);
}

.nav-logo:hover .logo-bracket {
    color: var(--white);
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: 5px 0;
    transition: var(--transition-normal);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--white);
    transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--gray-300);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--white);
    transition: var(--transition-normal);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: none; /* Desactivado - ahora usamos Earth3D */
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--white);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 15s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 20px;
}

.hero-image-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 40px;
}

.hero-image-border {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid var(--white);
    border-radius: 50%;
    animation: rotate-border 10s linear infinite;
}

@keyframes rotate-border {
    0% {
        transform: rotate(0deg);
        border-color: var(--white);
    }
    50% {
        border-color: var(--gray-500);
    }
    100% {
        transform: rotate(360deg);
        border-color: var(--white);
    }
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    filter: grayscale(100%);
    transition: var(--transition-slow);
}

.hero-image-container:hover .hero-image {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.hero-title {
    margin-bottom: 20px;
}

.greeting {
    display: block;
    font-size: 18px;
    font-weight: 300;
    color: var(--gray-400);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 10px;
    opacity: 0;
    animation: slideUp 0.8s ease forwards 0.5s;
}

.name {
    display: block;
    font-size: clamp(48px, 10vw, 80px);
    font-weight: 700;
    letter-spacing: -2px;
    opacity: 0;
    animation: slideUp 0.8s ease forwards 0.7s;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--gray-400);
    margin-bottom: 40px;
    min-height: 30px;
    opacity: 0;
    animation: slideUp 0.8s ease forwards 0.9s;
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: slideUp 0.8s ease forwards 1.1s;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--white);
    color: var(--black);
}

.btn-primary:hover {
    background: var(--gray-200);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--black);
    transform: translateY(-3px);
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    animation: slideUp 0.8s ease forwards 1.3s;
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--gray-500);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--white);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(15px);
    }
}

.scroll-indicator span {
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gray-500);
}

/* ===== SECTIONS ===== */
.section {
    padding: 120px 0;
    position: relative;
    z-index: 1;
    background: var(--black);
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    margin-bottom: 60px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.title-number {
    font-size: 18px;
    font-weight: 400;
    color: var(--gray-500);
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--gray-700), transparent);
    max-width: 300px;
}

/* ===== ABOUT SECTION ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-description {
    font-size: 16px;
    color: var(--gray-400);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-description strong {
    color: var(--white);
}

.about-highlight {
    display: flex;
    gap: 20px;
    background: var(--gray-900);
    padding: 25px;
    border-left: 3px solid var(--white);
    margin-top: 30px;
    transition: var(--transition-normal);
}

.about-highlight:hover {
    background: var(--gray-800);
    transform: translateX(10px);
}

.highlight-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.highlight-icon svg {
    width: 100%;
    height: 100%;
}

.highlight-text h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.highlight-text p {
    font-size: 14px;
    color: var(--gray-400);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    background: var(--gray-900);
    padding: 30px;
    text-align: center;
    border: 1px solid var(--gray-800);
    transition: var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--white);
    transform: translateY(-10px);
}

.stat-number {
    display: block;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gray-500);
}

/* ===== SKILLS SECTION ===== */
.skills {
    background: var(--gray-900);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.skill-card {
    background: var(--black);
    padding: 40px 30px;
    text-align: center;
    border: 1px solid var(--gray-800);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--white);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--gray-600);
}

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: var(--white);
}

.skill-icon svg {
    width: 100%;
    height: 100%;
}

.skill-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    transition: color var(--transition-normal);
}

.skill-desc {
    font-size: 14px;
    color: var(--gray-500);
    transition: color var(--transition-normal);
}

.skill-card:hover .skill-desc {
    color: var(--gray-400);
}

/* Colores de nombres al hover */
.skill-card[data-skill="html"]:hover .skill-name-html {
    color: #E34F26;
}

.skill-card[data-skill="css"]:hover .skill-name-css {
    color: #1572B6;
}

.skill-card[data-skill="js"]:hover .skill-name-js {
    color: #F7DF1E;
}

.skill-card[data-skill="sql"]:hover .skill-name-sql {
    color: #F29111;
}

.skill-card[data-skill="lua"]:hover .skill-name-lua {
    color: #000080;
}

.skill-card[data-skill="lua"]:hover {
    border-color: #000080;
}

.skill-card[data-skill="lua"]:hover::before {
    background: #000080;
}

/* Tags colores adicionales */
.tag-node {
    background: rgba(104, 159, 56, 0.2);
    color: #8CC84B;
}

.tag-postgres {
    background: rgba(51, 103, 145, 0.2);
    color: #336791;
}

.tag-lua {
    background: rgba(0, 0, 128, 0.2);
    color: #7B8CDE;
}

/* Tools Section */
.tools-section {
    text-align: center;
}

.tools-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 30px;
    color: var(--gray-400);
}

.tools-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    transition: var(--transition-normal);
    background: var(--black);
    border: 1px solid var(--gray-800);
    border-radius: 10px;
}

.tool-item:hover {
    transform: translateY(-5px);
    border-color: var(--gray-600);
}

.tool-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.tool-icon svg {
    width: 100%;
    height: 100%;
}

.tool-item:hover .tool-vscode svg { filter: drop-shadow(0 0 10px #007ACC); }
.tool-item:hover .tool-git svg { filter: drop-shadow(0 0 10px #F34F29); }
.tool-item:hover .tool-github svg { filter: drop-shadow(0 0 10px #fff); }
.tool-item:hover .tool-claude svg { filter: drop-shadow(0 0 10px #D97757); }
.tool-item:hover .tool-copilot svg { filter: drop-shadow(0 0 10px #8C48FF); }
.tool-item:hover .tool-gemini svg { filter: drop-shadow(0 0 10px #4285F4); }

.tool-name {
    font-size: 14px;
    color: var(--gray-400);
}

/* ===== PROJECTS SECTION - CAROUSEL ===== */
.projects-carousel {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.projects-slider {
    display: flex;
    overflow: hidden;
    width: 100%;
    scroll-behavior: smooth;
}

.project-card {
    min-width: 100%;
    background: var(--gray-900);
    border: 1px solid var(--gray-800);
    overflow: hidden;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: row;
    opacity: 0;
    transform: translateX(100px);
    position: absolute;
    visibility: hidden;
}

.project-card.active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
    visibility: visible;
}

.carousel-btn {
    width: 50px;
    height: 50px;
    border: 1px solid var(--gray-600);
    background: var(--black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    flex-shrink: 0;
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--white);
    border-color: var(--white);
}

.carousel-btn:hover svg {
    stroke: var(--black);
}

.carousel-btn svg {
    width: 24px;
    height: 24px;
    stroke: var(--white);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.carousel-dot.active {
    background: var(--white);
    transform: scale(1.2);
}

.carousel-dot:hover {
    background: var(--gray-500);
}

.project-card:hover {
    border-color: var(--gray-600);
}

.project-image {
    width: 40%;
    min-height: 280px;
    background: linear-gradient(135deg, var(--gray-800), var(--gray-900));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.project-card.active:hover .project-overlay {
    opacity: 1;
}

.project-link {
    width: 50px;
    height: 50px;
    border: 1px solid var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    transform: scale(0);
}

.project-card.active:hover .project-link {
    transform: scale(1);
}

.project-link:hover {
    background: var(--white);
    color: var(--black);
}

.project-link svg {
    width: 20px;
    height: 20px;
}

.project-link:nth-child(1) {
    transition-delay: 0.1s;
}

.project-link:nth-child(2) {
    transition-delay: 0.2s;
}

.project-info {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.project-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
}

.project-description {
    font-size: 15px;
    color: var(--gray-400);
    margin-bottom: 20px;
    line-height: 1.7;
}

.project-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    padding: 5px 12px;
    background: var(--gray-800);
    font-size: 12px;
    color: var(--gray-400);
    transition: var(--transition-fast);
}

.tag:hover {
    background: var(--white);
    color: var(--black);
}

/* ===== CONTACT SECTION ===== */
.contact {
    background: var(--gray-900);
}

.contact-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-box {
    text-align: center;
    max-width: 500px;
    padding: 60px 40px;
    background: linear-gradient(145deg, var(--gray-800), var(--gray-900));
    border: 1px solid var(--gray-700);
    border-radius: 20px;
    transition: all var(--transition-normal);
}

.contact-box:hover {
    border-color: var(--gray-500);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.contact-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    background: var(--gray-700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.contact-icon svg {
    width: 40px;
    height: 40px;
    color: var(--white);
}

.contact-box:hover .contact-icon {
    background: var(--white);
}

.contact-box:hover .contact-icon svg {
    color: var(--black);
}

.contact-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--white);
}

.contact-description {
    color: var(--gray-400);
    line-height: 1.8;
    margin-bottom: 25px;
    font-size: 15px;
}

.contact-cta {
    font-size: 18px;
    color: var(--white);
    margin-bottom: 25px;
    font-weight: 500;
}

.contact-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

.contact-btn svg {
    width: 22px;
    height: 22px;
}

.whatsapp-btn {
    background: #25D366;
    color: var(--white);
}

.whatsapp-btn:hover {
    background: transparent;
    border-color: #25D366;
    color: #25D366;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

.instagram-btn {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: var(--white);
}

.instagram-btn:hover {
    background: transparent;
    border-color: #dc2743;
    color: #dc2743;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(220, 39, 67, 0.3);
}

/* ===== FOOTER ===== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--gray-800);
    position: relative;
    z-index: 1;
    background: var(--black);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-text {
    font-size: 14px;
    color: var(--gray-500);
}

.footer-text strong {
    color: var(--white);
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    border: 1px solid var(--gray-700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.social-link:hover {
    background: var(--white);
    border-color: var(--white);
    transform: translateY(-5px);
}

.social-link:hover svg {
    fill: var(--black);
}

.social-link svg {
    width: 18px;
    height: 18px;
    fill: var(--gray-400);
    transition: fill var(--transition-normal);
}

/* ===== ANIMATIONS ON SCROLL ===== */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== WORLD MAP 3D ===== */
/* Desactivado - ahora usamos Earth3D */
.world-container {
    display: none;
}

.world-map {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateWorld 30s linear infinite;
}

.world-dot {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.world-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--white), transparent);
    opacity: 0.3;
    transform-origin: left center;
}

@keyframes rotateWorld {
    0% { transform: rotateY(0deg) rotateX(10deg); }
    100% { transform: rotateY(360deg) rotateX(10deg); }
}

/* ===== FLOATING CODE ===== */
/* Desactivado - ahora usamos Earth3D */
.floating-code {
    display: none;
}

.code-snippet {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--gray-600);
    opacity: 0.4;
    white-space: nowrap;
    animation: floatCode 20s linear infinite;
    transform-style: preserve-3d;
}

@keyframes floatCode {
    0% {
        transform: translateY(100vh) translateZ(0) rotateX(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-100px) translateZ(50px) rotateX(10deg);
        opacity: 0;
    }
}

/* ===== SKILL COLORS ===== */
.skill-name-html { color: #E34F26; }
.skill-name-css { color: #1572B6; }
.skill-name-js { color: #F7DF1E; }
.skill-name-sql { color: #00758F; }

.skill-card[data-skill="html"]:hover {
    border-color: #E34F26;
}
.skill-card[data-skill="html"]:hover::before {
    background: #E34F26;
}

.skill-card[data-skill="css"]:hover {
    border-color: #1572B6;
}
.skill-card[data-skill="css"]:hover::before {
    background: #1572B6;
}

.skill-card[data-skill="js"]:hover {
    border-color: #F7DF1E;
}
.skill-card[data-skill="js"]:hover::before {
    background: #F7DF1E;
}

.skill-card[data-skill="sql"]:hover {
    border-color: #00758F;
}
.skill-card[data-skill="sql"]:hover::before {
    background: #00758F;
}

/* ===== PROJECT TAGS COLORS ===== */
.tag-html {
    background: rgba(227, 79, 38, 0.2);
    color: #E34F26;
    border: 1px solid #E34F26;
}
.tag-css {
    background: rgba(21, 114, 182, 0.2);
    color: #1572B6;
    border: 1px solid #1572B6;
}
.tag-js {
    background: rgba(247, 223, 30, 0.2);
    color: #F7DF1E;
    border: 1px solid #F7DF1E;
}
.tag-sql {
    background: rgba(0, 117, 143, 0.2);
    color: #00758F;
    border: 1px solid #00758F;
}
.tag-ai {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
    border: 1px solid #10B981;
}

/* ===== FEATURED PROJECT ===== */
.project-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 2px solid var(--gray-700);
    background: linear-gradient(135deg, var(--gray-900), var(--black));
}

.project-featured:hover {
    border-color: #10B981;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
}

.project-image-featured {
    height: 100%;
    min-height: 300px;
}

.project-image-featured .project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    z-index: 10;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.5); }
    50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.8); }
}

.project-featured .project-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
}

.project-featured .project-title {
    font-size: 28px;
    margin-bottom: 20px;
}

.project-featured .project-description {
    font-size: 16px;
    line-height: 1.8;
}

/* ===== SOCIAL COLORS ===== */
.social-linkedin:hover {
    background: #0077B5;
    border-color: #0077B5;
}

.social-whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
}

.social-instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: #bc1888;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .contact-box {
        padding: 50px 30px;
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .project-featured {
        grid-template-columns: 1fr;
    }
    
    .world-container {
        width: 400px;
        height: 400px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--gray-900);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: right var(--transition-normal);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        flex-direction: column;
    }
    
    .project-image {
        width: 100%;
        min-height: 200px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .carousel-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .hero-image-container {
        width: 150px;
        height: 150px;
    }
    
    .section {
        padding: 80px 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .world-container {
        width: 300px;
        height: 300px;
        opacity: 0.1;
    }
    
    .contact-buttons {
        flex-direction: column;
    }
    
    .contact-btn {
        width: 100%;
        justify-content: center;
    }
    
    .contact-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .tools-grid {
        gap: 20px;
    }
    
    .skill-card {
        padding: 30px 20px;
    }
}

/* ===== ASISTENTE IA ===== */
.assistant-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 9998;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.assistant-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(255, 255, 255, 0.25);
}

.assistant-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.assistant-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--white);
    animation: assistantPulse 2s ease-out infinite;
    pointer-events: none;
}

@keyframes assistantPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ===== CHAT MODAL ===== */
.chat-modal {
    position: fixed;
    bottom: 120px;
    right: 30px;
    width: 380px;
    max-height: 550px;
    background: #0a0a0a;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    overflow: hidden;
}

.chat-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.chat-header-text {
    display: flex;
    flex-direction: column;
}

.chat-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
}

.chat-status {
    font-size: 12px;
    color: #4ade80;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: statusBlink 2s ease-in-out infinite;
}

@keyframes statusBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-close {
    width: 35px;
    height: 35px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.chat-close svg {
    width: 18px;
    height: 18px;
    stroke: var(--white);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 350px;
    min-height: 300px;
    background: #0a0a0a;
}

.chat-messages::-webkit-scrollbar {
    width: 5px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.chat-message {
    display: flex;
    gap: 10px;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-message.user .message-avatar {
    display: none;
}

.message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.chat-message.bot .message-content {
    background: #1a1a1a;
    color: var(--white);
    border-bottom-left-radius: 5px;
}

.chat-message.user .message-content {
    background: linear-gradient(135deg, #404040 0%, #2a2a2a 100%);
    color: var(--white);
    border-bottom-right-radius: 5px;
}

.message-content p {
    margin: 0;
}

.message-content a {
    color: #60a5fa;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.message-content a:hover {
    color: #93c5fd;
}

.chat-input-container {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background: #0d0d0d;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    background: #1a1a1a;
    color: var(--white);
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: border-color 0.2s ease;
}

.chat-input::placeholder {
    color: var(--gray-500);
}

.chat-input:focus {
    border-color: rgba(255, 255, 255, 0.3);
}

.chat-send {
    width: 45px;
    height: 45px;
    border: none;
    background: var(--white);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chat-send svg {
    width: 20px;
    height: 20px;
    stroke: var(--black);
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 15px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--gray-500);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* Botones de redes sociales en el chat */
.social-buttons-chat {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.social-btn-chat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--btn-color);
    color: #ffffff !important;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.2s ease;
    border: none;
}

.social-btn-chat span {
    color: #ffffff !important;
    text-decoration: none !important;
}

.social-btn-chat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
    text-decoration: none !important;
    color: #ffffff !important;
}

.social-btn-chat svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.social-btn-whatsapp {
    background: #25D366;
}

.social-btn-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-btn-linkedin {
    background: #0A66C2;
}

.social-btn-github {
    background: #333;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Chat responsive */
@media (max-width: 480px) {
    .assistant-bubble {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
    }
    
    .chat-modal {
        bottom: 100px;
        right: 10px;
        left: 10px;
        width: auto;
        max-height: 70vh;
    }
    
    .chat-messages {
        max-height: 45vh;
        min-height: 200px;
    }
    
    .social-btn-chat {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .social-btn-chat svg {
        width: 14px;
        height: 14px;
    }
}
