/* Warm off-white background for light mode */
html[data-theme="light"] body {
  background-color: #fdf8f2;
}

/* X (Twitter) icon, sized to match the Font Awesome icons beside it */
.icon-x {
  vertical-align: -0.15em;
}

/* Profile header */
.header-container .social-icons {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
}

.header-container .social-icons a {
  width: 2.1rem;
  height: 2.1rem;
  line-height: 2.2rem;
  font-size: 1.05rem;
}

.header-container .social-icons a:hover {
  background-color: var(--global-theme-color) !important;
  color: #fff !important;
  transform: scale(1.15);
}

html[data-theme="dark"] .header-container .social-icons a:hover {
  background-color: var(--global-hover-color) !important;
  color: #1c1c1c !important;
}

/* Dark mode toggle */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(128, 128, 128, 0.25);
  border-radius: 100%;
  background: var(--global-bg-color, #fff);
  color: #043361;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

html[data-theme="dark"] .theme-toggle {
  color: #3eb7f0;
  background: #20212b;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.theme-toggle:hover {
  background-color: var(--global-theme-color);
  color: #fff;
  transform: scale(1.1);
}

html[data-theme="dark"] .theme-toggle:hover {
  background-color: var(--global-hover-color);
  color: #1c1c1c;
}

@media print, screen and (max-width: 480px) {
  .theme-toggle {
    top: 12px;
    right: 12px;
    width: 2.1rem;
    height: 2.1rem;
  }
}

.theme-toggle .theme-icon-sun,
.theme-toggle .theme-icon-moon {
  display: none;
}

html[data-theme="light"] .theme-toggle .theme-icon-moon {
  display: block;
}

html[data-theme="dark"] .theme-toggle .theme-icon-sun {
  display: block;
}

/* Links — use the site's own theme colors instead of the default blue */
a {
  color: var(--global-theme-color);
}

a:hover {
  color: var(--global-hover-color);
}

/* Bio */
.bio-text {
  text-align: justify;
}

.more-about-me {
  text-align: right;
  margin-top: 6px;
}

.more-about-me summary {
  display: list-item;
  cursor: pointer;
  color: var(--global-theme-color);
  font-size: 13px;
  font-weight: 600;
}

.more-about-me summary:hover {
  color: var(--global-hover-color);
}

.more-about-me p {
  text-align: right;
  font-size: 13.5px;
  font-style: italic;
  color: #777;
  max-width: 400px;
  margin: 8px 0 0 auto;
}

html[data-theme="dark"] .more-about-me p {
  color: #aaa;
}

/* Section title accent */
section h2 {
  position: relative;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 10px;
  text-align: center;
}

section h2::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--global-theme-color), var(--global-hover-color));
}

#publications {
  margin-top: 2px;
  margin-bottom: -15px;
}

/* Section dividers */
hr.section-divider {
  border: none;
  height: 1px;
  margin: 36px 0;
  background: linear-gradient(to right, transparent, var(--global-theme-color) 50%, transparent);
  opacity: 0.35;
}

/* News section */
.news-box {
  max-height: 205px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(to bottom, black calc(100% - 22px), transparent 100%);
}

.news-item {
  padding: 4px 0;
  font-size: 14px;
  border: none;
  margin: 0;
}

.news-item + .news-item {
  border-top: 1px solid rgba(128, 128, 128, 0.15);
}

.news-date-paper,
.news-date-internship,
.news-date-blog,
.news-date-competition {
  flex-shrink: 0;
  width: 62px;
  display: inline-block;
  font-weight: bold;
}

/* Publications box */
.publications .author {
  font-size: 13.5px;
}

.publications .periodical {
  font-size: 13px;
}

.publications-box {
  max-height: 430px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 40px), transparent 100%);
  mask-image: linear-gradient(to bottom, black calc(100% - 40px), transparent 100%);
}

.publications ol.bibliography li .teaser {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(128, 128, 128, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.publications ol.bibliography li .teaser:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .publications ol.bibliography li .teaser {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .publications ol.bibliography li .teaser:hover {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.6);
}

/* Research Experience */
.industry-list {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: start;
  column-gap: 10px;
  row-gap: 10px;
  margin-top: 10px;
}

.industry-logo {
  display: block;
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  padding: 2px;
  object-fit: contain;
  background: #fff;
  border-radius: 5px;
  margin: 2px 0 0;
  justify-self: start;
}

.industry-focus {
  font-size: 13px;
  font-style: italic;
  color: #777;
}

.industry-org {
  font-weight: 700;
  font-size: 16px;
}

.industry-role {
  font-style: italic;
  font-weight: 400;
  font-size: 13px;
}

.industry-time {
  font-size: 13px;
  color: #777;
  white-space: nowrap;
  margin-top: 2px;
}

html[data-theme="dark"] .industry-time,
html[data-theme="dark"] .industry-focus {
  color: #aaa;
}

/* Awards section */
.awards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
  margin-top: 10px;
}

@media (max-width: 640px) {
  .awards-grid {
    grid-template-columns: 1fr;
    gap: 20px 0;
  }
}

.award-category-block h4 {
  font-size: 15px;
  margin: 0 0 8px;
}

.award-header-logo {
  box-sizing: content-box;
  height: 18px;
  width: auto;
  max-width: 40px;
  padding: 2px;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  vertical-align: middle;
  margin-right: 6px;
  margin-top: -3px;
}

.award-list i[title] {
  cursor: help;
}

.award-list {
  list-style-type: none;
  padding-left: 0;
  margin-top: 0;
}

.award-list li {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  gap: 2px 8px;
  padding: 5px 0;
  font-size: 13px;
  border-top: 1px solid rgba(128, 128, 128, 0.15);
}

.award-text-nowrap {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.award-note {
  font-size: 10.5px;
  color: #777;
}

.award-list li:first-child {
  border-top: none;
}

.award-date {
  font-weight: 600;
  font-size: 11.5px;
  color: #777;
}

.award-badge {
  display: inline-block;
  min-width: 42px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  color: #fff;
}

.award-tier-gold {
  background: linear-gradient(135deg, #f2cf6e, #c8992f);
  color: #3a2c00;
}

.award-tier-silver {
  background: linear-gradient(135deg, #e4e6e9, #b3b9c0);
  color: #2a2a2a;
}

.award-tier-bronze {
  background: linear-gradient(135deg, #dba374, #a86a3c);
  color: #341c00;
}

.award-tier-special {
  background: var(--global-theme-color);
}

html[data-theme="dark"] .award-date,
html[data-theme="dark"] .award-note {
  color: #aaa;
}

/* Services section */
.service-list {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  column-gap: 10px;
  row-gap: 8px;
  list-style: none;
  padding-left: 0;
  margin: 8px 0 0;
  font-size: 13.5px;
}

.service-list li {
  display: contents;
}

.service-year {
  font-size: 11.5px;
  font-weight: 600;
  color: #777;
}

html[data-theme="dark"] .service-year {
  color: #aaa;
}
