@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ink:        #1a1a1a;
  --ink-soft:   #555;
  --ink-faint:  #888;
  --rule:       #ddd;
  --accent:     #2548b8;
}

* { box-sizing: border-box; }

body {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink);
  width: 1000px;
  margin: 0 auto;
  padding: 16px 0 32px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
}

p { margin: 4px 0 6px; }

/* —— header —— */

header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

h1 {
  font-size: 2.0rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 4px 0;
}

header > div:last-child {
  text-align: right;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.scale { height: 0.88em; vertical-align: -1px; }

/* —— sections —— */

h2 {
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0 4px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--rule);
}

h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}

/* —— entries —— */

.entry {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0 12px;
  margin-bottom: 3px;
  align-items: baseline;
}

/* keep <a name="..."> fragment anchors from stealing grid cells */
.entry > a[name] { display: contents; }
.entry > .date       { grid-column: 1; }
.entry > .entry_body { grid-column: 2; }

.date {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--ink-faint);
  margin: 0;
  padding-top: 1px;
  font-variant-numeric: tabular-nums;
}

.entry_body {
  display: flex;
  flex-direction: column;
}

.entry_header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
}

/* small location annotations sitting inside .entry_header */
.entry_header > :not(h3):not(.entry_details) {
  font-size: 11.5px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.location {
  display: inline;
  justify-content: flex-end;
}

/* role line directly under the company name */
.entry_body > span:not(.location) {
  display: block;
  font-size: 11.5px;
  color: var(--ink-soft);
}

/* description copy */
.entry_details {
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--ink);
}

.entry_details p { margin: 2px 0 0; }

/* publication meta lives inside .entry_header and should stay right-aligned
   next to the title (or wrap below it if the title is long). min-width: 0
   lets it shrink so long titles aren't squeezed. */
.entry_header .entry_details {
  min-width: 0;
  margin-left: auto;
  text-align: right;
  font-size: 10.5px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.entry_header .entry_details span { display: inline; }


/* lists inside descriptions */
ul {
  padding-left: 16px;
  margin: 2px 0 0;
}

li { margin-bottom: 2px; }

/* preamble paragraph under the Publications heading */
.preamble {
  font-size: 11.5px;
  color: var(--ink-soft);
  margin: 2px 0 6px;
  padding-left: 84px;
  max-width: 720px;
}

/* print — keep the 1000px layout; let the browser auto-scale to letter
   (mirrors the original PDF's ~72% fit-to-page behavior) */
@media print {
  body { padding: 0; }
  a { color: var(--ink); }
  .entry { break-inside: avoid; }
}

/* responsive */
@media (max-width: 1040px) {
  body { width: auto; max-width: 1000px; padding: 16px; }
}

@media (max-width: 640px) {
  body { padding: 16px 12px 32px; font-size: 13px; }
  header { flex-direction: column; align-items: flex-start; gap: 6px; }
  header > div:last-child { text-align: left; }
  h1 { font-size: 1.8rem; }
  .entry { grid-template-columns: 60px 1fr; gap: 8px; }
  .preamble { padding-left: 0; }
  .entry_header { flex-direction: column; align-items: flex-start; gap: 1px; }
  .entry_header .entry_details { text-align: left; }
}
