* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-blue: #2563eb;
  --secondary-blue: #1d4ed8;
  --accent-blue: #3b82f6;
  --neon-blue: #0ea5e9;
  --dark-blue: #1e40af;
  --text-primary: #ffffff;
  --text-secondary: #b3ccff;
  --text-muted: #6b8bb3;
  --bg-primary: #000814;
  --bg-secondary: #001122;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --border-glass: rgba(255, 255, 255, 0.1);
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  --gradient-secondary: linear-gradient(135deg, #001a33 0%, #003366 100%);
  --gradient-accent: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.1) 0%,
    rgba(14, 165, 233, 0.1) 100%
  );
  --shadow-neon: 0 0 30px rgba(14, 165, 233, 0.3);
  --shadow-blue: 0 0 50px rgba(37, 99, 235, 0.2);
}

[data-theme="light"] {
  --primary-blue: #1f2937;
  --secondary-blue: #374151;
  --accent-blue: #4b5563;
  --neon-blue: #059669;
  --dark-blue: #111827;
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-card: rgba(17, 24, 39, 0.03);
  --bg-glass: rgba(255, 255, 255, 0.9);
  --border-glass: rgba(17, 24, 39, 0.1);
  --gradient-primary: linear-gradient(135deg, #1f2937 0%, #059669 100%);
  --gradient-secondary: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  --gradient-accent: linear-gradient(
    135deg,
    rgba(31, 41, 55, 0.05) 0%,
    rgba(5, 150, 105, 0.05) 100%
  );
  --shadow-neon: 0 0 30px rgba(5, 150, 105, 0.15);
  --shadow-blue: 0 0 50px rgba(31, 41, 55, 0.1);
}

body {
  font-family: "Space Grotesk", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
}

/* Animated Background */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--bg-primary);
}

.bg-animation::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 80%,
      rgba(0, 102, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(0, 212, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(51, 102, 255, 0.1) 0%,
      transparent 50%
    );
  animation: bgPulse 8s ease-in-out infinite;
}

@keyframes bgPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Floating Particles */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--neon-blue);
  border-radius: 50%;
  animation: float 20s infinite linear;
  opacity: 0.6;
}

@keyframes float {
  0% {
    transform: translateY(100vh) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100px) translateX(100px);
    opacity: 0;
  }
}

/* Navigation - FIXED AND IMPROVED */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(25px);
  border-bottom: 1px solid var(--border-glass);
  padding: 1rem 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 80px;
  display: flex;
  align-items: center;
}

[data-theme="dark"] .navbar {
  background: rgba(0, 8, 20, 0.9);
}

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100%;
}

.logo {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-blue);
  text-decoration: none;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1005;
}

.logo:hover {
  color: var(--neon-blue);
  transform: scale(1.05);
}

/* Desktop Navigation */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 0;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5rem;
  border-radius: 50px;
  border: 1px solid var(--border-glass);
}

[data-theme="light"] .nav-menu {
  background: rgba(15, 23, 42, 0.05);
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  white-space: nowrap;
  display: block;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--primary-blue);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 1005;
  position: relative;
}

.theme-toggle {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-secondary);
  font-size: 1.1rem;
  z-index: 1005;
}

