/* ═══════════════════════════════════════════════════════════════════
   NOIR THEME: black · off-white · persimmon orange
   Loaded after styles-vien.css (and search.css). Matches the home page
   (site.css): IBM Plex Sans for text, IBM Plex Mono for labels,
   hairline rules, square corners. Delete the <link> to get the old look back.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* the base sheet uses --cream as "paper" and --ink as "text", so
     swapping them flips the whole site to black-on-ivory in one go */
  --cream:     #0a0a0a;               /* page black            */
  --cream-2:   #141414;               /* lifted black (panels) */
  --ink:       #ededed;               /* text                  */
  --ink-2:     #bdbdbd;               /* muted text            */
  --ink-faint: rgb(237 230 214 / .08);
  --line:      rgb(237 230 214 / .16); /* hairline rules        */
  --line-2:    rgb(237 230 214 / .32);

  --lime:      oklch(64% 0.22 38);    /* the original persimmon orange */
  --lime-deep: oklch(57% 0.21 36);
  --on-lime:   #0a0a0a;
  --persimmon: oklch(64% 0.22 38);    /* secondary accent → orange too */

  --shadow:    none;
  --radius:    0;

  --display: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans:    "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --label:   "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

html { font-size: 16px; }
body { font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { background: var(--cream); color: var(--ink); }
::selection { background: var(--lime); color: var(--on-lime); }

/* ── Sharp everything, no offset shadows, hairline borders ────────── */
*, *::before, *::after { border-radius: 0 !important; }
body * { box-shadow: none !important; }
body *:not(.hl) { border-color: var(--line) !important; }
.live-dot { border-radius: 50% !important; }

/* faint grid texture → gone; a quiet vignette instead */
body::before {
  background: radial-gradient(120% 80% at 50% 0%, rgb(237 230 214 / .035), transparent 70%);
  opacity: 1; mask-image: none; -webkit-mask-image: none;
}

/* ── Type ─────────────────────────────────────────────────────────── */
h1, h2, h3, .sec-head, .xp-role, .proj-head h3 {
  font-family: var(--display); font-weight: 500; letter-spacing: -.02em;
}
.sec-head {
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(1.4rem, 3vh, 2rem);
}
.sec-head .dot { color: var(--lime); }
p, li { font-family: var(--sans); }
strong, b { font-weight: 600; color: var(--ink); }

/* mono uppercase labels, like the home page's section heads */
.hero-eyebrow, .ask-eyebrow, .xp-time, .proj-time, .strip-label,
.badge, .edu-chip, .tech-chips span, .pills li, .nav a, .btn,
.proj-links a, .proj-links button, .strip-toggle-btn, .fact, .live-open,
.edu-card-head .small, .cl {
  font-family: var(--label) !important;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 500;
}
.hero-eyebrow::before { background: var(--lime); height: 1px; }

/* ── Nav: thin black bar, orange active link ──────────────────────── */
.nav-inner {
  background: rgb(12 11 10 / .88) !important;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line) !important;
}
.nav-bubble { display: none !important; }
.nav a { font-size: .74rem; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--lime); }

/* ── Hero ─────────────────────────────────────────────────────────── */
.section--hero h1 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(3rem, 7.5vw, 6.6rem);
  line-height: .98;
}
.section--hero h1 .hl, .hl {
  background: none !important; color: var(--lime);
  font-weight: 500; padding: 0 .04em;
}
.spark { color: var(--lime); font-size: .4em; }
.hero-sub {
  font-family: var(--sans); font-weight: 400;
  color: var(--ink-2); max-width: 44ch;
}
.scribble, .scribble-text { color: var(--lime); }

/* ── Buttons: sharp rectangles ────────────────────────────────────── */
.btn {
  font-size: .78rem; padding: .95rem 1.6rem;
  border: 1px solid var(--line-2) !important;
  background: transparent; color: var(--ink);
}
.btn:hover { background: var(--ink); color: var(--cream); transform: none; }
.btn--primary {
  background: var(--lime); color: var(--on-lime);
  border-color: var(--lime) !important; font-weight: 600;
}
.btn--primary:hover { background: var(--ink); color: var(--cream); border-color: var(--ink) !important; }
.icon-link { color: var(--ink-2); }
.icon-link:hover { background: transparent; color: var(--lime); }

/* ── Cards: hairline frames, orange top rule on hover ─────────────── */
.xp, .proj, .edu-card, .ask-field input, #askInput {
  border-width: 1px !important;
  background: var(--cream-2);
}
.xp, .proj, .edu-card {
  transition: border-color .25s ease, transform .25s ease;
}
.xp:hover, .proj:hover, .edu-card:hover {
  border-color: var(--line-2) !important; transform: none;
  box-shadow: inset 0 2px 0 var(--lime) !important;
}
.xp-time, .proj-time { color: var(--lime); font-size: .72rem; }

.badge, .edu-chip {
  background: transparent !important; color: var(--lime);
  border: 1px solid var(--lime) !important; font-size: .66rem; padding: .25rem .6rem;
}
.proj-links a, .proj-links button, .strip-toggle-btn, .live-open {
  background: transparent; color: var(--ink); font-size: .66rem;
  border-width: 1px !important;
}
.proj-links a:hover, .proj-links button:hover, .strip-toggle-btn:hover, .live-open:hover {
  background: var(--lime); color: var(--on-lime); border-color: var(--lime) !important; transform: none;
}
.fact { font-size: .7rem; border-width: 1px !important; background: transparent; }

