/* Hub — the learning path as a cross-section of a building:
   foundations (logic) at the bottom, the compiler at the top. */

.hub {
  flex: 1;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 2rem 1.2rem 3rem;
}

.hero { text-align: center; margin-bottom: 2.2rem; }

.hero-title {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  line-height: 1.15;
  margin-bottom: 0.7rem;
}

.hero-title em { color: var(--olivetti); font-style: italic; }

.hero-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
  max-width: 620px;
  margin: 0 auto 1.2rem;
}

.hero-cta { font-size: 0.9rem; padding: 0.6rem 1.2rem; }

/* ---------- the building ---------- */

.building {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--panel-edge);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  box-shadow: 0 12px 30px rgb(60 50 20 / 0.12);
}

.floor {
  display: grid;
  grid-template-columns: 5.2rem 3.6rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: var(--panel);
  border-bottom: 2px solid var(--panel-edge);
  text-decoration: none;
  color: inherit;
  transition: background 100ms;
}

.floor:hover { background: #f7f4ea; }

.floor:hover .btn { filter: brightness(1.03); transform: translateY(-1px); }

.intro-foot { display: flex; justify-content: flex-end; margin-top: 1rem; }

.floor-num {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-shadow: 0 1px 0 rgb(255 255 255 / 0.7);
}

.floor-icon {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--phosphor);
  background: var(--screen);
  border: 2px solid var(--screen-edge);
  border-radius: 8px;
  box-shadow: inset 0 2px 6px rgb(0 0 0 / 0.5);
  text-align: center;
  padding: 0.55rem 0.2rem;
  text-shadow: 0 0 6px rgb(147 232 187 / 0.35);
  white-space: nowrap;
}

.floor-body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }

.floor-title { font-weight: 700; font-size: 1rem; }

.floor-desc { font-size: 0.8rem; color: var(--ink-soft); line-height: 1.45; }

.floor-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.floor-progress {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-soft);
  background: var(--chassis-deep);
  border: 1px solid var(--panel-edge);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  white-space: nowrap;
}

.floor-progress.complete { color: #fff; background: var(--pass); border-color: var(--pass); }

/* hatched foundation slab under the ground floor */
.foundation {
  height: 22px;
  background: repeating-linear-gradient(
    45deg,
    var(--chassis-deep) 0 8px,
    var(--panel-edge) 8px 10px
  );
  border-top: 2px solid var(--panel-edge);
}

.hub-footnote {
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 1.4rem;
}

@media (max-width: 640px) {
  .floor { grid-template-columns: 3rem 1fr; grid-auto-rows: auto; }
  .floor-num { grid-column: 1 / -1; }
  .floor-cta { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
}
