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

:root {
  --bg-dark: #070b19;
  --bg-deep: #03060f;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --color-primary: #3b82f6;
  --color-secondary: #8b5cf6;
  --color-whatsapp: #25d366;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --border-light: rgba(255, 255, 255, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

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

/* Animated CSS Background Orbs */
.bg-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.15;
  pointer-events: none;
}

.bg-glow-1 {
  background: var(--color-primary);
  top: -100px;
  right: -100px;
  animation: floatOrb 10s ease-in-out infinite alternate;
}

.bg-glow-2 {
  background: var(--color-secondary);
  bottom: -150px;
  left: -150px;
  animation: floatOrb 12s ease-in-out infinite alternate-reverse;
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(40px, 40px) scale(1.1);
  }
}

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

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Layout */
section {
  padding: 80px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* NAVBAR */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(7, 11, 25, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 20px;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo img,
.nav-logo-img {
  height: 24px !important;
  max-height: 24px !important;
  width: auto !important;
  object-fit: contain;
  vertical-align: middle;
  border-radius: 4px;
}

.logo-icon {
  color: var(--color-primary);
  font-size: 18px;
  filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.6));
}

.logo-badge {
  font-size: 11px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--color-primary);
  padding: 1px 8px;
  border-radius: 20px;
}

.nav-menu {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 24px;
  cursor: pointer;
}

/* HERO */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  gap: 40px;
  padding-top: 120px;
}

.hero-left {
  flex: 1.2;
}

.hero-right {
  flex: 0.8;
  display: flex;
  justify-content: center;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--color-primary);
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--font-title);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: clamp(14px, 1.8vw, 16px);
  max-width: 500px;
}

.hero-ctas {
  margin-top: 30px;
  display: flex;
  gap: 12px;
}

.btn {
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--color-primary);
}

/* Code Mockup Card */
.hero-card {
  width: 100%;
  max-width: 320px;
  border-radius: 12px;
}

.hero-card-header {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red {
  background: #ef4444;
}

.dot.yellow {
  background: #f59e0b;
}

.dot.green {
  background: #10b981;
}

.card-title {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-sub);
  margin-left: 6px;
}

.hero-card-body {
  padding: 18px 20px;
  font-family: monospace;
  font-size: 13px;
  color: #a5b4fc;
}

.keyword {
  color: #f472b6;
}

.variable {
  color: #60a5fa;
}

.number {
  color: #fb923c;
}

.string {
  color: #34d399;
}

/* ABOUT */
.about-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.about-text h2 {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 16px;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skills-tags span {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.stat-card {
  padding: 20px;
  text-align: center;
}

.stat-card h3 {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 800;
  color: var(--color-primary);
}

.stat-card p {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 4px;
  text-transform: uppercase;
}

/* PROJECTS */
.projects-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 40px auto;
}

.projects-header h2 {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.projects-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.filter-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--color-primary);
  color: var(--text-main);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  transition: opacity 0.2s ease;
}

.project-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* PROJECT MEDIA SLIDER */
.project-media {
  position: relative;
  height: 180px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  cursor: default;
}

.project-media:has(img),
.project-media:has(video) {
  cursor: pointer;
}

.media-slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.media-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-slide.active {
  opacity: 1;
}

.media-slide img,
.media-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Centrar imágenes sin recortar (para screenshots pequeños) */
.media-contain .media-slide img,
.media-contain .media-slide video {
  object-fit: contain;
  background: transparent;
}

/* Click-to-expand overlay on images */
.media-slide img:hover {
  opacity: 0.9;
}

.media-fallback {
  font-size: 36px;
  color: rgba(255, 255, 255, 0.85);
}

/* Expand icon overlay */
.project-media::after {
  content: '\F52A';
  /* bi-arrows-fullscreen */
  font-family: "bootstrap-icons";
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  font-size: 13px;
  padding: 5px 7px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  line-height: 1;
}

.project-media:has(img):hover::after,
.project-media:has(video):hover::after {
  opacity: 1;
}

/* Nav controls */
.media-nav {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}

.media-prev,
.media-next {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.media-prev:hover,
.media-next:hover {
  background: rgba(59, 130, 246, 0.7);
}

.media-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}

.media-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.media-dot.active {
  background: white;
  transform: scale(1.3);
}

.project-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-tag {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--color-secondary);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.project-info h3 {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.project-info p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.project-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-ver-sitio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white !important;
  text-decoration: none !important;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn-ver-sitio:hover {
  opacity: 0.85;
  transform: translateY(-1px);
  text-decoration: none !important;
}

.tag-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  padding: 4px 10px;
  border-radius: 6px;
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 15, 0.93);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img,
.lightbox-content video {
  max-width: 90vw;
  max-height: 82vh;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 301;
}

.lightbox-close:hover {
  background: rgba(239, 68, 68, 0.6);
}

.lightbox-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 301;
}

.lightbox-arrow:hover {
  background: rgba(59, 130, 246, 0.5);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-body);
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 12px;
  border-radius: 20px;
}

/* CONTACT */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: stretch;
}

.contact-left h2 {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
}

.contact-left p {
  color: var(--text-muted);
  margin-bottom: 28px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-btn {
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s ease;
}

.contact-btn.whatsapp {
  background: var(--color-whatsapp);
  color: #03060f;
}

.contact-btn.email {
  border: 1px solid var(--border-light);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.contact-btn:hover {
  transform: translateY(-1px);
}

.contact-right {
  padding: 28px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 13px;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.submit-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.submit-btn:hover {
  opacity: 0.9;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border-light);
  background: var(--bg-deep);
  padding: 24px 20px;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-sub);
}

.footer-content a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 10, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  max-width: 400px;
  width: 90%;
  padding: 28px;
  text-align: center;
}

.success-icon {
  font-size: 40px;
  color: #10b981;
  margin-bottom: 12px;
  display: block;
}

.modal h3 {
  font-family: var(--font-title);
  font-size: 20px;
  margin-bottom: 6px;
}

.modal p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 60px);
    background: var(--bg-dark);
    flex-direction: column;
    padding: 30px;
    align-items: center;
    gap: 20px;
    transition: left 0.3s ease;
    border-top: 1px solid var(--border-light);
  }

  .nav-menu.active {
    left: 0;
  }

  .mobile-toggle {
    display: block;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 100px;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-ctas {
    justify-content: center;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .contact-container {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   FOOTER STYLES
   ========================================================================== */
.site-footer {
  background: rgba(7, 11, 25, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 50px 20px 30px 20px;
  margin-top: 80px;
  position: relative;
  z-index: 10;
  color: #f8fafc;
}

.site-footer a {
  color: #94a3b8;
  text-decoration: none;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-tagline {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
  max-width: 380px;
}

.footer-nav-col h4,
.footer-contact-col h4 {
  font-family: var(--font-title), 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #f8fafc;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

.footer-nav-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav-col a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.footer-nav-col a:hover {
  color: #3b82f6;
  transform: translateX(3px);
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-socials a {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f8fafc !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-socials a:hover {
  background: #3b82f6;
  color: #ffffff !important;
  border-color: #3b82f6;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: #94a3b8;
}

.footer-brand {
  color: #3b82f6 !important;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s ease;
}

.footer-brand:hover {
  opacity: 0.85;
}

.footer-logo-img {
  height: 18px !important;
  max-height: 18px !important;
  width: auto !important;
  object-fit: contain;
  vertical-align: middle;
  border-radius: 3px;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 40px 20px 24px 20px;
    margin-top: 50px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
}