/* css/tech.css
   Diseño: fondo negro tecnológico, azul neón (#00b7ff), animaciones avanzadas,
   hero con imagen a la derecha, background animado (ondas) y parallax.
*/

:root {
  --bg: #000000;
  --bg-secondary: #0a0a0a;
  --accent: #00b7ff;
  --accent-2: #4fd9ff;
  --accent-glow: #00d4ff;
  --muted: #9fbcd1;
  --card-bg: rgba(0, 183, 255, 0.03);
  --card-border: rgba(0, 183, 255, 0.15);
  --glass: rgba(255, 255, 255, 0.02);
  --max-width: 1160px;
  --ease: cubic-bezier(.2, .9, .25, 1);
  --ease-bounce: cubic-bezier(.68, -0.55, .265, 1.55);
  --wave-opacity: 0.08;
  --font-sans: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  --font-tech: 'Orbitron', 'Poppins', monospace;
}

/* Basic */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg) !important;
  color: #dff9ff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

html {
  background: var(--bg) !important;
}

/* Grid pattern background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--bg);
  background-image: 
    linear-gradient(rgba(0, 183, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 183, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

/* NAVBAR */
.navbar {
  position: sticky;
  position: -webkit-sticky; /* Safari */
  top: 0;
  z-index: 9999;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  background: linear-gradient(90deg, rgba(0, 183, 255, 0.08), rgba(0, 0, 0, 0.6));
  border-bottom: 1px solid rgba(0, 183, 255, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 183, 255, 0.05);
  transition: all .35s var(--ease);
  width: 100%;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.navbar nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo {
  font-family: var(--font-tech);
  color: var(--accent-2);
  letter-spacing: 2px;
  margin: 0;
  font-size: 1.3rem;
  text-transform: uppercase;
  position: relative;
  text-shadow: 0 0 20px rgba(0, 183, 255, 0.5);
}

.logo::before {
  content: '◢';
  margin-right: 8px;
  color: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

.navbar nav a {
  color: var(--accent-2);
  text-decoration: none;
  margin-left: 20px;
  font-weight: 600;
  transition: all .3s var(--ease);
  position: relative;
  padding: 5px 0;
}

.navbar nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-glow));
  transition: width .3s var(--ease);
  box-shadow: 0 0 10px var(--accent);
}

.navbar nav a:hover {
  color: #fff;
  text-shadow: 0 0 15px var(--accent);
  transform: translateY(-2px);
}

.navbar nav a:hover::after {
  width: 100%;
}

.navbar.scrolled {
  box-shadow: 
    0 8px 40px rgba(0, 0, 0, 0.9), 
    0 0 50px rgba(0, 183, 255, 0.2),
    0 4px 20px rgba(0, 183, 255, 0.1);
  background: linear-gradient(90deg, rgba(0, 183, 255, 0.15), rgba(0, 0, 0, 0.95));
  border-bottom-color: rgba(0, 183, 255, 0.4);
  backdrop-filter: blur(16px) saturate(200%);
  -webkit-backdrop-filter: blur(16px) saturate(200%);
}

/* HERO (full-width background animation) */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 36px;
  --parallax-y: 0px;
}

/* animated waves that cover entire page (behind content) */
.hero-wave {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background: 
    radial-gradient(1400px 500px at 15% 20%, rgba(0, 183, 255, 0.12), transparent 40%),
    radial-gradient(1000px 400px at 85% 70%, rgba(79, 217, 255, 0.08), transparent 40%),
    radial-gradient(800px 300px at 50% 50%, rgba(0, 212, 255, 0.05), transparent 35%),
    linear-gradient(180deg, rgba(0, 20, 40, 0.2), rgba(0, 0, 0, 0.5));
  filter: blur(40px);
  transform: translateY(calc(var(--parallax-y) * -0.08));
  animation: waveShift 20s ease-in-out infinite;
}

@keyframes waveShift {
  0% { 
    transform: translateY(0) scale(1) rotate(0deg);
    opacity: 1;
  }
  33% { 
    transform: translateY(-25px) scale(1.03) rotate(1deg);
    opacity: 0.9;
  }
  66% { 
    transform: translateY(-15px) scale(1.01) rotate(-1deg);
    opacity: 0.95;
  }
  100% { 
    transform: translateY(0) scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Floating particles */
.hero-wave::before,
.hero-wave::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: float 15s ease-in-out infinite;
}

.hero-wave::before {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 183, 255, 0.15), transparent);
  top: 20%;
  left: 10%;
  animation-delay: -5s;
}

.hero-wave::after {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(79, 217, 255, 0.1), transparent);
  bottom: 20%;
  right: 10%;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* HERO content layout (text left, image right) */
.hero-grid {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1;
  min-width: 260px;
  max-width: 720px;
  text-align: left;
}

