/* ==============================================
   CYBER-NOIR PORTFOLIO STYLES - TearsDev
   ============================================== */

/* CSS Custom Properties */
:root {
  /* Colors - Cyber Palette */
  --primary-green: #26D926;
  --primary-green-hover: #1FB81F;
  --primary-green-glow: #9BFFA3;
  --primary-green-dark: #1A8B1A;
  
  /* Neutral Colors */
  --bg-primary: #0B0B0E;
  --bg-secondary: #121418;
  --bg-tertiary: #1D2127;
  --text-primary: #E6EAF2;
  --text-secondary: #A9B0BC;
  --text-muted: #6B7280;
  
  /* Accent Colors */
  --accent-purple: #8B5CF6;
  --accent-blue: #3B82F6;
  --accent-cyan: #06B6D4;
  
  /* Typography */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Spacing */
  --container-max: 1200px;
  --section-padding: 8rem 0;
  --grid-gap: 2rem;
  
  /* Animations */
  --transition-fast: 0.2s ease-out;
  --transition-normal: 0.3s ease-out;
  --transition-slow: 0.5s ease-out;
  
  /* Effects */
  --glow-size: 0 0 20px;
  --border-radius: 12px;
  --border-radius-lg: 20px;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none !important;
}

/* Hide default cursor everywhere */
*, *::before, *::after {
  cursor: none !important;
}

html {
  cursor: none !important;
  scroll-behavior: smooth;
}

/* Pulse animation for cursor */
@keyframes pulse {
  0%, 100% { 
    box-shadow: 0 0 15px var(--primary-green), 0 0 30px var(--primary-green-glow);
  }
  50% { 
    box-shadow: 0 0 25px var(--primary-green), 0 0 50px var(--primary-green-glow);
  }
}

/* Custom Cursor */
.cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  background: #26D926;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999999;
  box-shadow: 0 0 15px #26D926, 0 0 30px #9BFFA3;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease;
  display: none;
}

.cursor.hover {
  transform: translate(-50%, -50%) scale(1.5);
  background: #1FB81F;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}

h1 { font-size: clamp(2.5rem, 8vw, 6rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 4vw, 2rem); }

p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Loading Screen */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-primary);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.loader {
  text-align: center;
}

.cat-logo {
  margin-bottom: 2rem;
  animation: pulse 2s ease-in-out infinite;
}

.logo-loading {
  width: 80px;
  height: 80px;
  filter: drop-shadow(var(--glow-size) var(--primary-green-glow));
}

.loading-text {
  display: flex;
  gap: 0.1rem;
  margin-bottom: 2rem;
}

.loading-char,
.loading-dot {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--primary-green);
  animation: loadingPulse 1.5s ease-in-out infinite;
}

.loading-char:nth-child(1) { animation-delay: 0.1s; }
.loading-char:nth-child(2) { animation-delay: 0.2s; }
.loading-char:nth-child(3) { animation-delay: 0.3s; }
.loading-char:nth-child(4) { animation-delay: 0.4s; }
.loading-char:nth-child(5) { animation-delay: 0.5s; }
.loading-char:nth-child(6) { animation-delay: 0.6s; }
.loading-char:nth-child(7) { animation-delay: 0.7s; }
.loading-char:nth-child(8) { animation-delay: 0.8s; }
.loading-char:nth-child(9) { animation-delay: 0.9s; }
.loading-dot:nth-child(10) { animation-delay: 1s; }
.loading-dot:nth-child(11) { animation-delay: 1.1s; }
.loading-dot:nth-child(12) { animation-delay: 1.2s; }

.loading-bar {
  width: 200px;
  height: 2px;
  background: var(--bg-secondary);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}

.loading-progress {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-green), var(--primary-green-glow));
  animation: loadingProgress 3s ease-out infinite;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  z-index: 1000;
  background: rgba(11, 11, 14, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(38, 217, 38, 0.1);
  transition: all var(--transition-normal);
}

