﻿@charset "UTF-8";

:root {
    /* Color Palette - Modern Gradient Theme */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);

    --bg-dark: #0a0e27;
    --bg-card: #1a1f3a;
    --bg-hover: #252b4a;

    --text-primary: #ffffff;
    --text-secondary: #a8b2d1;
    /* #8891a8 en vez de #6b7280: el tono original no llegaba al contraste
       minimo 4.5:1 de WCAG AA sobre --bg-dark/--bg-card (verificado). */
    --text-muted: #8891a8;

    --accent-primary: #667eea;
    --accent-secondary: #764ba2;

    /* Spacing */
    --section-padding: 100px 0;

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Contenedor generico reutilizado por todas las secciones. Antes solo
   .footer y .clients-carousel tenian su propio ".container" con ancho
   maximo; el resto de secciones (about/skills/projects/cv/contact) no
   tenian ninguna regla y su contenido se extendia sin limite en
   pantallas grandes. */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

html {
    scroll-behavior: smooth;
    font-size: 62.5%;
    /* 1rem = 10px */
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-size: 1.6rem;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 10000;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 2px solid var(--accent-primary);
}

/* El cursor personalizado no tiene sentido en tactil/movil: se oculta
   por CSS como red de seguridad, y ademas script.js no llega a activar
   los listeners de mousemove en esos dispositivos (ver UX-03). */
@media (hover: none), (pointer: coarse) {

    .cursor-dot,
    .cursor-outline {
        display: none;
    }
}

/* Respeta la preferencia de "reducir movimiento" del sistema operativo:
   desactiva animaciones y transiciones no esenciales (WCAG 2.3.3). */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .cursor-dot,
    .cursor-outline {
        display: none;
    }
}

/* Header/Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 2%;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.logo {
    position: absolute;
    left: 5%;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar {
    display: flex;
    gap: 3rem;
}

.nav-link {
    font-size: 1.6rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: var(--transition-smooth);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

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

.menu-toggle {
    position: absolute;
    right: 5%;
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition-smooth);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 5% 50px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-text {
    z-index: 1;
    width: 100%;
}

.greeting {
    font-size: clamp(1.6rem, 4vw, 2rem);
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.name {
    font-size: clamp(3.5rem, 8vw + 1rem, 5.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    min-height: 4rem;
}

.cursor-typing {
    display: inline-block;
    width: 3px;
    background: var(--accent-primary);
    animation: blink 0.7s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.description {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
    width: 100%;
    max-width: 400px;
}

.btn {
    padding: 1.5rem 3rem;
    border-radius: 50px;
    font-size: clamp(1.4rem, 2vw, 1.6rem);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    display: inline-block;
    text-align: center;
    min-height: 48px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% auto;
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    border: none;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-primary:hover {
    background-position: right center;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent-primary);
}

.btn-secondary:hover {
    background: var(--accent-primary);
    transform: translateY(-3px);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.social-links a {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.social-links a:hover {
    background: var(--primary-gradient);
    color: var(--text-primary);
    transform: translateY(-5px);
}

.social-links svg {
    width: 22px;
    height: 22px;
}

.hero-image {
    position: relative;
    z-index: 1;
}

.image-wrapper {
    position: relative;
    width: clamp(250px, 60vw, 400px);
    height: clamp(250px, 60vw, 400px);
    margin: 0 auto;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid transparent;
    background: var(--primary-gradient);
    padding: 5px;
}

.image-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110%;
    height: 110%;
    background: var(--primary-gradient);
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: pulse 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Section Styles */
section {
    padding: clamp(4rem, 10vw, 10rem) 5%;
}

.section-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: clamp(3rem, 6vw, 5rem);
}

.section-title span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* About Section */
.about {
    background: var(--bg-dark);
}

