:root {
    --color-fondo: #0a0a1a;
    --color-texto: #ffffff;
    --primary: #3a86ff;
    --secondary: #8338ec;
    --accent: #06d6a0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Exo 2', sans-serif;
}

body {
    background-color: var(--color-fondo);
    color: var(--color-texto);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

#techCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 100%);
}

.tech-font {
    font-family: 'Share Tech Mono', monospace;
}

.gradient-text {
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 300% 300%;
    animation: gradient 5s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.4);
}

.glow-effect {
    position: relative;
}

.glow-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.glow-effect:hover::after {
    opacity: 1;
}

.skill-bar {
    background: rgba(30, 41, 59, 0.7);
    border-radius: 20px;
    overflow: hidden;
    height: 10px;
}

.skill-progress {
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    position: relative;
    overflow: hidden;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(-45deg,
            rgba(255, 255, 255, 0.2) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0.2) 75%,
            transparent 75%,
            transparent);
    z-index: 1;
    background-size: 20px 20px;
    animation: move 2s linear infinite;
}

@keyframes move {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 20px 20px;
    }
}

.project-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent);
}

.floating-element {
    animation: float 6s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.floating-element:hover {
    animation: none;
    transform: scale(1.05) rotate(5deg);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.tech-tag {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin: 0 5px 5px 0;
    display: inline-block;
}

.cursor {
    animation: blink 1s infinite, glow 2s ease-in-out infinite alternate;
    font-weight: 300;
    background: linear-gradient(45deg, #00ffff, #ff00ff, #00ff00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.1em;
}

@keyframes blink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

@keyframes glow {
    0% {
        text-shadow: 0 0 10px rgba(0, 255, 255, 0.8),
            0 0 20px rgba(0, 255, 255, 0.6),
            0 0 30px rgba(0, 255, 255, 0.4);
    }

    100% {
        text-shadow: 0 0 20px rgba(255, 0, 255, 0.8),
            0 0 30px rgba(255, 0, 255, 0.6),
            0 0 40px rgba(0, 255, 0, 0.4);
    }
}

@keyframes slide {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.animate-slide {
    animation: slide 4s linear infinite;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



.typing-text {
    display: inline-block;
}

/* Transición suave para el header */
header {
    transition: transform 0.3s ease-in-out;
}

/* Estilos para menú móvil */
#mobile-menu {
    transition: all 0.3s ease;
    transform-origin: top;
}

#mobile-menu.hidden {
    transform: scaleY(0);
    opacity: 0;
}

#mobile-menu:not(.hidden) {
    transform: scaleY(1);
    opacity: 1;
}

.mobile-nav-link {
    position: relative;
    padding-left: 1rem;
    transition: all 0.3s ease;
}

.mobile-nav-link::before {
    content: '▶';
    position: absolute;
    left: 0;
    transition: transform 0.3s ease;
    color: var(--accent);
}

.mobile-nav-link:hover::before {
    transform: translateX(3px);
}

/* Mejoras de responsividad general */
@media (max-width: 768px) {

    /* Ajustes para texto que no cubre Tailwind */
    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    /* Ajustes para botones en móvil */
    .flex.space-x-4 {
        flex-direction: column;
        gap: 0.5rem;
    }

    .flex.space-x-4 a {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {

    /* Ajustes adicionales para pantallas muy pequeñas */
    .text-3xl {
        font-size: 1.5rem !important;
    }

    .text-2xl {
        font-size: 1.25rem !important;
    }

    .text-xl {
        font-size: 1.125rem !important;
    }
}

/* Botón Flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #20b858;
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.5);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
}

/* Tecnologías Carousel Styles */
.tech-carousel-container {
    width: 100%;
    overflow: hidden;
    padding: 30px 0;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.tech-carousel-track {
    display: flex;
    width: max-content;
    animation: scroll-left 60s linear infinite;
}

.tech-card {
    flex: 0 0 250px;
    margin: 0 25px;
    background: #1a2233;
    border: 3px solid #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    padding: 40px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.tech-card:hover {
    transform: translateY(-12px);
    border-color: #00f2ff;
    background: #1f293d;
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.5);
    animation: shake 0.5s ease-in-out infinite;
}

@keyframes shake {

    0%,
    100% {
        transform: translateY(-12px) rotate(0deg);
    }

    25% {
        transform: translateY(-12px) rotate(-2deg);
    }

    75% {
        transform: translateY(-12px) rotate(2deg);
    }
}

.tech-card img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.2));
}

.tech-card span {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: capitalize;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-250px * 18 - 50px * 18));
    }
}

/* Timeline Styles */
.timeline-container {
    position: relative;
    padding-left: 20px;
}

.timeline-line {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 45px;
    width: 3px;
    background: linear-gradient(180deg, #17cf54 0%, rgba(23, 207, 84, 0.2) 100%);
    box-shadow: 0 0 15px rgba(23, 207, 84, 0.5);
    z-index: 10;
}

.timeline-item {
    position: relative;
    padding-left: 70px;
}

.timeline-dot {
    position: absolute;
    left: 38px;
    top: 25px;
    width: 18px;
    height: 18px;
    background: #0a0a1a;
    border: 3px solid #17cf54;
    border-radius: 50%;
    z-index: 20;
    box-shadow: 0 0 10px rgba(23, 207, 84, 0.8);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    background: #17cf54;
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(23, 207, 84, 1);
}

@media (max-width: 768px) {
    .timeline-line {
        left: 25px;
    }

    .timeline-item {
        padding-left: 50px;
    }

    .timeline-dot {
        left: 18px;
    }
}

/* Profile Card Styles */
.profile-card {
    background: #0d1224;
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 24px;
    padding: 30px;
    width: 100%;
    max-width: 350px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.profile-image-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 25px;
}

.profile-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.badge-shield {
    position: absolute;
    bottom: 5px;
    right: -5px;
    width: 45px;
    height: 45px;
    background: #1a2233;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.profile-info {
    text-align: center;
    margin-bottom: 20px;
}

.profile-name {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 5px;
}

.profile-role {
    font-size: 0.9rem;
    font-weight: 600;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-badge {
    background: rgba(22, 101, 52, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 10px #22c55e;
}

.status-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: #22c55e;
    letter-spacing: 1.5px;
}

.profile-details-list {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #94a3b8;
    font-size: 0.9rem;
}

.detail-item i {
    color: #38bdf8;
    width: 20px;
}

.cv-button {
    width: 100%;
    background: #00d4ff;
    color: #030712;
    padding: 14px;
    border-radius: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.cv-button:hover {
    background: #00f2ff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 242, 255, 0.5);
}

@keyframes bounce-slow {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-8px);
    }

    60% {
        transform: translateY(-4px);
    }
}

/* Modal CV Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: #1e293b;
    width: 90%;
    max-width: 1000px;
    height: 90vh;
    border-radius: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(56, 189, 248, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-texto);
}

.close-modal {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #ffffff;
}

.modal-body {
    flex: 1;
    padding: 0;
    overflow: hidden;
}

.modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}