.nav.scrolled {
  background: rgba(11, 11, 14, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border-bottom-color: rgba(38, 217, 38, 0.3);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  max-width: var(--container-max);
  margin: 0 auto;
  height: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Language Switch */
.language-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(38, 217, 38, 0.1);
  border: 1px solid rgba(38, 217, 38, 0.2);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.language-switch:hover {
  background: rgba(38, 217, 38, 0.15);
  border-color: rgba(38, 217, 38, 0.4);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.lang-option:hover {
  opacity: 1;
  background: rgba(38, 217, 38, 0.1);
}

.lang-option.active {
  opacity: 1;
  background: rgba(38, 217, 38, 0.2);
  color: var(--primary-green);
}

.lang-option .flag {
  font-size: 1rem;
  display: inline-block;
}

.lang-option .lang-text {
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-mono);
}

.lang-separator {
  color: rgba(38, 217, 38, 0.5);
  font-weight: 300;
  user-select: none;
}

/* Language transition effects */
body.language-transition {
  overflow-x: hidden;
}

body.language-transition .language-switch {
  position: relative;
}

body.language-transition .language-switch::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, transparent, rgba(38, 217, 38, 0.3), transparent);
  border-radius: 10px;
  z-index: -1;
  animation: scan 0.6s ease-in-out;
}

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

/* Enhanced language switch hover */
.language-switch:hover {
  background: rgba(38, 217, 38, 0.15);
  border-color: rgba(38, 217, 38, 0.4);
  transform: translateY(-1px);
  transition: all 0.3s ease;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.nav-logo .logo {
  width: 3.5rem;
  height: 3.5rem;
  transition: transform var(--transition-normal);
}

.nav-logo:hover .logo {
  transform: scale(1.1) rotate(5deg);
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
  transition: color var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-green);
}

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.nav-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-normal);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: calc(100vh); /* Ajustar altura considerando el navbar */
  display: flex;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(38, 217, 38, 0.03) 0%, transparent 50%);
  margin-top: 100px; /* Usar margin en lugar de padding */
}

.hero-3d {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
}

.hero-text {
  max-width: 600px;
}

.hero-title {
  margin-bottom: 1.5rem;
}

.title-line {
  display: block;
  opacity: 0;
  transform: translateY(50px);
  animation: fadeInUp 0.8s ease-out forwards;
}

.title-line:nth-child(1) { animation-delay: 0.2s; }
.title-line:nth-child(2) { animation-delay: 0.4s; }
.title-line:nth-child(3) { animation-delay: 0.6s; }

.title-line.glow {
  color: var(--primary-green);
  text-shadow: var(--glow-size) var(--primary-green-glow);
  position: relative;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

.cyber-text {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--primary-green);
  margin-top: 0.5rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 1s forwards;
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  background: rgba(29, 33, 39, 0.5);
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(38, 217, 38, 0.1);
  backdrop-filter: blur(10px);
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 1.2s forwards;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-green);
  font-family: var(--font-mono);
  text-shadow: var(--glow-size) var(--primary-green-glow);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Ajustar el indicador de scroll */
.scroll-indicator {
  position: absolute;
  bottom: 130px;
  left: 50%;
  transform: translateX(-50%); /* Centrar en eje X */
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.8;
}

.mouse {
  width: 24px;
  height: 40px;
  border: 2px solid var(--primary-green);
  border-radius: 12px;
  margin: 0 auto 0.5rem;
  position: relative;
}

.wheel {
  width: 2px;
  height: 8px;
  background: var(--primary-green);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 2s ease-in-out infinite;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  min-width: 140px;
}

.btn-primary {
  background: var(--primary-green);
  color: var(--bg-primary);
  box-shadow: var(--glow-size) rgba(38, 217, 38, 0.3);
}

.btn-primary:hover {
  background: var(--primary-green-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(38, 217, 38, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--primary-green);
  border: 2px solid var(--primary-green);
}

.btn-outline:hover {
  background: var(--primary-green);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

.btn-glow {
  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;
}

.btn:hover .btn-glow {
  left: 100%;
}

/* Section Styles */
section {
  padding: var(--section-padding);
  position: relative;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 4rem;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--text-primary);
}

.title-number {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--primary-green);
  text-shadow: var(--glow-size) var(--primary-green-glow);
}

