/* Kris McCabe personal site - shares its palette, type, and component
   language with lab.krismccabe.com deliberately, so the two sites read
   as one brand. Same navy/blue tokens, same Inter font, same header/
   hero/panel conventions. No build step - plain CSS, plain <link>. */

:root {
  --navy: #0F172A;
  --navy-mid: #1E293B;
  --accent: #2563EB;
  --accent-hv: #1D4ED8;
  --surface: #F8FAFC;
  --surface-2: #F1F5F9;
  --text: #334155;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
  /* Faint dot-grid texture, matching lab.krismccabe.com's signature
     background - the hero and tinted sections paint solid backgrounds
     over it, so it only shows through the plain surface areas. */
  background-image: radial-gradient(rgba(15,23,42,0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Scroll progress bar - thin accent line tracking read progress. */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--accent); z-index: 100; pointer-events: none;
}

/* Scroll-reveal - shared by cards, project cards, cert badges, timeline
   items. Fades/slides up as each element enters the viewport. */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .scroll-progress { display: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hv); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* Skip link - hidden until keyboard-focused, lets keyboard/screen-reader
   users jump past the header straight to the page's main content. */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: 12px 20px;
  font-weight: 700; font-size: 14px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Consistent visible keyboard focus ring across interactive elements. */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}
.site-nav a:focus-visible, .nav-inner .brand:focus-visible { outline-color: #93C5FD; outline-offset: 3px; }
.btn-ghost:focus-visible, .btn-primary:focus-visible { outline-offset: 3px; }

/* Header / nav - same pattern as lab.krismccabe.com's homepage header. */
header.site-header { background: var(--navy); padding: 0; position: relative; }
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.nav-inner .brand { color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; }
.nav-inner .brand:hover { text-decoration: none; color: #93C5FD; }
.site-nav { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.site-nav a { color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; transition: color 0.15s ease; }
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.site-nav a.current { color: #93C5FD; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; border: none; background: none; cursor: pointer; padding: 0; flex-shrink: 0;
}
.nav-toggle span { display: block; width: 100%; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 700px) {
  .nav-toggle { display: flex; }
  .nav-inner { flex-wrap: nowrap; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 20;
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: var(--navy); border-top: 1px solid rgba(255,255,255,0.08);
    padding: 12px 24px 20px; box-shadow: 0 12px 24px rgba(15,23,42,0.25);
  }
  .site-nav.open { display: flex; }
  .site-nav a { width: 100%; padding: 10px 0; }
}

/* Hero */
.hero { background: var(--navy); padding: 56px 24px 64px; position: relative; overflow: hidden; }
.hero-network { position: absolute; inset: 0; z-index: 0; }
.hero-inner { max-width: 1000px; margin: 0 auto; position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .hero-network { display: none; } }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #93C5FD; margin: 0 0 14px; }
.hero h1 { color: #fff; font-size: clamp(1.8rem, 4.2vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 16px; max-width: 760px; }
.hero p.lead { color: #94A3B8; font-size: 16px; max-width: 620px; margin: 0; line-height: 1.7; }
.hero.short { padding: 44px 24px 48px; }
.hero-cols { display: flex; align-items: center; gap: 40px; }
.hero-cols .hero-text { flex: 1 1 58%; }
.hero-cols .hero-photo { flex: 0 0 38%; max-width: 320px; }
.hero-photo img { border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.12); }
@media (max-width: 800px) {
  .hero-cols { flex-direction: column; }
  .hero-cols .hero-photo { max-width: 240px; order: -1; }
}

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; font-family: inherit;
  font-size: 14px; font-weight: 700; padding: 12px 22px; border-radius: 8px;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hv); color: #fff; text-decoration: none; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.btn-ghost:hover { border-color: #fff; text-decoration: none; color: #fff; }
.btn-ghost.on-light { color: var(--navy); border-color: var(--border); }
.btn-ghost.on-light:hover { border-color: var(--navy); color: var(--navy); }

.wrap { max-width: 1000px; margin: 0 auto; padding: 24px 20px 0; }

/* Stat strip - same floating-card pattern as the lab homepage. */
.stat-strip {
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 12px; margin: -36px auto 0; max-width: 720px;
  box-shadow: 0 12px 32px rgba(15,23,42,0.08); position: relative; z-index: 1;
}
.stat { flex: 1; text-align: center; padding: 0 12px; }
.stat-num { display: block; font-size: 26px; font-weight: 800; color: var(--navy); }
.stat-label { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }
.stat-divider { width: 1px; height: 32px; background: var(--border); flex-shrink: 0; }
@media (max-width: 640px) { .stat-strip { margin-top: 0; padding: 16px 4px; } .stat-num { font-size: 18px; } .stat-label { font-size: 9px; } }

/* Sections */
.section { padding: 64px 0; }
.section-tinted { padding: 64px 0; background: var(--surface-2); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 800; color: var(--navy); margin: 0 0 10px; letter-spacing: -0.01em; }
.section-head p { color: var(--text-muted); font-size: 15px; margin: 0; }

/* Cards grid - same visual language as the lab's tool cards. */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cards.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .cards.cols-3, .cards.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards.cols-3, .cards.cols-4 { grid-template-columns: 1fr; } }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: 0 12px 32px rgba(15,23,42,0.1); transform: translateY(-2px); }
.card-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin: 0 0 10px; }
.card h3 { font-size: 18px; font-weight: 700; color: var(--navy); margin: 0 0 10px; }
.card p { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin: 0 0 14px; }
.card-link { font-size: 13px; font-weight: 700; }

