:root {
  --bg: #ffffff;
  --bg-subtle: #f5f5f5;
  --text: #111111;
  --text-muted: #525252;
  --accent: #000000;
  --accent-hover: #333333;
  --border: #e5e5e5;
  --badge-pub-bg: #111111;
  --badge-pub-fg: #ffffff;
  --badge-rev-bg: #e5e5e5;
  --badge-rev-fg: #111111;
  --badge-prep-bg: #f5f5f5;
  --badge-prep-fg: #404040;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Newsreader', Georgia, Cambria, serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-hover);
}

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background-color: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.site-brand:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  text-decoration: none;
}

.nav-link.active {
  border-bottom-color: var(--accent);
}

/* Main content */
.main-content {
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
  min-height: calc(100vh - 140px);
}

h1, h2, h3 {
  font-family: var(--font-serif);
  line-height: 1.25;
  color: var(--text);
}

h1 {
  font-size: 2.1rem;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.45rem;
  margin: 2.25rem 0 0.85rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.4rem;
}

p {
  margin: 0 0 1rem;
}

ul {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

li {
  margin-bottom: 0.4rem;
}

/* Hero / Profile */
.hero {
  margin-bottom: 2rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.hero-affiliation {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.pill-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pill-link {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: var(--bg-subtle);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.pill-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  background-color: var(--bg-subtle);
}

.card h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

.card p:last-child {
  margin-bottom: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Publications */
.pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pub-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.pub-item:last-child {
  border-bottom: none;
}

.pub-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.pub-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pub-badge-published {
  background-color: var(--badge-pub-bg);
  color: var(--badge-pub-fg);
}

.pub-badge-under-review {
  background-color: var(--badge-rev-bg);
  color: var(--badge-rev-fg);
}

.pub-badge-in-preparation {
  background-color: var(--badge-prep-bg);
  color: var(--badge-prep-fg);
}

.pub-year {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pub-title {
  font-weight: 600;
  font-size: 1.02rem;
  margin-bottom: 0.25rem;
}

.pub-authors {
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.pub-venue {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* CV Entries */
.cv-entry {
  margin-bottom: 1.15rem;
}

.cv-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cv-entry-title {
  font-weight: 600;
}

.cv-entry-date {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cv-entry-org {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 0.5rem;
}

@media (max-width: 600px) {
  .header-inner {
    padding: 0.5rem 0;
  }
  .site-nav {
    gap: 0.85rem;
  }
  h1 {
    font-size: 1.75rem;
  }
}
