@charset "UTF-8";
/* hanialomari.github.io: hand-written stylesheet, no framework.
   Layout: a single reading column, typeset like a careful paper.
   One serif for text and headings, system sans only for the nav. Accent: VT maroon. */

:root {
  --bg: #fcfcfa;
  --ink: #1e1e1c;
  --ink-2: #44443f;
  --muted: #74736c;
  --rule: #e4e3de;
  --accent: #861f41;
  --plate: #ffffff;
  --card: #ffffff;
  --card-hover: #cfcdc5;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --col: 1080px;
  --measure: 46rem;   /* comfortable line length for running text */
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131312;
    --ink: #e8e6e1;
    --ink-2: #c2bfb8;
    --muted: #8f8c85;
    --rule: #2c2b29;
    --accent: #e8899f;
    --plate: #f4f3ef;
    --card: #1b1b1a;
    --card-hover: #4a4844;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131312;
  --ink: #e8e6e1;
  --ink-2: #c2bfb8;
  --muted: #8f8c85;
  --rule: #2c2b29;
  --accent: #e8899f;
  --plate: #f4f3ef;
  --card: #1b1b1a;
  --card-hover: #4a4844;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 18px/1.65 var(--serif);
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

::selection { background: var(--accent); color: var(--bg); }

.wrap {
  max-width: var(--col);
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 6px 10px; }
.skip:focus { left: 8px; z-index: 10; }

h1, h2, h3 { font-family: var(--serif); color: var(--ink); text-wrap: balance; }

/* small caps label used for group headings */
.label {
  font-family: var(--serif);
  font-variant: all-small-caps;
  letter-spacing: 0.05em;
  font-size: 17px;
  color: var(--muted);
}

/* ---------- header ---------- */

.site-head .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; padding-block: 26px 0;
}
.wordmark { font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--ink); }
.wordmark:hover { text-decoration: none; }
.site-nav { display: flex; align-items: baseline; gap: 22px; font-family: var(--sans); font-size: 15px; }
.site-nav a { color: var(--muted); }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--ink); }
.theme-toggle {
  font-family: var(--sans); font-size: 15px;
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--muted);
}
.theme-toggle:hover { color: var(--ink); }

/* ---------- intro ---------- */

.intro { padding-block: 56px 8px; }
.intro::after { content: ""; display: table; clear: both; }
.photo {
  display: block;
  width: 220px;
  border-radius: 3px;
  background: #fff;
  border: 1px solid var(--rule);
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
/* Bio on the left; photo centered in the space to its right. */
.intro-main {
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) minmax(0, 1fr);
  align-items: center;
  column-gap: 32px;
}
.intro-main .photo { justify-self: center; }
.intro h1 { font-size: 38px; font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 6px; }
.intro .role { margin: 0 0 22px; color: var(--muted); font-size: 18px; }
.intro p { margin: 0 0 16px; max-width: var(--measure); }
.contact { margin-top: 20px !important; color: var(--muted); }
.contact a { white-space: nowrap; }


/* affiliations: logo tile + name + role, two per row */
.affil-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 0;
  clear: both;
}
.affil-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: inherit; line-height: 1.3;
  transition: border-color 0.15s ease;
}
.affil-card:hover { border-color: var(--card-hover); text-decoration: none; }
.affil-logo {
  flex-shrink: 0;
  width: 42px; height: 42px; padding: 7px;
  border-radius: 7px;
  background: #f3f2ee;
  display: flex; align-items: center; justify-content: center;
}
.affil-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.affil-name { display: block; font-family: var(--sans); font-weight: 600; font-size: 15px; color: var(--ink); }
.affil-role { display: block; font-family: var(--sans); font-size: 13px; color: var(--muted); margin-top: 2px; }
@media (prefers-reduced-motion: reduce) { .affil-card { transition: none; } }

/* ---------- sections ---------- */

.section { margin-top: 64px; }
.section > h2 {
  font-size: 23px; font-weight: 600; letter-spacing: -0.005em;
  margin: 0 0 18px; padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

/* news */
.news { margin: 0; padding: 0; list-style: none; }
.news li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 4px 0; }
.news time { color: var(--muted); font-variant-numeric: tabular-nums lining-nums; font-size: 16px; padding-top: 1px; }
.news-more summary { cursor: pointer; color: var(--accent); margin-top: 8px; display: inline-block; list-style: none; }
.news-more summary::-webkit-details-marker { display: none; }
.news-more[open] summary { display: none; }

/* research */
.topic { margin: 0 0 44px; }
.topic:last-child { margin-bottom: 0; }
.topic h3 { font-size: 20px; font-weight: 600; margin: 0 0 8px; }
.topic p { margin: 0 0 12px; color: var(--ink-2); }
.topic .papers { font-size: 16.5px; color: var(--muted); }
.topic .papers a { color: var(--accent); }
.fig { margin: 18px 0 0; }

