/* ============================================================
   i-am-jacob.com v2 — "THE CONSOLE"
   Design system: carbon dark, phosphor green, terminal DNA.
   Zero dependencies. Plain CSS custom properties.
   ============================================================ */

:root {
  /* surfaces */
  --bg0: #05080a;
  --bg1: #0a0f11;
  --bg2: #0f1518;
  --bg3: #141c20;
  --line: #1c2a2a;
  --line-hi: #274038;

  /* ink */
  --ink: #dff5ea;
  --dim: #8fb0a3;
  --faint: #587569;

  /* signal */
  --acc: #45ffa3;          /* phosphor */
  --acc-glow: rgba(69, 255, 163, .35);
  --acc-dim: rgba(69, 255, 163, .12);
  --amber: #ffc46b;
  --red: #ff6b6b;

  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --rad: 12px;
  --maxw: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg0);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ambient background texture */
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(1000px 500px at 80% -10%, rgba(69,255,163,.05), transparent 60%),
    radial-gradient(800px 400px at -10% 30%, rgba(69,255,163,.03), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(255,255,255,.008) 2px 4px);
  pointer-events: none;
  z-index: 0;
}

::selection { background: var(--acc); color: #04140b; }

a { color: var(--acc); text-decoration: none; }
a:hover { text-shadow: 0 0 12px var(--acc-glow); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ---------- typography ---------- */
h1, h2, h3 { font-family: var(--sans); letter-spacing: -.02em; line-height: 1.12; }
h1 { font-size: clamp(2.3rem, 6vw, 3.9rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.15rem); font-weight: 700; margin-bottom: .6em; }
h3 { font-size: 1.18rem; font-weight: 600; margin-bottom: .5em; }

p { color: var(--dim); margin-bottom: 1.1em; }
strong { color: var(--ink); }
em { color: var(--amber); font-style: normal; }

.mono { font-family: var(--mono); }
.kicker {
  font-family: var(--mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--acc);
  margin-bottom: 1.1rem;
  display: flex; align-items: center; gap: 10px;
}
.kicker::before { content: "//"; color: var(--faint); letter-spacing: 0; }

.lede { font-size: 1.16rem; color: var(--dim); max-width: 62ch; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5,8,10,.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; }

.wordmark {
  font-family: var(--mono); font-weight: 600; font-size: .95rem;
  color: var(--ink); white-space: nowrap;
}
.wordmark .path { color: var(--dim); }
.wordmark .cursor {
  display: inline-block; width: 8px; height: 1.05em;
  background: var(--acc); vertical-align: text-bottom; margin-left: 3px;
  animation: blink 1.1s steps(1) infinite;
  box-shadow: 0 0 8px var(--acc-glow);
}
@keyframes blink { 50% { opacity: 0; } }

nav.main-nav { display: flex; gap: 4px; }
nav.main-nav a {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .06em;
  color: var(--dim); padding: 7px 11px; border-radius: 8px;
  border: 1px solid transparent;
}
nav.main-nav a:hover { color: var(--acc); background: var(--acc-dim); text-shadow: none; }
nav.main-nav a[aria-current="page"] {
  color: var(--acc); background: var(--acc-dim); border-color: var(--line-hi);
}

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-hi); color: var(--acc);
  font-family: var(--mono); font-size: .8rem; padding: 6px 12px; border-radius: 8px; cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  nav.main-nav {
    display: none; position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; background: var(--bg1); border-bottom: 1px solid var(--line);
    padding: 12px 20px 18px; gap: 6px;
  }
  nav.main-nav.open { display: flex; }
  nav.main-nav a { padding: 11px 14px; font-size: .88rem; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: .85rem; font-weight: 600;
  padding: 12px 22px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line-hi); transition: all .18s ease;
}
.btn-primary {
  background: var(--acc); color: #04140b; border-color: var(--acc);
  box-shadow: 0 0 24px rgba(69,255,163,.25);
}
.btn-primary:hover { box-shadow: 0 0 42px rgba(69,255,163,.5); transform: translateY(-1px); text-shadow: none; }
.btn-ghost { color: var(--acc); background: var(--acc-dim); }
.btn-ghost:hover { background: rgba(69,255,163,.2); transform: translateY(-1px); text-shadow: none; }

