html {
  scroll-behavior: smooth;
}


body, h1, h2, h3, h4, h5, h6,
p, blockquote, pre, hr,
dl, dd, ol, ul, figure {
  margin: 0;
  padding: 0;
}

*, *::before, *::after { box-sizing: border-box; }

/* ── Base ── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15.5px;
  line-height: 1.78;
  color: #1d1d1f;
  background: #fafaf8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 { font-weight: 600; }

h1, h2, h3, h4, h5, h6,
p, blockquote, pre,
ul, ol, dl, figure,
.highlight { margin-bottom: 16px; }

a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:link { color: #2563eb; }
a:visited { color: #2563eb; }
a:hover { color: #1d4ed8; text-decoration: underline; }

u { text-decoration: none; }
.upper { text-transform: uppercase; }

/* ── Layout ── */
.wrapper {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 56px;
}

.wrapper::after {
  content: "";
  display: table;
  clear: both;
}

@media screen and (max-width: 800px) {
  .wrapper { padding: 0 24px; }
}

/* ── Header ── */
.site-header {
  border-bottom: none;
  min-height: auto;
  padding: 10px 0 0;
}

.site-header .navigation-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 5px;
  border-bottom: 1px solid #e5e5e0;
}

/* ── Nav links ── */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
  text-decoration: none;
}

.nav-link:link, .nav-link:visited { color: #4b5563; }

.nav-link:hover {
  color: #1d1d1f;
  background: #f0efeb;
  text-decoration: none;
}

.site-header .navigation-wrapper::after {
  display: none;
}

.site-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #1d1d1f;
  margin: 0;
  display: inline-block;
}

.header-logo {
  flex-shrink: 0;
}

.header-logo img {
  height: 75px;
  width: auto;
}

/* ── Page Content ── */
.page-content {
  padding: 28px 0 80px;
}

/* ── Research Grid ── */
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 48px 0 0;
}

.research-card {
  border-top: 3px solid var(--accent, #2563eb);
  background: #fff;
  border-radius: 10px;
  padding: 24px 22px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: cardIn 0.5s ease backwards;
}

.research-card:nth-child(1) { animation-delay: 0s; }
.research-card:nth-child(2) { animation-delay: 0.1s; }

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

.research-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* ── Research Foundation (RL) ── */
.research-foundation {
  margin-top: 0;
}

.research-foundation-connector {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
}

.connector-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d1d5db, transparent);
}

.connector-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9ca3af;
}

.research-card-wide {
  animation-delay: 0.2s;
}

