/* Color scheme inspired by Sergey Karayev */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  background-color: #fff;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* Header Section */
.header {
  margin-bottom: 40px;
}

.header-content {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.header-text {
  flex: 1;
  min-width: 300px;
}

.name {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 32px;
  font-weight: normal;
  margin-bottom: 15px;
  text-align: center;
}

.bio {
  margin-bottom: 15px;
  text-align: left;
}

.links {
  text-align: center;
  margin-bottom: 10px;
}

.email {
  text-align: left;
  margin-bottom: 0;
}

.header-image {
  flex-shrink: 0;
}

.header-image img {
  max-width: 250px;
  width: 100%;
  height: auto;
  display: block;
}

/* Links */
a {
  color: #1772d0;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

a:focus,
a:hover {
  color: #f09228;
  text-decoration: none;
}

/* Sections */
.section {
  margin-bottom: 40px;
}

.heading {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 22px;
  font-weight: normal;
  margin-bottom: 15px;
}

/* Publications */
.publications {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.publication {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  align-items: start;
}

.publication-image {
  width: 160px;
  height: 100px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.publication-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.publication-content {
  flex: 1;
}

.papertitle {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.publication-content p {
  margin: 0;
  line-height: 1.6;
}

.publication-content em {
  font-style: italic;
}

/* Talks */
.talks p {
  margin-bottom: 10px;
}

.talks strong {
  font-weight: 700;
}

/* Footer */
.footer {
  margin-top: 60px;
  padding-top: 20px;
  text-align: right;
  font-size: 12px;
  color: #666;
  border-top: 1px solid #eee;
}

.footer p {
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .header-content {
    flex-direction: column;
    align-items: center;
  }

  .name {
    font-size: 28px;
  }

  .header-image {
    text-align: center;
  }

  .header-image img {
    max-width: 200px;
  }

  .publication {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .publication-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    margin: 0 auto;
  }

  .publication-image img {
    width: 100%;
  }

  .links {
    font-size: 13px;
  }

  .footer {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .name {
    font-size: 24px;
  }

  body {
    font-size: 13px;
  }

  .heading {
    font-size: 20px;
  }

  .publication-image {
    max-width: 150px;
  }
}

/* Utility classes */
.highlight {
  background-color: #ffffd0;
}

/* Fade transition for images (if needed for hover effects) */
.fade {
  transition: opacity 0.2s ease-in-out;
}
