/* ============================================================
   Jesse McCann — personal / resume site
   Clean, typography-led, zero-build. No JS required to read it.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg:        #ffffff;
  --surface:   #fafafa;
  --text:      #0b0b0c;
  --muted:     #5f6368;
  --faint:     #8a8f98;
  --line:      #e8e8e6;
  --line-soft: #f0f0ee;
  --accent:    #4338ca;
  --accent-soft:#eef0ff;
  --shadow:    0 1px 2px rgba(0,0,0,.04), 0 8px 30px rgba(0,0,0,.04);

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 960px;
  --gutter: 24px;
}

html[data-theme="dark"] {
  --bg:        #0b0b0c;
  --surface:   #141416;
  --text:      #f2f2f0;
  --muted:     #a3a3a8;
  --faint:     #7c7c83;
  --line:      #26262a;
  --line-soft: #1c1c20;
  --accent:    #a5b4fc;
  --accent-soft:#1b1b2e;
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 8px 30px rgba(0,0,0,.35);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg:        #0b0b0c;
    --surface:   #141416;
    --text:      #f2f2f0;
    --muted:     #a3a3a8;
    --faint:     #7c7c83;
    --line:      #26262a;
    --line-soft: #1c1c20;
    --accent:    #a5b4fc;
    --accent-soft:#1b1b2e;
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 8px 30px rgba(0,0,0,.35);
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "cv02","cv03","cv04","cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

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

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--text); color: var(--bg);
  padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

strong { font-weight: 600; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { font-weight: 600; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { font-size: 14.5px; color: var(--muted); transition: color .15s ease; }
.nav-links a:hover { color: var(--text); }
.theme {
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 8px; cursor: pointer; transition: color .15s ease, border-color .15s ease;
}
.theme:hover { color: var(--text); border-color: var(--faint); }
.sun { display: none; }
html[data-theme="dark"] .sun, html[data-theme="light"] .moon { display: none; }
html[data-theme="dark"] .moon { display: none; }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 11vw, 128px) var(--gutter) clamp(36px, 6vw, 64px); max-width: var(--wrap); }

.eyebrow {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 18px;
}

.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.9rem, 9vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0 0 26px;
  text-wrap: balance;
}

.lead {
  font-size: clamp(1.1rem, 2.4vw, 1.32rem);
  line-height: 1.55;
  color: var(--text);
  max-width: 40ch;
  margin: 0 0 26px;
  text-wrap: pretty;
}

.roles {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 32px;
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; font-size: 15px; font-weight: 500;
  border: 1px solid var(--line); color: var(--text); background: var(--bg);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--faint); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover { opacity: 0.9; }
.btn svg { flex: none; }

.meta { font-size: 14px; color: var(--faint); margin: 0; }

/* ---------- Stats ---------- */
.stats { border-block: 1px solid var(--line); background: var(--surface); }
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px; padding-block: 0;
}
.stat { padding: 30px 26px 30px 0; border-left: 1px solid var(--line); padding-left: 26px; }
.stat:first-child { border-left: 0; padding-left: 0; }
.num {
  display: block; font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem); line-height: 1; letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.lbl { display: block; font-size: 13.5px; line-height: 1.45; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 9vw, 104px) var(--gutter) 0; }
.section > .eyebrow { margin-bottom: 14px; }
.section h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.7rem, 4vw, 2.35rem); line-height: 1.12;
  letter-spacing: -0.02em; margin: 0 0 40px; max-width: 22ch;
  text-wrap: balance;
}

/* ---------- Impact cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card {
  border: 1px solid var(--line); border-radius: 14px; padding: 26px 26px 24px;
  background: var(--bg); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.card:hover { border-color: var(--faint); box-shadow: var(--shadow); transform: translateY(-2px); }
.card .tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 12px;
}
.card h3 { font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; margin: 0 0 10px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

/* ---------- Experience ---------- */
.timeline { display: grid; gap: 52px; }
.job header { margin-bottom: 14px; }
.job h3 { font-size: 1.18rem; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 4px; line-height: 1.3; }
.job .at { color: var(--muted); font-weight: 500; }
.job .when { font-family: var(--mono); font-size: 12.5px; color: var(--faint); margin: 0; letter-spacing: 0.01em; }
.job .ctx { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.job ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.job li { position: relative; padding-left: 22px; font-size: 15.5px; line-height: 1.6; color: var(--text); }
.job li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .55;
}
.job li strong { font-weight: 600; }

