:root {
  --red: #881c1c;
  --red-dark: #5c1313;
  --text: #222;
  --muted: #666;
  --line: #ddd;
  --highlight: #fff2a8;
}

::selection {
  background: var(--red);
  color: #fff;
}

* {
  box-sizing: border-box;
}

body {
  background: #fff;
  color: var(--text);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}

a {
  color: var(--red);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--red-dark);
  text-decoration: underline;
}

.site-header {
  border-bottom: 4px solid var(--red);
  margin: 0 auto;
  max-width: 900px;
  padding: 0.8rem 1rem;
}

.brand {
  color: var(--text);
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 700;
  margin-right: 1.2rem;
}

nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

nav a {
  color: var(--red);
  font-size: 0.95rem;
}

.page {
  margin: 1.5rem auto 3rem;
  max-width: 900px;
  padding: 0 1rem;
}

.profile-row {
  align-items: flex-start;
  display: flex;
  gap: 2rem;
}

.profile-card {
  flex: 0 0 220px;
  text-align: center;
}

.profile-image {
  border: 1px solid #bbb;
  height: 150px;
  object-fit: cover;
  padding: 3px;
  width: 150px;
}

.name {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 0.7rem;
}

.position,
.affiliation {
  color: var(--muted);
}

.email {
  font-size: 0.95rem;
  margin: 0.6rem 0;
  overflow-wrap: break-word;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.bio-text {
  flex: 1;
  min-width: 0;
}

h1,
h2,
h3 {
  line-height: 1.25;
}

h2,
h3 {
  color: var(--red);
}

h1 {
  color: var(--text);
  font-size: 2rem;
  margin: 0 0 0.75rem;
}

h2 {
  border-bottom: 3px solid var(--red);
  font-size: 1.45rem;
  margin: 2rem 0 1rem;
  padding-bottom: 0.25rem;
}

h3 {
  font-size: 1.15rem;
  margin: 1.4rem 0 0.5rem;
}

p {
  margin-top: 0;
}

.publications-list {
  margin: 0;
  padding-left: 1.3rem;
}

.publications-list li {
  margin-bottom: 1rem;
}

.paper-title {
  color: var(--text);
  font-weight: 700;
}

.paper-authors,
.publication-meta,
.venue {
  color: var(--muted);
}

.award-tag,
.highlight {
  background: var(--highlight);
  color: #333;
  font-size: 0.85rem;
  padding: 0 0.2rem;
}

.all-publications-link {
  font-weight: 700;
}

#easter-egg-canvas {
  inset: 0;
  opacity: 0.85;
  pointer-events: none;
  position: fixed;
  z-index: 9999;
}

.easter-egg-toast {
  animation: easter-egg-toast-in 0.25s ease-out;
  background: var(--red);
  border-radius: 6px;
  bottom: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 0.9rem;
  left: 50%;
  padding: 0.6rem 1rem;
  position: fixed;
  transform: translateX(-50%);
  z-index: 10000;
}

@keyframes easter-egg-toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 0.5rem);
  }
  to {
    opacity: 1;
    transform: translateX(-50%);
  }
}

@media (max-width: 680px) {
  .site-header {
    padding: 0.75rem 1rem;
  }

  .brand {
    display: block;
    margin-bottom: 0.4rem;
  }

  .profile-row {
    display: block;
  }

  .profile-card {
    margin-bottom: 1.25rem;
    text-align: left;
  }

  .links {
    justify-content: flex-start;
  }
}
