/* ============================================================
   PORTFOLIO UX — HOJA DE ESTILOS
   Modifica los valores de :root para personalizar colores y
   tipografías sin tocar el resto del código.
   ============================================================ */

/* ——— VARIABLES DE DISEÑO ——— */
:root {
  /* Paleta de color */
  --color-bg:          #F8F7F4;      /* Fondo general */
  --color-surface:     #FFFFFF;      /* Tarjetas y superficies */
  --color-accent:      #5B4FE9;      /* Color de acento (morado) */
  --color-accent-soft: #EDE9FF;      /* Acento suave para fondos */
  --color-text:        #1A1A2E;      /* Texto principal */
  --color-muted:       #6B7280;      /* Texto secundario */
  --color-border:      #E5E7EB;      /* Bordes */
  --color-placeholder: #D1D5DB;      /* Fondo de placeholders */

  /* Tipografía */
  --font-body:   'Inter', sans-serif;
  --font-display:'Playfair Display', serif;

  /* Espaciado */
  --max-width: 1100px;
  --section-gap: 120px;
  --radius: 16px;
  --radius-sm: 8px;

  /* Sombras */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,.10);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12);
}

/* ——— RESET Y BASE ——— */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }

a { color: inherit; text-decoration: none; }

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

/* ——— UTILIDADES ——— */
.highlight { color: var(--color-accent); }

.dot { color: var(--color-accent); }

.pilar-tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}

/* ——— BOTONES ——— */
.btn-primary {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(91,79,233,.35);
}
.btn-primary:hover {
  background: #4840c9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(91,79,233,.45);
}

.btn-ghost {
  display: inline-block;
  border: 2px solid var(--color-border);
  color: var(--color-text);
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 500;
  font-size: .95rem;
  transition: border-color .2s, color .2s;
}
.btn-ghost:hover { border-color: var(--color-accent); color: var(--color-accent); }

.btn-grande { font-size: 1.1rem; padding: 18px 44px; }

/* ——— CHIPS / TAGS ——— */
.chip {
  display: inline-block;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: .78rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 50px;
  letter-spacing: .03em;
}

/* ——— PLACEHOLDERS DE IMAGEN ——— */
.img-placeholder {
  width: 100%;
  min-height: 320px;
  background: var(--color-placeholder);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--color-muted);
  font-size: .9rem;
  text-align: center;
  padding: 24px;
  border: 2px dashed #B0B7C3;
  transition: background .2s;
}
.img-placeholder:hover { background: #C8CDD6; }
.img-placeholder.small { min-height: 200px; }
.img-placeholder.large { min-height: 480px; }
.img-placeholder.round {
  width: 220px;
  height: 220px;
  min-height: unset;
  border-radius: 50%;
  font-size: 3rem;
  flex-shrink: 0;
}
.img-placeholder small { font-size: .75rem; opacity: .7; }

/* ——— NAVEGACIÓN ——— */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(248,247,244,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -.01em;
}
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--color-muted);
  transition: color .2s;
}
.nav-links a:hover { color: var(--color-text); }
.btn-nav {
  background: var(--color-accent) !important;
  color: #fff !important;
  padding: 8px 22px !important;
  border-radius: 50px;
  font-weight: 600 !important;
}
.btn-nav:hover { background: #4840c9 !important; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--color-text);
}

/* ——— HERO ——— */
.hero {
  min-height: 100vh;
  padding: 120px 24px 80px;
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}
.hero-tag {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--color-text);
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--color-muted);
  max-width: 480px;
  margin-bottom: 40px;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-image { display: flex; justify-content: center; }
.hero-img-placeholder {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 4/5;
  background: var(--color-accent-soft);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--color-accent);
  font-size: .9rem;
  text-align: center;
  padding: 24px;
  border: 2px dashed var(--color-accent);
}
.placeholder-icon { font-size: 3.5rem; }

