/* ============================================================
   Alex Behm — AI Portfolio
   Design system: Slate Research (matches Earnings Call reports)
   ============================================================ */

:root {
  --black: #050505;
  --ink: #111827;
  --ink-2: #1f2937;
  --muted: #5f6b7a;
  --muted-2: #9ba5b3;
  --light: #f4f5f7;
  --line: #d8dde5;
  --line-dark: #2b2f36;
  --green: #76b900;
  --green-dark: #3f8500;
  --green-soft: #edf8df;
  --green-glow: rgba(118, 185, 0, 0.18);
  --blue: #0f62fe;
  --amber: #b7791f;
  --white: #ffffff;
  --surface: #0b0d10;
  --surface-2: #111418;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 12px 40px rgba(0,0,0,.18);
  --shadow-sm: 0 4px 16px rgba(0,0,0,.08);
  --font: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1120px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #fafbfc;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container { width: min(var(--max), calc(100% - 2.5rem)); margin: 0 auto; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(5,5,5,.92);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--green);
  color: white;
}
.nav-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  display: flex; align-items: center; gap: .65rem;
  font-weight: 700; letter-spacing: -.02em;
  min-width: 0;
}
.brand-mark {
  display: block;
  width: auto;
  height: 36px;
  flex-shrink: 0;
  object-fit: contain;
  /* Optical lift so the mark sits with the wordmark on the dark bar */
  transform: translateY(1px);
}
.brand small {
  display: block; font-size: 10px; font-weight: 600;
  color: var(--green); letter-spacing: .12em; text-transform: uppercase;
}
.brand > span:last-child {
  line-height: 1.15;
  color: #f3f5f7;
}
.nav-links { display: flex; align-items: center; gap: 1.1rem; font-size: 13.5px; color: #c8ced8; }
.nav-links a:hover { color: white; }
.nav-cta {
  color: #e8edf2 !important; font-weight: 600;
  padding: .35rem .15rem; font-size: 13.5px;
  border-bottom: 1px solid transparent;
}
.nav-cta:hover { color: var(--green) !important; border-bottom-color: var(--green); }
.nav-toggle {
  display: none; background: transparent; border: 1px solid #333; color: white;
  border-radius: 8px; padding: .4rem .6rem;
}

/* ---------- HERO (report masthead language) ---------- */
.hero {
  background:
    radial-gradient(ellipse 80% 60% at 80% -10%, rgba(118,185,0,.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 20%, rgba(15,98,254,.10), transparent 50%),
    linear-gradient(180deg, #050505 0%, #0d1014 70%, #111418 100%);
  color: white;
  padding: 4.2rem 0 3.2rem;
  border-bottom: 4px solid var(--green);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(118,185,0,.5), transparent);
}
.eyebrow {
  color: var(--green); text-transform: uppercase; letter-spacing: .14em;
  font-size: 11px; font-weight: 700; margin-bottom: .85rem;
}
.hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  line-height: 1.08; letter-spacing: -.03em; margin: 0 0 1rem;
  max-width: 16ch;
}
.hero-lead {
  color: #c8ced8; font-size: 1.05rem; max-width: 54ch; margin: 0 0 1.6rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2rem; }
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  border-radius: 999px; padding: .7rem 1.15rem; font-weight: 700; font-size: 13.5px;
  border: 1px solid transparent; transition: .15s ease;
}
.btn-primary { background: var(--green); color: #0b1200; }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: white; border-color: rgba(255,255,255,.18);
}
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line-dark); border: 1px solid var(--line-dark);
  border-radius: 12px; overflow: hidden;
}
.stat { background: var(--surface-2); padding: .95rem 1rem; min-width: 0; }
.stat-label {
  display: block;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
}
.stat-value {
  display: block; margin-top: .45rem; font-size: 1.15rem; font-weight: 700; color: white;
  line-height: 1.25;
}
.stat-value span { color: var(--green); }
@media (max-width: 900px) {
  .stat-strip { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .stat-strip { grid-template-columns: 1fr; }
}

/* ---------- SECTIONS ---------- */
section { padding: 3.4rem 0; }
.section-head {
  display: flex; justify-content: space-between; align-items: end; gap: 1rem;
  margin-bottom: 1.4rem;
}
.section-head h2 {
  margin: 0; font-size: 1.55rem; letter-spacing: -.02em;
}
.section-head p { margin: .35rem 0 0; color: var(--muted); max-width: 52ch; }
.kicker {
  color: var(--green-dark); font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: .35rem;
}

/* ---------- CARDS ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.card {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #c5dd9a;
}
.card-body { padding: 1.15rem 1.2rem 1.25rem; }
.card-top {
  display: flex; justify-content: space-between; align-items: start; gap: .75rem;
  margin-bottom: .55rem;
}
.pill {
  display: inline-flex; align-items: center; gap: .3rem;
  border: 1px solid var(--green); color: var(--green-dark);
  background: var(--green-soft); border-radius: 999px;
  padding: .18rem .55rem; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
}
.pill.amber { border-color: #e2c58a; color: var(--amber); background: #fff8e6; }
.pill.blue { border-color: #a8c3ff; color: var(--blue); background: #edf3ff; }
.card h3 { margin: 0 0 .4rem; font-size: 1.12rem; letter-spacing: -.015em; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card-meta {
  display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem;
}
.tag {
  font-size: 11px; color: var(--ink-2); background: var(--light);
  border: 1px solid var(--line); border-radius: 999px; padding: .2rem .55rem;
}
.card-link {
  display: inline-flex; margin-top: 1rem; color: var(--green-dark);
  font-weight: 700; font-size: 13.5px;
}
.card-link:hover { text-decoration: underline; }

/* Featured project band */
.featured {
  background: linear-gradient(180deg, #0a0c0f, #12151a);
  color: white; border-top: 1px solid #1d2229; border-bottom: 1px solid #1d2229;
}
.featured .kicker { color: var(--green); }
.featured .section-head p { color: #aab2bd; }
.feature-layout {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 1.4rem; align-items: stretch;
}
.feature-panel {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 1.25rem;
}
.feature-panel h3 { margin: 0 0 .55rem; font-size: 1.35rem; }
.feature-panel p { color: #c8ced8; margin: 0 0 .9rem; }
.checklist { list-style: none; padding: 0; margin: 0 0 1rem; }
.checklist li {
  position: relative; padding: .35rem 0 .35rem 1.25rem; color: #d5dae2; font-size: 14px;
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .65rem;
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}
.metric-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: .5rem;
}
.metric {
  background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px; padding: .7rem .75rem;
}
.metric b { display: block; font-size: 1.05rem; color: white; }
.metric span { color: var(--muted-2); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }

/* Interactive chart panel */
.chart-shell {
  background: white; border-radius: 14px; border: 1px solid rgba(255,255,255,.08);
  overflow: hidden; min-height: 360px; display: flex; flex-direction: column;
}
.chart-toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem;
  padding: .75rem .9rem; background: #0f1318; color: white; border-bottom: 2px solid var(--green);
}
.chart-toolbar strong { font-size: 13px; }
.seg {
  display: inline-flex; background: #1a1f27; border-radius: 999px; padding: 3px; gap: 2px;
}
.seg button {
  border: 0; background: transparent; color: #aab2bd;
  border-radius: 999px; padding: .35rem .7rem; font-size: 12px; font-weight: 600;
}
.seg button.active { background: var(--green); color: #0b1200; }
.chart-body { padding: .85rem 1rem 1rem; background: #fbfcfd; flex: 1; }
.chart-body canvas { width: 100% !important; max-height: 280px; }
.chart-note { color: var(--muted); font-size: 12px; margin-top: .55rem; }

/* Engine compare */
.compare {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .85rem;
}
.engine {
  border: 1px solid var(--line); border-radius: 12px; background: white;
  padding: 1rem; position: relative; overflow: hidden;
}
.engine::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
}
.engine.qwen::before { background: var(--green-dark); }
.engine.gpt::before { background: var(--blue); }
.engine.fable::before { background: var(--amber); }
.engine h4 { margin: 0 0 .2rem; }
.engine .price { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; }
.engine .sub { color: var(--muted); font-size: 12.5px; margin-bottom: .7rem; }
.bar {
  height: 8px; background: #eef1f5; border-radius: 999px; overflow: hidden; margin: .35rem 0 .55rem;
}
.bar > i { display: block; height: 100%; border-radius: 999px; }
.engine dl { margin: 0; display: grid; gap: .35rem; }
.engine dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.engine dd { margin: 0; font-weight: 700; font-size: 13.5px; }

/* About / skills */
.skills {
  display: flex; flex-wrap: wrap; gap: .45rem;
}
.skill {
  background: white; border: 1px solid var(--line); border-radius: 999px;
  padding: .4rem .75rem; font-size: 12.5px; font-weight: 600;
}
.about-panel {
  background: white; border: 1px solid var(--line); border-radius: 14px;
  padding: 1.3rem 1.4rem; box-shadow: var(--shadow-sm);
}
.about-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}
.about-points li {
  position: relative;
  padding: 0 0 0 1rem;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.about-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-dark);
}

/* Timeline */
.timeline { border-left: 2px solid var(--line); margin-left: .4rem; padding-left: 1.1rem; }
.tl-item { position: relative; margin-bottom: 1.1rem; }
.tl-item::before {
  content: ""; position: absolute; left: -1.42rem; top: .35rem;
  width: 10px; height: 10px; border-radius: 50%; background: var(--green);
  border: 2px solid white; box-shadow: 0 0 0 1px var(--line);
}
.tl-item h4 { margin: 0 0 .15rem; font-size: 14.5px; }
.tl-item .when { color: var(--muted); font-size: 12px; margin-bottom: .25rem; }
.tl-item p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* Contact */
.contact-band {
  background: linear-gradient(180deg, #050505, #10141a);
  color: white; border-top: 4px solid var(--green);
}
.contact-band p { color: #c8ced8; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }

/* Newsletter subscribe (light sections) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.subscribe-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
  margin-top: 1rem;
  max-width: 36rem;
}
.subscribe-input {
  flex: 1 1 14rem;
  min-width: 12rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .72rem 1.05rem;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
}
.subscribe-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}
.subscribe-form .btn { border: 1px solid transparent; }
.btn-ghost-ink {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .7rem 1.15rem;
  font-weight: 700;
  font-size: 13.5px;
}
.btn-ghost-ink:hover {
  border-color: var(--green);
  color: var(--green-dark);
}
.subscribe-status {
  margin: .65rem 0 0;
  min-height: 1.25em;
  font-size: 13.5px;
  color: var(--muted);
  max-width: 46ch;
}
.subscribe-status.is-ok { color: var(--green-dark); }
.subscribe-status.is-err { color: #9b1c1c; }

/* Footer */
.footer {
  background: #050505; color: #8b939e; padding: 1.1rem 0 1.4rem; font-size: 12px;
  border-top: 1px solid #1a1f26;
}
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer a:hover { color: var(--green); }

/* Project page extras */
.report-mast {
  background: var(--black); color: white; padding: 2.4rem 0 1.6rem;
  border-bottom: 4px solid var(--green);
}
.report-mast h1 { margin: .2rem 0 .5rem; font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -.02em; }
.report-mast .sector { color: #c8ced8; max-width: 62ch; }
.breadcrumb { color: #9ba5b3; font-size: 12.5px; margin-bottom: .6rem; }
.breadcrumb a { color: var(--green); }
.page-content { padding: 2rem 0 3rem; }
.prose { max-width: 72ch; }
.prose h2 { margin: 1.6rem 0 .55rem; font-size: 1.25rem; border-bottom: 1px solid var(--line); padding-bottom: .3rem; }
.prose p { color: var(--ink-2); }
.figure {
  background: white; border: 1px solid var(--line); border-radius: 12px;
  padding: .75rem; margin: 1rem 0 1.4rem; box-shadow: var(--shadow-sm);
}
.figure img { border-radius: 8px; width: 100%; }
.figure figcaption { color: var(--muted); font-size: 12px; margin-top: .55rem; text-align: center; }
.download-row { display: flex; flex-wrap: wrap; gap: .55rem; margin: .8rem 0 1.2rem; }
.dl {
  border: 1px solid var(--line); background: white; border-radius: 999px;
  padding: .45rem .8rem; font-size: 12.5px; font-weight: 700;
}
.dl:hover { border-color: var(--green); color: var(--green-dark); }

/* Reveal animations */
.reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 900px) {
  .grid-3, .feature-layout, .compare, .grid-2, .stat-strip, .metric-row { grid-template-columns: 1fr 1fr; }
  .hero h1 { max-width: none; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: #0a0c0f; padding: 1rem 1.25rem 1.2rem; border-bottom: 1px solid #222;
  }
  .nav-toggle { display: inline-flex; }
  .grid-3, .feature-layout, .compare, .grid-2, .stat-strip, .metric-row { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: start; }
  .chart-toolbar { flex-direction: column; align-items: start; }
}


/* ---------- Research publication figures (static) ---------- */
.pub-figure {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: 0;
}
.pub-figure-head {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem;
  padding: .65rem .9rem;
  background: #0f1318;
  color: #fff;
  border-bottom: 2px solid var(--green);
  font-size: 12.5px;
}
.pub-figure-head span { color: #9ba5b3; font-size: 11.5px; }
.pub-figure img { width: 100%; display: block; background: #fff; }
.pub-figure figcaption {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  padding: .65rem .9rem .8rem;
  margin: 0;
  border-top: 1px solid var(--line);
  background: #fafbfc;
}

/* Solid research panels (not glass / not faux-interactive) */
.panel-solid,
.feature-panel.solid {
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px;
  padding: 1.15rem 1.2rem;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.panel-solid h3,
.feature-panel.solid h3 { color: var(--ink); }
.panel-solid p,
.panel-solid .checklist li,
.about-panel .checklist li,
.feature-panel.solid p,
.feature-panel.solid .checklist li { color: var(--ink-2); }
.feature-panel.solid .metric {
  background: var(--light);
  border: 1px solid var(--line);
}
.feature-panel.solid .metric b { color: var(--ink); }
.feature-panel.solid .metric span { color: var(--muted); }
.feature-panel.solid .btn-ghost {
  color: var(--ink);
  border-color: var(--line);
}
.feature-panel.solid .btn-ghost:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.solid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: .35rem 0 0;
}
.solid-table th {
  background: #111827;
  color: #fff;
  text-align: left;
  padding: .45rem .55rem;
  font-size: 11px;
  letter-spacing: .03em;
}
.solid-table td {
  border-bottom: 1px solid var(--line);
  padding: .5rem .55rem;
  vertical-align: top;
  background: #fff;
}
.solid-table tr:nth-child(even) td { background: #fafbfc; }

/* Engine row inside dark featured band */
.featured .compare .engine {
  box-shadow: none;
}
.featured .compare .engine h4,
.featured .compare .engine .price,
.featured .compare .engine dd {
  color: var(--ink);
}
.featured .compare .engine .sub,
.featured .compare .engine dt {
  color: var(--muted);
}

/* Architecture one-liner + memo samples (BDE) */
.pipeline-line {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
  background: var(--light);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .7rem .8rem;
  margin: 0 0 .9rem;
}
.memo-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.memo-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .65rem .9rem;
  background: #0f1318;
  color: #fff;
  border-bottom: 2px solid var(--green);
  font-size: 12.5px;
}
.memo-head span { color: #9ba5b3; font-size: 11.5px; }
.memo-body {
  margin: 0;
  padding: .9rem 1rem 1rem;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-2);
  white-space: pre-wrap;
  background: #fafbfc;
}

.contact-band.quiet {
  background: #111418;
  border-top: 1px solid #1d2229;
}
.contact-band.quiet h2 { font-weight: 650; }
