/* Spacing variables */
:root {
  --spacing-unit: 20px;
  --section-gap: calc(var(--spacing-unit) * 1.5);    /* 30px - gap between major sections */
  --content-gap: var(--spacing-unit);               /* 20px - gap between heading and content */
  --heading-gap: calc(var(--spacing-unit) * 0.5);  /* 10px - reduced gap for section headings */
}

a {
  color: rgb(28, 145, 110);
  text-decoration: underline;
  text-decoration-thickness: 0.3px;
  text-underline-offset: 3px;  /* Space between text and line */
  transition: color .2s;
}

a:focus,
a:hover {
  color: rgb(38, 177, 144);
  text-decoration: none;
}

body {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  background-color: #ffffff;
  -webkit-text-size-adjust: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

h2 {
  margin: 0;
  font-size: 22px;
}

.section-heading-container {
  text-align: left;
  background-color: #ffffff;
  padding: var(--content-gap) var(--content-gap) var(--heading-gap) var(--content-gap);
}

.section-heading {
  color: #000;
}

.papertitle {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 3px 0;
}

.paperauthor {
  font-size: 14px;
  font-weight: 300;
  color: #4f4f4f;
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: 3px;
}

.author-highlight {
  color: rgb(28, 145, 110);
  font-weight: bold;
}

.nav-link {
  color: #000;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
}

.nav-link:hover {
  opacity: 0.6;
}

.paper-links {
  margin-top: 5px;
  font-size: 12px;
}

.paper-links a {
  text-decoration: none;
  font-weight: 400;
  margin-right: 8px;
}

.paper-links a:hover {
  opacity: 0.6;
}

.latest-update {
  font-size: 16px;
  color: #000;
  margin-top: 15px;
  margin-bottom: 0;
  text-align: left;
}

.paperinfo {
  font-size: 14px;
  line-height: 1.3;
  margin-top: 0;
}

.venue {
  display: inline-block;
  margin: 2px 6px 4px 0;
  padding: 0;
  color: #555;
  font-size: 13px;
  letter-spacing: 0.05px;
}

.name {
  padding-top: 0px;
  margin: 0;
  font-size: 30px;
}

/* Bio section table cell styling */
.bio-content {
  padding: var(--content-gap);
  width: 75%;
  vertical-align: middle;
  background-color: #ffffff;
}

.bio-image-container {
  padding: var(--content-gap);
  width: 25%;
  max-width: 25%;
}

/* Profile image styling */
.bio-section img {
  width: 100%;
  max-width: 100%;
  border-radius: 5px;
}

/* Responsive layout - stacks when viewport is narrow */
@media screen and (max-width: 580px) {
  body {
    padding: 0 0px;
  }

  table {
    width: 100% !important;
    max-width: 100% !important;
  }

  .bio-section tbody,
  .bio-section tr {
    display: flex;
    flex-direction: column;
  }

  .bio-content,
  .bio-image-container {
    width: 100%;
    max-width: 100%;
    text-align: center;
  }

  /* Image appears first and left-aligned */
  .bio-image-container {
    order: -1;
    padding: var(--content-gap) var(--content-gap) calc(var(--content-gap) * 1.5) var(--content-gap);
  }

  .bio-section img {
    width: 30%;
    max-width: 180px;
    margin: 0 auto;
    display: block;
  }

  /* Content section */
  .bio-content {
    padding: var(--content-gap);
  }

  .name {
    font-size: 26px;
  }
}

