@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('fonts/newsreader-latin-opsz-normal.41a5ad7b.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('fonts/archivo-latin-wght-normal.ce4905c6.woff2') format('woff2'); }

:root, [data-theme="light"] {
  --paper: #E6E8E3;
  --paper-recessed: #DCDFD9;
  --ink: #14232B;
  --ink-muted: #4F5F63;
  --rule: #B6BDB7;
  --failed: #9B2F2F;
  --fixed: #1B6350;

  --font-text: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-ui: 'Archivo', 'Helvetica Neue', Arial, sans-serif;

  --text-sm: 0.9rem;
  --text-base: 1.0625rem;
  --text-md: 1.25rem;
  --text-lg: 1.5rem;
  --text-xl: 2rem;
  --text-2xl: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);

  --measure: 68ch;
  --page-max: 1040px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --side: 180px;

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-6: 1.5rem; --space-8: 2rem; --space-12: 3rem; --space-16: 4rem; --space-24: 6rem;

  color-scheme: light;
}

[data-theme="dark"] {
  --paper: #1C2124;
  --paper-recessed: #242A2E;
  --ink: #E4E7E2;
  --ink-muted: #A3ADA8;
  --rule: #3C4549;
  --failed: #E08484;
  --fixed: #62C1A5;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  min-height: 100dvh; background: var(--paper); color: var(--ink);
  font-family: var(--font-text); font-size: var(--text-base); line-height: 1.55;
  font-optical-sizing: auto; font-feature-settings: "kern", "liga";
}
body.nav-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-text); font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
p { text-wrap: pretty; max-width: var(--measure); }
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; text-decoration-color: var(--rule); }
a:hover { text-decoration-color: currentColor; }
b, strong { font-weight: 600; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

.skip-link {
  position: absolute; top: -100%; left: var(--space-4); padding: var(--space-2) var(--space-4);
  background: var(--ink); color: var(--paper); font-family: var(--font-ui); font-size: var(--text-sm);
  text-decoration: none; z-index: 1000;
}
.skip-link:focus { top: var(--space-4); }

.page { max-width: var(--page-max); margin-inline: auto; padding-inline: var(--gutter); }

.site-header { position: sticky; top: 0; z-index: 100; background: var(--paper); border-bottom: 1px solid var(--rule); }
.nav-inner {
  max-width: var(--page-max); margin-inline: auto; padding: 0 var(--gutter); height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-8);
}
.brand { font-family: var(--font-ui); font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap; }
nav.primary ul { display: flex; gap: var(--space-6); list-style: none; }
.nav-link { font-family: var(--font-ui); font-size: var(--text-sm); font-weight: 500; color: var(--ink-muted); text-decoration: none; padding: var(--space-2) 0; }
.nav-link:hover { color: var(--ink); }
.nav-link[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.nav-actions { display: flex; align-items: center; gap: var(--space-3); }
.icon-btn, .hamburger {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule); color: var(--ink-muted);
}
.icon-btn:hover, .hamburger:hover { color: var(--ink); border-color: var(--ink); }
.hamburger { display: none; flex-direction: column; gap: 5px; }
.hamburger span { display: block; width: 16px; height: 1.5px; background: currentColor; transition: transform 200ms ease, opacity 200ms ease; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.mobile-menu { display: none; position: fixed; top: 64px; left: 0; right: 0; z-index: 99; background: var(--paper); border-bottom: 1px solid var(--rule); }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: var(--space-4) var(--gutter); font-family: var(--font-ui); font-size: 1rem; text-decoration: none; border-top: 1px solid var(--rule); }
.mobile-menu-backdrop { display: none; position: fixed; inset: 64px 0 0; z-index: 98; background: var(--paper-recessed); opacity: 0.7; }
body.nav-open .mobile-menu-backdrop { display: block; }

main { padding-bottom: var(--space-24); }
.section { padding-top: var(--space-16); }
.section + .section { margin-top: var(--space-16); border-top: 1px solid var(--rule); }
.byline { font-family: var(--font-ui); font-size: var(--text-sm); color: var(--ink-muted); line-height: 1.5; margin-bottom: var(--space-6); max-width: none; }
.page-title { font-size: var(--text-2xl); margin-bottom: var(--space-6); max-width: 24ch; }
.standfirst { font-size: var(--text-md); line-height: 1.5; color: var(--ink-muted); margin-bottom: var(--space-12); }
.section-title { font-size: var(--text-lg); margin-bottom: var(--space-6); }
.prose p + p { margin-top: var(--space-4); }

