* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Zen Kaku Gothic New", sans-serif;
  line-height: 1.7;
  color: #ece4e1;
  background-color: #140f10;
}

/* rotulo */
body > header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 18px;
  background-color: #17110f;
  border-bottom: 1px solid #2c2120;
}

body > header > a img {
  display: block;
  height: 30px;
  width: auto;
}

body > header nav {
  display: flex;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

body > header nav a {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #d8cfcb;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background-color 0.25s, color 0.25s;
}

body > header nav a:hover {
  background-color: #b53737;
  color: #fff;
}

body > header nav a[aria-disabled] {
  opacity: 0.45;
  pointer-events: none;
}

/* tipografia base */
h1, h2 {
  margin: 10px 0 14px 0;
  letter-spacing: -0.5px;
}

h1 { font-size: 32px; font-weight: 900; }
h2 { font-size: 24px; font-weight: 700; }

/* secciones */
main > section {
  position: relative;
  padding: 70px 20px 60px 20px;
  overflow: hidden;
}

main > section > div {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* sello hanko (generado desde data-num) */
main > section[data-num]::before {
  content: attr(data-num);
  position: absolute;
  top: 20px;
  right: 20px;
  width: 54px;
  height: 54px;
  background-color: #b53737;
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px #fff, 0 6px 16px rgba(181, 55, 55, 0.35);
  transform: rotate(-6deg);
  transition: transform 0.35s;
  z-index: 3;
}

main > section[data-num]:hover::before {
  transform: rotate(0deg) scale(1.05);
}

main > section[data-pag]::after {
  content: attr(data-pag);
  position: absolute;
  top: 86px;
  right: 20px;
  width: 54px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #999;
  z-index: 3;
}

/* etiqueta (small) */
main > section small {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
  background-color: #b53737;
  color: #fff;
}

/* perfil */
#perfil {
  background-image:
    linear-gradient(180deg, rgba(12,18,40,0.55) 0%, rgba(12,18,40,0.80) 100%),
    url("../imagenes/6.jpg");
  background-size: cover;
  background-position: center;
  text-align: center;
  color: #fff;
}

#perfil h1 {
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

#perfil img {
  display: block;
  margin: 0 auto 25px auto;
  border-radius: 50%;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.4s;
}

#perfil img:hover {
  transform: scale(1.05);
}

#perfil p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
  max-width: 520px;
  margin: 0 auto;
}

/* formacion */
#formacion {
  background-color: #1d1512;
}

#formacion small {
  background-color: #b53737;
}

#formacion > div > p {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  padding: 22px 24px;
  background-color: #1f1f1f;
  color: #d0d0d0;
  border-radius: 16px;
  margin: 0 0 28px 0;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

#formacion > div > p strong {
  font-size: 54px;
  font-weight: 900;
  color: #b53737;
  line-height: 1;
  letter-spacing: -2px;
}

#formacion ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  counter-reset: materia;
}

#formacion ol li {
  display: flex;
  align-items: center;
  gap: 14px;
  background-color: #271f1c;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  border-left: 3px solid transparent;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: all 0.25s;
  counter-increment: materia;
}

#formacion ol li::before {
  content: counter(materia, decimal-leading-zero);
  font-size: 13px;
  font-weight: 700;
  color: #b53737;
  letter-spacing: 1px;
}

/* japon */
#japon {
  background-color: #2b1410;
  color: #f5e9d8;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
}

#japon::after { color: #d6b894; }

#japon figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  height: 240px;
}

#japon figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s;
}

#japon figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, #2b1410 100%);
}

#japon:hover figure img {
  transform: scale(1.04);
}

#japon > div {
  max-width: none;
  padding: 50px 24px 60px 24px;
}

#japon h2 {
  color: #fff;
  font-size: 26px;
}

#japon p {
  color: #d6b894;
  font-size: 15px;
  line-height: 1.8;
  margin: 0;
}

/* personal */
#personal {
  background-color: #1a1a1a;
  color: #f0f0f0;
}

#personal h2 { color: #fff; }

#personal > div > p {
  color: #c5c5c5;
}

#personal h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #888;
  margin: 40px 0 18px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #2e2e2e;
}

/* juegos */
#juegos {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

#juegos li {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  transition: transform 0.35s, box-shadow 0.35s;
}

#juegos li:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(181, 55, 55, 0.35);
}

#juegos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
}

#juegos li:hover img {
  transform: scale(1.08);
}

#juegos span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 12px 12px 12px;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

/* intereses */
#intereses {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#intereses li {
  background-color: #2a2a2a;
  border: 1px solid #333;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: #e0e0e0;
  transition: all 0.25s;
}

#intereses li:hover {
  background-color: #b53737;
  border-color: #b53737;
  color: #fff;
  transform: translateY(-2px);
}

/* contacto */
#contacto {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background-color: #232323;
  border: 1px solid #2e2e2e;
}

#contacto dt {
  padding: 14px 18px 2px 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #888;
}

#contacto dd {
  padding: 2px 18px 14px 18px;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  word-break: break-all;
  border-bottom: 1px solid #2e2e2e;
}

#contacto dd:last-of-type {
  border-bottom: none;
}

#contacto a {
  color: #fff;
  text-decoration: none;
}

#contacto a:hover {
  color: #ff8a8a;
}

/* equipo */
#equipo {
  background-color: #221518;
}

#equipo small {
  background-color: #b53737;
}

#equipo ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

#equipo li {
  background-color: #2a1e22;
  border: 1px solid #3a2a30;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transition: transform 0.3s, box-shadow 0.3s;
}

#equipo a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  text-decoration: none;
  color: #ece4e1;
}

#equipo .equipo-foto {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

#equipo .equipo-datos {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#equipo strong {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