.theme-toggle:hover {
  background: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

/* HAMBURGER MENU - WORKING VERSION */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
  z-index: 1010;
  position: relative;
  width: 30px;
  height: 30px;
  justify-content: center;
  align-items: center;
  padding: 5px;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  display: block;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay - WORKING VERSION */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.mobile-overlay.active {
  display: block !important;
}

/* Header background when menu is open */
.navbar.menu-open {
  background: var(--bg-primary) !important;
  backdrop-filter: none !important;
  border-bottom: 1px solid var(--border-glass) !important;
}

[data-theme="light"] .navbar.menu-open {
  background: #ffffff !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.2) !important;
}

[data-theme="dark"] .navbar.menu-open {
  background: #000814 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 6rem;
  max-width: 1400px;
  width: 100%;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  margin-bottom: 2rem;
  font-size: 0.85rem;
  color: var(--neon-blue);
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 400;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 3rem;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn-primary,
.btn-secondary {
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  border: none;
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-neon);
}

.btn-secondary {
  background: transparent;
  color: var(--neon-blue);
  border: 1px solid var(--neon-blue);
}

.btn-secondary:hover {
  background: var(--neon-blue);
  color: var(--bg-primary);
  transform: translateY(-3px);
}

/* Profile Card */
.profile-card {
  position: relative;
  perspective: 1000px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.profile-inner {
  position: relative;
  width: 400px;
  height: 500px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 30px;
  backdrop-filter: blur(20px);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-inner:hover {
  transform: rotateY(5deg) rotateX(5deg);
  box-shadow: var(--shadow-neon);
}

.profile-image-container {
  position: relative;
  margin-bottom: 2rem;
}

.profile-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid transparent;
  background: var(--gradient-primary);
  padding: 3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-image-container::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
  filter: blur(20px);
}

.profile-inner:hover .profile-image-container::before {
  opacity: 0.6;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
  margin-top: 1rem;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 15px;
  border: 1px solid var(--border-glass);
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--neon-blue);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Sections */
.section {
  padding: 8rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--neon-blue);
}

.section-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* About Grid */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.about-content p {
  margin-bottom: 1.5rem;
}

.about-features {
  display: grid;
  gap: 1.5rem;
}

.feature-item {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.feature-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-accent);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.feature-item:hover::before {
  left: 0;
}

.feature-item:hover {
  transform: translateX(10px);
  border-color: var(--neon-blue);
}

.feature-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: white;
  font-size: 1.25rem;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.feature-description {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Experience Timeline */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gradient-primary);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 4rem;
  display: flex;
  align-items: center;
}

.timeline-item:nth-child(odd) {
  flex-direction: row-reverse;
}

.timeline-content {
  width: 45%;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-content:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-neon);
}

.timeline-marker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  box-shadow: var(--shadow-blue);
}

.timeline-period {
  background: var(--neon-blue);
  color: var(--bg-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: inline-block;
}

.timeline-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.timeline-company {
  color: var(--neon-blue);
  font-weight: 600;
  margin-bottom: 1rem;
}

.timeline-description {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.skill-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 25px;
  padding: 2.5rem;
  backdrop-filter: blur(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-card:hover::before {
  transform: scaleX(1);
}

.skill-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-neon);
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.skill-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.skill-category-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.skill-list {
  display: grid;
  gap: 1.5rem;
}

.skill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.skill-name {
  font-weight: 500;
  color: var(--text-secondary);
}

.skill-level {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.skill-progress {
  width: 100px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.skill-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-percentage {
  font-size: 0.9rem;
  color: var(--neon-blue);
  font-weight: 600;
  min-width: 35px;
}

/* ========================================
   CONTACT SECTION - RESPONSIVE COMPLETO
   ======================================== */

/* CONTACT GRID - BASE */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-info {
  display: grid;
  gap: 1.5rem;
  width: 100%;
}

/* CONTACT CARDS */
.contact-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 1.5rem;
  backdrop-filter: blur(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 80px;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-neon);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-details {
  flex: 1;
  min-width: 0;
}

.contact-details h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.contact-details p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-word;
  hyphens: auto;
}

/* CONTACT FORM */
.contact-form {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 25px;
  padding: 2.5rem;
  backdrop-filter: blur(20px);
  width: 100%;
  max-width: none;
  height: fit-content;
}

.contact-form h3 {
  margin-bottom: 2rem;
  color: var(--text-primary);
  font-size: 1.5rem;
  text-align: center;
}

/* FORM GRID */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  position: relative;
  width: 100%;
}

.form-group.full-width {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
  margin-top: 1.25rem;
}

/* FORM INPUTS */
.form-input,
.form-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 15px;
  padding: 1rem 1.5rem;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: transparent;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
  padding: 1rem 1.5rem;
}

/* FORM LABELS */
.form-label {
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  color: var(--text-muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  background: transparent;
  z-index: 1;
  font-size: 1rem;
}

.form-label.active,
.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label,
.form-textarea:focus + .form-label,
.form-textarea:not(:placeholder-shown) + .form-label {
  top: -0.75rem;
  left: 1rem;
  font-size: 0.8rem;
  color: var(--neon-blue);
  background: var(--bg-primary);
  padding: 0 0.5rem;
  border-radius: 4px;
}

.form-textarea:placeholder-shown + .form-label:not(.active) {
  top: 1rem;
  left: 1.5rem;
  font-size: 1rem;
  color: var(--text-muted);
  background: transparent;
  padding: 0;
}

/* SUBMIT BUTTON */
.contact-form .btn-primary {
  width: 100%;
  justify-content: center;
  margin-top: 1rem;
  padding: 1.25rem 2rem;
  font-size: 1.1rem;
}

/* ========================================
   TARJETA DIGITAL - SIN SUBRAYADO
   ======================================== */

.contact-card-simple {
  text-decoration: none !important;
  color: inherit;
  position: relative;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-card-simple,
.contact-card-simple:hover,
.contact-card-simple:focus,
.contact-card-simple:active,
.contact-card-simple:visited,
.contact-card-simple:link {
  text-decoration: none !important;
  outline: none;
  border: none;
}

.contact-card-simple:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-neon);
  text-decoration: none !important;
}

.contact-card-simple .contact-icon {
  background: var(--gradient-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-card-simple:hover .contact-icon {
  transform: scale(1.05);
}

.contact-card-simple .contact-details h3,
.contact-card-simple .contact-details p {
  text-decoration: none !important;
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-glass);
  padding: 3rem 2rem;
  text-align: center;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  align-items: center;
}

.footer-logo {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--neon-blue);
}

.footer-text {
  color: var(--text-muted);
  text-align: center;
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-link {
  width: 50px;
  height: 50px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link:hover {
  background: var(--neon-blue);
  color: var(--bg-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-neon);
}

/* Utilia Watermark */
.utilia-watermark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-glass);
  background: var(--bg-glass);
  border-radius: 15px 15px 0 0;
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.utilia-watermark::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(37, 99, 235, 0.05),
    transparent
  );
  transition: left 2s ease-in-out;
}

