* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  color-scheme: light;
  --primary-color: #25324f;
  --secondary-color: #2d7ff0;
  --accent-color: #e35aa6;
  --text-color: #30343b;
  --muted-color: #6b7280;
  --light-gray: #f5f7fa;
  --medium-gray: #d8ddf3;
  --page-color: #ffffff;
  --surface-color: #ffffff;
  --image-surface-color: #ffffff;
  --section-border-color: #d8ddf3;
  --soft-shadow: 0 4px 14px rgba(23, 35, 51, 0.08);
  --publication-shadow: 0 2px 8px rgba(23, 35, 51, 0.08);
  --publication-hover-shadow: 0 10px 24px rgba(45, 127, 240, 0.16);
  --profile-shadow: 0 4px 12px rgba(23, 35, 51, 0.16);
  --glass-border: rgba(255, 255, 255, 0.78);
  --glass-sheen-a: rgba(255, 255, 255, 0.72);
  --glass-sheen-b: rgba(255, 255, 255, 0.18);
  --glass-sheen-c: rgba(255, 255, 255, 0.5);
  --glass-sheen-focus: rgba(255, 255, 255, 0.92);
  --badge-sheen: rgba(255, 255, 255, 0.82);
  --badge-glow: rgba(255, 255, 255, 0.72);
  --news-date-base: #edf7ff;
  --news-date-color: #356d95;
  --news-date-layer-a: rgba(191, 229, 255, 0.58);
  --news-date-layer-b: rgba(248, 199, 223, 0.48);
  --news-date-shadow: 0 7px 18px rgba(45, 127, 240, 0.1);
  --news-date-highlight: rgba(255, 255, 255, 0.88);
  --badge-glass-a: rgba(255, 255, 255, 0.72);
  --badge-glass-b: rgba(255, 255, 255, 0.32);
  --badge-tint-a: rgba(191, 229, 255, 0.32);
  --badge-tint-b: rgba(248, 199, 223, 0.28);
  --badge-shadow: 0 7px 18px rgba(45, 127, 240, 0.1);
  --badge-hover-shadow: 0 11px 24px rgba(45, 127, 240, 0.16), 0 4px 10px rgba(227, 90, 166, 0.12);
  --top-button-bg: rgba(191, 229, 255, 0.9);
  --top-button-hover-bg: rgba(248, 199, 223, 0.92);
  --top-button-color: #315f84;
  --theme-gradient: linear-gradient(90deg, #bfe5ff 0%, #f8c7df 100%);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --primary-color: #e8eefb;
  --secondary-color: #9ccfff;
  --accent-color: #f4a5ca;
  --text-color: #d7deea;
  --muted-color: #9aa8bd;
  --light-gray: #182133;
  --medium-gray: #2a3850;
  --page-color: #0c1220;
  --surface-color: #111a2b;
  --image-surface-color: #0f1726;
  --section-border-color: #26344b;
  --soft-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
  --publication-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  --publication-hover-shadow: 0 14px 32px rgba(74, 144, 226, 0.16);
  --profile-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-sheen-a: rgba(255, 255, 255, 0.18);
  --glass-sheen-b: rgba(255, 255, 255, 0.05);
  --glass-sheen-c: rgba(255, 255, 255, 0.11);
  --glass-sheen-focus: rgba(255, 255, 255, 0.24);
  --badge-sheen: rgba(255, 255, 255, 0.16);
  --badge-glow: rgba(255, 255, 255, 0.14);
  --news-date-base: #101a2b;
  --news-date-color: #f2f8ff;
  --news-date-layer-a: rgba(59, 94, 130, 0.28);
  --news-date-layer-b: rgba(104, 67, 91, 0.18);
  --news-date-shadow: 0 7px 18px rgba(0, 0, 0, 0.2);
  --news-date-highlight: rgba(255, 255, 255, 0.22);
  --badge-glass-a: rgba(255, 255, 255, 0.13);
  --badge-glass-b: rgba(255, 255, 255, 0.05);
  --badge-tint-a: rgba(95, 139, 181, 0.18);
  --badge-tint-b: rgba(176, 110, 145, 0.14);
  --badge-shadow: 0 7px 18px rgba(0, 0, 0, 0.18);
  --badge-hover-shadow: 0 10px 24px rgba(0, 0, 0, 0.24), 0 2px 8px rgba(112, 169, 216, 0.08);
  --top-button-bg: #263a57;
  --top-button-hover-bg: #4a3c5b;
  --top-button-color: #d8e8f6;
  --theme-gradient: linear-gradient(90deg, #70a9d8 0%, #d18ab0 100%);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--page-color);
  color: var(--text-color);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  padding: 20px;
  transition: background-color 0.35s ease, color 0.35s ease;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

p + p {
  margin-top: 0.85rem;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

.header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 2rem 0 3rem;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.name-row {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.name {
  color: var(--primary-color);
  font-size: 2.6rem;
  font-weight: 650;
  line-height: 1.15;
  margin-bottom: 0;
  transition: color 0.35s ease;
}

.profile-photo-container {
  display: block;
  flex: 0 0 auto;
}

.profile-photo {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  box-shadow: var(--profile-shadow);
  display: block;
  height: auto;
  object-fit: cover;
  width: 210px;
}

.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.35rem;
  margin-top: 1.15rem;
}

.contact-info a,
.email-display {
  color: var(--secondary-color);
  cursor: pointer;
  font-weight: 500;
  position: relative;
}

.theme-switch {
  align-items: center;
  background: var(--surface-color);
  border: 1px solid var(--section-border-color);
  border-radius: 50%;
  box-shadow: var(--publication-shadow);
  color: var(--muted-color);
  cursor: pointer;
  display: grid;
  flex: 0 0 auto;
  height: 2.25rem;
  justify-content: center;
  padding: 0;
  position: relative;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
  width: 2.25rem;
  z-index: 20;
}

.theme-switch:hover {
  background: var(--light-gray);
  box-shadow:
    0 12px 28px rgba(45, 127, 240, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: var(--primary-color);
  opacity: 1;
  transform: translateY(-2px);
}

.theme-switch:focus-visible {
  outline: 2px solid var(--secondary-color);
  outline-offset: 3px;
}

:root[data-theme="dark"] .theme-switch:hover {
  background: rgba(17, 26, 43, 0.72);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.theme-icon {
  grid-area: 1 / 1;
  height: 1.1rem;
  position: relative;
  transition: opacity 0.25s ease, transform 0.25s ease;
  width: 1.1rem;
}

.theme-icon-sun {
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow:
    0 -0.45rem 0 -0.34rem currentColor,
    0 0.45rem 0 -0.34rem currentColor,
    0.45rem 0 0 -0.34rem currentColor,
    -0.45rem 0 0 -0.34rem currentColor,
    0.32rem 0.32rem 0 -0.34rem currentColor,
    -0.32rem 0.32rem 0 -0.34rem currentColor,
    0.32rem -0.32rem 0 -0.34rem currentColor,
    -0.32rem -0.32rem 0 -0.34rem currentColor;
}

.theme-icon-moon {
  border-radius: 50%;
  box-shadow: inset 0.34rem -0.34rem 0 0 currentColor;
}

:root[data-theme="light"] .theme-icon-sun,
:root[data-theme="dark"] .theme-icon-moon {
  opacity: 0;
  transform: scale(0.65) rotate(-35deg);
}

:root[data-theme="dark"] .theme-icon-sun,
:root[data-theme="light"] .theme-icon-moon {
  opacity: 1;
}

.contact-info a::after,
.email-display::after {
  background: currentColor;
  bottom: -2px;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  transition: width 0.2s ease;
  width: 0;
}

.contact-info a:hover::after,
.email-display:hover::after {
  width: 100%;
}

.section {
  animation: fadeIn 0.45s ease both;
  background-color: var(--surface-color);
  border: 1px solid var(--section-border-color);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  margin-bottom: 2.5rem;
  padding: 1rem 1.5rem 1.35rem;
  transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.heading {
  border-bottom: 2px solid transparent;
  border-image: var(--theme-gradient) 1;
  color: var(--primary-color);
  font-size: 1.75rem;
  line-height: 1.3;
  margin-bottom: 1rem;
  padding-bottom: 0.45rem;
}

.loading,
.empty-state {
  color: var(--muted-color);
}

.news-item {
  align-items: baseline;
  border-left: 3px solid transparent;
  border-image: linear-gradient(180deg, #bfe5ff 0%, #f8c7df 100%) 1;
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-left: 1rem;
}

.news-date {
  --light-x: 50%;
  --light-y: 35%;
  background:
    linear-gradient(135deg, var(--news-date-layer-a), var(--news-date-layer-b)),
    var(--news-date-base);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  box-shadow:
    var(--news-date-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(37, 50, 79, 0.08);
  color: var(--news-date-color);
  flex: 0 0 5.9rem;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1;
  overflow: hidden;
  padding: 0.28rem 0.58rem;
  position: relative;
  text-align: center;
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
}

.news-date::before {
  background:
    linear-gradient(145deg, var(--glass-sheen-a), var(--glass-sheen-b) 44%, var(--glass-sheen-c)),
    radial-gradient(ellipse at 30% 12%, var(--glass-sheen-focus), transparent 42%);
  bottom: 0;
  content: "";
  left: 0;
  opacity: 0.82;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 0;
}

.news-date::after {
  background:
    radial-gradient(circle at var(--light-x) var(--light-y), var(--news-date-highlight), rgba(255, 255, 255, 0.18) 16%, transparent 42%),
    radial-gradient(circle at calc(var(--light-x) + 16%) calc(var(--light-y) + 12%), rgba(191, 229, 255, 0.46), transparent 48%),
    radial-gradient(circle at calc(var(--light-x) - 18%) calc(var(--light-y) - 14%), rgba(248, 199, 223, 0.38), transparent 44%);
  bottom: -18%;
  content: "";
  left: -18%;
  opacity: 0.72;
  pointer-events: none;
  position: absolute;
  right: -18%;
  top: -18%;
  transition: background 0.12s ease;
  z-index: 0;
}

.news-date-text {
  position: relative;
  z-index: 1;
}

.news-content {
  min-width: 0;
}

.news-more {
  margin-top: 0.25rem;
}

.news-more > summary {
  color: var(--secondary-color);
  cursor: pointer;
  display: inline-flex;
  font-weight: 500;
  gap: 0.35rem;
  user-select: none;
}

.news-more > summary::-webkit-details-marker {
  display: none;
}

.news-more > summary::before {
  content: ">";
  transition: transform 0.2s ease;
}

.news-more[open] > summary::before {
  transform: rotate(90deg);
}

.publications {
  display: grid;
  gap: 1.5rem;
}

.publication {
  animation: fadeIn 0.45s ease both;
  background-color: var(--surface-color);
  border-radius: 8px;
  box-shadow: var(--publication-shadow);
  display: flex;
  gap: 1.35rem;
  padding: 1rem;
  transition: background-color 0.35s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.publication:hover {
  box-shadow: var(--publication-hover-shadow);
  transform: translateY(-2px);
}

.publication-image {
  align-items: center;
  aspect-ratio: 16 / 9;
  display: flex;
  flex: 0 0 220px;
  justify-content: center;
  overflow: hidden;
  width: 220px;
}

.publication-image img,
.publication-image video {
  background: var(--image-surface-color);
  border-radius: 4px;
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.publication-placeholder {
  align-items: center;
  background: var(--light-gray);
  border: 1px solid var(--section-border-color);
  border-radius: 4px;
  color: var(--primary-color);
  display: flex;
  font-size: 1rem;
  font-weight: 650;
  height: 100%;
  justify-content: center;
  letter-spacing: 0;
  width: 100%;
}

.publication-content {
  flex: 1;
}

.papertitle {
  color: var(--primary-color);
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.publication-authors {
  color: var(--muted-color);
  margin-bottom: 0.4rem;
}

.publication-venue {
  font-style: italic;
  margin-bottom: 0.45rem;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.publication-link {
  align-items: center;
  background:
    linear-gradient(135deg, var(--badge-glass-a), var(--badge-glass-b)),
    linear-gradient(135deg, var(--badge-tint-a), var(--badge-tint-b));
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  box-shadow:
    var(--badge-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -1px 0 rgba(37, 50, 79, 0.08);
  display: inline-flex;
  justify-content: center;
  line-height: 1;
  overflow: hidden;
  padding: 0.16rem;
  position: relative;
  transition: box-shadow 0.2s ease, filter 0.2s ease, transform 0.2s ease;
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  backdrop-filter: blur(14px) saturate(1.35);
}

.publication-link::before {
  background: linear-gradient(120deg, var(--badge-sheen), rgba(255, 255, 255, 0));
  content: "";
  height: 42%;
  left: 12%;
  opacity: 0.7;
  position: absolute;
  right: 12%;
  top: 8%;
}

.publication-link::after {
  background: radial-gradient(circle at 30% 20%, var(--badge-glow), transparent 56%);
  bottom: 0;
  content: "";
  left: 0;
  opacity: 0.55;
  position: absolute;
  right: 0;
  top: 0;
}

.publication-link:hover {
  box-shadow:
    var(--badge-hover-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(37, 50, 79, 0.1);
  filter: brightness(1.04) saturate(1.08);
  transform: translateY(-2px);
}

.publication-link img {
  border-radius: 999px;
  display: block;
  height: 20px;
  position: relative;
  z-index: 1;
}

#backToTop {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.08)),
    var(--top-button-bg);
  border: 0;
  border-radius: 8px;
  bottom: 20px;
  box-shadow:
    0 8px 20px rgba(45, 127, 240, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  color: var(--top-button-color);
  cursor: pointer;
  display: none;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.75rem 0.9rem;
  position: fixed;
  right: 24px;
  transition: background-color 0.28s ease, box-shadow 0.28s ease, opacity 0.28s ease, transform 0.28s ease;
}

#backToTop:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.1)),
    var(--top-button-hover-bg);
  box-shadow:
    0 10px 24px rgba(227, 90, 166, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
  transform: translateY(-1px);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  body {
    padding: 0;
  }

  .container {
    padding: 1rem;
  }

  .header {
    flex-direction: column-reverse;
    gap: 1.2rem;
    margin: 1rem 0 2rem;
    text-align: center;
  }

  .name {
    font-size: 2.1rem;
  }

  .profile-photo {
    width: 180px;
  }

  .contact-info {
    justify-content: center;
  }

  .contact-info a,
  .email-display {
    background: var(--light-gray);
    border-radius: 4px;
    padding: 0.45rem 0.7rem;
  }

  .section {
    padding: 0.9rem 1rem 1.15rem;
  }

  .heading {
    font-size: 1.45rem;
  }

  .publication {
    flex-direction: column;
  }

  .publication-image {
    flex-basis: auto;
    width: 100%;
  }
}