/* ---------- panels & cards ---------- */
.panel {
  background: linear-gradient(180deg, var(--bg2), var(--bg1));
  border: 1px solid var(--line);
  border-radius: var(--rad);
  padding: 26px;
}

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  position: relative;
  background: linear-gradient(180deg, var(--bg2), var(--bg1));
  border: 1px solid var(--line);
  border-radius: var(--rad);
  padding: 24px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-hi);
  box-shadow: 0 12px 40px rgba(0,0,0,.45), 0 0 0 1px var(--acc-dim);
}
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--acc); }
.card p { font-size: .93rem; margin-bottom: 0; }

.card .topline {
  height: 2px; position: absolute; top: 0; left: 0; right: 0;
  background: linear-gradient(90deg, transparent, var(--acc), transparent);
  opacity: 0; transition: opacity .2s;
}
.card:hover .topline { opacity: .8; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.chip {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .05em;
  color: var(--dim); border: 1px solid var(--line); border-radius: 99px;
  padding: 3px 10px; background: rgba(255,255,255,.02);
}

.badge {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line-hi);
  color: var(--acc); background: var(--acc-dim);
}
.badge.amber { color: var(--amber); border-color: rgba(255,196,107,.3); background: rgba(255,196,107,.08); }

/* ---------- sections ---------- */
section.band { padding: 84px 0; }
section.band + section.band { border-top: 1px solid var(--line); }

.sec-head { margin-bottom: 44px; }
.sec-head p.sub { max-width: 60ch; }

