/* Jacob Flax — Kansas plains theme */
:root {
  --cream: #faf5e9;
  --paper: #fffdf7;
  --wheat: #d9a441;
  --wheat-deep: #a8741a;
  --wheat-soft: #f3e2b8;
  --sky: #3f7ea6;
  --sky-deep: #24526f;
  --sky-soft: #dcebf3;
  --soil: #3b2f22;
  --ink: #2c261d;
  --muted: #6b6152;
  --line: #e4d9c0;
  --ok: #4f7a3a;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1040px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--sky-deep); text-underline-offset: 3px; }
a:hover { color: #7d5510; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--soil);
  line-height: 1.2;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--soil); color: #fff; padding: 10px 16px; z-index: 10;
}
.skip:focus { left: 10px; top: 10px; }

.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Header */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 24px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 1.25rem; font-weight: 700;
  color: var(--soil); text-decoration: none;
}
.brand svg { width: 30px; height: 30px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav a {
  display: block; padding: 7px 12px; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-size: 0.95rem;
}
.nav a:hover { background: var(--wheat-soft); color: var(--soil); }
.nav a[aria-current="page"] { background: var(--soil); color: var(--cream); }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #bcdcec 0%, #e6eedd 48%, #f6e2a8 78%, #e9bf5d 100%);
}
.hero .wrap { position: relative; z-index: 2; padding-top: 72px; padding-bottom: 150px; }
.hero p.lead { font-size: 1.25rem; max-width: 34em; color: var(--soil); }
.eyebrow {
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sky-deep); font-weight: 700; margin-bottom: 0.8em;
}
.hero::after {
  content: ""; position: absolute; right: 14%; bottom: 34px; width: 96px; height: 96px;
  border-radius: 50%; background: #fff3c9; opacity: 0.9; z-index: 0;
}
.hero-art { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 150px; z-index: 1; }

.page-head {
  background: linear-gradient(180deg, var(--sky-soft), var(--cream));
  border-bottom: 1px solid var(--line);
}
.page-head .wrap { padding-top: 48px; padding-bottom: 32px; }
.page-head p:not(.eyebrow):not(.note):not(.print-only) { max-width: 40em; color: var(--muted); font-size: 1.1rem; margin: 0; }

/* Buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4em; }
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 8px;
  font: inherit; font-weight: 600; line-height: 1.4; cursor: pointer;
  text-decoration: none; border: 2px solid var(--soil);
  background: var(--soil); color: var(--cream);
}
.btn:hover { background: #8a5e12; border-color: #8a5e12; color: #fff; }
.btn.ghost { background: transparent; color: var(--soil); }
.btn.ghost:hover { background: var(--soil); color: var(--cream); border-color: var(--soil); }

/* Sections */
section { padding: 56px 0; }
section.alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-intro { max-width: 42em; color: var(--muted); }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 22px; border-top: 5px solid var(--wheat);
}
section.alt .card { background: var(--cream); }
.card.sky { border-top-color: var(--sky); }
.card.soil { border-top-color: var(--soil); }
.card p:last-child { margin-bottom: 0; }
.grid > :only-child { max-width: 440px; }
.card .more { font-weight: 600; }

