/* =========================================================
   Travis Bollenbach — AI Developer & Architect
   Shared stylesheet | Clean & professional light theme
   ========================================================= */

:root {
  /* Palette */
  --navy:        #0f172a;
  --navy-soft:   #1e293b;
  --slate:       #334155;
  --muted:       #64748b;
  --muted-light: #94a3b8;
  --line:        #e2e8f0;
  --line-soft:   #eef2f7;
  --bg:          #ffffff;
  --bg-alt:      #f8fafc;
  --bg-tint:     #f1f5f9;
  --accent:      #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #dbeafe;
  --teal:        #0d9488;
  --teal-soft:   #ccfbf1;
  --white:       #ffffff;

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --maxw: 1080px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, .07), 0 2px 4px -2px rgba(15, 23, 42, .05);
  --shadow-lg: 0 20px 40px -12px rgba(15, 23, 42, .18);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--slate);
  background: var(--bg);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 { color: var(--navy); line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p { margin-bottom: 1rem; }
strong { color: var(--navy-soft); font-weight: 600; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.section { padding: 72px 0; }
.section-sm { padding: 48px 0; }
.bg-alt { background: var(--bg-alt); }
.bg-navy { background: var(--navy); color: #cbd5e1; }
.bg-navy h1, .bg-navy h2, .bg-navy h3 { color: #fff; }
.center { text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.lead { font-size: 1.2rem; color: var(--slate); }
.muted { color: var(--muted); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--navy); font-size: 1.05rem; letter-spacing: -.02em; }
.brand:hover { color: var(--navy); }
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .95rem;
}
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  color: var(--slate); font-weight: 500; font-size: .92rem;
  padding: 8px 11px; border-radius: 8px; transition: all .15s ease;
}
.nav-links a:hover { color: var(--navy); background: var(--bg-tint); }
.nav-links a.active { color: var(--accent); background: var(--accent-soft); }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 42px; height: 42px; border-radius: 8px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy); margin: 5px auto; transition: .25s; border-radius: 2px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 940px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px 16px 20px; box-shadow: var(--shadow-md);
    max-height: 0; overflow: hidden; padding-top: 0; padding-bottom: 0;
    transition: max-height .3s ease, padding .3s ease;
  }
  .nav-links.open { max-height: 640px; padding-top: 12px; padding-bottom: 20px; }
  .nav-links a { padding: 12px 14px; font-size: 1rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(37,99,235,.10), transparent 60%),
    radial-gradient(800px 400px at 5% 10%, rgba(13,148,136,.08), transparent 55%),
    var(--bg);
  padding: 92px 0 80px;
  border-bottom: 1px solid var(--line);
}
.hero h1 { margin-bottom: 20px; }
.hero .lead { max-width: 640px; margin-bottom: 28px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: .96rem; padding: 12px 22px;
  border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  transition: all .18s ease;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted-light); color: var(--navy); background: var(--bg-alt); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #dbe3ee; }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card .icon {
  width: 44px; height: 44px; border-radius: 11px; margin-bottom: 16px;
  display: grid; place-items: center; font-size: 1.3rem;
  background: var(--accent-soft); color: var(--accent);
}
.card .icon.teal { background: var(--teal-soft); color: var(--teal); }

/* Project cards */
.project {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease;
}
.project:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.project .kicker { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.project h3 { margin: 6px 0 4px; }
.project .plain { color: var(--slate); margin: 12px 0; }
.project .tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.tag {
  font-size: .78rem; font-weight: 500; color: var(--slate);
  background: var(--bg-tint); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 999px;
}
.tag.accent { background: var(--accent-soft); border-color: #c7dbfe; color: var(--accent-dark); }

/* ---------- Feature / analogy blocks ---------- */
.analogy {
  border-left: 4px solid var(--accent); background: var(--bg-alt);
  padding: 18px 22px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 22px 0;
}
.analogy .label { font-weight: 700; color: var(--accent); font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.analogy p:last-child { margin-bottom: 0; }

.callout {
  background: var(--navy); color: #cbd5e1; border-radius: var(--radius);
  padding: 32px; margin: 8px 0;
}
.callout h3 { color: #fff; margin-bottom: 8px; }
.callout p:last-child { margin-bottom: 0; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 24px 24px 78px; box-shadow: var(--shadow-sm);
}
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 22px; top: 24px;
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 1.05rem;
}
.step h3 { margin-bottom: 6px; }
.step p:last-child { margin-bottom: 0; }

/* ---------- Lists ---------- */
.check-list { list-style: none; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 32px; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--teal); font-weight: 800;
  background: var(--teal-soft); width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center; font-size: .8rem;
}
.plain-list { list-style: none; display: grid; gap: 14px; }
.plain-list li { padding-left: 20px; position: relative; }
.plain-list li::before { content: "—"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 620px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; padding: 20px 12px; }
.stat .num { font-size: 2.4rem; font-weight: 800; color: var(--navy); letter-spacing: -.03em; }
.stat .num span { background: linear-gradient(135deg, var(--accent), var(--teal)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat .label { font-size: .9rem; color: var(--muted); margin-top: 2px; }

/* ---------- Definition tables ---------- */
.def-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .96rem; }
.def-table th, .def-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.def-table th { color: var(--navy); font-weight: 700; background: var(--bg-alt); }
.def-table td:first-child { font-weight: 600; color: var(--navy-soft); white-space: nowrap; }
.def-table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table-wrap .def-table { margin: 0; }

/* ---------- Page header ---------- */
.page-head {
  background:
    radial-gradient(900px 380px at 90% -20%, rgba(37,99,235,.09), transparent 60%),
    var(--bg-alt);
  padding: 66px 0 54px; border-bottom: 1px solid var(--line);
}
.page-head .lead { max-width: 680px; }

/* ---------- Prose spacing ---------- */
.prose > h2 { margin-top: 44px; margin-bottom: 14px; }
.prose > h3 { margin-top: 30px; margin-bottom: 10px; }
.prose > p, .prose > ul, .prose > ol { margin-bottom: 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 8px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, #12213f 100%);
  color: #cbd5e1; text-align: center; padding: 64px 0; position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 80% 0%, rgba(37,99,235,.25), transparent 60%);
  pointer-events: none;
}
.cta-band h2 { color: #fff; position: relative; }
.cta-band p { position: relative; max-width: 560px; margin: 12px auto 26px; }
.cta-band .btn-row { position: relative; justify-content: center; }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #94a3b8; padding: 52px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 26px; } }
.site-footer h4 { color: #fff; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer a { color: #cbd5e1; display: block; padding: 4px 0; font-size: .94rem; }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid #1e293b; margin-top: 36px; padding-top: 22px; font-size: .85rem; color: #64748b; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--line); margin: 40px 0; border: 0; }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  font-size: .9rem; font-weight: 500; color: var(--navy-soft);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  box-shadow: var(--shadow-sm);
}
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
