/* Site typography scale: title, body, note. */
@import url("https://fonts.googleapis.com/css2?family=Electrolize&display=swap");

:root {
  --global-theme-color: rgb(43, 183, 179);
  --global-hover-color: rgb(43, 183, 179);
  --site-title-size: 2rem;
  --site-text-size: calc(1rem + 2px);
  --site-note-size: 1rem;
  --site-hero-title-size: 2.5rem;
  --site-profile-link-size: 1.8rem;
}

html[data-theme="dark"] {
  --global-theme-color: rgb(43, 183, 179);
  --global-hover-color: rgb(43, 183, 179);
}

body {
  font-size: var(--site-text-size);
}

.home-section h1,
.home-section h2,
.home-news .news-date,
.publication-section h2,
.publications h2.bibliography {
  font-family: "Electrolize";
}

body:has(.home-about) .post-title {
  font-size: var(--site-hero-title-size);
  font-weight: 600;
}

body:has(.home-about) .post-title::after {
  content: " 夏丙一";
}

.navbar-brand {
  font-weight: 600;
}

.navbar-brand.social {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.profile.float-right {
  width: auto;
  max-width: none;
  margin-top: 1.5rem;
  margin-left: 2rem;
  margin-bottom: 1.75rem;
}

.profile.float-right figure,
.profile.float-right picture {
  display: block;
}

.profile.float-right img {
  width: auto;
  height: clamp(16rem, 28vw, 19rem);
  object-fit: cover;
}

.home-section {
  padding: 3.25rem 0;
  border-top: 1px solid var(--global-divider-color);
}

.home-section:first-of-type {
  border-top: 0;
  padding-top: 1.5rem;
}

.home-about p,
.home-projects .research-intro,
.home-projects .project-content p {
  text-align: justify;
  text-justify: inter-word;
}

.home-section h1 {
  font-size: var(--site-title-size);
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.home-news {
  padding: 2rem 0;
}

.home-section p:last-child {
  margin-bottom: 0;
}

.home-news .news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.home-news .news-list li {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1rem;
  padding: 0.42rem 0;
  border-top: 1px solid color-mix(in srgb, var(--global-divider-color) 70%, transparent);
}

.home-news .news-list li:first-child {
  border-top: 0;
}

.home-news .news-date {
  font-size: var(--site-note-size);
  color: var(--global-theme-color);
}

.home-news .news-text {
  font-size: var(--site-note-size);
  line-height: 1.28;
}

.home-projects h2 {
  font-size: var(--site-text-size);
  margin-top: 2rem;
}

.home-projects .research-intro {
  margin: -0.4rem 0 1.1rem;
}

.home-projects .project-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  margin-top: 1rem;
}

.home-projects .project-item {
  display: grid;
  grid-template-columns: minmax(240px, 36%) 1fr;
  gap: 1.25rem;
  align-items: start;
  border-left: 3px solid var(--global-theme-color);
  padding: 0.35rem 0 0.35rem 1rem;
}

.home-projects .project-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--global-divider-color);
  background: color-mix(in srgb, var(--global-card-bg-color) 72%, var(--global-divider-color));
  overflow: hidden;
}

.home-projects .project-media img,
.home-projects .project-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-projects .project-item h3 {
  font-size: var(--site-text-size);
  font-weight: bolder;
  margin-bottom: 0.5rem;
}

.home-projects .project-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: var(--site-note-size);
}

.home-projects .project-links a::before {
  content: "[";
}

.home-projects .project-links a::after {
  content: "]";
}

.publication-section {
  margin-top: 2rem;
}

.publication-section h2 {
  font-size: var(--site-title-size);
  font-weight: 500;
  margin-bottom: 1rem;
}

body:has(.publications) .post-header {
  display: none;
}

.publications {
  margin-top: 0;
}

.publications ol.bibliography li .row {
  display: flex;
  flex-wrap: nowrap;
}

.publications ol.bibliography li .abbr {
  flex: 0 0 20rem;
  max-width: 20rem;
}

.publications ol.bibliography li:has(.preview) .abbr abbr {
  display: none;
}

.publications ol.bibliography li .preview {
  display: block;
  width: 100%;
  height: 12rem;
  object-fit: contain;
}

.publications ol.bibliography li .row > div[id] {
  flex: 1 1 auto;
  max-width: none;
  scroll-margin-top: 5rem;
}

.publications h2.bibliography {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: var(--site-note-size);
  font-weight: 600;
  border-top: 0 !important;
  padding-top: 0 !important;
  margin-top: 1.2rem !important;
  margin-bottom: 0.65rem;
  color: var(--global-text-color-light) !important;
  text-align: right;
}

.publications h2.bibliography::before {
  content: "";
  flex: 1;
  border-top: 1px solid var(--global-divider-color);
}

.publications ol.bibliography li .title {
  font-size: var(--site-text-size);
}

.publications ol.bibliography li .author,
.publications ol.bibliography li .periodical {
  font-size: var(--site-note-size);
}

.publications ol.bibliography li .abbr,
.publications ol.bibliography li .abbr abbr,
.publications ol.bibliography li .links a.btn {
  font-size: var(--site-note-size);
}

.publications ol.bibliography li .links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.publications ol.bibliography li .links a.btn {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--global-theme-color);
  font-weight: inherit;
  line-height: inherit;
  text-transform: none;
  box-shadow: none;
}

.publications ol.bibliography li .links a.btn::before {
  content: "[";
}

.publications ol.bibliography li .links a.btn::after {
  content: "]";
}

.publications ol.bibliography li .links a.btn:hover,
.publications ol.bibliography li .links a.btn:focus {
  background: transparent;
  color: var(--global-theme-color);
  text-decoration: underline;
  box-shadow: none;
}

@media (max-width: 575px) {
  .home-section {
    padding: 2.5rem 0;
  }

  .profile.float-right {
    width: 100%;
    max-width: none;
    margin-top: 0;
    margin-left: 0;
  }

  .profile.float-right img {
    width: 100%;
    height: auto;
  }

  .home-news .news-list li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .home-projects .project-item {
    grid-template-columns: 1fr;
  }

  .publications ol.bibliography li .row {
    flex-wrap: wrap;
  }

  .publications ol.bibliography li .abbr {
    flex: 0 0 100%;
    max-width: 100%;
  }
}
