:root {
  --flat-bg: #ffffff;
  --flat-muted: rgba(0, 0, 0, 0.6);
  --flat-border: rgba(0, 0, 0, 0.08);
  --flat-card: rgba(0, 0, 0, 0.03);
  --flat-accent: #111827;
  --flat-radius: 0;
  --highlight-education: #b7791f;
  --highlight-interests: #0f766e;
  --highlight-methodology: #1d4ed8;
  --highlight-personal: #7c3aed;
}

/* Reduce heavy theme chrome for a flatter look */
.dynamic-title {
  display: none;
}

/* Global square-corner overrides for a flatter UI */
button,
input,
select,
textarea,
.btn,
.form-control,
.input-group-text,
.page-link,
.pagination .page-item .page-link,
.nav-link,
.card,
.post-tag,
.tag,
.badge,
.search-box,
.search-box input,
.search-results,
.dropdown-menu {
  border-radius: var(--flat-radius) !important;
  box-shadow: none;
}

/* Full-width main content (hide the right panel) */
#panel-wrapper {
  display: none !important;
}

#main-wrapper main.col-lg-11,
#main-wrapper main.col-xl-9,
#tail-wrapper.col-lg-11,
#tail-wrapper.col-xl-9 {
  flex: 0 0 100% !important;
  max-width: 100% !important;
}

/* Profile hero */
.profile-hero {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  align-items: center;
  padding: 8px 0 14px;
}

.profile-hero__avatar img {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--flat-card);
}

.profile-hero__name {
  font-size: 1.8rem;
  line-height: 1.2;
  margin: 0;
  color: var(--flat-accent);
}

.profile-hero__headline {
  margin: 6px 0 0;
  color: var(--flat-muted);
}

.profile-hero__location {
  margin: 2px 0 0;
  color: var(--flat-muted);
}

.profile-hero__links {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--flat-radius);
  background: var(--flat-card);
  color: var(--flat-accent) !important;
  text-decoration: none;
}

.icon-link:hover {
  background: rgba(0, 0, 0, 0.06);
  text-decoration: none;
}

/* Sidebar directory (remove rounded tiles) */
#sidebar .nav-link {
  border-radius: 0 !important;
  background: transparent !important;
  padding: 10px 12px;
  text-decoration: none;
}

#sidebar .nav-link:hover,
#sidebar .nav-item.active .nav-link {
  background: var(--flat-card) !important;
  text-decoration: none;
}

/* Quick links (top-nav style; no pill corners) */
.quick-links {
  display: flex;
  gap: 0;
  margin: 6px 0 18px;
  padding: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.quick-links::-webkit-scrollbar {
  display: none;
}

.quick-links__item {
  padding: 10px 14px;
  border-radius: 0;
  color: var(--flat-accent) !important;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
  flex: 0 0 auto;
}

.quick-links__item:hover {
  background: rgba(0, 0, 0, 0.06);
  text-decoration: none;
}

.quick-links__item.is-active {
  background: var(--flat-card);
}

.profile-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 10px 0 22px;
}

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

.profile-highlight {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  padding: 18px 18px 16px;
  border: 1px solid var(--flat-border);
  border-radius: var(--flat-radius);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.95), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(0, 0, 0, 0.02));
  box-shadow: none;
}

.profile-highlight::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: var(--highlight-accent, var(--flat-accent));
}

.profile-highlight--education,
.profile-highlight--personal {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .profile-highlight--education,
  .profile-highlight--personal {
    grid-column: auto;
  }
}

.profile-highlight--education {
  --highlight-accent: var(--highlight-education);
}

.profile-highlight--interests {
  --highlight-accent: var(--highlight-interests);
}

.profile-highlight--methodology {
  --highlight-accent: var(--highlight-methodology);
}

.profile-highlight--personal {
  --highlight-accent: var(--highlight-personal);
}

.profile-highlight__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.profile-highlight__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: var(--flat-radius);
  color: var(--highlight-accent, var(--flat-accent));
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--flat-border);
}

.profile-highlight__heading {
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
}

.profile-highlight__kicker {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--highlight-accent, var(--flat-accent));
}

.profile-highlight__title {
  margin: 0;
  font-size: 1.03rem;
  line-height: 1.3;
  color: var(--flat-accent);
}

.profile-highlight__text {
  margin: 0;
  color: rgba(17, 24, 39, 0.78);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.72;
}

.profile-highlight__list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(17, 24, 39, 0.78);
  font-size: 1.02rem;
  font-weight: 500;
}

.profile-highlight__list li {
  position: relative;
  padding-left: 1rem;
  line-height: 1.72;
}

.profile-highlight__list li::before {
  content: "";
  position: absolute;
  top: 0.72rem;
  left: 0;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: var(--highlight-accent, var(--flat-accent));
}

.profile-highlight__list li + li {
  margin-top: 0.65rem;
}

.profile-highlight__lead {
  color: var(--flat-accent);
  font-weight: 600;
}

