/* ===============================================
   RESET Y VARIABLES
   =============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colores principales - Blanco y Negro con acentos sutiles */
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --accent-color: #1a1a1a;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #333333;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --border-color: #e5e5e5;
    
    /* Colores de acento sutiles */
    --accent-blue: #2563eb;
    --accent-gold: #d4af37;
    --accent-emerald: #059669;
    --accent-slate: #475569;
    
    /* Tipografía */
    --font-primary: 'Poppins', sans-serif;
    --font-heading: 'Playfair Display', serif;
    
    /* Espaciado */
    --section-padding: 100px 0;
    --container-padding: 0 20px;
    
    /* Transiciones */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-elastic: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    background-color: var(--secondary-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

/* ===============================================
   PROGRESS BAR
   =============================================== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-blue) 0%, var(--accent-gold) 50%, var(--accent-blue) 100%);
    z-index: 10001;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.2s ease-out;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

/* ===============================================
   NAVBAR
   =============================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--secondary-color);
    padding: 20px 0;
    transition: var(--transition-smooth), transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0);
    transform: translateY(0);
}

.navbar.scrolled {
    padding: 15px 0;
    box-shadow: var(--shadow-md);
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    font-family: var(--font-heading);
    letter-spacing: -1px;
}

.logo .dot {
    color: var(--primary-color);
    font-size: 32px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
    align-items: center;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    position: relative;
    transition: var(--transition-smooth);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition-smooth);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition-smooth);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===============================================
   HERO SECTION
   =============================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    overflow: hidden;
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    animation: fadeInLeft 1s ease-out;
}

.greeting {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 10px;
    font-weight: 500;
    animation: fadeInDown 0.8s ease-out 0.2s backwards;
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    font-family: var(--font-heading);
    color: var(--primary-color);
}


.hero-subtitle {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--dark-gray);
    animation: fadeInDown 0.8s ease-out 0.6s backwards;
    position: relative;
    display: inline-block;
}

.hero-subtitle::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #000000, transparent);
    animation: slideInLeft 1s ease-out 1s backwards;
}

.hero-description {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease-out 0.8s backwards;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 1s backwards;
}

.btn {
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition-smooth);
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-slate) 100%);
    color: var(--secondary-color);
    border-color: var(--primary-color);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--accent-gold) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    opacity: 0.3;
    border-radius: 50%;
}

.btn-primary:hover::after {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-2px);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 18px;
    transition: var(--transition-smooth);
    border: 2px solid transparent;
}

.social-links a:hover {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--primary-color) 100%);
    color: var(--secondary-color);
    transform: translateY(-3px) rotate(360deg);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.hero-image {
    display: flex;
    justify-content: center;
    animation: fadeInRight 1s ease-out;
}

.profile-card {
    position: relative;
    width: 400px;
    height: 500px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.profile-placeholder {
    width: 200px;
    height: 200px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.floating-icons i {
    position: absolute;
    font-size: 50px;
    color: var(--primary-color);
    animation: float 3s ease-in-out infinite;
}

.icon-1 { top: 10%; left: -10%; animation-delay: 0s; }
.icon-2 { top: 15%; right: -10%; animation-delay: 0.5s; }
.icon-3 { bottom: 20%; left: -10%; animation-delay: 1s; }
.icon-4 { bottom: 15%; right: -10%; animation-delay: 1.5s; }

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator a {
    color: var(--primary-color);
    font-size: 24px;
    animation: bounce 2s infinite;
}

/* ===============================================
   SECTION HEADERS
   =============================================== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--light-gray);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.section-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
    font-family: var(--font-heading);
    color: var(--primary-color);
}

.section-description {
    font-size: 16px;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ===============================================
   ABOUT SECTION
   =============================================== */
.about {
    padding: var(--section-padding);
    background-color: var(--secondary-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.8;
}

.about-intro {
    font-size: 18px;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 20px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--light-gray);
    border-radius: 15px;
    transition: var(--transition-smooth);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 42px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

.skills-container {
    background-color: var(--light-gray);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.skills-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background-color: var(--secondary-color);
    border-radius: 12px;
    transition: var(--transition-smooth);
    border: 1px solid var(--border-color);
}

.skill-item:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.skill-item i {
    font-size: 36px;
    color: var(--primary-color);
    transition: var(--transition-elastic);
}

.skill-item:hover i {
    transform: rotateY(360deg) scale(1.2);
}

.skill-item span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

/* ===============================================
   EXPERIENCE SECTION
   =============================================== */
.experience {
    padding: var(--section-padding);
    background-color: var(--light-gray);
}

.timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 50px;
    margin-bottom: 50px;
}

.timeline-marker {
    position: absolute;
    left: -7px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-gold) 100%);
    border: 3px solid var(--secondary-color);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
}

