/* Paul Bergeron — portfolio. Dark glassmorphism (matches drbee.me's original look):
   #1a202c base, blue→cyan gradient text, frosted glass cards, floating glass pill-nav, subtle motion. */

:root {
  --bg: #1a202c;
  --bg-2: #151b27;
  --fg: #e2e8f0;
  --muted: #94a3b8;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.10);
  --border-2: rgba(255, 255, 255, 0.18);
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --grad: linear-gradient(100deg, #3b82f6, #06b6d4);
  --maxw: 1080px;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
}
/* blurred gradient orbs in the background */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40rem 40rem at 15% 12%, rgba(59,130,246,0.13), transparent 60%),
    radial-gradient(38rem 38rem at 85% 20%, rgba(139,92,246,0.12), transparent 60%),
    radial-gradient(36rem 36rem at 60% 95%, rgba(6,182,212,0.10), transparent 60%);
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.gradient-text, .grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---- floating glass pill nav ---- */
.nav { position: sticky; top: 0; z-index: 30; padding: 16px 12px 4px; }
.nav .wrap {
  display: flex; align-items: center; gap: 22px;
  max-width: 760px; padding: 12px 22px;
  background: var(--glass); backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border: 1px solid var(--border); border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}
.nav .brand { font-weight: 700; font-size: 16px; color: var(--fg); margin-right: auto; }
.nav nav { display: flex; gap: 20px; }
.nav nav a { color: var(--muted); font-size: 14.5px; font-weight: 500; }
.nav nav a:hover, .nav nav a.active { color: #fff; text-decoration: none; }

/* ---- hero ---- */
.hero { padding: 84px 0 52px; }
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.05; letter-spacing: -0.03em;
  font-weight: 800; margin: 0 0 22px; max-width: 18ch;
}
.hero h1, h2.title, .eyebrow {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero .lede { font-size: clamp(1.05rem, 2.1vw, 1.28rem); color: var(--muted); max-width: 64ch; margin: 0 0 32px; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid var(--border-2); background: var(--glass-2); color: var(--fg);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); border-color: rgba(255,255,255,0.35); }
.btn.primary { background: var(--grad); color: #fff; border: none; animation: glow 3.5s ease-in-out infinite; }
.btn.primary:hover { box-shadow: 0 12px 30px rgba(59,130,246,0.45); }
@keyframes glow { 0%,100% { box-shadow: 0 0 12px rgba(59,130,246,0.35); } 50% { box-shadow: 0 0 26px rgba(6,182,212,0.55); } }

/* ---- sections ---- */
section.block { padding: 56px 0; border-top: 1px solid var(--border); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; }
h2.title { font-size: clamp(1.7rem, 3.6vw, 2.4rem); letter-spacing: -0.02em; margin: 8px 0; font-weight: 800; }
.section-lede { color: var(--muted); max-width: 64ch; margin: 0 0 28px; }

/* ---- glass card base ---- */
.card, .demo, .pillar, .col, .engine, .notice, .step {
  background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: var(--radius);
}

/* pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pillar { padding: 22px; transition: transform .2s ease, border-color .2s ease; }
.pillar:hover { transform: translateY(-3px); border-color: var(--border-2); }
.pillar h3 { margin: 0 0 6px; font-size: 16px; color: #fff; }
.pillar p { margin: 0; font-size: 14px; color: var(--muted); }
@media (max-width: 720px) { .pillars { grid-template-columns: 1fr; } }

/* cards */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }
.card { padding: 22px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,0.35); border-color: var(--border-2); }
.card .pillar-tag { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.card h3 { margin: 8px 0; font-size: 18px; letter-spacing: -0.01em; color: #fff; }
.card p.desc { margin: 0 0 12px; font-size: 14.5px; color: #cbd5e1; }
.card .metrics { font-size: 13.5px; color: #e2e8f0; background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.25); border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; background: rgba(255,255,255,0.03); }
.flag { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--grad); border-radius: 999px; padding: 2px 10px; margin-left: 8px; vertical-align: middle; }

/* ---- demos ---- */
.demo { padding: 26px; margin-bottom: 24px; }
.demo h3 { margin: 6px 0 4px; font-size: 21px; letter-spacing: -0.01em; color: #fff; }
.demo .why { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.demo .pill { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
textarea, input[type=text] {
  width: 100%; border: 1px solid var(--border-2); border-radius: 12px; padding: 12px 14px;
  font: inherit; font-size: 15px; color: var(--fg); background: rgba(0,0,0,0.25); resize: vertical;
}
textarea:focus, input:focus { outline: none; border-color: var(--cyan); }
textarea::placeholder, input::placeholder { color: #64748b; }
.controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
select { padding: 10px 12px; border: 1px solid var(--border-2); border-radius: 12px; font: inherit; background: rgba(0,0,0,0.25); color: var(--fg); }
.out { margin-top: 18px; }
.muted { color: var(--muted); font-size: 14px; }
.notice { background: rgba(251,191,36,0.10); border: 1px solid rgba(251,191,36,0.35); color: #fde68a; padding: 10px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 18px; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border-2); border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* arena */
.arena-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 760px) { .arena-grid { grid-template-columns: 1fr; } }
.col { padding: 16px; }
.col h4 { margin: 0 0 8px; font-size: 15px; color: #fff; }
.col .body { font-size: 14px; white-space: pre-wrap; max-height: 280px; overflow: auto; color: #cbd5e1; }
.scorebar { display: flex; gap: 12px; margin-top: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.win { color: var(--ok); font-weight: 700; }

/* vision + agent output */
.kv { font-size: 14px; } .kv li { margin: 3px 0; }
.preview { max-width: 280px; max-height: 220px; border-radius: 12px; border: 1px solid var(--border-2); margin-top: 10px; }
.trace { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
.step { padding: 10px 12px; margin: 8px 0; border-left: 3px solid var(--border-2); border-radius: 0 12px 12px 0; }
.step.tool { border-left-color: var(--blue); }
.step.answer { border-left-color: var(--ok); background: rgba(52,211,153,0.08); }
.step .role { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
code { background: rgba(0,0,0,0.35); padding: 2px 6px; border-radius: 6px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: #93c5fd; }

/* ---- publications ---- */
.pubs { list-style: none; padding: 0; margin: 0; }
.pub { padding: 16px 0; border-bottom: 1px solid var(--border); }
.pub .cite { font-weight: 600; color: #fff; }
.pub .title { color: #cbd5e1; }
.pub .venue { font-size: 13.5px; color: var(--muted); }

/* ---- about ---- */
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.4rem; margin-top: 1.6em; letter-spacing: -0.01em; color: #fff; }
.prose p, .prose li { color: #cbd5e1; }
.prose strong { color: #fff; }

/* ---- footer ---- */
.foot { border-top: 1px solid var(--border); margin-top: 48px; padding: 28px 0; color: var(--muted); font-size: 14px; }
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---- motion ---- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .btn.primary { animation: none; }
}

/* ===== dedicated demo pages + visualizations ===== */
.demo-page { padding-top: 40px; }
.back { display: inline-block; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.demo-title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; margin: 6px 0;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.demo-lede { color: var(--muted); max-width: 70ch; margin: 0 0 22px; font-size: 1.05rem; }

/* how-it-works + architecture sketch */
.how { margin: 8px 0 22px; }
.how h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; color: var(--cyan); margin: 0 0 10px; }
.how ol { margin: 0 0 18px; padding-left: 20px; color: #cbd5e1; font-size: 14.5px; }
.how ol li { margin: 4px 0; }
.arch { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.arch-box { background: var(--glass); border: 1px solid var(--border-2); border-radius: 12px; padding: 10px 14px;
  font-size: 13px; color: var(--fg); min-width: 96px; text-align: center; }
.arch-box small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.arch-arrow { align-self: center; color: var(--cyan); padding: 0 10px; font-size: 18px; }

/* index cards link */
.demo-card-link { text-decoration: none; }
.demo-card-link:hover { text-decoration: none; }

/* ===== Swarm orchestration graph ===== */
.swarm-graph { margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.swarm-row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; width: 100%; }
.connector { color: var(--muted); font-size: 20px; line-height: 1; }
.node { background: var(--glass); border: 1px solid var(--border-2); border-radius: 14px; padding: 12px 14px;
  min-width: 170px; max-width: 280px; transition: border-color .3s, box-shadow .3s, transform .3s; position: relative; }
.node .ntitle { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.node .nmodel { font-size: 11px; color: var(--muted); margin-top: 2px; }
.node .nsub { font-size: 12px; color: #cbd5e1; margin-top: 6px; }
.node .nout { font-size: 12.5px; color: #cbd5e1; margin-top: 8px; white-space: pre-wrap; max-height: 160px; overflow: auto; }
.node.planner { border-color: rgba(6,182,212,0.5); }
.node.judge { border-color: rgba(52,211,153,0.5); }
.node.queued { opacity: .6; }
.node.running { border-color: var(--blue); box-shadow: 0 0 0 0 rgba(59,130,246,0.5); animation: nodepulse 1.4s infinite; }
.node.done { border-color: rgba(52,211,153,0.6); }
.node.failed { border-color: rgba(248,113,113,0.6); }
@keyframes nodepulse { 0%,100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.45); } 50% { box-shadow: 0 0 0 8px rgba(59,130,246,0); } }
.statusdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.node.running .statusdot { background: var(--blue); }
.node.done .statusdot { background: var(--ok); }
.node.failed .statusdot { background: var(--bad); }

/* ===== Research trail + sources ===== */
.research-grid { display: grid; grid-template-columns: 1fr 240px; gap: 18px; margin-top: 16px; }
@media (max-width: 760px) { .research-grid { grid-template-columns: 1fr; } }
.qchip { display: inline-block; background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.3);
  border-radius: 999px; padding: 4px 12px; font-size: 12.5px; margin: 0 6px 6px 0; }
.sources-panel { background: var(--glass); border: 1px solid var(--border); border-radius: 14px; padding: 14px; height: fit-content; }
.sources-panel h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.source { font-size: 13px; color: #cbd5e1; padding: 5px 0; border-bottom: 1px solid var(--border); }
.report { background: rgba(52,211,153,0.06); border: 1px solid rgba(52,211,153,0.3); border-radius: 12px; padding: 14px 16px; margin-top: 12px; }

/* ===== bar charts (arena matrix, datafactory quality) ===== */
.bars { margin-top: 10px; }
.barrow { display: grid; grid-template-columns: 130px 1fr 36px; align-items: center; gap: 10px; margin: 7px 0; font-size: 13px; }
.barlabel { color: var(--muted); }
.bartrack { background: rgba(255,255,255,0.06); border-radius: 999px; height: 10px; overflow: hidden; }
.barfill { height: 100%; border-radius: 999px; width: 0; transition: width .8s cubic-bezier(.2,.8,.2,1); background: var(--grad); }
.barfill.a { background: linear-gradient(90deg,#3b82f6,#60a5fa); }
.barfill.b { background: linear-gradient(90deg,#06b6d4,#22d3ee); }
.barval { text-align: right; color: var(--fg); font-variant-numeric: tabular-nums; }

/* ===== confidence gauge (cross-checker) ===== */
.gauge { display: flex; align-items: center; gap: 14px; margin: 12px 0; }
.gauge .meter { flex: 1; height: 12px; background: rgba(255,255,255,0.06); border-radius: 999px; overflow: hidden; }
.gauge .meterfill { height: 100%; width: 0; transition: width .8s ease; }
.verdict-badge { font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 4px 12px; border-radius: 999px; font-size: 13px; }

/* ===== training chart ===== */
.chartwrap { margin-top: 12px; }
.legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.legend .k { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
