@font-face { font-family: "Libertinus Serif"; src: url("/fonts/LibertinusSerif-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libertinus Serif"; src: url("/fonts/LibertinusSerif-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Libertinus Serif"; src: url("/fonts/LibertinusSerif-Semibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Libertinus Serif"; src: url("/fonts/LibertinusSerif-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

/* The same tokens as resume-kit/lib/theme.typ, so the site, resume and letters read as one set. */
:root {
  --paper: #ffffff;
  --ink: #16191f;
  --navy: #1d3f66;
  --muted: #5d6470;
  --rule: #c9d1db;
  --wash: #eef3f8;
  --todo: #c2410c;
  --serif: "Libertinus Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d141d; --ink: #e7ebf0; --navy: #a9c3e3; --muted: #98a2ad; --rule: #2b3847; --wash: #142030; --todo: #fb923c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d141d; --ink: #e7ebf0; --navy: #a9c3e3; --muted: #98a2ad; --rule: #2b3847; --wash: #142030; --todo: #fb923c;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  font-feature-settings: "cv11", "ss01";
  text-rendering: optimizeLegibility;
}
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; border-radius: 2px; }

.page { max-width: 46rem; margin: 0 auto; padding: 3.5rem 1.5rem 4rem; }

/* Header: the resume's lockup, name left and contact right over a navy rule. */
.masthead { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem 2rem; }
.masthead h1 {
  margin: 0;
  font: 700 3.25rem/1 var(--serif);
  letter-spacing: -0.01em;
}
.masthead .headline { margin: 0.55rem 0 0; color: var(--navy); font-weight: 500; font-size: 1.02rem; }
.contact { margin: 0; text-align: right; color: var(--muted); font-size: 0.9rem; line-height: 1.65; }
.contact a { color: var(--muted); }
.contact a:hover { color: var(--navy); }
.masthead + .rule { height: 0; border: 0; border-top: 2px solid var(--navy); margin: 1.1rem 0 0; }

/* The one big move: the opening line set in the serif, like the first line of a letter. */
.lede {
  margin: 2.75rem 0 1.25rem;
  font: 400 1.9rem/1.28 var(--serif);
  max-width: 34ch;
}
.intro { margin: 0; max-width: 62ch; }

section { margin-top: 3.25rem; }
h2 {
  margin: 0 0 1.1rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--rule);
  font: 700 1.45rem/1.2 var(--serif);
  color: var(--navy);
}

.entry + .entry { margin-top: 1.9rem; }
.entry-head { display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1.5rem; align-items: baseline; }
.org { font-weight: 600; }
.role { font: italic 400 1.12rem/1.3 var(--serif); }
.when { color: var(--muted); font-size: 0.9rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.entry-head .org::after { content: ""; display: inline-block; width: 0.6rem; }

ul { margin: 0.6rem 0 0; padding: 0; list-style: none; }
li { position: relative; padding-left: 1.15rem; max-width: 64ch; }
li + li { margin-top: 0.5rem; }
li::before {
  content: ""; position: absolute; left: 0; top: 0.68em;
  width: 0.4rem; height: 0.4rem; background: var(--muted);
}

.writing { margin: 0; padding: 1.1rem 1.25rem; background: var(--wash); border-left: 3px solid var(--navy); }
.writing p { margin: 0; }
.writing .title { font: 600 1.2rem/1.3 var(--serif); }
.writing .status { color: var(--muted); font-size: 0.92rem; margin-top: 0.25rem; }

.projects li::before { background: var(--navy); }
.project-name { font-weight: 600; }
.meta { color: var(--muted); font-size: 0.9rem; }

.outside p { margin: 0; max-width: 62ch; }

footer { margin-top: 3.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.9rem; }

.tbd { color: var(--todo); font-weight: 500; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .page { padding: 2.25rem 1rem 3rem; }
  .masthead { grid-template-columns: 1fr; }
  .masthead h1 { font-size: 2.6rem; }
  .contact { text-align: left; }
  .lede { font-size: 1.55rem; margin-top: 2rem; }
  .entry-head { grid-template-columns: 1fr; }
  .entry-head .role { display: block; }
  .entry-head .org::after { display: none; }
  .when { white-space: normal; }
}
@media print {
  .page { padding: 0; }
  a { color: inherit; text-decoration: none; }
}

/* Article pages */
.back { margin: 0 0 2rem; font-size: 0.92rem; }
.article h1 { margin: 0; font: 700 2.6rem/1.1 var(--serif); letter-spacing: -0.01em; max-width: 20ch; }
.article .byline { margin: 0.9rem 0 0; color: var(--muted); font-size: 0.92rem; }
.article .rule { height: 0; border: 0; border-top: 2px solid var(--navy); margin: 1.4rem 0 0; }
.article h2 { margin: 2.75rem 0 1rem; }
.article p { margin: 0 0 1rem; max-width: 64ch; }
.article ol, .article ul { margin: 0 0 1rem; }
.article ol { padding-left: 1.4rem; list-style: decimal; }
.article ol li { padding-left: 0.25rem; }
.article ol li::before { content: none; }
.article blockquote { margin: 0 0 1rem; padding: 0.9rem 1.2rem; background: var(--wash); border-left: 3px solid var(--navy); font: italic 400 1.2rem/1.45 var(--serif); max-width: 60ch; }
.article code { font: 0.88em ui-monospace, "SF Mono", Menlo, monospace; background: var(--wash); padding: 0.1em 0.35em; border-radius: 3px; }
.article table { border-collapse: collapse; margin: 0 0 1.25rem; width: 100%; font-size: 0.95rem; }
.article th, .article td { text-align: left; padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.article th { font-weight: 600; color: var(--navy); }
.table-wrap { overflow-x: auto; }
.writing a.title { display: block; color: var(--ink); text-decoration-color: var(--rule); }
.writing a.title:hover { color: var(--navy); text-decoration: underline; }
@media (max-width: 640px) { .article h1 { font-size: 2.05rem; } }
.writing + .writing { margin-top: 0.75rem; }
.article ol.sorter-items { padding-left: 0; list-style: none; }