.timeline-content {
    background-color: var(--secondary-color);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    border: 1px solid var(--border-color);
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.timeline-date {
    display: inline-block;
    padding: 5px 15px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--primary-color) 100%);
    color: var(--secondary-color);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.timeline-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.timeline-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 15px;
}

.timeline-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.timeline-content li {
    margin-bottom: 8px;
    color: var(--text-light);
    line-height: 1.6;
}

.timeline-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.timeline-tech span {
    padding: 6px 15px;
    background-color: var(--light-gray);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
}

/* ===============================================
   PROJECTS SECTION
   =============================================== */
.projects {
    padding: var(--section-padding);
    background-color: var(--secondary-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.project-card {
    background-color: var(--secondary-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    border: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(50px);
}

.project-card.reveal-card {
    animation: revealCard 0.8s ease-out forwards;
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.15);
    border-color: var(--accent-blue);
}

.project-image {
    position: relative;
    height: 250px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    overflow: hidden;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: var(--primary-color);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 18px;
    transition: var(--transition-smooth);
}

.project-link:hover {
    transform: scale(1.1);
}

.project-content {
    padding: 30px;
}

.project-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.project-description {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.project-tech span {
    padding: 6px 15px;
    background-color: var(--light-gray);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
}

.project-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-features p {
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-features i {
    color: var(--accent-emerald);
    font-size: 12px;
}

/* ===============================================
   SERVICES SECTION
   =============================================== */
.services {
    padding: var(--section-padding);
    background-color: var(--light-gray);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.service-card {
    background-color: var(--secondary-color);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.03), transparent);
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.service-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--secondary-color);
    margin-bottom: 25px;
    transition: var(--transition-smooth);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--primary-color) 100%);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.service-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.service-description {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 25px;
}

.service-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-features li {
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 12px;
    list-style: none;
}

.service-features i {
    color: var(--accent-emerald);
    font-size: 14px;
}

/* ===============================================
   CONTACT SECTION
   =============================================== */
.contact {
    padding: var(--section-padding);
    background-color: var(--secondary-color);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-card {
    background-color: var(--light-gray);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition-smooth);
    border: 1px solid var(--border-color);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--secondary-color);
    margin: 0 auto 20px;
}

.contact-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.contact-card p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.contact-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition-smooth);
}

.contact-card a:hover {
    text-decoration: underline;
}

.contact-form {
    background-color: var(--light-gray);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--text-dark);
    background-color: var(--secondary-color);
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

.contact-form .btn {
    width: 100%;
    justify-content: center;
}

/* ===============================================
   FOOTER
   =============================================== */
.footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

.footer-logo .dot {
    color: var(--secondary-color);
}

.footer-section p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-section h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 16px;
    transition: var(--transition-smooth);
}

