/* ==========================================================================
   hadas.github.io — stylesheet
   Single stylesheet, no build step, no external requests.
   Sections: tokens · reset · layout · header/nav · typography ·
             about page · lists (publications/talks) · cv · footer · print
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------ */
:root {
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
                Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;

  --ink:        #1c1a17;   /* body text                     */
  --ink-soft:   #55504a;   /* secondary text, metadata      */
  --ink-faint:  #8a837a;   /* tertiary: dates, venues       */
  --paper:      #fbfaf7;   /* page background               */
  --paper-card: #fcfafb;   /* mini-cv box, callouts         */
  --rule:       #e2dcd2;   /* hairlines                     */
  --accent:     #b94f6f;   /* links, markers                */
  --accent-dim: #f3dce5;   /* link underline / hover wash   */

  --measure: 68ch;         /* comfortable reading width     */
  --page-max: 1080px;
  --gap: 2.5rem;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* --- Links -------------------------------------------------------------- */
a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  text-decoration-color: var(--accent-dim);
  transition: text-decoration-color .15s ease, background-color .15s ease;
}
a:hover { text-decoration-color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: .6rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 0; }

/* --- Layout ------------------------------------------------------------- */
.wrap {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

main { padding-block: 3.5rem 4rem; }

/* --- Site header / navigation ------------------------------------------ */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 2rem;
  padding-block: 1.4rem;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--accent); }

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .95rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding-bottom: .2rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--accent); border-bottom-color: var(--accent-dim); }

.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* --- Typography --------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 0;
}

h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem); letter-spacing: -.01em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; }

.page-title { margin-bottom: .35rem; }

.page-intro {
  color: var(--ink-soft);
  max-width: var(--measure);
  margin: 0 0 3rem;
}

.hint {
  color: var(--ink-faint);
  font-size: .92rem;
  max-width: var(--measure);
  margin: 1.25rem 0 0;
}
@media print { .hint { display: none; } }

/* Section heading with a rule that runs to the end of the line */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 3.25rem 0 1.5rem;
}

.section-head::after {
  display: none;
}

/* --- About page --------------------------------------------------------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: var(--gap);
  align-items: start;
}

/* Role and tagline read as a single unit under the name, so they share a
   tight line-height and sit close together. */
.hero-role {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 1rem + 1vw, 1.45rem);
  line-height: 1.3;
  color: var(--accent);
  margin: .55rem 0 0;
  font-style: italic;
}

.hero-sub {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 1rem + .5vw, 1.25rem);
  line-height: 1.3;
  color: var(--ink-soft);
  margin: .1rem 0 2.25rem;
  font-style: italic;
}

.prose p {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.7;
  max-width: var(--measure);
  margin: 0 0 1.4rem;
}

.prose ol { max-width: var(--measure); padding-left: 1.2rem; }
.prose ol li { font-family: var(--font-serif); margin-bottom: .5rem; }

/* --- Mini CV sidebar ---------------------------------------------------- */
.minicv {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.6rem 1.5rem;
  font-size: .92rem;
  position: sticky;
  top: 1.5rem;
}

.minicv .portrait {
  width: 15rem;
  height: auto;
  border-radius: 10px;
  margin: 0 auto 1.4rem;
  background: #e8e3da;
}

.minicv h2 {
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--ink-faint);
  margin: 0 0 1rem;
}

/* The three logos have very different aspect ratios (15:1, 4:1, 1.9:1), so
   they are stacked and sized individually by width — a shared height would
   leave the Princeton wordmark a hairline and the Hasson mark a block. Each
   max-width is tuned so the lettering reads at a comparable size. */
