@font-face {
  font-family: Fraunces;
  src: url('assets/fraunces.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Geist;
  src: url('assets/geist.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --paper: #f5f5f2;
  --ink: #18191b;
  --muted: #5a5b62;
  --blue: #3154f5;
  --lime: #e7f649;
  --line: #d6d6d0;
  --serif: Fraunces, Georgia, serif;
  --sans: Geist, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 105px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
p, h1, h2, h3 { margin: 0; }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }
.container, .header-inner { width: min(1320px, calc(100% - 96px)); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 20;
  left: 20px;
  top: -100px;
  padding: 12px 20px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--lime);
}
.skip-link:focus { top: 12px; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(245, 245, 242, .97);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 80px; display: flex; align-items: center; gap: 32px; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; font-size: .875rem; font-weight: 550; }
.monogram {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--lime);
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -.08em;
  padding-right: 3px;
}
.site-header nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  position: relative;
  font-size: .875rem;
  font-weight: 550;
}
.site-header nav a::after {
  content: '';
  position: absolute;
  inset: auto 0 4px;
  height: 3px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
}
.site-header nav a:hover::after,
.site-header nav a[aria-current="location"]::after { transform: scaleX(1); }
.header-github { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; }
.header-github:hover { background: var(--lime); border-color: var(--lime); }
.header-github svg { width: 20px; height: 20px; }

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 80px;
  row-gap: 45px;
  align-items: start;
  padding: 48px 0 72px;
}
h1 {
  grid-column: 1 / -1;
  font-size: clamp(3.25rem, 10.4vw, 10.25rem);
  font-weight: 550;
  line-height: 1.05;
  letter-spacing: -.075em;
  margin-left: -.065em;
}
h1 > span { white-space: nowrap; }
.name-period { color: var(--blue); }
.hero-copy { padding-top: 10px; }
.identity-note { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.portrait { width: 76px; height: 76px; flex: 0 0 76px; object-fit: cover; border-radius: 50%; }
.eyebrow { font-size: .8125rem; font-weight: 650; letter-spacing: .065em; text-transform: uppercase; line-height: 1.5; }
.affiliation-note { color: var(--muted); font-size: .875rem; margin-top: 4px; line-height: 1.5; }
.personal-line { font-size: clamp(1.9rem, 2.8vw, 2.5rem); font-weight: 500; line-height: 1.18; letter-spacing: -.045em; max-width: 560px; }
.personal-line em { font-family: var(--serif); font-weight: 480; color: var(--blue); }
.hero-summary { max-width: 520px; margin-top: 22px; line-height: 1.75; color: var(--muted); }
.hero-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.pill { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 23px; border: 1px solid var(--ink); border-radius: 50px; font-size: .875rem; font-weight: 600; }
.pill-dark { background: var(--ink); color: white; }
.pill:hover { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.handle { display: inline-flex; align-items: center; min-height: 44px; margin-top: 7px; color: var(--muted); font-size: .8125rem; }
.handle:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.hero-art { min-width: 0; width: min(100%, 520px); justify-self: end; }
.research-preview { display: block; overflow: hidden; border-radius: 16px; background: var(--blue); color: white; }
.preview-cover { background: #6e57df; }
.research-preview img { width: 100%; height: auto; aspect-ratio: 3 / 2; }
.research-preview > span { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 22px; border-top: 1px solid rgba(255,255,255,.25); font-size: .9375rem; font-weight: 550; }
.research-preview small { display: block; margin-top: 3px; font-size: .75rem; font-weight: 500; }
.research-preview:focus-visible { outline-offset: 5px; }
.preview-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.preview-link { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; padding: 18px 22px 20px; border-radius: 14px; }
.preview-link small { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; font-size: .75rem; font-weight: 550; }
.preview-link > span { font-size: 1.25rem; font-weight: 550; letter-spacing: -.03em; line-height: 1.2; }
.preview-sql { background: #f4a8d1; }
.preview-retrieval { background: #e7f649; }

.papers-section { padding-top: 34px; border-top: 1px solid var(--ink); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 25px; margin-bottom: 38px; }
h2 { font-weight: 500; font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: -.065em; line-height: 1.1; }
.heading-note { font-family: var(--serif); font-size: .58em; color: var(--muted); font-style: italic; letter-spacing: -.025em; margin-left: 10px; }
.text-link { font-size: .875rem; text-decoration: underline; text-underline-offset: 5px; white-space: nowrap; }
.text-link:hover { color: var(--blue); }
.paper-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; row-gap: 52px; margin-top: 52px; align-items: start; }
.pin-badge { display: inline-flex; align-items: center; flex-shrink: 0; padding: 3px 11px; border-radius: 50px; background: var(--ink); color: white; font-size: .875rem; line-height: 1.6; font-weight: 650; }
.paper-card { min-width: 0; border-bottom: 1px solid var(--line); }
.paper-cover { display: block; position: relative; overflow: hidden; background: var(--panel); border-radius: 18px; }
.paper-cover:focus-visible { outline-color: var(--panel-ink, var(--ink)); outline-offset: -6px; z-index: 1; }
.paper-cover img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; }
.cover-caption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 25px 14px; background: var(--panel); color: var(--panel-ink, var(--ink)); border-top: 1px solid var(--panel-line, rgba(24,25,27,.17)); font-size: .8125rem; font-weight: 550; }
.paper-content { padding: 26px 5px 24px; }
.paper-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; font-size: .8125rem; color: var(--muted); margin-bottom: 17px; line-height: 1.6; }
.tag { font-weight: 600; color: var(--ink); }
.paper-question { font-weight: 550; font-size: 2.125rem; line-height: 1.13; letter-spacing: -.045em; margin-bottom: 20px; text-wrap: pretty; }
.paper-content h3 { font-size: 1rem; font-weight: 650; line-height: 1.5; letter-spacing: -.012em; }
.paper-content h3 a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.paper-content > p:not(.paper-question) { margin-top: 13px; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.paper-content > .paper-note { font-size: .8125rem !important; line-height: 1.65; padding-left: 12px; border-left: 3px solid #ad6124; }
.paper-content > .paper-authors { font-size: .8125rem !important; }
details { margin-top: 16px; font-size: .875rem; color: var(--muted); }
summary { cursor: pointer; width: fit-content; padding: 6px 0; min-height: 34px; }
summary:hover { color: var(--blue); }
details p { font-size: .875rem; line-height: 1.7; padding-top: 4px; }
.paper-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; padding-top: 4px; }
.paper-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; font-weight: 600; text-decoration: underline; text-decoration-color: #a8a8aa; text-underline-offset: 5px; }
.paper-links a:hover { color: var(--blue); text-decoration-color: var(--blue); }
.featured { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 40px; padding-bottom: 32px; }
.featured .paper-content { padding: 18px 16px 0; }
.featured .paper-question { font-size: clamp(2rem, 3.25vw, 3rem); }
#abiss { --panel: #3154f5; --panel-ink: white; --panel-line: rgba(255,255,255,.25); }
#sql-challenges-2026 { --panel: #e7f649; }
#digital-maktaba-lp-journal { --panel: #bba9f2; }
#maktaba-platform { --panel: #9fe6c6; }
#dm-lp { --panel: #82d8ee; }
#cover { --panel: #6e57df; --panel-ink: white; --panel-line: rgba(255,255,255,.25); }
#refused-sql { --panel: #f4a8d1; }
#arabic-ocr-abstract { --panel: #f4d84f; }
#arabic-text-enhancement { --panel: #ff8070; }
#sensitive-retrieval { --panel: #8cb9f1; }
#sql-promise-pitfalls { --panel: #ff925c; }
#digital-humanities { --panel: #eeacba; }

.about-section { margin-top: 110px; padding-top: 48px; border-top: 1px solid var(--ink); }
.about-section h2 { margin-top: 17px; }
h2 em { font-family: var(--serif); color: var(--blue); font-weight: 450; }
.big-bio { font-size: clamp(1.85rem, 3.5vw, 3rem); font-weight: 500; line-height: 1.3; letter-spacing: -.045em; max-width: 1110px; margin: 36px 0 40px; }
.big-bio strong { font-family: var(--serif); color: var(--blue); font-weight: 470; }
.bio-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; color: var(--muted); max-width: 1160px; }
.inline-link { text-decoration: underline; text-underline-offset: 4px; }
.inline-link:hover { color: var(--blue); }
.research-tools { margin-top: 40px; padding: 28px 0; border-block: 1px solid var(--line); }
.research-tools h3 { font-size: 1rem; font-weight: 650; }
.research-tools p { margin-top: 10px; color: var(--muted); }
.tool-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.tool-list span { padding: 5px 13px; font-size: .875rem; border: 1px solid #c5c5c0; border-radius: 50px; }
.affiliations { margin-top: 20px; }
.affiliation { display: grid; grid-template-columns: 260px 1fr; gap: 40px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.affiliation > span { font-size: .875rem; color: var(--muted); padding-top: 5px; }
.affiliation h3 { font-size: 1.1875rem; line-height: 1.5; font-weight: 550; letter-spacing: -.025em; }
.affiliation h3 a:hover { color: var(--blue); }
.affiliation p { margin-top: 10px; font-size: .9375rem; line-height: 1.75; color: var(--muted); }
.contact-section { padding: 52px 55px; margin-top: 90px; background: var(--lime); border-radius: 22px; }
.contact-section h2 { margin-top: 16px; }
.contact-section h2 em { color: var(--ink); }
.contact-email { display: inline-block; font-size: clamp(1.2rem, 2.4vw, 2rem); font-weight: 500; letter-spacing: -.035em; margin-top: 30px; text-decoration: underline; text-underline-offset: 7px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.contact-email:hover { color: #213ba9; }
.contact-links { display: flex; flex-wrap: wrap; column-gap: 25px; row-gap: 5px; margin-top: 25px; }
.contact-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; }
.contact-links a:hover { text-decoration: underline; text-underline-offset: 5px; }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 15px; padding-block: 32px 40px; color: var(--muted); font-size: .8125rem; }
.site-footer a { text-decoration: underline; text-underline-offset: 4px; }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .paper-card, .research-preview, .preview-link { transition: transform 180ms cubic-bezier(.2,.8,.2,1); }
  .paper-card:hover, .paper-card:focus-within, .research-preview:hover, .research-preview:focus-visible, .preview-link:hover, .preview-link:focus-visible { transform: translateY(-2px); }
}
@media (prefers-reduced-motion: no-preference) {
  .site-header nav a::after { transition: transform 160ms ease; }
  .pill { transition: background-color 120ms ease, border-color 120ms ease, transform 160ms ease; }
  .pill:active { transform: scale(.985); transition-duration: 90ms; }
}
@media (max-width: 1100px) {
  .container, .header-inner { width: calc(100% - 64px); }
  .hero { column-gap: 40px; row-gap: 35px; }
  .personal-line { font-size: 2rem; }
  .paper-grid, .featured { column-gap: 30px; }
  .featured .paper-content { padding: 5px 0 0; }
  .featured .paper-question { font-size: 2.25rem; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 90px; }
  .container, .header-inner { width: calc(100% - 40px); }
  .header-inner { height: 68px; gap: 15px; }
  .site-header nav { gap: 20px; }
  .header-github { display: none; }
  .hero { grid-template-columns: 1fr; row-gap: 28px; padding: 34px 0 48px; }
  h1 { font-size: clamp(3.5rem, 10vw, 5.5rem); line-height: 1; letter-spacing: -.065em; }
  h1 > span { display: block; }
  .hero-copy { padding: 0; }
  .identity-note { gap: 15px; margin-bottom: 20px; }
  .portrait { width: 62px; height: 62px; flex-basis: 62px; }
  .personal-line { font-size: 2rem; max-width: 560px; }
  .hero-summary { max-width: 560px; margin-top: 18px; }
  .hero-links { margin-top: 22px; }
  .hero-art { width: 100%; max-width: 560px; justify-self: center; }
  .research-preview img { display: none; }
  .research-preview > span { border-top: 0; }
  .research-preview > span { padding-inline: 20px; }
  .preview-link { padding: 17px 20px 19px; }
  .papers-section { padding-top: 28px; }
  .section-heading { gap: 20px; margin-bottom: 28px; }
  h2 { font-size: 2.75rem; }
  .heading-note { display: block; margin-left: 0; margin-top: 5px; font-size: .6em; }
  .featured { grid-template-columns: 1fr; gap: 22px; padding-bottom: 20px; }
  .featured .paper-content { padding: 0 3px; }
  .paper-grid { grid-template-columns: 1fr; row-gap: 35px; margin-top: 35px; }
  .paper-content { padding: 24px 3px 20px; }
  .paper-question, .featured .paper-question { font-size: 2rem; }
  .paper-cover { border-radius: 15px; }
  .cover-caption { padding-inline: 22px; }
  .about-section { margin-top: 75px; padding-top: 36px; }
  .big-bio { font-size: 2rem; margin: 28px 0; }
  .bio-columns { grid-template-columns: 1fr; gap: 22px; }
  .affiliation { grid-template-columns: 1fr; gap: 10px; padding-block: 24px; }
  .affiliation > span { padding-top: 0; }
  .contact-section { padding: 35px 28px; margin-top: 60px; border-radius: 16px; }
  .contact-links { column-gap: 22px; }
}
@media (max-width: 430px) {
  .container, .header-inner { width: calc(100% - 32px); }
  .header-inner { gap: 12px; }
  .wordmark { gap: 8px; font-size: .8125rem; }
  .monogram { width: 30px; height: 30px; font-size: 1.25rem; }
  .site-header nav { gap: 15px; }
  .site-header nav a { font-size: .8125rem; }
  h1 { font-size: clamp(2.9rem, 11.5vw, 4.75rem); }
  h1 > span { white-space: normal; overflow-wrap: anywhere; }
  .personal-line { font-size: 1.8rem; }
  .identity-note .eyebrow { font-size: .75rem; }
  .affiliation-note { font-size: .8125rem; }
  .hero-links { gap: 9px; }
  .pill { padding-inline: 18px; }
  .research-preview > span { padding-inline: 16px; }
  .preview-link { padding: 15px 16px 18px; }
  .preview-link > span { font-size: 1.125rem; }
  .preview-link small { font-size: .75rem; }
  .section-heading { gap: 14px; }
  .text-link { font-size: .8125rem; }
  .paper-question, .featured .paper-question { font-size: 1.85rem; }
  .cover-caption { padding-inline: 18px; }
  .contact-section { padding-inline: 23px; }
  .site-footer { gap: 8px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  body { background: white; }
  .site-header, .hero-art, .portrait, .hero-links, .paper-cover, .contact-section, .site-footer { display: none; }
  .container { width: 100%; }
  .hero { display: block; padding: 0; }
  .about-section { padding: 0; }
  .hero, .papers-section, .about-section { margin: 20px 0; }
  .paper-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .paper-card, .featured { display: block; break-inside: avoid; box-shadow: none; }
  .paper-content, .featured .paper-content { padding: 16px; }
  .paper-links a[href]::after { content: ' (' attr(href) ')'; font-size: .7rem; overflow-wrap: anywhere; }
  h1 { font-size: 3rem; }
  .big-bio { font-size: 1.7rem; }
}
