/* The screen itself. Sized in em off .screen's font-size so the same markup
   works both mapped onto the 3D monitor and full-viewport in 2D mode. */

:root {
  --amber: #ffb000;
  --amber-bright: #ffd071;
  --amber-dim: #a8741a;
  --amber-faint: #6b4a10;
  --amber-glow: rgba(255, 176, 0, 0.55);
  --screen-bg: #0a0704;
}

.screen {
  width: 1100px;
  height: 825px;
  font-size: 20px;
  font-family: 'VT323', 'Courier New', monospace;
  color: var(--amber);
  background: var(--screen-bg);
  position: relative;
  overflow: hidden;
  line-height: 1.32;
  letter-spacing: 0.01em;
  text-shadow: 0 0 4px var(--amber-glow);
  -webkit-font-smoothing: none;
}

/* Scanlines + phosphor bloom + vignette, all compositor-friendly. */
.screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0.28) 3px,
      rgba(0, 0, 0, 0.28) 4px
    );
  pointer-events: none;
  z-index: 40;
}

.screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(255, 176, 0, 0.06) 0%, rgba(0, 0, 0, 0) 55%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0.72) 100%);
  pointer-events: none;
  z-index: 41;
}

/* A soft bar rolling down the tube, the way a mistuned CRT does. */
.roll {
  position: absolute;
  left: 0;
  right: 0;
  height: 14em;
  background: linear-gradient(
    to bottom,
    rgba(255, 176, 0, 0) 0%,
    rgba(255, 176, 0, 0.035) 50%,
    rgba(255, 176, 0, 0) 100%
  );
  pointer-events: none;
  z-index: 39;
  animation: roll 7s linear infinite;
}

@keyframes roll {
  from { top: -14em; }
  to   { top: 100%; }
}

.screen.flicker { animation: flicker 3.4s steps(1, end) infinite; }

@keyframes flicker {
  0%, 92%, 100% { opacity: 1; }
  93%           { opacity: 0.86; }
  94%           { opacity: 1; }
  97%           { opacity: 0.93; }
}

/* ---------- layout ---------- */

.screen-inner {
  position: absolute;
  inset: 0;
  padding: 1.6em 2em 0 2em;
  display: flex;
  flex-direction: column;
  z-index: 5;
}

.screen-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.8em;
  scrollbar-width: thin;
  scrollbar-color: var(--amber-faint) transparent;
}

.screen-body::-webkit-scrollbar { width: 0.5em; }
.screen-body::-webkit-scrollbar-track { background: transparent; }
.screen-body::-webkit-scrollbar-thumb { background: var(--amber-faint); }

.banner {
  white-space: pre;
  line-height: 1;
  font-size: 0.62em;
  color: var(--amber-bright);
  text-shadow: 0 0 7px var(--amber-glow);
  margin-bottom: 1.4em;
  letter-spacing: 0;
}

/* Readings in the top-right corner, purely for atmosphere. */
.hud {
  position: absolute;
  top: 1.6em;
  right: 2em;
  display: flex;
  gap: 1.2em;
  font-size: 0.72em;
  line-height: 1.1;
  color: var(--amber-dim);
  pointer-events: none;
  z-index: 8;
}

.hud pre { margin: 0; white-space: pre; }
#hud-globe { color: var(--amber); }
#hud-hex { opacity: 0.6; }

/* ---------- text primitives ---------- */

.line { margin-bottom: 0.3em; }
.gap { height: 1em; }

.head {
  color: var(--amber-bright);
  border-bottom: 1px solid var(--amber-faint);
  padding-bottom: 0.15em;
  margin: 0.4em 0 0.7em 0;
  letter-spacing: 0.08em;
}

.para {
  margin-bottom: 0.4em;
  max-width: 46em;
  color: var(--amber);
}

.bullet {
  margin-bottom: 0.25em;
  padding-left: 1.2em;
  text-indent: -1.2em;
  max-width: 46em;
}

.bullet::before { content: '> '; color: var(--amber-dim); }

.quote {
  border-left: 2px solid var(--amber-faint);
  padding-left: 0.9em;
  max-width: 44em;
  color: var(--amber-bright);
  font-style: italic;
}

.kv { margin-bottom: 0.22em; }
.kv .k { color: var(--amber-dim); display: inline-block; min-width: 8.5em; }
.kv .v { color: var(--amber); }

.mark {
  background: var(--amber);
  color: #0a0704;
  padding: 0 0.35em;
  text-shadow: none;
}

a, .link {
  color: var(--amber-bright);
  text-decoration: none;
  border-bottom: 1px dotted var(--amber-dim);
  cursor: pointer;
}

a:hover, .link:hover {
  background: var(--amber);
  color: #0a0704;
  text-shadow: none;
  border-bottom-color: transparent;
}

.cols {
  columns: 2;
  column-gap: 2.5em;
  max-width: 44em;
  margin-bottom: 0.4em;
}

.cols .bullet { break-inside: avoid; }

/* ---------- menu ---------- */

.menu { margin: 0.2em 0 0 0; }

.menu-row {
  display: block;
  padding: 0.08em 0.4em;
  margin-bottom: 0.2em;
  cursor: pointer;
  border: 0;
  background: none;
  font: inherit;
  color: var(--amber);
  text-align: left;
  width: 100%;
  max-width: 24em;
  text-shadow: inherit;
}

