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

:root {
  --teal:      #0CB8C9;  /* decorative only (wave) */
  --teal-text: #077883;  /* text and links: passes WCAG AA at any size */
  --dark:      #111110;
  --light:     #F4F3EF;
  --muted:     #5F5F5A;
  --line:      rgba(0,0,0,0.10);
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--light);
  color: var(--dark);
  font-family: var(--sans);
  line-height: 1.55;
}
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--teal-text); outline-offset: 3px; border-radius: 2px; }

/* ─── Layout ─────────────────────────────────────────────── */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 56px 72px;
  animation: fadeUp 0.7s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.headshot {
  width: 144px; height: 144px; flex-shrink: 0;
  object-fit: cover; object-position: center 25%;
  border-radius: 12px;
  filter: grayscale(15%) contrast(1.04);
  display: block;
}

/* ─── Name block ─────────────────────────────────────────── */
.name {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--teal-text);
  margin-bottom: 6px;
}
.role { font-size: 15px; line-height: 1.5; }
.role span { display: block; color: var(--muted); }
.email { font-family: var(--mono); font-size: 14px; margin-top: 8px; }
.email a { color: var(--teal-text); text-decoration: none; border-bottom: 1px solid var(--teal); }
.email a:hover { color: var(--dark); }

/* The rule from the music site, as an oscillation */
.wave { width: 72px; height: 14px; overflow: hidden; margin: 24px 0; }
.wave svg { width: 192px; height: 14px; display: block; animation: drift 2.4s linear infinite; }
.wave path { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; }
@keyframes drift { to { transform: translateX(-48px); } }

/* ─── Profile links ──────────────────────────────────────── */
.links {
  display: flex; flex-wrap: wrap;
  gap: 6px 0;
  font-family: var(--mono); font-size: 14px;
  margin-bottom: 40px;
}
.links a { text-decoration: none; color: var(--dark); }
.links a + a::before { content: "/"; color: var(--muted); margin: 0 10px; }
.links a:hover { color: var(--teal-text); text-decoration: underline; text-underline-offset: 3px; }

.bio { font-size: 16px; max-width: 34em; margin-bottom: 52px; }

/* ─── Section label ──────────────────────────────────────── */
.label {
  font-family: var(--mono);
  font-size: 13px; font-weight: 500;
  color: var(--teal-text);
  margin-bottom: 12px;
}

/* ─── Paper list ─────────────────────────────────────────── */
.papers { list-style: none; margin-bottom: 52px; }
.papers li {
  display: flex; align-items: baseline; gap: 20px;
  padding: 0 0 22px;
}
.papers li.new-yr:not(:first-child) { margin-top: 14px; }
.yr {
  font-family: var(--mono);
  color: var(--teal-text);
  font-size: 13px;
  min-width: 40px; flex-shrink: 0;
}
.ttl {
  display: block;
  font-size: 15px; font-weight: 500; line-height: 1.4;
  text-decoration: none;
  margin-bottom: 4px;
}
.ttl:hover { color: var(--teal-text); text-decoration: underline; text-underline-offset: 3px; }
.meta { font-size: 13px; color: var(--muted); }
.meta .jn { font-style: normal; }
.meta .tag { font-family: var(--mono); font-size: 12px; color: var(--teal-text); text-decoration: none; }
.meta .tag:hover { text-decoration: underline; }
#papers, #tutorials {
  font-family: var(--sans);
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: capitalize;
  margin: 0 0 20px;
}
footer { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ─── Paper pages (for search engines; reached via "abstract") ─ */
.top { max-width: 760px; margin: 0 auto; padding: 28px 56px; }
.wordmark { font-weight: 600; font-size: 16px; color: var(--teal-text); text-decoration: none; }
.wordmark:hover { text-decoration: underline; text-underline-offset: 3px; }
.article { max-width: 760px; margin: 0 auto; padding: 24px 56px 80px; animation: fadeUp 0.6s ease both; }
.article h1 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600; line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.authors { font-size: 15px; color: #33332f; }
.authors strong { color: var(--dark); font-weight: 600; }

.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 44px; }
.btn {
  font-family: var(--mono); font-size: 13px;
  text-decoration: none;
  padding: 8px 14px;
  border: 1.5px solid var(--dark);
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--dark); color: var(--light); }
.btn.primary { background: var(--teal-text); border-color: var(--teal-text); color: #fff; }
.btn.primary:hover { background: var(--dark); border-color: var(--dark); }

.abstract { font-size: 16px; margin-bottom: 44px; }
.cite { font-size: 14px; margin-bottom: 14px; overflow-wrap: anywhere; }
details { font-size: 13px; margin-bottom: 48px; }
summary { cursor: pointer; font-family: var(--mono); font-size: 13px; color: var(--teal-text); }
pre {
  margin-top: 12px; padding: 16px;
  background: #EAE9E4; overflow-x: auto;
  font-family: var(--mono); font-size: 12px; line-height: 1.5;
}
.back a { font-family: var(--mono); font-size: 13px; text-decoration: none; }
.back a:hover { color: var(--teal-text); text-decoration: underline; }

/* ─── Mobile ─────────────────────────────────────────────── */
@media (max-width: 720px) {
  .page      { padding: 36px 16px 56px; }
  .headshot  { width: 104px; height: 104px; border-radius: 10px; }
  .papers li { gap: 14px; }
  .top       { padding: 20px 16px; }
  .article   { padding: 12px 16px 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .page, .article, .wave svg { animation: none; }
}

@media print {
  .wave, .links, .btns { display: none; }
}
