/* ==============================================
   cogitator.css — the paint job. green phosphor vibes.
   ============================================== */

:root {
  --bg: #080808;
  --bg-alt: #0e0e0c;
  --fg: #8a9e7e;
  --fg-dim: #4a5a42;
  --fg-bright: #b8c8a8;
  --prompt: #b8963c;
  --accent: #b8963c;
  --accent2: #a04040;
  --warn: #c89040;
  --error: #b84040;
  --cyan: #6a8e7e;
  --border: #2a2a1e;
  --border-bright: #4a4a2e;
  --font: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'IBM Plex Mono',
    'Source Code Pro', 'Courier New', monospace;
  --line-height: 1.55;
  --max-width: 800px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 14px;
  background: #040404;
  color: var(--fg);
}

body {
  font-family: var(--font);
  line-height: var(--line-height);
  background: #040404;
  min-height: 100vh;
  padding: 2rem 1rem;
  overflow-x: hidden;
}

/* ── Terminal window frame, the main box everything sits in ── */
.terminal {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  box-shadow:
    0 0 30px rgba(120, 100, 40, 0.06),
    inset 0 0 60px rgba(0, 0, 0, 0.4);
}

.terminal-header {
  background: #0a0a08;
  border-bottom: 2px solid var(--border);
  padding: 0.4rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
}

.terminal-dot {
  width: 8px;
  height: 8px;
  border-radius: 0;
}

.terminal-dot.red    { background: #8b3a3a; }
.terminal-dot.yellow { background: #8b7a3a; }
.terminal-dot.green  { background: #5a7a4a; }

.terminal-title {
  margin-left: 0.5rem;
  color: var(--fg-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.terminal-body {
  padding: 1.5rem;
  min-height: 400px;
}

/* ── Text styles, headings links etc ── */
h1, h2, h3, h4 {
  color: var(--fg-bright);
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 1.4rem; margin-bottom: 1rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 0.75rem; }
h3 { font-size: 1rem; margin: 1rem 0 0.5rem; }

p {
  margin-bottom: 0.75rem;
}

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

a:hover {
  text-decoration: underline;
  color: var(--fg-bright);
}

a:visited {
  color: var(--accent);
}

/* ── Prompt line (the > symbol and the command text) ── */
.prompt-line {
  display: flex;
  align-items: baseline;
  gap: 0;
  margin-bottom: 0.5rem;
}

.prompt-path {
  color: var(--accent);
}

.prompt-symbol {
  color: var(--prompt);
  margin-right: 0.6rem;
}

.prompt-cmd {
  color: var(--fg-bright);
}

/* ── Output blocks that apear after you run a command ── */
.output-block {
  margin: 0.5rem 0 1.5rem 0;
  padding-left: 0;
}

.output-block p {
  margin-bottom: 0.25rem;
}

/* ── File listings (ls output) ── */
.file-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1.5rem 0;
}

.file-list li {
  padding: 0.15rem 0;
}

.file-list .dir {
  color: var(--accent);
}

.file-list .file {
  color: var(--fg);
}

.file-list .size {
  color: var(--fg-dim);
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

.file-list .date {
  color: var(--fg-dim);
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

/* ── Blog post list on the /blog page ── */
.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}

.post-list li:last-child {
  border-bottom: none;
}

.post-date {
  color: var(--fg-dim);
  font-size: 0.85rem;
}

/* ── Project/game cards ── */
.project-card {
  border: 1px solid var(--border);
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 0;
}

.project-card h3 {
  margin-top: 0;
}

.project-card .tags {
  margin-top: 0.5rem;
}

.tag {
  display: inline-block;
  background: var(--bg-alt);
  color: var(--accent);
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0;
  font-size: 0.8rem;
  margin-right: 0.3rem;
}

/* ── The help comand table ── */
.cmd-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1.5rem 0;
}

.cmd-table td {
  padding: 0.3rem 0;
  vertical-align: top;
}

.cmd-table td:first-child {
  color: var(--prompt);
  white-space: nowrap;
  padding-right: 1.5rem;
  font-weight: 600;
}

.cmd-table td:last-child {
  color: var(--fg-dim);
}

/* ── Ascii art banner (the big puggly thing) ── */
.ascii-art {
  color: var(--accent);
  font-size: 0.55rem;
  line-height: 1.1;
  margin-bottom: 1rem;
  overflow-x: hidden;
  white-space: pre;
}

/* ── Blinking block cursor at the end of the input ── */
.cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--fg);
  animation: blink 1s step-end infinite;
  align-self: center;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes terminalGlitch {
  0%   { opacity: 1; filter: brightness(1); }
  30%  { opacity: 0.2; filter: brightness(3); }
  60%  { opacity: 0.8; filter: brightness(0.6); }
  100% { opacity: 1; filter: brightness(1); }
}

.terminal.glitch {
  animation: terminalGlitch 0.35s ease-out;
}

/* ── Cli input line with the prompt symbol ── */
.input-line {
  display: flex;
  align-items: baseline;
  gap: 0;
  margin-top: 1rem;
}

.input-line input {
  background: transparent;
  border: none;
  color: var(--fg-bright);
  font-family: var(--font);
  font-size: 1rem;
  outline: none;
  flex: 0 0 auto;
  min-width: 0;
  padding: 0;
  caret-color: transparent;
}

/* ── Utility classes for text colors ── */
.text-dim    { color: var(--fg-dim); }
.text-accent { color: var(--accent); }
.text-green  { color: var(--prompt); }
.text-cyan   { color: var(--cyan); }
.text-warn   { color: var(--warn); }
.text-error  { color: var(--error); }
.text-pink   { color: var(--accent2); }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  color: var(--fg-dim);
  margin: 1rem 0;
}

code {
  background: var(--bg-alt);
  padding: 0.1rem 0.4rem;
  border-radius: 0;
  font-family: var(--font);
  color: var(--accent);
}

pre {
  background: var(--bg-alt);
  padding: 1rem;
  border-radius: 0;
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--border);
}

/* ── Nav bar across the top of each page ── */
.nav-bar {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

.nav-bar a {
  color: var(--fg-dim);
  font-size: 0.85rem;
}

.nav-bar a:hover,
.nav-bar a.active {
  color: var(--prompt);
  text-decoration: none;
}

/* ── Phones and tiny screens ── */
@media (max-width: 600px) {
  html { font-size: 12px; }
  body { padding: 0.5rem; }
  .terminal-body { padding: 1rem; }
  .ascii-art { font-size: 0.4rem; }
}
