:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-soft: #f1f5f9;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #dbe4ee;
  --line-strong: #c7d2e1;
  --blue: #1d4ed8;
  --blue-soft: #e8f0ff;
  --teal: #0f766e;
  --teal-soft: #e8f7f4;
  --rose: #be123c;
  --amber: #b45309;
  --shadow: 0 18px 50px rgba(15, 23, 42, .08);
  --serif: "Lora", Georgia, serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #ffffff 0, var(--bg) 420px),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: #123c9c;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 40px;
  border-bottom: 1px solid rgba(219, 228, 238, .8);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
}

.brand {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav a {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 700;
}

.nav a:hover {
  color: var(--ink);
}

.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.site-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 56px;
  width: calc(100% - 72px);
  max-width: 1540px;
  margin: 0 auto;
  padding: 54px 0 36px;
  min-width: 0;
}

.profile {
  position: sticky;
  top: 94px;
  align-self: start;
  width: 100%;
  max-width: 100%;
  padding: 30px 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow);
}

.profile__photo-wrap {
  width: 170px;
  height: 170px;
  margin: 0 auto 22px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
}

.profile__photo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile__identity {
  text-align: center;
}

.eyebrow {
  margin: 0 0 .45rem;
  color: var(--teal);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: 0;
}

.profile h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 2.1rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.profile__name-alt {
  margin: .2rem 0 .7rem;
  color: var(--muted);
  font-weight: 600;
}

.profile__org {
  margin: 0;
  color: var(--text);
  font-size: .92rem;
  line-height: 1.45;
}

.profile__bio {
  margin: 24px 0;
  color: var(--text);
  font-size: .94rem;
}

.profile__meta {
  margin: 0 0 20px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile__meta div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  margin: 0 0 8px;
}

.profile__meta div:last-child {
  margin-bottom: 0;
}

.profile__meta dt {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.profile__meta dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: .88rem;
  overflow-wrap: anywhere;
}

.location-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

.uae-flag {
  display: inline-grid;
  grid-template-columns: 9px 24px;
  grid-template-rows: repeat(3, 7px);
  width: 33px;
  height: 21px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
  vertical-align: middle;
}

.uae-flag span:first-child {
  grid-row: 1 / 4;
  background: #ef3340;
}

.uae-flag span:nth-child(2) {
  background: #009739;
}

.uae-flag span:nth-child(3) {
  background: #fff;
}

.uae-flag span:nth-child(4) {
  background: #000;
}

.profile__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile__links a,
.paper-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--panel);
  color: var(--ink);
  font-size: .82rem;
  font-weight: 800;
}

.profile__links a:hover,
.paper-actions a:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.content {
  min-width: 0;
}

.profile,
.content,
.section,
.focus-card,
.paper-card,
.paper-card__body {
  min-width: 0;
}

.profile__org,
.profile__bio,
.section h2,
.section p,
.paper-card h3,
.paper-card p {
  overflow-wrap: anywhere;
}

.section {
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}

.section:first-child {
  padding-top: 0;
}

.section--intro {
  max-width: 1060px;
}

.section__head {
  margin-bottom: 22px;
}

