/* TailwindCSS Configuration */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Custom CSS Variables and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #0a0a14 0%, #12121e 50%, #1a1a28 100%);
  color: #f8fafc;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Glass Effect */
.glass-effect {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Gradient Border */
.gradient-border {
  position: relative;
  background: linear-gradient(135deg, #0a0a14, #12121e);
  padding: 2px;
  border-radius: 20px;
}

.gradient-border::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #3b82f6, #10b981, #3b82f6);
  border-radius: 22px;
  z-index: -1;
  animation: gradientMove 3s ease infinite;
  background-size: 400% 400%;
}

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

/* Technology Grid */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
}

.tech-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-card:hover {
  transform: translateY(-8px) scale(1.05);
}

/* Project Cards */
.project-card {
  transition: all 0.3s ease;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-10px);
}

/* Antes: altura fija ~192px + object-cover recortaba mucho las capturas verticales (móvil, mockups).
   Contenedor con aspect-ratio 4:3: más alto y coherente en todas las cards. */
.project-card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.85);
}

.project-image {
  transition: transform 0.6s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

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

/* Ajustes por captura: verticales muestran mejor el foco inferior (mano + dispositivo) */
.project-image[src*="vitalwatch"] {
  object-position: center 65%;
}

.project-image[src*="zatek"] {
  object-position: center center;
}

.project-image[src*="gem"] {
  object-position: center top;
}

.project-image[src*="helpfood"] {
  object-position: center top;
}

.project-image[src*="pricepulse"] {
  object-position: center;
}

/* Timeline */
.timeline-item {
  position: relative;
  padding-left: 2.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #10b981);
  z-index: 2;
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 1.5rem;
  width: 2px;
  height: calc(100% + 1rem);
  background: linear-gradient(to bottom, #3b82f6, #10b981);
}

.timeline-item:last-child::after {
  display: none;
}

/* Social Icons */
.social-icon {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-icon:hover {
  transform: translateY(-4px) scale(1.1);
}

/* Contact Items */
.contact-item {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a.contact-item:hover {
  transform: translateY(-2px);
}

/* Navigation Links */
.nav-link {
  position: relative;
  transition: all 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  transition: width 0.3s ease;
}

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

/* Floating Elements */
.floating-element {
  animation: float 6s ease-in-out infinite;
}

/* Typewriter Effect */
.typewriter {
  overflow: hidden;
  border-right: 2px solid #3b82f6;
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: #3b82f6 }
}

/* Parallax Effect */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes glow {
  0% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
  100% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.6), 0 0 40px rgba(16, 185, 129, 0.3); }
}

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

/* Animation Classes */
.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite alternate;
}

.slide-up {
  animation: slideUp 0.8s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
  .tech-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
  
  .typewriter {
    animation: none;
    white-space: normal;
    border-right: none;
  }
  
  .gradient-border::before {
    animation: none;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0a0a14;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #3b82f6, #10b981);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #2563eb, #059669);
}

/* Focus States */
input:focus,
textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Button Hover Effects */
button:hover,
a:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Image Loading States */
img {
  transition: opacity 0.3s ease;
}

img[loading="lazy"] {
  opacity: 0;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Mobile Menu Styles */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 20, 0.95);
  backdrop-filter: blur(20px);
  z-index: 40;
}

.mobile-menu.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.mobile-menu a {
  display: block;
  padding: 1rem 2rem;
  font-size: 1.5rem;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.mobile-menu a:hover {
  color: #3b82f6;
  transform: translateX(10px);
}

/* Smooth Transitions */
* {
  transition: all 0.3s ease;
}

/* Print Styles */
@media print {
  .glass-effect {
    background: white;
    border: 1px solid #ccc;
  }
  
  .gradient-text {
    color: #3b82f6;
    background: none;
    -webkit-text-fill-color: #3b82f6;
  }
  
  .floating-element {
    animation: none;
  }
}

