html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

html {
  scroll-padding-top: 96px;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f4f4f9;
  color: #333;
  font-size: 18px;
}

header {
  position: sticky;
  top: 0;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1rem 2rem;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.header-nav a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.header-nav a:hover {
  background-color: rgba(0, 122, 255, 0.08);
  color: #007aff;
}

.site-title {
  font-size: 1.8em;
  font-weight: bold;
  flex-grow: 1;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 2rem;
  gap: 2rem;
}

#about,
#others,
#links,
#research {
  width: 100%;
  max-width: 800px;
  text-align: left;
}

#about ul,
#others ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.about-table {
  width: 100%;
  border-collapse: collapse;
}

.about-table th,
.about-table td {
  padding: 0 0 0.8rem;
  vertical-align: top;
  border: none;
}

.about-table th {
  width: 9rem;
  padding-right: 1.25rem;
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}

#about ul li,
#others ul li {
  margin-bottom: 0.8rem;
}

#links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#links ul li {
  margin-bottom: 0.8rem;
}

#links ul a {
  text-decoration: none;
  color: #007aff;
  font-weight: 500;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

#links ul a:hover {
  color: #0056b3;
}

.link-icon {
  height: 1.2em;
  width: 1.2em;
  display: inline-block;
  filter: invert(14%) sepia(75%) saturate(1294%) hue-rotate(199deg)
    brightness(99%) contrast(104%);
}

#links ul a:hover .link-icon {
  filter: invert(31%) sepia(94%) saturate(2140%) hue-rotate(198deg)
    brightness(98%) contrast(102%);
}

.doi-link {
  text-decoration: none;
  color: #007aff;
  font-weight: 500;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

.doi-link:hover {
  color: #0056b3;
}

.doi-icon {
  height: 1.1em;
  width: 1.1em;
  display: inline-block;
  filter: invert(14%) sepia(75%) saturate(1294%) hue-rotate(199deg)
    brightness(99%) contrast(104%);
}

.doi-link:hover .doi-icon {
  filter: invert(31%) sepia(94%) saturate(2140%) hue-rotate(198deg)
    brightness(98%) contrast(102%);
}

#about h2,
#others h2,
#links h2,
#research h2 {
  font-size: 1.8rem;
  margin-top: 0;
  margin-bottom: 1rem;
  color: #333;
}

#research ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#research ul > li {
  margin-bottom: 1.5rem;
}

#research ul li h3 {
  font-size: 1.3rem;
  margin: 0 0 0.5rem 0;
  color: #444;
}

#research ol {
  margin: 0.5rem 0 0 1.25rem;
  padding: 0;
}

#research ol li {
  margin-bottom: 0.8rem;
  color: #444;
  font-size: 1.05em;
  line-height: 1.5;
}

footer {
  position: relative;
  margin-top: auto;
  width: 100%;
  text-align: center;
  padding: 1em 0;
  background: #f5f5f5;
  font-size: 1rem;
  color: #888;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

.footer-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

.footer-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #e0e0e0;
  color: #333;
  text-decoration: none;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  font-size: 1.2em;
}

.footer-icons a:hover {
  background-color: #007aff;
  color: white;
}

.footer-icon-img {
  width: 24px;
  height: 24px;
  filter: invert(33%) sepia(88%) saturate(695%) hue-rotate(180deg)
    brightness(99%) contrast(95%);
}

.footer-icons a:hover .footer-icon-img {
  filter: invert(100%) sepia(100%) saturate(10000%) hue-rotate(0deg)
    brightness(100%) contrast(100%);
}

footer p {
  margin: 0;
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 84px;
  }

  body {
    font-size: 16px;
  }

  header {
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .site-title {
    font-size: 1.2em;
  }

  .header-nav ul {
    gap: 0.4rem;
  }

  .header-nav a {
    padding: 0.2rem 0.3rem;
    font-size: 0.85em;
  }

  main {
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .about,
  .links,
  .research {
    max-width: 100%;
  }

  .about-table th {
    width: 7rem;
    padding-right: 0.75rem;
  }
}
