/* ============================================================================
   Cale Corbett, calecorbett.com
   Fonts and palette matched to the Control Alt Recover design system.
   Shared across index.html, background.html, people.html.
   ============================================================================ */

:root {
  --ink: #0a1f5c;
  --ink-body: #14213d;
  --ink-soft: #2a3f7a;
  --paper: #ffffff;
  --card: #f4f6fb;
  --line: #c9d2e6;
  --line-soft: #e4e9f4;
  --accent: #15308a;
  --accent-top: #1e40af;
  --accent-soft: #eef1f9;
  --muted: #6b7595;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink-body);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Inter Tight', -apple-system, sans-serif; font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; color: var(--ink); }
a { color: inherit; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 28px; }
[id] { scroll-margin-top: 68px; }
.section { padding: 84px 0; border-top: 1px solid var(--line-soft); }
.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
}

/* Sticky top bar (shared) */
.topbar { position: sticky; top: 0; z-index: 100; background: var(--ink); border-bottom: 1px solid #22315f; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18); }
.topbar .wrap { padding-top: 0; padding-bottom: 0; }

/* Nav (shared) */
.nav { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; font-size: 14px; }
.nav .name { font-family: 'Inter Tight', sans-serif; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; color: inherit; }
.nav .links a { margin-left: 26px; color: #aab4d6; text-decoration: none; transition: color .2s; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.nav .links a:hover, .nav .links a.is-active { color: #fff; }

/* Hamburger toggle (hidden on desktop, shown on mobile) */
.menu-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 34px; height: 34px; padding: 6px; background: none; border: 0; cursor: pointer; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: #eaeefb; border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.topbar.open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.topbar.open .menu-toggle span:nth-child(2) { opacity: 0; }
.topbar.open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.topbar.scrolled { box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28); }

/* Scroll reveal (progressive enhancement, only active when JS adds js-reveal) */
html.js-reveal .reveal { opacity: 0; transform: translateY(16px); }
html.js-reveal .reveal.is-visible { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }
@media (prefers-reduced-motion: reduce) { html.js-reveal .reveal { opacity: 1; transform: none; transition: none; } }

/* Dark header, tall on home, short on interior pages */
.hero { background: var(--ink); color: #eaeefb; padding: 60px 0 92px; }
.pagehead { background: var(--ink); color: #eaeefb; padding: 52px 0 60px; }
.hero h1 { font-size: clamp(38px, 6vw, 66px); color: #fff; max-width: 15ch; letter-spacing: -0.035em; }
.pagehead h1 { font-size: clamp(34px, 5vw, 52px); color: #fff; letter-spacing: -0.035em; margin-top: 6px; }
.hero .lead, .pagehead .sub { font-family: 'Source Serif 4', Georgia, serif; font-style: italic; color: #c3cbe6; line-height: 1.45; }
.hero .lead { font-size: clamp(18px, 2.3vw, 23px); max-width: 58ch; margin-top: 26px; }
.pagehead .sub { font-size: clamp(17px, 2vw, 21px); max-width: 58ch; margin-top: 18px; }
.hero .role { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: #8b96bd; margin-top: 34px; }

/* Buttons */
.cta-row { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 24px; border-radius: 4px; text-decoration: none;
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; transition: background .2s, border-color .2s;
  font-family: 'Inter Tight', sans-serif;
}
.btn-primary { background: var(--accent-top); color: #fff; }
.btn-primary:hover { background: #2a52c9; }
.btn-ghost { border: 1px solid #33437a; color: #dfe4f4; }
.btn-ghost:hover { border-color: #6b7595; }

/* Stat band */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: var(--ink); color: #eaeefb; }
.stats .stat { padding: 46px 28px; border-left: 1px solid #22315f; }
.stats .stat:first-child { border-left: none; }
.stats .num { font-family: 'Inter Tight', sans-serif; font-weight: 700; font-size: clamp(30px, 4vw, 44px); color: #fff; letter-spacing: -0.03em; }
.stats .lbl { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: #8b96bd; margin-top: 10px; }

/* Prose summary */
.summary p { font-size: clamp(18px, 2.3vw, 23px); max-width: 62ch; margin-bottom: 22px; color: var(--ink-soft); }
.summary p.opener { font-family: 'Source Serif 4', Georgia, serif; font-style: italic; color: var(--ink); font-weight: 400; }
.summary strong { color: var(--ink); font-weight: 600; }
.lead-serif { font-family: 'Source Serif 4', Georgia, serif; font-style: italic; }
.pull { font-family: 'Source Serif 4', Georgia, serif; font-style: italic; font-weight: 400; font-size: clamp(22px, 3vw, 30px); color: var(--ink); letter-spacing: -0.01em; line-height: 1.3; margin-top: 34px; padding-left: 18px; border-left: 3px solid var(--accent); max-width: 28ch; }

/* Pillars */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 12px; }
.pillar { background: var(--card); border: 1px solid var(--line-soft); border-radius: 6px; padding: 30px; }
.pillar h3 { font-size: 20px; margin-bottom: 12px; letter-spacing: -0.02em; }
.pillar p { font-size: 15px; color: var(--ink-soft); }

/* Outcomes */
.outcomes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 8px; }
.outcome { background: var(--card); border: 1px solid var(--line-soft); border-radius: 6px; padding: 26px 28px; }
.outcome .big { font-family: 'Inter Tight', sans-serif; font-weight: 700; font-size: 30px; color: var(--accent); letter-spacing: -0.03em; }
.outcome .txt { font-size: 15px; color: var(--ink-soft); margin-top: 6px; }
.outcome .co { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-top: 14px; }

/* Experience (home) */
.role-item { padding: 30px 0; border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: 200px 1fr; gap: 32px; }
.role-item:first-of-type { border-top: none; }
.role-meta .company { font-family: 'Inter Tight', sans-serif; font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.role-meta .dates { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.role-meta .loc { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.role-body .title { font-weight: 600; margin-bottom: 12px; font-size: 16px; color: var(--ink); }
.role-body ul { list-style: none; }
.role-body li { position: relative; padding-left: 20px; margin-bottom: 10px; font-size: 15px; color: var(--ink-soft); }
.role-body li::before { content: ""; position: absolute; left: 0; top: 10px; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }

/* Timeline (background) */
.timeline { margin-top: 8px; }
.tl-item { display: grid; grid-template-columns: 150px 1fr; gap: 28px; padding: 22px 0; border-top: 1px solid var(--line-soft); }
.tl-item:first-child { border-top: none; }
.tl-when { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.tl-role { font-weight: 700; color: var(--ink); font-size: 17px; letter-spacing: -0.02em; }
.tl-org { color: var(--ink-soft); font-size: 15px; margin-top: 2px; }
.tl-note { color: var(--ink-soft); font-size: 14px; margin-top: 8px; max-width: 60ch; }

/* Two column detail */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.detail h3 { font-size: 22px; margin-bottom: 18px; letter-spacing: -0.025em; }
.detail p { color: var(--ink-soft); margin-bottom: 14px; font-size: 15px; }
.cert-list { list-style: none; }
.cert-list li { padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; display: flex; justify-content: space-between; align-items: baseline; }
.cert-list li span { font-family: 'JetBrains Mono', monospace; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; }

/* People */
.people { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 8px; }
.person { background: var(--card); border: 1px solid var(--line-soft); border-radius: 6px; padding: 28px; }
.person .who2 { display: flex; align-items: center; gap: 14px; }
.person h3 { font-size: 20px; letter-spacing: -0.02em; }
.person .mono-role { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-top: 5px; }
.person p { font-size: 15px; color: var(--ink-soft); margin-top: 14px; }
.person a.link { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); text-decoration: none; display: inline-block; margin-top: 16px; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.person a.link:hover { border-color: var(--accent); }
.avatar-lg { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 16px; flex-shrink: 0; }

/* What's usually broken */
.broken { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 44px; margin-top: 12px; }
.broken .item { padding: 22px 0; border-top: 1px solid var(--line-soft); }
.broken .item h4 { font-family: 'Inter Tight', sans-serif; font-weight: 700; font-size: 16px; color: var(--ink); letter-spacing: -0.015em; margin-bottom: 6px; }
.broken .item p { font-size: 14px; color: var(--ink-soft); max-width: 46ch; }
.focus-line { margin-top: 34px; font-size: 16px; color: var(--ink-soft); max-width: 62ch; }
.focus-line strong { color: var(--ink); font-weight: 600; }
@media (max-width: 720px) { .broken { grid-template-columns: 1fr; gap: 0; } }

/* Results (engagement snapshots) */
.results-list { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 8px; }
.result-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: 6px; padding: 28px 30px; }
.result-card .r-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
.result-card .r-num { font-family: 'Inter Tight', sans-serif; font-weight: 700; font-size: 34px; color: var(--accent); letter-spacing: -0.03em; line-height: 1; }
.result-card .r-co { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.result-card .r-row { margin-bottom: 14px; }
.result-card .r-row:last-child { margin-bottom: 0; }
.result-card .r-lab { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 5px; }
.result-card .r-txt { font-size: 15px; color: var(--ink-soft); max-width: 70ch; }
.refline { margin-top: 30px; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* Contact */
.contact { background: var(--ink); color: #eaeefb; }
.contact h2 { font-size: clamp(28px, 4vw, 44px); color: #fff; max-width: 18ch; margin-bottom: 16px; letter-spacing: -0.035em; }
.contact .lead { font-family: 'Source Serif 4', Georgia, serif; font-style: italic; color: #c3cbe6; max-width: 52ch; margin-bottom: 30px; font-size: 18px; }
.contact .links a { font-family: 'JetBrains Mono', monospace; color: #c3cbe6; text-decoration: none; margin-right: 26px; font-size: 13px; letter-spacing: 0.06em; border-bottom: 1px solid #33437a; padding-bottom: 2px; }
.contact .links a:hover { color: #fff; border-color: var(--accent-top); }
.cform { max-width: 580px; margin-top: 28px; }
.cform-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cfield { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.cfield label { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: #8b96bd; }
.cfield input, .cfield textarea { background: rgba(255, 255, 255, 0.04); border: 1px solid #33437a; border-radius: 4px; padding: 11px 13px; color: #eaeefb; font-family: 'Inter Tight', sans-serif; font-size: 15px; }
.cfield input:focus, .cfield textarea:focus { outline: none; border-color: var(--accent-top); box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.28); }
.cfield textarea { resize: vertical; }
.cform button { margin-top: 4px; border: 0; cursor: pointer; }
.cform-status { display: none; margin-top: 14px; font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.04em; color: #9fd3a9; }
.cform-status.is-err { color: #f2a7a0; }
.cform .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cform .cf-turnstile { margin: 4px 0 18px; }
.cform button:disabled { opacity: 0.6; cursor: default; }
footer { padding: 30px 0; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); text-align: center; border-top: 1px solid var(--line-soft); }

@media (max-width: 720px) {
  .section { padding: 60px 0; }
  .stats, .grid3, .outcomes, .split, .people { grid-template-columns: 1fr; }
  .stats .stat { border-left: none; border-top: 1px solid #22315f; }
  .stats .stat:first-child { border-top: none; }
  .role-item, .tl-item { grid-template-columns: 1fr; gap: 12px; }
  .menu-toggle { display: flex; }
  .nav .links {
    position: absolute; left: 0; right: 0; top: 100%;
    display: none; flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--ink); border-bottom: 1px solid #22315f;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.3); padding: 4px 28px 16px;
  }
  .topbar.open .nav .links { display: flex; }
  .nav .links a { margin-left: 0; width: 100%; padding: 13px 2px; font-size: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
  .cform-row { grid-template-columns: 1fr; }
}
