:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --bg-muted: #ffffff;
  --text: #0f172a;
  --text-soft: #4b566f;
  --accent: #4b5bff;
  --accent-strong: #c889ff;
  --border: rgba(15, 23, 42, 0.12);
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --theme-transition: 800ms cubic-bezier(.4, 0, .2, 1);
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #05050b;
  --bg-muted: #0f1220;
  --text: #f6f7fb;
  --text-soft: #9aa6ca;
  --accent: #8a98ff;
  --accent-strong: #f09eff;
  --border: rgba(246, 247, 251, 0.16);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: 'Inter', 'SF Pro Display', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  /* Subtle single linear gradient with high transparency */
  background: linear-gradient(120deg, rgba(75, 91, 255, 0.3), transparent 55%), var(--bg);
  line-height: 1.6;
  transition: background-color var(--theme-transition), color var(--theme-transition);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

main {
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 140px 0 100px;
}

.site-header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px min(5vw, 3rem);
  background: rgba(247, 248, 251, 0.85);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  z-index: 20;
  transition: background-color var(--theme-transition), border-color var(--theme-transition);
}

:root[data-theme='dark'] .site-header {
  background: rgba(5, 5, 11, 0.85);
}

.brand {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

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

nav a {
  font-weight: 500;
  color: var(--text-soft);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

nav a.active {
  color: var(--accent);
  border-color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  gap: 5px;
  position: relative;
  z-index: 50;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-theme {
  margin-left: 0.5rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color var(--theme-transition);
}

.theme-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent-strong), var(--accent));
}

:root[data-theme='dark'] .theme-icon {
  background: radial-gradient(circle at 30% 30%, var(--accent), #11152a);
}

@media (max-width: 720px) {
  nav ul {
    position: fixed;
    top: 0;
    right: 0;
    height: 50vh;
    height: 50dvh;
    width: min(280px, 75vw);
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 120px 2rem 2rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.22);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 40;
    overflow-y: auto;
  }

  nav ul.open {
    transform: translateX(0);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-theme {
    width: 100%;
  }

  .theme-toggle {
    width: 100%;
    justify-content: center;
  }
}

.eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin: 0 0 10px;
}

h1,
h2,
h3,
h4 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  margin-top: 0;
  color: var(--text);
}

.profile {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  gap: 48px;
  margin-bottom: 80px;
}

.profile-identity {
  align-self: start;
  padding: 1.2rem;
  border-radius: 36px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: background-color var(--theme-transition), border-color var(--theme-transition), box-shadow var(--theme-transition);
}

.profile-identity img {
  border-radius: 28px;
}

.profile-content h1 {
  font-size: clamp(2rem, 3.2vw, 3.4rem);
  margin-bottom: 0.4rem;
}

.profile-role {
  margin: 0 0 1rem;
  color: var(--text-soft);
  font-weight: 500;
}

.profile-summary {
  margin-bottom: 1.3rem;
  color: var(--text-soft);
}

.profile-summary a {
  color: var(--accent);
}

.profile-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin: 0 0 1.5rem;
}

.profile-meta dt {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.35rem;
}

.profile-meta dd {
  margin: 0;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.65rem 1.4rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, color var(--theme-transition), border-color var(--theme-transition);
}

.btn.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #fff;
}

.btn.ghost {
  border-color: var(--border);
  color: var(--text);
}

.btn:hover {
  transform: translateY(-2px);
}

.social-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0;
  margin: 0 0 1.5rem;
}

.social-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-soft);
  transition: background-color var(--theme-transition), color var(--theme-transition), border-color var(--theme-transition);
}

.social-list svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.profile-focus h2 {
  font-size: 1.15rem;
  margin-bottom: 0.8rem;
}

.bullet-list {
  padding-left: 1rem;
  margin: 0;
  color: var(--text-soft);
  display: grid;
  gap: 0.65rem;
}

.section {
  margin-bottom: 72px;
}

.section-lede {
  color: var(--text-soft);
  margin-top: -0.4rem;
}

.news-year {
  border-bottom: 1px dashed var(--border);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}

.news-year h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.news-list {
  list-style: none;
  margin: 0.5rem 0 1rem 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.news-list li {
  padding: 0;
}

.news-list p {
  margin: 0;
}

.news-list a {
  color: var(--accent);
}

.news-month {
  font-weight: 500;
}

.news-month::before {
  content: '[';
}

.news-month::after {
  content: ']';
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 1.5rem;
}

.pub-item {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.pub-figure {
  margin: 0;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: radial-gradient(circle, rgba(75, 91, 255, 0.2), transparent);
  transition: background-color var(--theme-transition), background 400ms ease;
}

:root[data-theme='dark'] .pub-figure {
  background: radial-gradient(circle, rgba(75, 91, 255, 0.2), transparent), #ffffff;
}

.pub-figure img,
.pub-figure video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pub-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pub-venue {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin: 0;
}

.pub-authors {
  margin: 0;
  color: var(--text-soft);
}

.pub-authors b {
  font-weight: 700;
  color: var(--text);
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pub-links a {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  transition: background-color var(--theme-transition), color var(--theme-transition), border-color var(--theme-transition);
}

.visitor-map .map-frame {
  margin-top: 1.5rem;
  padding: 1.2rem;
  border-radius: 24px;
  border: 1px dashed var(--border);
}

.site-footer {
  padding: 40px;
  text-align: center;
  color: var(--text-soft);
}

.back-to-top {
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.back-to-top:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-2px);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 900px) {
  .profile {
    grid-template-columns: 1fr;
  }

  .profile-identity {
    max-width: 340px;
    margin: 0 auto;
  }

  .pub-item {
    grid-template-columns: 1fr;
  }

  .news-list li {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .site-header,
  .profile-identity,
  .btn,
  .pub-figure,
  .pub-links a,
  .social-list a,
  .theme-toggle {
    transition: none !important;
  }
}