.about-content {
    max-width: 1600px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.8rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 4rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.stat-item {
    text-align: center;
    padding: clamp(2rem, 4vw, 3rem);
    background: var(--bg-card);
    border-radius: 15px;
    transition: var(--transition-smooth);
}

.stat-item:hover {
    transform: translateY(-10px);
    background: var(--bg-hover);
}

.stat-item h3 {
    font-size: clamp(2.5rem, 5vw, 3rem);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.stat-item p {
    color: var(--text-secondary);
    font-size: clamp(1.4rem, 2vw, 1.6rem);
}

/* Skills Section */
.skills {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-card) 100%);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1600px;
    margin: 0 auto;
}

.skill-card {
    padding: 3rem;
    background: var(--bg-card);
    border-radius: 15px;
    text-align: center;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.skill-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
}

.skill-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.skill-card p {
    color: var(--text-secondary);
    font-size: 1.4rem;
}

/* Projects Section */
.projects {
    background: var(--bg-card);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: 1800px;
    margin: 0 auto;
}

.project-card {
    background: var(--bg-dark);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy effect */
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.25);
}

/* Call to Action Button overlay */
.project-card::after {
    content: 'Ver Proyecto ➜';
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--primary-gradient);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 10;
    width: max-content;
}

.project-card:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.project-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

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

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}



/* CV/Timeline Section */
.cv {
    background: var(--bg-dark);
}

.timeline-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-weight: 600;
}

.timeline-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5rem;
    max-width: 1800px;
    margin: 0 auto;
}

.timeline {
    position: relative;
    width: 100%;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--primary-gradient);
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: 50%;
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-left: 50%;
    padding-right: 0;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 50%;
    border: 4px solid var(--bg-dark);
    z-index: 1;
}

.timeline-content {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 15px;
    max-width: 400px;
    transition: var(--transition-smooth);
}

.timeline-content:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.timeline-date {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--primary-gradient);
    border-radius: 20px;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.timeline-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 1.5rem;
}

/* Contact Section */
.contact {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-card) 100%);
}

.contact-content {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group input:not([type="checkbox"]),
.form-group textarea {
    width: 100%;
    padding: 1.8rem 2.2rem;
    background: var(--bg-card);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.form-group input:not([type="checkbox"]):focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-group textarea {
    resize: vertical;
    min-height: 250px;
}

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.char-counter.is-low {
    color: #f5576c;
}

.contact-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: stretch;
    width: 100%;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.2rem;
    background: var(--bg-card);
    border-radius: 15px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.info-item {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
}

.info-item svg {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
    flex-shrink: 0;
    margin-top: 4px;
}

.info-item h4 {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.info-item p,
.info-item .status-text {
    color: var(--text-secondary);
    font-size: 1.3rem;
    line-height: 1.4;
}

@media (max-width: 968px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-info {
        position: relative;
        top: 0;
    }
}

/* Footer */
.footer {
    background: var(--bg-card);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.footer .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer p {
    color: var(--text-secondary);
    font-size: 1.4rem;
}

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth), visibility 0.3s ease;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
}

.scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
}

.scroll-top svg {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
}

/* ============================================ */
/* RESPONSIVE DESIGN - MOBILE FIRST */
/* ============================================ */

/* Tablet (640px and up) */
@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        max-width: 100%;
    }

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

    .form-row {
        grid-template-columns: 1fr 1fr;
    }

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

    .timeline-grid {
        gap: 6rem;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .navbar {
        display: flex !important;
    }

    .menu-toggle {
        display: none;
    }

    .hero-content {
        flex-direction: row;
        text-align: left;
    }

    .hero-text {
        width: auto;
    }

    .hero-buttons {
        justify-content: flex-start;
    }

    .social-links {
        justify-content: flex-start;
    }

    .stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .timeline-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8rem;
    }

    .contact-content {
        grid-template-columns: 1.8fr 1fr;
    }
}

/* Large Desktop (1440px and up) */
@media (min-width: 1440px) {
    html {
        font-size: 62.5%;
    }
}