/* Research: figure left, text right. */
@media (min-width: 900px) {
  .section-wide .topic {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 40px;
    align-items: start;
  }
  .section-wide .topic .fig { order: -1; margin-top: 4px; }
  .section-wide .topic { margin-bottom: 56px; }
}
.fig .plate { background: var(--plate); border: 1px solid var(--rule); padding: 8px; }
.fig figcaption { margin-top: 8px; font-size: 15.5px; line-height: 1.5; color: var(--muted); }
.fig figcaption b { color: var(--ink-2); font-weight: 600; }

.echo-stage { position: relative; aspect-ratio: 5 / 3; max-width: 100%; }
.echo-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.echo-plate { --ink: #1e1e1c; --muted: #74736c; --rule: #d9d8d2; --accent: #861f41; }

/* publications */
.pubs { margin: 0; padding: 0; list-style: none; }
.pub { display: block; padding: 0 0 18px; }
.pub-title { margin: 0; font-weight: 600; line-height: 1.4; }
.pub-title a { color: var(--ink); }
.pub-title a:hover { color: var(--accent); }
.pub-authors { margin: 2px 0 0; color: var(--ink-2); font-size: 16.5px; }
.pub-authors .me { color: var(--ink); font-weight: 600; }
.pub-meta { margin: 2px 0 0; font-size: 16.5px; color: var(--muted); }
.venue { font-style: italic; color: var(--ink-2); }
.status { color: var(--muted); }
.status::after { content: ", "; }
.award { color: var(--accent); }
.award::before { content: " · "; color: var(--muted); }
.pub-links { margin-left: 0; }
.pub-links a::before { content: " · "; color: var(--muted); }
.pub-year { display: none; }

.filters { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 24px 0 4px; font-family: var(--sans); font-size: 15px; }
.filters button {
  font: inherit; background: none; border: 0; padding: 2px 0; cursor: pointer;
  color: var(--muted); border-bottom: 1px solid transparent;
}
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); }

.pub-group { margin-top: 34px; }
.group-label {
  margin: 0 0 14px; padding-bottom: 6px; border-bottom: 1px solid var(--rule);
  font-family: var(--serif); font-variant: normal; letter-spacing: 0;
  font-size: 20px; font-weight: 600; color: var(--ink);
  font-variant-numeric: lining-nums;
}
.pub[hidden], .pub-group[hidden] { display: none; }

/* inner pages */
.page-intro { padding-block: 56px 4px; }
.page-intro h1 { font-size: 38px; font-weight: 600; line-height: 1.1; margin: 0 0 14px; }
.page-intro .label { display: none; }
.page-intro p { color: var(--ink-2); margin: 0 0 12px; max-width: var(--measure); }
.page-intro .links { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; color: var(--muted); }
.page-intro .links li + li::before { content: "\00a0\00b7\00a0"; }

/* CV */
.cv-block { padding-block: 22px; border-top: 1px solid var(--rule); }
.page-intro + .cv-block { margin-top: 26px; }
.cv-block > h2 { margin: 0 0 12px; font-size: 21px; font-variant: normal; letter-spacing: 0; color: var(--ink); font-weight: 600; }
.cv-entry + .cv-entry { margin-top: 18px; }
.cv-entry header { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: baseline; }
.cv-entry h3 { font-size: 18px; font-weight: 600; margin: 0; }
.cv-entry time { color: var(--muted); font-size: 16px; font-variant-numeric: lining-nums; }
.cv-entry .sub { color: var(--ink-2); margin: 2px 0 0; font-size: 16.5px; max-width: 52rem; }
.cv-entry ul { margin: 8px 0 0; padding-left: 20px; max-width: 52rem; }
.cv-entry li { margin: 6px 0; font-size: 16.5px; color: var(--ink-2); }
.cv-entry li strong { color: var(--ink); font-weight: 600; }
.cv-entry li em { color: var(--muted); }
.cv-plain { margin: 0; padding: 0; list-style: none; }
.cv-plain li { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; font-size: 16.5px; }
.cv-plain li > span:last-child { color: var(--muted); white-space: nowrap; font-variant-numeric: lining-nums; }

/* footer */
.site-foot { margin-top: 80px; padding-block: 20px 40px; border-top: 1px solid var(--rule); }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-foot p { margin: 0; font-size: 15px; color: var(--muted); }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 899px) {
  .intro-main { display: flex; flex-direction: column; align-items: flex-start; }
  .intro-main .photo { order: -1; justify-self: auto; width: 150px; margin: 0 0 20px; }
}

@media (max-width: 600px) {
  body { font-size: 17px; }
  .site-head .wrap { flex-wrap: wrap; }
  .intro { padding-top: 36px; }
  .photo { width: 120px; }
  .intro h1, .page-intro h1 { font-size: 31px; }
  .news li { grid-template-columns: 1fr; gap: 0; padding: 6px 0; }
  .cv-plain li { flex-direction: column; gap: 0; }
  .affil-grid { grid-template-columns: 1fr; }
}

@media print {
  .site-head, .site-foot, .filters, .theme-toggle { display: none; }
  body { background: #fff; color: #000; }
}
