/* donato.cl — terminal theme
   ---------------------------------------------------------------- */

:root {
  --bg: #05080a;
  --bg-2: #0a1014;
  --panel: #0a0f12;
  --panel-2: #0d1418;
  --line: #16341f;
  --fg: #c6d3c9;
  --fg-dim: #6f8b78;
  --fg-faint: #3f5747;
  --green: #46e08a;
  --green-2: #7dffb0;
  --cyan: #4fc3f7;
  --cyan-dim: #1793d1;
  --amber: #ffc857;
  --red: #ff6b6b;
  --magenta: #e07bff;
  --shadow: rgba(0, 0, 0, 0.6);
  --glow: rgba(70, 224, 138, 0.35);
  --mono: "JetBrains Mono", "Fira Code", "SFMono-Regular", "SF Mono", Menlo,
    Consolas, "Liberation Mono", monospace;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 700px at 50% -10%, #0c1a14 0%, transparent 70%),
    var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--green); color: #04160b; }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--green-2); text-decoration: underline; text-underline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* layout ---------------------------------------------------------- */

.crt {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(12px, 3vw, 40px) clamp(10px, 3vw, 28px) 24px;
}

.crt::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.015) 0px,
    rgba(255, 255, 255, 0.015) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  z-index: 10;
  opacity: 0.5;
}

body.no-scanlines .crt::after { display: none; }

.window {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px var(--shadow), 0 0 0 1px rgba(70, 224, 138, 0.05),
    0 0 40px -20px var(--glow);
  overflow: hidden;
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: linear-gradient(180deg, #101a18, #0c1412);
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--fg-dim);
  user-select: none;
}

.dots { display: inline-flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dots .d1 { background: #ff5f56; }
.dots .d2 { background: #ffbd2e; }
.dots .d3 { background: #27c93f; }

.win-title { flex: 1; text-align: center; color: var(--fg-dim); }
.win-badge {
  color: var(--cyan-dim);
  border: 1px solid #123244;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
}

.screen {
  padding: 18px 18px 22px;
  min-height: 60vh;
  max-height: none;
  overflow-x: auto;
  scrollbar-color: var(--line) transparent;
}

.screen::-webkit-scrollbar { width: 10px; height: 10px; }
.screen::-webkit-scrollbar-thumb { background: #17301f; border-radius: 6px; }

/* terminal lines -------------------------------------------------- */

.line { white-space: pre-wrap; word-break: break-word; }
.line.cmd { margin-top: 4px; }
.line + .line.cmd { margin-top: 14px; }
.cmdtext { color: var(--fg); }

.out { color: var(--fg); }
.dim, .line.dim { color: var(--fg-dim); }
.err { color: var(--red); }

.prompt { user-select: none; }
.puser { color: var(--green); font-weight: 600; }
.psep { color: var(--fg-faint); }
.ppath { color: var(--cyan); }
.psym { color: var(--amber); margin-left: 6px; }

.banner {
  color: var(--green-2);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 0 14px var(--glow);
}

.key {
  color: var(--bg);
  background: var(--green);
  border-radius: 4px;
  padding: 0 5px;
  font-size: 0.86em;
}

/* neofetch -------------------------------------------------------- */

.neofetch { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.nf-logo {
  margin: 0;
  color: var(--cyan);
  font-size: 10px;
  line-height: 1.05;
  text-shadow: 0 0 10px rgba(79, 195, 247, 0.25);
}
.nf-info { font-size: 13.5px; line-height: 1.5; }
.nf-user { color: var(--green); font-weight: 700; }
.nf-sep { color: var(--fg-faint); }
.nf-key { color: var(--cyan); }
.nf-colon { color: var(--fg-faint); }

/* lists ----------------------------------------------------------- */

ul, ol { margin: 6px 0; padding-left: 0; list-style: none; }

.posts .post-item { display: block; padding: 1px 0; }
.posts .date { color: var(--fg-faint); margin-right: 8px; }
.posts .post-link { color: var(--green-2); }
.posts .post-link:hover { color: #fff; text-shadow: 0 0 10px var(--glow); }
.tags { margin-left: 6px; }
.tag { color: var(--magenta); font-size: 0.85em; opacity: 0.85; }

.songs { counter-reset: none; }
.song { padding: 1px 0; }
.song .rank { color: var(--amber); margin-right: 6px; }
.song .song-title a { color: var(--green-2); }
.song .song-meta { color: var(--fg-dim); }

.links li { padding: 1px 0; }
.links a { color: var(--cyan); }

/* interactive prompt --------------------------------------------- */

.term-input-line { display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.term-input {
  flex: 1;
  min-width: 4ch;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--fg);
  font: inherit;
  caret-color: var(--green);
  padding: 0;
}

/* post body ------------------------------------------------------- */

.post-body { margin: 6px 0 10px; max-width: 74ch; }
.post-body h1, .post-body h2, .post-body h3 {
  color: var(--green-2);
  line-height: 1.3;
  margin: 1.4em 0 0.5em;
}
.post-body h1 { font-size: 1.5em; }
.post-body h2 { font-size: 1.28em; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.post-body h3 { font-size: 1.1em; color: var(--cyan); }
.post-body p { margin: 0.7em 0; }
.post-body a { color: var(--cyan); border-bottom: 1px dotted var(--cyan-dim); }
.post-body a:hover { border-bottom-style: solid; text-decoration: none; }
.post-body ul, .post-body ol { list-style: none; padding-left: 1.1em; }
.post-body ul li::before { content: "▸ "; color: var(--green); }
.post-body ol { counter-reset: item; }
.post-body ol li::before { counter-increment: item; content: counter(item) ". "; color: var(--amber); }
.post-body code {
  background: #0d1a12;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 5px;
  color: var(--green-2);
  font-size: 0.9em;
}
.post-body pre {
  background: #060d0a;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  overflow-x: auto;
}
.post-body pre code { background: none; border: 0; padding: 0; color: var(--fg); }
.post-body blockquote {
  margin: 0.9em 0;
  padding: 2px 14px;
  border-left: 3px solid var(--green);
  color: var(--fg-dim);
  background: rgba(70, 224, 138, 0.04);
}
.post-body img { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.post-body hr { border: 0; border-top: 1px dashed var(--line); margin: 1.4em 0; }
.post-body table { border-collapse: collapse; margin: 1em 0; width: 100%; font-size: 0.95em; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.post-body thead th { background: rgba(70, 224, 138, 0.06); color: var(--green-2); }
.post-body tbody tr:nth-child(odd) { background: rgba(255, 255, 255, 0.015); }

/* footer ---------------------------------------------------------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  justify-content: center;
  margin-top: 16px;
  font-size: 12px;
  color: var(--fg-dim);
}
.foot a { color: var(--fg-dim); }
.foot a:hover { color: var(--green); }
.dotsep { color: var(--fg-faint); }

/* responsive ------------------------------------------------------ */

@media (max-width: 620px) {
  body { font-size: 13.5px; }
  .nf-logo { display: none; }
  .screen { padding: 14px 12px 18px; }
  .win-badge { display: none; }
}

.cat-output { margin: 8px 0; }
.cat-output h1, .cat-output h2, .cat-output h3 { margin-top: 1em; }
