/* joshdurey.com — Still Human
   DOSSIER theme: dark, found-footage, lost-archives
   Source Serif 4 + Inter + JetBrains Mono
   ------------------------------------------------- */

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

:root {
  --bg:       #08080c;
  --bg-2:     #0f0f14;
  --bg-card:  #12121a;
  --ink:      #e0dbd0;
  --ink-2:    #bdb5a8;
  --bright:   #f5f0e4;
  --muted:    #8a8275;
  --rule:     #2a2622;
  --rule-2:   #1e1c18;
  --red:      #c23030;
  --red-dim:  #8a2020;
  --red-glow: rgba(194,48,48,.15);
  --green:    #4ade80;

  --serif:    "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --sans:     "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:     "JetBrains Mono", "Fira Code", "Consolas", monospace;

  --max:    1120px;
  --gutter: clamp(1.25rem, 3vw, 2.5rem);

  --mx: 50%;
  --my: 50%;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  min-height: 100vh;
}

/* -------- Grain overlay for found-footage feel -------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* -------- Spotlight overlay -------- */
#spotlight {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: radial-gradient(
    400px at var(--mx) var(--my),
    transparent 0%,
    rgba(8,8,12,.25) 50%,
    rgba(8,8,12,.45) 100%
  );
  transition: opacity .3s ease;
  opacity: 1;
}
#spotlight.off { opacity: 0; }

@media (max-width: 820px) {
  #spotlight { display: none; }
}
@media (hover: none) {
  #spotlight { display: none; }
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color .15s ease, color .15s ease;
}
a:hover { text-decoration-color: var(--red); color: var(--red); }

::selection { background: var(--red); color: var(--bright); }

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
  border-top: 1px solid var(--rule);
}
.section:first-of-type { border-top: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--bright);
  margin: 0 0 .6em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
}
h2 { font-size: clamp(1.5rem, 2.8vw, 2.15rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); }
h4 { font-size: 1rem; }

p { margin: 0 0 1.1em; max-width: 65ch; }

.lede {
  font-size: clamp(1.15rem, 1.7vw, 1.35rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 60ch;
}

.eyebrow {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--red);
  display: inline-block;
  margin-bottom: 1.1rem;
}

.small-caps {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
}

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}
.rule-red {
  border: 0;
  border-top: 2px solid var(--red);
  width: 48px;
  margin: 0 0 1.5rem;
}

/* ---------- Header / Nav ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: rgba(8,8,12,.92);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  color: var(--bright);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.brand .dot { color: var(--red); }
.nav {
  display: flex;
  gap: 1.75rem;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.nav a {
  text-decoration: none;
  color: var(--ink);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav a:hover, .nav a[aria-current="page"] {
  color: var(--red);
  border-bottom-color: var(--red);
}

@media (max-width: 720px) {
  .nav { gap: 1rem; font-size: .72rem; flex-wrap: wrap; justify-content: flex-end; }
  .brand { font-size: .85rem; }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero h1 {
  max-width: 38ch;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.005em;
  font-weight: 500;
  color: var(--bright);
}
.hero .lede {
  margin-top: 1.25rem;
  max-width: 60ch;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
}
.headshot {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border: 1px solid var(--rule);
  box-shadow: 0 0 40px rgba(194,48,48,.08);
  justify-self: end;
  background: var(--bg-2);
  filter: grayscale(.2) contrast(1.05);
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .headshot { justify-self: start; width: 220px; height: 220px; }
}

.micro {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  margin-top: .6rem;
  letter-spacing: .02em;
}
.micro a { color: var(--muted); text-decoration-color: var(--rule); }
.micro a:hover { color: var(--red); }

/* ---------- Buttons ---------- */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.75rem;
}
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .8rem 1.25rem;
  text-decoration: none;
  border: 1px solid var(--ink-2);
  color: var(--ink);
  background: transparent;
  transition: all .15s ease;
}
.btn:hover { background: var(--bright); color: var(--bg); border-color: var(--bright); }
.btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: var(--bright);
}
.btn-primary:hover { background: #d63636; border-color: #d63636; color: #fff; }

/* ---------- Card grids ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
@media (max-width: 820px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  padding: 1.75rem 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  transition: border-color .2s ease, box-shadow .2s ease;
  position: relative;
}
.card:hover {
  border-color: var(--red);
  box-shadow: 0 0 20px var(--red-glow), inset 0 0 20px var(--red-glow);
}
.card .tag {
  font-family: var(--mono);
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--red);
  font-weight: 500;
  margin-bottom: .75rem;
}
.card h3 {
  margin: 0 0 .5rem;
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--bright);
}
.card p {
  color: var(--ink-2);
  font-size: .98rem;
  margin-bottom: 1.25rem;
}
.card .arrow {
  margin-top: auto;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 500;
  color: var(--red);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.card .arrow:hover { color: #e04040; }
.card a.card-link { text-decoration: none; color: inherit; }

/* Exhibit number stamp on cards */
.card .exhibit {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--mono);
  font-size: .6rem;
  font-weight: 700;
  color: var(--red-dim);
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .6;
}

