:root {
    --primary-color: #0a0a0f;
    --secondary-color: #161629;
    --highlight-color: #1a4b8c;
    --accent-color: #ff6b9d;
    --text-light: #e94560;
    --text-white: #ffffff;
    --text-gray: #a8adc7;
    --gradient-primary: linear-gradient(135deg, #ff6b9d 0%, #4ecdc4 100%);
    --gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-glow: 0 0 30px rgba(255, 107, 157, 0.3);
    --shadow-intense: 0 20px 60px rgba(0, 0, 0, 0.4);
    --border-glow: 1px solid rgba(255, 107, 157, 0.3);
}

/* === ANIMACIONES GLOBALES === */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 107, 157, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 40px rgba(255, 107, 157, 0.6);
        transform: scale(1.02);
    }
}

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

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

@keyframes slideInFromLeft {
    0% { transform: translateX(-100px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromRight {
    0% { transform: translateX(100px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes fadeInUp {
    0% { transform: translateY(40px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes glow-border {
    0%, 100% { border-color: rgba(255, 107, 157, 0.3); }
    50% { border-color: rgba(255, 107, 157, 0.8); }
}

/* === GENERAL === */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--primary-color);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 107, 157, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
    color: var(--text-white);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255, 107, 157, 0.02) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(78, 205, 196, 0.02) 50%, transparent 70%);
    animation: gradient-shift 20s ease infinite;
    background-size: 400% 400%;
    pointer-events: none;
    z-index: -1;
}

/* === NAVBAR === */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.95);
    border-bottom: var(--border-glow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    animation: slideInFromLeft 0.8s ease-out;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 157, 0.1), transparent);
    animation: shimmer 3s infinite;
}

.nav-menu {
    display: flex;
    justify-content: center;
    gap: 3rem;
    list-style: none;
    padding: 0.6rem;
    margin: 0;
}

.nav-link {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0.5rem;
    border-radius: 12px;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.4s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--text-white);
    transform: translateY(-2px);
    background: rgba(255, 107, 157, 0.1);
    box-shadow: 0 5px 20px rgba(255, 107, 157, 0.2);
}

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

.nav-link i {
    font-size: 1.4rem;
    transition: transform 0.4s ease;
}

.nav-link:hover i {
    transform: scale(1.2) rotateY(360deg);
}

.nav-link span {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* === MAIN === */
.main-container {
    max-width: 1200px;
    margin: 140px auto 0 auto;
    padding: 2rem;
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* === HEADER === */
.header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInUp 1.2s ease-out 0.5s both;
}

.profile-image {
    width: 200px;   /* más pequeño en móviles */
    height: 200px;
    border-radius: 40%;
    margin: 0 auto 2rem;
    overflow: hidden;
    box-shadow: var(--shadow-glow);
    position: relative;
    animation: float 6s ease-in-out infinite;
  }
  .profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* igual que arriba */
    object-position: center;
    display: block;
  }
.profile-image::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: var(--gradient-accent);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: pulse-glow 3s ease-in-out infinite;
}

.profile-image:hover {
    transform: scale(1.05) rotateY(10deg);
    box-shadow: 0 15px 50px rgba(255, 107, 157, 0.5);
}

.profile-image:hover::before {
    opacity: 1;
}

.name-section h1 {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    animation: gradient-shift 6s ease infinite;
    letter-spacing: -1px;
}

.name-section h2 {
    color: var(--text-gray);
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.decorative-line {
    width: 120px;
    height: 4px;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    margin: 1.5rem auto;
    border-radius: 4px;
    animation: gradient-shift 4s ease infinite;
    position: relative;
    overflow: hidden;
}

.decorative-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite 1s;
}

/* === CARDS === */
.vertical-card {
    background: rgba(22, 33, 62, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1.2rem 2.3rem 2.3rem; /* 🔹 top más pequeño, lados y bottom igual */
    margin-bottom: 2.5rem;
    border: var(--border-glow);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInFromRight 0.8s ease-out;
  }
  

.vertical-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 157, 0.05), transparent);
    transition: left 0.6s ease;
}

.vertical-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-intense);
    border-color: rgba(255, 107, 157, 0.6);
}

.vertical-card:hover::before {
    left: 100%;
}

.card-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-white);
    display: flex;
    gap: 0.8rem;
    align-items: center;
    position: relative;
}

.card-title i {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse-glow 2s ease-in-out infinite;
}

/* === SKILLS === */
.skills-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.skill-item {
    background: rgba(255, 107, 157, 0.08);
    border: 1px solid rgba(255, 107, 157, 0.25);
    padding: 1.5rem;
    text-align: center;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    animation: bounceIn 0.6s ease-out;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.2) 0%, transparent 70%);
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
}

.skill-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(255, 107, 157, 0.3);
    border-color: rgba(255, 107, 157, 0.6);
    background: rgba(255, 107, 157, 0.15);
}

.skill-item:hover::before {
    width: 200px;
    height: 200px;
}