.footer-social a:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a,
.footer-links li {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-links i {
    width: 16px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

/* ===============================================
   SCROLL TO TOP BUTTON
   =============================================== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--primary-color) 100%);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

/* ===============================================
   ANIMATIONS
   =============================================== */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes revealCard {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ===============================================
   GLITCH EFFECT
   =============================================== */
.glitch {
    animation: glitch 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
}

@keyframes glitch {
    0%, 100% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
}

/* ===============================================
   MAGNETIC BUTTON EFFECT
   =============================================== */
.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.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* ===============================================
   FLOATING ANIMATION
   =============================================== */
.profile-card {
    animation: floatCard 6s ease-in-out infinite;
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ===============================================
   SECTION TITLE ANIMATIONS
   =============================================== */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #000000, transparent);
    animation: expandLine 2s ease-out;
}

@keyframes expandLine {
    from {
        width: 0;
    }
    to {
        width: 60px;
    }
}

/* ===============================================
   CARD SHIMMER EFFECT
   =============================================== */
.project-card::after,
.service-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.project-card:hover::after,
.service-card:hover::after {
    opacity: 1;
    animation: shimmerEffect 1.5s;
}

@keyframes shimmerEffect {
    from {
        transform: translateX(-100%) rotate(45deg);
    }
    to {
        transform: translateX(100%) rotate(45deg);
    }
}

/* ===============================================
   TIMELINE PULSE
   =============================================== */
.timeline-marker {
    animation: markerPulse 2s ease-in-out infinite;
}

@keyframes markerPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
    }
}

/* ===============================================
   SCROLL ANIMATIONS
   =============================================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===============================================
   STAT ITEM HOVER
   =============================================== */
.stat-item {
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.05));
    transition: top 0.3s ease;
}

.stat-item:hover::before {
    top: 0;
}

.stat-number {
    transition: var(--transition-elastic);
}