/* Full-card link */
.card.linked { position: relative; }
.card.linked > a::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* ---------- Redacted text ---------- */
.redacted {
  position: relative;
  display: inline;
  cursor: pointer;
  color: transparent;
  background: var(--bright);
  padding: 0 .15em;
  transition: all .4s ease;
  user-select: none;
}
.redacted::before {
  content: "[REDACTED]";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--bg);
  text-transform: uppercase;
  opacity: .4;
  pointer-events: none;
  transition: opacity .3s ease;
}
.redacted.revealed,
.redacted:hover {
  color: var(--red);
  background: var(--red-glow);
  text-shadow: 0 0 8px rgba(194,48,48,.3);
}
.redacted.revealed::before,
.redacted:hover::before {
  opacity: 0;
}

/* ---------- Terminal ---------- */
.terminal {
  background: #0c0c10;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0;
  font-family: var(--mono);
  font-size: .82rem;
  line-height: 1.7;
  overflow: hidden;
  max-width: 700px;
}
.terminal-bar {
  background: #1a1a22;
  padding: .5rem 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  border-bottom: 1px solid var(--rule);
}
.terminal-bar .dot-r { width: 10px; height: 10px; border-radius: 50%; background: #c23030; }
.terminal-bar .dot-y { width: 10px; height: 10px; border-radius: 50%; background: #d4a017; }
.terminal-bar .dot-g { width: 10px; height: 10px; border-radius: 50%; background: #4ade80; }
.terminal-bar .title {
  font-size: .68rem;
  color: var(--muted);
  margin-left: .5rem;
  letter-spacing: .04em;
}
.terminal-body {
  padding: 1.25rem 1.5rem;
  max-height: 340px;
  overflow-y: auto;
  color: var(--green);
}
.terminal-body .line {
  margin-bottom: .35rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-body .line.dim { color: var(--muted); }
.terminal-body .line.red { color: var(--red); }
.terminal-body .line.bright { color: var(--bright); }
.terminal-input-row {
  display: flex;
  align-items: center;
  padding: .5rem 1.5rem 1rem;
  color: var(--green);
}
.terminal-input-row .prompt {
  margin-right: .5rem;
  user-select: none;
  flex-shrink: 0;
}
.terminal-input-row input {
  background: transparent;
  border: none;
  color: var(--green);
  font-family: var(--mono);
  font-size: .82rem;
  flex: 1;
  outline: none;
  caret-color: var(--green);
}
.terminal-input-row input::placeholder { color: var(--muted); }

/* ---------- Book block (horizontal card) ---------- */
.book-block {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  padding: clamp(2rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.book-block .title-treatment {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 .4em;
  color: var(--bright);
}
.book-block .subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--ink-2);
  line-height: 1.35;
  max-width: 28ch;
  margin: 0 0 1rem;
}
.book-block .status-line {
  font-family: var(--mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  font-weight: 500;
  margin: 1rem 0 0;
}
@media (max-width: 820px) {
  .book-block { grid-template-columns: 1fr; }
}

/* ---------- Pullquote / mission block ---------- */
.mission-block {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--red);
  padding: clamp(2rem, 4vw, 3rem);
}
.mission-block .pull {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  line-height: 1.35;
  max-width: 38ch;
  margin: 0 0 2rem;
  color: var(--bright);
}
.mission-block .pull:last-child { margin-bottom: 0; }

/* ---------- Scorecard table ---------- */
.scorecard {
  border: 1px solid var(--rule);
  background: var(--bg-2);
  padding: 1.5rem 1.75rem;
  font-family: var(--mono);
  font-size: .82rem;
  margin: 1.5rem 0;
}
.scorecard .row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.scorecard .row:last-child { border-bottom: none; }
.scorecard .label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .68rem;
  font-weight: 500;
}
.scorecard .value {
  color: var(--ink);
  font-weight: 500;
  text-align: right;
}
.scorecard .value.bad { color: var(--red); }

/* ---------- Classified stamp ---------- */
.stamp {
  display: inline-block;
  font-family: var(--mono);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--red);
  border: 2px solid var(--red);
  padding: .3em .8em;
  transform: rotate(-3deg);
  opacity: .7;
}

/* ---------- File reference number ---------- */
.file-ref {
  font-family: var(--mono);
  font-size: .65rem;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .5;
}

/* ---------- Prose (long-form articles) ---------- */
.prose {
  max-width: 38rem;
  margin: 0 auto;
}
.prose h2 {
  margin-top: 2.5em;
  margin-bottom: .6em;
  font-size: 1.55rem;
}
.prose h3 {
  margin-top: 2em;
  font-size: 1.2rem;
}
.prose p {
  font-size: 1.1rem;
  line-height: 1.72;
  max-width: none;
}
.prose p.dropcap::first-letter {
  font-size: 3.4em;
  float: left;
  line-height: .85;
  padding: .08em .08em 0 0;
  font-weight: 600;
  color: var(--red);
}
.prose blockquote {
  margin: 2em 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--red);
  font-style: italic;
  color: var(--ink-2);
}
.prose hr.section-break {
  border: 0;
  text-align: center;
  margin: 3rem 0;
}
.prose hr.section-break::before {
  content: "§";
  font-family: var(--serif);
  color: var(--red);
  font-size: 1.4rem;
}
.prose ul, .prose ol {
  padding-left: 1.25rem;
  font-size: 1.08rem;
  line-height: 1.7;
}
.prose li { margin-bottom: .4em; }
.prose .byline {
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin: 0 0 2rem;
}

/* Indicator list inside cards */
.indicator-list {
  list-style: none;
  padding: 0;
  margin: .75rem 0 0;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--ink-2);
}
.indicator-list li {
  padding: .45rem 0;
  border-top: 1px solid var(--rule);
  line-height: 1.35;
}
.indicator-list li:first-child { border-top: none; }
.indicator-list strong {
  font-weight: 700;
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .04em;
  margin-right: .35rem;
}
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: .55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .15em .5em;
  margin-left: .5rem;
  vertical-align: middle;
  border-radius: 2px;
}
.badge.critical {
  background: var(--red);
  color: var(--bright);
}