/* ——— PROYECTOS ——— */
#proyectos { padding-bottom: var(--section-gap); }

.proyecto {
  max-width: var(--max-width);
  margin: 0 auto var(--section-gap);
  padding: 0 24px;
}

/* Cabecera */
.proyecto-header {
  padding: 80px 0 48px;
  border-top: 1px solid var(--color-border);
}
.proyecto-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.proyecto-numero {
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-accent-soft);
  line-height: 1;
  font-family: var(--font-display);
}
.proyecto-tag {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.proyecto-titulo {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
}
.proyecto-descripcion {
  font-size: 1.1rem;
  color: var(--color-muted);
  max-width: 680px;
  margin-bottom: 24px;
}
.proyecto-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Portada */
.proyecto-cover {
  margin-bottom: 72px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.proyecto-cover img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Caso de estudio — pilares */
.caso-estudio {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.pilar {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

.pilar-label { position: sticky; top: 88px; }

.pilar-numero {
  display: block;
  font-size: 4rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--color-accent-soft);
  line-height: 1;
  margin-bottom: 8px;
}
.pilar-titulo {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-text);
}

.pilar-texto {
  font-size: 1.05rem;
  color: var(--color-muted);
  margin-bottom: 32px;
  max-width: 640px;
}

/* Cita destacada */
.cita {
  border-left: 4px solid var(--color-accent);
  padding: 16px 24px;
  background: var(--color-accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--color-text);
  margin: 0 0 32px;
}

/* Pasos del proceso */
.proceso-pasos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0 0 32px;
}
.paso {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: box-shadow .2s, transform .2s;
}
.paso:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.paso-icono { font-size: 1.8rem; margin-bottom: 12px; }
.paso h4 { font-size: .95rem; font-weight: 700; margin-bottom: 8px; }
.paso p { font-size: .85rem; color: var(--color-muted); }

/* Galería 2 columnas */
.galeria-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

/* Métricas */
.metricas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.metrica {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.metrica-valor {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--color-accent);
  font-family: var(--font-display);
  margin-bottom: 8px;
}
.metrica-label {
  font-size: .85rem;
  color: var(--color-muted);
  font-weight: 500;
}

/* Aprendizajes */
.aprendizajes {
  background: var(--color-accent-soft);
  border-radius: var(--radius);
  padding: 32px;
}
.aprendizajes h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.aprendizajes p { font-size: 1rem; color: var(--color-text); }

/* Footer del proyecto */
.proyecto-footer {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border);
}

/* Proyectos alternos (fondo ligeramente diferente) */
.proyecto-alt { background: transparent; }

/* ——— SOBRE MÍ ——— */
.sobre-mi {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--section-gap) 24px;
}
.sobre-mi-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 72px;
  align-items: center;
}
.sobre-mi-texto h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  margin-bottom: 20px;
}
.sobre-mi-texto p {
  font-size: 1.05rem;
  color: var(--color-muted);
  max-width: 580px;
  margin-bottom: 16px;
}
.habilidades { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 32px; }

