﻿@import url('https://fonts.googleapis.com/css2?family=VT323&family=IBM+Plex+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg: #0C0C0C;            /* CRT terminal ground — not pure black */
  --surface: #131513;
  --surface-2: #191c19;
  --surface-3: #222622;
  --green: #3CFF6E;         /* Clarence phosphor green */
  --green-dim: #4F6B57;     /* REM line color */
  --ink: #D8D8D2;           /* System response gray */
  --ink-faint: #6f766f;
  --cream: #F2EEE6;
  --line: rgba(60, 255, 110, 0.22);
  --line-soft: rgba(216, 216, 210, 0.14);
  --danger: #ff6b5e;
  --shadow: 0 0 0 1px rgba(60, 255, 110, 0.15), 0 16px 36px -16px rgba(0, 0, 0, 0.9);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important; /* Authentic DOS design: 100% square corners everywhere */
}

html, body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Mono', Consolas, 'Liberation Mono', 'DejaVu Sans Mono', monospace;
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
}

body {
  background-image: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.014) 0px,
    rgba(255, 255, 255, 0.014) 1px,
    transparent 1px,
    transparent 3px
  );
}

::selection {
  background: var(--green);
  color: #04140a;
}

/* ---- Scanline Overlay ---- */
.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 20%, rgba(60, 255, 110, 0.05), transparent 75%);
  z-index: 1000;
}

/* ---- Animated Blinking Cursor ---- */
.cursor {
  display: inline-block;
  background: var(--green);
  width: .55em;
  height: .9em;
  vertical-align: -.12em;
  animation: blink 1.1s steps(1) infinite;
}

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

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

/* ---- Typography & Links ---- */
h1, h2, h3, h4 {
  font-family: 'VT323', Consolas, monospace;
  font-weight: 400;
  color: var(--green);
  letter-spacing: .02em;
}

h1 { font-size: clamp(3rem, 9vw, 5.4rem); line-height: 1; }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: .4em; }
h3 { font-size: 1.35rem; margin-bottom: .4em; color: var(--green); }