.utilia-watermark:hover::before {
  left: 100%;
}

.utilia-watermark:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
  border-color: var(--neon-blue);
}

.watermark-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 2;
}

.utilia-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  padding: 0.4rem 0.6rem;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.2);
  position: relative;
  z-index: 2;
}

.utilia-link:hover {
  transform: scale(1.08);
  background: rgba(37, 99, 235, 0.2);
  border-color: var(--neon-blue);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.utilia-logo {
  height: 25px;
  width: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(1.2) saturate(1.1);
  object-fit: contain;
}

[data-theme="light"] .utilia-watermark {
  background: rgba(255, 255, 255, 0.8);
  border-top: 1px solid rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .utilia-link {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.15);
}

[data-theme="light"] .utilia-link:hover {
  background: rgba(37, 99, 235, 0.15);
}

[data-theme="light"] .utilia-logo {
  filter: brightness(0.9) saturate(1.2);
}

.utilia-logo:hover {
  filter: brightness(1.4) saturate(1.3);
  transform: rotate(2deg);
}

[data-theme="light"] .utilia-logo:hover {
  filter: brightness(1.1) saturate(1.4);
}

/* Animations */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-up {
  animation: slideInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-left {
  animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-right {
  animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE DESIGN - COMPLETELY FIXED FOR MOBILE */
@media (max-width: 1200px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
    justify-items: center;
    align-items: center;
  }

  .profile-card {
    order: -1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* MOBILE STYLES - WORKING VERSION */
@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }

  /* NAVBAR MOBILE */
  .navbar {
    height: 70px;
    padding: 0.75rem 0;
  }

  .nav-container {
    padding: 0 1rem;
  }

  /* SHOW HAMBURGER */
  .hamburger {
    display: flex !important;
  }

  /* MOBILE MENU - WORKING VERSION */
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    height: calc(100vh - 70px);
    background: var(--bg-primary);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 1.5rem;
    padding: 3rem 1.5rem 2rem 1.5rem;
    border-radius: 0;
    border: none;
    z-index: 1001;
    overflow-y: auto;
    margin: 0;
    display: none;
    box-sizing: border-box;
  }

  [data-theme="light"] .nav-menu {
    background: #ffffff;
    border-top: 1px solid rgba(15, 23, 42, 0.1);
  }

  [data-theme="dark"] .nav-menu {
    background: #000814;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-menu.active {
    display: flex !important;
  }

  .nav-link {
    font-size: 1.25rem;
    padding: 1rem 2rem;
    text-align: center;
    width: 100%;
    max-width: 280px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 15px;
    margin: 0;
    display: block;
    flex-shrink: 0;
  }

  .nav-link:hover,
  .nav-link.active {
    background: var(--primary-blue);
    color: white;
  }

  /* HERO MOBILE */
  .hero {
    padding-top: 2rem;
    min-height: calc(100vh - 70px);
    transform: none !important;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .btn-primary,
  .btn-secondary {
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  /* SECTIONS */
  .section {
    padding: 4rem 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  /* PROFILE CARD MOBILE */
  .profile-inner {
    width: 100%;
    max-width: 350px;
    height: auto;
    padding: 2rem 1.5rem;
    margin: 0 auto;
  }

  .profile-card {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
  }

  /* TIMELINE MOBILE */
  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 60px;
  }

  .timeline-item:nth-child(odd) {
    flex-direction: column;
  }

  .timeline-content {
    width: 100%;
  }

  .timeline-marker {
    left: 20px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  /* ========================================
     CONTACT RESPONSIVE - MOBILE LARGE (768px)
     ======================================== */

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: 100%;
  }

  .contact-info {
    order: 2;
  }

  .contact-form {
    order: 1;
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }

  .contact-form h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .form-input,
  .form-textarea {
    font-size: 16px;
    padding: 1rem 1.25rem;
  }

  .form-label {
    font-size: 0.9rem;
    left: 1.25rem;
  }

  .form-label.active,
  .form-input:focus + .form-label,
  .form-input:not(:placeholder-shown) + .form-label,
  .form-textarea:focus + .form-label,
  .form-textarea:not(:placeholder-shown) + .form-label {
    font-size: 0.75rem;
    left: 0.75rem;
  }

  .contact-card {
    padding: 1.25rem;
    gap: 1rem;
    border-radius: 15px;
  }

  .contact-icon {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
    border-radius: 12px;
  }

  .contact-details h3 {
    font-size: 0.95rem;
  }

  .contact-details p {
    font-size: 0.85rem;
  }
}

/* SMALL MOBILE FIXES */
@media (max-width: 480px) {
  body {
    padding-top: 60px;
  }

  .navbar {
    height: 60px;
    padding: 0.5rem 0;
  }

  .nav-container {
    padding: 0 0.75rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .hamburger {
    width: 25px;
    height: 25px;
  }

  .hamburger span {
    width: 20px;
    height: 1.5px;
  }

  .nav-menu {
    top: 60px;
    height: calc(100vh - 60px);
    padding: 2rem 1rem;
  }

  .nav-link {
    font-size: 1.1rem;
    padding: 0.9rem 1.5rem;
    max-width: 250px;
    flex-shrink: 0;
  }

  .hero {
    min-height: calc(100vh - 60px);
    padding: 2rem 1rem;
    transform: none !important;
  }

  .section {
    padding: 3rem 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .profile-inner {
    padding: 1.5rem;
    max-width: 320px;
  }

  .utilia-watermark {
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 1rem 1rem 1.25rem 1rem;
    text-align: center;
  }

  .watermark-text {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
  }

  .utilia-link {
    padding: 0.5rem 0.8rem;
  }

  .utilia-logo {
    height: 14px;
  }

  /* ========================================
     CONTACT RESPONSIVE - MOBILE SMALL (480px)
     ======================================== */

  .contact-grid {
    gap: 1.5rem;
    padding: 0;
  }

  .contact-form {
    padding: 1.5rem 1rem;
    border-radius: 15px;
  }

  .contact-form h3 {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
  }

  .form-input,
  .form-textarea {
    padding: 0.9rem 1rem;
    border-radius: 12px;
  }

  .form-label {
    left: 1rem;
  }

  .form-label.active,
  .form-input:focus + .form-label,
  .form-input:not(:placeholder-shown) + .form-label,
  .form-textarea:focus + .form-label,
  .form-textarea:not(:placeholder-shown) + .form-label {
    left: 0.5rem;
  }

  .contact-form .btn-primary {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }

  .contact-card {
    flex-direction: column;
    text-align: center;
    padding: 1rem 0.75rem;
    gap: 0.75rem;
    min-height: auto;
  }

  .contact-icon {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
    margin: 0 auto;
  }

  .contact-details h3 {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
  }

  .contact-details p {
    font-size: 0.8rem;
    word-break: break-all;
  }
}

/* WhatsApp Float Button */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 900;
}

.whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: #25d366;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  position: relative;
  overflow: hidden;
}

.whatsapp-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-btn:hover::before {
  transform: scale(1);
}

.whatsapp-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  background: #128c7e;
}

.whatsapp-btn i {
  position: relative;
  z-index: 1;
}

@keyframes whatsappPulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  }
  50% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.5), 0 0 0 8px rgba(37, 211, 102, 0.1);
  }
}

