:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --ink: #1f2a33;
  --ink-soft: #4d5a64;
  --muted: #7a858d;
  --line: #e4e0d6;
  --slate: #24343f;
  --accent: #b9831a;
  --accent-soft: #f4e7c9;
  --on-slate: #f3efe6;
  --shadow: 0 1px 2px rgba(20, 30, 40, .05), 0 8px 24px rgba(20, 30, 40, .06);
  --serif: "Frank Ruhl Libre", Georgia, serif;
  --sans: "Heebo", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12191e;
    --surface: #1a242b;
    --ink: #ece8df;
    --ink-soft: #b9c1c6;
    --muted: #8a959c;
    --line: #2a3640;
    --slate: #0d1418;
    --accent: #e0ad45;
    --accent-soft: #3a2f17;
    --on-slate: #ece8df;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
h2::after {
  content: ""; display: block; width: 44px; height: 3px;
  background: var(--accent); margin-top: .45em; border-radius: 2px;
}
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.nav { display: flex; gap: 22px; margin-inline-start: auto; }
.nav a { text-decoration: none; font-size: .95rem; color: var(--ink-soft); font-weight: 400; }
.nav a:hover { color: var(--accent); }
.lang-toggle {
  font: inherit; font-size: .9rem; font-weight: 500;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 4px 14px; cursor: pointer;
}
.lang-toggle:hover { border-color: var(--accent); }

/* Hero */
.hero { background: var(--slate); color: var(--on-slate); padding: 72px 0 80px; }
.hero-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; color: var(--accent); font-weight: 500; margin-bottom: .8em; }
[dir="rtl"] .eyebrow { letter-spacing: .02em; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 500; margin-bottom: .3em; }
.lede { font-size: 1.15rem; opacity: .88; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-block; text-decoration: none; padding: 11px 22px; border-radius: 999px; font-weight: 500; font-size: .95rem; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #1b1408; }
.btn-ghost { border: 1px solid rgba(243, 239, 230, .35); color: var(--on-slate); }
.btn-ghost:hover { border-color: var(--accent); }
.portrait { margin: 0; justify-self: center; position: relative; }
.portrait::before {
  content: ""; position: absolute; inset: -12px;
  border: 2px solid var(--accent); border-radius: 50%;
}
.portrait img {
  position: relative; width: min(340px, 72vw); height: auto; aspect-ratio: 1; object-fit: cover;
  object-position: 50% 40%; border-radius: 50%; box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}

/* Sections */
.section { padding: 80px 0; }
.section + .section { border-top: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.timeline-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.timeline-card h3 { font-size: 1.2rem; margin-top: 0; }
.timeline-card h3 + .timeline { margin-bottom: 24px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding-inline-start: 18px; margin-bottom: 14px; display: flex; flex-direction: column; line-height: 1.45; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 0; top: .5em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.timeline strong { font-weight: 500; }
.timeline span { color: var(--ink-soft); font-size: .93rem; }
.timeline .when { color: var(--muted); font-size: .82rem; letter-spacing: .03em; }

.focus { background: var(--surface); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips span { background: var(--accent-soft); color: var(--ink); padding: 7px 16px; border-radius: 999px; font-size: .93rem; font-weight: 400; }

/* Publications */
.pubs { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.pub { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px 28px; box-shadow: var(--shadow); border-inline-start: 4px solid var(--accent); }
.pub-meta { display: flex; gap: 12px; align-items: center; font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.tag { background: var(--accent-soft); color: var(--ink); padding: 2px 10px; border-radius: 999px; font-weight: 500; font-size: .78rem; }
.pub h3 { font-size: 1.25rem; margin-bottom: .4em; text-align: start; }
.pub h3 a { text-decoration: none; }
.pub h3 a:hover { color: var(--accent); }
.authors, .venue { font-size: .93rem; color: var(--ink-soft); margin-bottom: .3em; text-align: start; }
.authors b { color: var(--ink); font-weight: 600; }
.venue a { color: var(--accent); text-decoration: none; }
.summary { margin: .8em 0 0; font-size: .97rem; }
[dir="rtl"] .pub h3, [dir="rtl"] .authors, [dir="rtl"] .venue { text-align: right; }

/* Media */
.media-card {
  display: flex; flex-direction: column; gap: 6px; max-width: 560px; text-decoration: none;
  background: var(--slate); color: var(--on-slate); border-radius: 18px; padding: 28px 30px;
  box-shadow: var(--shadow); transition: transform .15s;
}
.media-card:hover { transform: translateY(-2px); }
.media-src { font-size: .85rem; opacity: .7; }
.media-title { font-family: var(--serif); font-size: 1.5rem; }
.media-link { color: var(--accent); font-weight: 500; margin-top: 6px; }

/* Contact */
.contact-list { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.contact-item {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 20px; font-weight: 400; box-shadow: var(--shadow);
}
.contact-item:hover { border-color: var(--accent); color: var(--accent); }
.contact-item svg { width: 20px; height: 20px; }

.footer { padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }

/* Responsive */
@media (max-width: 820px) {
  .hero { padding: 48px 0 60px; }
  .hero-inner, .grid-2 { grid-template-columns: 1fr; gap: 40px; }
  .portrait { order: -1; }
  .portrait img { width: min(260px, 70vw); }
  .nav { display: none; }
  .lang-toggle { margin-inline-start: auto; }
  .section { padding: 56px 0; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .pub { padding: 20px; }
  .contact-item { width: 100%; }
}