.headline {
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: clamp(32px, 4vw, 52px);
  margin: 0 0 10px 0;
  color: var(--accent);
  text-shadow: 
    0 0 20px rgba(0, 183, 255, 0.6),
    0 0 40px rgba(0, 183, 255, 0.4),
    0 0 60px rgba(0, 183, 255, 0.2),
    0 8px 30px rgba(0, 0, 0, 0.8);
  letter-spacing: 1px;
  line-height: 1.2;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { 
    text-shadow: 
      0 0 20px rgba(0, 183, 255, 0.6),
      0 0 40px rgba(0, 183, 255, 0.4),
      0 0 60px rgba(0, 183, 255, 0.2);
  }
  50% { 
    text-shadow: 
      0 0 30px rgba(0, 183, 255, 0.8),
      0 0 60px rgba(0, 183, 255, 0.6),
      0 0 90px rgba(0, 183, 255, 0.4);
  }
}

.subhead {
  margin: 6px 0 12px 0;
  color: var(--accent-2);
  font-weight: 600;
  opacity: 0.92;
}

.lead {
  color: rgba(223, 249, 255, 0.92);
  margin-top: 12px;
}

/* hero image on right */
.hero-image {
  flex: 0 0 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image {
  position: relative;
}

.hero-image::before {
  content: '';
  position: absolute;
  inset: -10px;
  background: linear-gradient(45deg, var(--accent), var(--accent-glow), var(--accent-2));
  border-radius: 20px;
  opacity: 0.3;
  filter: blur(20px);
  animation: rotate 8s linear infinite;
  z-index: -1;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hero-image img {
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.8),
    0 0 60px rgba(0, 183, 255, 0.2) inset,
    0 0 100px rgba(0, 183, 255, 0.1);
  border: 2px solid rgba(0, 183, 255, 0.3);
  transform: translateY(0);
  transition: all .6s var(--ease);
  position: relative;
  z-index: 1;
}

.hero-image img:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 
    0 35px 90px rgba(0, 0, 0, 0.9),
    0 0 80px rgba(0, 183, 255, 0.4) inset,
    0 0 120px rgba(0, 183, 255, 0.2);
  border-color: rgba(0, 183, 255, 0.6);
}

/* CTA buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid var(--accent);
  background: linear-gradient(135deg, rgba(0, 183, 255, 0.15), rgba(0, 183, 255, 0.05));
  color: var(--accent-2);
  box-shadow: 
    0 8px 30px rgba(0, 183, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all .35s var(--ease-bounce);
  margin-right: 12px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(0, 183, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width .6s var(--ease), height .6s var(--ease);
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 
    0 20px 60px rgba(0, 183, 255, 0.4),
    0 0 40px rgba(0, 183, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: #fff;
  border-color: var(--accent-glow);
  background: linear-gradient(135deg, rgba(0, 183, 255, 0.3), rgba(0, 183, 255, 0.15));
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(0, 183, 255, 0.3);
  color: var(--accent-2);
  box-shadow: 0 8px 30px rgba(0, 183, 255, 0.1);
}

.btn-outline:hover {
  background: rgba(0, 183, 255, 0.1);
  border-color: var(--accent);
}

/* Sections */
.section {
  padding: 64px 0;
  position: relative;
  z-index: 2;
}

.section-title {
  font-family: var(--font-tech);
  color: var(--accent);
  margin: 0 0 40px 0;
  text-align: center;
  font-size: clamp(28px, 4vw, 42px);
  text-transform: uppercase;
  letter-spacing: 3px;
  position: relative;
  text-shadow: 
    0 0 20px rgba(0, 183, 255, 0.5),
    0 0 40px rgba(0, 183, 255, 0.3);
}

.section-title::before,
.section-title::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 10px var(--accent);
}

.section-title::before {
  right: calc(100% + 20px);
}

.section-title::after {
  left: calc(100% + 20px);
}

/* Grid helpers */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 24px;
  border-radius: 16px;
  transition: all .4s var(--ease);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 183, 255, 0.1), transparent);
  transition: left .6s var(--ease);
}

.card:hover::before {
  left: 100%;
}

.card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 
    0 40px 90px rgba(0, 0, 0, 0.9),
    0 0 60px rgba(0, 183, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-color: rgba(0, 183, 255, 0.4);
  background: rgba(0, 183, 255, 0.05);
}

.card h3 {
  margin: 0 0 10px 0;
  color: var(--accent-2);
}

.card p {
  color: rgba(223, 249, 255, 0.85);
  margin: 8px 0;
}

/* Certificates grid */
.certificados-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.cert h3 {
  margin: 0 0 6px 0;
  color: var(--accent-2);
}

.muted {
  color: rgba(223, 249, 255, 0.75);
  font-size: 0.95rem;
}

/* Contact card */
.contact-card {
  background: var(--card-bg);
  border: 1px solid rgba(0, 183, 255, 0.06);
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.6);
  max-width: 600px;
  margin: 0 auto;
}

.contact-card a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color .2s;
}

.contact-card a:hover {
  color: #fff;
}

/* Footer */
.footer {
  padding: 18px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.35));
  color: var(--muted);
}

/* Reveal animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Active section effect (subtle) */
.active-section {
  outline: none;
}