/* ---------- Article header ---------- */
.article-header {
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
  max-width: 42rem;
  margin: 0 auto;
  text-align: left;
}
.article-header h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
}
.article-header .dek {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-2);
  max-width: 38ch;
  margin: 1rem 0 0;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 3rem 0 2.5rem;
  margin-top: clamp(3rem, 6vw, 5rem);
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.site-footer a:hover { color: var(--red); border-bottom-color: var(--red); }
.site-footer .foot-meta {
  font-family: var(--mono);
  color: var(--muted);
  letter-spacing: .04em;
}

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; }
.measure-tight { max-width: 48ch; }
.measure { max-width: 60ch; }

/* ---------- Page lede (inner pages) ---------- */
.page-lede {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
}
.page-lede h1 { max-width: 18ch; }
.page-lede .lede { margin-top: 1.25rem; }

/* ---------- Two-column lede ---------- */
.lede-2col {
  display: grid;
  grid-template-columns: 280px minmax(0, 65ch);
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
}
.lede-2col .lede,
.lede-2col p { max-width: 100%; }
@media (max-width: 820px) {
  .lede-2col { grid-template-columns: 1fr; }
}

/* ---------- Strip ---------- */
.strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  font-family: var(--mono);
  font-size: .78rem;
}
.strip a {
  text-decoration: none;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.strip a:hover { color: var(--red); border-bottom-color: var(--red); }

/* ---------- Engagement list ---------- */
.engagement-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  font-family: var(--sans);
  font-size: .92rem;
  color: var(--ink-2);
}
.engagement-list li {
  padding: .7rem 0;
  border-bottom: 1px solid var(--rule);
}
.engagement-list li:last-child { border-bottom: none; }
.engagement-list strong { color: var(--ink); }

/* ---------- Contact form ---------- */
.contact-wrap { max-width: 640px; }
.contact-form { display: block; }
.contact-form .field {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.4rem;
}
.contact-form label {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .45rem;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--bright);
  background: var(--bg-2);
  border: 1px solid var(--rule);
  padding: .75rem .9rem;
  border-radius: 0;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.contact-form select {
  font-family: var(--mono);
  font-size: .9rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  background-color: var(--bg-2);
  padding-right: 2.2rem;
}
.contact-form textarea {
  resize: vertical;
  min-height: 280px;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--red);
  background: #161620;
}
.contact-form button.btn {
  font-family: var(--mono);
  cursor: pointer;
}
.contact-form .hp { position: absolute; left: -9999px; }

