@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Plus Jakarta Sans", sans-serif;
  --bg: #050505;
  --panel: #0d0d0d;
  --panel-card: #111111;
  --text: #f5f5f5;
  --text-soft: #b7b7b7;
  --line: #222222;
  --line-strong: #343434;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
}

/* Base Layout framing */
.wiki-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar h3 {
  margin-top: 0;
  margin-bottom: 1.8rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar nav a {
  color: #9c9c9c;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  color: #ffffff;
  background: var(--line);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.sidebar-footer a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.sidebar-footer a:hover {
  color: #ffffff;
}

.content {
  flex: 1;
  padding: 4.5rem 6rem;
  max-width: 1050px;
}

.content h1 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.content h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  margin-top: 3.5rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.6rem;
}

.content p {
  color: var(--text-soft);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

ul, ol {
  color: var(--text-soft);
  padding-left: 1.5rem;
  margin-bottom: 2rem;
}

li {
  margin-bottom: 0.7rem;
  font-size: 1.02rem;
}

li strong {
  color: #ffffff;
}

code {
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #141416;
  color: #ffffff;
  font-family: monospace;
  font-size: 0.92rem;
}

pre {
  background: #141416;
  border: 1px solid var(--line);
  padding: 1.2rem;
  border-radius: 10px;
  overflow-x: auto;
}

pre code {
  padding: 0;
  border: none;
  background: transparent;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: linear-gradient(180deg, #111111, #0b0b0b);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  padding: 1.1rem 1.3rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  background: #161616;
  font-family: var(--font-display);
  color: #ffffff;
  font-weight: 600;
}

/* FAQ elements layout */
.faq-block {
  margin-bottom: 2.5rem;
}

.faq-block h3 {
  font-size: 1.2rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

/* Wiki Portal Homepage Layout */
.hub-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.hub-header {
  margin-bottom: 4rem;
}

.hub-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 1rem 0;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

.portal-card {
  background: var(--panel-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}

.portal-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.portal-card h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin: 0 0 1rem 0;
  font-weight: 700;
}

.portal-card p {
  color: var(--text-soft);
  margin: 0 0 2rem 0;
  font-size: 1.05rem;
  flex-grow: 1;
}

.portal-card .card-link {
  font-family: var(--font-display);
  font-weight: 700;
  color: #ffffff;
  font-size: 0.95rem;
}

.hub-footer {
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.hub-footer a {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.hub-footer a:hover {
  color: #ffffff;
}

.wiki-banner {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  margin-bottom: 2.5rem;
  image-rendering: pixelated; /* Keeps the pixel art sharp when scaling */
}

@media (max-width: 920px) {
  .wiki-layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; padding: 1.5rem 1rem; border-right: none; border-bottom: 1px solid var(--line); }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .hub-grid { grid-template-columns: 1fr; }
  .content { padding: 3rem 1.5rem; }
}