@font-face {
  font-family: "VT323";
  src: url("../fonts/VT323-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --amber: #ffb000;
  --amber-dim: #b37b00;
  --amber-bright: #ffd479;
  --bg: #0a0908;
  --bg-deep: #050403;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-deep);
  color: var(--amber);
  font-family: "VT323", "Courier New", monospace;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* ---------- CRT shell ---------- */

.crt {
  position: relative;
  width: 100%;
  max-width: 860px;
  background: var(--bg);
  border-radius: 18px;
  padding: 2.5rem 2.5rem 2rem;
  box-shadow:
    0 0 0 2px #1a1310,
    0 0 40px rgba(255, 176, 0, 0.08),
    inset 0 0 120px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  animation: flicker 6.5s infinite;
}

.screen {
  position: relative;
  z-index: 1;
}

.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.28) 0px,
    rgba(0, 0, 0, 0.28) 1px,
    transparent 2px,
    transparent 3px
  );
  mix-blend-mode: multiply;
}

.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(
    ellipse at center,
    transparent 55%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

@keyframes flicker {
  0%, 100% { filter: brightness(1); }
  92% { filter: brightness(1); }
  93% { filter: brightness(0.94); }
  94% { filter: brightness(1.03); }
  95% { filter: brightness(0.97); }
  96% { filter: brightness(1); }
}

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

/* ---------- Text ---------- */

.content, .boot {
  font-size: 1.35rem;
  line-height: 1.5;
  text-shadow: 0 0 6px rgba(255, 176, 0, 0.55), 0 0 1px rgba(255, 176, 0, 0.8);
}

h1 {
  font-size: 2.6rem;
  margin: 0.2em 0 0.1em;
  letter-spacing: 0.04em;
  color: var(--amber-bright);
}

.lead {
  margin: 0 0 1.4em;
  color: var(--amber-dim);
  font-size: 1.2rem;
}

.txt {
  white-space: pre-wrap;
  font-family: inherit;
  margin: 0 0 1.8em;
}

/* ---------- Prompt lines ---------- */

.prompt-line {
  margin: 0 0 0.6em;
}

.prompt-line .prompt { color: var(--amber-bright); }
.prompt-line .colon,
.prompt-line .path { color: var(--amber-dim); }
.prompt-line .dollar { color: var(--amber-dim); margin-right: 0.4em; }
.prompt-line .cmd { color: var(--amber); }

header.prompt-line {
  margin-bottom: 0.2em;
}

#projects, #links {
  margin-top: 2.2em;
}

/* ---------- Project listing ---------- */

.listing {
  list-style: none;
  margin: 0.6em 0 0;
  padding: 0 0 0 1.2em;
  border-left: 2px solid #2a1e10;
}

.listing li {
  margin-bottom: 1em;
}

.listing a {
  font-size: 1.3rem;
}

.listing .meta {
  display: block;
  color: var(--amber-dim);
  font-size: 1.05rem;
  margin: 0.1em 0 0.3em;
}

.listing .desc {
  margin: 0;
  color: var(--amber);
}

/* ---------- Links ---------- */

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

a:hover, a:focus {
  color: #fff2cf;
  text-shadow: 0 0 8px rgba(255, 176, 0, 0.9);
}

/* ---------- Footer / cursor ---------- */

footer {
  margin-top: 2.5em;
}

.cursor {
  display: inline-block;
  animation: blink 1s steps(1) infinite;
}

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

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

/* ---------- Boot sequence ---------- */

.boot {
  white-space: pre-wrap;
  font-family: inherit;
  margin: 0;
  min-height: 1.5em;
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
  .crt { padding: 1.6rem 1.2rem 1.4rem; border-radius: 10px; }
  .content, .boot { font-size: 1.15rem; }
  h1 { font-size: 2rem; }
}