/* About Section */
.about {
  background: linear-gradient(135deg, rgba(18, 20, 24, 0.5) 0%, rgba(29, 33, 39, 0.3) 100%);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-intro {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.highlight {
  color: var(--primary-green);
  font-weight: 600;
}

.about-details {
  display: grid;
  gap: 1.5rem;
}

.detail h3 {
  color: var(--primary-green);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

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

.code-window {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  border: 1px solid rgba(38, 217, 38, 0.1);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid rgba(38, 217, 38, 0.1);
}

.window-controls {
  display: flex;
  gap: 0.5rem;
}

.control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.control.close { background: #ff5f57; }
.control.minimize { background: #ffbd2e; }
.control.maximize { background: #28ca42; }

.window-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.code-content {
  padding: 2rem;
}

.code-content pre {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
  overflow-x: auto;
}

.code-keyword { color: #ff79c6; }
.code-variable { color: #8be9fd; }
.code-property { color: #50fa7b; }
.code-string { color: #f1fa8c; }

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--grid-gap);
}

.project-card {
  background: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: 1px solid rgba(38, 217, 38, 0.1);
  transition: all var(--transition-normal);
  position: relative;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(38, 217, 38, 0.1);
  border-color: rgba(38, 217, 38, 0.3);
}

.project-image {
  height: 200px;
  background: linear-gradient(135deg, var(--primary-green-dark) 0%, var(--primary-green) 100%);
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.project-card[data-project="1"] .project-image {
    background: linear-gradient(135deg, #121418 0%, #1D2127 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-card[data-project="1"] .project-image::before {
    content: '⚠️';
    font-size: 4rem;
    opacity: 0.3;
    animation: pulse-warning 2s ease-in-out infinite;
}

.project-card[data-project="1"] .project-image::after {
    content: 'EN DESARROLLO';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #26D926;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 2px;
    opacity: 0.8;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.project-card[data-project="2"] .project-image {
    background-image: url('../images/rie-salud.png'), linear-gradient(135deg, var(--primary-green-dark) 0%, var(--primary-green) 100%);
}

.project-card[data-project="3"] .project-image {
    background-image: url('../images/clinica-sur.png'), linear-gradient(135deg, var(--primary-green-dark) 0%, var(--primary-green) 100%);
}

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

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

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

.project-link {
  padding: 0.75rem 1.5rem;
  background: var(--primary-green);
  color: var(--bg-primary);
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
}

.project-link:hover {
  background: var(--primary-green-hover);
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
}

.project-title {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  padding: 0.25rem 0.75rem;
  background: rgba(38, 217, 38, 0.1);
  color: var(--primary-green);
  font-size: 0.8rem;
  border-radius: 20px;
  font-family: var(--font-mono);
}

/* Skills Section */
.skills {
  background: var(--bg-secondary);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

.skill-category {
  background: rgba(18, 20, 24, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(38, 217, 38, 0.1);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.skill-category::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-green), transparent);
  transition: left 0.6s ease;
}

.skill-category:hover::before {
  left: 100%;
}

.skill-category:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(38, 217, 38, 0.4);
  box-shadow: 0 15px 40px rgba(38, 217, 38, 0.2);
}

.category-title {
  color: var(--primary-green);
  margin-bottom: 2rem;
  font-size: 1.3rem;
  text-align: center;
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.3s ease;
  padding: 0.75rem;
  border-radius: 6px;
  cursor: pointer;
}

.skill-item:hover {
  background: rgba(38, 217, 38, 0.1);
  transform: translateX(5px);
}

.skill-item:hover .skill-name {
  color: var(--primary-green);
}

.skill-name {
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
}

.skill-bar {
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-green), var(--primary-green-glow));
  width: 0%;
  transition: width 1s ease-out;
  position: relative;
}

.skill-progress::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: white;
  box-shadow: 0 0 10px var(--primary-green);
}

/* Contact Section */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-title {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.contact-text {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.1rem;
  line-height: 1.6;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--border-radius);
  border: 1px solid rgba(38, 217, 38, 0.1);
  transition: all var(--transition-normal);
}

.contact-link:hover {
  background: rgba(38, 217, 38, 0.1);
  border-color: var(--primary-green);
  transform: translateX(5px);
}

.contact-link .icon {
  font-size: 1.2rem;
  color: var(--primary-green);
  width: 24px;
  text-align: center;
}

/* Contact Form */
.contact-form {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(38, 217, 38, 0.1);
}

.form-group {
  position: relative;
  margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: var(--bg-primary);
  border: 1px solid rgba(169, 176, 188, 0.3);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(38, 217, 38, 0.15);
  transform: translateY(-2px);
}

.form-group input.error,
.form-group textarea.error {
  border-color: rgba(255, 95, 87, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 95, 87, 0.1);
}

.form-group label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: var(--text-secondary);
  font-size: 1rem;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg-primary);
  padding: 0 0.5rem;
  border-radius: 4px;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -0.5rem;
  left: 0.75rem;
  font-size: 0.8rem;
  color: var(--primary-green);
  background: var(--bg-primary);
  padding: 0 0.5rem;
  transform: scale(0.95);
}

.submit-btn {
  width: 100%;
  justify-content: center;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #0B0B0E 0%, #121418 100%);
  color: #A3A3A3;
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(38, 217, 38, 0.1);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #26D926, transparent);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-logo h3 {
  color: #26D926;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.footer-logo .logo {
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease;
}

.footer-description {
  color: #A3A3A3;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(38, 217, 38, 0.1);
  border: 1px solid rgba(38, 217, 38, 0.2);
  border-radius: 8px;
  color: #26D926;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.social-link:hover {
  background: rgba(38, 217, 38, 0.2);
  border-color: #26D926;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(38, 217, 38, 0.3);
}

.footer-section h4 {
  color: #FFFFFF;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  position: relative;
}

.footer-section h4::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 2px;
  background: #26D926;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a,
.footer-nav-link {
  color: #A3A3A3;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-links a:hover,
.footer-nav-link:hover {
  color: #26D926;
  transform: translateX(5px);
}

.footer-contact p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  color: #A3A3A3;
}

.footer-contact svg {
  color: #26D926;
  flex-shrink: 0;
}

.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(38, 217, 38, 0.3), transparent);
  margin: 2rem 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
}

.footer-bottom p {
  margin: 0;
  color: #666;
  font-size: 0.875rem;
}

.footer-quote {
  font-style: italic;
  color: #26D926 !important;
  opacity: 0.8;
}

/* Animations */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes loadingPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes loadingProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}

@keyframes scrollWheel {
  0% { top: 8px; opacity: 1; }
  100% { top: 20px; opacity: 0; }
}

@keyframes scan {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: -100%; }
}

/* Responsive Design */
/* ===== RESPONSIVE DESIGN ===== */

/* Large Desktop: 1200px+ */
@media (min-width: 1200px) {
  .container {
    max-width: 1400px;
  }
  
  .hero-content {
    gap: 4rem;
  }
  
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktop: 1024px - 1199px */
@media (max-width: 1199px) {
  .container {
    max-width: 1000px;
  }
}

/* Tablet Large: 1024px */
@media (max-width: 1024px) {
  :root {
    --section-padding: 4rem 0;
  }
  
  .container {
    padding: 0 2rem;
  }
  
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    padding: 0 2rem;
  }
  
  .hero-text {
    max-width: 100%;
  }
  
  .hero-stats {
    flex-direction: row;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
    gap: 1.5rem;
  }
  
  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
  
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  /* Footer Tablet */
  .footer-content {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
  }
}

/* Tablet: 768px - 1023px */
@media (max-width: 768px) {
  :root {
    --section-padding: 3rem 0;
  }
  
  .container {
    padding: 0 1.5rem;
    max-width: 100%;
    width: 100%;
  }
  
  /* Navigation Mobile */
  .nav-container {
    padding: 1rem 1.5rem;
  }
  
  .nav-right {
    gap: 1rem;
  }
  
  .language-switch {
    padding: 0.4rem 0.8rem;
    gap: 0.4rem;
  }
  
  .lang-option {
    padding: 0.2rem 0.4rem;
  }
  
  .lang-option .flag {
    font-size: 0.9rem;
  }
  
  .lang-option .lang-text {
    font-size: 0.8rem;
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(11, 11, 14, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 2rem 0;
    transition: right 0.3s ease;
    z-index: 1000;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-link {
    font-size: 1.1rem;
    padding: 1rem 2rem;
    width: 100%;
    text-align: center;
    text-decoration: none !important;
    outline: none !important;
    border: none;
  }
  
  .nav-link:focus,
  .nav-link:active,
  .nav-link:visited {
    text-decoration: none !important;
    outline: none !important;
  }
  
  .nav-link::after {
    display: none !important;
  }
  
  .nav-link:hover::after,
  .nav-link.active::after {
    display: none !important;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  /* Hero Mobile */
  .hero {
    min-height: 100vh;
    height: 100vh;
    padding: 80px 0 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
  }
  
  .hero-3d {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.2;
  }
  
  .hero-content {
    width: 100%;
    max-width: 100%;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.5rem;
    z-index: 10;
    position: relative;
    text-align: left;
  }
  
  .hero-text {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .hero-title {
    font-size: clamp(2rem, 12vw, 3rem);
    margin-bottom: 1rem;
    line-height: 1.1;
    text-align: left;
  }
  
  .title-line {
    display: block;
    margin-bottom: 0.2rem;
    text-align: left;
  }
  
  .title-line:first-child {
    font-size: 0.9em;
    opacity: 0.8;
  }
  
  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    max-width: 280px;
    text-align: left;
  }
  
  .cyber-text {
    display: inline;
    font-size: 1rem;
    opacity: 0.8;
    font-family: var(--font-mono);
    color: var(--primary-green);
  }
  
  .hero-cta {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 260px;
    margin: 0;
  }
  
  .hero-cta .btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    width: 100%;
    max-width: 350px;
    margin: 0;
    order: 3;
  }
  
  .stat {
    background: linear-gradient(135deg, rgba(38, 217, 38, 0.1), rgba(18, 20, 24, 0.8));
    border: 1px solid rgba(38, 217, 38, 0.3);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-align: center;
  }
  
  .stat:nth-child(3) {
    grid-column: 1 / -1;
  }
  
  .stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-green), transparent);
    animation: scan 3s ease-in-out infinite;
  }
  
  .stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  .stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    font-weight: 500;
  }
  
  /* Buttons Mobile */
  .hero-cta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-top: 2.5rem;
    order: 2;
  }
  
  .hero-cta .btn {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
  }
  
  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }
  
  /* Sections Mobile */
  section {
    padding: 3rem 0;
  }
  
  .section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 2rem;
    justify-content: flex-start;
    text-align: left;
  }
  
  /* About Mobile */
  .about-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-align: left;
  }
  
  .about-text {
    width: 100%;
    max-width: 100%;
  }
  
  .about-intro {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    text-align: left;
  }
  
  .about-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
  }
  
  .detail {
    width: 100%;
    max-width: 100%;
  }
  
  .about-visual {
    width: 100%;
    max-width: 100%;
  }
  
  .code-window {
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
  }
  
  .code-content {
    padding: 0.75rem;
    font-size: 0.8rem;
    overflow-x: auto;
    text-align: left;
  }
  
  .code-content pre {
    margin: 0;
    text-align: left;
    white-space: pre;
    overflow-x: auto;
  }
  
  .code-content code {
    text-align: left;
    display: block;
  }
  
  .window-title {
    font-size: 0.8rem;
  }
  
  /* Scroll indicator mobile */
  .scroll-indicator {
    display: none;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: left;
  }
  
  .project-card {
    margin: 0;
  }
  
  /* Skills Mobile */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .skills {
    text-align: left;
  }

  .skill-category {
    padding: 1.5rem;
    text-align: left;
  }
  
  /* Projects Mobile */
  .projects {
    text-align: left;
  }  /* Contact Mobile */
  .contact-content {
    gap: 2rem;
    text-align: left;
  }
  
  .contact-form {
    padding: 2rem;
  }
  
  /* Form Mobile */
  .form-group input,
  .form-group textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.875rem;
  }
  
  /* Footer Mobile */
  .footer {
    padding: 3rem 0 1.5rem;
  }
  
  .footer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
  
  .footer-brand {
    order: 1;
    max-width: none;
    margin: 0 auto;
  }
  
  .footer-section {
    width: 100%;
  }
  
  .footer-section h4 {
    text-align: center;
    margin-bottom: 1rem;
  }
  
  .footer-section h4::after {
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
  }
  
  .footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
  
  .footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }
  
  .footer-contact p {
    justify-content: center;
  }
  
  .footer-social {
    justify-content: center;
    gap: 1rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding-top: 1.5rem;
  }
  
  .footer-bottom p {
    font-size: 0.8rem;
  }
    height: 40px;
  }
}