.menu-row .caret { color: var(--amber-dim); }
.menu-row .kind { color: var(--amber-dim); }

.menu-row:hover,
.menu-row:focus-visible,
.menu-row.sel {
  background: var(--amber);
  color: #0a0704;
  text-shadow: none;
  outline: none;
}

.menu-row:hover .caret, .menu-row.sel .caret,
.menu-row:hover .kind, .menu-row.sel .kind,
.menu-row:focus-visible .caret, .menu-row:focus-visible .kind { color: #0a0704; }

/* ---------- project + job cards ---------- */

.card {
  margin-bottom: 1.1em;
  padding-left: 0.9em;
  border-left: 2px solid var(--amber-faint);
  max-width: 48em;
}

.card-title {
  color: #0a0704;
  background: var(--amber);
  padding: 0 0.4em;
  display: inline-block;
  text-shadow: none;
  margin-bottom: 0.2em;
}

.card-year { color: var(--amber-dim); margin-left: 0.6em; }

.stack {
  color: var(--amber-dim);
  font-size: 0.86em;
  margin-bottom: 0.4em;
  letter-spacing: 0.04em;
}

.card-note {
  color: var(--amber-dim);
  font-size: 0.9em;
  margin-top: 0.35em;
  font-style: italic;
  max-width: 44em;
}

.card-meta { color: var(--amber-dim); margin-bottom: 0.35em; }

/* ---------- certifications ---------- */

.cert {
  display: flex;
  gap: 0.8em;
  align-items: baseline;
  margin-bottom: 0.25em;
  max-width: 44em;
}

.cert-name { flex: 0 1 auto; }
.cert-dots { flex: 1 1 auto; border-bottom: 1px dotted var(--amber-faint); transform: translateY(-0.25em); }
.cert-by { color: var(--amber-dim); flex: 0 0 auto; }
.cert-date { color: var(--amber-dim); flex: 0 0 auto; min-width: 5.5em; text-align: right; }

/* ---------- skills ---------- */

.skill { margin-bottom: 0.9em; max-width: 46em; }
.skill-label { color: var(--amber-bright); margin-bottom: 0.2em; letter-spacing: 0.06em; }
.chips { display: flex; flex-wrap: wrap; gap: 0.3em 0.4em; }

.chip {
  border: 1px solid var(--amber-faint);
  padding: 0 0.45em;
  color: var(--amber);
  font-size: 0.9em;
}

/* ---------- photo ---------- */

.photo {
  float: right;
  border: 2px solid var(--amber-dim);
  padding: 0.25em;
  background: #000;
  margin: 0 0 1em 1.4em;
  box-shadow: 0 0 14px rgba(255, 176, 0, 0.25);
}

.photo img {
  display: block;
  width: 9em;
  height: 11.4em;
  object-fit: cover;
  /* Pull a normal colour photo onto an amber phosphor tube. */
  filter: grayscale(1) sepia(1) hue-rotate(-12deg) saturate(4.2) brightness(0.92) contrast(1.15);
}

.photo figcaption {
  text-align: center;
  font-size: 0.78em;
  color: var(--amber-dim);
  margin-top: 0.25em;
}

/* ---------- the call button ---------- */

.call {
  border: 2px solid var(--amber);
  padding: 0.7em 1em;
  max-width: 30em;
  background: rgba(255, 176, 0, 0.05);
}

.call-btn {
  display: inline-block;
  background: var(--amber);
  color: #0a0704;
  padding: 0.15em 0.8em;
  text-shadow: none;
  border: 0;
  border-bottom: 0;
  font: inherit;
  cursor: pointer;
  letter-spacing: 0.06em;
}

.call-btn:hover { background: var(--amber-bright); border-bottom: 0; }

.call-dot {
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: #4fdc6a;
  box-shadow: 0 0 6px #4fdc6a;
  margin-right: 0.5em;
  animation: pulse 1.6s ease-in-out infinite;
}

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

.call-sub { color: var(--amber-dim); font-size: 0.88em; margin-top: 0.45em; max-width: 26em; }

/* ---------- boot ---------- */

.boot { white-space: pre-wrap; }
.boot-line { margin-bottom: 0.1em; }

.cursor-block {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: var(--amber);
  vertical-align: text-bottom;
  animation: blink 1.05s steps(1, end) infinite;
}

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

/* ---------- status bar + prompt ---------- */

.status {
  flex: 0 0 auto;
  border-top: 1px solid var(--amber-faint);
  padding: 0.4em 0 0.9em 0;
  display: flex;
  justify-content: space-between;
  gap: 1em;
  color: var(--amber-dim);
  font-size: 0.86em;
}

.prompt {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding-bottom: 0.9em;
}

.prompt-sigil { color: var(--amber-dim); }

.prompt input {
  flex: 1 1 auto;
  background: transparent;
  border: 0;
  outline: none;
  font: inherit;
  color: var(--amber);
  text-shadow: inherit;
  caret-color: var(--amber);
  min-width: 0;
}

.prompt input::placeholder { color: var(--amber-faint); }

/* ---------- reveal ---------- */

.reveal > * {
  animation: reveal 0.01s linear both;
  animation-delay: var(--d, 0s);
}

@keyframes reveal {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .roll, .screen.flicker, .cursor-block, .call-dot { animation: none; }
  .reveal > * { animation: none; }
}