.stat-item:hover .stat-number {
    transform: scale(1.2);
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */
@media (max-width: 1024px) {
    .hero-container,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-image {
        order: -1;
    }
    
    .profile-card {
        width: 100%;
        max-width: 400px;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Reducir intensidad de animaciones en tablets */
    .project-card:hover,
    .service-card:hover {
        transform: translateY(-8px) scale(1.01);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--secondary-color);
        width: 100%;
        text-align: center;
        transition: var(--transition-smooth);
        box-shadow: var(--shadow-lg);
        padding: 30px 0;
        gap: 20px;
    }
    
    .nav-menu.active {
        left: 0;
        animation: slideInRight 0.3s ease-out;
    }
    
    @keyframes slideInRight {
        from {
            transform: translateX(-100%);
        }
        to {
            transform: translateX(0);
        }
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-title {
        font-size: 42px;
        animation: none; /* Desactivar animación de gradiente en móvil */
        -webkit-text-fill-color: var(--primary-color);
    }
    
    .hero-subtitle {
        font-size: 24px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 36px;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timeline::before {
        left: 8px;
    }
    
    .timeline-item {
        padding-left: 40px;
    }
    
    .projects-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    /* Desactivar efecto 3D en móvil */
    .project-card:hover,
    .service-card:hover {
        transform: translateY(-5px) !important;
    }
    
    /* Reducir partículas en móvil */
    #particles-canvas {
        opacity: 0.3;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 32px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 25px;
    }
    
    /* Desactivar algunas animaciones en móviles pequeños */
    .floating-icons i {
        animation: none !important;
    }
    
    .profile-card {
        animation: none;
    }
}

/* ===============================================
   CUSTOM CURSOR
   =============================================== */
.custom-cursor,
.cursor-follower {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
}

.custom-cursor {
    width: 10px;
    height: 10px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 2px solid var(--secondary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.custom-cursor.cursor-hover {
    width: 20px;
    height: 20px;
}

.cursor-follower.cursor-hover {
    width: 60px;
    height: 60px;
}

/* Ocultar cursor personalizado en dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
    .custom-cursor,
    .cursor-follower {
        display: none;
    }
}

/* ===============================================
   LOADING DOTS ANIMATION
   =============================================== */
.loading-dots::after {
    content: '';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* ===============================================
   ICON BOUNCE ON HOVER
   =============================================== */
.service-icon i,
.contact-icon i {
    display: inline-block;
    transition: var(--transition-elastic);
}

.service-card:hover .service-icon i,
.contact-card:hover .contact-icon i {
    animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(0.9);
    }
    75% {
        transform: scale(1.1);
    }
}

/* ===============================================
   TEXT GRADIENT ANIMATION
   =============================================== */


@keyframes textShine {
    to {
        background-position: 200% center;
    }
}

/* ===============================================
   UNDERLINE ANIMATION
   =============================================== */
.project-title,
.service-title {
    position: relative;
    display: inline-block;
}

.project-title::after,
.service-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.project-card:hover .project-title::after,
.service-card:hover .service-title::after {
    width: 100%;
}

/* ===============================================
   RIPPLE EFFECT
   =============================================== */
.btn {
    position: relative;
    overflow: hidden;
}

.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===============================================
   HOVER EFFECTS MEJORADOS
   =============================================== */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 100%;
}

.nav-link::after {
    display: none;
}

/* ===============================================
   PROJECT IMAGE ZOOM
   =============================================== */
.project-image {
    overflow: hidden;
}

.project-placeholder {
    transition: transform 0.5s ease;
}

.project-card:hover .project-placeholder {
    transform: scale(1.1) rotate(5deg);
}

/* ===============================================
   SCROLL INDICATOR ANIMATION
   =============================================== */
.scroll-indicator a {
    display: inline-block;
    animation: bounce 2s infinite;
    transition: transform 0.3s ease;
}

.scroll-indicator a:hover {
    transform: scale(1.2);
    color: var(--dark-gray);
}

/* ===============================================
   LOGO ANIMATION
   =============================================== */
.logo a {
    display: inline-block;
    transition: var(--transition-elastic);
}

.logo a:hover {
    transform: scale(1.1) rotate(-5deg);
}

.logo .dot {
    display: inline-block;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

/* ===============================================
   FORM FOCUS EFFECTS
   =============================================== */
.form-group {
    position: relative;
}

.form-group input:focus,
.form-group textarea:focus {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ===============================================
   FOOTER LINKS ANIMATION
   =============================================== */
.footer-links a {
    position: relative;
    overflow: hidden;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: var(--transition-smooth);
}

.footer-links a:hover::before {
    left: 0;
    opacity: 1;
}

.footer-links a:hover {
    padding-left: 20px;
}

/* ===============================================
   ANIMATED BACKGROUND SECTIONS
   =============================================== */
.about,
.services {
    position: relative;
    overflow: hidden;
}

.about::before,
.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.01), transparent);
    animation: slideBackground 15s linear infinite;
}

@keyframes slideBackground {
    from {
        left: -100%;
    }
    to {
        left: 100%;
    }
}

/* ===============================================
   FORM VALIDATION STYLES
   =============================================== */
.form-group input.valid,
.form-group textarea.valid {
    border-color: #28a745;
}

.form-group input.invalid,
.form-group textarea.invalid {
    border-color: #dc3545;
}

.error-message {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

/* ===============================================
   ADDITIONAL ANIMATIONS
   =============================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* ===============================================
   LOADING ANIMATION (Optional)
   =============================================== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===============================================
   TOOLTIP
   =============================================== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    padding: 8px 12px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--primary-color);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* ===============================================
   SELECTION STYLES
   =============================================== */
::selection {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

::-moz-selection {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

/* ===============================================
   SCROLLBAR STYLES
   =============================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background-color: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--dark-gray);
}

/* ===============================================
   PRINT STYLES
   =============================================== */
@media print {
    .navbar,
    .hamburger,
    .scroll-top,
    .hero-buttons,
    .social-links,
    .contact-form {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .section-title {
        page-break-after: avoid;
    }
    
    .project-card,
    .service-card,
    .timeline-item {
        page-break-inside: avoid;
    }
}
