/* ── Reset & Base ─────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --accent: #1f3a5f;
  --accent-light: #2c5282;
  --text: #1a1a1a;
  --text-secondary: #555;
  --bg: #fdfdfd;
  --bg-alt: #f5f6f8;
  --border: #dde1e6;
  --max-width: 1100px;
  --font-body: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --font-heading: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
}

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ──────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--accent);
  line-height: 1.3;
}

h1 { font-size: 1.8rem; margin-bottom: 0.3rem; }
h2 { font-size: 1.25rem; margin-bottom: 0.6rem; }
h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }

p { margin-bottom: 1rem; }

a {
  color: var(--accent-light);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

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

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

/* ── Header / Nav ────────────────────────────────────── */
header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.site-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: none;
  letter-spacing: 0.01em;
}

.site-name:hover { border-bottom: none; }

nav {
  display: flex;
  gap: 1.8rem;
}

nav a {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}

nav a:hover,
nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Main content ────────────────────────────────────── */
main {
  padding: 2.5rem 0 4rem;
}

/* ── Sections ─────────────────────────────────────────── */
.section {
  padding-top: 2.5rem;
  margin-top: 1rem;
  scroll-margin-top: 4rem;
}

.section-title {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* ── Hero / landing ──────────────────────────────────── */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.hero-name {
  font-size: 2.6rem;
  margin-bottom: 0.4rem;
  border: none;
  display: block;
}

.hero-tagline {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.hero-links {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.hero-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border);
  display: inline-block;
}

.about-body {
  font-size: 1.02rem;
  margin-bottom: 1.5rem;
}

/* ── Research interests ──────────────────────────────── */
.research-interests {
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
}

.research-interests h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.research-interests ul {
  list-style: none;
  padding: 0;
}

.research-interests li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.research-interests li::before {
  content: "\2013";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ── Paper cards ─────────────────────────────────────── */
.paper {
  margin-bottom: 2.2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.paper:last-child { border-bottom: none; }

.paper h3 { margin-bottom: 0.25rem; font-size: 1.1rem; }

.paper-meta {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.7rem;
  line-height: 1.5;
}

.paper-meta .authors { display: block; }
.paper-meta .venue { display: block; font-style: italic; }

.badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15em 0.5em;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 0.3rem;
}

.badge-published { background: #d4edda; color: #155724; }
.badge-review   { background: #fff3cd; color: #856404; }
.badge-submitted { background: #cce5ff; color: #004085; }
.badge-prep     { background: #e2e3e5; color: #383d41; }

.paper-abstract {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Software / Project cards ────────────────────────── */
.project {
  margin-bottom: 2rem;
  padding-bottom: 1.8rem;
  border-bottom: 1px solid var(--border);
}

.project:last-child { border-bottom: none; }

.project h3 { margin-bottom: 0.3rem; font-size: 1.1rem; }

.project-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: inline-block;
  margin-bottom: 0.6rem;
}

.project p {
  font-size: 0.95rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.tag {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-alt);
  color: var(--text-secondary);
  padding: 0.2em 0.55em;
  border-radius: 3px;
}

/* ── CV page ─────────────────────────────────────────── */
.cv-section { margin-bottom: 2rem; }

.cv-heading {
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3rem;
  margin-bottom: 1rem;
}

.publications-list {
  padding-left: 1.2rem;
}

.publications-list li {
  font-size: 0.92rem;
  margin-bottom: 0.6rem;
  line-height: 1.55;
}

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

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

.cv-entry-header h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0;
}

.cv-entry-header .dates {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-style: italic;
  white-space: nowrap;
}

.cv-entry .org {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.3rem;
}

.cv-entry ul {
  padding-left: 1.2rem;
  margin-top: 0.3rem;
}

.cv-entry li {
  font-size: 0.92rem;
  margin-bottom: 0.25rem;
  line-height: 1.55;
}

.cv-skills {
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ── Contact bar ─────────────────────────────────────── */
.contact-bar {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin-bottom: 2rem;
}

/* ── Footer ──────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 600px) {
  html { font-size: 16px; }

  header .container {
    flex-direction: column;
    gap: 0.6rem;
  }

  nav { gap: 1.2rem; }

  .cv-entry-header {
    flex-direction: column;
  }
}
