@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600&display=swap');

:root {
  --text: #111;
  --text-med: #444;
  --text-light: #777;
  --link: #1a5276;
  --border: #d5d5d5;
  --bg: #fff;
  --row-hover: #f8f9fa;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.6;
}

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 2rem;
}

/* ── Header ── */
header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.header-text { flex: 1; }
header h1 { font-family: 'Source Serif 4', Georgia, serif; font-size: 1.8rem; font-weight: 600; letter-spacing: -0.02em; }
header .meta {
  font-size: 0.9rem;
  color: var(--text-med);
  margin-top: 0.3rem;
}
header .profiles {
  font-size: 0.85rem;
  margin-top: 0.4rem;
}
header .profiles a { color: var(--text-med); text-decoration: none; }
header .profiles a:hover { color: var(--link); text-decoration: underline; }
header .profiles .icon-github { color: #333; }
header .profiles .icon-scholar { color: #4285F4; }
header .profiles .icon-orcid   { color: #A6CE39; }
header .profiles .icon-dblp    { color: #004F9F; }
.header-photo {
  width: 120px;
  height: 162px;
  object-fit: cover;
  object-position: center top;
  border-radius: 4px;
  margin-left: 2rem;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  margin-bottom: -68px;
}

/* ── Nav ── */
nav { margin-bottom: 2rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--border); }
nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  margin-right: 1.5rem;
  font-size: 0.9rem;
}
nav a:hover { color: var(--link); text-decoration: underline; }

/* ── About ── */
#about { margin-bottom: 1.5rem; }
#about p { margin-bottom: 1rem; max-width: 72ch; }

/* ── Section headers ── */
h2 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--text);
  display: inline-block;
}

/* Subsection headers */
h3 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-med);
  margin: 2rem 0 0.8rem;
}

/* ── Paper table ── */
.paper-table { border-collapse: collapse; }
.paper-group tr { transition: background 0.15s; }
.paper-group:hover td { background: var(--row-hover); }
.paper-group tr:first-child td { padding-top: 0.9rem; }
.paper-group tr:last-child td { padding-bottom: 0.9rem; border-bottom: 1px solid #eee; }
.paper-group td { vertical-align: top; padding-left: 0; padding-right: 0; }

.preprint-group tr { transition: background 0.15s; }
.preprint-group:hover td { background: var(--row-hover); }
.preprint-group tr:first-child td { padding-top: 0.9rem; }
.preprint-group tr:last-child td { padding-bottom: 0.9rem; border-bottom: 1px dashed #ddd; }
.preprint-group td { vertical-align: top; padding-left: 0; padding-right: 0; }

/* Left column: title + authors */
.td-left { padding-right: 1.2rem; }
.td-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.45;
  margin-bottom: 0.3rem;
}
.td-title a { color: var(--text); text-decoration: none; }
.td-title a:hover { text-decoration: underline; }
.td-authors {
  font-size: 0.85rem;
  color: var(--text-med);
  line-height: 1.5;
}

/* Right column: venue + year */
.td-right {
  text-align: right;
  white-space: nowrap;
  padding-left: 0;
  width: 1%;
}
.td-venue {
  font-family: 'SF Mono', 'Courier New', monospace;
  font-size: 0.85rem;
  color: #0d331c;
  font-weight: 600;
}

/* Links row: full width, links left, award right */
.td-links-full {
  padding-top: 0.4rem;
  display: flex;
  align-items: baseline;
}
.td-links-full a {
  color: var(--link);
  text-decoration: none;
  margin-right: 1rem;
  font-size: 0.8rem;
}
.td-links-full a:hover { text-decoration: underline; }
.td-links-full .td-award {
  font-size: 0.78rem;
  color: #b7791f;
  font-style: italic;
  white-space: nowrap;
  margin-left: auto;
}

/* ── Software ── */
.sw-list { list-style: none; }
.sw-item { margin-bottom: 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid #eee; }
.sw-item:last-child { border-bottom: none; }
.sw-item strong { font-weight: 600; color: var(--text); }

/* ── News ── */
.news-table { width: 100%; border-collapse: collapse; }
.news-table tbody tr { border-bottom: 1px solid #eee; transition: background 0.15s; }
.news-table tbody tr:last-child { border-bottom: none; }
.news-table tbody tr:hover { background: var(--row-hover); }
.news-table td { padding: 0.55rem 0; vertical-align: top; }
.news-table .td-left {
  text-align: right;
  white-space: nowrap;
  padding-right: 0.5rem;
  width: 1%;
}
.news-table time {
  color: var(--text-light);
  font-family: 'SF Mono', 'Courier New', monospace;
  font-size: 0.78rem;
}
.news-table .td-right {
  font-size: 0.9rem;
  text-align: left;
  white-space: normal;
  width: auto;
}
.news-table a { color: var(--link); text-decoration: none; }
.news-table a:hover { text-decoration: underline; }

/* ── Talks ── */
.talk-table { width: 100%; border-collapse: collapse; }
.talk-table tbody tr { border-bottom: 1px solid #eee; transition: background 0.15s; }
.talk-table tbody tr:hover { background: var(--row-hover); }
.talk-table td { padding: 0.7rem 0; vertical-align: top; }
.talk-table .td-left { width: 60%; padding-right: 2rem; }
.talk-table .td-right { width: 40%; text-align: right; }
.talk-title { font-weight: 500; }
.talk-title a { color: var(--text); text-decoration: none; }
.talk-title a:hover { text-decoration: underline; }
.talk-links { font-size: 0.8rem; margin-top: 0.2rem; }
.talk-links a { color: var(--link); text-decoration: none; margin-right: 0.8rem; }
.talk-links a:hover { text-decoration: underline; }
.talk-venue { font-size: 0.85rem; color: var(--text-med); }
.talk-date { font-size: 0.8rem; color: var(--text-light); }

/* ── Page content (teaching, etc.) ── */
.page-content h2 { margin-top: 2rem; }
.page-content h3 { margin-top: 1.2rem; font-size: 1rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text); border-bottom: none; display: block; }
.page-content p { margin-bottom: 0.8rem; max-width: 72ch; }
.page-content ul { margin-left: 1.5rem; margin-bottom: 0.8rem; }
.page-content li { margin-bottom: 0.2rem; }
.page-content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.page-content a { color: var(--link); }
.page-content a:hover { text-decoration: underline; }

/* ── Footer ── */
footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-light);
  text-align: right;
}
