:root {
  --text: #1a1a1a;
  --muted: #555;
  --rule: #e6e6e6;
  --bg: #ffffff;
  --accent: #3f7cb8;
  --accent-dark: #2f5f8f;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Always reserve the scrollbar gutter so centered header content
   (the name) doesn't shift between short and long pages. */
html { overflow-y: scroll; }
body {
  font-family: Arial, Helvetica, "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
}

/* Header — minimal, static (no shrink-on-scroll) */
header.site {
  border-bottom: 1px solid var(--rule);
  padding: 28px 40px 18px;
  text-align: center;
}
header.site .name {
  font-size: 30px;
  font-weight: normal;
  color: var(--text);
  letter-spacing: 0.5px;
  margin: 0 0 14px;
}

nav.primary ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}
nav.primary li + li::before {
  content: "·";
  color: var(--muted);
  margin: 0 14px;
}
nav.primary a {
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
  letter-spacing: 0.3px;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
nav.primary a:hover { color: var(--accent); }
nav.primary a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Main content */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 50px 40px 80px;
}
section { margin-bottom: 56px; }
section:last-child { margin-bottom: 0; }

.hero {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.hero img.profile {
  width: 250px;
  height: 300px;
  border-radius: 4px;
  object-fit: cover;
  border: 4px solid var(--accent);
  box-shadow: 0 6px 24px rgba(63, 124, 184, 0.25);
  flex-shrink: 0;
}
.hero .hero-text { flex: 1; min-width: 260px; }

h1 {
  font-size: 30px;
  font-weight: normal;
  margin: 0 0 12px;
  letter-spacing: 0.3px;
}
.hero .tagline {
  color: var(--muted);
  font-style: italic;
  margin: 0;
}
h2 {
  font-size: 22px;
  font-weight: normal;
  margin: 0 0 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  letter-spacing: 0.3px;
}
h3.pub-section {
  font-size: 22px;
  font-weight: normal;
  margin: 36px 0 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  color: var(--text);
}
h3.pub-section:first-of-type { margin-top: 0; }
p { margin: 0 0 16px; }

a.link { color: var(--accent-dark); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s ease; }
a.link:hover { border-bottom-color: var(--accent-dark); }

ul.plain {
  list-style: none;
  padding: 0;
  margin: 0;
}
ul.plain li {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
ul.plain li:last-child { border-bottom: none; }
.muted { color: var(--muted); font-size: 15px; }

/* Publication entries: Abstract / Paper / Draft links */
.pub-links {
  display: inline;
  margin-left: 8px;
  font-size: 14px;
}
.pub-links > a,
.pub-links > details {
  margin-right: 12px;
}
.pub-links > a:last-child,
.pub-links > details:last-child {
  margin-right: 0;
}
.pub-links a,
.pub-links summary {
  color: var(--accent-dark);
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.pub-links a:hover,
.pub-links summary:hover { border-bottom-color: var(--accent-dark); }
.pub-links details { display: inline; }
.pub-links summary { list-style: none; display: inline; }
.pub-links summary::-webkit-details-marker { display: none; }
.pub-abstract {
  margin-top: 10px;
  padding: 12px 16px;
  background: #f7fbfe;
  border-left: 3px solid var(--accent);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  border-radius: 0 4px 4px 0;
}

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

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 24px;
}
.contact-card {
  flex: 1 1 280px;
  padding: 20px 24px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-style: normal;
  line-height: 1.6;
}

@media (max-width: 600px) {
  header.site { padding: 22px 16px 14px; }
  header.site .name { font-size: 24px; }
  nav.primary li + li::before { margin: 0 8px; }
  nav.primary a { font-size: 14px; }
  main { padding: 36px 20px 60px; }
  h1 { font-size: 26px; }
  .hero { gap: 24px; justify-content: center; text-align: center; flex-direction: column; align-items: center; }
  .hero .hero-text { text-align: left; }
  .hero img.profile { width: 180px; height: 220px; order: -1; }
}