a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-color: rgba(60, 255, 110, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

a:hover {
  color: #68ff92;
  text-decoration-color: var(--green);
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

code.inline {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  padding: .1em .45em;
  font-size: .92em;
  color: var(--green);
}

.mono { font-family: 'IBM Plex Mono', monospace; }

/* ---- Layout Wrap ---- */
.page-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(12, 12, 12, 0.95);
  backdrop-filter: blur(4px);
  position: sticky;
  top: 0;
  z-index: 500;
}

.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.header-logo {
  font-family: 'VT323', monospace;
  font-size: 1.6rem;
  color: var(--green);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4em;
}

.header-logo .logo-prompt {
  color: var(--green-dim);
}

.header-nav {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.nav-item {
  font-family: 'VT323', monospace;
  font-size: 1.15rem;
  color: var(--ink-faint);
  text-decoration: none;
  padding: 0.2em 0.4em;
}

.nav-item:hover {
  color: var(--green);
  background: var(--surface-2);
}

.site-main {
  flex: 1;
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
  padding: 2.5rem 1.5rem 5rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 2rem 1.5rem;
}

.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.footer-rem {
  font-family: 'VT323', monospace;
  font-size: 1.15rem;
  color: var(--green-dim);
}

.footer-legal {
  color: var(--ink-faint);
  font-size: 0.78rem;
}

/* ---- Terminal Hero Section ---- */
.hero-section {
  margin-bottom: 4rem;
}

.terminal-window {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.terminal-bar {
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  padding: 0.45rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.bar-dot {
  width: 10px;
  height: 10px;
  background: var(--green);
  display: inline-block;
}

.bar-title {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  color: var(--ink);
}

.bar-status {
  margin-left: auto;
  font-family: 'VT323', monospace;
  font-size: 0.95rem;
  color: var(--green-dim);
}

.terminal-body {
  padding: 2.5rem 2rem;
}

.boot-sequence {
  margin-bottom: 1.8rem;
  font-size: 0.86rem;
  color: var(--green-dim);
}

.boot-line {
  margin-bottom: 0.25em;
}

.boot-line b {
  color: var(--ink);
  font-weight: 500;
}

.status-ok {
  color: var(--green);
}

/* ---- Three-Line Lockup with Blinking Cursor ---- */
.brand-lockup {
  margin: 1.6rem 0 1.8rem;
}

.brand-name {
  font-family: 'VT323', monospace;
  font-size: clamp(3.2rem, 9vw, 5.8rem);
  line-height: 1;
  color: var(--green);
  text-shadow: 0 0 20px rgba(60, 255, 110, 0.35);
  display: inline-block;
}

.brand-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.15rem;
  color: var(--ink);
  margin-top: 0.5em;
}

.brand-rem {
  font-family: 'VT323', monospace;
  font-size: 1.25rem;
  color: var(--green-dim);
  margin-top: 0.35em;
  letter-spacing: .05em;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--ink);
  max-width: 68ch;
  margin: 1.6rem 0;
  line-height: 1.7;
}

/* ---- Meta Pills ---- */
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.5rem 0 2.5rem;
}

.pill {
  font-family: 'VT323', monospace;
  font-size: 1.05rem;
  padding: 0.35em 0.8em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

.pill b {
  color: var(--green);
  font-weight: 400;
}

/* ---- Downloads Block ---- */
.download-block {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 1.8rem;
}

.download-header {
  font-family: 'VT323', monospace;
  font-size: 1.25rem;
  color: var(--green);
  margin-bottom: 1.2rem;
}

.dl-prompt {
  color: var(--green-dim);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.dl-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 1.4rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.1s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.dl-card:hover {
  background: var(--surface-3);
  border-color: var(--green);
  box-shadow: 0 0 16px rgba(60, 255, 110, 0.18);
}

.dl-os {
  font-family: 'VT323', monospace;
  font-size: 1.35rem;
  color: var(--green);
  margin-bottom: 0.3em;
}

.dl-file {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4em;
}

.dl-sub {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-bottom: 1.2em;
}

.dl-action {
  margin-top: auto;
  font-family: 'VT323', monospace;
  font-size: 1.15rem;
  color: var(--green);
}

/* ---- Content Sections ---- */
.content-section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--line);
}

.section-eyebrow {
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  letter-spacing: .12em;
  color: var(--green-dim);
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 0.5em;
}

.dir-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2em;
  height: 1.6em;
  background: var(--surface-2);
  color: var(--green);
  border: 1px solid var(--line);
  font-size: 0.9em;
}

.section-lede {
  font-size: 1.05rem;
  color: var(--ink-faint);
  max-width: 70ch;
  margin-bottom: 2rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.retro-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.retro-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6em;
}

.retro-card p {
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.65;
}

/* ---- Table Styling ---- */
.terminal-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.terminal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.terminal-table th, .terminal-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.terminal-table th {
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  letter-spacing: .05em;
  color: var(--green-dim);
  background: var(--surface-2);
}

.terminal-table tbody tr:hover {
  background: rgba(60, 255, 110, 0.05);
}

.badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15em 0.55em;
  border: 1px solid currentColor;
}

.badge.ok {
  color: var(--green);
  border-color: var(--green);
}

/* ---- Not Found Card ---- */
.not-found-card {
  background: var(--surface);
  border: 1px solid var(--danger);
  padding: 2.5rem;
  margin: 3rem 0;
}

.btn-retro {
  display: inline-block;
  font-family: 'VT323', monospace;
  font-size: 1.25rem;
  color: var(--green);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.4em 1em;
  margin-top: 1rem;
  text-decoration: none;
}

.btn-retro:hover {
  background: var(--surface-3);
  border-color: var(--green);
}
