/* Terminal — design-system tokens and component classes for Maria Fonseca's
   software engineering / data science portfolio. Plain CSS on plain HTML:
   no JS framework, no build step. See readme.md for rationale. */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg: #0A1712;
  --bg-panel: #0E1E17;
  --rule: #1F3A2A;
  --grey: #93A08F;
  --grey-dim: #5B6A5D;
  --green: #7FDB6B;
  --green-dim: #4C8A46;
  --text: #C9D6C6;

  --font-mono: 'JetBrains Mono', 'SFMono-Regular', 'Consolas', monospace;

  --pad: clamp(18px, 4vw, 40px);
  --container-max: 760px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-mono); font-size: .95rem; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-mono); font-weight: 700; margin: 0; font-size: 1em; }
p { margin: 0; }
a { color: var(--green); text-decoration: none; border-bottom: 1px solid transparent; }
a:hover { border-color: var(--green); }
::selection { background: var(--green-dim); color: var(--bg); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
button { font-family: var(--font-mono); }
img, svg { display: block; max-width: 100%; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: .05;
  background: repeating-linear-gradient(0deg, #000 0px, #000 1px, transparent 1px, transparent 3px);
}

/* — top bar — */
.term-topbar {
  position: sticky; top: 0; z-index: 50; background: var(--bg-panel); border-bottom: 1px solid var(--rule);
  padding: 10px var(--pad); display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.term-dots { display: flex; gap: 6px; flex: none; }
.term-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--rule); border: 1px solid var(--grey-dim); }
.term-title { color: var(--grey-dim); font-size: .75rem; flex: none; }
.term-jump { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.term-jump button {
  background: transparent; border: 1px solid var(--rule); color: var(--grey); border-radius: 2px;
  padding: 5px 12px; font-size: .75rem; cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.term-jump button:hover { border-color: var(--green); color: var(--green); }
.term-jump button::before { content: "$ "; color: var(--grey-dim); }

/* — layout — */
main { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--pad) 80px; position: relative; z-index: 2; }
section { padding-top: 56px; }

.prompt { color: var(--green); }
.line { white-space: pre-wrap; word-break: break-word; margin-bottom: 2px; }
.cmd-text { color: var(--text); font-weight: 600; }
.line-out { color: var(--text); margin-bottom: 0; padding: 2px 0; font-size: .92em; }
.comment-label { display: block; color: var(--grey-dim); font-size: .8em; letter-spacing: .03em; }
.out-block { margin: 6px 0 22px; color: var(--grey); font-size: .92em; }
.out-block p { margin-bottom: 16px; max-width: 66ch; color: var(--text); }
.out-block p:last-child { margin-bottom: 0; }

/* — boot / hero — */
.hero { padding-top: 48px; }
#boot h1 { display: inline; color: var(--green); font-size: 1em; }
.hint { color: var(--grey-dim); font-size: .8rem; margin-top: 18px; }
.caret {
  display: inline-block; width: .55em; height: 1.1em; background: var(--green); vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.prompt-live { display: flex; align-items: center; margin-top: 8px; }
.cmd-input {
  background: transparent; border: none; color: var(--text); font-family: var(--font-mono); font-size: .95rem;
  flex: 1; min-width: 120px; caret-color: var(--green);
}
.cmd-input:focus { outline: none; }
.cmd-feedback { color: var(--grey-dim); font-size: .85rem; min-height: 1.4em; margin-top: 6px; }

/* — directory listing (projects, currently-exploring) — */
.dir-list { margin: 6px 0 22px; color: var(--grey); font-size: .92em; }
.dir-row { display: flex; gap: 16px; }
.dir-row .name { color: var(--green); min-width: 230px; }
.dir-row .status { color: var(--grey-dim); }

/* — readme / card-style output (projects, experience) — */
.readme { margin: 14px 0 26px; padding-left: 14px; border-left: 2px solid var(--rule); font-size: .92em; }
.readme h3 { font-size: 1.05em; color: var(--green); font-weight: 700; margin-bottom: 12px; }
.readme .badge { color: var(--green); font-size: .75em; border: 1px solid var(--green-dim); border-radius: 2px; padding: 1px 7px; margin-left: 8px; vertical-align: middle; }
.kv { margin: 14px 0; color: var(--grey); }
.kv b { color: var(--text); }
.pipeline-line { color: var(--grey); }
.pipeline-line b { color: var(--green); }

.exp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.exp-dates { color: var(--grey-dim); font-size: .85em; white-space: nowrap; }
.exp-list { list-style: none; margin: 0 0 16px; padding: 0; color: var(--text); }
.exp-list li { position: relative; padding-left: 1.4em; margin-bottom: 8px; max-width: 66ch; }
.exp-list li:last-child { margin-bottom: 0; }
.exp-list li::before { content: "›"; position: absolute; left: 0; color: var(--green-dim); }

/* — journey — */
.journey-list { margin: 6px 0 0; color: var(--grey); }
.journey-list .row { display: flex; gap: 10px; }
.journey-list .idx { color: var(--grey-dim); width: 2.4em; }
.journey-list .current { color: var(--green); }
.journey-list .arrow { color: var(--grey-dim); margin-left: 6px; }

/* — skills json — */
.json { margin: 6px 0 0; color: var(--grey); }
.json .key { color: var(--green); }
.json .str { color: var(--text); }
.json .punct { color: var(--grey-dim); }
.json .indent { padding-left: 2em; }

footer { max-width: var(--container-max); margin: 60px auto 0; padding: 24px var(--pad) 60px; border-top: 1px solid var(--rule); position: relative; z-index: 2; }
.foot-meta { color: var(--grey-dim); font-size: .85em; margin-top: 14px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media (max-width: 600px) {
  .term-topbar { gap: 10px; }
  .term-title { display: none; }
  .dir-row .name { min-width: 170px; }
  .exp-dates { font-size: .8em; }
}

/* — view toggle (switches to the normal view) — */
.view-toggle {
  background: transparent; border: 1px solid var(--rule); color: var(--grey); border-radius: 2px;
  padding: 5px 12px; font-size: .75rem; cursor: pointer; flex: none; white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}
.view-toggle:hover { border-color: var(--green); color: var(--green); }