.logos {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.15rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.logos img { width: auto; height: auto; }

.logo-princeton { max-width: 100%; }
.logo-pni       { max-width: 11rem; }
.logo-hasson    { max-width: 8.5rem; }

.minicv dl { margin: 0; }

.minicv dt {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 1.15rem;
}
.minicv dt:first-child { margin-top: 0; }

.minicv dd { margin: .25rem 0 0; line-height: 1.5; }
.minicv dd .muted { color: var(--ink-soft); }

.edu { list-style: none; margin: .25rem 0 0; padding: 0; }
.edu li { margin-bottom: .6rem; line-height: 1.45; }
.edu li:last-child { margin-bottom: 0; }
.edu .degree { font-weight: 600; }
.edu .place { display: block; color: var(--ink-soft); font-size: .88em; }

.elsewhere {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.1rem;
  margin: .35rem 0 0;
  padding: 0;
  font-size: .9rem;
}

/* --- Reference lists (publications, talks) ------------------------------ */
.reflist { list-style: none; margin: 0; padding: 0; max-width: 78ch; }

.reflist > li {
  padding: 0 0 1.35rem 1.25rem;
  margin-bottom: 1.35rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.reflist > li:last-child { border-bottom: 0; margin-bottom: 0; }

.reflist > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .65em;
  width: .35rem;
  height: .35rem;
  border-radius: 50%;
  background: var(--accent-dim);
}

.reflist .authors { color: var(--ink-soft); }
.reflist .me { color: var(--ink); font-weight: 600; }

.reflist .title {
  font-family: var(--font-serif);
  font-size: 1.06rem;
  font-weight: 600;
  display: block;
  margin: .2rem 0;
}

.reflist .venue { color: var(--ink-soft); font-size: .95rem; }
.reflist .venue em { font-style: italic; }

.reflist .doi { font-size: .88rem; word-break: break-word; }

/* Talks: a date chip that sits above the title on narrow screens */
.when {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: .25rem;
}

.kind {
  font-size: .82rem;
  color: var(--ink-faint);
  font-style: italic;
}

/* --- CV ----------------------------------------------------------------- */
.cv { max-width: 76ch; }

.cv-summary {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.7;
  border-left: 3px solid var(--accent-dim);
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.entries { margin: 0; }

.entry {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0 1.5rem;
  padding-bottom: 1.6rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--rule);
}
.entry:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

.entry .years {
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: .02em;
  padding-top: .18rem;
}

.entry h3 { margin-bottom: .1rem; }

.entry .org {
  color: var(--ink-soft);
  font-style: italic;
  margin: 0 0 .5rem;
}

.entry p { margin: 0 0 .5rem; }
.entry p:last-child { margin-bottom: 0; }

.entry ul { margin: .35rem 0 0; padding-left: 1.1rem; }
.entry li { margin-bottom: .35rem; }

.entry .note { color: var(--ink-soft); font-size: .95rem; }

/* Compact two-column rows for awards / service / teaching */
.rows { margin: 0; }
.rows .row {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0 1.5rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--rule);
}
.rows .row:last-child { border-bottom: 0; }
.rows .years {
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-faint);
}
.rows .what { margin: 0; }
.rows .what .muted { color: var(--ink-soft); display: block; font-size: .93rem; }

/* --- Footer ------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 2rem 3rem;
  color: var(--ink-faint);
  font-size: .88rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  justify-content: space-between;
}
.site-footer ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .minicv { position: static; order: 2; max-width: 32rem; }
  .entry, .rows .row { grid-template-columns: 1fr; gap: .2rem; }
  .entry .years, .rows .years { padding-top: 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  main { padding-block: 2.5rem 3rem; }
  .site-header .wrap { padding-block: 1.1rem; }
  .nav ul { gap: 1.1rem; }
}

/* --- Print (the CV tab doubles as a printable / PDF-able CV) ------------ */
@media print {
  :root { --paper: #fff; --paper-card: #fff; }
  body { font-size: 10.5pt; color: #000; }
  .site-header, .site-footer, .skip-link { display: none; }
  main { padding: 0; }
  .wrap { max-width: none; padding: 0; }
  a { color: #000; text-decoration: none; }
  .entry, .rows .row, .reflist > li { break-inside: avoid; }
  .section-head { break-after: avoid; }
  h1, h2, h3 { break-after: avoid; }
}