.ledger { border-top: 1px solid var(--rule); margin-bottom: var(--space-8); }
.ledger-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); padding: var(--space-6) 0; border-bottom: 1px solid var(--rule); }
.ledger-row dt, .ledger-row dd { margin: 0; max-width: 48ch; font-size: var(--text-md); line-height: 1.4; }
.state { display: block; font-family: var(--font-ui); font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-2); }
.state-failed { color: var(--failed); }
.state-fixed { color: var(--fixed); }

.record { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: var(--text-sm); margin-bottom: var(--space-8); }
.record tr { border-top: 1px solid var(--rule); }
.record tr:last-child { border-bottom: 1px solid var(--rule); }
.record th { text-align: left; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; width: var(--side); padding: var(--space-3) var(--space-6) var(--space-3) 0; vertical-align: top; }
.record td { padding: var(--space-3) 0; vertical-align: top; color: var(--ink-muted); }

.orgs { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-4) var(--space-8); margin-bottom: var(--space-8); }
.orgs-label { font-family: var(--font-ui); font-size: var(--text-sm); color: var(--ink-muted); }
.org-logo {
  display: inline-block; height: 20px; background: var(--ink-muted);
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}
.logo-crowdstrike { -webkit-mask-image: url('../images/logos/crowdstrike.svg'); mask-image: url('../images/logos/crowdstrike.svg'); width: 102px; }
.logo-usbank { -webkit-mask-image: url('../images/logos/usbank.svg'); mask-image: url('../images/logos/usbank.svg'); width: 72px; }
.logo-audubon { -webkit-mask-image: url('../images/logos/audubon.png'); mask-image: url('../images/logos/audubon.png'); width: 76px; height: 24px; }
.logo-sunbelt { -webkit-mask-image: url('../images/logos/sunbelt.svg'); mask-image: url('../images/logos/sunbelt.svg'); width: 73px; height: 22px; }
.logo-cybermaxx { -webkit-mask-image: url('../images/logos/cybermaxx.png'); mask-image: url('../images/logos/cybermaxx.png'); width: 108px; height: 18px; }

.link-list { list-style: none; border-top: 1px solid var(--rule); margin-bottom: var(--space-8); }
.link-list li { border-bottom: 1px solid var(--rule); }
.link-list a { display: grid; grid-template-columns: var(--side) 1fr; gap: var(--space-6); padding: var(--space-4) 0; text-decoration: none; }
.link-list a:hover .link-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
.link-meta { font-family: var(--font-ui); font-size: var(--text-sm); color: var(--ink-muted); line-height: 1.5; }
.link-title { font-size: var(--text-md); line-height: 1.3; }

.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.action {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-6);
  border: 1px solid var(--ink); font-family: var(--font-ui); font-size: var(--text-sm); font-weight: 500; text-decoration: none;
}
.action:hover { background: var(--ink); color: var(--paper); }

.exp-layout { display: grid; grid-template-columns: var(--side) 1fr; gap: var(--space-8); align-items: start; }
.exp-rail { position: sticky; top: 80px; }
.exp-nav-list { list-style: none; font-family: var(--font-ui); font-size: var(--text-sm); }
.exp-nav-item a { display: block; padding: var(--space-2) 0 var(--space-2) var(--space-3); border-left: 1px solid var(--rule); color: var(--ink-muted); text-decoration: none; line-height: 1.4; }
.exp-nav-item a small { display: block; font-size: 0.8rem; }
.exp-nav-item a:hover { color: var(--ink); }
.exp-nav-item a.active { color: var(--ink); border-left-color: var(--ink); }
.role { padding: var(--space-8) 0; border-top: 1px solid var(--rule); }
.role:last-child { border-bottom: 1px solid var(--rule); }
.role-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-6); flex-wrap: wrap; margin-bottom: var(--space-1); }
.role-title { font-size: var(--text-lg); }
.role-when { font-family: var(--font-ui); font-size: var(--text-sm); color: var(--ink-muted); white-space: nowrap; }
.role-org { font-family: var(--font-ui); font-size: var(--text-sm); color: var(--ink-muted); margin-bottom: var(--space-4); max-width: none; }
.role-outcome { font-size: var(--text-md); line-height: 1.45; margin-bottom: var(--space-4); }
.role-bullets { list-style: disc; padding-left: 1.2em; max-width: var(--measure); display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.job-more { margin-bottom: var(--space-4); }
.job-more summary { cursor: pointer; list-style: none; display: flex; align-items: center; min-height: 44px; font-family: var(--font-ui); font-size: var(--text-sm); font-weight: 500; }
.job-more summary::-webkit-details-marker { display: none; }
.job-more summary::before { content: "+"; width: 1.2em; }
.job-more[open] summary::before { content: "\2212"; }
.job-narrative { display: flex; flex-direction: column; gap: var(--space-4); margin: var(--space-2) 0 var(--space-4); }
.job-narrative p { color: var(--ink-muted); }
.role-focus { font-family: var(--font-ui); font-size: var(--text-sm); color: var(--ink-muted); max-width: none; }

.creds { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--space-12); align-items: start; }
.cred-block + .cred-block { margin-top: var(--space-8); }
.cred-block h3 { font-family: var(--font-ui); font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-3); }
.cred-table { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: var(--text-sm); }
.cred-table tr { border-top: 1px solid var(--rule); }
.cred-table tr:last-child { border-bottom: 1px solid var(--rule); }
.cred-table th { text-align: left; font-weight: 600; white-space: nowrap; padding: var(--space-3) var(--space-4) var(--space-3) 0; vertical-align: top; }
.cred-table td { padding: var(--space-3) 0; vertical-align: top; }
.cred-table td.muted { color: var(--ink-muted); padding-left: var(--space-4); white-space: nowrap; text-align: right; }