.research-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent, #2563eb);
  background: color-mix(in srgb, var(--accent, #2563eb) 8%, transparent);
  padding: 2px 10px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.research-tag-algo {
  color: #9333ea;
  background: color-mix(in srgb, #9333ea 8%, transparent);
}

.research-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.research-icon {
  font-size: 22px;
  line-height: 1;
}

.research-title {
  font-size: 16px;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0;
}

.research-desc {
  font-size: 13.5px;
  line-height: 1.7;
  color: #4b5563;
  margin-bottom: 16px;
}

.research-desc a {
  font-weight: 600;
}

.research-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.research-highlights a {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent, #2563eb);
  background: color-mix(in srgb, var(--accent, #2563eb) 8%, transparent);
  padding: 3px 10px;
  border-radius: 14px;
  transition: background 0.2s ease, color 0.2s ease;
}

.research-highlights a:hover {
  background: var(--accent, #2563eb);
  color: #fff;
  text-decoration: none;
}

@media screen and (max-width: 800px) {
  .research-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ── Hero (intro) layout ── */
.hero {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 48px;
  align-items: start;
  padding: 20px 0 8px;
}

.hero-greeting {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #1d1d1f;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* ── Profile Picture ── */
.profile-picture {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  display: block;
}

.contact-info {
  width: 100%;
  font-size: 13px;
  color: #6b7280;
  line-height: 2;
}

.contact-info strong {
  color: #1d1d1f;
  font-weight: 600;
}

.hero-quote {
  font-size: 14px;
  font-style: italic;
  color: #6b7280;
  border-left: 3px solid #e5e7eb;
  padding-left: 12px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.hero-tagline {
  font-size: 14px;
  color: #4b5563;
  margin-bottom: 14px;
  line-height: 1.6;
}

.research-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.research-chip {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 500;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.01em;
}

.site-subtitle {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: #6b7280;
  margin-top: -12px;
  letter-spacing: 0;
}

.hero-right .social-icons {
  justify-content: flex-start;
  margin: 4px 0 0;
}

.social-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 8px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: #374151;
  background: #fff;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.social-btn:link, .social-btn:visited { color: #374151; }

.social-btn:hover {
  border-color: #1d1d1f;
  color: #1d1d1f;
  background: #f5f5f2;
  transform: translateY(-1px);
  text-decoration: none;
}

.social-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

@media screen and (max-width: 700px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-right {
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
  }

  .profile-picture {
    width: 120px;
    height: 120px;
  }

  .hero-greeting {
    font-size: 26px;
  }
}

/* ── Post ── */
#newsSection,
#newsHeader,
#ExperienceHeader,
#PublicationsHeader,
#ServicesHeader {
  scroll-margin-top: 16px;
}
.post-header {
  margin-top: 40px;
  margin-bottom: 20px;
  padding-bottom: 0px;
  border-bottom: 1px solid #e5e5e0;
}

.post-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  line-height: 1.3;
  color: #1d1d1f;
}

@media screen and (max-width: 800px) {
  .post-title { font-size: 18px; }
}

.post-content {
  display: block;
  margin-bottom: 32px;
  line-height: 1.8;
}

.post-content p { margin-bottom: 16px; }

.post-content h2 { font-size: 28px; }
.post-content h3 { font-size: 22px; }
.post-content h4 { font-size: 18px; }

/* ── Social Icons ── */
.social-icons {
  display: flex;
  gap: 12px;
  margin: 4px 0 16px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f0efeb;
  color: #6b7280;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.social-link:hover {
  background: #1d1d1f;
  color: #fff;
  transform: translateY(-2px);
  text-decoration: none;
}

.social-link:visited { color: #6b7280; }
.social-link:hover:visited { color: #fff; }

.social-link svg {
  width: 18px;
  height: 18px;
}

/* ── Lists ── */
ul, ol { margin-left: 24px; }
li > ul, li > ol { margin-bottom: 0; }
li { margin-bottom: 4px; }

/* ── News list ── */
#newsList {
  list-style: none;
  margin-left: 0;
}

#newsList li {
  padding: 8px 16px;
  border-bottom: 1px solid #ededea;
  line-height: 1.65;
  font-size: 14.5px;
  color: #374151;
  border-left: 3px solid transparent;
  border-radius: 4px;
  transition: background 0.3s ease,
              border-left-color 0.3s ease,
              transform 0.3s ease;
  animation: newsItemIn 0.5s ease backwards;
}

#newsList li:hover {
  background: #f5f5f2;
  border-left-color: #2563eb;
  transform: translateX(2px);
}

#newsList li:last-child {
  border-bottom: none;
}

.news-video-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 28px;
}

.news-video-card {
  margin: 0;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.news-video-card video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  background: #111827;
}

@media screen and (max-width: 800px) {
  .news-video-row {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 24px;
  }
}

#newsList li.news-hidden {
  overflow: hidden;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-width: 0;
  opacity: 0;
  transform: translateY(-8px);
  margin: 0;
  transition: max-height 0.4s cubic-bezier(0.19, 1, 0.22, 1),
              padding 0.4s ease,
              opacity 0.35s ease,
              transform 0.4s ease,
              border-bottom-width 0.3s ease;
}

#newsList li.news-visible {
  max-height: 120px;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 0.5s cubic-bezier(0.19, 1, 0.22, 1),
              padding 0.4s ease,
              opacity 0.45s ease,
              transform 0.45s ease,
              border-bottom-width 0.3s ease;
}

@keyframes newsItemIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* ── Tabs ── */
.tab {
  overflow: hidden;
  margin-bottom: 8px;
  border-bottom: 1px solid #e5e5e0;
}

.tab button {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  outline: none;
  cursor: pointer;
  padding: 10px 16px 10px 0;
  margin-right: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: #9ca3af;
  transition: color 0.2s ease;
}

.tab button:hover {
  color: #1d1d1f;
  font-weight: 400;
}

.tab button.active {
  color: #1d1d1f;
  font-weight: 600;
  border-bottom-color: #1d1d1f;
}

.tabcontent {
  display: none;
  padding: 8px 0;
  border: none;
}

/* ── Experience list ── */
.experience-list {
  list-style: none;
  margin: 0;
}

.experience-item {
  display: flex;
  gap: 20px;
  align-items: stretch;
  padding: 14px 8px;
  border-bottom: 1px solid #ededea;
  border-left: 3px solid transparent;
  border-radius: 4px;
  transition: background 0.3s ease, border-left-color 0.3s ease, transform 0.3s ease;
}

.experience-item:last-child {
  border-bottom: none;
}

.experience-item:hover {
  background: #f5f5f2;
  border-left-color: #2563eb;
  transform: translateX(2px);
}

.exp-logo {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 8px 12px;
}

.exp-logo img {
  width: 100%;
  height: 80px;
  object-fit: contain;
  object-position: center center;
}

.exp-info {
  flex: 3;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 2px;
}

.exp-role {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  line-height: 1.4;
}

.exp-org {
  font-size: 13.5px;
  color: #4b5563;
}

.exp-dates {
  font-size: 13px;
  color: #9ca3af;
}

.exp-note {
  font-size: 13px;
  color: #6b7280;
  margin-top: 2px;
}

.exp-note a {
  color: #2563eb;
  font-weight: 500;
}

/* ── Publications ── */
ul.publications {
  list-style: none;
  margin: 0;
}

ul.publications li {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
  padding: 20px 0 24px 0;
  border-bottom: 1px solid #ededea;
  animation: pubItemIn 0.5s ease backwards;
}

ul.publications li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

@keyframes pubItemIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* ── Publication video thumbnail ── */
.pub-thumb-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  background: #111827;
  display: block;
  cursor: pointer;
}


.pub-thumb {
  flex-shrink: 0;
  width: 240px;
  align-self: stretch;
  position: relative;
}

.pub-thumb::before {
  display: none;
}

.pub-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
}