/* ---------- Skills ---------- */
.skills { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.skills > div {
  display: grid; grid-template-columns: minmax(160px, 210px) 1fr; gap: 24px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.skills dt {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); padding-top: 3px;
}
.skills dd { margin: 0; font-size: 15.5px; line-height: 1.6; }

/* ---------- Quotes ---------- */
.quotes { display: grid; gap: 18px; }
.quote {
  margin: 0; padding: 26px 28px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--surface);
}
.quote blockquote {
  margin: 0 0 16px; font-family: var(--serif); font-size: clamp(1.08rem, 2.4vw, 1.28rem);
  line-height: 1.5; letter-spacing: -0.01em; text-wrap: pretty;
}
.quote figcaption { font-size: 13.5px; color: var(--muted); font-family: var(--mono); letter-spacing: 0.02em; }
.note { margin: 22px 0 0; font-size: 14px; color: var(--faint); }

/* ---------- Writing ---------- */
.article {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px;
  padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: opacity .15s ease;
}
.article:hover { opacity: .7; }
.article-title { font-size: 1.08rem; font-weight: 600; letter-spacing: -0.01em; }
.article-meta { font-family: var(--mono); font-size: 12.5px; color: var(--faint); margin-left: auto; }

/* ---------- Footer ---------- */
.footer { margin-top: clamp(72px, 12vw, 132px); border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
  gap: 28px; padding-top: 56px; padding-bottom: 40px;
}
.footer-h { font-family: var(--serif); font-weight: 500; font-size: clamp(1.6rem, 3.6vw, 2.1rem); letter-spacing: -0.02em; margin: 0 0 8px; }
.footer-p { color: var(--muted); font-size: 15px; margin: 0; max-width: 42ch; }
.footer-links { display: grid; gap: 8px; font-size: 15px; }
.footer-links a { color: var(--muted); transition: color .15s ease; }
.footer-links a:hover { color: var(--accent); }
.footer-base {
  display: flex; justify-content: space-between; gap: 16px;
  padding-top: 20px; padding-bottom: 32px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--faint);
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 0; padding-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); padding-left: 22px; }
  .cards { grid-template-columns: 1fr; }
  .skills > div { grid-template-columns: 1fr; gap: 8px; }
  .article-meta { margin-left: 0; }
}

@media (max-width: 420px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat { border-left: 0 !important; padding-left: 0 !important; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
}

/* ---------- Print: clean, one-ish page PDF ---------- */
@media print {
  :root { --bg:#fff; --text:#000; --muted:#333; --faint:#555; --line:#ccc; --surface:#fff; }
  html[data-theme="dark"] { --bg:#fff; --text:#000; --muted:#333; --faint:#555; --line:#ccc; --surface:#fff; }
  .nav, .theme, .cta, .skip, .footer-links, .note, #writing { display: none !important; }
  body { font-size: 10.5pt; line-height: 1.4; }
  .hero { padding: 0 0 18pt; max-width: none; }
  .display { font-size: 30pt; }
  .lead { max-width: none; font-size: 11pt; }
  .stats { border-color: #ccc; }
  .stat, .card, .quote { break-inside: avoid; }
  .section { padding-top: 18pt; max-width: none; }
  .section h2 { font-size: 15pt; margin-bottom: 12pt; }
  .cards { grid-template-columns: 1fr 1fr; gap: 8pt; }
  .card { border-color: #ddd; padding: 10pt; }
  .card p, .job ul { font-size: 9.5pt; }
  .job, .quote { break-inside: avoid; page-break-inside: avoid; }
  .timeline { gap: 16pt; }
  a { text-decoration: none; }
}
