/* Direction: a printed market report. Warm paper and ink, ruled lines instead of
   cards, sharp corners. Fraunces for display, IBM Plex Sans for reading. The one
   accent has a job: it marks what stands out from the market. */

:root {
  color-scheme: light;
  --paper: #f7f5f0;
  --ink: #141413;
  --ink-2: #57534a;
  --rule: #d9d5ca;
  --track: #ece9e1;
  --bar: #3a3833;
  --accent: #b5391a;
  --hover: #efece4;
  --caution: #f3e9cf;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;

  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 48px;
  --s6: 64px;
  --s7: 96px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #141413;
    --ink: #f2efe7;
    --ink-2: #b8b3a6;
    --rule: #34322d;
    --track: #24231f;
    --bar: #a9a498;
    --accent: #f0794f;
    --hover: #1f1e1b;
    --caution: #2e2714;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #141413;
  --ink: #f2efe7;
  --ink-2: #b8b3a6;
  --rule: #34322d;
  --track: #24231f;
  --bar: #a9a498;
  --accent: #f0794f;
  --hover: #1f1e1b;
  --caution: #2e2714;
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 var(--s5);
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 3px; transition: color 150ms ease-out, text-decoration-color 150ms ease-out; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
a:active { opacity: .7; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2 { font-family: var(--display); font-weight: 400; margin: 0; }

h1 {
  font-size: clamp(2.75rem, 7.4vw, 6rem);
  font-variation-settings: "opsz" 144;
  line-height: 1.06;
  letter-spacing: -.02em;
  max-width: 16ch;
}
.hero-role h1 { font-size: clamp(2.5rem, 6vw, 4.75rem); max-width: 20ch; }

h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-variation-settings: "opsz" 72;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Masthead */
.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: var(--s2);
  padding: var(--s3) 0 var(--s2);
  border-bottom: 3px solid var(--ink);
}
.brand {
  font: 500 1.35rem/1.2 var(--display);
  letter-spacing: -.01em;
  text-decoration: none;
}
.dateline { margin: 0; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.masthead nav { justify-self: end; font-size: .94rem; }

/* Hero: the headline's own claim is drawn as a rule beneath it */
.hero { padding-top: var(--s6); }
.meter {
  position: relative;
  height: 12px;
  margin-top: var(--s5);
  background: var(--track);
}
.meter .tick { top: -4px; height: 20px; }
.meter-fill {
  display: block;
  height: 100%;
  width: calc(var(--v) * 1%);
  background: var(--accent);
  transform-origin: left;
  animation: grow 300ms ease-out both;
}
.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s6);
  margin-top: var(--s4);
}
.lede { margin: 0; font-size: 1.25rem; line-height: 1.45; max-width: 34rem; }
.kicker { margin: 0 0 var(--s2); font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.crumb { padding-top: var(--s3); font-size: .94rem; }
.crumb + .hero { padding-top: var(--s4); }

.ledger { margin: 0; }
.ledger div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s2);
  padding: var(--s1) 0;
  border-bottom: 1px solid var(--rule);
}
.ledger div:first-child { border-top: 1px solid var(--rule); }
.ledger dt { color: var(--ink-2); font-size: .94rem; }
.ledger dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }

.section { margin-top: var(--s7); }
.section > h2 { margin-bottom: var(--s3); }

/* Role index, set like a table of contents */
.role-index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.role-index li { border-bottom: 1px solid var(--rule); }
.role-index a {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 3fr) 6.5rem;
  gap: var(--s3);
  align-items: baseline;
  padding: var(--s2) var(--s1);
  text-decoration: none;
  transition: background-color 150ms ease-out;
}
.role-index a:hover { background: var(--hover); color: inherit; }
.role-index a:hover .role-name { color: var(--accent); }
.role-index a:active { background: var(--track); }
.role-name {
  font: 400 1.6rem/1.2 var(--display);
  font-variation-settings: "opsz" 48;
  letter-spacing: -.015em;
  transition: color 150ms ease-out;
}
.role-top { font-size: .97rem; }
.role-signature { font-size: .94rem; color: var(--ink-2); }
.role-count { font-size: .94rem; color: var(--ink-2); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }

