/* ═══════════════════════════════════════════════════
   TOKENS & RESET
═══════════════════════════════════════════════════ */
:root {
  --bg-base:       #080b14;
  --bg-surface:    #0d1120;
  --bg-card:       #111827;
  --bg-card-hover: #161e30;
  --border:        rgba(255,255,255,.07);
  --border-hover:  rgba(255,255,255,.15);

  --text-primary:  #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:    #475569;

  --accent-blue:   #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-gold:   #f59e0b;
  --accent-cyan:   #06b6d4;

  --gradient-hero: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-card: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));

  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;

  --shadow-card: 0 4px 24px rgba(0,0,0,.4);
  --shadow-glow: 0 0 40px rgba(59,130,246,.15);

  --transition: .35s cubic-bezier(.4,0,.2,1);
  --font-main: 'Outfit', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

img { display: block; max-width: 100%; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ═══════════════════════════════════════════════════
   PARTICLES CANVAS
═══════════════════════════════════════════════════ */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════
   NAV
═══════════════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 24px;
  transition: background var(--transition), backdrop-filter var(--transition), box-shadow var(--transition);
}
#navbar.scrolled {
  background: rgba(8,11,20,.85);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--gradient-hero);
  display: grid;
  place-items: center;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .5px;
  color: #fff;
  flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 36px;
}
.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-hero);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ═══════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

#hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.6; /* Ajustado para que el texto sea legible */
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%,   rgba(59,130,246,.18) 0%, transparent 65%),
    radial-gradient(ellipse 50% 50% at 20% 80%,  rgba(139,92,246,.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 60%,  rgba(236,72,153,.1)  0%, transparent 55%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 700px;
  transform: translateY(var(--parallax-y, 0));
  will-change: transform;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-main);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-blue);
  background: rgba(59,130,246,.1);
  border: 1px solid rgba(59,130,246,.25);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 28px;
}

.hero-title {
  font-family: var(--font-main);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.gradient-text {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 40px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.hero-scroll-hint span {
  display: block;
  width: 1.5px;
  height: 48px;
  background: linear-gradient(to bottom, transparent, var(--accent-blue));
  animation: scrollHint 2s ease-in-out infinite;
}
@keyframes scrollHint {
  0%,100% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50%      { opacity: 1; transform: scaleY(1); }
}

/* ═══════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient-hero);
  color: #fff;
  box-shadow: 0 4px 20px rgba(59,130,246,.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59,130,246,.5);
}
.btn-ghost {
  background: rgba(255,255,255,.06);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.11);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* ═══════════════════════════════════════════════════
   STATS STRIP
═══════════════════════════════════════════════════ */
.stats-strip {
  position: relative;
  z-index: 1;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 36px 24px;
}
.stats-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 32px;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.stat-number {
  font-family: var(--font-main);
  font-size: 2.6rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.stat-suffix {
  font-family: var(--font-main);
  font-size: 2.6rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.stat-item { flex-direction: row; align-items: baseline; flex-wrap: wrap; justify-content: center; gap: 0; }
.stat-item .stat-number, .stat-item .stat-suffix { display: inline; }
.stat-item .stat-label { width: 100%; text-align: center; font-size: .78rem; font-weight: 500; color: var(--text-muted); letter-spacing: .5px; text-transform: uppercase; }
.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
}

/* ═══════════════════════════════════════════════════
   SECTION COMMONS
═══════════════════════════════════════════════════ */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-main);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.5px;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.section-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════
   PROJECTS SECTION
═══════════════════════════════════════════════════ */
.projects-section {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* ─── PROJECT CARD ─── */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

/* Preview */
.card-preview {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
  filter: saturate(.9) brightness(.95);
}
.project-card:hover .card-preview img {
  transform: scale(1.04);
  filter: saturate(1.1) brightness(1);
}

/* Overlay */
.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8,11,20,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  backdrop-filter: blur(4px);
}
.project-card:hover .card-overlay { opacity: 1; }

.overlay-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--gradient-hero);
  color: #fff;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: .9rem;
  transition: transform .2s;
  box-shadow: 0 4px 20px rgba(59,130,246,.4);
}
.overlay-btn:hover { transform: scale(1.05); }
.overlay-btn svg { width: 16px; height: 16px; }

