:root {
  --primary: #1e40af;
  --primary-deep: #0b1e4b;
  --secondary: #3b82f6;
  --accent: #15803d;
  --accent-hover: #166534;
  --ink: #0f172a;
  --muted: #475569;
  --bg-alt: #eff6ff;
  --border: #e2e8f0;
  --border-blue: #bfdbfe;
  --maxw: 1080px;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-lift: 0 12px 24px -8px rgba(30, 64, 175, .25);
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink);
  font: 16px/1.65 "Open Sans", system-ui, "Segoe UI", Roboto, sans-serif;
}
h1, h2, h3 { font-family: "Poppins", system-ui, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-family: "Poppins", sans-serif; font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.brand svg { flex: none; }
.brand span { color: var(--primary); }
.site-nav { display: flex; gap: 1.35rem; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem;
  white-space: nowrap; padding: .25rem 0; border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.site-nav a[aria-current="page"] { color: var(--primary); border-bottom-color: var(--accent); }
.site-nav a:hover { color: var(--primary); }

/* ---------- Hero (dark gradient band) ---------- */
.hero {
  background:
    radial-gradient(ellipse 80% 60% at 70% -10%, rgba(59, 130, 246, .35), transparent),
    linear-gradient(135deg, var(--primary-deep) 0%, #14307a 55%, var(--primary) 100%);
  color: #fff;
  padding: 4.5rem 0 3.5rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 75%);
}
.hero.compact { padding: 3rem 0 2.5rem; }
.hero .wrap { position: relative; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #93c5fd; margin-bottom: .75rem;
}
.hero h1 { font-size: clamp(1.85rem, 4.2vw, 3rem); line-height: 1.12; margin: 0 0 1rem; font-weight: 700; }
.hero .tagline { font-size: 1.15rem; color: #dbeafe; max-width: 46rem; margin: 0; }
.badge-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.75rem; padding: 0; list-style: none; }
.badge {
  display: inline-flex; align-items: center; gap: .45rem;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25);
  color: #eff6ff; border-radius: 999px; padding: .35rem .9rem;
  font-size: .85rem; font-weight: 600;
}
.badge svg { flex: none; color: #4ade80; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.9rem; }

/* ---------- Buttons ---------- */
.cta-button, .btn-ghost {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.6rem; border-radius: 8px; text-decoration: none;
  font-family: "Poppins", sans-serif; font-weight: 600; font-size: 1rem;
  cursor: pointer; transition: background .2s, transform .2s, box-shadow .2s;
}
.cta-button { background: var(--accent); color: #fff; box-shadow: 0 4px 14px -4px rgba(21, 128, 61, .5); }
.cta-button:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .45); }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.on-light .btn-ghost, .btn-ghost.blue { color: var(--primary); border-color: var(--border-blue); }
.on-light .btn-ghost:hover, .btn-ghost.blue:hover { border-color: var(--primary); background: var(--bg-alt); }

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; }
.section.alt { background: var(--bg-alt); }
.section h2 { font-size: 1.75rem; margin: 0 0 .5rem; }
.section-intro { color: var(--muted); max-width: 44rem; margin-top: 0; }
.section .eyebrow { color: var(--primary); }

/* ---------- Stats band ---------- */
.stats-band { background: var(--primary-deep); color: #fff; padding: 2.25rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; text-align: center; }
.stat .num { font-family: "Poppins", sans-serif; font-size: 2.2rem; font-weight: 700; color: #4ade80; line-height: 1.1; }
.stat .label { color: #bfdbfe; font-size: .9rem; font-weight: 600; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; }
.card {
  position: relative; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem 1.4rem 1.4rem; background: #fff; box-shadow: var(--shadow);
  transition: transform .25s ease-out, box-shadow .25s ease-out, border-color .25s;
  overflow: hidden;
}
.card::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0; transition: opacity .25s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); border-color: var(--border-blue); }
.card:hover::after { opacity: 1; }
.card h3 { margin: .9rem 0 .5rem; font-size: 1.12rem; }
.card ul { padding-left: 1.1rem; margin-bottom: 0; }
.card p { margin-bottom: .5rem; }
.icon-tile {
  width: 48px; height: 48px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt); color: var(--primary); border: 1px solid var(--border-blue);
}
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0; padding: 0; list-style: none; }
.chip {
  background: var(--bg-alt); color: var(--primary); border: 1px solid var(--border-blue);
  border-radius: 999px; padding: .12rem .7rem; font-size: .78rem; font-weight: 600;
}

/* ---------- Experience timeline ---------- */
.timeline { position: relative; padding-left: 1.75rem; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--border-blue); }
.job { position: relative; margin-bottom: 2.5rem; }
.job::before {
  content: ""; position: absolute; left: -1.75rem; top: .5rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--primary);
}
.job h3 { margin: 0 0 .15rem; font-size: 1.15rem; }
.job .meta { color: var(--muted); font-weight: 600; margin: 0 0 .4rem; font-size: .92rem; }
.job ul { margin-top: .4rem; }

/* ---------- Skills table ---------- */
.skills-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.skills-table th, .skills-table td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.skills-table tr:last-child th, .skills-table tr:last-child td { border-bottom: none; }
.skills-table th { white-space: nowrap; color: var(--primary); font-family: "Poppins", sans-serif; background: var(--bg-alt); }
.table-scroll { overflow-x: auto; border-radius: var(--radius); }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-deep); color: #bfdbfe; padding: 3rem 0 1.5rem; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; padding-bottom: 2rem; }
.site-footer h3 { color: #fff; font-size: 1rem; margin: 0 0 .75rem; }
.site-footer a { color: #bfdbfe; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer-bottom { border-top: 1px solid rgba(191, 219, 254, .25); padding-top: 1.25rem; font-size: .85rem; color: #93c5fd; }
.footer-brand { display: flex; align-items: center; gap: .5rem; color: #fff; font-family: "Poppins", sans-serif; font-weight: 700; font-size: 1.15rem; margin-bottom: .6rem; }

/* ---------- Reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease-out, transform .55s ease-out; }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .reveal:nth-child(2) { transition-delay: .08s; }
  .js .reveal:nth-child(3) { transition-delay: .16s; }
  .js .reveal:nth-child(4) { transition-delay: .24s; }
  .hero > .wrap > * { animation: rise .6s ease-out both; }
  .hero > .wrap > *:nth-child(2) { animation-delay: .08s; }
  .hero > .wrap > *:nth-child(3) { animation-delay: .16s; }
  .hero > .wrap > *:nth-child(4) { animation-delay: .24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } }
}

a:focus-visible, button:focus-visible { outline: 3px solid var(--secondary); outline-offset: 2px; }

.headshot { width: 168px; height: 168px; border-radius: 50%; object-fit: cover; border: 4px solid rgba(255, 255, 255, .35); }
.hero-flex { display: flex; gap: 2.5rem; align-items: center; flex-wrap: wrap; }
.hero-flex > div { flex: 1 1 26rem; }
