body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: #333;
}

header {
  text-align: center;
  padding: 20px 0;
  border-bottom: 1px solid #ddd;
}

header h1 {
  margin: 0;
  font-size: 2.5em;
}

nav {
  margin-top: 10px;
}

nav a {
  margin: 0 20px;
  text-decoration: none;
  font-size: 18px;
  color: #555;
}

nav a:hover {
  color: #000;
}

.intro {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px;
}

.intro img {
  max-width: 350px;
  border-radius: 8px;
  margin-right: 40px;
}

.intro div {
  max-width: 600px;
}

.papers {
  max-width: 800px;
  margin: 0 auto 40px;
  padding: 0 20px;
}

.papers h2 {
  margin-top: 40px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}

h1.research-title {
  text-align: center;
  font-size: 1.5em;
  font-weight: bold;
  margin-top: 40px;
  margin-bottom: 40px;
}

.contact-info {
  background: none;
  padding: 0;
  margin: 20px 0;
  font-size: 1rem;
  color: #333;
}

.contact-info a {
  font-weight: bold !important;       
  text-decoration: underline !important; 
  color: inherit !important;          
  cursor: pointer;
}

h3 small {
  font-weight: normal;
  font-size: 0.9em; /* slightly smaller */
}

.paper-title {
  font-weight: bold;
  text-decoration: underline !important;
  color: black !important; /* force black */
}

.coauthors {
  font-size: 0.9em;
  margin-left: 5px;
}

.coauthors em {
  font-style: italic;
  font-weight: normal;
}

.coauthor {
  font-weight: bold;
  text-decoration: underline !important;
  color: black !important; /* force black */
}

.coauthors a {
  color: black;
  font-weight: normal;
  text-decoration: none;
}

.coauthors a:hover {
  text-decoration: underline;
}

.intro a:not(#reveal-email):not(#reveal-personal-email) {
  color: black !important;
  font-weight: normal !important;
  text-decoration: underline !important;
}

.intro a:not(#reveal-email):not(#reveal-personal-email):hover {
  text-decoration: underline !important;
}

.abstract {
  margin-top: 2px; /* reduce space above Abstract button */
}

.abstract p {
  text-align: justify;
  margin-top: 5px; /* keeps small gap between Abstract button and text */
}

.teaching {
  max-width: 800px;
  margin: 0 auto 40px;
  padding: 0 20px;
}

.teaching h2 {
  margin-top: 40px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}

.teaching-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.teaching-table td {
  padding: 12px 24px 12px 0;
  vertical-align: top;
}

.teaching-table .course {
  font-weight: bold;
  color: #000;
}

.teaching-table .level,
.teaching-table .years {
  color: #333;
}

@media (max-width: 768px) {
  /* tighter header */
  header h1 {
    font-size: 1.8em;
  }

  nav a {
    margin: 0 10px;
    font-size: 16px;
    display: inline-block;
    margin-bottom: 6px;
  }

  /* stack the photo + text vertically */
  .intro {
    flex-direction: column;
    text-align: center;
    margin: 20px;
  }

  .intro img {
    max-width: 220px;
    margin: 0 0 20px 0;
  }

  .intro div {
    max-width: 100%;
  }

  .contact-info {
    text-align: left;
  }

  /* tighter Research / Teaching */
  .papers,
  .teaching {
    padding: 0 15px;
  }

  h1.research-title {
    font-size: 1.3em;
    margin-top: 25px;
    margin-bottom: 25px;
  }

  .papers h2,
  .teaching h2 {
    font-size: 1.2em;
    margin-top: 25px;
  }

  .paper-title {
    font-size: 1em;
  }

  /* keep tables from overflowing */
  .teaching-table td {
    padding: 8px 10px 8px 0;
    font-size: 0.95em;
  }

  /* prevent long coauthor strings from breaking layout */
  .coauthors {
    display: block;
    margin-left: 0;
    margin-top: 4px;
  }
}






