:root {
  --bg: #f7f6f2;
  --fg: #111111;
  --muted: #5c5c5c;
  --line: #d9d6cf;
  --max: 42rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

[data-theme="dark"] {
  --bg: #111111;
  --fg: #f4f4f1;
  --muted: #a3a39b;
  --line: #2b2b2b;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
}

body {
  font-family: Inter, system-ui, sans-serif;
  font-size: 1.02rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration: none;
}

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--pad) var(--pad) 5rem;
}

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.kicker,
.theme-toggle,
.job-dates,
.job-location,
.skill-blurb,
.meta,
.section h2 {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.theme-toggle {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  color: var(--fg);
  cursor: pointer;
}

.theme-toggle:hover {
  opacity: 0.6;
}

.mark {
  display: block;
  width: 100%;
  height: 9.5rem;
  margin: 0 0 1.5rem;
}

h1 {
  margin: 0 0 0.4rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.title {
  margin: 0 0 0.4rem;
  font-size: 0.98rem;
  font-weight: 500;
}

.meta {
  margin: 0 0 1.6rem;
  text-transform: none;
  letter-spacing: 0;
}

.summary {
  margin: 0 0 2.75rem;
  font-size: 1.12rem;
  max-width: 38rem;
}

.section {
  margin: 0 0 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.section h2 {
  margin: 0 0 1.2rem;
  font-weight: 500;
}

.jobs,
.skills,
.schools,
.contact,
.job ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.job + .job,
.schools li + li {
  margin-top: 1.7rem;
}

.job-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.job h3,
.schools h3,
.skills h3 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.job-role {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
}

.job-dates,
.job-location,
.skill-blurb {
  text-transform: none;
  letter-spacing: 0;
}

.job-dates {
  white-space: nowrap;
}

.job-location {
  margin: 0.2rem 0 0.6rem;
}

.job ul li {
  position: relative;
  padding-left: 1rem;
  margin: 0.35rem 0;
}

.job ul li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.skills {
  display: grid;
  gap: 1.3rem;
}

.skill-blurb {
  margin: 0.3rem 0 0.4rem;
}

.skill-items {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.contact li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}

.contact a {
  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline;
}

.colophon {
  margin: 3.5rem 0 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--muted);
}

@media (min-width: 640px) {
  .skills {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 540px) {
  .job-head {
    flex-direction: column;
    gap: 0.2rem;
  }

  .job-dates {
    white-space: normal;
  }
}

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

@media print {
  :root,
  [data-theme="dark"] {
    --bg: #fff;
    --fg: #000;
    --muted: #444;
    --line: #ccc;
  }

  .theme-toggle,
  .mark {
    display: none;
  }

  .page {
    padding: 0;
    max-width: none;
  }
}
