/* ==========================================================================
   Retro terminal theme — extends my-style.css
   Loaded after Bootstrap + my-style.css so these rules win.
   ========================================================================== */

:root {
  --term-bg: #0000ff;
  --term-fg: #ffffff;
  --term-dim: #cfcfff;
  --term-accent: #ffff00;
  --term-border: #ffffff;
  --term-font: 'Terminess Nerd Font', 'VT323', monospace;
  --term-status: #33ff33;
  --glow-white: 0 0 10px rgba(255, 255, 255, 0.55), 0 0 2px rgba(255, 255, 255, 0.9);
  --glow-accent: 0 0 10px rgba(255, 255, 0, 0.55), 0 0 2px rgba(255, 255, 0, 0.9);
}

@media (prefers-reduced-motion: reduce) {
  .cursor::after,
  .status-dot {
    animation: none;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  font-size: 18px;
}

body,
h1,
h2,
p,
.blockquote-footer,
pre,
code,
.term-prompt,
.term-nav,
.blog-list,
.btn-term {
  font-family: var(--term-font);
}

/* ---- CRT phosphor glow, kept to headings + accents so body copy stays crisp ---- */
h1,
h2 {
  text-shadow: var(--glow-white);
}

.cursor::after {
  text-shadow: var(--glow-white);
}

.term-prompt .prompt-user,
.term-nav a:hover,
.term-nav a.active,
.blog-date {
  text-shadow: var(--glow-accent);
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* subtle CRT texture: fine grain + scanlines + edge vignette, all inline (no requests) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image:
    url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxMjAnIGhlaWdodD0nMTIwJz4KICA8ZmlsdGVyIGlkPSduJz4KICAgIDxmZVR1cmJ1bGVuY2UgdHlwZT0nZnJhY3RhbE5vaXNlJyBiYXNlRnJlcXVlbmN5PScwLjgnIG51bU9jdGF2ZXM9JzMnIHN0aXRjaFRpbGVzPSdzdGl0Y2gnLz4KICAgIDxmZUNvbG9yTWF0cml4IHR5cGU9J21hdHJpeCcgdmFsdWVzPScwIDAgMCAwIDEgIDAgMCAwIDAgMSAgMCAwIDAgMCAxICAwIDAgMCAwLjA1IDAnLz4KICA8L2ZpbHRlcj4KICA8cmVjdCB3aWR0aD0nMTAwJScgaGVpZ2h0PScxMDAlJyBmaWx0ZXI9J3VybCgjbiknLz4KPC9zdmc+Cg=="),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.2) 0px,
      rgba(255, 255, 255, 0.2) 1px,
      transparent 1px,
      transparent 3px
    ),
    radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.5) 100%);
  background-repeat: repeat, repeat, no-repeat;
  background-size: 120px 120px, auto, cover;
  background-position: 0 0, 0 0, center;
}

::selection {
  background: var(--term-accent);
  color: #0000ff;
}

a {
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

/* ---- layout shell ---- */
.term-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

/* ---- blinking cursor ---- */
.cursor::after {
  content: "\2588";
  display: inline-block;
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}

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

/* ---- top prompt bar / nav ---- */
.term-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  border-bottom: 2px solid var(--term-border);
  padding-bottom: 0.75rem;
  margin-bottom: 2rem;
}

.term-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.9em;
  color: var(--term-dim);
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--term-status);
  box-shadow: 0 0 6px 2px rgba(51, 255, 51, 0.7);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.term-prompt {
  font-size: 1.1em;
  color: var(--term-dim);
  margin: 0 0 0.5rem;
}

.term-prompt .prompt-user { color: var(--term-accent); }
.term-prompt .prompt-path { color: #ffffff; }

.term-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 1.15em;
}

.term-nav a {
  text-decoration: none !important;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

.term-nav a::before {
  content: "[ ";
}

.term-nav a::after {
  content: " ]";
}

.term-nav a:hover,
.term-nav a.active {
  color: var(--term-accent) !important;
}

/* ---- terminal "window" card ---- */
.term-window {
  border: 2px solid var(--term-border);
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.term-window-titlebar {
  border-bottom: 2px solid var(--term-border);
  padding: 0.4rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95em;
  color: var(--term-dim);
}

.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--term-border);
  display: inline-block;
}

.term-window-title {
  margin-left: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.term-window-body {
  padding: 1.25rem 1.5rem;
}

.term-window-body--flush {
  padding: 0;
}

.term-hero-image {
  display: block;
  width: 100%;
  height: 300px;
}

/* ---- buttons styled like terminal actions ---- */
.btn-term {
  font-size: 1.2em;
  background: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
  padding: 0.35rem 1rem;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn-term::before { content: "> "; }

.btn-term:hover {
  background: #ffffff;
  color: #0000ff !important;
  text-decoration: none !important;
  box-shadow: var(--glow-white);
}

/* ---- blog listing ---- */
.blog-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-list li {
  border-bottom: 1px dashed var(--term-dim);
  padding: 0.85rem 0;
}

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

.blog-date {
  color: var(--term-accent);
  font-size: 0.95em;
  margin-right: 0.75rem;
}

.blog-list a {
  font-size: 1.3em;
}

.blog-excerpt {
  margin: 0.25rem 0 0;
  color: var(--term-dim);
}

/* ---- footer status bar ---- */
.term-footer {
  border-top: 2px solid var(--term-border);
  margin-top: 3rem;
  padding-top: 1rem;
  font-size: 0.95em;
  color: var(--term-dim);
  text-align: center;
}

/* ---- post meta ---- */
.post-meta {
  color: var(--term-dim);
  font-size: 1.05em;
  text-align: center;
  margin-top: -1rem;
  margin-bottom: 2rem;
}

/* ---- hr as ascii divider ---- */
hr.term-rule {
  border: none;
  border-top: 1px dashed var(--term-dim);
  margin: 2rem 0;
}

/* pre-formatted code blocks: site palette inverted, VT323 font */
pre {
  background: var(--term-fg);
  color: var(--term-bg);
  font-family: 'VT323', monospace;
  border: 2px solid var(--term-bg);
  padding: 1rem;
  overflow-x: auto;
  font-size: 1.1em;
}

code {
  background: #000000;
  color: #33ff33;
  padding: 0.1em 0.3em;
}

pre code {
  background: transparent;
  color: inherit;
  font-family: inherit;
  padding: 0;
  border: none;
}

img {
  max-width: 100%;
  height: auto;
}

.term-dim {
  color: var(--term-dim);
}
