/* amirjaved.com — "Signal" theme
   Ink-dark masthead, paper-white reading column, one rust accent.
   Serif for names and headings, mono for metadata, sans for reading. */

:root {
  --paper: #fbfaf7;
  --surface: #ffffff;
  --ink: #15191f;
  --muted: #5b6370;
  --faint: #8a919c;
  --line: #e5e1d8;
  --accent: #b23f17;
  --accent-soft: rgba(178, 63, 23, 0.08);

  --band: #0d1520;
  --band-2: #131d2b;
  --band-ink: #eef1f5;
  --band-muted: #a7b0bd;
  --band-line: rgba(255, 255, 255, 0.10);
  --band-accent: #f0875b;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --max: 1040px;
  --read: 720px;
  --r: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1318;
    --surface: #151a21;
    --ink: #e8eaee;
    --muted: #a3abb7;
    --faint: #7b8491;
    --line: #262d37;
    --accent: #f0875b;
    --accent-soft: rgba(240, 135, 91, 0.10);
    --band: #080c11;
    --band-2: #0c121a;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.65 var(--sans); }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; background: var(--surface); color: var(--ink); padding: 8px 12px; z-index: 20; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Masthead ---------- */
.site-header { background: var(--band); color: var(--band-ink); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--band-line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 60px; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--band-ink); text-decoration: none; letter-spacing: 0.005em; }
.brand span { color: var(--band-accent); }
nav { display: flex; gap: 22px; flex-wrap: wrap; }
nav a { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--band-muted); text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent; }
nav a:hover, nav a[aria-current="page"] { color: var(--band-ink); border-bottom-color: var(--band-accent); }

.hero { background:
    linear-gradient(var(--band-line) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--band-line) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(1200px 500px at 85% 0%, var(--band-2), var(--band));
  color: var(--band-ink); }
.hero-grid { display: grid; grid-template-columns: 1fr 280px; gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 56px; }
.kicker { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--band-accent); margin: 0 0 18px; }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 1.02; letter-spacing: -0.015em; margin: 0 0 20px; }
.hero h1 small { display: block; font-family: var(--mono); font-size: 0.95rem; font-weight: 400; letter-spacing: 0.08em; color: var(--band-muted); margin-bottom: 10px; }
.hero .lead { font-size: 1.2rem; line-height: 1.55; color: #d6dbe2; max-width: 34em; margin: 0 0 28px; }
.hero .lead strong { color: var(--band-ink); font-weight: 600; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 8px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid var(--band-line); color: var(--band-ink); background: rgba(255,255,255,0.04); }
.btn:hover { background: rgba(255,255,255,0.09); }
.btn.primary { background: var(--band-accent); border-color: var(--band-accent); color: #1a0d06; }
.btn.primary:hover { filter: brightness(1.06); }
.profiles { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }
.profiles a { font-family: var(--mono); font-size: 13px; color: var(--band-muted); text-decoration: none; }
.profiles a::before { content: "↗ "; color: var(--band-accent); }
.profiles a:hover { color: var(--band-ink); }

.portrait { position: relative; margin: 0; }
.portrait img { width: 280px; height: 320px; object-fit: cover; object-position: 50% 30%; border-radius: 12px; position: relative; z-index: 1; }
.portrait::after { content: ""; position: absolute; top: 14px; left: 14px; right: -14px; height: 320px; border: 1px solid var(--band-accent); border-radius: 12px; opacity: 0.7; }
.portrait figcaption { font-family: var(--mono); font-size: 12px; color: var(--band-muted); margin-top: 28px; letter-spacing: 0.04em; }

.metrics { border-top: 1px solid var(--band-line); }
.metrics ul { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 0; list-style: none; }
.metrics li { padding: 22px 16px 24px 0; border-right: 1px solid var(--band-line); padding-left: 20px; }
.metrics li:first-child { padding-left: 0; }
.metrics li:last-child { border-right: 0; }
.metrics strong { display: block; font-family: var(--serif); font-size: 1.9rem; font-weight: 600; line-height: 1.1; color: var(--band-ink); }
.metrics span { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--band-muted); }

/* Sub-page masthead */
.pagehead { background: var(--band); color: var(--band-ink); padding: 56px 0 44px; border-bottom: 3px solid var(--band-accent); }
.pagehead h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.05; margin: 0 0 14px; }
.pagehead p { color: #d6dbe2; max-width: 44em; margin: 0; font-size: 1.1rem; }
.pagehead .jump { margin-top: 18px; font-family: var(--mono); font-size: 13px; }
.pagehead .jump a { color: var(--band-muted); text-decoration: none; margin-right: 18px; }
.pagehead .jump a:hover { color: var(--band-ink); }

/* ---------- Sections ---------- */
main section { padding: 64px 0; border-top: 1px solid var(--line); }
main section:first-child { border-top: 0; }
.sec-head { display: grid; grid-template-columns: 200px 1fr; gap: 32px; }
.label { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); padding-top: 9px; }
.label b { display: block; color: var(--faint); font-weight: 400; margin-bottom: 4px; }
h2 { font-family: var(--serif); font-weight: 600; font-size: 1.85rem; line-height: 1.2; letter-spacing: -0.005em; margin: 0 0 18px; }
h3 { font-size: 1.05rem; margin: 0 0 6px; line-height: 1.35; }
p { margin: 0 0 16px; }
.body { max-width: var(--read); }
.muted { color: var(--muted); }
.small { font-size: 14px !important; }
.more { font-family: var(--mono); font-size: 13.5px; letter-spacing: 0.02em; }

