/* ============================================
   FIDEL ARTEAGA MÁRQUEZ · PORTAFOLIO
   Estilos personalizados
   ============================================ */

:root {
  --coral: #E27664;
  --coral-soft: #ECA08F;
  --bg-dark: #0a0a0a;
  --bg-darker: #050505;
  --text-light: #f5f5f5;
  --text-muted: #a3a3a3;
  --text-dimmer: #6b6b6b;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Layout: footer queda al final, aparece solo al scrollear hasta abajo */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

/* ============================================
   HERO (Inicio): fondo oscuro con textura arquitectónica
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--bg-dark);
}

/* Gradiente que simula estructura arquitectónica geométrica oscura.
   Cuando agregues img/hero/portada.jpg se prefiere esa imagen automáticamente. */
.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 25% 40%, rgba(80,80,80,0.35), transparent 55%),
    radial-gradient(circle at 75% 60%, rgba(50,50,50,0.4), transparent 50%),
    linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 45%, #0f0f0f 100%);
  background-size: cover;
  background-position: center;
}

/* Si existe la imagen de hero, úsala */
.hero-bg.has-image {
  background-image: url('../img/hero/portada.jpg');
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.3) 0%,
    rgba(0,0,0,0.5) 100%
  );
}

/* Nombre del hero con tracking generoso (estilo arquitectónico) */
.hero-name {
  font-weight: 300;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text-light);
  text-align: center;
  line-height: 1.3;
}

.hero-tag {
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--coral);
  font-size: 0.7rem;
}

@media (min-width: 640px) {
  .hero-tag { font-size: 0.8rem; }
}

/* Indicador de scroll abajo del hero */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  animation: bounce 2.5s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.6; }
  50% { transform: translate(-50%, 8px); opacity: 1; }
}

/* Animación de entrada del nombre */
.fade-in {
  animation: fadeUp 1.2s ease-out 0.2s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   NAV
   ============================================ */
.nav-link {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

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

.logo-square {
  width: 18px;
  height: 18px;
  background-color: var(--coral);
  display: block;
  transition: transform 0.2s ease;
}

.logo-square:hover {
  transform: scale(1.1);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid rgba(0,0,0,0.08);
  background-color: #ffffff;
  padding: 2rem 0;
  font-size: 0.85rem;
  color: var(--text-dimmer);
}

.footer-kawaii {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.05em;
}

.footer-icon {
  width: 20px;
  height: 20px;
  color: var(--coral);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.footer-icon:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}

/* ============================================
   PÁGINAS DE GALERÍA (Profesional, Académico)
   ============================================ */
.section-title {
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--coral);
}

.firm-label {
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: #1a1a1a;
}

.project-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background-color: #f5f5f5;
  aspect-ratio: 4 / 3;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-card-overlay {
  opacity: 1;
}

.project-card-name {
  color: white;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

/* Placeholder para proyectos sin imagen aún */
.project-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
  color: var(--text-dimmer);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.95);
  z-index: 100;
  display: none;
  flex-direction: column;
  overflow-y: auto;
}

.lightbox.open {
  display: flex;
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 110;
  padding: 0.5rem;
}

.lightbox-content {
  max-width: 1100px;
  margin: 4rem auto;
  padding: 0 1.5rem;
  color: var(--text-light);
}

.lightbox-title {
  color: var(--coral);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.lightbox-image-wrap {
  position: relative;
  margin-bottom: 1rem;
}

.lightbox-image {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background-color: #111;
}

.lightbox-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}

.lightbox-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.lightbox-thumb.active,
.lightbox-thumb:hover {
  opacity: 1;
}

.lightbox-meta {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.lightbox-meta strong {
  color: var(--coral);
  margin-right: 0.5rem;
}

.lightbox-description {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.lightbox-description-en {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-dimmer);
  font-style: italic;
}