.whatsapp-btn {
  animation: whatsappPulse 3s infinite;
}

@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 1.5rem;
    left: 1.5rem;
  }
  
  .whatsapp-btn {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 1rem;
    left: 1rem;
  }
  
  .whatsapp-btn {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
  }
}

/* Matrix */
.matrix-portal {
  position: fixed;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%);
  z-index: 999;
}

.matrix-portal-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #000000, #00ff41);
  color: #ffffff;
  padding: 1rem;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
  animation: matrix-pulse 3s infinite;
}

.matrix-portal-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 40px rgba(0, 255, 65, 0.6);
}

@keyframes matrix-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 65, 0.3); }
  50% { box-shadow: 0 0 40px rgba(0, 255, 65, 0.6); }
}

.matrix-link {
  position: relative;
  overflow: hidden;
}

.matrix-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.2), transparent);
  transition: left 0.5s ease;
}

.matrix-link:hover::before {
  left: 100%;
}

/* ========================================
   RESPONSIVE BREAKPOINTS ADICIONALES PARA CONTACT
   ======================================== */

@media (max-width: 1024px) {
  .contact-grid {
    gap: 3rem;
  }
  
  .contact-form {
    padding: 2rem;
  }
  
  .contact-form h3 {
    font-size: 1.4rem;
  }
}