/* News */
.news { list-style: none; margin: 0; padding: 0; }
.news li { display: grid; grid-template-columns: 96px 1fr; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.news li:first-child { border-top: 0; padding-top: 4px; }
.news time, .news .when { font-family: var(--mono); font-size: 13px; color: var(--faint); padding-top: 2px; }
.tag { display: inline-block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; padding: 1px 7px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); margin-right: 8px; vertical-align: 2px; }

/* Research themes */
.themes3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 2px solid var(--ink); }
.theme3 { padding: 22px 24px 4px 0; }
.theme3 + .theme3 { padding-left: 24px; border-left: 1px solid var(--line); }
.theme3 .num { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 0.08em; }
.theme3 h3 { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; margin: 6px 0 10px; }
.theme3 p { color: var(--muted); font-size: 15.5px; }
.theme3 .keyp { font-size: 14px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 12px; }
.theme3 .keyp a { color: var(--ink); text-decoration-color: var(--line); }
.theme3 .keyp a:hover { color: var(--accent); }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.skill { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.skill h3 { font-size: 1rem; }
.skill ul { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.skill li { font-size: 13px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--paper); }

/* Publications */
.pubs { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.pub { display: grid; grid-template-columns: 104px 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.pub:first-child { border-top: 0; }
.venue { align-self: start; text-align: center; font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; padding: 5px 6px; border-radius: 5px; border: 1px solid var(--accent); color: var(--accent); background: var(--accent-soft); }
.venue.conf { border-color: var(--line); color: var(--muted); background: transparent; }
.venue.thesis { border-style: dashed; color: var(--muted); border-color: var(--faint); background: transparent; }
.pub .t { display: block; font-weight: 600; line-height: 1.4; margin-bottom: 4px; color: var(--ink); }
.pub .a { display: block; font-size: 15px; color: var(--muted); }
.pub .a strong { color: var(--ink); font-weight: 600; }
.pub .v { display: block; font-size: 15px; color: var(--muted); font-style: italic; }
.pub .links { margin-top: 8px; display: flex; gap: 8px; }
.pub .links a { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; padding: 2px 9px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); }
.pub .links a:hover { border-color: var(--accent); color: var(--accent); }
.yearhead { font-family: var(--serif); font-size: 1.5rem; margin: 48px 0 6px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); display: flex; justify-content: space-between; align-items: baseline; }
.yearhead span { font-family: var(--mono); font-size: 12px; color: var(--faint); font-weight: 400; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin: 0 0 8px; align-items: center; }
.legend .venue { display: inline-block; font-size: 10.5px; padding: 1px 6px; margin-right: 6px; }

/* Group */
.group { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { padding: 12px 0; border-top: 1px solid var(--line); }
.people li:first-child { border-top: 2px solid var(--ink); }
.people b { display: block; font-weight: 600; }
.people span { font-size: 15px; color: var(--muted); }
.people em { font-style: normal; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-left: 6px; }
.subhead { font-family: var(--mono); font-size: 12.5px; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin: 0 0 10px; }

/* Teaching / consulting */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.plain { padding-left: 1.1em; margin: 0 0 16px; }
.plain li { margin-bottom: 6px; }
.offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.offer { border-top: 3px solid var(--accent); background: var(--surface); border-radius: 0 0 var(--r) var(--r); padding: 20px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.offer h3 { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.offer p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* Contact band */
.contact { background: var(--band); color: var(--band-ink); padding: 64px 0; }
.contact h2 { color: var(--band-ink); }
.contact .label { color: var(--band-accent); }
.contact p { color: #d6dbe2; }
.contact a { color: var(--band-accent); }
.contact .addr { font-family: var(--mono); font-size: 13.5px; color: var(--band-muted); }
.contact .profiles { margin-top: 18px; }

.site-footer { background: var(--band); color: var(--band-muted); font-family: var(--mono); font-size: 12.5px; padding: 22px 0 28px; border-top: 1px solid var(--band-line); }
.site-footer p { margin: 0; }

/* ---------- Supervision page ---------- */
.pubpage { padding-top: 48px; padding-bottom: 64px; }
.pubpage > h2 { margin-top: 56px; padding-top: 0; }
.pubpage > h2:first-of-type { margin-top: 8px; }
.phd { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 28px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.phd .card { border-top: 3px solid var(--accent); border-radius: 0 0 var(--r) var(--r); }
.phd .card h3 { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.phd .card p { margin: 0 0 10px; color: var(--muted); font-size: 15.5px; }
.phd .card p:last-child { margin-bottom: 0; }
.topic { font-weight: 600; color: var(--ink) !important; }
.badge { display: inline-block; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; padding: 2px 8px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); vertical-align: 3px; margin-left: 6px; }
.themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px 40px; }
.theme { padding: 0 !important; border: 0 !important; }
.theme h3 { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; padding-bottom: 8px; border-bottom: 2px solid var(--ink); margin-bottom: 0; }
.projlist { list-style: none; padding: 0; margin: 0; }
.projlist li { padding: 9px 0; border-top: 1px solid var(--line); font-size: 15.5px; display: flex; justify-content: space-between; gap: 14px; }
.projlist li:first-child { border-top: 0; }
.projlist li span { font-family: var(--mono); color: var(--faint); font-size: 12px; white-space: nowrap; padding-top: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .themes3, .skills, .offers { grid-template-columns: 1fr 1fr; }
  .theme3:nth-child(3) { grid-column: span 2; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .metrics ul { grid-template-columns: repeat(3, 1fr); }
  .metrics li:nth-child(3) { border-right: 0; }
  .metrics li:nth-child(4) { padding-left: 0; }
  .metrics li:nth-child(n+4) { border-top: 1px solid var(--band-line); }
}
@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 16px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 44px; padding-bottom: 36px; }
  .portrait { order: -1; max-width: 200px; }
  .portrait img { width: 200px; height: 230px; }
  .portrait::after { height: 230px; }
  .portrait figcaption { display: none; }
  .sec-head, .group, .two { grid-template-columns: 1fr; gap: 8px; }
  .group, .two { gap: 32px; }
  .label { padding-top: 0; }
  .label b { display: inline; margin-right: 8px; }
  .themes3, .skills, .offers { grid-template-columns: 1fr; }
  .theme3, .theme3 + .theme3, .theme3:nth-child(3) { padding: 20px 0 4px; border-left: 0; grid-column: auto; }
  .theme3 + .theme3 { border-top: 1px solid var(--line); }
  .metrics ul { grid-template-columns: 1fr 1fr; }
  .metrics li { padding: 16px 0 !important; border-right: 0 !important; border-top: 1px solid var(--band-line); }
  .metrics li:nth-child(-n+2) { border-top: 0; }
  .metrics li:nth-child(odd) { padding-right: 12px !important; }
  .news li, .pub { grid-template-columns: 1fr; gap: 6px; }
  .venue { justify-self: start; }
  main section { padding: 44px 0; }
  nav { gap: 6px 16px; }
  .nav { padding-top: 10px; padding-bottom: 10px; }
}
@media print {
  .site-header, .hero .actions, .contact .profiles { display: none; }
  .hero, .pagehead, .contact, .site-footer { background: none; color: #000; }
}
.legend + .yearhead { margin-top: 28px; }
.legend { margin-top: 8px; }

/* Impact */
.impact { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; align-items: start; }
.feature { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.feature img { width: 100%; height: auto; aspect-ratio: 1290 / 853; object-fit: cover; }
.feature figcaption { padding: 18px 20px 20px; font-size: 15.5px; color: var(--muted); border-top: 3px solid var(--accent); }
.feature figcaption strong { color: var(--ink); }
.feature .tag { display: table; margin-bottom: 8px; }
.impact-side { display: grid; gap: 16px; }
.hl { border-left: 3px solid var(--accent); padding: 4px 0 4px 18px; }
.hl h3 { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; margin: 8px 0 6px; }
.hl p { font-size: 15.5px; color: var(--muted); margin: 0 0 8px; }
.hl p strong { color: var(--ink); }
.hl .more { margin: 0; }
@media (max-width: 900px) { .impact { grid-template-columns: 1fr; } }
.talks span a { font-family: var(--mono); font-size: 12.5px; }
.talks b em { font-style: italic; font-family: inherit; text-transform: none; letter-spacing: 0; font-size: inherit; color: inherit; margin: 0; }
.two .subhead + .people { margin-bottom: 28px; }
.sec-head + .two, .sec-head + .offers, .sec-head + .skills { margin-top: 8px; }
#speaking .sec-head { margin-bottom: 12px; }
