/* ==========================================================================
   Variables Globales y Configuración Base
   ========================================================================== */
:root {
  --bg-dark: #0b1120;
  --bg-darker: #060913;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --accent-cyan: #06b6d4;
  --accent-cyan-hover: #0891b2;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Utilidades Textos */
.text-cyan { color: var(--accent-cyan); }
.w-full { width: 100%; }

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  background: linear-gradient(to right, #ffffff, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Efectos de Fondo (Blobs)
   ========================================================================== */
.background-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  animation: float 20s infinite ease-in-out;
}

.blob-1 {
  width: 600px;
  height: 600px;
  background: var(--accent-cyan);
  top: -200px;
  left: -200px;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: #2563eb;
  bottom: -100px;
  right: -100px;
  animation-delay: -10s;
}

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

/* ==========================================================================
   Glassmorphism Global
   ========================================================================== */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  padding: 3rem;
}

@media (max-width: 768px) {
  .glass-panel, .glass-header {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

/* ==========================================================================
   Header & Navegación
   ========================================================================== */
.glass-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(11, 17, 32, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 0;
}

.glass-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 1px;
}

.logo i {
  margin-right: 5px;
}

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--accent-cyan);
}

/* ==========================================================================
   Botones UI
   ========================================================================== */
.btn-primary, .btn-ghost {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  border: none;
  font-family: inherit;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
  background-color: var(--accent-cyan-hover);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
  transform: translateY(-2px);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--glass-border);
}

.btn-ghost:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
section {
  padding: 6rem 0;
}

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
}

.hero-content {
  max-width: 800px;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

.hero-section h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

.subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 650px;
}

.cta-group {
  display: flex;
  gap: 1rem;
}

/* ==========================================================================
   Perfil Section
   ========================================================================== */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: center;
}

.profile-img {
  width: 100%;
  aspect-ratio: 1; 
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border: 1px solid var(--glass-border);
  transition: transform 0.3s ease;
}

.profile-img:hover {
  transform: scale(1.02);
}

.profile-text h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

.profile-text p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag i {
  color: var(--accent-cyan);
}

/* ==========================================================================
   Servicios Section
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.4s ease;
}

.service-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.1);
}

.service-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--glass-border);
  transition: transform 0.5s ease;
}

.service-card:hover .service-img {
  transform: scale(1.05);
}

.service-content {
  padding: 2rem;
  position: relative;
  background: inherit;
  z-index: 2;
}

.service-card .icon {
  font-size: 2.2rem;
  color: var(--accent-cyan);
  margin-bottom: 1.2rem;
  transition: transform 0.3s;
}

.service-card:hover .icon {
  transform: scale(1.1);
}

.service-card h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Proyectos Section
   ========================================================================== */
.projects-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1.5rem; /* space for scrollbar */
}

/* Scrollbar styling for the projects row */
.projects-grid::-webkit-scrollbar {
  height: 8px;
}
.projects-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}
.projects-grid::-webkit-scrollbar-thumb {
  background-color: var(--accent-cyan);
  border-radius: 4px;
}

.project-card {
  flex: 1 0 0;
  min-width: 250px;
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.4s ease;
  text-decoration: none; /* remove link underline */
}

.project-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.15);
}

.project-header {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--glass-border);
}

/* Gradients for project headers */
.gradient-1 { background: linear-gradient(135deg, #1e3a8a, #06b6d4); }
.gradient-2 { background: linear-gradient(135deg, #4c1d95, #ec4899); }
.gradient-3 { background: linear-gradient(135deg, #064e3b, #10b981); }
.gradient-4 { background: linear-gradient(135deg, #7c2d12, #f59e0b); }
.gradient-5 { background: linear-gradient(135deg, #6b21a8, #3b82f6); }

.project-icon {
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.8);
  transition: transform 0.4s ease;
}

.project-card:hover .project-icon {
  transform: scale(1.15) rotate(5deg);
}

.project-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-content h3 {
  color: var(--text-main);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.project-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-link {
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s;
}

.project-card:hover .project-link {
  color: var(--text-main);
}

.project-card:hover .project-link i {
  transform: translateX(5px);
}
.project-link i {
  transition: transform 0.3s;
}

/* ==========================================================================
   Trayectoria Section
   ========================================================================== */
.trajectory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  text-align: center;
}

.trajectory-item {
  padding: 1rem;
}

.icon-large {
  font-size: 3.5rem;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.trajectory-item h4 {
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
}

.trajectory-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Contacto Section
   ========================================================================== */
.contact-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

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

.contact-links a {
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: color 0.3s;
  font-size: 1.1rem;
}

.contact-links a:hover {
  color: var(--accent-cyan);
}

.contact-links i {
  font-size: 1.3rem;
  color: var(--accent-cyan);
}

.contact-form .form-group {
  margin-bottom: 1.5rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent-cyan);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.1);
}

/* ==========================================================================
   Modal de Éxito
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  max-width: 450px;
  width: 90%;
  text-align: center;
  padding: 3rem 2rem;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s;
}

.modal-close:hover {
  color: var(--accent-cyan);
}

.modal-logo {
  height: 60px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto 1.5rem auto;
}

/* ==========================================================================
   Cookie Consent Banner
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: -150%;
  left: 0;
  width: 100%;
  background: rgba(11, 17, 32, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(6, 182, 212, 0.3);
  z-index: 9999;
  padding: 1.5rem 0;
  transition: bottom 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

.cookie-banner.show {
  bottom: 0;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cookie-content p {
  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.cookie-content a {
  color: var(--accent-cyan);
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.3s;
}

.cookie-content a:hover {
  color: #10b981;
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
}

@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
  .cookie-buttons {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   Footer & Botones Flotantes
   ========================================================================== */
.site-footer {
  text-align: center;
  padding: 2.5rem 0;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.95rem;
  background: rgba(11, 17, 32, 0.5);
}

.floating-buttons {
  position: fixed;
  bottom: 80px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 99;
}

.float-btn {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}

.float-btn:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.float-btn.whatsapp { background-color: #25D366; }
.float-btn.email { background-color: var(--accent-cyan); }

/* ==========================================================================
   Animaciones JS
   ========================================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
  .profile-grid, .contact-panel {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .hero-section h1 { font-size: 2.5rem; }
  .cta-group { flex-direction: column; }
  nav { display: none; }
  .glass-header .btn-ghost { display: none; }
  section { padding: 4rem 0; }
  .glass-panel { padding: 1.8rem; }
  .section-title { font-size: 2rem; }
  
  .floating-buttons {
    bottom: 100px;
    right: 20px;
  }
}

@media (max-width: 480px) {
  .hero-section h1 { font-size: 2rem; }
  .subtitle { font-size: 1rem; }
}
