:root {
  --bg: #0f1116;
  --text: #e0e0e0;
  --panel: #16171c;
  --border: #2a2a2a;
  --accent: #8ab4f8;
}

body.light {
  --bg: #f4f6f9;
  --text: #111;
  --panel: #ffffff;
  --border: #cccccc;
  --accent: #0055aa;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background 0.5s, color 0.5s;
}

/* BACKGROUND CANVAS */

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -10;
}

/* LAYOUT */

#container {
  max-width: 1900px;
  margin: auto;
  padding: 40px 80px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--border);
  padding-bottom: 15px;
}

header h1 {
  margin: 0;
  font-size: 2.8em;
}

blockquote {
  margin: 6px 0 0 0;
  color: #9a9a9a;
  max-width: 700px;
}

nav.topnav a,
nav.topnav button {
  margin-left: 18px;
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 1em;
}

#layout {
  display: grid;
  grid-template-columns: 3fr 1.2fr;
  gap: 60px;
  margin-top: 50px;
}

/* CONTENT */

.box {
  margin-bottom: 50px;
  animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.box h3 {
  margin-top: 0;
  font-size: 1.5em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 18px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* SHELL */

.shell {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 25px;
  border-radius: 8px;
  font-family: monospace;
  min-height: 260px;
  transition: box-shadow 0.3s, background 0.3s;
}

.shell:focus-within {
  box-shadow: 0 0 0 2px var(--accent);
}

.prompt {
  color: #888;
  margin-right: 6px;
}

.input-line input {
  background: transparent;
  color: var(--text);
  border: none;
  outline: none;
  font-family: monospace;
  font-size: 1em;
  width: 80%;
}

/* SIDEBAR */

.sidebar {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 40px;
}

.sidebar h4 {
  margin-top: 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

/* FOOTER */

footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding-top: 25px;
  text-align: center;
  color: #888;
  font-size: 0.95em;
}
