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

:root {
  --bg: #121212;
  --text: #e0e0e0;
  --muted: #aaa;
  --font: 'Segoe UI', sans-serif;
}

body {
  background-color: var(--bg);
  font-family: var(--font);
  color: var(--text);
}

/* HEADER */
header {
  background: linear-gradient(#000 80%, #504e4e);
  padding: 20px 40px;
  border-bottom: 2px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

h1 {
  font-family: fantasy, sans-serif;
  font-size: 1.8rem;
  letter-spacing: 2px;
}

nav a {
  color: var(--text);
  text-decoration: none;
  margin-left: 24px;
  font-size: 0.95rem;
  letter-spacing: 1px;
  transition: color 0.2s;
}

nav a:hover { color: #fff; }

/* HERO */
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
}

.card {
  display: flex;
  align-items: center;
  width: min(1000px, 100%);
  height: auto;
  min-height: 400px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(to left, rgba(0,0,0,0) 30%, #000 100%);
  box-shadow: 0 0 20px rgba(255,255,255,0.08);
}

.img-wrap {
  position: relative;
  width: 40%;
  min-height: 400px;
  flex-shrink: 0;
}

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

.img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0) 30%, #000 100%);
}

.bio {
  flex: 1;
  padding: 32px;
  min-width: 0;
}

.bio h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.bio p {
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  color: var(--muted);
  line-height: 1.6;
}

/* APRENDIZAJE */
.aprendizaje {
  padding: 60px 20px;
  text-align: center;
}

.aprendizaje h2 {
  font-size: 1.8rem;
  margin-bottom: 36px;
  letter-spacing: 2px;
}

.grid-fotos {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
}

.foto-card {
  position: relative;
  width: 260px;
  height: 340px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
  cursor: pointer;
  text-decoration: none;
}

.foto-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

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

.foto-card:hover::after {
  background: linear-gradient(to top, rgba(0,0,0,0.95) 40%, rgba(0,0,0,0.2) 100%);
}

.foto-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 35%, rgba(0,0,0,0) 70%);
}

.foto-card p {
  position: absolute;
  bottom: 16px;
  left: 12px;
  right: 12px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.4;
  z-index: 1;
}

/* FOOTER */
footer {
  background: linear-gradient(to bottom, #1a1a1a, #000);
  border-top: 1px solid #2e2e2e;
  margin-top: 40px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  padding: 50px 60px;
}

.footer-brand h2 {
  font-family: fantasy, sans-serif;
  font-size: 2rem;
  letter-spacing: 3px;
  margin-bottom: 10px;
  background: linear-gradient(to right, #fff, #888);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 220px;
  line-height: 1.6;
}

.footer-social h3,
.footer-contact h3 {
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 16px;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.social-links a,
.footer-contact a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.2s, transform 0.2s;
}

.social-links a:hover,
.footer-contact a:hover {
  color: #fff;
  transform: translateX(4px);
}

.social-icon {
  width: 32px;
  height: 32px;
  background: #2a2a2a;
  border: 1px solid #333;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.social-links a:hover .social-icon {
  background: #3a3a3a;
}

.footer-contact a {
  word-break: break-all;
}

.footer-bottom {
  border-top: 1px solid #222;
  padding: 18px 60px;
  text-align: center;
}

.footer-bottom p {
  color: #444;
  font-size: 0.82rem;
  letter-spacing: 1px;
}
@media (max-width: 768px) {
  header {
    padding: 16px 20px;
    flex-wrap: wrap;
    gap: 12px;
  }

  h1 { font-size: 1.4rem; }

  .hero { padding: 32px 16px; }

  .card {
    flex-direction: column;
    height: auto;
    width: 100%;
  }

  .img-wrap {
    width: 100%;
    height: 260px;
  }

  .img-wrap::after {
    background: linear-gradient(to bottom, rgba(0,0,0,0) 30%, #000 100%);
  }

  .bio {
    padding: 24px 20px;
    max-width: 100%;
  }

  .aprendizaje { padding: 40px 16px; }

  .foto-card {
    width: 100%;
    max-width: 100%;
    height: 280px;
    flex-shrink: 1;
  }

  .footer-top { padding: 40px 24px; }
  .footer-bottom { padding: 16px 24px; }
}

@media (max-width: 480px) {
  header { padding: 14px 16px; }

  h1 { font-size: 1.2rem; }

  nav a {
    margin-left: 10px;
    font-size: 0.82rem;
  }

  .hero { padding: 24px 12px; }

  .bio h2 { font-size: 1.4rem; }
  .bio p { font-size: 0.9rem; }

  .aprendizaje { padding: 32px 12px; }
  .aprendizaje h2 { font-size: 1.3rem; }

  .foto-card { height: 240px; }
  .foto-card p { font-size: 0.82rem; }
}

@media (max-width: 360px) {
  h1 { font-size: 1rem; }
  nav a { margin-left: 8px; font-size: 0.78rem; }
  .img-wrap { height: 200px; }
  .foto-card { height: 210px; }
}