/* Testimonials */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .testimonial-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .testimonial-grid { grid-template-columns: 1fr; } }
.testimonial-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column;
}
.testimonial-quote { font-size: 14px; color: var(--text); line-height: 1.7; margin: 0 0 18px; flex: 1; }
.testimonial-quote::before { content: '\201C'; color: var(--accent); font-weight: 800; }
.testimonial-quote::after { content: '\201D'; color: var(--accent); font-weight: 800; }
.testimonial-person { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--navy-mid); color: #93C5FD; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.testimonial-name { font-size: 13.5px; font-weight: 700; color: var(--navy); margin: 0; }
.testimonial-role { font-size: 12px; color: var(--text-muted); margin: 0; }

/* CTA bar */
.cta-bar {
  background: var(--navy); border-radius: var(--radius); padding: 44px 32px;
  text-align: center; max-width: 1000px; margin: 0 auto;
}
.cta-bar h2 { color: #fff; font-size: 1.5rem; font-weight: 800; margin: 0 0 10px; }
.cta-bar p { color: #94A3B8; font-size: 15px; margin: 0 0 22px; }
.cta-bar .btn-row { justify-content: center; margin-top: 0; }

/* Footer */
footer.site-footer { text-align: center; padding: 40px 20px 48px; font-size: 13px; color: var(--text-muted); }
footer.site-footer a { font-weight: 600; }
footer.site-footer .foot-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }

/* Timeline (About page) */
.timeline-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .timeline-cols { grid-template-columns: 1fr; } }
.timeline-item { border-left: 2px solid var(--border); padding: 2px 0 24px 20px; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-role { font-weight: 700; color: var(--navy); margin: 0 0 2px; font-size: 15px; }
.timeline-company { color: var(--accent); font-weight: 600; font-size: 13px; margin: 0 0 2px; }
.timeline-dates { color: var(--text-muted); font-size: 12px; margin: 0 0 8px; }
.timeline-item p:last-child { font-size: 14px; color: var(--text); margin: 0; line-height: 1.6; }

/* Skills proficiency bars (About page) */
.skills-bars-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; margin-bottom: 44px; }
@media (max-width: 700px) { .skills-bars-grid { grid-template-columns: 1fr; } }
.skill-bar-group { margin-bottom: 22px; }
.skill-bar-group:last-child { margin-bottom: 0; }
.skill-bar-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; gap: 12px; }
.skill-bar-head span:first-child { font-size: 13.5px; font-weight: 600; color: var(--navy); }
.skill-bar-head span:last-child { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; flex-shrink: 0; }
.skill-bar-track { background: var(--surface-2); border-radius: 999px; height: 8px; overflow: hidden; }
.skill-bar-fill { background: linear-gradient(90deg, var(--accent), #60A5FA); height: 100%; width: 0; border-radius: 999px; transition: width 1.1s cubic-bezier(.22,1,.36,1); }
.skill-bar-group.in-view .skill-bar-fill { width: var(--pct); }
@media (prefers-reduced-motion: reduce) {
  .skill-bar-fill { transition: none; width: var(--pct); }
}

/* Certification badges */
.cert-group { margin-bottom: 32px; }
.cert-group-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin: 0 0 14px; }
.cert-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.cert-badge {
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 10px 16px; font-size: 13px; font-weight: 600; color: var(--navy);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.cert-badge:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37,99,235,0.15); border-color: var(--accent); }
.trailhead-banner {
  display: flex; justify-content: center; gap: 0; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 12px; margin-bottom: 48px; box-shadow: 0 12px 32px rgba(15,23,42,0.06);
}
.th-item { flex: 1; text-align: center; padding: 0 12px; border-right: 1px solid var(--border); }
.th-item:last-child { border-right: none; }
.th-number { display: block; font-size: 28px; font-weight: 800; color: var(--navy); }
.th-label { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 6px; }
@media (max-width: 700px) { .trailhead-banner { flex-wrap: wrap; } .th-item { flex: 1 1 45%; border-right: none; padding: 10px 4px; } .th-number { font-size: 20px; } }

