/* zev.granowitz.org. Monochrome by design: white paper, black ink, no accent color; the photos carry the color. */


:root {
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Charter, "Bitstream Charter", "Iowan Old Style", Georgia, serif;

  --paper: #ffffff;
  --ink: #111111;
  --muted: #6b6b6b;
  --rule: #e6e6e6;
  --link: #111111;
  --link-line: #b5b5b5;
  --link-hover: #0047ff;
  --wash: #f4f4f4;
  --head-font: var(--sans);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  font-variant-numeric: tabular-nums;
}

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

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--link-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--link-hover); text-decoration-color: currentColor; }

sup { font-size: 0.7em; line-height: 0; }

/* Masthead */
.top {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.95rem;
}
.top .home { color: var(--ink); text-decoration: none; font-weight: 600; }
.top nav a { margin-left: 1.25rem; color: var(--muted); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }

/* Intro */
.intro {
  display: grid;
  grid-template-columns: 1fr 10rem;
  gap: 2rem;
  align-items: start;
  margin-top: 3.5rem;
}
.intro img { width: 10rem; height: 10rem; object-fit: cover; }
h1 {
  font-family: var(--head-font);
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 0.35rem;
}
.role { margin: 0 0 1.25rem; color: var(--muted); }
.intro p { margin: 0 0 1rem; }
.links { font-size: 0.95rem; }
.links a { margin-right: 1rem; white-space: nowrap; }

/* Sections */
h2 {
  font-family: var(--head-font);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 3.5rem 0 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
h3 { font-family: var(--head-font); font-weight: 600; font-size: 1.1rem; margin: 0 0 0.4rem; }

.project { margin: 0 0 3rem; }
.project p { margin: 0 0 0.6rem; }
.project .refs { font-size: 0.92rem; color: var(--muted); }

figure { margin: 0 0 1.1rem; }
figure img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; background: var(--wash); }
figcaption { margin-top: 0.45rem; font-size: 0.85rem; color: var(--muted); }


/* faBolus system figure */
.system { margin: 0 0 1.5rem; }
.system-row { display: flex; align-items: stretch; justify-content: space-between; gap: 0.5rem; }
.device { display: flex; flex-direction: column; align-items: center; margin: 0; }
.device img { display: block; width: 100%; height: auto; margin: auto 0; aspect-ratio: auto; object-fit: contain; background: none; }
.device .label { margin-top: 0.5rem; font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.pump { width: 14rem; }
.phone { width: 9.5rem; }
.watch { width: 8.5rem; }
.link { flex: 1; align-self: center; position: relative; min-width: 2.5rem; height: 1px; background: var(--ink); margin-bottom: 1.4rem; }
.link::before, .link::after { content: ""; position: absolute; top: -3px; width: 7px; height: 7px; border-top: 1px solid var(--ink); }
.link::before { left: 0; border-left: 1px solid var(--ink); transform: rotate(-45deg); transform-origin: 0 0; left: 1px; top: 0; }
.link::after { right: 0; border-right: 1px solid var(--ink); transform: rotate(45deg); transform-origin: 100% 0; right: 1px; top: 0; }
.link span { position: absolute; left: 50%; bottom: 0.45rem; transform: translateX(-50%); font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.system figcaption { margin-top: 1rem; }
@media (max-width: 600px) {
  .system-row { flex-wrap: wrap; justify-content: center; gap: 1.25rem 1.5rem; }
  .pump { width: 15rem; max-width: 100%; }
  .link { display: none; }
}

.dated { list-style: none; margin: 0; padding: 0; }
.dated li { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; padding: 0.35rem 0; }
.dated .when { color: var(--muted); white-space: nowrap; }
.dated .note { display: block; color: var(--muted); font-size: 0.92rem; }

/* Publications */
.page-title { margin-top: 3.5rem; }
.lede { color: var(--muted); margin: 0 0 0.5rem; }
.pubs { list-style: none; margin: 0; padding: 0; }
.pubs li {
  display: grid; grid-template-columns: 3.5rem 1fr; gap: 0.75rem;
  padding: 0.7rem 0; border-bottom: 1px solid var(--rule);
}
.pubs li:last-child { border-bottom: 0; }
.pubs .year { color: var(--muted); }
.pubs .title { font-family: var(--head-font); font-weight: 600; font-size: 1.02rem; display: block; margin-bottom: 0.15rem; }
.pubs .authors, .pubs .venue { display: block; font-size: 0.93rem; }
.pubs .venue { color: var(--muted); }
.pubs b { font-weight: 600; }

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

@media (max-width: 600px) {
  body { font-size: 16px; }
  .top { flex-direction: column; gap: 0.3rem; }
  .top nav a { margin: 0 1rem 0 0; }
  .intro { grid-template-columns: 1fr; gap: 1.25rem; margin-top: 2.5rem; }
  .intro img { width: 7.5rem; height: 7.5rem; order: -1; }
  h1 { font-size: 2.1rem; }
  .pubs li { grid-template-columns: 1fr; gap: 0.1rem; }
}