.fading-out {
  opacity: 0.3;
  transform: scale(0.98);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
  }

  .hero-text {
    text-align: center;
  }

  .hero-image {
    order: 0;
  }

  .container {
    padding: 0 16px;
  }
  
  .nav-inner {
    flex-direction: column;
    gap: 15px;
    padding: 1rem 0;
  }
  
  .navbar nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
  
  .navbar nav a {
    margin-left: 0;
    font-size: 14px;
    padding: 8px 12px;
    background: rgba(0, 183, 255, 0.05);
    border-radius: 8px;
  }
}

/* small screens */
@media (max-width: 600px) {
  .headline {
    font-size: 24px;
  }

  .nav-inner {
    padding: .8rem 0;
  }

  .navbar nav a {
    font-size: 13px;
    padding: 6px 10px;
  }

  .section-title {
    font-size: 24px;
  }

  .grid-3, .grid-2, .certificados-grid {
    grid-template-columns: 1fr;
  }
  
  .logo {
    font-size: 1.1rem;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 0.85rem;
  }
}

/* Scroll indicator */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-glow));
  box-shadow: 0 0 20px var(--accent);
  z-index: 9999;
  transition: width 0.1s ease;
}

/* accessibility: focus states */
a:focus {
  outline: 2px solid rgba(0, 183, 255, 0.5);
  outline-offset: 4px;
  border-radius: 8px;
}

/* Glowing card effect on hover */
.card {
  --mouse-x: 50%;
  --mouse-y: 50%;
}

.card::after {
  content: '';
  position: absolute;
  top: var(--mouse-y);
  left: var(--mouse-x);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(0, 183, 255, 0.15), transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}

.card:hover::after {
  opacity: 1;
}

/* Scanline effect */
@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 20px var(--accent);
  animation: scanline 8s linear infinite;
  opacity: 0.3;
  pointer-events: none;
}

/* Pulsing dots decoration */
.section::before {
  content: '◆';
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--accent);
  font-size: 12px;
  opacity: 0.5;
  animation: pulse 2s ease-in-out infinite;
}

/* Enhanced subhead */
.subhead {
  margin: 10px 0 20px 0;
  color: var(--accent-2);
  font-weight: 600;
  opacity: 0.95;
  font-size: clamp(1rem, 2vw, 1.2rem);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Lead text enhancement */
.lead {
  color: rgba(223, 249, 255, 0.85);
  margin-top: 20px;
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 600px;
}

/* Contact card enhancement */
.contact-card {
  background: linear-gradient(135deg, var(--card-bg), rgba(0, 183, 255, 0.05));
  border: 2px solid var(--card-border);
  padding: 32px;
  border-radius: 16px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(0, 183, 255, 0.1);
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(0, 183, 255, 0.05), transparent);
  animation: rotate 10s linear infinite;
}

.contact-card a {
  color: var(--accent-2);
  text-decoration: none;
  transition: all .3s;
  position: relative;
  z-index: 1;
}

.contact-card a:hover {
  color: #fff;
  text-shadow: 0 0 10px var(--accent);
}

/* Footer enhancement */
.footer {
  padding: 30px 0;
  text-align: center;
  border-top: 2px solid rgba(0, 183, 255, 0.2);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.8));
  color: var(--muted);
  position: relative;
  box-shadow: 0 -10px 40px rgba(0, 183, 255, 0.05);
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 20px var(--accent);
}
/* Page header for secondary pages */
.page-header {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  padding: 40px 0;
  text-align: center;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  margin-bottom: 40px;
  border-bottom: 2px solid rgba(0, 183, 255, 0.2);
  position: relative;
  z-index: 10;
}

.page-header h1 {
  margin-bottom: 20px;
  color: var(--accent);
  font-family: var(--font-tech);
  text-shadow: 0 0 20px rgba(0, 183, 255, 0.5);
  font-size: clamp(28px, 4vw, 42px);
}

.page-header .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Mejoras responsive adicionales */
@media (max-width: 768px) {
  .section {
    padding: 50px 0;
  }
  
  .hero {
    padding: 40px 0 30px;
  }
  
  .hero-image img {
    max-width: 220px;
  }
  
  .section-title {
    font-size: 26px;
  }
  
  .card {
    padding: 20px;
  }
}

@media (max-width: 600px) {
  .headline {
    font-size: 22px !important;
  }
  
  .subhead {
    font-size: 0.9rem;
  }
  
  .lead {
    font-size: 0.95rem;
  }
  
  .btn {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 10px auto;
  }
  
  .section {
    padding: 40px 0;
  }
  
  .hero-image img {
    max-width: 180px;
  }
  
  .contact-card {
    padding: 24px 16px;
  }
}

@media (max-width: 400px) {
  .headline {
    font-size: 20px !important;
  }
  
  .section-title {
    font-size: 20px;
  }
  
  .navbar nav a {
    font-size: 12px;
    padding: 5px 8px;
  }
  
  .logo {
    font-size: 1rem;
  }
}