.skill-group { display: grid; grid-template-columns: var(--side) 1fr; gap: var(--space-6); padding: var(--space-8) 0; border-top: 1px solid var(--rule); }
.skill-group:last-child { border-bottom: 1px solid var(--rule); }
.skill-group h2 { font-size: var(--text-md); }
.skill-items { font-family: var(--font-ui); font-size: var(--text-sm); line-height: 1.6; margin-bottom: var(--space-4); }
.skill-narrative p { color: var(--ink-muted); }

.pub-list { list-style: none; }
.pub { display: grid; grid-template-columns: var(--side) 1fr; gap: var(--space-6); padding: var(--space-8) 0; border-top: 1px solid var(--rule); }
.pub:last-child { border-bottom: 1px solid var(--rule); }
.pub-meta { font-family: var(--font-ui); font-size: var(--text-sm); color: var(--ink-muted); line-height: 1.5; max-width: none; }
.pub-title { font-size: var(--text-md); margin-bottom: var(--space-3); }
.pub-summary { color: var(--ink-muted); }

.contact-list { list-style: none; border-top: 1px solid var(--rule); max-width: var(--measure); }
.contact-list li { border-bottom: 1px solid var(--rule); }
.contact-list a { display: grid; grid-template-columns: var(--side) 1fr; gap: var(--space-6); padding: var(--space-4) 0; text-decoration: none; font-family: var(--font-ui); font-size: 1rem; font-weight: 600; }
.contact-how { font-weight: 400; color: var(--ink-muted); }
.contact-list a:hover .contact-how { color: var(--ink); }

.article { max-width: var(--measure); }
.article-title { font-size: var(--text-2xl); margin-bottom: var(--space-4); }
.article-meta { font-family: var(--font-ui); font-size: var(--text-sm); color: var(--ink-muted); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin-bottom: var(--space-8); max-width: none; }
.article-prose h2 { font-size: var(--text-md); margin: var(--space-12) 0 var(--space-3); }
.article-prose h2:first-child { margin-top: 0; }
.article-prose p { margin-bottom: var(--space-4); }
.article-pull { border-left: 2px solid var(--ink); padding-left: var(--space-6); margin: var(--space-8) 0; }
.article-pull p { font-size: var(--text-md); line-height: 1.4; margin-bottom: 0; }
.article-foot { border-top: 1px solid var(--rule); margin-top: var(--space-12); padding-top: var(--space-6); display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between; align-items: center; }
.article-foot p { font-family: var(--font-ui); font-size: var(--text-sm); color: var(--ink-muted); }
.article-foot .actions { margin-top: 0; }

.site-footer { border-top: 1px solid var(--rule); }
.footer-inner {
  max-width: var(--page-max); margin-inline: auto; padding: var(--space-6) var(--gutter);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4) var(--space-6);
  font-family: var(--font-ui); font-size: var(--text-sm); color: var(--ink-muted);
}
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); }
.footer-links a { text-decoration: none; padding: var(--space-2) 0; }
.footer-links a:hover { text-decoration: underline; }

.back-to-top {
  position: fixed; right: var(--space-6); bottom: var(--space-6); z-index: 200;
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink-muted);
  opacity: 0; pointer-events: none; transition: opacity 160ms ease;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { color: var(--ink); border-color: var(--ink); }

@media (max-width: 900px) {
  nav.primary { display: none; }
  .hamburger { display: inline-flex; }
  .exp-layout { grid-template-columns: 1fr; }
  .exp-rail { display: none; }
  .creds { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ledger-row, .skill-group, .pub, .link-list a, .contact-list a { grid-template-columns: 1fr; gap: var(--space-3); }
  .ledger-row dt, .ledger-row dd { font-size: var(--text-base); }
  .record th { width: auto; }
  .cred-table th, .cred-table td.muted { white-space: normal; }
  .role-head { flex-direction: column; align-items: flex-start; gap: var(--space-1); }
}
