/* --- VARIABLES GLOBALES DE DISEÑO --- */
:root {
  --bg-surface: #f1f1e6;
  --text-main: #282828;
  --border-color: #282828;
  --card-header: #e0e0e0;
  --font-mono: "JetBrains Mono", "Courier New", monospace;
  --shadow-retro: 6px 6px 0px #000;

  /* Colores de identidad */
  --color-frontend: #d0ff41; /* Verde */
  --color-gestion: #ff9100; /* Naranja */
  --color-accent: #00d4ff; /* Cian para enlaces personales */
}

/* --- BASE RESPONSIVE --- */
* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-surface);
  color: var(--text-main);
  font-family: var(--font-mono);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  line-height: 1.5;
}

/* Efecto cuadriculado técnico de fondo */
.bg-grid {
  background-size: 30px 30px;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

/* Contenedor principal del Hub */
.hub-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

/* --- ESTILO DE VENTANAS (Tarjetas) --- */
.custom-card {
  background: white;
  border: 2px solid var(--border-color);
  box-shadow: 4px 4px 0px #000;
  margin-bottom: 2rem;
  overflow: hidden; /* Obliga al contenido a respetar los bordes del contenedor */
  width: 100%;
}

.custom-card-header {
  background-color: var(--card-header);
  border-bottom: 2px solid var(--border-color);
  padding: 8px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.card-body {
  padding: 25px;
}

/* --- SELECTOR DE MATERIAS (Index Hub) --- */
.matter-option {
  border: 2px solid var(--border-color);
  padding: 30px;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.2s ease-in-out;
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #fff;
}

.matter-option h2 {
  font-size: 1.8rem;
  margin: 15px 0;
  letter-spacing: -1px;
}

.matter-option .status-tag {
  font-weight: bold;
  font-size: 0.7rem;
  background: #000;
  color: #fff;
  padding: 4px 8px;
  align-self: flex-start;
}

/* Hover dinámico por materia */
.opt-frontend:hover {
  background-color: var(--color-frontend);
  transform: translate(-4px, -4px);
  box-shadow: 6px 6px 0px #000;
}

.opt-gestion:hover {
  background-color: var(--color-gestion);
  transform: translate(-4px, -4px);
  box-shadow: 6px 6px 0px #000;
}

/* --- BOTONES Y COMPONENTES GENÉRICOS --- */
.btn-tech {
  background-color: var(--border-color);
  color: white;
  padding: 10px 20px;
  border: none;
  font-weight: bold;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
}

.btn-outline-tech {
  background: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.8rem;
}

.badge-version {
  background-color: #000;
  color: #fff;
  padding: 3px 8px;
  text-decoration: none;
  font-size: 0.8rem;
}

/* --- UTILIDADES RESPONSIVE --- */
@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem !important;
  }
  .card-body {
    padding: 15px;
  }
  .matter-option {
    padding: 20px;
  }
  .matter-option h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hub-wrapper {
    padding: 20px 10px;
  }
  .custom-card-header span:last-child {
    display: none;
  } /* Oculta controles extra en móviles muy pequeños */
}