/* === PROYECTOS === */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: rgba(26, 26, 46, 0.8);
    padding: 2rem;
    border-left: 4px solid transparent;
    border-image: var(--gradient-primary) 1;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.project-card:hover {
    transform: translateY(-8px) rotateX(2deg);
    box-shadow: var(--shadow-intense);
    border-left-width: 8px;
}

.project-card:hover::before {
    opacity: 0.05;
}

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

.project-description {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 0.95rem;
}

.tech-stack {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: rgba(255, 107, 157, 0.12);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    color: var(--text-light);
    border: 1px solid rgba(255, 107, 157, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tech-tag::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 ease;
}

.tech-tag:hover {
    transform: scale(1.05);
    background: rgba(255, 107, 157, 0.2);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.2);
}

.tech-tag:hover::before {
    left: 100%;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-link {
    flex: 1;
    min-width: 120px;
    padding: 0.8rem 1.5rem;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    border-radius: 25px;
    text-align: center;
    text-decoration: none;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: gradient-shift 6s ease infinite;
}

.project-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.project-link:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.4);
}

.project-link:hover::before {
    left: 100%;
}

/* === FORMULARIO DE CONTACTO === */
#contacto {
    max-width: 500px;
    margin: 0 auto 2rem;
    padding: 1.5rem;
  }
  
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
  }
  
  .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .form-group label {
    font-weight: 500;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .contact-form input,
  .contact-form textarea {
    padding: 0.8rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(233, 69, 96, 0.3);
    background: rgba(22, 33, 62, 0.4);
    color: var(--text-white);
    font-size: 1rem;
    outline: none;
    transition: border 0.3s ease, background 0.3s ease;
  }
  
  .contact-form input:focus,
  .contact-form textarea:focus {
    border-color: var(--text-light);
    background: rgba(22, 33, 62, 0.6);
  }
  
  .btn-submit {
    background: linear-gradient(135deg, var(--text-light), var(--highlight-color));
    color: white;
    border: none;
    padding: 0.9rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    transition: transform 0.3s ease;
  }
  
  .btn-submit:hover {
    transform: scale(1.05);
  }
  

/* === BOTÓN === */
.btn-restart {
    background: var(--gradient-primary);
    background-size: 200% 200%;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: gradient-shift 6s ease infinite;
}

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

.btn-restart:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 107, 157, 0.4);
}

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

/* === VUE ANIMACIONES MEJORADAS === */
.fade-enter-active, .fade-leave-active {
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-enter-from, .fade-leave-to {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
}

.slide-up-enter-active, .slide-up-leave-active {
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-up-enter-from, .slide-up-leave-to {
    transform: translateY(60px);
    opacity: 0;
}

.skill-enter-active {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-enter-from {
    opacity: 0;
    transform: scale(0.7) translateY(30px) rotateX(45deg);
}

.project-enter-active {
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-enter-from {
    opacity: 0;
    transform: translateX(-50px) rotateY(-10deg);
}

/* === SCROLLBAR PERSONALIZADA === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-color);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-accent);
}

/* === EFECTOS DE SELECCIÓN === */
::selection {
    background: rgba(255, 107, 157, 0.3);
    color: var(--text-white);
}

::-moz-selection {
    background: rgba(255, 107, 157, 0.3);
    color: var(--text-white);
}

/* === RESPONSIVE MEJORADO === */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .nav-link span {
        display: none;
    }
    
    .main-container {
        padding: 1rem;
        margin-top: 110px;
    }
    
    .profile-image {
        width: 160px;
        height: 160px;
        font-size: 3.5rem;
    }
    
    .name-section h1 {
        font-size: 2.2rem;
    }
    
    .card-title {
        font-size: 1.5rem;
    }
    
    .vertical-card {
        padding: 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-column {
        grid-template-columns: 1fr;
    }
    
    .project-links {
        flex-direction: column;
    }
    
    .project-link {
        flex: none;
    }
}
section {
    scroll-margin-top: 100px; /* Ajusta al alto real del navbar */
  }
  
  /* Imagen de proyectos */
  .project-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 1rem;
    object-fit: contain;
  }
  
  
  .project-image:hover {
    transform: scale(1.05);
  }
@media (max-width: 480px) {
    .nav-menu {
        gap: 1rem;
        padding: 0.8rem;
    }

    .profile-image {
        width: 150px;
        height: 150px;
        border-radius: 50%;
        margin: 0 auto 2rem;
        overflow: hidden; /* recorta la foto en círculo */
        box-shadow: var(--shadow-glow);
        position: relative;
        animation: float 6s ease-in-out infinite;
      }
      
      .profile-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;   /* 🔹 llena el círculo sin deformarse */
        object-position: center; /* centra la parte más importante (ej. cara) */
        display: block;
      }
      
      
    
    .name-section h1 {
        font-size: 1.8rem;
    }
    
    .vertical-card {
        padding: 1.2rem;
        margin-bottom: 1.5rem;
    }
    
    .skills-column {
        grid-template-columns: 1fr;
    }
}