/* ---------- Scroll reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Typewriter effect ---------- */
.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--red);
  white-space: nowrap;
  animation: blink-caret .8s step-end infinite;
}
.typewriter.done {
  border-right-color: transparent;
  white-space: normal;
}
@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--red); }
}

/* ---------- Dossier-specific elements ---------- */
.dossier-excerpt {
  background: var(--bg-card);
  border-left: 3px solid var(--red-dim);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink-2);
  line-height: 1.6;
  position: relative;
}
.dossier-excerpt::before {
  content: attr(data-ref);
  position: absolute;
  top: .5rem;
  right: 1rem;
  font-family: var(--mono);
  font-size: .6rem;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .5;
}

/* ---------- Scanlines (subtle) ---------- */
.scanlines::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,.03) 2px,
    rgba(0,0,0,.03) 4px
  );
}

/* ==========================================================
   FULL-PAGE CRT TERMINAL (Investigation page)
   ========================================================== */

.crt-page {
  background: #0a0a0a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.crt-page .site-header {
  background: rgba(10,10,10,.95);
  border-bottom-color: #1a2a1a;
}
.crt-page .site-footer {
  border-top-color: #1a2a1a;
  margin-top: 0;
}

.crt-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem var(--gutter);
  position: relative;
}

/* CRT screen container */
.crt-screen {
  flex: 1;
  background: #050808;
  border: 2px solid #1a3a1a;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 70vh;
  box-shadow:
    0 0 60px rgba(74,222,128,.04),
    inset 0 0 80px rgba(0,0,0,.5);
}

/* CRT scanlines */
.crt-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1px,
    rgba(0,0,0,.15) 1px,
    rgba(0,0,0,.15) 3px
  );
}

/* CRT screen curvature / vignette */
.crt-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 60%,
    rgba(0,0,0,.4) 100%
  );
}

/* CRT title bar */
.crt-titlebar {
  background: #0a120a;
  border-bottom: 1px solid #1a3a1a;
  padding: .6rem 1.25rem;
  font-family: var(--mono);
  font-size: .68rem;
  color: #3a7a3a;
  letter-spacing: .08em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 4;
}
.crt-titlebar .status {
  color: #2a5a2a;
}

/* CRT output area */
.crt-output {
  flex: 1;
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: .85rem;
  line-height: 1.7;
  color: #4ade80;
  position: relative;
  z-index: 4;
}
.crt-output .line {
  margin-bottom: .25rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.crt-output .line.dim    { color: #2a6a2a; }
.crt-output .line.bright { color: #a0ffa0; }
.crt-output .line.red    { color: #ff4040; }
.crt-output .line.white  { color: #d0d0d0; }
.crt-output .line.header {
  color: #a0ffa0;
  font-weight: 700;
  font-size: .9rem;
  margin-top: .5rem;
}
.crt-output .line.border { color: #1a4a1a; }
.crt-output .line.link {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: #2a6a2a;
}
.crt-output .line.link:hover {
  color: #a0ffa0;
  text-decoration-color: #4ade80;
}

/* CRT input area */
.crt-input-row {
  display: flex;
  align-items: center;
  padding: .75rem 1.75rem 1rem;
  color: #4ade80;
  border-top: 1px solid #1a3a1a;
  background: #050808;
  position: relative;
  z-index: 4;
}
.crt-input-row .prompt {
  margin-right: .5rem;
  user-select: none;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: .85rem;
  font-weight: 700;
}
.crt-input-row input {
  background: transparent;
  border: none;
  color: #4ade80;
  font-family: var(--mono);
  font-size: .85rem;
  flex: 1;
  outline: none;
  caret-color: #4ade80;
}
.crt-input-row input::placeholder { color: #1a4a1a; }

/* Phosphor glow on text */
.crt-output .line,
.crt-input-row {
  text-shadow: 0 0 4px rgba(74,222,128,.15);
}

/* Blinking cursor animation for initial state */
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.crt-cursor {
  display: inline-block;
  width: .55em;
  height: 1.1em;
  background: #4ade80;
  vertical-align: text-bottom;
  animation: blink-cursor 1s step-end infinite;
}

/* Flicker on load */
@keyframes crt-flicker {
  0% { opacity: .4; }
  5% { opacity: .9; }
  10% { opacity: .5; }
  15% { opacity: 1; }
  100% { opacity: 1; }
}
.crt-screen.boot {
  animation: crt-flicker .6s ease-out;
}