.pub-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  background: transparent;
  transition: transform 0.45s cubic-bezier(0.19, 1, 0.22, 1),
              border-radius 0.45s ease;
  cursor: pointer;
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.pub-thumb:hover {
  z-index: 999;
}

.pub-thumb:hover img {
  transform: scale(2.8);
  background: transparent;
  border-radius: 4px;
}

.pub-info {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border-left: 3px solid transparent;
  border-radius: 4px;
  transition: background 0.3s ease,
              border-left-color 0.3s ease,
              transform 0.3s ease;
}

.pub-info:hover {
  background: #f5f5f2;
  border-left-color: #2563eb;
  transform: translateX(2px);
}

@media screen and (max-width: 600px) {
  ul.publications li {
    flex-direction: column;
    gap: 14px;
  }

  .pub-thumb {
    width: 100%;
    align-self: auto;
  }

  .pub-thumb img {
    height: 180px;
  }

  .pub-thumb:hover img {
    transform: scale(1.8);
  }
}

ul.publications .title {
  display: block;
  color: #1d1d1f;
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.5;
  margin-bottom: 6px;
}

ul.publications .title a { color: #1d1d1f; transition: color 0.2s ease; }
ul.publications .title a:hover { color: #2563eb; text-decoration: none; }
ul.publications .title img { vertical-align: middle; margin-left: 4px; }

ul.publications .authors {
  display: block;
  font-size: 13.5px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 6px;
}

ul.publications .authors strong {
  color: #1d1d1f;
  font-weight: 600;
}

ul.publications .journal-info {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #1e40af;
  background: #eff6ff;
  padding: 2px 10px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

ul.publications .journal-preprint {
  color: #991b1b;
  background: #fef2f2;
}

ul.publications .year {
  float: right;
  font-size: 13px;
  color: #9ca3af;
  font-weight: 500;
}

ul.publications .links {
  display: block;
  font-size: 13.5px;
  margin-top: 8px;
}

ul.publications .links a {
  color: #2563eb;
  font-weight: 500;
}

ul.publications .oral {
  color: #059669;
  font-weight: 600;
  font-size: 13.5px;
  font-style: normal;
}

ul.publications .pub-highlight {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #92400e;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  padding: 3px 12px;
  border-radius: 4px;
  margin-left: 8px;
}

ul.publications .pub-highlight a {
  color: #92400e;
  text-decoration: underline;
  text-underline-offset: 2px;
}

ul.publications .pub-highlight a:hover {
  color: #78350f;
}

ul.publications .intro {
  display: block;
  color: #6b7280;
  font-size: 13.5px;
}

.footnote {
  display: block;
  font-size: 13.5px;
  color: #9ca3af;
}

/* ── Publication note ── */
.pub-note {
  font-size: 12px;
  color: #9ca3af;
  margin: -8px 0 0;
  letter-spacing: 0.02em;
}

/* ── News toggle ── */
.news-toggle {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 6px 18px;
  border: 1px solid #e5e5e0;
  border-radius: 20px;
  background: transparent;
  transition: all 0.3s ease;
}

.news-toggle:visited { color: #6b7280; }
.news-toggle:hover {
  color: #1d1d1f;
  border-color: #1d1d1f;
  text-decoration: none;
}

/* ── Friends grid ── */
.friends-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.friend-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 20px;
  border: 1px solid #e5e5e0;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  min-width: 130px;
}

.friend-card:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
  transform: translateY(-2px);
  text-decoration: none;
}

.friend-name {
  font-size: 14px;
  font-weight: 600;
  color: #1d1d1f;
}

.friend-card:hover .friend-name {
  color: #2563eb;
}

.friend-affil {
  font-size: 12px;
  color: #9ca3af;
}

/* ── Professional Services ── */
.page-content > .wrapper:last-of-type .post-content {
  color: #6b7280;
  font-size: 15px;
}

/* ── ClustrMaps ── */
div[style*="text-align:center"] {
  margin-top: 72px;
  padding-bottom: 32px;
  opacity: 0.35;
  transition: opacity 0.3s ease;
}

div[style*="text-align:center"]:hover { opacity: 0.9; }

/* ── Images ── */
img { max-width: 100%; vertical-align: middle; }
figure > img { display: block; }
figcaption { font-size: 13.5px; color: #9ca3af; }

/* ── Blockquotes ── */
blockquote {
  color: #6b7280;
  border-left: 3px solid #c7d2fe;
  padding-left: 20px;
  font-size: 15px;
  font-style: italic;
}

blockquote > :last-child { margin-bottom: 0; }

/* ── Code ── */
pre, code {
  font-size: 13.5px;
  border: 1px solid #e5e5e0;
  border-radius: 6px;
  background-color: #f5f5f3;
}

code { padding: 2px 6px; }
pre { padding: 14px 18px; overflow-x: auto; }
pre > code { border: 0; padding: 0; }

/* ── Fonts (legacy) ── */
@font-face { font-family: Mukta; src: url('assets/font/Mukta-Light.ttf'); }
@font-face { font-family: Mukta; font-weight: bold; src: url('assets/font/Mukta-SemiBold.ttf'); }
.font { font-family: 'Mukta'; color: transparent; }
html.font-loaded .font { color: inherit; }

/* ── Nav (legacy compat) ── */
.site-nav .menu-icon { display: none; }
.site-nav .page-link { color: #1d1d1f; line-height: 1.5; padding: 8px 0; display: inline-block; }
.site-nav .page-link:not(:last-child) { margin-right: 20px; }
.navigation-wrapper.has-logo .navigation-links { width: 70%; float: left; }

/* ── Footer ── */
.site-footer { border-top: 1px solid #e5e5e0; padding: 24px 0; }
.footer-heading { font-size: 18px; margin-bottom: 12px; }
.contact-list, .social-media-list { list-style: none; margin-left: 0; }

/* ── Icons ── */
.icon > svg { display: inline-block; vertical-align: middle; }
.icon > svg path { fill: #9ca3af; }
.fa { padding: 3px; font-size: 20px; text-align: center; text-decoration: none; }

/* ── Syntax highlighting ── */
.highlight { background: #fff; }
.highlighter-rouge .highlight { background: #f5f5f3; }
.highlight .c { color: #998; font-style: italic; }
.highlight .err { color: #a61717; background-color: #e3d2d2; }
.highlight .k { font-weight: bold; }
.highlight .o { font-weight: bold; }
