:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #0b3d91;
  --border: #dbe3ee;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  --max-width: 1150px;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  width: min(92%, var(--max-width));
  margin: 0 auto;
}

.hero {
  background: linear-gradient(135deg, #eaf1ff, #f7faff);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}

.hero-content {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 32px;
  align-items: center;
}

.profile-photo {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 18px;
  border: 4px solid white;
  box-shadow: var(--shadow);
  background: #e5e7eb;
}

.hero-text h1 {
  margin: 0 0 8px;
  font-size: 2.5rem;
  line-height: 1.1;
}

.affiliation {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.institution {
  margin: 4px 0 16px;
  color: var(--muted);
}

.bio {
  max-width: 850px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.links a {
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: white;
  transition: 0.2s ease;
}

.links a:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

main {
  padding: 32px 0 48px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.card h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.section-header {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.upload-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 10px;
  background: #f8fbff;
}

.upload-label input {
  display: none;
}

.section-note,
.status {
  color: var(--muted);
  font-size: 0.95rem;
}

/* --- Publications (compact styling) --- */

.publications-list {
  margin: 12px 0 0;
  padding-left: 18px;
}

.publications-list li {
  margin-bottom: 10px;
  padding-bottom: 0;
  border-bottom: none;
}

.publication-title {
  font-weight: 600;
  line-height: 1.3;
}

.publication-authors,
.publication-venue,
.publication-links {
  margin-top: 2px;
  line-height: 1.3;
}

.publication-authors {
  font-size: 0.95rem;
}

.publication-venue {
  color: var(--muted);
  font-size: 0.95rem;
}

.publication-links {
  font-size: 0.95rem;
}

.publication-links a {
  color: var(--accent);
  text-decoration: none;
  margin-right: 12px;
}

.publication-links a:hover {
  text-decoration: underline;
}

.publication-title a {
  color: #0b3d91;
  text-decoration: none;
}

.publication-title a:hover {
  text-decoration: underline;
}

/* --- Footer --- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0 36px;
  color: var(--muted);
  text-align: center;
}

code {
  background: #eef2ff;
  padding: 2px 6px;
  border-radius: 6px;
}

@media (max-width: 720px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-photo {
    margin: 0 auto;
  }

  .links {
    justify-content: center;
  }
}


/* --- Talks --- */

.talks-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

.talk-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  margin-bottom: 8px;   /* was bigger */
  line-height: 1.35;
}

.talk-date {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
  width: 110px;          /* fix alignment */
  font-weight: 500;      /* slightly stronger */
}

.talk-content {
  font-size: 0.95rem;
}

.talk-content a {
  color: var(--accent);
  text-decoration: none;
}

.talk-content a:hover {
  text-decoration: underline;
}

/* Slides button */
.talk-slides {
  margin-left: 8px;
  font-size: 0.8rem;
  padding: 2px 6px;
  border-radius: 6px;
  background: #eef2ff;
  color: var(--accent);
  text-decoration: none;
}

.talk-slides:hover {
  background: var(--accent);
  color: white;
}

/* Mobile */
@media (max-width: 720px) {
  .talk-item {
    grid-template-columns: 1fr;
  }

  .talk-date {
    font-weight: 600;
  }
}

/* Left-aligned date layout (like talks) */
.entry-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  margin-bottom: 8px;
  line-height: 1.35;
  align-items: start;
  grid-template-columns: 110px 1fr; /* tweak width */
}

.entry-date {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.entry-content {
  font-size: 0.95rem;
}

.entry-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

.entry-content strong {
  color: var(--accent);
}
