/* Tamir Bendory · Mathematics of Data and Imaging */
:root {
  color-scheme: light;
  --paper: #f8f7f3;
  --white: #fffefa;
  --ink: #182e45;
  --text: #35434d;
  --muted: #66716f;
  --accent: #13675e;
  --accent-dark: #0b4e47;
  --line: #d9ded5;
  --wash: #edf1e9;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: #d2e4db; color: var(--ink); }
img { display: block; max-width: 100%; }
a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  overflow-wrap: anywhere;
}
a:hover { color: var(--accent-dark); }
a:focus-visible, input:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
  border-radius: 2px;
}
button, input { font: inherit; }
h1, h2, h3, p, ul, ol, dl { margin-top: 0; }
h1, h2, h3 { color: var(--ink); font-weight: 400; }
h1, h2 { font-family: var(--serif); }
h1 { font-size: clamp(2.55rem, 5.5vw, 4.4rem); line-height: 1.08; letter-spacing: -.045em; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.7rem); line-height: 1.18; letter-spacing: -.025em; }
h3 { font-size: 1.12rem; line-height: 1.5; }
p { margin-bottom: 1.2rem; }
[hidden] { display: none !important; }
.container, .header-inner, .footer-inner { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
.skip-link {
  position: absolute;
  z-index: 100;
  left: 1rem;
  top: -100px;
  padding: .65rem 1rem;
  background: var(--ink);
  color: #fff;
}
.skip-link:focus { top: 1rem; }

/* Shared header and navigation */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 1.25rem;
}
.brand { color: var(--ink); text-decoration: none; flex-shrink: 0; }
.brand span { display: block; font-family: var(--serif); font-size: 1.65rem; line-height: 1.2; letter-spacing: -.025em; }
.brand small { display: block; margin-top: .3rem; color: var(--muted); font-size: .71rem; letter-spacing: .09em; line-height: 1.45; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 1.85rem; flex-wrap: wrap; }
.site-nav a { position: relative; padding-block: .55rem; color: var(--text); text-decoration: none; font-size: .88rem; line-height: 1.5; }
.site-nav a::after { content: ""; position: absolute; inset: auto 0 .1rem; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .16s ease; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { font-weight: 600; }
.eyebrow { display: block; margin-bottom: 1.1rem; color: var(--accent); font-size: .71rem; font-weight: 650; line-height: 1.6; letter-spacing: .15em; text-transform: uppercase; }

/* Front page */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(3rem, 7vw, 6.5rem); padding-block: 5.2rem 4.7rem; }
.hero-copy { padding-top: .2rem; }
.hero h1 { max-width: 13ch; margin-bottom: 1.55rem; }
.hero .intro { max-width: 37rem; font-size: 1.15rem; line-height: 1.8; }
.affiliation { color: var(--muted); font-size: .95rem; line-height: 1.7; }
.research-interests { max-width: 39rem; margin-top: 1.7rem; color: var(--muted); font-size: .88rem; line-height: 1.85; }
.research-interests h2 { margin-bottom: .45rem; font-family: var(--sans); font-size: .72rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.research-interests strong { color: var(--ink); font-weight: 600; }
.text-link { display: inline-flex; align-items: center; gap: .6rem; margin-top: .75rem; font-size: .85rem; font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.research-interests ul { margin-block: .55rem 0; padding-left: 1.1rem; }
.profile { min-width: 0; align-self: start; }
.portrait { position: relative; isolation: isolate; width: 100%; aspect-ratio: 4 / 4.7; overflow: hidden; background: #e0e6dd; border-radius: 2px; }
.portrait img { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.portrait-fallback { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; padding: 1.5rem; background: #dfe7dc; color: #52695f; font-family: var(--serif); font-size: 5rem; font-weight: 400; text-align: center; }
.profile h2, .profile h3 { margin-block: 1.8rem .8rem; font-family: var(--sans); font-size: .72rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.profile dl { margin: 0; font-size: .83rem; line-height: 1.7; }
.profile dt { color: var(--muted); font-size: .69rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.profile dd { margin: .1rem 0 .8rem; color: var(--ink); overflow-wrap: anywhere; }
.profile dd a { text-decoration: none; }
.profile dd a:hover { text-decoration: underline; }
.section-head { max-width: 46rem; margin-bottom: 2.2rem; }
.section-head .eyebrow { margin-bottom: .75rem; }
.section-head h2 { margin-bottom: 1rem; }
.section-head p { max-width: 42rem; color: var(--muted); font-size: .98rem; }
.questions-section { padding-block: 3.7rem 3.2rem; border-block: 1px solid var(--line); }
.questions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; }
.questions li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .8rem; padding-block: 1.65rem 1.8rem; border-top: 1px solid var(--line); }
.question-number { padding-top: .25rem; color: var(--accent); font-size: .71rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .05em; }
.questions h3 { margin: 0; font-family: var(--serif); font-size: 1.36rem; line-height: 1.45; letter-spacing: -.012em; }
.join-section { display: flex; justify-content: space-between; align-items: center; gap: 2.5rem; margin-block: 3.4rem; padding: 2.1rem 2.3rem; background: var(--wash); border-left: 3px solid var(--accent); }
.join-section h2 { margin-bottom: .65rem; font-size: 1.8rem; }
.join-section p { max-width: 43rem; margin-bottom: 0; font-size: .93rem; line-height: 1.75; }
.join-section p + p { margin-top: .7rem; }
.button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 46px; padding: .7rem 1.15rem; border: 1px solid var(--accent); color: var(--accent); font-size: .82rem; font-weight: 600; line-height: 1.4; text-decoration: none; transition: background-color .16s ease, color .16s ease; }
.button:hover { background: var(--accent); color: #fff; }
.selected-section { padding-block: 1.3rem 4.5rem; }
.selected-papers { padding: 0; margin: 0; list-style: none; }
.selected-papers > li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1.8rem; padding-block: 1.25rem; border-top: 1px solid var(--line); }
.paper-meta { padding-top: .1rem; color: var(--muted); font-size: .77rem; line-height: 1.7; }
.selected-papers .paper-meta { grid-column: 1; grid-row: 1; }
.selected-papers .title { grid-column: 2; grid-row: 1; }
.selected-papers .title { max-width: 48rem; color: var(--ink); font-family: var(--serif); font-size: 1.16rem; line-height: 1.5; text-decoration: none; }
.selected-papers .title:hover { color: var(--accent); text-decoration: underline; }

/* Interior pages */
.page-intro { max-width: 49rem; padding-block: 4.5rem 2.3rem; }
.page-intro h1 { margin-bottom: 1.2rem; font-size: clamp(2.8rem, 5vw, 3.8rem); }
.page-intro p { max-width: 42rem; margin-bottom: 0; color: var(--muted); font-size: 1.05rem; }
.section-links { display: flex; flex-wrap: wrap; gap: .65rem 1.55rem; padding-block: 0 2rem; border-bottom: 1px solid var(--line); }
.section-links a { font-size: .84rem; text-decoration: none; }
.section-links a:hover { text-decoration: underline; }
.content-section, .cv-section { padding-block: 2.75rem .3rem; scroll-margin-top: 2rem; }
.content-section > h2, .cv-section > h2 { margin-bottom: 1.65rem; font-size: 2rem; }
.record-list { margin: 0; padding: 0; list-style: none; }
.record-list > li { position: relative; padding-block: 1.15rem 1.3rem; border-top: 1px solid var(--line); font-size: .94rem; line-height: 1.85; overflow-wrap: anywhere; }
.record-list > li > a:first-child, .record-list .paper-title { color: var(--ink); font-size: 1.02rem; font-weight: 600; line-height: 1.6; text-decoration: none; }
.record-list > li > a:first-child:hover, .record-list .paper-title:hover { color: var(--accent); text-decoration: underline; }
.record-list p { margin-block: .3rem 0; }
.record-list .authors, .record-list .venue, .record-list .paper-authors, .record-list .paper-venue { display: block; margin-top: .25rem; color: var(--muted); font-size: .85rem; }
.record-list .paper-links { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: .5rem; font-size: .8rem; }
.content-section:last-child, .cv-section:last-child { padding-bottom: 4.7rem; }
.search-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1.2rem; margin-block: .25rem 1.9rem; }
.search-bar label { color: var(--ink); font-size: .84rem; font-weight: 600; }
.search-bar input { width: min(100%, 440px); min-height: 46px; padding: .7rem .9rem; border: 1px solid #b6c2b9; border-radius: 2px; background: var(--white); color: var(--ink); font-size: .9rem; }
.search-bar input::placeholder { color: var(--muted); opacity: 1; }
#result-count { color: var(--muted); font-size: .8rem; }
.empty-state { padding: 2rem 1.5rem; background: var(--wash); color: var(--muted); }
.group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3.5rem; padding-bottom: 2rem; }
.group-grid .content-section { padding-top: 1.2rem; }
.people-list { margin: 0; padding: 0; list-style: none; }
.people-list > li { padding-block: .95rem 1.05rem; border-top: 1px solid var(--line); font-size: .93rem; line-height: 1.75; }
.person-name { display: block; color: var(--ink); font-size: 1rem; font-weight: 600; }
.person-detail { display: block; margin-top: .2rem; color: var(--muted); font-size: .85rem; }
.alumni-section { border-top: 1px solid var(--line); padding-block: 2.8rem; }
.alumni-section > h2 { margin-bottom: 1.8rem; }
.alumni-section .people-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3.5rem; }
.talk-list { margin: 0; padding: 0 0 4.5rem; list-style: none; }
.talk-list > li { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; gap: 1.4rem; align-items: start; padding-block: 1.7rem; border-top: 1px solid var(--line); }
.talk-number { padding-top: .35rem; color: var(--accent); font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.talk-list h2 { max-width: 42rem; margin: 0; font-size: 1.45rem; line-height: 1.45; }
.download-link { align-self: start; margin-top: .35rem; font-size: .82rem; white-space: nowrap; }
.cv-section .record-list > li { padding-block: 1rem 1.2rem; }
.cv-section .record-list strong { color: var(--ink); font-weight: 600; }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 95px; padding-block: 1.5rem; color: var(--muted); font-size: .75rem; line-height: 1.7; }
.site-footer a { text-decoration: none; }

@media (max-width: 960px) {
  .container, .header-inner, .footer-inner { width: min(1120px, calc(100% - 48px)); }
  .header-inner { gap: 1.5rem; }
  .site-nav { gap: 1.2rem; }
  .brand span { font-size: 1.5rem; }
  .brand small { font-size: .64rem; }
  .hero { grid-template-columns: minmax(0, 1fr) 235px; gap: 2.7rem; padding-top: 4rem; }
  .hero h1 { font-size: clamp(2.6rem, 5.8vw, 3.7rem); }
  .hero .intro { font-size: 1.05rem; }
  .questions { gap: 0 2.5rem; }
  .questions h3 { font-size: 1.25rem; }
  .join-section { padding: 1.8rem; gap: 1.7rem; }
  .selected-papers > li { grid-template-columns: 130px minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .header-inner { display: block; min-height: 0; padding-block: 1.5rem 1rem; }
  .brand { display: inline-block; }
  .brand span { font-size: 1.6rem; }
  .brand small { font-size: .66rem; }
  .site-nav { gap: .55rem 1.55rem; margin-top: 1.1rem; }
  .site-nav a { font-size: .85rem; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 2.6rem; padding-block: 3.3rem; }
  .hero h1 { max-width: 15ch; font-size: clamp(2.7rem, 9vw, 4rem); }
  .hero .intro { max-width: 40rem; font-size: 1.08rem; }
  .profile { display: grid; grid-template-columns: 145px minmax(0, 1fr); column-gap: 1.65rem; align-items: start; }
  .portrait { grid-row: 1 / 4; aspect-ratio: 4 / 5; }
  .portrait-fallback { font-size: 3.2rem; }
  .profile h2, .profile h3 { margin-top: 0; margin-bottom: .75rem; }
  .profile dl { font-size: .8rem; }
  .profile dd { margin-bottom: .65rem; }
  .questions-section { padding-block: 2.8rem 2rem; }
  .questions { grid-template-columns: minmax(0, 1fr); }
  .questions li { gap: .7rem; padding-block: 1.35rem 1.45rem; }
  .questions li:last-child { grid-column: auto; max-width: none; }
  .questions h3 { font-size: 1.3rem; }
  .section-head { margin-bottom: 1.7rem; }
  .join-section { display: block; margin-block: 2.5rem; padding: 1.7rem; }
  .join-section h2 { font-size: 1.7rem; }
  .join-section .button { margin-top: 1.3rem; }
  .selected-section { padding-bottom: 3rem; }
  .selected-papers > li { grid-template-columns: minmax(0, 1fr); gap: .4rem; padding-block: 1.15rem; }
  .paper-meta { padding-top: 0; }
  .selected-papers .title { font-size: 1.12rem; }
  .selected-papers .title, .selected-papers .paper-meta { grid-column: 1; grid-row: auto; }
  .page-intro { padding-block: 3.1rem 2rem; }
  .page-intro h1 { font-size: 3rem; }
  .page-intro p { font-size: 1rem; }
  .content-section, .cv-section { padding-top: 2.1rem; }
  .content-section > h2, .cv-section > h2 { font-size: 1.8rem; }
  .group-grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-bottom: 1.5rem; }
  .group-grid .content-section:last-child { padding-bottom: 1.5rem; }
  .alumni-section .people-list { grid-template-columns: minmax(0, 1fr); }
  .talk-list > li { grid-template-columns: 1.6rem minmax(0, 1fr); gap: .65rem 1rem; }
  .talk-list h2 { font-size: 1.35rem; }
  .download-link { grid-column: 2; margin-top: 0; justify-self: start; }
  .footer-inner { align-items: start; flex-direction: column; justify-content: center; gap: .3rem; min-height: 95px; }
}

@media (max-width: 380px) {
  .container, .header-inner, .footer-inner { width: calc(100% - 36px); }
  .site-nav { column-gap: 1.2rem; }
  .site-nav a { font-size: .8rem; }
  .hero h1 { font-size: 2.65rem; }
  .profile { grid-template-columns: 105px minmax(0, 1fr); column-gap: 1.2rem; }
  .profile dl { font-size: .75rem; }
  .portrait-fallback { font-size: 2.7rem; }
  .questions h3 { font-size: 1.18rem; }
  .questions li { grid-template-columns: 1.6rem minmax(0, 1fr); }
  .join-section { padding: 1.35rem; }
}

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

@media print {
  @page { margin: 18mm; }
  :root { --paper: #fff; --ink: #000; --text: #111; --muted: #444; --accent: #000; --line: #ccc; }
  body { background: #fff; font-size: 10pt; line-height: 1.5; }
  .container, .header-inner, .footer-inner { width: 100%; }
  .site-header { border-bottom: 1px solid #aaa; }
  .header-inner { min-height: 0; padding-block: 0 1rem; }
  .brand span { font-size: 20pt; }
  .brand small { font-size: 8pt; }
  .site-nav, .skip-link, .search-bar, .section-links, .button { display: none; }
  a { color: #000; text-decoration: none; }
  h1 { font-size: 32pt; }
  h2 { font-size: 21pt; }
  h1, h2, h3 { break-after: avoid; }
  p { orphans: 3; widows: 3; }
  .hero { grid-template-columns: minmax(0, 1fr) 180px; padding-block: 2rem; gap: 2rem; }
  .hero h1 { font-size: 32pt; }
  .hero .intro { font-size: 11pt; }
  .portrait { max-width: 150px; }
  .profile dl { font-size: 8pt; }
  .profile h2, .profile h3 { margin-top: 1rem; font-size: 8pt; }
  .questions-section, .content-section, .cv-section, .alumni-section { padding-block: 1.5rem; }
  .questions { display: block; }
  .questions li { padding-block: .8rem; break-inside: avoid; }
  .questions h3 { font-size: 12pt; }
  .questions li:last-child { max-width: none; }
  .join-section { display: block; margin-block: 1.5rem; padding: 1rem; background: #fff; break-inside: avoid; }
  .join-section h2 { font-size: 17pt; }
  .join-section p, .record-list > li, .people-list > li { font-size: 10pt; }
  .selected-section, .talk-list, .content-section:last-child, .cv-section:last-child { padding-bottom: 1.5rem; }
  .selected-papers > li { grid-template-columns: 100px minmax(0, 1fr); gap: 1rem; padding-block: .75rem; break-inside: avoid; }
  .selected-papers .title { font-size: 11pt; }
  .paper-meta { font-size: 8pt; }
  .page-intro { padding-block: 2rem 1rem; }
  .page-intro h1 { font-size: 32pt; }
  .record-list > li, .people-list > li, .talk-list > li { break-inside: avoid; }
  .record-list > li { padding-block: .75rem; }
  .record-list > li > a:first-child, .record-list .paper-title { font-size: 10pt; }
  .record-list .authors, .record-list .venue, .record-list .paper-authors, .record-list .paper-venue { font-size: 9pt; }
  .talk-list h2 { font-size: 14pt; }
  .site-footer { margin-top: 1rem; }
  .footer-inner { min-height: 0; padding-block: 1rem 0; font-size: 8pt; }
}
