/* Dark theme, loaded last on every page. Flips the shared tokens, then fixes
   the few places that hard-code light colours. Palette: black, off-white,
   green #02763C (accent), red #F92904 (CTA). */

:root {
  --paper:        #000000;
  --paper-deep:   #0a0a0a;
  --ink:          #FDFDFE;
  --ink-muted:    #a6a6a6;
  --ink-soft:     #767676;
  --line:         rgba(253, 253, 254, 0.12);
  --line-strong:  rgba(253, 253, 254, 0.22);
  --accent:       #3fbf7a;
  --accent-soft:  rgba(63, 191, 122, 0.12);
  --card-bg:      #0e0e0e;
  --card:         #0e0e0e;
  --sky-l:        #06281a;
  --sky-m:        #160a06;
  --sky-r:        #0b1d13;
  --tint-blue:    #2f9a63;
  --tint-pink:    #2a0f0a;
  --surface:      #0e0e0e;
  --surface-2:    #161616;
  color-scheme: dark;
}

html, body { background: #000; color: var(--ink); }
::selection { background: #02763C; color: #FDFDFE; }

/* Header, footer, announce bar */
.nav { background: rgba(0, 0, 0, 0.82) !important; border-color: var(--line) !important; }
.announce { background: #02763C !important; color: #FDFDFE !important; }
.announce a { color: #FDFDFE !important; }
footer { background: #000; }
.reader__who { background: transparent !important; }

/* Buttons */
.btn:hover { background: #d9d9d9 !important; }
.btn--ghost { background: transparent !important; color: var(--ink) !important; border-color: var(--line-strong) !important; }
.btn--ghost:hover { background: var(--surface-2) !important; }

/* Cards and panels that hard-code light fills */
.note, .stat, .hero__meta, .glance__item, .glance__item--lead, a.glance__item:hover,
.award, .award__pill, .work__item, .sp__item, .shift, .deferred, .tb-roles li,
.thought__bubble, .map__tile, .am__node, .appmap, .tb-frame, .dir__card {
  background: var(--surface) !important;
  border-color: var(--line) !important;
  color: var(--ink);
}
.award__pill:hover, a.glance__item:hover { background: var(--surface-2) !important; }
.thought__bubble::before, .thought__bubble::after { background: var(--surface) !important; }
.eyebrow::before { background: #02763C !important; }

/* Figures, captions, media frames */
.figure__caption { background: transparent !important; color: var(--ink-muted) !important; }
.figure__zoom, .slideshow__arrow, .viewer.is-info .viewer__fab { background: rgba(20, 20, 20, 0.9) !important; color: var(--ink) !important; }
.shot__screen, .phone__body, .wall img, .wall video { background: #111 !important; }

/* Heroes on case-study pages (were light gradients) */
.hero, .tb-hero { background: #000 !important; }

/* Folder art on the homepage */
.dir__front { background: rgba(22, 22, 22, 0.72) !important; border-color: var(--line) !important; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important; }
.dir__back { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5) !important; }

/* Email copy helper */
.mailcopy__copy { color: var(--ink-soft) !important; }
.mailcopy__copy:hover { color: var(--ink) !important; }
.mailcopy__tip { background: #FDFDFE !important; color: #000 !important; }

/* Homepage work-card icons */
.work-card__icon { background: var(--surface-2) !important; }

/* Code blocks */
.code { background: #0e0e0e !important; border: 1px solid var(--line); }

/* Paper notes and clippings (were cream paper) */
.tb-note, .clip { background: #121212 !important; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5) !important; }
.clip::before { background: rgba(253, 253, 254, 0.14) !important; }
.tb-frame__bar { background: #161616 !important; }