/* Mobile Navigation - Max-width for hiding menu */
@media (max-width: 1023px) {
    .navbar {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        background: var(--bg-card);
        flex-direction: column;
        padding: 2rem;
        transition: var(--transition-smooth);
        z-index: 999;
    }

    .navbar.active {
        left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-link {
        padding: 1rem;
        font-size: 1.8rem;
        width: 100%;
        text-align: center;
    }
}

/* Timeline Mobile Adjustments */
@media (max-width: 768px) {
    .timeline::before {
        left: 0;
    }

    .timeline-item,
    .timeline-item:nth-child(even) {
        padding-left: 40px;
        padding-right: 0;
        justify-content: flex-start;
    }

    .timeline-marker {
        left: 0;
        transform: translateX(0);
    }

    .footer .container {
        flex-direction: column;
        gap: 2rem;
    }
}

/* Small Mobile - Smallest supported devices */
@media (max-width: 480px) {
    .logo {
        font-size: 2rem;
    }
}

/* ============================================ */
/* EFECTOS ADICIONALES Y ANIMACIONES AVANZADAS */
/* ============================================ */

/* Animación de flotación para elementos */
@keyframes float {

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

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

/* Animación de brillo */
@keyframes shine {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

/* Efecto de brillo en las tarjetas al hacer hover */
.skill-card::before,
.project-card::before,
.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.skill-card:hover::before,
.project-card:hover::before,
.stat-item:hover::before {
    left: 100%;
}

.skill-card,
.project-card,
.stat-item {
    position: relative;
    overflow: hidden;
}

/* Efecto de flotación en la imagen del hero */
.hero-image {
    animation: float 6s ease-in-out infinite;
}

/* Mejorar el efecto hover de los botones */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Animación de pulso mejorada para el scroll-top */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    }

    50% {
        box-shadow: 0 5px 30px rgba(102, 126, 234, 0.8), 0 0 40px rgba(102, 126, 234, 0.4);
    }
}

.scroll-top {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Efecto de ondas en el timeline marker */
.timeline-marker::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    animation: ripple 2s infinite;
}

@keyframes ripple {
    0% {
        width: 100%;
        height: 100%;
        opacity: 1;
    }

    100% {
        width: 300%;
        height: 300%;
        opacity: 0;
    }
}

/* Efecto de escalado suave en iconos de habilidades */
.skill-icon {
    transition: var(--transition-bounce);
}

.skill-card:hover .skill-icon {
    transform: scale(1.2) rotate(5deg);
}

/* Sombras dinámicas en las tarjetas de proyectos */
.project-card {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.project-card:hover {
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.4), 0 0 30px rgba(102, 126, 234, 0.2);
}

/* Efecto de zoom en las imágenes de proyectos */
.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0) 0%, rgba(102, 126, 234, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover .project-image::after {
    opacity: 1;
}

/* Animación de gradiente en las estadísticas */
@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% center;
    }

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

.stat-item h3 {
    background-size: 200% auto;
    animation: gradient-shift 3s ease infinite;
}

/* Mejorar el hover de los enlaces sociales */
.social-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s;
}

.social-links a:hover::after {
    width: 80%;
}

/* Animación de texto gradient en el nombre */
.name {
    background-size: 200% auto;
    animation: gradient-shift 4s ease infinite;
}

/* Efecto de brillo en los tags de proyectos */
.project-tags span {
    transition: var(--transition-smooth);
    cursor: pointer;
}