/* Project cards (Portfolio page) */
.project-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 20px; }
.project-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.project-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.project-dates { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.project-card h3 { font-size: 18px; font-weight: 700; color: var(--navy); margin: 0 0 4px; }
.project-company { font-size: 13px; color: var(--text-muted); font-weight: 600; margin: 0 0 12px; }
.project-summary { font-size: 14px; color: var(--text); line-height: 1.7; margin: 0 0 14px; }
.project-outcomes { margin: 0; padding-left: 20px; }
.project-outcomes li { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; margin-bottom: 6px; }
.project-card .card-link { display: inline-block; margin-top: 14px; }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.project-mini { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.project-mini .project-tag { display: block; margin-bottom: 8px; }
.project-mini h4 { font-size: 15px; font-weight: 700; color: var(--navy); margin: 0 0 4px; }
.project-mini .project-company { font-size: 12px; margin-bottom: 8px; }
.project-mini p:last-child { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* Contact page */
.contact-cols { display: grid; grid-template-columns: 42% 1fr; gap: 40px; }
@media (max-width: 800px) { .contact-cols { grid-template-columns: 1fr; } }
.contact-links { list-style: none; margin: 20px 0 0; padding: 0; }
.contact-links li { margin-bottom: 12px; }
.contact-links a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.contact-links a:hover { border-color: var(--accent); text-decoration: none; }
.link-icon { font-size: 20px; }
.link-sub { display: block; font-size: 12px; color: var(--text-muted); font-weight: 400; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font-family: inherit; font-size: 14px; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form-note { font-size: 12px; color: var(--text-muted); margin-top: 12px; }
.form-success, .form-error { padding: 14px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.form-success { background: #DCFCE7; color: #166534; }
.form-error { background: #FEE2E2; color: #991B1B; }

/* Placeholder avatar (used until real photos are uploaded) */
.avatar-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-mid); border-radius: var(--radius); color: #93C5FD;
  font-size: 13px; text-align: center; aspect-ratio: 4/5; border: 1px solid rgba(255,255,255,0.12);
}