/* tech tiles: squares */
.tech-tile, .tech {
  border-width: 1px !important; background: #ededed; color: #0a0a0a;
  width: 84px; height: 84px;
}
.tech-tile .ph { color: #0a0a0a; font-family: var(--display); }
.tech-tile:hover { outline: 1px solid var(--lime); outline-offset: 3px; transform: none; }
.tech-grid { gap: 1rem; }

/* images & video frames get a hairline, not a heavy border */
.strip img, .strip video, .avatar-wrap img, .proj-banner-video { border-width: 1px !important; }

/* ask / search panel */
.ask { background: var(--cream-2); border-color: var(--line) !important; }
#askInput { background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 1.1rem; }
#askInput:focus { border-color: var(--lime) !important; transform: none; }

/* contact form: underline fields stay, in hairline */
.cfield input, .cfield textarea { color: var(--ink); font-family: var(--sans); font-size: 1.1rem; }
.cfield input::placeholder, .cfield textarea::placeholder { color: var(--ink-2); opacity: .7; }
.cfield input:focus, .cfield textarea:focus { border-color: var(--lime) !important; }

footer { border-color: var(--line) !important; }

@media (max-width: 720px) {
  .spark { display: none; }
  .hero-actions { gap: .6rem; }
}

/* dark-ink logos would vanish on black: render them in ivory */
img[src*="thebooker"], img[src*="intellectualshowdown-logo"] {
  filter: brightness(0) invert(.9);
}

/* ── Inline code in prose: smaller, quieter, sits on the serif baseline ── */
:not(pre) > code {
  font-family: var(--label);
  font-size: .78em;
  color: var(--ink);
  background: var(--cream-2);
  padding: .1em .35em;
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
}

/* ── Flow diagram: the "dark" node inverted to ivory once the palette flipped,
      leaving its description unreadable. Keep it dark, mark it with orange. ── */
.dd-flow-node--dark {
  background: var(--cream-2) !important;
  color: var(--ink);
  border: 1px solid var(--lime) !important;
}
.dd-flow-node--dark .dd-flow-title { color: var(--ink); }
.dd-flow-node--dark .dd-flow-desc { color: var(--ink-2); }

/* ── Mobile nav: fit all links instead of clipping the last one ── */
@media (max-width: 560px) {
  .nav a { font-size: .64rem; letter-spacing: .06em; padding: .3rem .35rem; white-space: nowrap; }
}

/* Two-card comparisons in prose span the full text column */
.dd-section > .dd-flow-split { max-width: none; }

/* Breathing room under the fixed nav (the old back-link button used to provide it) */
.dd-page > .dd-header:first-child { margin-top: 2.5rem; }

/* ── Deep-dive pages: same type system as the home page ─────────── */
html { font-synthesis-weight: none; }

.dd-kicker, .dd-card-tag, .dd-meta-chip, .dd-toc-title, .dd-callout-title {
  font-family: var(--label) !important;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--lime);
}
.dd-kicker { font-size: .9rem; }
.dd-card-tag, .dd-callout-title { font-size: .75rem; }
.dd-meta-chip { font-size: .72rem; font-weight: 500; color: var(--ink-2); }

.dd-title { font-weight: 500; letter-spacing: -.03em; line-height: 1.05; }
.dd-subtitle { font-size: 1.125rem; }

.dd-card-title {
  font-weight: 500; letter-spacing: -.02em;
  font-size: clamp(1.35rem, 2.2vw, 1.6rem);
  line-height: 1.2;
}
.dd-card-desc { font-size: 1rem; line-height: 1.6; }

.dd-section h2 { font-weight: 500; letter-spacing: -.02em; }
.dd-section h3 { font-weight: 500; letter-spacing: -.01em; }
.dd-section p, .dd-section li { font-size: 1rem; line-height: 1.7; }
.dd-stat-num { font-family: var(--display); font-weight: 500; }
strong, b, .dd-section p strong { font-weight: 600; }

/* buttons: plain rectangles, sentence case, like the home page chips */
.dd-btn {
  font-family: var(--sans) !important;
  font-size: .875rem; font-weight: 500;
  letter-spacing: 0; text-transform: none;
  padding: .6rem 1rem; white-space: nowrap;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-2) !important;
}
.dd-btn:hover { background: var(--ink); color: var(--cream); transform: none; }
.dd-btn--primary {
  background: var(--lime); color: var(--on-lime);
  border-color: var(--lime) !important; font-weight: 600;
}
.dd-btn--primary:hover { background: var(--ink); color: var(--cream); border-color: var(--ink) !important; }

/* nav: uppercase mono links, full-brightness text, boxed on hover */
.nav-inner { background: rgb(10 10 10 / .94) !important; }
.nav a {
  font-family: var(--label) !important; font-size: .78rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink); border: 1px solid transparent !important;
}
.nav a:hover, .nav a:focus-visible { color: var(--ink); border-color: var(--ink) !important; }
.nav a.active { color: var(--lime); border-color: var(--lime) !important; }
.footer .brand { font-family: var(--display); font-weight: 500; }
@media (max-width: 560px) {
  .nav a { font-size: .66rem; letter-spacing: .04em; padding: .3rem .35rem; white-space: nowrap; }
}
@media (max-width: 560px) {
  .dd-btn { white-space: normal; max-width: 100%; }
}