.project-tags span:hover {
    background: var(--primary-gradient);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.counter::after {
    content: "+";
}

/* Wrapper para los timelines con ttulos */
.timeline-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Estilos para imágenes de fondo de proyectos */
.project-image {
    position: relative;
    height: 200px;
    /* Asegurar altura */
    overflow: hidden;
}

.project-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.project-card:hover .project-bg {
    transform: scale(1.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 1.4rem;
    justify-content: flex-start;
    width: 100%;
    padding: 1.2rem;
    background: var(--bg-card);
    border-radius: 15px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.checkbox-group label {
    margin: 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px !important;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-primary);
    flex-shrink: 0;
    display: inline-block;
}

.terms-link {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.terms-link:hover {
    text-decoration: underline;
}

/* Image Hover Effects - Added for Touch ID Fingerprint */
.image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid transparent;
    background: var(--primary-gradient);
    padding: 5px;
    transition: opacity 0.5s ease;
}

.img-front {
    z-index: 2;
    opacity: 1;
}

.img-back {
    z-index: 1;
}

.image-wrapper:hover .img-front {
    opacity: 0;
}

/* ============================================ */
/* CLIENTS CAROUSEL SECTION */
/* ============================================ */

.clients-carousel {
    padding: 6rem 0;
    background: var(--bg-dark);
    position: relative;
}

.clients-carousel .container {
    overflow: hidden;
    position: relative;
    max-width: 1800px;
    margin: 0 auto;
}

.carousel-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 2rem 0;
}

/* Gradientes en los bordes para efecto infinito */
.carousel-wrapper::before,
.carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-dark), transparent);
}

.carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-dark), transparent);
}

.carousel-track {
    display: flex;
    gap: 4rem;
    animation: scroll-infinite 40s linear infinite;
    width: max-content;
}

/* Animación de scroll infinito */
@keyframes scroll-infinite {
    0% {
        transform: translateX(0);
    }

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

/* Estilos de las imágenes de logos */
.carousel-track img {
    height: 80px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    opacity: 0.35;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.carousel-track img:hover {
    transform: scale(1.1);
}

/* Responsive para el carrusel */
@media (max-width: 768px) {
    .carousel-track {
        gap: 3rem;
        animation: scroll-infinite 30s linear infinite;
    }

    .carousel-track img {
        height: 60px;
        max-width: 120px;
        opacity: 0.3;
    }

    .carousel-wrapper::before,
    .carousel-wrapper::after {
        width: 80px;
    }
}

@media (max-width: 480px) {
    .clients-carousel {
        padding: 4rem 0;
    }

    .carousel-track {
        gap: 2rem;
    }

    .carousel-track img {
        height: 50px;
        max-width: 100px;
    }
}

/* Paginas de error (404 / 500) */
.error-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    gap: 1rem;
}

.error-page .error-code {
    font-size: clamp(6rem, 20vw, 12rem);
    font-weight: 700;
    line-height: 1;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-page h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--text-primary);
}

.error-page .error-description {
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 1rem;
}

/* Pagina legal (terminos y condiciones / privacidad) */
.legal-page {
    padding: 50px 0;
}

.legal-page .container {
    max-width: 800px;
}

.legal-page h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-primary);
    padding-bottom: 1rem;
    display: inline-block;
}

.legal-page h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.legal-page p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.legal-page .back-link {
    display: inline-block;
    margin-top: 2rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

.legal-page .back-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Paginas de detalle de proyecto (software_empresarial.html,
   aplicaciones_web.html, automatizacion_inteligente.html)

   Antes cada una de estas 3 paginas tenia su propia copia, casi
   identica, de todo este bloque en un <style> inline (~400 lineas por
   pagina). Vive aqui una sola vez para las tres.
   ========================================================================== */

.header-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    font-size: 2.4rem;
}

/* El degradado solo debe afectar al texto, nunca al emoticono: aplicado
   sobre el <h1> completo, el emoji perdia su color propio al heredar
   -webkit-text-fill-color: transparent. */
.header-content h1 .gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.back-btn {
    padding: 1.3rem 2.4rem;
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--text-primary);
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.6rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: var(--accent-primary);
    transform: translateY(-2px);
}

.detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 19.2rem 3.2rem 6.4rem;
}

@media (min-width: 768px) {
    .detail-container {
        padding: 12.8rem 3.2rem 6.4rem;
    }
}

.project-header {
    text-align: center;
    margin-bottom: 8rem;
}