/* Wide chart beside a narrow note */
.split {
  display: grid;
  grid-template-columns: 3fr 8fr;
  gap: var(--s6);
  align-items: start;
}
.split-side { position: sticky; top: var(--s3); }
.split-side h2 { margin-bottom: var(--s2); }
.note { margin: var(--s2) 0 0; font-size: .94rem; color: var(--ink-2); max-width: 44rem; }

/* Skill chart */
.skills { width: 100%; border-collapse: collapse; table-layout: fixed; }
.skills caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skills thead th {
  padding: 0 0 var(--s1);
  border-bottom: 1px solid var(--ink);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .08em;
  line-height: 1.25;
  text-transform: uppercase;
  text-align: left;
  color: var(--ink-2);
  vertical-align: bottom;
}
.skills th:nth-child(1) { width: 24%; }
.skills th:nth-child(3), .skills th:nth-child(4) { width: 14%; padding-left: var(--s2); }
.skills tbody th, .skills td { padding: 7px 0; border-bottom: 1px solid var(--rule); }
.skills tbody th { font-weight: 500; text-align: left; padding-right: var(--s1); overflow-wrap: anywhere; }
.skills tbody tr { position: relative; transition: background-color 150ms ease-out; }
.skills tbody tr:hover, .skills tbody tr:focus-within { background: var(--hover); }
/* The link covers its whole row, so the row is one big tap target */
.skills tbody th a { text-decoration-color: var(--rule); }
.skills tbody th a::after { content: ""; position: absolute; inset: 0; }
.skills tbody th a:focus-visible { outline: none; }
.skills tbody th a:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; }
.skills tbody tr:hover th a { color: var(--accent); }
.skills tbody tr:active { background: var(--track); }

.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.value { font-weight: 500; }
.muted { color: var(--ink-2); }
.gap { display: block; font-size: .78rem; font-weight: 600; line-height: 1.2; color: var(--accent); white-space: nowrap; }

.bar-cell { position: relative; }
.track { display: block; position: relative; height: 14px; background: var(--track); }
.bar {
  display: block;
  height: 100%;
  width: calc(var(--v) * 1%);
  min-width: 1px;
  background: var(--bar);
  transform-origin: left;
  animation: grow 300ms ease-out both;
}
.is-high .bar { background: var(--accent); }
.tick {
  position: absolute;
  top: -3px;
  left: calc(var(--v) * 1%);
  width: 2px;
  height: 20px;
  margin-left: -1px;
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--paper);
}

@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Counts behind each bar, on hover or keyboard focus */
.tip {
  display: none;
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: calc(100% - 4px);
  padding: 4px var(--s1);
  background: var(--ink);
  color: var(--paper);
  font-size: .8rem;
  line-height: 1.35;
  white-space: nowrap;
}
.skills tr:hover .tip, .skills tr:focus-within .tip { display: block; }

.legend { list-style: none; margin: 0; padding: 0; font-size: .9rem; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: var(--s1); padding: 4px 0; }
.key { flex: none; display: inline-block; width: 18px; height: 12px; }
.key-bar { background: var(--bar); }
.key-high { background: var(--accent); }
.key-tick { position: relative; }
.key-tick::before { content: ""; position: absolute; left: 8px; top: -2px; width: 2px; height: 16px; background: var(--ink); }

/* What sets a role apart */
.signature {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s4);
  border-top: 1px solid var(--ink);
}
.signature li { padding-top: var(--s2); }
.signature a { display: block; text-decoration: none; }
.signature a:hover { color: inherit; }
.signature a:hover .sig-skill { color: var(--accent); }
.sig-gap {
  display: block;
  font: 300 clamp(3rem, 6vw, 4.75rem)/1 var(--display);
  font-variation-settings: "opsz" 144;
  letter-spacing: -.02em;
  color: var(--accent);
}
.sig-skill { display: block; margin-top: var(--s1); font-size: 1.15rem; font-weight: 600; }
.sig-detail { display: block; font-size: .9rem; color: var(--ink-2); }

