@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Escalas tipográficas compartidas */
:root {
  --hero-title-size: 1.65rem;
  --hero-subtitle-size: 1.05rem;
  --hero-link-size: 0.82rem;
  --hero-stack-width: 100%;
  --hero-padding-x: 20px;
  --hero-padding-y: 48px;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --status-online: #22c55e;
  --status-offline: #ef4444;
}

@media (min-width: 768px) {
  :root {
    --hero-title-size: 2rem;
    --hero-subtitle-size: 1.18rem;
    --hero-link-size: 0.88rem;
    --hero-stack-width: 560px;
    --hero-padding-x: 18px;
    --hero-padding-y: 56px;
    --space-xs: 0.55rem;
    --space-sm: 0.8rem;
    --space-md: 1.1rem;
    --space-lg: 1.65rem;
    --space-xl: 2.25rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --hero-title-size: 2.3rem;
    --hero-subtitle-size: 1.28rem;
    --hero-link-size: 0.9rem;
    --hero-stack-width: 580px;
    --hero-padding-x: 16px;
    --hero-padding-y: 64px;
    --space-xs: 0.6rem;
    --space-sm: 0.85rem;
    --space-md: 1.15rem;
    --space-lg: 1.75rem;
    --space-xl: 2.5rem;
  }
}

/* Reset mínimo para layout consistente */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Base del documento */
body {
  margin: 0;
  min-height: 100vh;
  background-color: #fff;
  color: #000;
  font-family: "IBM Plex Mono", monospace;
  line-height: 1.5;
}

/* Mantiene el azul clásico del navegador en links normales y visitados */
a,
a:visited {
  color: #000;
}

/* Layout principal */
.hero {
  display: flex;
  width: 100%;
  min-height: 100svh;
}

.hero__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.hero__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: var(--hero-stack-width);
  gap: var(--space-xl);
  padding-block: var(--hero-padding-y);
}

/* Bloque superior del home */
.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-inline: var(--hero-padding-x);
  gap: var(--space-md);
  text-align: center;
}

.hero__heading-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: var(--space-sm);
  text-align: center;
}

/* Jerarquía tipográfica del hero */
.hero__title {
  margin: 0;
  font-size: var(--hero-title-size);
  font-weight: 400;
  white-space: nowrap;
  line-height: 0.8;
}

.hero__subtitle {
  margin: 0;
  margin-left: 2px;
  font-size: var(--hero-subtitle-size);
  font-weight: 500;
}

.hero__summary {
  width: 100%;
  max-width: 26rem;
  margin: 0;
  margin-left: 2px;
  font-size: var(--hero-link-size);
  font-weight: 400;
  line-height: 1.6;
}

.projects > .hero__summary {
  max-width: none;
}

/* Acciones principales */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  width: 100%;
  gap: var(--space-md);
}

.hero__content .hero__actions {
  justify-content: center;
}

.hero__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.0625rem 0.1875rem;
}

.hero__button--disabled {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
  filter: grayscale(0.6);
}

.hero__button--disabled .hero__button-label {
  opacity: 0.9;
}

.hero__button-label {
  font-size: var(--hero-link-size);
  font-weight: 400;
}

/* Listados de proyectos */
.projects-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: var(--space-xl);
  padding-inline: var(--hero-padding-x);
}

.projects {
  width: 100%;
}

.hero__stack > .projects {
  padding-inline: var(--hero-padding-x);
}

.projects__title {
  margin: 0;
  text-align: left;
  font-size: var(--hero-subtitle-size);
  font-weight: 500;
}

.projects__title + .projects__meta {
  margin-top: var(--space-xs);
}

.projects__title + .hero__summary,
.projects__title + .projects__list {
  margin-top: var(--space-sm);
}

.hero__summary + .hero__summary {
  margin-top: var(--space-sm);
}

.projects__meta + .projects__title,
.hero__summary + .projects__title {
  margin-top: var(--space-lg);
}

.projects__list + .projects__cta-group {
  margin-top: var(--space-lg);
}

.projects__list + .projects__footer {
  margin-top: var(--space-md);
}

.projects__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  list-style-type: decimal;
  margin: 0;
  padding-left: 1.1rem;
}

.projects__item {
  font-size: var(--hero-link-size);
}

.projects__item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: var(--space-md);
}

.projects__link {
  font-size: var(--hero-link-size);
  font-weight: 400;
}

.project__status {
  margin: 0;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.45rem;
  font-size: var(--hero-link-size);
  font-weight: 400;
  white-space: nowrap;
  width: fit-content;
}

.projects__meta {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

.projects__meta .hero__summary,
.projects__meta .project__status {
  margin: 0;
}

.project__status-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 9999px;
  display: inline-block;
  background-color: var(--status-offline);
}

.project__status--online .project__status-dot {
  background-color: var(--status-online);
}

.project__status--offline .project__status-dot {
  background-color: var(--status-offline);
}

.projects__footer {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-top: 0;
}

.projects__cta-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: var(--space-md);
  padding-top: 0;
}

.projects__cta-group .hero__actions {
  align-items: center;
  justify-content: center;
}

.projects__cta-group .hero__button {
  justify-content: center;
}

.projects__back {
  display: flex;
  justify-content: flex-end;
}

.projects__more {
  font-size: var(--hero-link-size);
  font-weight: 400;
}

@media (max-width: 767px) {
  .hero__actions {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .hero__button {
    justify-content: flex-start;
  }

  .hero__content .hero__actions {
    align-items: center;
  }

  .hero__content .hero__button {
    justify-content: center;
  }

  .projects__item-row {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-xs);
  }
}