.tag {
  display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  background: var(--wheat-soft); color: var(--soil); margin-bottom: 10px;
}
.tag.sky { background: var(--sky-soft); color: var(--sky-deep); }
.tag.done { background: #dfeacf; color: #2f5220; }

/* Placeholder note: things Jacob still needs to fill in */
.todo {
  border: 2px dashed var(--wheat-deep); background: #fff8e1; color: var(--soil);
  border-radius: 8px; padding: 10px 14px; font-size: 0.92rem; margin: 0 0 1em;
}
.todo::before { content: "To fill in: "; font-weight: 700; }

/* Timeline (résumé) */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--wheat); }
.timeline > li { position: relative; padding: 0 0 28px 26px; }
.timeline > li::before {
  content: ""; position: absolute; left: -9px; top: 6px; width: 15px; height: 15px;
  border-radius: 50%; background: var(--paper); border: 3px solid var(--wheat-deep);
}
.timeline .when { font-size: 0.85rem; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.timeline h3 { margin: 2px 0 2px; }
.timeline .where { color: var(--sky-deep); font-weight: 600; margin-bottom: 0.4em; }
.timeline ul { margin: 0.3em 0 0; padding-left: 1.2em; }

.cert {
  display: grid; gap: 20px; grid-template-columns: auto 1fr; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-left: 6px solid var(--ok);
  border-radius: 12px; padding: 22px;
}
.cert svg { width: 64px; height: 64px; }
.cert p { margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { background: var(--sky-soft); color: var(--sky-deep); border-radius: 999px; padding: 6px 14px; font-size: 0.92rem; font-weight: 600; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table-wrap:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
table { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); }
caption { text-align: left; font-weight: 700; padding: 0 0 8px; font-family: var(--serif); font-size: 1.1rem; color: var(--soil); }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
thead th { background: var(--wheat-soft); color: var(--soil); font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot tr:last-child td, tfoot tr:last-child th { border-bottom: 0; }
tfoot td, tfoot th { font-weight: 700; background: var(--cream); }

/* Baby steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li {
  display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px;
}
.steps .n {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--serif); font-size: 1.4rem; font-weight: 700;
  background: var(--wheat-soft); color: var(--soil); border: 2px solid var(--wheat);
}
.steps li.done .n { background: #dfeacf; border-color: var(--ok); color: #2f5220; }
.steps p { margin: 0; }

.progress { background: var(--wheat-soft); border-radius: 999px; height: 22px; overflow: hidden; border: 1px solid var(--line); }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--wheat), var(--wheat-deep)); border-radius: 999px; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--muted); margin-top: 6px; }

.note { font-size: 0.9rem; color: var(--muted); }
blockquote {
  margin: 0; padding: 18px 22px; border-left: 5px solid var(--sky);
  background: var(--sky-soft); border-radius: 0 10px 10px 0; font-family: var(--serif); font-size: 1.1rem; color: var(--sky-deep);
}

/* Contact / footer */
.contact { background: var(--soil); color: var(--cream); }
.contact h2 { color: var(--wheat-soft); }
.contact p { color: #e9dfcb; max-width: 40em; }
.contact .btn { background: var(--wheat); border-color: var(--wheat); color: var(--soil); }
.contact a:focus-visible { outline-color: #fff; }
.print-only { display: none; }
.contact .btn:hover { background: #fff; border-color: #fff; color: var(--soil); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 1.2em 0 0; }
.socials a {
  display: inline-block; padding: 8px 16px; border-radius: 999px; text-decoration: none;
  border: 1px solid #8a7a62; color: var(--cream); font-weight: 600; font-size: 0.95rem;
}
.socials a:hover { background: var(--cream); color: var(--soil); }
.contact .todo { background: transparent; color: var(--wheat-soft); border-color: var(--wheat); max-width: 40em; margin-top: 1em; }

.site-footer { background: #2a2118; color: #b9ad97; font-size: 0.9rem; }
.site-footer .wrap { padding-top: 18px; padding-bottom: 18px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.site-footer a { color: var(--wheat-soft); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero .wrap { padding-top: 48px; padding-bottom: 120px; }
  .cert { grid-template-columns: 1fr; }
  section { padding: 40px 0; }
}
@media (max-width: 820px) { .site-header { position: static; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media print {
  .site-header, .contact, .site-footer, .btn-row, .todo { display: none; }
  body { background: #fff; }
  .print-only { display: block; font-weight: 600; color: #000; margin-top: 0.5em; }
  section { padding: 18px 0; }
  .timeline > li, .cert, .card { break-inside: avoid; }
}
