/* Shared style for every page. Edit the variables below to retheme the site. */

:root {
  --text: #222;
  --muted: #666;
  --accent: #003262;      /* Berkeley blue */
  --rule: #ddd;
  --bg: #fff;
  --max-width: 760px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header / navigation ---------- */

header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  border-bottom: 1px solid var(--rule);
}

.site-name {
  font-size: 1.5rem;
  color: var(--text);
}
.site-name:hover { text-decoration: none; }

nav a {
  margin-left: 20px;
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.95rem;
  color: var(--muted);
}
nav a:first-child { margin-left: 0; }
nav a.active { color: var(--accent); font-weight: 600; }

/* ---------- Main content ---------- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 20px 48px;
}

h1, h2, h3 { font-weight: normal; line-height: 1.3; }
h1 { font-size: 1.7rem; margin-top: 0; }
h2 {
  font-size: 1.25rem;
  margin-top: 2.2em;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--rule);
}

/* ---------- Home page intro (photo + text) ---------- */

.intro {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.intro img {
  width: 300px;
  height: auto;
  flex-shrink: 0;
  border-radius: 4px;
}

.intro .contact {
  margin-top: 1em;
  font-size: 0.95rem;
  color: var(--muted);
}
.intro .contact a { margin-right: 14px; }

@media (max-width: 600px) {
  .intro { flex-direction: column; align-items: center; text-align: left; }
  .intro img { width: 240px; }
  nav a { margin-left: 14px; }
}

/* ---------- Paper list ---------- */

.papers { list-style: none; padding: 0; margin: 0; }

.papers li { margin-bottom: 1.4em; }

.paper-title { font-weight: bold; }

.paper-authors,
.paper-venue { display: block; font-size: 0.95rem; }

.paper-venue { color: var(--muted); font-style: italic; }

.paper-links {
  display: block;
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem;
}
.paper-links a { margin-right: 10px; }

.paper-note { display: block; font-size: 0.92rem; color: var(--muted); margin-top: 2px; }

/* ---------- Footer ---------- */

footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 20px 32px;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- CV page ---------- */

.cv-entry { margin-bottom: 1.2em; }

.cv-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.cv-head .when { color: var(--muted); white-space: nowrap; }

.cv-sub { display: block; font-style: italic; color: var(--muted); font-size: 0.95rem; }

.cv-entry ul { margin: 4px 0 0; padding-left: 20px; font-size: 0.95rem; }
