/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #fdfdfb;
  --text: #1f2328;
  --muted: #5a6068;
  --accent: #6b1f2a;       /* deep maroon */
  --accent-hover: #8a2a37;
  --rule: #e5e3de;
  --max-width: 760px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}
a:hover { color: var(--accent-hover); border-bottom-color: currentColor; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

header.site-header {
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 1.25rem 1rem;
}
header.site-header .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
header.site-header .site-title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}
header.site-header .site-title a { color: inherit; border-bottom: none; }

nav.primary { display: flex; gap: 1.25rem; }
nav.primary a {
  color: var(--muted);
  font-size: 0.95rem;
}
nav.primary a.active { color: var(--text); }

footer.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- Hero / portrait ---------- */
.hero {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin: 0.5rem 0 0.5rem;
}
.hero-text { flex: 1 1 auto; min-width: 0; }
.hero-text h1 { margin-top: 0; }
.headshot {
  flex: 0 0 auto;
  height: 4cm;          /* ~2 inches tall on a standard monitor */
  width: auto;          /* preserve natural aspect ratio */
  max-width: 4cm;       /* but never wider than it is tall */
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--rule);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

@media (max-width: 520px) {
  .hero { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .headshot { height: 3cm; max-width: 3cm; }
}

/* ---------- Headings & text ---------- */
h1 {
  font-size: 1.9rem;
  margin: 0.25rem 0 0.75rem;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--rule);
}
p { margin: 0 0 1rem; }

.lede {
  font-size: 1.05rem;
  color: var(--muted);
}

/* ---------- Publications list ---------- */
ol.pub-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  counter-reset: pub;
}
ol.pub-list li {
  counter-increment: pub;
  position: relative;
  padding: 0.85rem 0 0.85rem 2.25rem;
  border-bottom: 1px solid var(--rule);
}
ol.pub-list li:last-child { border-bottom: none; }
ol.pub-list li::before {
  content: counter(pub) ".";
  position: absolute;
  left: 0;
  top: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  width: 1.75rem;
  text-align: right;
}

.pub-title { font-weight: 600; }
.pub-authors { color: var(--text); }
.pub-venue { color: var(--muted); font-style: italic; }
.pub-year { color: var(--muted); }

.pub-links {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pub-links a {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.82rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--accent);
  background: #fff;
}
.pub-links a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ---------- CV embed ---------- */
.cv-embed {
  display: block;
  width: 100%;
  height: 85vh;       /* tall enough to read; resize browser to fit */
  min-height: 600px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fafafa;
}

/* ---------- Responsive ---------- */
@media (max-width: 520px) {
  body { font-size: 16px; }
  .container { padding-top: 1.5rem; }
  h1 { font-size: 1.6rem; }
  header.site-header .inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}