#equipo .equipo-rol {
  font-size: 13px;
  font-weight: 500;
  color: #b3a39d;
}

#equipo .equipo-cta {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #b53737;
  white-space: nowrap;
  transition: transform 0.3s;
}

#equipo li:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(181, 55, 55, 0.18);
}

#equipo li:hover .equipo-cta {
  transform: translateX(4px);
}

/* mockups */
#mockups {
  background-color: #161013;
  padding-top: 46px;
  padding-bottom: 46px;
}

#mockups small {
  background-color: #b53737;
}

#mockups > div {
  max-width: 980px;
}

.mockups-grid {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.mockups-grid li {
  background: linear-gradient(135deg, #5a1822, #2e0d12);
  border: 1px solid #4a1e26;
  border-radius: 16px;
  overflow: hidden;
}

.mockups-grid li:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.mockups-grid img {
  width: 100%;
  height: auto;
  display: block;
  transform: scale(1.45);
}

/* los mockups de celular: acercar al telefono (esta arriba-izquierda con mucha mano) */
.mockups-grid li.is-phone img {
  transform: scale(2.4);
  transform-origin: 36% 42%;
}

/* ficha */
#ficha {
  background-color: #1a1413;
}

#ficha small {
  background-color: #b53737;
}

#ficha > div > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 10px;
}

#ficha article {
  background-color: #241d1c;
  padding: 22px;
  border-radius: 14px;
  border-top: 4px solid #b53737;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

#ficha article h3 {
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 4px 0;
  letter-spacing: 1px;
}

#ficha article > p {
  font-size: 13px;
  color: #9a8f8b;
  margin: 0 0 18px 0;
  line-height: 1.4;
}

#ficha dl {
  margin: 0;
}

#ficha dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #e07a7a;
  padding-top: 10px;
  border-top: 1px solid #34292a;
}

#ficha dt:first-of-type {
  border-top: none;
  padding-top: 0;
}

#ficha dd {
  margin: 2px 0 10px 0;
  font-size: 14px;
  font-weight: 500;
  color: #ece4e1;
}

#ficha dd:last-of-type {
  margin-bottom: 0;
}

/* footer */
body > footer {
  background-color: #0f0f0f;
  border-top: 1px solid #2a2a2a;
  padding: 35px 24px;
}

body > footer p {
  max-width: 720px;
  margin: 0 auto;
  font-size: 12px;
  line-height: 1.7;
  color: #777;
  text-align: center;
}

/* tablet y desktop */
@media (min-width: 769px) {
  body > header {
    flex-direction: row;
    justify-content: space-between;
    padding: 16px 28px;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  body > header > a img { height: 36px; }

  body > header nav {
    width: auto;
    justify-content: flex-end;
  }

  body > header nav a {
    font-size: 13px;
    letter-spacing: 1.5px;
    padding: 8px 14px;
  }

  main > section {
    padding: 90px 20px;
  }

  main > section[data-num]::before {
    top: 40px;
    right: 40px;
    width: 74px;
    height: 74px;
    font-size: 42px;
  }

  main > section[data-pag]::after {
    top: 124px;
    right: 40px;
    width: 74px;
    font-size: 11px;
    letter-spacing: 2px;
  }

  main > section small {
    font-size: 12px;
    letter-spacing: 4px;
    padding: 6px 14px;
    margin-bottom: 25px;
  }

  h1 { font-size: 46px; letter-spacing: -1px; }
  h2 { font-size: 30px; }

  #perfil img {
    width: 150px;
    height: 150px;
  }

  #perfil p {
    font-size: 17px;
  }

  #formacion > div > p strong {
    font-size: 64px;
  }

  #formacion ol {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  #formacion ol li {
    padding: 16px 20px;
    font-size: 15px;
  }

  #formacion ol li:hover {
    border-left-color: #b53737;
    transform: translateX(6px);
    box-shadow: 0 6px 18px rgba(181, 55, 55, 0.15);
  }

  #formacion ol li:hover::before {
    color: #fff;
  }

  #japon {
    grid-template-columns: 1fr 1fr;
    min-height: 460px;
  }

  #japon figure {
    height: auto;
  }

  #japon figure::after {
    background: linear-gradient(90deg, transparent 70%, #2b1410 100%);
  }

  #japon > div {
    padding: 80px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  #japon h2 { font-size: 34px; }
  #japon p { font-size: 16px; max-width: 420px; }

  #personal h3 {
    font-size: 13px;
    letter-spacing: 3px;
    margin-top: 50px;
  }

  #juegos {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }

  #juegos span {
    font-size: 15px;
    padding: 30px 16px 16px 16px;
  }

  #intereses li {
    padding: 10px 18px;
    font-size: 14px;
  }

  #contacto {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    grid-auto-flow: column;
    background-color: transparent;
    border: none;
    column-gap: 12px;
    row-gap: 0;
  }

  #contacto dt {
    grid-row: 1;
    background-color: #2a1e22;
    border: 1px solid #3a2a30;
    border-bottom: none;
    border-radius: 14px 14px 0 0;
    padding-top: 18px;
  }

  #contacto dd {
    grid-row: 2;
    background-color: #2a1e22;
    border: 1px solid #3a2a30;
    border-top: none;
    border-radius: 0 0 14px 14px;
    padding-bottom: 18px;
  }

  #mockups > div {
    max-width: 1000px;
  }

  .mockups-grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  #equipo ul {
    grid-template-columns: repeat(2, 1fr);
  }

  #equipo a {
    padding: 24px 28px;
  }

  #equipo strong {
    font-size: 22px;
  }

  #ficha > div > div {
    grid-template-columns: 1fr 1fr 1.4fr;
    gap: 16px;
  }

  #ficha article {
    padding: 28px 26px;
  }
}
  