:root {
  --bg: #08080f;
  --purple: #b44aff;
  --yellow: #e8ff47;
  --text: #d4d3e4;
  --muted: #7a7890;
  --card: #0e0e1a;
  --border: #1a1a2e;
  --font-mono: "Roboto Mono", monospace;
  --font-serif: "Playfair Display", Georgia, serif;
}

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

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.65;
  position: relative;
  overflow-x: hidden;
}

/* ── CRT scanlines ── */
.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.21) 0px,
    rgba(0, 0, 0, 0.21) 1px,
    transparent 1px,
    transparent 3px
  );
}

.crt-overlay::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.45) 100%);
}

.crt-sweep {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 101;
  overflow: hidden;
}

.crt-sweep::after {
  content: "";
  position: absolute;
  left: -20%;
  width: 30%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(180, 74, 255, 0.03) 20%,
    rgba(180, 74, 255, 0.07) 45%,
    rgba(232, 255, 71, 0.04) 50%,
    rgba(180, 74, 255, 0.07) 55%,
    rgba(180, 74, 255, 0.03) 80%,
    transparent
  );
  animation: sweep-pass 12.5s ease-in-out infinite;
}

@keyframes sweep-pass {
  0% { transform: translateX(500%); opacity: 0; }
  2% { opacity: 1; }
  33% { transform: translateX(-80%); opacity: 1; }
  35% { transform: translateX(-80%); opacity: 0; }
  100% { transform: translateX(-80%); opacity: 0; }
}

/* ── Background decoration ── */
.bg-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-lines::before,
.bg-lines::after {
  content: "";
  position: absolute;
  width: 1px;
  height: 200%;
  top: -50%;
}

.bg-lines::before {
  left: 18%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(180, 74, 255, 0.06) 15%,
    rgba(180, 74, 255, 0.12) 50%,
    rgba(180, 74, 255, 0.06) 85%,
    transparent 100%
  );
  animation: line-drift 12s ease-in-out infinite alternate;
}

.bg-lines::after {
  right: 12%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(232, 255, 71, 0.04) 20%,
    rgba(232, 255, 71, 0.08) 50%,
    rgba(232, 255, 71, 0.04) 80%,
    transparent 100%
  );
  animation: line-drift 18s ease-in-out infinite alternate-reverse;
}

@keyframes line-drift {
  0% { transform: translateY(0) rotate(0.3deg); }
  100% { transform: translateY(30px) rotate(-0.3deg); }
}

/* extra floating lines via pseudo on body */
body::before {
  content: "";
  position: fixed;
  width: 140%;
  height: 1px;
  top: 35%;
  left: -20%;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(180, 74, 255, 0.05) 20%,
    rgba(232, 255, 71, 0.06) 50%,
    rgba(180, 74, 255, 0.04) 80%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
  animation: h-line 20s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  width: 120%;
  height: 1px;
  bottom: 25%;
  left: -10%;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(232, 255, 71, 0.04) 30%,
    rgba(180, 74, 255, 0.06) 60%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
  animation: h-line 15s ease-in-out infinite alternate-reverse;
}

@keyframes h-line {
  0% { transform: translateX(-40px); }
  100% { transform: translateX(40px); }
}

/* ── Phosphor flicker ── */
@keyframes phosphor {
  0% { opacity: 0; }
  4% { opacity: 0.6; }
  6% { opacity: 0; }
  50% { opacity: 0; }
  52% { opacity: 0.3; }
  54% { opacity: 0; }
  100% { opacity: 0; }
}

/* ── Layout: CSS Grid ── */
.layout {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  align-items: start;
}

/* ── Title Block ── */
.title-block {
  grid-column: 1 / -1;
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
}

.title-block h1 {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--purple);
  text-shadow: 0 0 12px rgba(180, 74, 255, 0.3);
  margin-bottom: 0.6rem;
}

.hero-line {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  max-width: 510px;
}

/* ── Terminals ── */
.term {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0;
  position: relative;
  overflow: hidden;
}

.term-bar {
  padding: 0.45rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.term-dot {
  width: 6px;
  height: 6px;
  border-radius: 0;
  background: var(--term-accent, var(--purple));
  box-shadow: 0 0 6px var(--term-accent, var(--purple));
  animation: dot-blink 3s steps(1) infinite;
}

.term:hover .term-dot {
  animation: none;
  opacity: 1;
}

@keyframes dot-blink {
  0% { opacity: 1; }
  33.3% { opacity: 1; }
  33.4% { opacity: 0; }
  100% { opacity: 0; }
}

.term-body {
  padding: 0.9rem 1rem;
}

.term-body ul {
  padding-left: 1.1rem;
  list-style: none;
}

.term-body ul li {
  position: relative;
  padding-left: 0.4rem;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.term-body ul li::before {
  content: ">";
  position: absolute;
  left: -1.1rem;
  color: var(--term-accent, var(--purple));
  opacity: 0.5;
  font-weight: 700;
}

.term-body p {
  color: var(--muted);
  font-size: 0.84rem;
}

/* ── Span 2 columns ── */
.span-2 {
  grid-column: 1 / -1;
}

/* ── Quote ── */
.quote {
  margin-top: 0.9rem;
  padding: 0.7rem 0.9rem;
  border-left: 2px solid var(--yellow);
  background: rgba(232, 255, 71, 0.03);
  font-style: italic;
  color: var(--muted) !important;
  font-size: 0.82rem !important;
  line-height: 1.5;
}

/* ── Link line ── */
.link-line {
  margin-top: 0.6rem;
  font-weight: 400;
}

.link-line::before {
  content: none;
}

/* ── Contact ── */
.contact-intro {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--yellow);
  margin-bottom: 0.5rem;
}

/* ── Links ── */
a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(180, 74, 255, 0.35);
  transition: color 0.2s, border-color 0.2s, text-shadow 0.2s;
}

a:hover {
  color: var(--purple);
  border-color: var(--purple);
  text-shadow: 0 0 6px rgba(180, 74, 255, 0.3);
}

/* ── Strong ── */
strong {
  color: var(--text);
  font-weight: 700;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 2rem 1rem 4rem;
  }

  .title-block h1 {
    font-size: 1.6rem;
  }

  .hero-line {
    font-size: 1rem;
  }
}