.profile-highlight__sublist {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
}

.profile-highlight__sublist li {
  position: relative;
  padding-left: 1rem;
  color: rgba(17, 24, 39, 0.72);
  font-size: 0.98rem;
  font-weight: 500;
}

.profile-highlight__sublist li::before {
  content: "";
  position: absolute;
  top: 0.52rem;
  left: 0.1rem;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.45);
}

.profile-highlight__sublist li + li {
  margin-top: 0.3rem;
}

.profile-highlight--education .profile-highlight__icon {
  background: rgba(183, 121, 31, 0.12);
}

.profile-highlight--interests .profile-highlight__icon {
  background: rgba(15, 118, 110, 0.12);
}

.profile-highlight--methodology .profile-highlight__icon {
  background: rgba(29, 78, 216, 0.11);
}

.profile-highlight--personal .profile-highlight__icon {
  background: rgba(124, 58, 237, 0.1);
}

/* About layout */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-top: 10px;
}

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

.about-grid__col {
  min-height: 0;
}

.about-text p {
  margin: 0 0 0.8rem;
}

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

@media (min-width: 901px) {
  .timeline {
    padding-right: 6px;
    scrollbar-gutter: stable;
  }
}

.timeline__item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  padding: 10px 0;
}

.timeline__date {
  font-variant-numeric: tabular-nums;
  color: var(--flat-muted);
}

.timeline__text {
  color: var(--flat-accent);
}

.research-figure {
  margin: 10px 0 0;
}

.research-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--flat-radius);
  background: var(--flat-card);
}

.research-figure figcaption {
  margin-top: 8px;
  color: var(--flat-muted);
}

/* Publications */
.pub-tabs {
  display: flex;
  gap: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  margin: 10px 0 14px;
  scrollbar-width: none;
}

.pub-tabs::-webkit-scrollbar {
  display: none;
}

.pub-tab {
  border: 0;
  background: transparent;
  padding: 10px 14px;
  border-radius: 0;
  font-weight: 800;
  color: var(--flat-accent);
  white-space: nowrap;
  flex: 0 0 auto;
}

.pub-tab:hover {
  background: rgba(0, 0, 0, 0.06);
}

.pub-tab.is-active {
  background: var(--flat-card);
  box-shadow: inset 0 -2px 0 var(--flat-accent);
}

.pub-filter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 12px;
  padding: 8px 12px;
  border-radius: var(--flat-radius);
  background: var(--flat-card);
}

.pub-filter__label {
  color: var(--flat-muted);
}

.pub-filter__tag {
  font-weight: 700;
}

.pub-filter__clear {
  border: 0;
  background: transparent;
  font-weight: 700;
  padding: 0;
  color: var(--flat-accent);
}

.pub-card {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 16px;
  padding: 14px;
  border-radius: var(--flat-radius);
  background: var(--flat-card);
  margin-bottom: 14px;
  cursor: pointer;
}

.pub-card--disabled {
  cursor: default;
  opacity: 0.8;
}

.pub-card:focus-visible {
  outline: 2px solid rgba(17, 24, 39, 0.35);
  outline-offset: 2px;
}

.pub-card__media img {
  width: 100%;
  height: 108px;
  object-fit: cover;
  border-radius: var(--flat-radius);
  background: rgba(0, 0, 0, 0.04);
}

@media (max-width: 700px) {
  .pub-card {
    grid-template-columns: 1fr;
  }

  .pub-card__media img {
    height: 168px;
  }
}

.pub-title {
  font-weight: 800;
  margin-bottom: 6px;
}

.pub-position,
.pub-venue,
.pub-authors {
  color: var(--flat-muted);
  margin-bottom: 4px;
}

.pub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.pub-tag {
  border: 0;
  background: rgba(0, 0, 0, 0.06);
  color: var(--flat-accent);
  padding: 4px 10px;
  border-radius: var(--flat-radius);
  font-size: 0.86rem;
  font-weight: 700;
}

.pub-tag:hover {
  background: rgba(0, 0, 0, 0.09);
}

.pub-cite-list {
  padding-left: 1.1rem;
}

.pub-cite {
  margin: 0 0 12px;
}

.pub-cite__title {
  font-weight: 800;
  text-decoration: none;
}

.pub-cite__venue,
.pub-cite__authors {
  display: block;
  color: var(--flat-muted);
}

.pub-tag--inline {
  margin-left: 8px;
}

/* CV */
.cv-embed iframe {
  width: 100%;
  height: min(80vh, 900px);
  border: 0;
  border-radius: var(--flat-radius);
  background: var(--flat-bg);
}

.home-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

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

.home-card {
  display: block;
  padding: 14px 16px;
  border-radius: var(--flat-radius);
  background: var(--flat-card);
  color: var(--flat-accent) !important;
  font-weight: 800;
  text-decoration: none;
}

.home-card:hover {
  background: rgba(0, 0, 0, 0.06);
  text-decoration: none;
}