@media (max-width: 640px) {
  .contact-grid {
    gap: 2rem;
    padding: 0 0.5rem;
  }
  
  .contact-form {
    padding: 1.5rem 1.25rem;
  }
  
  .contact-form h3 {
    font-size: 1.2rem;
  }
  
  .contact-card {
    padding: 1rem;
    min-height: 70px;
  }
  
  .contact-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

@media (max-width: 360px) {
  .contact-form {
    padding: 1.25rem 0.75rem;
  }
  
  .contact-form h3 {
    font-size: 1rem;
  }
  
  .form-input,
  .form-textarea {
    padding: 0.8rem 0.9rem;
    font-size: 15px;
  }
  
  .contact-card {
    padding: 0.75rem;
  }
  
  .contact-icon {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }
  
  .contact-details h3 {
    font-size: 0.85rem;
  }
  
  .contact-details p {
    font-size: 0.75rem;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--neon-blue);
}

/* Selection */
::selection {
  background: rgba(0, 212, 255, 0.3);
  color: var(--text-primary);
}

/* ========================================
   MEJORAS ADICIONALES DE ACCESSIBILITY
   ======================================== */

.form-input:invalid:not(:focus):not(:placeholder-shown) {
  border-color: #ef4444;
}

.form-input:valid:not(:focus):not(:placeholder-shown) {
  border-color: var(--neon-blue);
}

@media (prefers-reduced-motion: reduce) {
  .contact-card,
  .contact-form,
  .form-input,
  .form-textarea,
  .form-label {
    transition: none;
  }
}

@media (prefers-contrast: high) {
  .contact-card {
    border: 2px solid var(--border-glass);
  }
  
  .form-input,
  .form-textarea {
    border: 2px solid var(--border-glass);
  }
  
  .form-input:focus,
  .form-textarea:focus {
    border: 2px solid var(--neon-blue);
  }
}