
/* Minimal academic CV site — simple, readable, no JS required */
:root {
  --fg: #111;
  --bg: #fff;
  --muted: #555;
  --link: #0b57d0;
  --border: #e5e7eb;
  --maxw: 860px;
  --avatar: 200px; 
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e6e6e6;
    --bg: #0b0c0e;
    --muted: #aaa;
    --link: #a8c7fa;
    --border: #1f2937;
  }
}

* { box-sizing: border-box; }
html, body { padding: 0; margin: 0; }
body {
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--fg);
  background: var(--bg);
}

header {
  border-bottom: 1px solid var(--border);
  padding: 32px 16px;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 12px; }

.hero {
  display: grid;
  grid-template-columns: var(--avatar) 1fr;
  gap: 16px;
  align-items: center;
}
.hero img {
  width: var(--avatar); height: var(--avatar); border-radius: 10%; display: block;
  border: 1px solid var(--border);
  background: #f8fafc;
}
.hero h1 { margin: 0 0 4px 0; font-size: 28px; }
.hero .role { margin: 0; color: var(--muted); }
.hero .affil { margin: 8px 0 0 0; }

nav {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(127,127,127,0.04);
}
nav .links {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  flex-wrap: wrap;
}
nav a { text-decoration: none; color: var(--link); }
nav a:hover, nav a:focus { text-decoration: underline; }

main { padding: 16px; }
section { padding: 6px 0 14px; }
section + section { border-top: 1px dashed var(--border); }
h2 { font-size: 1.2rem; margin: 10px 0; }
h3 { font-size: 1rem; margin: 8px 0 4px; }
ul { margin: 4px 0 12px 20px; }
li + li { margin-top: 6px; }

.badge {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  vertical-align: middle;
  margin-left: 6px;
}

.meta { color: var(--muted); font-size: 0.95rem; }
a { color: var(--link); }

footer {
  border-top: 1px solid var(--border);
  padding: 18px 16px 40px;
  color: var(--muted);
  font-size: 0.95rem;
}
.kicker { font-style: italic; color: var(--muted); }

.skip-link {
  position: absolute; left: -9999px; top: -9999px;
}
.skip-link:focus { left: 10px; top: 10px; background: var(--bg); border: 2px solid var(--link); padding: 6px 8px; }

#publications .pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

#publications .pub-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: var(--bg);
}

#publications .pub-figure {
  margin: 0;
  aspect-ratio: 4/3;          
  overflow: hidden;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid var(--border);
}
@media (prefers-color-scheme: dark) {
  #publications .pub-figure { background: #0f1216; }
}

#publications .pub-figure img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .2s ease;
}
#publications .pub-item:hover .pub-figure img,
#publications .pub-figure a:focus-visible img {
  transform: scale(1.03);
}

#publications .pub-content { min-width: 0; }
#publications .pub-title { margin: 0 0 4px 0; }
#publications .pub-authors { margin: 0; color: var(--muted); }
#publications .pub-venue { margin: 4px 0 6px 0; }

#publications .badges {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

#publications .badge--preprint {
  background: rgba(255, 159, 64, 0.12);
  border-color: rgba(255, 159, 64, 0.35);
}

#publications .links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  font-size: 0.95rem;
}
#publications .links a {
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}
#publications .links a:hover,
#publications .links a:focus-visible {
  border-bottom-style: solid;
}

#publications .link-arxiv::before  { content: "📄 "; }
#publications .link-website::before{ content: "🔗 "; }
#publications .link-pdf::before    { content: "📕 "; }
#publications .link-code::before   { content: "🧩 "; }
#publications .link-video::before  { content: "🎬 "; }

@media (max-width: 600px) {
  #publications .pub-item { grid-template-columns: 1fr; }
  #publications .pub-figure { aspect-ratio: 16/9; }
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.theme-toggle {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--link);
  border-radius: 999px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font: inherit;
}
.theme-toggle:hover,
.theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--border);
}

:root { color-scheme: light dark; }

:root[data-theme="dark"] {
  --fg: #e6e6e6;
  --bg: #0b0c0e;
  --muted: #aaa;
  --link: #a8c7fa;
  --border: #1f2937;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --fg: #111;
  --bg: #fff;
  --muted: #555;
  --link: #0b57d0;
  --border: #e5e7eb;
  color-scheme: light;
}

:root[data-theme="dark"] #publications .pub-figure { background: #0f1216; }
:root[data-theme="dark"] .hero img { background: #0f1216; }

@media (max-width: 420px) {
  .theme-toggle { width: 100%; justify-content: center; }
}