.section__head--split,
.section--split {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.section h2 {
  margin: 0 0 .75rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.section--intro h2 {
  max-width: 960px;
  font-size: 2.05rem;
  line-height: 1.22;
}

.lead {
  max-width: 980px;
  color: var(--ink);
  font-size: 1.08rem;
}

.collab-note {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 6px;
  background: rgba(255, 255, 255, .64);
}

.note {
  margin: .2rem 0 0;
  color: var(--muted);
  font-size: .9rem;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.focus-card {
  min-height: 190px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
}

.focus-card__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 28px;
  border-radius: 4px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: .76rem;
  font-weight: 900;
}

.focus-card h3 {
  margin: 16px 0 8px;
  color: var(--ink);
  font-size: 1.04rem;
}

.focus-card p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.timeline {
  display: grid;
  gap: 0;
  max-width: 980px;
  border-top: 1px solid var(--line);
}

.timeline article {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.timeline time,
.clean-list time {
  color: var(--blue);
  font-size: .86rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.timeline p {
  margin: 0;
  color: var(--text);
}

.paper-list {
  display: grid;
  gap: 20px;
}

.paper-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, 500px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 34px rgba(15, 23, 42, .055);
}

.paper-card figure {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.paper-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.venue {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--ink);
  color: #ffffff;
  font-size: .75rem;
  font-weight: 900;
}

.paper-card__body {
  min-width: 0;
  padding-top: 3px;
}

.paper-card h3 {
  margin: 0 0 10px;
  padding-right: 100px;
  color: var(--ink);
  font-size: 1.16rem;
  line-height: 1.4;
}

.paper-card h3 a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(29, 78, 216, .28);
  text-underline-offset: 3px;
}

.paper-card h3 a:hover {
  color: var(--blue);
}

.authors {
  color: var(--text);
  font-size: .94rem;
}

.paper-card p {
  margin: 0 0 12px;
}

.citation {
  position: absolute;
  top: 22px;
  right: 22px;
  display: none;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #bfd0ed;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: .76rem;
  font-weight: 900;
  white-space: nowrap;
}

.citation:not(:empty) {
  display: inline-flex;
}

.paper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.paper-card--compact {
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
}

.clean-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.clean-list li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  width: calc(100% - 72px);
  max-width: 1540px;
  margin: 0 auto;
  padding: 30px 0 42px;
  color: var(--muted);
  font-size: .88rem;
}

.visitor {
  color: var(--text);
  font-weight: 600;
}

.visitor[hidden],
#visitorSep[hidden] {
  display: none;
}

.footer__links {
  display: flex;
  gap: 16px;
}

.footer__links a {
  color: var(--muted);
  font-weight: 800;
}

.footer__links a:hover {
  color: var(--blue);
}

@media (max-width: 1280px) {
  .site-shell {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    width: calc(100% - 48px);
  }

  .focus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paper-card,
  .paper-card--compact {
    grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
  }

  .section--intro h2 {
    font-size: 1.9rem;
  }
}

@media (max-width: 980px) {
  .topbar {
    padding: 0 22px;
  }

  .menu-toggle {
    display: inline-block;
  }

  .nav {
    position: absolute;
    top: 64px;
    right: 18px;
    display: none;
    width: min(280px, calc(100vw - 36px));
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
  }

  .nav.is-open {
    display: grid;
    gap: 8px;
  }

  .nav a {
    padding: 8px 10px;
  }

  .site-shell {
    grid-template-columns: 1fr;
    width: calc(100% - 36px);
    padding-top: 28px;
  }

  .profile {
    position: static;
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
  }

  .profile__photo-wrap {
    margin: 0;
  }

  .profile__identity,
  .profile__bio,
  .profile__meta,
  .profile__links {
    grid-column: 2;
  }

  .profile__identity {
    text-align: left;
  }

  .paper-card,
  .paper-card--compact {
    grid-template-columns: 1fr;
  }

  .paper-card figure {
    max-width: 560px;
  }

  .paper-card h3 {
    padding-right: 0;
  }

  .citation {
    position: static;
    margin: 0 0 10px;
  }

  .section__head--split,
  .section--split {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 680px) {
  .site-shell,
  .footer {
    width: 100%;
    padding-left: 14px;
    padding-right: 14px;
  }

  .site-shell {
    overflow: hidden;
  }

  .profile {
    display: block;
    padding: 24px 20px;
    overflow: hidden;
  }

  .profile__photo-wrap {
    width: 148px;
    height: 148px;
    margin: 0 auto 18px;
  }

  .profile__identity {
    text-align: center;
  }

  .profile__links {
    grid-template-columns: 1fr;
  }

  .profile__meta div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .section h2,
  .section--intro h2 {
    font-size: 1.5rem;
  }

  .focus-grid {
    grid-template-columns: 1fr;
  }

  .timeline article,
  .clean-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .paper-card {
    padding: 16px;
  }

  .paper-card figure {
    max-width: none;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
