/* emansour.com — clean academic theme. Light only. No frameworks, no external requests. */
:root {
  color-scheme: light;
  --bg: #f8f9fb;              /* off-white page background for all sections */
  --surface: #ffffff;
  --text: #171b26;
  --muted: #4a5164;
  --accent: #8a1f3d;          /* burgundy: links and small highlights */
  --navy: #263250;            /* rules, buttons, card edges */
  --band: #e3e7ef;            /* header, hero and footer — matches the portrait background */
  --on-band: #171b26;
  --on-band-muted: #3b4360;
  --serif: Charter, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 46rem;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 var(--sans); }
.wrap { width: 100%; max-width: 62rem; margin: 0 auto; padding: 0 1.25rem; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
img { max-width: 100%; height: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 2.3rem; margin: 2rem 0 .5rem; }
h2 { font-size: 1.5rem; margin: 2.6rem 0 1rem; padding-left: .8rem; position: relative; }
h2::before { content: ""; position: absolute; left: 0; top: .18em; bottom: .12em; width: 4px; border-radius: 2px; background: var(--accent); }
h3 { font-size: 1.15rem; margin: 1.6rem 0 .5rem; }
p, ul, ol { margin: 0 0 1rem; }
main > p:not([class]), main > ul:not([class]), main > ol:not([class]) { max-width: var(--measure); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: var(--measure); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* header */
.site-header { background: var(--band); border-bottom: 2px solid var(--accent); position: sticky; top: 0; z-index: 5; }
.home .site-header { border-bottom: 0; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.6rem; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; letter-spacing: -.01em; color: var(--on-band); text-decoration: none; white-space: nowrap; }
.site-nav { display: flex; gap: 1.05rem; flex-wrap: wrap; align-items: center; }
.site-nav a { color: var(--on-band-muted); text-decoration: none; font-size: .845rem; letter-spacing: .01em; padding: .3rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--on-band); }
.site-nav a[aria-current="page"] { color: var(--on-band); border-bottom-color: var(--accent); }
.menu-btn { display: none; font: inherit; font-size: .88rem; background: none; color: var(--on-band); border: 1px solid rgba(23,27,38,.35); border-radius: 6px; padding: .3rem .8rem; cursor: pointer; }

/* hero: compact band, photo matched to the height of the text */
.hero-band { background: var(--band); color: var(--on-band); }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 12rem; gap: 2rem; align-items: stretch; padding: 1.15rem 0 1.3rem; }
.hero .eyebrow { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--on-band-muted); margin: 0 0 .2rem; }
.hero h1 { font-size: 2.2rem; margin: 0 0 .1rem; color: var(--on-band); }
.hero .role { font-size: .97rem; color: var(--on-band-muted); margin: 0 0 .65rem; }
.hero .position { font-family: var(--serif); font-size: 1.14rem; line-height: 1.4; margin: 0 0 .75rem; max-width: 45rem; color: var(--on-band); }
.hero-photo { width: 100%; height: 100%; min-height: 12rem; object-fit: cover; object-position: 50% 20%; display: block; }
.status { list-style: none; padding: 0; margin: 0 0 .75rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.status li { background: rgba(255,255,255,.7); border: 1px solid rgba(23,27,38,.14); border-radius: 999px; padding: .15rem .8rem; font-size: .87rem; color: var(--on-band); }
.status li strong { font-weight: 600; color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin: 0; padding: 0; list-style: none; }
.btn { display: inline-block; background: var(--navy); color: #fff; text-decoration: none; padding: .45rem 1rem; border-radius: 8px; font-weight: 600; font-size: .93rem; }
.btn:hover { filter: brightness(1.15); }
.actions a:not(.btn) { font-size: .93rem; }
.hero-band .actions a:not(.btn) { color: var(--on-band); text-decoration-color: rgba(23,27,38,.4); }
.hero-band .actions a:not(.btn):hover { color: var(--accent); }

@media (max-width: 760px) {
  .js .menu-btn { display: inline-block; }
  .js .site-nav { display: none; width: 100%; flex-direction: column; gap: 0; padding-bottom: .75rem; }
  .js .site-nav.open { display: flex; }
  .js .site-nav a { padding: .6rem 0; border-bottom: 1px solid rgba(23,27,38,.12); }
  .site-nav { gap: .5rem 1rem; padding-bottom: .5rem; }
  body { font-size: 16px; }
  h1 { font-size: 1.9rem; }
  .hero { grid-template-columns: 1fr; gap: .9rem; padding: 1.1rem 0 1.2rem; }
  .hero-photo { max-width: 8.5rem; height: auto; min-height: 0; aspect-ratio: 4 / 5; order: -1; }
  .hero h1 { font-size: 2.1rem; }
  .hero .position { font-size: 1.12rem; }
}

/* recent strip */
.recent { margin-top: 1.5rem; border-bottom: 1px solid var(--band); padding: 0 0 1.1rem; }
.recent h2 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 .6rem; padding: 0; font-family: var(--sans); }
.recent h2::before { display: none; }
.recent ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.recent li { border-top: 3px solid var(--navy); padding-top: .5rem; }
.recent time { display: block; font-size: .8rem; color: var(--muted); }
.recent a { color: var(--text); text-decoration: none; font-size: .93rem; line-height: 1.4; display: block; }
.recent a:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 900px) { .recent ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .recent ol { grid-template-columns: 1fr; } }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.card { background: var(--surface); border: 1px solid var(--band); border-top: 3px solid var(--navy); border-radius: var(--radius); padding: 1.05rem 1.15rem; display: flex; flex-direction: column; gap: .35rem; }
.card h3 { margin: 0; font-size: 1.05rem; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent); text-decoration: underline; }
.card p { margin: 0; font-size: .93rem; color: var(--muted); }
.card .meta { font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.card .who { font-size: .85rem; color: var(--text); margin-top: auto; padding-top: .5rem; }
.card .links { margin-top: .4rem; display: flex; gap: .9rem; font-size: .9rem; }
.tag { display: inline-block; background: var(--band); border-radius: 6px; font-size: .78rem; padding: 0 .5rem; margin-right: .3rem; color: var(--text); }
.callout { background: var(--band); border-left: 4px solid var(--navy); padding: .7rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; font-size: .93rem; margin: .4rem 0 0; }
.section-more { margin: .25rem 0 0; font-size: .93rem; }

/* news */
.news { list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.news li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--band); }
.news time { color: var(--muted); font-size: .88rem; }
.news .t { font-weight: 600; }
.news .t a { text-decoration: none; color: var(--text); }
.news .t a:hover { color: var(--accent); text-decoration: underline; }
.news p { margin: .2rem 0 0; font-size: .93rem; color: var(--muted); }
@media (max-width: 520px) { .news li { grid-template-columns: 1fr; gap: .1rem; } }