/* ---------- scroll reveal (transform-only: content never invisible) ---------- */
.reveal { transform: translateY(18px); transition: transform .6s cubic-bezier(.16,1,.3,1); }
.reveal.in { transform: none; }
.reveal.d1 { transition-delay: .07s; } .reveal.d2 { transition-delay: .14s; }
.reveal.d3 { transition-delay: .21s; } .reveal.d4 { transition-delay: .28s; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001s !important; transition-duration: .001s !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 96px 0 72px; position: relative; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 .accent { color: var(--acc); text-shadow: 0 0 32px var(--acc-glow); }
.hero .type-line {
  font-family: var(--mono); color: var(--dim); min-height: 1.6em; margin: 18px 0 26px;
}
.hero .type-line .caret {
  display: inline-block; width: 9px; height: 1em; background: var(--acc);
  vertical-align: middle; animation: blink 1s steps(1) infinite;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

.stat-row { display: flex; gap: 34px; margin-top: 44px; flex-wrap: wrap; }
.stat b {
  display: block; font-family: var(--mono); font-size: 1.5rem; color: var(--acc);
  text-shadow: 0 0 18px var(--acc-glow);
}
.stat span { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }

/* cascade viz frame */
.viz-frame {
  position: relative; border: 1px solid var(--line); border-radius: var(--rad);
  background: linear-gradient(180deg, var(--bg2), var(--bg1));
  overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.viz-frame canvas { display: block; width: 100%; height: auto; }
.viz-frame .viz-label {
  position: absolute; bottom: 10px; left: 12px; z-index: 2;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .18em; color: var(--faint);
  text-transform: uppercase;
}

/* ---------- status strip ---------- */
.status-strip {
  margin-top: 26px;
  border: 1px solid var(--line); border-radius: var(--rad);
  background: var(--bg1);
  font-family: var(--mono); font-size: .74rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  overflow: hidden;
}
.status-cell {
  padding: 12px 16px; border-right: 1px solid var(--line);
  display: flex; align-items: center; gap: 9px; white-space: nowrap;
}
.status-cell:last-child { border-right: none; }
.status-cell .lbl { color: var(--faint); letter-spacing: .1em; }
.status-cell .val { color: var(--ink); }
.led {
  width: 7px; height: 7px; border-radius: 50%; background: var(--acc);
  box-shadow: 0 0 8px var(--acc-glow);
  animation: ledpulse 2.4s ease-in-out infinite;
}
@keyframes ledpulse { 50% { opacity: .45; box-shadow: 0 0 3px var(--acc-glow); } }
.status-cell.warn .led { background: var(--amber); box-shadow: 0 0 8px rgba(255,196,107,.4); }

/* ============================================================
   TERMINAL
   ============================================================ */
.term {
  background: #030604;
  border: 1px solid var(--line-hi);
  border-radius: var(--rad);
  box-shadow: 0 24px 80px rgba(0,0,0,.6), inset 0 0 60px rgba(69,255,163,.03);
  overflow: hidden;
  font-family: var(--mono);
}
.term-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg2); border-bottom: 1px solid var(--line);
  padding: 10px 14px;
}
.term-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--bg3); border: 1px solid var(--line-hi); }
.term-bar .dot.r { background: #3a1a1a; border-color: #5c2626; }
.term-bar .dot.y { background: #3a301a; border-color: #5c4d26; }
.term-bar .dot.g { background: #1a3a26; border-color: #265c3a; }
.term-bar .title {
  margin-left: 8px; font-size: .72rem; color: var(--faint); letter-spacing: .08em;
}
.term-body {
  padding: 18px 18px 8px; height: 380px; overflow-y: auto;
  font-size: .86rem; line-height: 1.55; cursor: text;
}
.term-body .t-line { white-space: pre-wrap; word-break: break-word; }
.t-cmd { color: var(--ink); }
.t-cmd .prompt { color: var(--acc); }
.t-out { color: var(--dim); }
.t-ok { color: var(--acc); }
.t-warn { color: var(--amber); }
.t-err { color: var(--red); }
.t-link { color: var(--amber); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.t-link:hover { color: var(--ink); }

.term-input-row { display: flex; align-items: center; gap: 8px; padding: 0 18px 16px; }
.term-input-row .prompt { color: var(--acc); font-size: .86rem; white-space: nowrap; }
.term-input-row input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--ink); font-family: var(--mono); font-size: .86rem; caret-color: var(--acc);
}
.term-input-row input::placeholder { color: var(--faint); }

.term-hint {
  text-align: center; font-family: var(--mono); font-size: .7rem;
  color: var(--faint); margin-top: 14px; letter-spacing: .08em;
}
.term-hint kbd {
  border: 1px solid var(--line-hi); border-bottom-width: 2px; border-radius: 5px;
  padding: 1px 6px; color: var(--dim); background: var(--bg2); font-size: .66rem;
}

/* ============================================================
   PAGE SCAFFOLDS (inner pages)
   ============================================================ */
.page-hero { padding: 76px 0 54px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-hero .crumbs {
  font-family: var(--mono); font-size: .74rem; color: var(--faint); margin-bottom: 18px;
}
.page-hero .crumbs a { color: var(--dim); }
.page-hero .crumbs a:hover { color: var(--acc); }
.page-hero p.sub { margin-top: 14px; }

.meta-row {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; align-items: center;
}
main.content { padding: 64px 0 90px; }

.prose { max-width: 74ch; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul { margin: 0 0 1.2em 1.2em; color: var(--dim); }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--acc); }
.prose code {
  font-family: var(--mono); font-size: .82em; color: var(--acc);
  background: var(--acc-dim); padding: 2px 6px; border-radius: 6px;
}
.prose pre {
  background: #030604; border: 1px solid var(--line); border-radius: 10px;
  padding: 18px; overflow-x: auto; margin-bottom: 1.3em;
}
.prose pre code { background: none; padding: 0; color: var(--dim); font-size: .8rem; }
.prose blockquote {
  border-left: 2px solid var(--acc); padding: 6px 20px; margin: 0 0 1.3em;
  color: var(--ink); background: var(--acc-dim); border-radius: 0 10px 10px 0;
}
.prose a { text-decoration: underline; text-underline-offset: 3px; }

.callout {
  border: 1px solid var(--line-hi); border-radius: var(--rad);
  background: linear-gradient(180deg, var(--bg2), var(--bg1));
  padding: 22px 24px; margin: 1.6em 0;
}
.callout .co-label {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--acc); margin-bottom: 8px;
}

/* outcome metric blocks */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 26px 0; }
.metric {
  border: 1px solid var(--line); border-radius: var(--rad); padding: 18px;
  background: var(--bg1);
}
.metric b { display: block; font-family: var(--mono); font-size: 1.45rem; color: var(--acc); }
.metric span { font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }

