/* Romyar Sharifi · The original layout, with stronger contrast.
   Lora and IBM Plex Sans are bundled locally with their licenses.
   Bitter remains available for the private font comparison. */
@font-face { font-family: 'IBM Plex Sans'; src: url('assets/fonts/IBMPlexSans-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('assets/fonts/IBMPlexSans-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('assets/fonts/IBMPlexSans-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('assets/fonts/IBMPlexSans-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Lora'; src: url('assets/fonts/lora-variable.ttf') format('truetype'); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face {
  font-family: 'Bitter';
  src: url('assets/fonts/bitter-latin-ext-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bitter';
  src: url('assets/fonts/bitter-latin-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --paper: #fdfdfb;
  --white: #ffffff;
  --ink: #142139;
  --body: #263449;
  --muted: #445066;
  /* UCLA's primary blue and gold, with its darker/lightest blue accents. */
  --accent: #2774ae;
  --accent-dark: #005587;
  --wash: #daebfe;
  --line: #bbc6d6;
  --gold: #ffd100;
  --gold-hover: #ffc72c;
  --gold-wash: #fff1cb;
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --text-small: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; color: var(--body); background: var(--paper); font: 16px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--accent-dark); }
a, button, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); }
h1, h2 { font-family: var(--serif); font-weight: 500; font-optical-sizing: auto; letter-spacing: normal; }
h1 { line-height: 1.03; }
h2, .hero h1 { font-size: clamp(30px, 3.5vw, 44px); line-height: 1.2; letter-spacing: normal; }
h3 { font-weight: 500; line-height: 1.4; }
::selection { color: var(--ink); background: var(--wash); }
/* One small-label treatment for captions, downloads, dates, and controls.
   Keep acronyms uppercase in the HTML, without forcing other labels to capitals. */
.brand-place, .research-topics .label, .paper-year, .paper-links,
.paper-action, .badge, .note-preview-pdf, .contact-details dt,
.note-card .note-format, .resource-format, .site-nav a,
.button, .text-link, .filter, .result-status, .section-nav a {
  font-family: var(--sans);
  font-size: var(--text-small);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
}
.container { width: min(1120px, calc(100% - 112px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 20; top: -80px; left: 20px; padding: 10px 18px; background: var(--white); }
.skip-link:focus { top: 12px; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 106px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: var(--ink); text-decoration: none; flex-shrink: 0; }
.brand-name { display: block; font: 500 25px/1.2 var(--serif); letter-spacing: normal; }
.brand-place { display: block; margin-top: 6px; color: var(--muted); }
.site-nav { display: flex; align-items: center; gap: 27px; }
.site-nav a { padding-block: 9px; color: var(--body); white-space: nowrap; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current='page'] { color: var(--accent); }
.site-nav a[aria-current='page'] { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 3px; text-underline-offset: 9px; }
.arrow { display: inline-block; margin-left: 10px; font-family: var(--sans); font-weight: 400; }
.research-topics .label { color: var(--accent); font-size: 15px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 210px; align-items: center; gap: 64px; padding-block: 48px; border-bottom: 1px solid var(--line); }
.hero-copy { min-width: 0; }
.hero h1 { margin-bottom: 12px; white-space: nowrap; }
.hero .role { margin-bottom: 24px; color: var(--ink); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 14px; min-height: 46px; padding: 11px 20px; border: 1px solid var(--accent); border-radius: 3px; background: var(--accent); color: white; text-decoration: none; transition: background .15s ease; }
.button:hover { color: white; background: var(--accent-dark); }
.button--gold { border-color: var(--gold); background: var(--gold); color: var(--ink); }
.button--gold:hover { border-color: var(--gold-hover); background: var(--gold-hover); color: var(--ink); }
.text-link { text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.portrait-block { width: 100%; max-width: 210px; margin: 0; padding: 0; justify-self: end; }
.portrait { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; object-position: 50% 45%; border-radius: 6px; }
.research-topics { display: grid; gap: 6px; margin-bottom: 22px; color: var(--body); font-size: 16px; }
.research-topics .label { margin: 0; }
.research-topic-list { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; padding: 0; list-style: none; }
.research-topics .topic::before { content: '·'; padding-right: 10px; color: var(--accent); }
.section { padding-block: 72px; }
.recent-work { padding-block: 52px 56px; }
.recent-work .section-heading { margin-bottom: 26px; }
.recent-work .paper { padding-block: 24px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.section-heading h2 { margin: 0; }
.section-heading .text-link { flex-shrink: 0; padding-bottom: 5px; }
.paper-list { list-style: none; padding: 0; margin: 0; }
.paper { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; column-gap: 24px; align-items: start; padding-block: 27px; border-top: 1px solid var(--line); }
.paper:last-child { border-bottom: 1px solid var(--line); }
.paper-year { padding-top: 4px; color: var(--accent); font-variant-numeric: tabular-nums; }
.paper h2, .paper h3 { margin-bottom: 8px; font: 500 21px/1.4 var(--sans); letter-spacing: -.015em; }
.paper h2 a, .paper h3 a { color: var(--ink); text-decoration: none; }
.paper h2 a:hover, .paper h3 a:hover { color: var(--accent); text-decoration: underline; }
.paper p { margin-bottom: 4px; color: var(--muted); font-size: var(--text-small); line-height: 1.7; }
.paper-links { display: flex; flex-wrap: wrap; gap: 8px 17px; padding-top: 10px; }
.paper-links a { text-decoration: none; }
.paper-links a:hover { text-decoration: underline; }
.paper-action { padding-top: 4px; white-space: nowrap; text-decoration: none; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 2px; background: var(--gold-wash); color: var(--ink); }
.notes-band { background: var(--accent); border-block: 1px solid var(--accent); }
.notes-band :focus-visible { outline-color: var(--gold); }
.notes-band h2 { color: var(--white); }
.notes-band .text-link { color: var(--white); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.notes-band .text-link:hover { color: var(--white); text-decoration-color: var(--white); }
.notes-preview { padding-block: 44px; }
.notes-preview .section-heading { margin-bottom: 20px; }
.note-preview-links { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; padding: 0; border-block: 1px solid #8bb8e8; list-style: none; }
.note-preview-links li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; min-width: 0; }
.note-preview-links li + li { border-top: 1px solid #8bb8e8; }
.note-preview-links a { padding-block: 18px; color: var(--white); text-decoration: none; }
.note-preview-links .note-title { min-width: 0; font: 21px/1.4 var(--serif); }
.note-preview-links a:hover { color: var(--white); text-decoration: underline; text-decoration-color: var(--gold); }
.note-preview-links .note-preview-pdf { flex-shrink: 0; white-space: nowrap; }
.contact-grid { padding-block: 56px; }
.contact-grid h2 { margin-bottom: 28px; }
.contact-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 64px; align-items: start; margin: 0; }
.contact-details > div { min-width: 0; }
.contact-details .mailing-address { grid-row: span 2; }
.contact-details dt { margin-bottom: 6px; color: var(--muted); }
.contact-details dd { margin: 0; color: var(--ink); font-size: 15px; }
.contact-details a { overflow-wrap: anywhere; }
.site-footer { padding-block: 26px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; color: var(--muted); font-size: var(--text-small); }
.footer-inner p { margin: 0; }
.footer-inner .accessibility-contact { flex-basis: 100%; }
.footer-inner .accessibility-contact a { text-decoration: underline; }
.footer-inner a { color: var(--muted); text-decoration: none; }
.footer-inner a:hover { color: var(--accent); text-decoration: underline; }
.page-heading { max-width: 790px; padding-block: 65px 45px; }
.page-heading h1 { margin-bottom: 23px; font-size: clamp(40px, 5vw, 60px); }
.page-heading > p:last-child { margin: 0; max-width: 640px; color: var(--muted); font-size: 17px; }
.page-content { padding-bottom: 78px; }
.publication-tools { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0 24px; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filter { min-height: 42px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); background: transparent; }
.filter[aria-pressed='true'] { color: white; border-color: var(--accent); background: var(--accent); }
.filter:hover { border-color: var(--accent); }
.search-wrap { position: relative; width: min(100%, 330px); }
.search-wrap label { display: block; margin-bottom: 5px; font-size: var(--text-small); font-weight: 500; }
.search-wrap input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #768aa8; border-radius: 3px; background: var(--white); color: var(--ink); font-size: var(--text-small); }
.search-wrap input::placeholder { color: var(--muted); }
.result-status { margin-bottom: 17px; color: var(--muted); font-size: var(--text-small); }
.empty-state { padding: 40px 0; color: var(--muted); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.notes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 23px; }
.note-card { display: flex; flex-direction: column; min-height: 265px; padding: 29px; border: 1px solid var(--line); background: var(--white); color: var(--ink); transition: border-color .15s ease, background .15s ease; }
.note-card:hover, .note-card:focus-within { border-color: var(--accent); background: var(--wash); }
.note-card h2 { margin: 0 0 28px; font-size: 28px; }
.note-card h2 a { color: inherit; text-decoration: none; }
.note-card h2 a:hover, .note-card h2 a:focus-visible { color: var(--accent); }
.note-formats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.note-card .note-format { display: inline-flex; align-items: center; min-height: 44px; padding-block: 6px; color: var(--accent); text-decoration: underline; }
.note-card .note-format:hover { text-decoration-thickness: 2px; }
.note-card:hover .note-format, .note-card:focus-within .note-format { color: var(--accent-dark); }
.notice { margin-top: 36px; padding: 24px 28px; border-left: 2px solid var(--gold); background: var(--wash); }
.notice h2 { margin-bottom: 10px; font: 16px/1.5 var(--sans); font-weight: 600; letter-spacing: 0; }
.notice p { margin-bottom: 8px; font-size: var(--text-small); }
.notice p:last-child { margin-bottom: 0; }
.notice a { color: var(--accent-dark); }
.resources-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 55px; }
.section-nav { align-self: start; position: sticky; top: 28px; padding-block: 8px; border-top: 1px solid var(--line); }
.section-nav a { display: block; padding: 10px 0; text-decoration: none; }
.section-nav a:hover { text-decoration: underline; }
.resource-section + .resource-section { margin-top: 52px; }
.resource-section h2 { margin-bottom: 23px; font-size: 32px; }
.resource-list { list-style: none; padding: 0; margin: 0; }
.resource-item { padding-block: 18px; border-top: 1px solid var(--line); }
.resource-item:last-child { border-bottom: 1px solid var(--line); }
.resource-item > a { display: flex; justify-content: space-between; align-items: start; gap: 20px; color: var(--ink); text-decoration: none; }
.resource-item > a:hover { color: var(--accent); text-decoration: underline; }
.resource-title { font: 500 19px/1.45 var(--sans); }
.resource-format { flex-shrink: 0; padding-top: 4px; color: var(--accent); white-space: nowrap; }
.resource-item p { margin: 6px 0 0; color: var(--muted); font-size: var(--text-small); }
.app-feature { padding: 30px; background: var(--wash); border: 1px solid var(--line); }
.app-feature h3 { margin-block: 0 10px; font: 28px/1.4 var(--serif); }
.app-feature p { margin-bottom: 20px; color: var(--muted); font-size: var(--text-small); }
/* Lora's large initial letters have visible side bearings. A small optical
   outdent lines up their ink with the brand and body text without moving the
   content columns. The portrait name and card titles need no correction. */
.page-heading h1,
.section-heading h2,
.resource-section h2,
.cv-section h2,
.contact-grid h2 { margin-inline-start: -.03em; }
@media (max-width: 1050px) {
  .container { width: calc(100% - 72px); }
  .site-nav { gap: 19px; }
  .hero { grid-template-columns: minmax(0, 1fr) 190px; gap: 44px; }
  .resources-layout { grid-template-columns: 155px minmax(0, 1fr); gap: 35px; }
}
@media (max-width: 780px) {
  .container { width: calc(100% - 48px); }
  .header-inner { min-height: 0; padding-block: 24px 18px; flex-direction: column; align-items: start; gap: 18px; }
  .site-nav { justify-content: space-between; width: 100%; gap: 12px; }
  .hero { grid-template-columns: minmax(0, 1fr) 160px; gap: 32px; padding-block: 40px; }
  .hero .role { font-size: 16px; }
  .hero-actions { gap: 15px; }
  .research-topic-list { column-gap: 20px; }
  .section { padding-block: 52px; }
  .paper { grid-template-columns: 78px minmax(0, 1fr) auto; gap: 16px; }
  .paper h2, .paper h3 { font-size: 21px; }
  .notes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-heading { padding-block: 48px 32px; }
  .resources-layout { grid-template-columns: 1fr; gap: 30px; }
  .section-nav { position: static; display: flex; flex-wrap: wrap; column-gap: 24px; border-bottom: 1px solid var(--line); }
  .publication-tools { align-items: stretch; flex-direction: column; gap: 15px; }
  .search-wrap { width: 100%; }
}
@media (max-width: 640px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .portrait-block { width: 160px; justify-self: start; }
}
@media (max-width: 540px) {
  .container { width: calc(100% - 40px); }
  .site-nav { flex-wrap: wrap; justify-content: flex-start; gap: 7px 19px; }
  .site-nav a { padding-block: 8px; }
  .hero { padding-block: 32px; }
  .portrait { aspect-ratio: 1; object-position: center; }
  .research-topics .label { font-size: 14px; }
  .research-topic-list { flex-direction: column; gap: 2px; }
  .section-heading { align-items: start; flex-direction: column; gap: 16px; }
  .recent-work, .contact-grid { padding-block: 40px; }
  .paper { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; padding-block: 23px; }
  .paper-year { grid-column: 1 / -1; }
  .paper h2, .paper h3 { font-size: 22px; }
  .notes-preview { padding-block: 32px; }
  .contact-details { grid-template-columns: 1fr; }
  .contact-details .mailing-address { grid-row: auto; }
  .notes-grid { grid-template-columns: 1fr; gap: 16px; }
  .note-card { min-height: 210px; padding: 25px; }
  .note-card h2 { font-size: 28px; }
  .page-heading h1 { font-size: clamp(34px, 8vw, 40px); }
  .page-heading > p:last-child { font-size: 15px; }
  .resource-title { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
/* Homepage portrait: the original photograph is a separate, unchanged layer.
   A supplies only background beyond the original's left, top and right edges.
   Composition is 1536 × 770: A is cropped at (114, 0), original at (64, 105).
   Mask fades are confined to 8px left, 32px top and 48px right of the original;
   the face, hair and clothing stay opaque, and no generated lower torso shows. */
.hero.hero-banner {
  --portrait-wash: .09;
  --background-wash: .27;
  --portrait-ink: #020812;
  box-sizing: content-box;
  position: relative;
  isolation: isolate;
  width: min(1120px, 100%);
  margin-inline: auto;
  aspect-ratio: 1536 / 770;
  grid-template-columns: 54% 46%;
  gap: 0;
  padding: 0;
  border-bottom: 2px solid var(--gold);
}
.hero-banner .hero-photo { position: absolute; top: 0; left: 0; width: 100%; aspect-ratio: 1536 / 770; overflow: hidden; z-index: -1; }
.hero-banner .hero-background {
  position: absolute; left: -7.421875%; top: 0; width: 115.494791667%; height: auto; max-width: none;
  /* Exclude A's person even while the original is loading or unavailable. */
  clip-path: polygon(0 0, 100% 0, 100% 100%, 73.957158963% 100%, 73.957158963% 15.445321308%, 10.484780158% 15.445321308%, 10.484780158% 100%, 0 100%);
}
.hero-banner .hero-original {
  position: absolute;
  left: 4.166666667%;
  top: 13.636363636%;
  width: 76.953125%;
  height: auto;
  max-width: none;
  mask-image: linear-gradient(to right, transparent, #000 .676819%, #000 95.939086%, transparent), linear-gradient(to bottom, transparent, #000 4.812030%);
  mask-composite: intersect;
}
.hero-banner .hero-photo-wash {
  position: absolute;
  inset: 0;
  /* Keep the portrait's color, then gently soften the surrounding backdrop.
     The broad transition avoids a visible outline around the person. */
  background: radial-gradient(ellipse 29% 80% at 28.5% 85%,
    rgb(253 253 251 / var(--portrait-wash)) 35%,
    rgb(253 253 251 / .11) 65%,
    rgb(253 253 251 / var(--background-wash)) 100%);
}
.hero-banner .hero-copy { grid-column: 2; align-self: center; padding: 28px 36px 28px 16px; color: var(--portrait-ink); }
.hero-banner h1 { margin: 0 0 16px; font-size: 38px; line-height: 1.16; white-space: normal; }
.hero-banner .role { margin-bottom: 20px; color: var(--portrait-ink); font-size: 18px; line-height: 1.6; }
.hero-banner .research-topics { display: block; margin-bottom: 20px; color: var(--portrait-ink); }
.hero-banner .research-topics .label { margin-bottom: 8px; color: var(--portrait-ink); font-size: 15px; }
.hero-banner .research-topic-list { display: block; font-size: 17px; line-height: 1.8; }
.hero-banner .research-topics .topic::before { color: var(--portrait-ink); }
.hero-banner .hero-actions { display: block; }
.hero-banner .hero-actions .text-link { display: inline-block; padding-block: 7px; color: var(--portrait-ink); font-size: 15px; overflow-wrap: anywhere; }
.hero-banner .hero-actions .arrow { margin-left: 8px; }
.hero-banner :focus-visible { outline-color: var(--portrait-ink); }
@media (max-width: 950px) and (min-width: 701px) {
  .hero-banner .hero-copy { padding: 20px 20px 20px 10px; }
  .hero-banner h1 { font-size: 34px; }
  .hero-banner .role, .hero-banner .research-topic-list { font-size: 16px; }
}
@media (max-width: 700px) {
  .hero.hero-banner { display: flex; flex-direction: column; aspect-ratio: auto; }
  .hero-banner .hero-photo { position: relative; width: 100%; aspect-ratio: 1182 / 665; z-index: auto; }
  .hero-banner .hero-background, .hero-banner .hero-photo-wash { display: none; }
  .hero-banner .hero-original { left: 0; top: 0; width: 100%; mask-image: none; }
  .hero-banner .hero-copy { align-self: stretch; padding: 28px 24px 24px; }
  .hero-banner h1 { font-size: 34px; }
  .hero-banner .role, .hero-banner .research-topic-list { font-size: 16px; }
}
@media print {
  body { background: white; color: black; font-size: 11pt; }
  .container { width: 100%; }
  .site-nav, .skip-link, .publication-tools, .section-nav, .paper-action, .hero-actions, .site-footer { display: none !important; }
  .header-inner { min-height: 60px; }
  .hero { padding-block: 30px; }
  .hero.hero-banner { display: block; width: 100%; aspect-ratio: auto; padding-block: 30px; border-color: #777; }
  .hero-banner .hero-photo { display: none; }
  .hero-banner .hero-copy { padding: 0; color: black; }
  .hero-banner .role, .hero-banner .research-topics .label { color: black; }
  .page-heading h1 { font-size: 28px; }
  .paper, .note-card, .resource-item { break-inside: avoid; }
  .resources-layout { display: block; }
  .section { padding-block: 30px; }
  .notes-band { background: white; border-color: #777; }
  .notes-band h2,
  .notes-band .text-link, .note-preview-links a { color: black; }
  a { color: inherit; }
}
