/* =========================================================================
   sharanraj_t — portfolio
   linux-terminal theme · JetBrains Mono · zero dependencies
   ========================================================================= */

/* ---- terminal palettes ---- */
:root,
[data-theme="dark"] {
  --outer:  #010409;   /* page behind the window            */
  --bg:     #0d1117;   /* terminal background               */
  --bar:    #161b22;   /* titlebar                          */
  --border: #30363d;
  --text:   #c9d1d9;
  --dim:    #8b949e;
  --green:  #3fb950;   /* prompt user@host, success         */
  --blue:   #58a6ff;   /* paths, dirs                       */
  --yellow: #d29922;   /* headings, highlights              */
  --purple: #bc8cff;
  --cyan:   #39c5cf;
  --red:    #f85149;
  --link:   #58a6ff;
}
[data-theme="ubuntu"] {
  --outer:  #1d0714;
  --bg:     #300a24;
  --bar:    #3e0f2f;
  --border: #5e2750;
  --text:   #eeeeec;
  --dim:    #ad7fa8;
  --green:  #8ae234;
  --blue:   #729fcf;
  --yellow: #fce94f;
  --purple: #ad7fa8;
  --cyan:   #34e2e2;
  --red:    #ef2929;
  --link:   #34e2e2;
}
[data-theme="dracula"] {
  --outer:  #191a21;
  --bg:     #282a36;
  --bar:    #21222c;
  --border: #44475a;
  --text:   #f8f8f2;
  --dim:    #6272a4;
  --green:  #50fa7b;
  --blue:   #bd93f9;
  --yellow: #f1fa8c;
  --purple: #ff79c6;
  --cyan:   #8be9fd;
  --red:    #ff5555;
  --link:   #8be9fd;
}
[data-theme="gruvbox"] {
  --outer:  #1d2021;
  --bg:     #282828;
  --bar:    #32302f;
  --border: #504945;
  --text:   #ebdbb2;
  --dim:    #928374;
  --green:  #b8bb26;
  --blue:   #83a598;
  --yellow: #fabd2f;
  --purple: #d3869b;
  --cyan:   #8ec07c;
  --red:    #fb4934;
  --link:   #8ec07c;
}
[data-theme="matrix"] {
  --outer:  #000000;
  --bg:     #010801;
  --bar:    #041504;
  --border: #0a3d0a;
  --text:   #15ff00;
  --dim:    #0a8a00;
  --green:  #15ff00;
  --blue:   #66ff99;
  --yellow: #aaff00;
  --purple: #66ff99;
  --cyan:   #66ffcc;
  --red:    #ff3333;
  --link:   #66ff99;
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }


body {
  --font: 'JetBrains Mono', 'Cascadia Mono NF', 'Cascadia Mono',
          ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.65;
  background: var(--outer);
  color: var(--text);
  padding: 26px 14px 12px;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

::selection { background: var(--yellow); color: var(--bg); }

a { color: var(--link); text-decoration: none; border-bottom: 1px dotted var(--link); }
a:hover { border-bottom-style: solid; }
b, strong { font-weight: 700; color: var(--yellow); }
code { color: var(--cyan); }

/* ---- window ---- */
.window {
  max-width: 940px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
  overflow: hidden;
  position: relative;
  transition: background .25s ease, border-color .25s ease;
}

/* faint CRT scanlines */
.window::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.028) 0 1px, transparent 1px 3px);
}
[data-theme="matrix"] .term-wrap { text-shadow: 0 0 6px rgba(21, 255, 0, .45); }

/* ---- titlebar ---- */
.titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  background: var(--bar);
  border-bottom: 1px solid var(--border);
  user-select: none;
}
.tb-dots { display: flex; gap: 7px; }
.tb-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--border); }
.tb-dots i:nth-child(1) { background: #ff5f56; }
.tb-dots i:nth-child(2) { background: #ffbd2e; }
.tb-dots i:nth-child(3) { background: #27c93f; }
.tb-title { flex: 1; text-align: center; color: var(--dim); font-size: 12.5px; }
.tb-hint  { color: var(--dim); font-size: 11px; opacity: .8; }

/* ---- terminal body ---- */
.term-wrap {
  padding: 16px 18px 20px;
  min-height: 72vh;
  overflow-wrap: break-word;
  cursor: text;
}
.line { white-space: pre-wrap; min-height: 1.65em; }

/* prompt pieces */
.pu { color: var(--green); font-weight: 700; }
.pp { color: var(--blue);  font-weight: 700; }
.pd { color: var(--dim); }
.cmd { color: var(--text); font-weight: 500; }

/* output flavours */
.dim    { color: var(--dim); }
.acc    { color: var(--yellow); }
.grn    { color: var(--green); }
.blu    { color: var(--blue); }
.cy     { color: var(--cyan); }
.pur    { color: var(--purple); }
.err    { color: var(--red); }
.hline  { color: var(--yellow); font-weight: 700; }
.dir    { color: var(--blue); font-weight: 700; }
.exec   { color: var(--green); }

/* block cursor */
.cursor {
  display: inline-block;
  width: .58em;
  height: 1.15em;
  background: var(--text);
  vertical-align: text-bottom;
  animation: blink 1.06s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* interactive line */
.iline { margin-top: 2px; }
.iph { color: var(--dim); opacity: .55; margin-left: .4em; font-style: italic; }

.ghost-input {
  position: fixed;
  bottom: 0; left: 0;
  width: 2px; height: 2px;
  opacity: 0;
  border: none;
  background: transparent;
  color: transparent;
}

/* ---- figlet banner + neofetch ---- */
pre.banner {
  color: var(--green);
  line-height: 1.22;
  font-size: 14.5px;
  margin: 6px 0 2px;
  overflow-x: auto;
}
.banner-sub { color: var(--dim); margin-bottom: 4px; }

.nf { display: flex; gap: 28px; align-items: flex-start; margin: 6px 0; }
pre.nf-art { color: var(--yellow); line-height: 1.25; flex-shrink: 0; }
.nf-info .line { min-height: 1.5em; }
.nf-k { color: var(--green); font-weight: 700; }
.nf-head { color: var(--green); font-weight: 700; }
.nf-swatches { display: flex; gap: 0; margin-top: 8px; }
.nf-swatches i { width: 22px; height: 13px; display: inline-block; }

/* ---- content niceties ---- */
.indent  { padding-left: 2ch; }
.indent2 { padding-left: 4ch; }
.gap     { height: .8em; }

/* ---- footer ---- */
.foot {
  max-width: 940px;
  margin: 10px auto 0;
  text-align: center;
  color: var(--dim);
  font-size: 11.5px;
  opacity: .75;
}

/* ---- noscript ---- */
.noscript {
  max-width: 700px;
  margin: 40px auto;
  padding: 0 18px;
  line-height: 1.8;
}
.noscript h1 { font-size: 1.3em; margin-bottom: .6em; }
.noscript p  { margin-bottom: .8em; }

/* ---- responsive ---- */
@media (max-width: 640px) {
  body { padding: 0; }
  .window { border-radius: 0; border-left: none; border-right: none; max-width: none; }
  .term-wrap { padding: 12px 12px 16px; min-height: 82vh; }
  body { font-size: 13px; }
  pre.banner { font-size: 10.5px; }
  .nf { gap: 14px; }
  .tb-hint { display: none; }
}
@media (max-width: 460px) {
  pre.nf-art { display: none; }
}
