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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.65;
  color: #2d2d2d;
  background: #ffffff;
  margin: 0;
  padding: 0;
  font-size: 15px;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 28px 64px;
}

/* ── Profile ── */
.profile {
  display: flex;
  align-items: flex-start;
  gap: 36px;
  margin-bottom: 40px;
}

.profile-pic {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid #e5e7eb;
}

.profile-info {
  flex: 1;
}

.profile-info h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: #111;
  letter-spacing: -0.5px;
}

.profile-info .subtitle {
  color: #555;
  margin: 0 0 6px;
  font-size: 1rem;
}

.profile-info .interests {
  color: #666;
  margin: 0 0 18px;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.profile-links a {
  color: #1d4ed8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.profile-links a:hover {
  color: #1e40af;
  text-decoration: underline;
}

.link-sep {
  color: #ccc;
  font-size: 0.9rem;
}

/* ── About ── */
.about {
  margin-bottom: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid #e9eaec;
}

.about p {
  color: #444;
  font-size: 0.97rem;
  line-height: 1.75;
  margin: 0;
}

/* ── Section headings ── */
.section-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 28px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e5e7eb;
  letter-spacing: -0.3px;
}

/* ── Publications ── */
.publications {
  margin-bottom: 48px;
}

.year-group {
  margin-bottom: 36px;
}

.year-label {
  font-size: 1rem;
  font-weight: 600;
  color: #888;
  margin-bottom: 18px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f0f0f0;
  letter-spacing: 0.5px;
}

.pub-entry {
  display: flex;
  gap: 22px;
  margin-bottom: 30px;
  align-items: flex-start;
}

.pub-image {
  width: 190px;
  flex-shrink: 0;
}

.pub-image img {
  width: 190px;
  height: 122px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  display: block;
}

.pub-placeholder {
  width: 190px;
  height: 122px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: #999;
  text-align: center;
  padding: 10px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.pub-placeholder.rl       { background: linear-gradient(135deg, #eff6ff, #dbeafe); }
.pub-placeholder.robotics { background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.pub-placeholder.timeseries { background: linear-gradient(135deg, #faf5ff, #ede9fe); }
.pub-placeholder.causal   { background: linear-gradient(135deg, #fff7ed, #fed7aa); }

.pub-content {
  flex: 1;
  min-width: 0;
}

.pub-title {
  font-size: 0.97rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 7px;
}

.pub-title a {
  color: #1a1a1a;
  text-decoration: none;
}

.pub-title a:hover {
  color: #1d4ed8;
}

.pub-authors {
  font-size: 0.87rem;
  color: #555;
  margin-bottom: 5px;
  line-height: 1.55;
}

.pub-authors strong {
  color: #1a1a1a;
  font-weight: 600;
}

.pub-venue {
  font-size: 0.86rem;
  color: #666;
  margin-bottom: 10px;
}

.venue-badge {
  display: inline-block;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 0.81rem;
  font-weight: 500;
  font-style: normal;
  margin-right: 4px;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pub-links a {
  font-size: 0.8rem;
  color: #374151;
  text-decoration: none;
  border: 1px solid #d1d5db;
  padding: 2px 9px;
  border-radius: 4px;
  background: #f9fafb;
  transition: background 0.1s, border-color 0.1s;
}

.pub-links a:hover {
  background: #f0f4ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

/* ── Projects section ── */
.projects {
  margin-bottom: 48px;
}

.project-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-tag {
  color: #1d4ed8;
  text-decoration: none;
  font-size: 0.88rem;
  border: 1px solid #bfdbfe;
  padding: 4px 12px;
  border-radius: 20px;
  background: #eff6ff;
}

.project-tag:hover {
  background: #dbeafe;
}

/* ── Footer ── */
footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
  color: #aaa;
  font-size: 0.82rem;
}

footer a {
  color: #aaa;
  text-decoration: none;
}

footer a:hover {
  color: #666;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }

  .profile-links {
    justify-content: center;
  }

  .pub-entry {
    flex-direction: column;
  }

  .pub-image,
  .pub-image img,
  .pub-placeholder {
    width: 100%;
    height: 140px;
  }
}
