/* marcus-cyborg — hacker terminal aesthetic */
/* Green phosphor on black. VT100. BBS. CCC. */

@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
  /* Terminal Palette */
  --black: #0a0a0a;
  --green: #00ff41;
  --green-bright: #33ff33;
  --green-dim: #00cc33;
  --green-dark: #009922;
  --cyan: #00ffff;
  --amber: #ffb000;
  --red: #ff3333;
  --white: #cccccc;

  /* Semantic */
  --bg: var(--black);
  --text: var(--green);
  --text-bright: var(--green-bright);
  --text-dim: var(--green-dark);
  --link: var(--cyan);
  --accent: var(--amber);
  --border: var(--green-dim);

  /* Typography */
  --font: 'VT323', monospace;

  /* Layout */
  --max-width: 800px;
  --content-spacing: 1.4em;
  --glow: 0 0 5px rgba(0, 255, 65, 0.4);
}

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

/* Scanline overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
}

body {
  font-family: var(--font);
  font-size: 20px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  text-shadow: var(--glow);
  min-height: 100vh;
}

/* Selection */
::selection {
  background: var(--green);
  color: var(--black);
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ASCII art logo */
.ascii-logo {
  white-space: pre;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.1;
  color: var(--green-bright);
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
  margin-bottom: 0.5rem;
  overflow-x: auto;
}

.ascii-logo a {
  color: inherit;
  text-decoration: none;
}

.ascii-logo a:hover {
  color: var(--cyan);
  text-decoration: none;
}

/* Terminal nav */
.terminal-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

.nav-link {
  font-family: var(--font);
  font-size: 20px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-link:hover,
.nav-link.current {
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

.nav-link .nav-key {
  color: var(--amber);
}

.nav-link:hover .nav-key,
.nav-link.current .nav-key {
  color: var(--amber);
}

/* Main Content */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.3;
  color: var(--green-bright);
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.5);
}

h1 {
  font-size: 28px;
  margin-bottom: 1rem;
}

h2 {
  font-size: 24px;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 22px;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

h4 {
  font-size: 20px;
}

p {
  margin-bottom: var(--content-spacing);
}

a {
  color: var(--link);
  text-decoration: none;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

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

strong {
  font-weight: 400;
  color: var(--green-bright);
  text-shadow: 0 0 6px rgba(0, 255, 65, 0.5);
}

em {
  color: var(--amber);
  font-style: normal;
}

/* Meta / Byline */
.meta {
  color: var(--text-dim);
  font-size: 18px;
  margin-bottom: 1.5rem;
}

.byline {
  font-size: 20px;
  color: var(--amber);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* Blockquote — terminal style */
blockquote {
  border-left: 2px solid var(--amber);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--amber);
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* Lists */
ul, ol {
  margin-left: 1.5rem;
  margin-bottom: var(--content-spacing);
}

li {
  margin-bottom: 0.5rem;
}

li::marker {
  color: var(--green-dim);
}

/* Code */
code {
  font-family: var(--font);
  color: var(--cyan);
  background: rgba(0, 255, 65, 0.05);
  padding: 0.1em 0.3em;
}

pre {
  background: rgba(0, 255, 65, 0.05);
  border: 1px solid var(--border);
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: var(--content-spacing);
}

pre code {
  background: none;
  padding: 0;
}

/* Terminal box — used for sections */
.terminal-box {
  border: 1px solid var(--border);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  position: relative;
}

.terminal-box-title {
  position: absolute;
  top: -0.7em;
  left: 1rem;
  background: var(--bg);
  padding: 0 0.5rem;
  color: var(--green-bright);
  font-size: 18px;
}

/* Section dividers — box drawing style */
.section-divider {
  border: none;
  color: var(--green-dim);
  text-align: center;
  margin: 2rem 0;
  font-size: 20px;
  overflow: hidden;
}

.section-divider::before {
  content: '════════════════════════════════════════════════════════';
  display: block;
  color: var(--green-dim);
  text-shadow: none;
}

/* Section title — terminal prompt style */
.section-title {
  margin: 2rem 0 1rem;
}

.section-title h2 {
  font-size: 22px;
  color: var(--green-bright);
  margin: 0;
}

.section-title h2::before {
  content: '> ';
  color: var(--amber);
}

/* Blinking cursor */
.cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
  color: var(--green-bright);
}

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

/* Hero / Welcome — terminal style */
.hero {
  padding: 1.5rem 0;
}

.hero-title {
  font-size: 26px;
  color: var(--green-bright);
  margin-bottom: 0.5rem;
}

.hero-title::before {
  content: '▶ ';
  color: var(--amber);
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.hero-description {
  color: var(--text-dim);
  font-size: 20px;
}

/* ASCII banner — preformatted */
.ascii-banner {
  white-space: pre;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.15;
  color: var(--green-bright);
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
  margin: 1rem 0;
  overflow-x: auto;
}

/* ASCII movie — animated frame sequence */
.ascii-movie {
  position: relative;
  height: 310px;
  margin: 1rem 0;
  overflow: hidden;
}

.ascii-movie .frame {
  position: absolute;
  top: 0;
  left: 0;
  white-space: pre;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.2;
  color: var(--green-bright);
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
  opacity: 0;
}

.ascii-movie .frame .label {
  color: var(--amber);
  text-shadow: 0 0 6px rgba(255, 176, 0, 0.4);
}

.ascii-movie .frame .bar-fill {
  color: var(--green-bright);
}

.ascii-movie .frame .bar-empty {
  color: var(--green-dark);
  text-shadow: none;
}

.ascii-movie .frame-1 { animation: movie-1 25s linear infinite; }
.ascii-movie .frame-2 { animation: movie-2 25s linear infinite; }
.ascii-movie .frame-3 { animation: movie-3 25s linear infinite; }
.ascii-movie .frame-4 { animation: movie-4 25s linear infinite; }
.ascii-movie .frame-5 { animation: movie-5 25s linear infinite; }

@keyframes movie-1 {
  0%, 18%   { opacity: 1; }
  20%, 100% { opacity: 0; }
}
@keyframes movie-2 {
  0%, 18%   { opacity: 0; }
  20%, 38%  { opacity: 1; }
  40%, 100% { opacity: 0; }
}
@keyframes movie-3 {
  0%, 38%   { opacity: 0; }
  40%, 58%  { opacity: 1; }
  60%, 100% { opacity: 0; }
}
@keyframes movie-4 {
  0%, 58%   { opacity: 0; }
  60%, 78%  { opacity: 1; }
  80%, 100% { opacity: 0; }
}
@keyframes movie-5 {
  0%, 78%   { opacity: 0; }
  80%, 98%  { opacity: 1; }
  100%      { opacity: 0; }
}

/* Terminal intro text */
.terminal-intro {
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid var(--border);
}

.terminal-intro .prompt {
  color: var(--amber);
}

.terminal-intro .output {
  color: var(--text);
}

.terminal-intro .sys {
  color: var(--text-dim);
}

/* Info boxes — terminal menu style */
.info-box-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 1.5rem 0;
}

.info-box {
  padding: 0.3rem 0;
}

.info-box a {
  color: var(--cyan);
  text-decoration: none;
  display: block;
}

.info-box a:hover {
  color: var(--green-bright);
}

.info-box-title {
  font-size: 20px;
  font-weight: 400;
  margin: 0;
  color: inherit;
}

/* BBS file listing — for writing page */
.bbs-listing {
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  padding: 1rem;
}

.bbs-listing-header {
  color: var(--amber);
  font-size: 18px;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.bbs-entry {
  display: block;
  padding: 0.4rem 0;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 255, 65, 0.1);
  transition: background 0.1s;
}

.bbs-entry:last-child {
  border-bottom: none;
}

.bbs-entry:hover {
  background: rgba(0, 255, 65, 0.05);
  color: var(--cyan);
  text-decoration: none;
}

.bbs-entry .entry-id {
  color: var(--amber);
}

.bbs-entry .entry-title {
  color: inherit;
}

.bbs-entry .entry-dots {
  color: var(--text-dim);
}

.bbs-entry .entry-date {
  color: var(--text-dim);
}

.bbs-entry .entry-status {
  color: var(--text-dim);
  font-size: 18px;
}

/* Tags — bracket style */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tag {
  display: inline-block;
  color: var(--cyan);
  font-size: 18px;
  text-decoration: none;
  transition: color 0.15s;
}

.tag::before {
  content: '[';
  color: var(--green-dim);
}

.tag::after {
  content: ']';
  color: var(--green-dim);
}

.tag:hover {
  color: var(--green-bright);
  text-decoration: none;
}

/* Footer — terminal prompt style */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-tagline {
  color: var(--text-dim);
  font-size: 18px;
  margin-bottom: 0.25rem;
}

.footer-meta {
  color: var(--text-dim);
  font-size: 16px;
}

.footer-meta::before {
  content: '▶ ';
  color: var(--amber);
}

/* Entry content — standard prose */
.entry-content {
  margin: 1rem 0;
}

/* Responsive */
@media (max-width: 767px) {
  body {
    font-size: 18px;
  }

  .ascii-logo {
    font-size: 9px;
  }

  .ascii-banner {
    font-size: 10px;
  }

  .ascii-movie {
    height: 240px;
  }

  .ascii-movie .frame {
    font-size: 12px;
  }

  main {
    padding: 1.5rem 1rem;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 22px;
  }

  .terminal-nav {
    gap: 1rem;
  }

  .nav-link {
    font-size: 18px;
  }

  .header-inner {
    padding: 0 1rem;
  }

  .section-divider::before {
    content: '══════════════════════════════';
  }
}

@media (max-width: 480px) {
  .ascii-logo {
    font-size: 7px;
  }

  .ascii-banner {
    font-size: 8px;
  }

  .ascii-movie {
    height: 200px;
  }

  .ascii-movie .frame {
    font-size: 10px;
  }

  body {
    font-size: 17px;
  }

  .terminal-nav {
    gap: 0.75rem;
  }
}
