html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
}

/* Fondo fijo en todo el sitio */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("img/fondo5.png") center center / cover no-repeat;
  z-index: -1;
}

.contenido-total {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
}

/* === Tarjeta principal === */
.card {
  position: relative;
  background: #f1f1f1;
  border: 2px solid black;
  border-radius: 20px;
  box-shadow: 10px 10px 0 black;
  display: flex;
  padding: 60px;
  max-width: 1200px;
  gap: 60px;
  align-items: center;
  transition: all 0.3s ease;
  z-index: 1;
}

.card:hover {
  transform: translate(-6px, -6px);
  box-shadow: 14px 14px 0 black;
}

.botones-internos {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 12px;
  z-index: 2;
}

.botones-internos button {
  padding: 10px 16px;
  border: 2px solid black;
  background-color: white;
  font-weight: bold;
  border-radius: 6px;
  box-shadow: 3px 3px 0 black;
  cursor: pointer;
  transition: all 0.2s ease;
}

.botones-internos button:hover {
  background: black;
  color: white;
  box-shadow: 5px 5px 0 black;
  transform: translate(-2px, -2px);
}

/* Foto de perfil */
.foto-perfil {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3px solid black;
  box-shadow: 6px 6px 0 black;
  object-fit: cover;
  transition: all 0.3s ease;
}

.foto-perfil:hover {
  transform: translate(-4px, -4px);
  box-shadow: 10px 10px 0 black;
}

.contenido-lateral {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  max-width: 600px;
}

.texto-lateral h1 {
  font-size: 3em;
  margin: 0;
  transition: all 0.3s ease;
  display: inline-block;
}

.texto-lateral h1:hover {
  color: #222;
  transform: scale(1.05) rotate(-1deg);
}

.boton-principal {
  background: #dfff00;
  color: black;
  border: 2px solid black;
  padding: 12px 25px;
  font-weight: bold;
  border-radius: 8px;
  box-shadow: 4px 4px 0 black;
  cursor: pointer;
  transition: all 0.2s ease;
}

.boton-principal:hover {
  background: black;
  color: white;
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 black;
}

/* === Terminal retro === */
.terminal-retro {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 1.6s ease, opacity 1.6s ease;
  width: 600px;
  background: #000;
  color: #00ff00;
  font-family: monospace;
  border: 4px solid #999;
  border-radius: 8px;
  box-shadow: 8px 8px 0 #000;
  margin-top: 30px;
}

.terminal-retro.activa {
  max-height: 1000px;
  opacity: 1;
}

.terminal-header {
  background: #ccc;
  color: #333;
  display: flex;
  align-items: center;
  padding: 5px 10px;
  border-bottom: 2px solid #999;
  font-weight: bold;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 6px;
  position: relative;
  cursor: pointer;
}

.dot.red::after {
  content: "×";
  position: absolute;
  top: -2px;
  left: 3px;
  color: black;
  font-size: 14px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.dot.red:hover::after {
  opacity: 1;
}

.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.terminal-title {
  margin-left: 10px;
}

.terminal-body {
  padding: 20px;
  white-space: pre-wrap;
  min-height: 200px;
}

/* === Ventana de contacto === */
.ventana-contacto {
  position: fixed;
  top: 120px;
  right: 60px;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 1s ease, transform 1s ease;
  width: 400px;
  background: white;
  border: 3px solid black;
  border-radius: 10px;
  box-shadow: 12px 12px 0 black;
  font-family: monospace;
  z-index: 999;
}

.ventana-contacto.activa {
  opacity: 1;
  transform: translateX(0);
}

.contacto-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contacto-body button {
  padding: 12px;
  font-weight: bold;
  border: 2px solid black;
  background: white;
  cursor: pointer;
  border-radius: 6px;
  box-shadow: 4px 4px 0 black;
  transition: all 0.2s ease;
}

.contacto-body button:hover {
  background: black;
  color: white;
  box-shadow: 6px 6px 0 black;
}

/* === Tarjetas de proyectos === */
.ventanas-inferiores {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 60px;
  margin-bottom: 100px;
  flex-wrap: wrap;
  transition: margin-top 1.6s ease;
}

.ventana {
  width: 300px;
  border: 2px solid black;
  box-shadow: 6px 6px 0 black;
  border-radius: 6px;
  background: white;
  overflow: hidden;
  transition: all 0.2s ease;
}

.ventana:hover {
  transform: translate(-3px, -3px);
  box-shadow: 10px 10px 0 black;
}

.barra-navegador {
  background: #f5f5f5;
  border-bottom: 2px solid black;
  display: flex;
  align-items: center;
  padding: 5px 10px;
  gap: 10px;
}

.circulos span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid black;
}

.rojo { background: #ff5f56; }
.amarillo { background: #ffbd2e; }
.verde { background: #27c93f; }

.barra-url {
  font-size: 12px;
  color: black;
  flex-grow: 1;
  background: white;
  border: 1px solid black;
  padding: 2px 8px;
  border-radius: 4px;
}

.contenido-ventana {
  padding: 15px;
  text-align: center;
}

.contenido-ventana img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background-color: #fff;
  border: 1px solid black;
  border-radius: 4px;
  margin-bottom: 10px;
}

.contenido-ventana p {
  font-size: 0.95em;
  color: #333;
}

/* === Footer retro === */
.footer-retro {
  width: 100%;
  background: #c0c0c0;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  padding: 16px;
  color: black;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-top: 2px solid #000;
  border-bottom: 2px solid #fff;
  box-shadow: inset 0 2px 0 #fff, inset 0 -2px 0 #000;
  position: relative;
  z-index: 1;
}

.footer-retro::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 12px 12px;
  pointer-events: none;
  opacity: 0.6;
  z-index: 0;
}

.footer-contenido {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1;
}

.footer-icono {
  width: 22px;
  height: 22px;
  image-rendering: pixelated;
}

.footer-contenido p {
  margin: 0;
  padding: 0;
  z-index: 1;
}

.barra-estado {
  position: absolute;
  left: 10px;
  bottom: 6px;
  font-size: 12px;
  opacity: 0.7;
  color: black;
  font-family: 'Courier New', monospace;
  z-index: 1;
}
