/* ============================================================
   LAYOUT.CSS — Secciones · Grillas · Navegación · Hero · Footer
   ============================================================ */

/* ══════════════════════════════════
   NAV
══════════════════════════════════ */
nav {
  position:        relative;
  z-index:         10;
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         28px var(--side-padding);
  animation:       slideDown 0.8s cubic-bezier(.16,1,.3,1) both;
}

.nav-links {
  display:    flex;
  gap:        36px;
  list-style: none;
}

/* ══════════════════════════════════
   HERO
══════════════════════════════════ */
.hero {
  min-height:     100vh;
  position:       relative;
  display:        flex;
  flex-direction: column;
  overflow:       hidden;
}

/* Fondo degradado con orbs */
.gradient-bg {
  position:   absolute;
  inset:      0;
  z-index:    0;
  background:
    radial-gradient(ellipse 80% 80% at 80% 20%, rgba(26,90,255,0.25)   0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 20% 80%, rgba(15,122,110,0.3)   0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 60% 60%, rgba(25,196,180,0.08)  0%, transparent 50%),
    linear-gradient(135deg, #050c14 0%, #081220 40%, #0a1e38 100%);
}

/* Textura de grano */
.grain {
  position:            absolute;
  inset:               0;
  z-index:             1;
  opacity:             0.03;
  background-image:    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size:     200px 200px;
}

.hero-content {
  position:       relative;
  z-index:        5;
  flex:           1;
  display:        flex;
  flex-direction: column;
  justify-content: center;
  padding:        0 var(--side-padding) 56px;
  max-width:      760px;
}

.scroll-hint {
  position:    relative;
  z-index:     5;
  padding:     0 var(--side-padding) 40px;
  font-size:   12px;
  color:       var(--muted);
  letter-spacing: 1px;
  display:     flex;
  align-items: center;
  gap:         10px;
  animation:   fadeUp 0.9s 0.8s cubic-bezier(.16,1,.3,1) both;
}

/* ══════════════════════════════════
   SKILLS
══════════════════════════════════ */
.skills-section {
  padding: 100px var(--side-padding);
}

.skills-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap:                   20px;
}

/* ══════════════════════════════════
   PROYECTOS
══════════════════════════════════ */
.projects-section {
  padding:     100px var(--side-padding);
  background:  rgba(255,255,255,0.01);
  border-top:  1px solid rgba(255,255,255,0.04);
}

.projects-grid {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   24px;
}

/* La primera card ocupa todo el ancho */
.projects-grid .project-card:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 21 / 8;
}

/* ══════════════════════════════════
   SOBRE MÍ
══════════════════════════════════ */
.about-section {
  padding:               100px var(--side-padding);
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   80px;
  align-items:           center;
}

.about-visual {
  position: relative;
  height:   440px;
}

.about-text .section-title { margin-bottom: 24px; }

.tech-chips {
  display:   flex;
  flex-wrap: wrap;
  gap:       8px;
  margin-top: 32px;
}

/* ══════════════════════════════════
   CONTACTO
══════════════════════════════════ */
.contact-section {
  padding:     100px var(--side-padding);
  text-align:  center;
  position:    relative;
  overflow:    hidden;
}

.contact-bg {
  position:   absolute;
  inset:      0;
  background: radial-gradient(ellipse 60% 60% at 50% 100%, rgba(25,196,180,0.08) 0%, transparent 60%);
}

/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
footer {
  padding:         32px var(--side-padding);
  border-top:      1px solid rgba(255,255,255,0.05);
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  font-size:       13px;
  color:           var(--muted);
}

.social-links {
  display: flex;
  gap:     24px;
}

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 768px) {
  .nav-links           { display: none; }

  .projects-grid       { grid-template-columns: 1fr; }
  .projects-grid .project-card:first-child {
    grid-column:  auto;
    aspect-ratio: 16 / 10;
  }

  .about-section {
    grid-template-columns: 1fr;
  }
  .about-visual { height: 280px; }
}