/* thrusts */
.thrust { padding: 1.3rem 0; border-top: 1px solid var(--band); max-width: var(--measure); }
.thrust h2 { margin: 0 0 .5rem; font-size: 1.3rem; }
.thrust .num { color: var(--accent); font-family: var(--sans); font-size: .82rem; font-weight: 700; letter-spacing: .08em; display: block; margin-bottom: .2rem; }
.people { font-size: .93rem; }
.people strong { font-weight: 600; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 0 1.5rem; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; min-width: 34rem; }
th, td { text-align: left; padding: .55rem .8rem; border-bottom: 1px solid var(--band); vertical-align: top; }
thead th { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; border-bottom: 2px solid var(--navy); }
tbody th { font-size: .97rem; color: var(--text); font-weight: 600; }
tbody th .sub { display: block; font-weight: 400; font-size: .82rem; color: var(--muted); margin-top: .15rem; }
tbody tr:hover { background: var(--band); }
@media (max-width: 600px) {
  table { min-width: 0; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; left: -999px; }
  tr { border-bottom: 1px solid var(--band); padding: .7rem 0; }
  th, td { border: 0; padding: .1rem 0; }
  td[data-label]:not(:empty)::before { content: attr(data-label) ": "; color: var(--muted); font-size: .82rem; }
  tbody tr:hover { background: none; }
}

/* alumni cards */
.cards.alumni { grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); }
.cards.alumni .now { font-size: .93rem; color: var(--text); }
.cards.alumni .who { font-weight: 400; margin-top: .35rem; padding-top: 0; }

/* publications */
.pubs { list-style: none; margin: 0 0 1rem; padding: 0; max-width: var(--measure); }
.pubs li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: .5rem; padding: .8rem 0; border-bottom: 1px solid var(--band); font-size: .95rem; }
.pubs .id { color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; padding-top: .1rem; }
.pubs .title { font-weight: 600; display: block; }
.pubs .venue { color: var(--muted); }
.pubs .links { display: inline-flex; gap: .8rem; margin-left: .3rem; font-size: .9rem; }

/* generic content */
main ul li, main ol li { margin-bottom: .35rem; }
.kv { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: .3rem 1.5rem; max-width: var(--measure); }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0 0 .6rem; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 1rem; } }
.timeline { list-style: none; padding: 0; max-width: var(--measure); }
.timeline li { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1rem; padding: .5rem 0; }
.timeline .when { color: var(--muted); font-size: .9rem; }
@media (max-width: 520px) { .timeline li { grid-template-columns: 1fr; gap: 0; } }
blockquote { margin: 1rem 0; padding: .2rem 1rem; border-left: 3px solid var(--band); color: var(--muted); }
code { font-size: .9em; background: var(--band); padding: .1rem .3rem; border-radius: 4px; }

/* footer */
.site-footer { margin-top: 3.5rem; background: var(--band); color: var(--on-band-muted); padding: 1.6rem 0 2.2rem; font-size: .9rem; border-top: 2px solid var(--accent); }
.site-footer p { margin: 0 0 .6rem; }
.site-footer strong { color: var(--on-band); }
.site-footer a { color: var(--on-band); text-decoration-color: rgba(23,27,38,.4); }
.site-footer a:hover { color: var(--accent); }
.site-footer .links { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.site-footer .fine { font-size: .8rem; }

@media print {
  .site-header, .site-footer, .menu-btn, .skip { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
}
