/* ===================== VARIABLES ===================== */
/* Paleta y fuentes base */
:root {
  --bg-color: #0d1117;
  --card-bg: rgba(255, 255, 255, 0.05);
  --accent: #00d4ff;
  --text-color: #fff;
  --font-main: 'Arial', sans-serif;
  --border-radius: 16px;
  --shadow: 0 2px 16px 0 #00d4ff22;
}

/* Reset y base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* ===================== HEADER ===================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 50px;
  background: rgba(13, 17, 23, 0.8);
  backdrop-filter: blur(10px);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

/* ...resto del CSS existente... */
/* ===================== VARIABLES ===================== */
:root {
  --bg-color: #0d1117;
  --card-bg: rgba(255, 255, 255, 0.05);
  --accent: #00d4ff;
  --text-color: #fff;
  --font-main: 'Arial', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* ===================== HEADER ===================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 50px;
  background: rgba(13, 17, 23, 0.8);
  backdrop-filter: blur(10px);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.logo a {
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--text-color);
  font-weight: bold;
}

.logo span {
  color: var(--accent);
}
.logo span[aria-hidden="true"] {
  color: #fff;
}

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

.nav-links li a {
  text-decoration: none;
  color: var(--text-color);
  transition: color 0.3s;
}

.nav-links li a:hover {
  color: var(--accent);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  height: 3px;
  width: 25px;
  background: var(--text-color);
  margin: 4px 0;
  border-radius: 5px;
}

/* ===================== HERO ===================== */
/* HERO: Desktop */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 100px 0 60px 0;
  gap: 40px;
  min-height: 100vh;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.hero-content {
  max-width: 600px;
  animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.hero-content h1 span {
  color: var(--accent);
}

.hero-content h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #aaa;
}

.hero-content p {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.btn {
  background: var(--accent);
  color: var(--bg-color);
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.2s;
}

.btn:hover {
  transform: scale(1.05);
}

.hero-img img {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 4px solid var(--accent);
  box-shadow: 0 0 20px var(--accent);
  object-fit: cover;
}

/* ===================== PROYECTOS ===================== */
.projects {
  padding: 100px 0 60px 0;
  text-align: center;
}
.projects .project-grid {
  max-width: 1000px;
  margin: 0 auto;
}
.projects h2 {
  text-align: center;
  margin-bottom: 50px;
  font-size: 2rem;
}
/* Centrado perfecto de las tarjetas en el grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 auto;
  justify-items: center;
  align-items: stretch;
}
/* Tarjeta de proyecto: ancho fijo y centrado */
.project-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s;
  backdrop-filter: blur(8px);
  width: 100%;
  max-width: 300px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.project-card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 15px;
}
.project-card:hover {
  transform: scale(1.05);
}
.project-tech {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 10px 0 0 0;
}
.tech-icon {
  display: inline-flex;
  align-items: center;
  height: 24px;
  width: 24px;
}
.tech-icon img {
  height: 24px;
  width: 24px;
  object-fit: contain;
  filter: drop-shadow(0 0 2px #00d4ff44);
}

/* Utilidad para tarjetas 16:9 */
.card-16-9,
.project-img-wrapper,
.micro-img-placeholder,
.video-frame-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border: 1px solid #00d4ff;
  overflow: hidden;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.micro-img-placeholder {
  border: 1px dashed #00d4ff;
  color: #aaa;
  font-size: 1.2rem;
  transition: background 0.2s;
  max-width: 340px;
  width: 100%;
}
.micro-img-placeholder:hover {
  background: rgba(0,212,255,0.08);
  color: #00d4ff;
}

.video-card iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.project-img-wrapper {
  /* Unifica el estilo de todas las tarjetas de proyecto */
  position: relative;
  width: 100%;
  aspect-ratio: 3/2;
  min-height: 150px;
  max-width: 300px;
  max-height: 200px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border: 1px solid #00d4ff;
  overflow: hidden;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Ocupa todo el espacio del contenedor, igual que una imagen */
.project-under-construction {
  width: 100%;
  height: 100%;
  min-height: 150px;
  min-width: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00d4ff;
  font-size: 1.2rem;
  background: transparent;
  border-radius: 10px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-shadow: 0 1px 8px #000;
}

/* ===================== MICRO-GALLERY ===================== */
.micro-gallery {
  padding: 100px 0 60px 0;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
}
.micro-gallery h2 {
  margin-bottom: 40px;
  font-size: 2rem;
}
.micro-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 auto;
  justify-items: center; /* Centra las tarjetas en la grilla */
}
.micro-img-placeholder {
  /* Hereda de .card-16-9 */
  background: rgba(255,255,255,0.04);
  border: 1px dashed #00d4ff;
  color: #aaa;
  font-size: 1.2rem;
  transition: background 0.2s;
  max-width: 340px; /* Limita el ancho máximo de la tarjeta */
  width: 100%;
}

/* ===================== VIDEOS DESTACADOS ===================== */
.videos {
  padding: 100px 0 60px 0;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
}
.videos h2 {
  margin-bottom: 40px;
  font-size: 2rem;
}
.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 auto;
}
.video-card {
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 260px;
}
.video-card p {
  margin-top: 12px;
  color: #aaa;
  font-size: 1rem;
}

/* ===================== SOBRE MÍ ===================== */
.about {
  padding: 100px 0 60px 0;
  text-align: center;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

/* ===================== CONTACTO ===================== */
.contact {
  padding: 100px 0 60px 0;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
}

.social-links a {
  margin: 0 10px;
  text-decoration: none;
  color: var(--accent);
  font-weight: bold;
  transition: color 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.social-links a:hover {
  color: #fff;
}

.contact-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 0 2px #00d4ff44);
}

/* ===================== FOOTER ===================== */
footer {
  text-align: center;
  padding: 20px;
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(10px);
}

/* ===================== ANIMACIONES ===================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .project-grid,
  .micro-gallery-grid,
  .videos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero {
    flex-direction: column;
    padding: 90px 0 40px 0;
    gap: 30px;
    min-height: unset;
    max-width: 95vw;
  }
  .hero-img {
    order: -1;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    width: 100%;
  }
  .hero-img img {
    width: 180px;
    height: 180px;
    margin: 0 auto;
  }
  .hero-content {
    max-width: 100%;
    text-align: center;
  }
}
@media (max-width: 600px) {
  .project-grid,
  .micro-gallery-grid,
  .videos-grid {
    grid-template-columns: 1fr;
  }
  .project-grid,
  .micro-gallery-grid {
    justify-items: center;
  }
  .micro-img-placeholder,
  .project-img-wrapper,
  .video-frame-wrapper {
    min-height: 120px;
    max-width: 340px;
    width: 100%;
  }
  .video-card {
    min-height: 180px;
  }
  .project-img-wrapper,
  .micro-img-placeholder,
  .video-card iframe {
    min-height: 120px;
  }
  .nav-links {
    flex-direction: column;
    background: var(--bg-color);
    position: absolute;
    top: 70px;
    right: 0;
    width: 200px;
    padding: 20px;
    border-radius: 0 0 0 10px;
    display: none;
  }
  .nav-links.active {
    display: flex;
  }
  .hamburger {
    display: flex;
  }
  .hero {
    flex-direction: column;
    padding: 80px 0 30px 0;
    gap: 20px;
    min-height: unset;
    max-width: 99vw;
  }
  .hero-img {
    order: -1;
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    width: 100%;
  }
  .hero-img img {
    width: 120px;
    height: 120px;
    margin: 0 auto;
  }
  .hero-content {
    max-width: 100%;
    text-align: center;
  }
}