/* writing index rows */
.post-list { display: flex; flex-direction: column; gap: 12px; }
.post-row {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 20px; align-items: baseline;
  padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--rad);
  background: linear-gradient(180deg, var(--bg2), var(--bg1));
  transition: border-color .18s, transform .18s;
}
.post-row:hover { border-color: var(--line-hi); transform: translateX(4px); }
.post-row time { font-family: var(--mono); font-size: .72rem; color: var(--faint); }
.post-row h3 { margin: 0 0 4px; font-size: 1.06rem; }
.post-row h3 a { color: var(--ink); }
.post-row h3 a:hover { color: var(--acc); }
.post-row p { margin: 0; font-size: .88rem; }
.post-row .tag { font-family: var(--mono); font-size: .64rem; color: var(--acc); letter-spacing: .1em; }
@media (max-width: 700px) { .post-row { grid-template-columns: 1fr; gap: 6px; } }

/* about layout */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

.id-card .row {
  display: grid; grid-template-columns: 92px 1fr; gap: 12px;
  font-family: var(--mono); font-size: .84rem; padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}
.id-card .row:last-child { border-bottom: none; }
.id-card .k { color: var(--faint); }
.id-card .v { color: var(--ink); }
.id-card .v.hl { color: var(--acc); }

.value-item { display: flex; gap: 14px; margin-bottom: 16px; }
.value-item .vn { font-family: var(--mono); color: var(--acc); font-size: .8rem; padding-top: 3px; }

/* hardware spec cards */
.spec-card .spec-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;
}
.spec-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.spec-table td { padding: 8px 4px; border-bottom: 1px dashed var(--line); vertical-align: top; }
.spec-table tr:last-child td { border-bottom: none; }
.spec-table td:first-child { color: var(--faint); font-family: var(--mono); font-size: .74rem; width: 38%; padding-top: 10px; }
.spec-table td:last-child { color: var(--ink); }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-line {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border: 1px solid var(--line); border-radius: var(--rad); padding: 18px 20px;
  margin-bottom: 14px; background: var(--bg1);
}
.contact-line .cl-label { font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.contact-line .cl-value { font-family: var(--mono); font-size: .92rem; color: var(--ink); word-break: break-all; }
.copy-btn {
  background: var(--acc-dim); color: var(--acc); border: 1px solid var(--line-hi);
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  padding: 6px 12px; border-radius: 8px; cursor: pointer;
}
.copy-btn:hover { background: rgba(69,255,163,.2); }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 80px);
  background: var(--bg2); border: 1px solid var(--acc); color: var(--acc);
  font-family: var(--mono); font-size: .8rem; padding: 12px 22px; border-radius: 10px;
  box-shadow: 0 0 30px var(--acc-glow); transition: transform .25s ease; z-index: 100;
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 40px 0 48px; margin-top: 40px; }
.site-foot .wrap {
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
}
.site-foot .foot-note { font-family: var(--mono); font-size: .74rem; color: var(--faint); }
.site-foot .foot-links { display: flex; gap: 20px; }
.site-foot .foot-links a { font-family: var(--mono); font-size: .74rem; color: var(--dim); }
.site-foot .foot-links a:hover { color: var(--acc); }

/* ---------- boot overlay ---------- */
#boot {
  position: fixed; inset: 0; z-index: 200; background: #020402;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .45s ease; font-family: var(--mono);
}
#boot.done { opacity: 0; pointer-events: none; }
#boot .boot-box { width: min(560px, 88vw); font-size: .8rem; line-height: 1.7; }
#boot .boot-line { color: var(--faint); white-space: pre-wrap; }
#boot .boot-line b { color: var(--acc); font-weight: 400; }
#boot .boot-line.ok { color: var(--dim); }
#boot .boot-bar {
  margin-top: 14px; height: 3px; background: var(--bg3); border-radius: 3px; overflow: hidden;
}
#boot .boot-bar i {
  display: block; height: 100%; width: 0%;
  background: var(--acc); box-shadow: 0 0 12px var(--acc-glow);
  transition: width .3s ease;
}

/* misc */
.divider-dot { color: var(--faint); }
.backlink { font-family: var(--mono); font-size: .78rem; color: var(--dim); display: inline-flex; gap: 8px; margin-bottom: 26px; }
.backlink:hover { color: var(--acc); }