/* ——— CONTACTO ——— */
.contacto {
  padding: var(--section-gap) 24px;
  text-align: center;
}
.contacto-inner {
  max-width: 640px;
  margin: 0 auto;
}
.contacto h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
}
.contacto p {
  font-size: 1.05rem;
  color: var(--color-muted);
  margin-bottom: 40px;
}
.redes {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 32px;
}
.red-link {
  font-size: .9rem;
  font-weight: 600;
  color: var(--color-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
}
.red-link:hover { color: var(--color-accent); }

/* ——— FOOTER ——— */
.footer {
  background: var(--color-text);
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 28px 24px;
  font-size: .85rem;
}
.footer strong { color: rgba(255,255,255,.8); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet (≤ 900px) */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 100px;
  }
  .hero-subtitle { margin: 0 auto 40px; }
  .hero-cta { justify-content: center; }
  .hero-image { display: none; }

  .pilar { grid-template-columns: 1fr; gap: 24px; }
  .pilar-label { position: static; }
  .pilar-numero { font-size: 2.5rem; }

  .proceso-pasos { grid-template-columns: repeat(2, 1fr); }
  .metricas { grid-template-columns: repeat(2, 1fr); }

  .sobre-mi-inner { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .sobre-mi-foto { display: flex; justify-content: center; }
  .habilidades { justify-content: center; }
}

/* Móvil (≤ 600px) */
@media (max-width: 600px) {
  :root { --section-gap: 72px; }

  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--color-bg); border-bottom: 1px solid var(--color-border); padding: 16px 24px; gap: 16px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .hero-title { font-size: 2rem; }

  .proceso-pasos { grid-template-columns: 1fr 1fr; gap: 12px; }
  .galeria-2col { grid-template-columns: 1fr; }
  .metricas { grid-template-columns: 1fr; }

  .proyecto-footer { flex-direction: column; }
  .btn-primary, .btn-ghost { text-align: center; }

  .redes { flex-direction: column; gap: 16px; }
}


/* ============================================================
   MÓDULO: CUADRÍCULA DE PROYECTOS (6 IMÁGENES)
   ============================================================ */

.proyectos-indice {
  background: var(--color-bg);
  padding: 100px 24px;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.indice-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.indice-header {
  text-align: center;
  margin-bottom: 60px;
}

.indice-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: var(--color-text);
  margin-top: 12px;
}

.proyectos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.proyecto-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: all .3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--color-border);
}

.proyecto-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-8px);
}

.proyecto-card-imagen {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: var(--color-placeholder);
}

.proyecto-card-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
  border-radius: 0;
}

.proyecto-card:hover .proyecto-card-imagen img {
  transform: scale(1.08);
}

.proyecto-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(91, 79, 233, 0);
  transition: background .3s ease;
  pointer-events: none;
}

.proyecto-card:hover .proyecto-card-overlay {
  background: rgba(91, 79, 233, 0.15);
}

.proyecto-card-contenido {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.proyecto-card-titulo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.proyecto-card-desc {
  font-size: .85rem;
  color: var(--color-muted);
  line-height: 1.5;
  margin: 0;
}

.proyecto-card::after {
  content: '→';
  position: absolute;
  bottom: 16px;
  right: 16px;
  font-size: 1.4rem;
  color: var(--color-accent);
  opacity: 0;
  transform: translateX(-8px);
  transition: all .3s ease;
}

.proyecto-card:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* Responsive */
@media (max-width: 900px) {
  .proyectos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .proyectos-indice {
    padding: 60px 24px;
  }

  .proyectos-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .proyecto-card-imagen {
    height: 200px;
  }
}

/* ============================================================
   BOTÓN FLOTANTE: VOLVER ARRIBA
   ============================================================ */

.btn-volver-arriba {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 56px;
  height: 56px;
  background: var(--color-accent );
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all .3s ease;
  box-shadow: 0 4px 16px rgba(91, 79, 233, .4);
  z-index: 99;
  text-decoration: none;
}

.btn-volver-arriba.visible {
  opacity: 1;
  visibility: visible;
}

.btn-volver-arriba:hover {
  background: #4840c9;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(91, 79, 233, .6);
}

.btn-volver-arriba svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.5;
  animation: bounce-arrow .6s ease-in-out infinite;
}

@keyframes bounce-arrow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

/* Responsive */
@media (max-width: 600px) {
  .btn-volver-arriba {
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
  }

  .btn-volver-arriba svg {
    width: 20px;
    height: 20px;
  }
}


/* LOGO DE LA CABECERA*/
  width: auto;
.nav-logo {
  display: flex;
  align-items: center;
  height: 100%;
}

.logo-img {
  height: 35px; /* Ajusta este valor según prefieras el tamaño del logo */
  width: auto;
  display: block;
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.05); /* Un pequeño efecto al pasar el ratón */
}