.project-title {
    font-size: 3.6rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-description {
    font-size: 1.8rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.tools-grid {
    display: flex;
    flex-direction: column;
    gap: 6.4rem;
}

.tool-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4.8rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.tool-info {
    padding: 4.8rem;
    display: flex;
    flex-direction: column;
    gap: 3.2rem;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 2.4rem;
}

.tool-icon {
    font-size: 4.8rem;
    min-width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
}

.tool-info h3 {
    font-size: 2.4rem;
    color: var(--text-primary);
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.feature-item {
    display: flex;
    gap: 1.6rem;
    align-items: flex-start;
    padding: 1.9rem;
    background: rgba(10, 14, 39, 0.5);
    border-radius: 10px;
    border-left: 4px solid var(--accent-primary);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateX(10px);
    background: rgba(102, 126, 234, 0.1);
}

.feature-icon-small {
    font-size: 1.8rem;
    min-width: 30px;
}

.feature-text h4 {
    font-size: 1.7rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-text p {
    font-size: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.tool-preview {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 14, 39, 0.3);
}

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

/* Variante para capturas que no deben recortarse (p. ej. paneles con
   texto/tablas donde perder los bordes dificulta leer el contenido) */
.tool-preview--contain img {
    object-fit: contain;
    padding: 2.4rem;
}

.tool-card:hover .tool-preview img {
    transform: scale(1.05);
}

/* Lightbox de las capturas de cada herramienta */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.is-visible {
    display: flex;
}

.lightbox-modal.active {
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(102, 126, 234, 0.3);
    border: 2px solid rgba(102, 126, 234, 0.3);
    transition: opacity 0.2s ease;
}

.lightbox-caption {
    margin-top: 2.4rem;
    color: var(--text-primary);
    font-size: 1.9rem;
    font-weight: 500;
}

.lightbox-btn {
    position: fixed;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    transition: all 0.3s ease;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.close-btn {
    top: 20px;
    right: 20px;
}

.prev-btn {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.next-btn {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 1024px) {
    .tool-card {
        grid-template-columns: 1fr;
    }

    .tool-preview {
        min-height: 300px;
    }

    .project-title {
        font-size: 3.2rem;
    }
}

@media (max-width: 768px) {
    .detail-container {
        padding: 11.2rem 1.6rem 3.2rem;
    }

    .header-content h1 {
        font-size: 2.2rem;
    }

    .project-title {
        font-size: 2.8rem;
    }

    .tool-info {
        padding: 3.2rem;
    }

    .tool-icon {
        font-size: 4rem;
        min-width: 50px;
        height: 50px;
    }

    .feature-item {
        padding: 1.6rem;
    }

    .prev-btn,
    .next-btn {
        position: fixed;
        bottom: 20px;
        top: auto;
        transform: none;
    }

    .prev-btn {
        left: 20px;
    }

    .next-btn {
        right: 20px;
    }
}

/* ==========================================================================
   Utilidades varias para eliminar estilos inline sueltos
   ========================================================================== */

/* Enlaces de tarjeta que envuelven toda la tarjeta de proyecto (antes
   style="text-decoration:none;color:inherit;display:block;" inline) */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Etiqueta del checkbox de terminos (antes style="font-size:0.9rem;" inline) */
.checkbox-label {
    font-size: 0.9rem;
}

/* Campo honeypot anti-spam, oculto a usuarios reales (antes
   style="display:none;" inline) */
.hp-field {
    display: none;
}

/* Mensaje de estado del formulario de contacto (exito/error), anunciado
   a lectores de pantalla via aria-live en vez de alert() */
.form-status {
    display: none;
    margin-top: 0.5rem;
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.form-status.is-visible {
    display: block;
}

.form-status.is-success {
    background: rgba(79, 172, 254, 0.12);
    border: 1px solid rgba(79, 172, 254, 0.4);
    color: var(--text-primary);
}

.form-status.is-error {
    background: rgba(245, 87, 108, 0.12);
    border: 1px solid rgba(245, 87, 108, 0.4);
    color: var(--text-primary);
}