/* ==========================================================================
   root.css — Root Hub (ecosystem gateway)
   Same design language as Portfolio/Lab/LS Technology: dark base, blue
   accent, IBM Plex Sans/Mono, calm and intentional — no new palette.
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #060709;
  --surface: #0b0d10;
  --card: #0f1217;
  --surface-elevated: #151a21;
  --border: #1f252d;
  --border-strong: #2e3742;
  --text: #eef2f6;
  --text-secondary: #a3adba;
  --text-muted: #7c8796;
  --accent: #3db8f5;
  --accent-bright: #7ad3ff;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--font-sans);
  overflow-x: hidden;
}

main { flex: 1; display: flex; flex-direction: column; justify-content: center; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--accent-bright); }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }

.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--bg); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

.wrap { width: min(100% - 2.5rem, 68rem); margin-inline: auto; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }

/* ---- Hero ---- */
.hero { padding-block: clamp(3.5rem, 3rem + 6vw, 7rem) clamp(2.5rem, 2rem + 3vw, 4rem); text-align: center; }
.hero .owner { color: var(--accent); font-size: 0.8125rem; letter-spacing: 0.08em; margin: 0 0 1rem; }
.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.25rem, 1.5rem + 4vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.hero .tagline {
  margin: 0 0 1.25rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 0.8rem + 0.5vw, 1.05rem);
  letter-spacing: 0.04em;
}
.hero .statement { margin: 0 auto; max-width: 40ch; color: var(--text); font-size: 1.1rem; }

/* ---- Node grid ---- */
.nodes { padding-block: 1rem clamp(3rem, 2rem + 4vw, 5rem); }
.node-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr));
}

.node-card {
  position: relative;
  min-width: 0;
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), transform 160ms var(--ease);
}

.node-card:not(.node-card--off):hover,
.node-card:not(.node-card--off):focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 28px rgba(61, 184, 245, 0.16);
  transform: translateY(-2px);
}

.node-card--off { opacity: 0.6; }

.node-card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--accent);
}
.node-card__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.node-card__name { margin: 0 0 0.4rem; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.node-card__link { color: var(--text); display: inline-flex; align-items: center; gap: 0.4rem; }
.node-card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.node-card__link:hover { color: var(--accent-bright); }
.node-card__ext { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0.7; }

.node-card__role { margin: 0 0 0.75rem; color: var(--accent); font-size: 0.75rem; letter-spacing: 0.03em; }
.node-card__desc { margin: 0; color: var(--text-secondary); font-size: 0.95rem; }
.node-card__note { margin: 0.75rem 0 0; color: var(--text-muted); font-family: var(--font-mono); font-size: 0.75rem; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: 0.85rem; }
.footer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-block: 1.25rem; }
.footer-bar p { margin: 0; }
.footer-bar a { color: var(--text-muted); }
.footer-bar a:hover { color: var(--accent-bright); }

/* ---- 404 ---- */
.notfound { text-align: center; padding-block: clamp(4rem, 3rem + 6vw, 8rem); }
.notfound .lead { color: var(--text-secondary); max-width: 40ch; margin-inline: auto; }
.actions { margin-top: 1.5rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0.6rem 1.3rem; border: 1px solid var(--accent); border-radius: 6px; color: var(--accent); font-weight: 500; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn.primary:hover { background: var(--accent-bright); border-color: var(--accent-bright); color: var(--bg); }

@media (max-width: 640px) {
  .node-card { padding: 1.5rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