/* Mobile Small: 480px */
@media (max-width: 480px) {
  :root {
    --section-padding: 2rem 0;
  }
  
  .container {
    padding: 0 1rem;
    max-width: 100%;
  }
  
  /* Navigation Small Mobile */
  .nav-container {
    padding: 1rem;
  }
  
  .nav-right {
    gap: 0.75rem;
  }
  
  .language-switch {
    padding: 0.3rem 0.6rem;
    gap: 0.3rem;
    border-radius: 6px;
  }
  
  .lang-option {
    padding: 0.15rem 0.3rem;
  }
  
  /* Hero Very Small */
  .hero-title {
    font-size: clamp(2rem, 12vw, 2.8rem);
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
    max-width: 280px;
  }
  
  .hero-cta .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .hero-stats {
    max-width: 280px;
    gap: 0.75rem;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  
  .hero-stats .stat:nth-child(3) {
    grid-column: 1 / -1;
    justify-self: center;
  }
  
  .stat-number {
    font-size: 1.8rem;
  }
  
  .stat-label {
    font-size: 0.7rem;
  }
  
  /* Code window small */
  .code-content {
    padding: 0.75rem;
    font-size: 0.7rem;
  }
  
  .window-title {
    font-size: 0.7rem;
  }
  
  /* Projects Small */
  .project-card {
    margin: 0 -0.5rem;
  }
  
  /* Footer Small */
  .footer {
    padding: 2rem 0 1rem;
  }
  
  .footer-section h4::after {
    width: 30px;
  }
  
  .lang-option .flag {
    font-size: 0.8rem;
  }
  
  .lang-option .lang-text {
    display: none; /* Ocultar texto en pantallas muy pequeñas */
  }
  
  .lang-separator {
    font-size: 0.8rem;
  }
  
  .nav-logo {
    font-size: 1.1rem;
  }
  
  .nav-logo .logo {
    width: 28px;
    height: 28px;
  }
  
  /* Hero Small Mobile */
  .hero {
    padding-top: 160px;
    min-height: 90vh;
    display: flex;
    align-items: center;
  }
  
  .hero-content {
    padding: 0 1rem;
    gap: 2rem;
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-text {
    max-width: 100%;
  }
  
  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
  }
  
  .cyber-text {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .stat {
    min-width: auto;
    padding: 1rem;
    background: rgba(18, 20, 24, 0.8);
    border: 1px solid rgba(38, 217, 38, 0.2);
    border-radius: 8px;
  }
  
  .stat-number {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
  }
  
  .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  
  /* Buttons Extra Small */
  .hero-cta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
  }
  
  .hero-cta .btn {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
  }
  
  /* Sections Extra Small */
  section {
    padding: 2rem 0;
  }
  
  .section-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: 1.5rem;
  }
  
  /* Skills Extra Small */
  .skill-category {
    padding: 1.25rem;
  }
  
  .category-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  
  /* Contact Extra Small */
  .contact-form {
    padding: 1.5rem;
  }
  
  .form-group {
    margin-bottom: 1.25rem;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 0.75rem;
  }
  
  .form-group textarea {
    min-height: 80px;
  }
  
  /* Footer Extra Small */
  .footer {
    padding: 2rem 0 1.5rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }
  
  .footer-brand {
    max-width: none;
    margin: 0 auto;
  }
  
  .footer-social {
    justify-content: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  
  .footer-section h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  }
  
  .footer-logo {
    font-size: 1.2rem;
    gap: 0.75rem;
  }
  
  .footer-logo .logo {
    width: 36px;
    height: 36px;
  }
  
  .footer-text {
    font-size: 0.9rem;
  }
  
  .footer-quote {
    font-size: 1rem;
  }
  
  /* Scroll Indicator Small */
  .scroll-indicator {
    bottom: 20px;
  }
  
  .scroll-indicator span {
    font-size: 0.8rem;
  }
  
  /* Cursor disabled on touch devices */
  .cursor {
    display: none;
  }
}
  }
  
  .section-title {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  
  .about-details {
    gap: 1rem;
  }
  
  .code-content {
    padding: 1rem;
  }
  
  .code-content pre {
    font-size: 0.8rem;
  }
  
  .project-content {
    padding: 1rem;
  }
  
  .skill-category {
    padding: 1.5rem;
  }
  
  .contact-form {
    padding: 1.5rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .cursor {
    display: none;
  }
}

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

::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-green), #1fb81f);
  border-radius: 6px;
  border: 2px solid var(--bg-primary);
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary-green-glow), var(--primary-green));
  box-shadow: 0 0 10px var(--primary-green-glow);
}