/* Links to open postings, ruled like everything else */
.jobs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.jobs li { border-bottom: 1px solid var(--rule); }
.jobs a {
  display: block;
  padding: 12px var(--s1);
  text-decoration: none;
  transition: background-color 150ms ease-out;
}
.jobs a:hover { background: var(--hover); color: inherit; }
.jobs a:hover .job-title { color: var(--accent); }
.jobs a:active { background: var(--track); }
.job-title { display: block; font-weight: 500; overflow-wrap: anywhere; transition: color 150ms ease-out; }
.job-meta { display: block; margin-top: 2px; font-size: .9rem; color: var(--ink-2); overflow-wrap: anywhere; }
.more-jobs { margin-top: var(--s1); }
.more-jobs .jobs { border-top: 0; }
.more-jobs summary { cursor: pointer; padding: var(--s1) 0; font-weight: 500; }
.more-jobs summary:hover { color: var(--accent); }

.all-skills { margin-top: var(--s3); }
.all-skills summary { cursor: pointer; padding: var(--s1) 0; font-weight: 500; }
.all-skills summary:hover { color: var(--accent); }
.table-scroll { overflow-x: auto; margin-top: var(--s1); }
.plain { width: 100%; border-collapse: collapse; font-size: .92rem; }
.plain th, .plain td { padding: 5px var(--s2) 5px 0; border-bottom: 1px solid var(--rule); text-align: left; font-weight: 400; white-space: nowrap; }
.plain thead th { color: var(--ink-2); font-size: .72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }

.caution {
  margin: var(--s5) 0 0;
  padding: var(--s2) var(--s3);
  background: var(--caution);
  border-left: 3px solid var(--accent);
}

.role-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); }
.role-links a { display: inline-block; padding: 4px 0; }

/* Long-form page */
.prose { max-width: 42rem; padding-top: var(--s6); }
.prose h1 { font-size: clamp(2.75rem, 6vw, 4.5rem); }
.prose .lede { margin-top: var(--s3); }
.prose h2 { margin: var(--s6) 0 var(--s2); }
.prose p, .prose li { max-width: 68ch; }
.prose ul { padding-left: 1.1rem; }
.prose li { margin-bottom: var(--s2); }
.company-list { color: var(--ink-2); }

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s1) var(--s4);
  margin-top: var(--s7);
  padding: var(--s3) 0 var(--s5);
  border-top: 3px solid var(--ink);
  font-size: .9rem;
  color: var(--ink-2);
}
footer p { margin: 0; }
footer a + a { margin-left: var(--s2); }

@media (max-width: 960px) {
  body { padding: 0 var(--s3); }
  .split { grid-template-columns: 1fr; gap: var(--s3); }
  .split-side { position: static; }
  .role-index a { grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--s2); }
  .role-top, .role-signature { grid-column: 1 / -1; }
  .role-count { grid-row: 1; grid-column: 2; }
  .signature { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { padding: 0 var(--s2); font-size: 16px; }
  .masthead { grid-template-columns: 1fr auto; padding-top: var(--s2); }
  .dateline { grid-column: 1 / -1; grid-row: 2; }
  .masthead nav a { display: inline-block; padding: 12px 0; margin: -12px 0; }
  .brand { display: inline-block; padding: 8px 0; margin: -8px 0; }
  .crumb { padding-top: 12px; }
  .crumb a { display: inline-block; padding: 12px 0; }
  .crumb + .hero { padding-top: var(--s2); }
  .hero { padding-top: var(--s5); }
  .meter { margin-top: var(--s4); }
  .hero-foot { grid-template-columns: 1fr; gap: var(--s4); }
  .lede { font-size: 1.1rem; }
  .section { margin-top: var(--s6); }
  .role-index a { padding: 12px 0; }
  .skills th:nth-child(1) { width: 31%; }
  .skills th:nth-child(3), .skills th:nth-child(4) { width: 21%; padding-left: 4px; }
  .skills thead th { font-size: .66rem; letter-spacing: .05em; }
  .tip { white-space: normal; width: 200px; }
  /* Shorter chart on phones; "See all" still has every skill */
  .skills tbody tr:nth-child(n+11) { display: none; }
  .skills tbody th, .skills td { padding-top: 11px; padding-bottom: 11px; }
  .jobs a { padding-left: 0; padding-right: 0; }
  .all-skills summary, .more-jobs summary { padding: 12px 0; }
  .plain th a { display: inline-block; padding: 8px 0; }
  .role-links a { padding: 10px 0; }
  footer a { display: inline-block; padding: 12px 0; }
}

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