/* Badge */
.card-badge {
  position: absolute;
  top: 14px; left: 14px;
  background: linear-gradient(135deg, #1e40af, #1d4ed8);
  color: #fff;
  font-family: var(--font-main);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

/* Body */
.card-body {
  padding: 24px;
}
.card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tag {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(6,182,212,.1);
  border: 1px solid rgba(6,182,212,.2);
  padding: 3px 10px;
  border-radius: 999px;
}
.card-title {
  font-family: var(--font-main);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.3;
}
.card-desc {
  font-size: .88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 16px;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
}
.meta-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════
   TECH SECTION
═══════════════════════════════════════════════════ */
.tech-section {
  position: relative;
  z-index: 1;
  padding: 80px 24px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}
.tech-section .section-header { margin-bottom: 48px; }

.tech-grid {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: default;
  min-width: 130px;
}
.tech-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}
.tech-item span {
  font-family: var(--font-main);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.tech-icon {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}
.tech-icon svg { width: 28px; height: 28px; }
.html-icon { background: rgba(228,77,38,.12); color: #e44d26; }
.css-icon  { background: rgba(38,77,228,.12);  color: #264de4; }
.js-icon   { background: rgba(247,223,30,.12);  color: #f7df1e; }
.netlify-icon { background: rgba(0,197,183,.12); color: #00c5b7; }

/* ═══════════════════════════════════════════════════
   ABOUT SECTION
═══════════════════════════════════════════════════ */
.about-section {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
}
.about-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
  align-items: center;
}
.about-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 280px;
}
.about-avatar {
  width: 140px; height: 140px;
  border-radius: 50%;
  background: var(--bg-card);
  z-index: 2;
  position: relative;
  overflow: hidden;
  border: 4px solid var(--bg-surface);
  box-shadow: 0 0 40px rgba(59,130,246,.4), inset 0 0 20px rgba(0,0,0,.3);
  transition: transform var(--transition);
}
.about-avatar:hover {
  transform: scale(1.05);
}
.about-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.about-avatar:hover img {
  transform: scale(1.1);
}
.about-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(59,130,246,.2);
  animation: ringPulse 4s linear infinite;
}
.ring-1 { width: 160px; height: 160px; animation-delay: 0s; }
.ring-2 { width: 210px; height: 210px; animation-delay: 1s; border-color: rgba(139,92,246,.15); }
.ring-3 { width: 260px; height: 260px; animation-delay: 2s; border-color: rgba(236,72,153,.1); }
@keyframes ringPulse {
  0%   { opacity: 1; transform: scale(.95); }
  50%  { opacity: .5; }
  100% { opacity: 1; transform: scale(1.05); }
}

.about-text .section-tag { display: block; margin-bottom: 8px; }
.about-text p {
  color: var(--text-secondary);
  font-size: .97rem;
  line-height: 1.75;
  margin-bottom: 16px;
}
.about-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.pill {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 999px;
  transition: var(--transition);
}
.pill:hover {
  background: rgba(59,130,246,.1);
  border-color: rgba(59,130,246,.3);
}

/* ═══════════════════════════════════════════════════
   CONTACT SECTION
═══════════════════════════════════════════════════ */
.contact-section {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  overflow: hidden;
}
.contact-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(59,130,246,.08), transparent 70%);
  pointer-events: none;
}
.contact-inner {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.contact-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 36px;
}
.contact-inner .section-tag { display: block; margin-bottom: 8px; }

/* ═══════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════ */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  background: var(--bg-base);
}
.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-logo {
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.footer-copy {
  font-size: .82rem;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: .82rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--text-primary); }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .projects-grid { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; gap: 40px; }
  .about-visual { height: 200px; }
  .ring-3 { display: none; }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 70px; left: 0; right: 0;
    flex-direction: column;
    background: rgba(8,11,20,.97);
    backdrop-filter: blur(20px);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .stat-divider { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}


