/* The Digital Futurist - portfolio hub
   Palette: pure black, toned-down neon used as information (one colour per area), gold for every link and action. */

:root {
  --black: #000000;
  --ink: #e7e5ef;
  --muted: #9a9cb0;
  --rule: #23232f;
  --raise: #07070b;
  --cyan: #5fd4d9;      /* systems */
  --magenta: #c77dba;   /* gen AI and RAG */
  --violet: #9a8fe6;    /* knowledge and science */
  --gold: #d4af37;      /* links and actions */
  --gold-hi: #f0cf5a;
  --serif: "Times New Roman", Times, serif;
  --sans: "Open Sans", Arial, sans-serif;
  --measure: 68ch;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  line-height: 1.12;
  margin: 0;
  color: #f4f3f8;
}

a { color: var(--gold); text-decoration-color: rgba(212,175,55,.45); text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: 12px clamp(18px, 4vw, 48px);
  background: rgba(0,0,0,.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { border-radius: 6px; display: block; }
.brand span { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.bar nav { display: flex; gap: 22px; margin-left: auto; }
.bar nav a { text-decoration: none; color: var(--muted); font-size: .95rem; }
.bar nav a:hover { color: var(--gold); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: 12px 22px; border-radius: 999px; font-size: .98rem;
  transition: background-color .15s, color .15s;
  white-space: nowrap;
}
.btn-gold { background: var(--gold); color: #000; }
.btn-gold:hover { background: var(--gold-hi); color: #000; }
.btn-ghost { border: 1px solid var(--gold); color: var(--gold); }
.btn-ghost:hover { background: rgba(212,175,55,.1); }
.btn-small { padding: 8px 16px; font-size: .9rem; }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  padding: clamp(56px, 9vw, 120px) clamp(18px, 4vw, 48px) clamp(48px, 7vw, 88px);
  max-width: 1280px; margin: 0 auto;
  align-items: end;
}
.byline { color: var(--muted); margin: 0 0 18px; }
.hero h1 { font-size: clamp(2.6rem, 5.8vw, 5rem); letter-spacing: -.01em; max-width: 15ch; }
.intro { max-width: var(--measure); font-size: 1.12rem; color: #c9cad8; margin: 26px 0 34px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* The lane index: the one bold element. Area names set large in the serif, coloured by area, with live counts. */
.index { border-left: 1px solid var(--rule); padding-left: clamp(20px, 3vw, 40px); }
.index-title { font-size: 1.05rem; color: var(--muted); margin-bottom: 14px; }
.index ul { list-style: none; margin: 0; padding: 0; }
.index li + li { margin-top: 2px; }
.lane-link {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  width: 100%; background: none; border: 0; padding: 6px 0; cursor: pointer; text-align: left;
  font-family: var(--serif); font-style: italic; font-weight: 700;
  font-size: clamp(1.6rem, 2.7vw, 2.35rem); line-height: 1.15;
  color: var(--tone); text-decoration: none;
}
.lane-link:hover .lane-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.lane-count { font-family: var(--sans); font-style: normal; font-weight: 400; font-size: .95rem; color: var(--muted); white-space: nowrap; }
.legend { margin: 22px 0 0; color: var(--muted); font-size: .88rem; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }

.tone-cyan { --tone: var(--cyan); }
.tone-magenta { --tone: var(--magenta); }
.tone-violet { --tone: var(--violet); }
.tone-gold { --tone: var(--gold); }

/* ---------- status pills ---------- */
.pill { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1px solid; }
.pill-live { color: #7fe3a4; border-color: rgba(127,227,164,.5); }
.pill-video { color: var(--gold); border-color: rgba(212,175,55,.5); }
.pill-building { color: var(--muted); border-color: var(--rule); }

/* ---------- sections ---------- */
.block { max-width: 1280px; margin: 0 auto; padding: clamp(56px, 8vw, 104px) clamp(18px, 4vw, 48px); border-top: 1px solid var(--rule); }
.block-head { max-width: var(--measure); margin-bottom: 40px; }
.block-head h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
.block-head p { color: var(--muted); margin: 14px 0 0; }

/* ---------- automations: wide rows, video first ---------- */
.automation-list { display: grid; gap: 56px; }
.automation {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px); align-items: center;
}
.automation h3 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); margin: 10px 0 14px; }
.problem { color: #c9cad8; margin: 0 0 12px; }
.problem strong { color: var(--tone, var(--gold)); font-weight: 600; }
.summary { color: var(--muted); margin: 0 0 16px; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 18px; padding: 0; }
.stack li { font-size: .82rem; color: #c0c2d2; border: 1px solid var(--rule); border-radius: 6px; padding: 2px 9px; }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .95rem; }
.updated { color: var(--muted); font-size: .82rem; margin-top: 12px; }

/* ---------- video frames ---------- */
.frame {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; background: var(--raise);
}
.frame video, .frame iframe, .frame img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.poster {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 22px 24px; border: 0; width: 100%; text-align: left; color: var(--ink); cursor: default;
  background:
    linear-gradient(transparent 0 calc(100% - 1px), rgba(255,255,255,.035) 0) 0 0 / 100% 6px,
    radial-gradient(120% 90% at 85% 10%, color-mix(in srgb, var(--tone, var(--gold)) 22%, transparent), transparent 60%),
    var(--raise);
}
.poster .poster-title { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: clamp(1.2rem, 2vw, 1.6rem); max-width: 22ch; }
.poster .poster-note { color: var(--muted); font-size: .88rem; margin-top: 6px; }
button.poster { cursor: pointer; }
.play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 68px; height: 68px; border-radius: 50%; border: 1px solid var(--gold);
  background: rgba(0,0,0,.55); display: grid; place-items: center;
}
.play::before { content: ""; border-left: 18px solid var(--gold); border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 5px; }

/* ---------- demos ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.chip {
  font: inherit; font-size: .92rem; cursor: pointer; padding: 7px 16px; border-radius: 999px;
  background: none; color: var(--muted); border: 1px solid var(--rule);
}
.chip[aria-pressed="true"] { color: #000; background: var(--gold); border-color: var(--gold); font-weight: 600; }
.chip:hover:not([aria-pressed="true"]) { color: var(--ink); border-color: var(--muted); }

.demo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.demo {
  display: flex; flex-direction: column; padding: 24px 24px 22px;
  border: 1px solid var(--rule); border-left: 3px solid var(--tone); border-radius: 10px; background: var(--raise);
}
.demo-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.demo-lane { color: var(--tone); font-size: .88rem; font-weight: 600; }
.demo h3 { font-size: 1.45rem; margin-bottom: 12px; }
.demo .links { margin-top: auto; padding-top: 6px; }
.demo .frame { margin-bottom: 18px; }
.empty { color: var(--muted); }

/* ---------- second brain band ---------- */
.brain { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.brain h2 { font-size: clamp(2rem, 3.6vw, 3rem); color: var(--violet); }
.brain p { max-width: var(--measure); color: var(--muted); margin: 12px 0 0; }

/* ---------- PWAs: compact tiles ---------- */
.pwa-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.pwa-list a {
  display: flex; gap: 14px; align-items: center; padding: 14px 16px; text-decoration: none;
  border: 1px solid var(--rule); border-radius: 10px;
}
.pwa-list a:hover { border-color: var(--gold); }
.pwa-icon { width: 44px; height: 44px; border-radius: 10px; flex: none; display: grid; place-items: center; background: #101018; color: var(--cyan); font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 1.3rem; overflow: hidden; }
.pwa-icon img { width: 100%; height: 100%; object-fit: cover; }
.pwa-name { color: var(--ink); font-weight: 600; display: block; }
.pwa-purpose { color: var(--muted); font-size: .88rem; }

/* ---------- footer ---------- */
.foot {
  max-width: 1280px; margin: 0 auto; border-top: 1px solid var(--rule);
  padding: clamp(56px, 8vw, 96px) clamp(18px, 4vw, 48px) 48px;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px;
}
.foot h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
.foot p { color: var(--muted); max-width: 52ch; margin: 14px 0 26px; }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; align-content: start; }
.foot-note { grid-column: 1 / -1; font-size: .82rem; margin: 20px 0 0 !important; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero, .automation, .foot { grid-template-columns: 1fr; }
  .index { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 24px; }
  .bar nav { display: none; }
  .bar .btn { margin-left: auto; }
  .brand span { font-size: 1rem; }
  .bar { gap: 14px; }
}
@media (max-width: 420px) {
  .demo-grid { grid-template-columns: 1fr; }
  .foot-links { grid-template-columns: 1fr; }
}