::-webkit-scrollbar-corner {
  background: var(--bg-primary);
}

/* Scrollbar para Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-green) var(--bg-primary);
}

/* ===== RESPONSIVE IMPROVEMENTS ===== */

/* Prevent horizontal scroll */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

/* Ensure all sections fit within viewport but preserve container centering */
section {
  max-width: 100vw;
  width: 100%;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

/* Smooth scrolling for all devices */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
  /* Hide custom cursor on touch devices */
  .cursor {
    display: none !important;
  }
  
  /* Reset cursor for touch */
  *, *::before, *::after {
    cursor: auto !important;
  }
  
  /* Improve touch targets */
  .btn,
  .nav-link,
  .project-card,
  .contact-link {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Remove hover effects on touch */
  .btn:hover,
  .nav-link:hover,
  .project-card:hover,
  .skill-category:hover {
    transform: none;
    box-shadow: initial;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-3d canvas,
  .logo,
  .footer-logo .logo {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding-top: 60px;
    display: flex;
    align-items: center;
  }
  
  .hero-content {
    gap: 2rem;
    padding: 0 2rem;
    margin-top: 0;
  }
  
  .hero-title {
    font-size: clamp(2rem, 6vw, 2.8rem);
    margin-bottom: 1rem;
  }
  
  .title-line {
    display: inline;
    margin-right: 0.5rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .cyber-text {
    font-size: 0.9rem;
    margin-top: 0.3rem;
  }
  
  .hero-cta {
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
  }
  
  .hero-cta .btn {
    max-width: 180px;
    padding: 0.8rem 1.2rem;
    font-size: 0.85rem;
  }
  
  .hero-stats {
    flex-direction: row;
    gap: 1rem;
    max-width: 400px;
    margin-top: 2rem;
  }
  
  .stat {
    padding: 1rem 0.8rem;
  }
  
  .stat-number {
    font-size: 1.6rem;
  }
  
  .stat-label {
    font-size: 0.7rem;
  }
  
  .scroll-indicator {
    bottom: 15px;
    transform: scale(0.7);
  }
}

/* ===== RESPONSIVE BREAKPOINTS ESPECÍFICOS ===== */

/* Extra Small Mobile: 320px */
@media (max-width: 320px) {
  .container {
    padding: 0 1rem;
  }
  
  /* Navigation 320px */
  .nav-container {
    padding: 0.8rem 1rem;
  }
  
  .nav-logo .logo-text {
    font-size: 1.1rem;
  }
  
  .nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    order: 1;
  }
  
  .language-switch {
    padding: 0.3rem 0.6rem;
    gap: 0.3rem;
    font-size: 0.7rem;
    position: relative;
    z-index: 1001;
    order: 1;
  }
  
  .nav-toggle {
    order: 2;
  }
  
  .lang-option {
    padding: 0.2rem 0.3rem;
  }
  
  .lang-option .flag {
    font-size: 0.8rem;
  }
  
  .lang-option .lang-text {
    font-size: 0.7rem;
  }
  
  .nav-toggle {
    width: 24px;
    height: 20px;
    z-index: 1002;
    display: flex !important;
    position: relative;
  }
  
  .nav-toggle span {
    height: 2px;
  }
  
  /* Hero 320px */
  .hero {
    min-height: 45vh;
    height: auto;
    padding: 180px 0 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .hero-content {
    padding: 0 1rem;
    text-align: center;
    align-items: center;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .hero-text {
    text-align: center;
    align-items: center;
    width: 100%;
  }
  
  .hero-title {
    font-size: clamp(1.8rem, 10vw, 2.2rem);
    line-height: 1.1;
    margin-bottom: 1rem;
    text-align: center;
  }
  
  .title-line {
    text-align: center;
    display: block;
    margin-bottom: 0.1rem;
  }
  
  .hero-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    text-align: center;
    max-width: 100%;
    line-height: 1.5;
  }
  
  .hero-cta {
    width: 100%;
    max-width: 100%;
    margin: 0;
    justify-content: center;
  }
  
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    max-width: 100%;
    margin: 1rem 0 0 0;
  }
  
  /* Sections 320px */
  .section-title {
    font-size: clamp(1.5rem, 8vw, 2rem);
    text-align: center;
  }
  
  .about-content,
  .contact-content {
    text-align: center;
  }
  
  /* Projects 320px */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .project-card {
    min-height: 200px;
  }
  
  /* Skills 320px */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Small Mobile: 375px */
@media (min-width: 321px) and (max-width: 375px) {
  .container {
    padding: 0 1.25rem;
  }
  
  /* Hero 375px */
  .hero {
    min-height: 45vh;
    height: auto;
    padding: 170px 0 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .hero-content {
    text-align: center;
    align-items: center;
    padding: 0 1.25rem;
    max-width: 350px;
    margin: 0 auto;
  }
  
  .hero-text {
    text-align: center;
    align-items: center;
  }
  
  .hero-title {
    font-size: clamp(2rem, 10vw, 2.5rem);
    text-align: center;
  }
  
  .title-line {
    text-align: center;
  }
  
  .hero-subtitle {
    text-align: center;
    max-width: 100%;
  }
  
  .hero-cta {
    justify-content: center;
    margin: 0;
  }
  
  .hero-stats {
    grid-template-columns: 1fr 1fr;
    margin: 1rem 0 0 0;
    gap: 0.75rem;
  }
  
  /* Sections 375px */
  .section-title {
    text-align: center;
  }
  
  .about-content,
  .contact-content {
    text-align: center;
  }
  
  /* Fix navigation link active state */
  .nav-link.active::after {
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .nav-menu:not(.active) .nav-link.active::after {
    opacity: 1;
  }
  
  /* Fix for active nav link underline during mobile navigation */
  .nav-menu.active .nav-link.active::after {
    opacity: 0;
  }
}

/* Medium Mobile: 425px */
@media (min-width: 376px) and (max-width: 425px) {
  .container {
    padding: 0 1.5rem;
  }
  
  /* Hero 425px */
  .hero {
    min-height: 45vh;
    height: auto;
    padding: 170px 0 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .hero-content {
    text-align: center;
    align-items: center;
    padding: 0 1.5rem;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .hero-text {
    text-align: center;
    align-items: center;
  }
  
  .hero-title {
    font-size: clamp(2.2rem, 9vw, 2.8rem);
    text-align: center;
  }
  
  .title-line {
    text-align: center;
  }
  
  .hero-subtitle {
    text-align: center;
    font-size: 0.95rem;
  }
  
  .hero-cta {
    justify-content: center;
    margin: 0;
  }
  
  /* Sections 425px */
  .section-title {
    text-align: center;
  }
  
  .about-content,
  .contact-content {
    text-align: center;
  }
}

/* Tablet adjustments: 768px specific improvements */
@media (min-width: 426px) and (max-width: 768px) {
  /* Hero tablet optimizations */
  .hero {
    min-height: 25vh;
    padding: 350px 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .hero-content {
    text-align: center;
    align-items: center;
    padding: 0 2rem;
    max-width: 600px;
    margin: 0 auto;
  }
  
  .hero-text {
    text-align: center;
    align-items: center;
  }
  
  .hero-title {
    font-size: clamp(2.5rem, 8vw, 3.2rem);
    text-align: center;
  }
  
  .title-line {
    text-align: center;
  }
  
  .hero-subtitle {
    text-align: center;
    font-size: 1rem;
  }
  
  .hero-cta {
    justify-content: center;
    margin: 0;
  }
  
  /* Projects tablet - higher cards */
  .project-card {
    min-height: 320px;
  }
  
  /* Sections tablet */
  .section-title {
    text-align: center;
  }
  
  .about-content,
  .contact-content {
    text-align: center;
  }
}

/* Laptop 1024px specific fixes */
@media (min-width: 769px) and (max-width: 1024px) {
  /* Hero stats should be vertical */
  .hero-stats {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 200px;
    margin: 0 auto;
  }
  
  .stat {
    text-align: center;
    width: 100%;
  }
  
  .hero-content {
    text-align: center;
    align-items: center;
    padding: 0 2rem;
    gap: 2rem;
  }
  
  .hero-text {
    text-align: center;
    align-items: center;
  }
  
  .hero-title {
    text-align: center;
  }
  
  .title-line {
    text-align: center;
  }
  
  .hero-subtitle {
    text-align: center;
  }
  
  .hero-cta {
    justify-content: center;
    margin: 0;
    gap: 1rem;
  }
  
  /* Sections laptop */
  .section-title {
    text-align: left;
  }
  
  .about-content,
  .contact-content {
    text-align: left;
  }
}

/* Footer simplified styles */
.footer-content {
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer-social-section .footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .footer-section {
    text-align: center;
  }
  
  .footer-brand {
    text-align: center;
  }
  
  .footer-contact {
    text-align: center;
  }
  
  .footer-contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
  }
  
  .footer-contact-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    text-align: center;
  }
  
  .footer-social-section {
    text-align: center;
  }
  
  .footer-social-section .footer-social {
    justify-content: center;
    display: flex;
    gap: 1rem;
  }
  
  .footer-description {
    text-align: center;
  }
}

/* Print styles */
@media print {
  #loading-screen,
  .nav,
  .hero-3d,
  .cursor,
  .scroll-indicator {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .hero {
    min-height: auto;
    padding: 2rem 0;
  }
  
  section {
    page-break-inside: avoid;
    padding: 1rem 0;
  }
}