:root {
  --background: #ffffff;
  --background-rgb: 255 255 255;
  --foreground: oklch(15% 0 0);
  --muted-foreground: oklch(70% 0 0);
  --border: oklch(92.2% 0 0);
  --accent: oklch(97% 0 0);
  --accent-transparent: color-mix(in oklab, var(--foreground) 5%, transparent);
  --page-margin: 16px;
  --font-sans: "Geist", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #131313;
    --background-rgb: 19 19 19;
    --foreground: oklch(95% 0 0);
    --muted-foreground: oklch(60% 0 0);
    --border: oklch(100% 0 0 / .1);
    --accent: oklch(26.9% 0 0);
  }

}

@media (min-width: 640px) {
  :root { --page-margin: 24px; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (pointer: coarse) {
  body { font-size: 16px; }
}

a { color: inherit; }

.page {
  width: 100%;
  max-width: 42rem;
  margin-inline: auto;
  padding: 72px var(--page-margin);
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 400;
  line-height: 36px;
  letter-spacing: -.02em;
}

.hero p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 16px;
  line-height: 24px;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 48px;
}

.section-title {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 300;
  line-height: 20px;
}

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

.work-row {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 0 24px;
  line-height: 1.25;
  box-shadow: inset 0 .5px 0 var(--border);
}

.work-row:first-child {
  padding-top: 0;
  box-shadow: none;
}

.work-meta {
  flex: 0 0 auto;
  color: var(--muted-foreground);
  line-height: 1.25;
}

.institution {
  display: flex;
  align-items: center;
  gap: 8px;
}

.institution-logo {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 6px;
  object-fit: contain;
}

.work-details {
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
}

.role {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.role-title {
  min-width: 0;
  font-weight: 300;
}

.role-date {
  min-width: 76px;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.subtext {
  margin: 4px 0 0;
  color: var(--muted-foreground);
  line-height: 1.4;
}

.work-link {
  color: inherit;
  text-decoration: none;
  transition: background-color .15s ease, box-shadow .15s ease, margin .15s ease, padding .15s ease;
}

.work-link:hover,
.work-link:focus-visible {
  margin-inline: -16px;
  padding-inline: 16px;
  border-radius: 8px;
  background: color-mix(in oklab, var(--accent-transparent) 75%, transparent);
  box-shadow: inset 0 .5px 1.5px 0 rgba(255,255,255,.04);
  outline: none;
}

.work-link:hover .subtext,
.work-link:focus-visible .subtext,
.work-link:hover .role-date,
.work-link:focus-visible .role-date {
  color: var(--foreground);
}

.arrow {
  display: none;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-left: -4px;
  color: var(--muted-foreground);
  font-size: 16px;
  line-height: 18px;
  transition: color .15s ease;
}

.work-link:hover .arrow,
.work-link:focus-visible .arrow { color: var(--foreground); }

.publication-title { font-style: italic; }

.site-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 24px;
  margin-inline: -6px;
  padding: 24px 0 16px;
  background-image: linear-gradient(to bottom, rgb(var(--background-rgb) / 0), rgb(var(--background-rgb) / .9), rgb(var(--background-rgb) / 1));
}

.footer-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.footer-link {
  padding: 6px;
  border-radius: 8px;
  color: var(--foreground);
  font-size: 13px;
  line-height: 18px;
  text-decoration: none;
  transition: background-color .15s ease, opacity .15s ease;
}

.footer-link:hover,
.footer-link:focus-visible {
  background: var(--accent);
  outline: none;
}

.footer-secondary { opacity: .5; }
.footer-secondary:hover,
.footer-secondary:focus-visible { opacity: 1; }

@media (min-width: 768px) {
  .work-row {
    flex-direction: row;
    align-items: stretch;
    padding-bottom: 16px;
  }

  .work-meta { width: 120px; }
  .work-details { align-self: stretch; }
  .arrow { display: flex; }
  .site-footer { justify-content: space-between; gap: 48px; }
}

@media print {
  .page { padding: 24px var(--page-margin); }
  .site-footer { display: none; }
  .work-link:hover,
  .work-link:focus-visible { margin-inline: 0; padding-inline: 0; background: none; box-shadow: none; }
}
