/* Jalal Almuhtadi: personal academic site.
   Layout: sticky identity column on the left, shaded boxes on the right.
   System fonts only, so the page makes no third-party requests. */

:root {
  --bg: #eef1f3;
  --box: #ffffff;
  --tint: #f5f7f8;
  --ink: #1b2126;
  --muted: #58626c;
  --rule: #d8dee3;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --link: #0b6b64;
  --chip: #dcf1ee;
  --shadow: 0 1px 0 rgba(27,33,38,.04), 11px 13px 0 -3px rgba(15,118,110,.14), 16px 20px 34px -14px rgba(27,33,38,.30);

  --f-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121518; --box: #1a1e22; --tint: #1f2328; --ink: #e6e9ec; --muted: #9aa3ac; --rule: #2b3037;
    --accent: #0f766e; --accent-ink: #fff; --link: #5eead4; --chip: #17302f;
    --shadow: 0 1px 0 rgba(0,0,0,.3), 11px 13px 0 -3px rgba(20,184,166,.25), 16px 20px 34px -14px rgba(0,0,0,.7);
  }
}

/* Accent palettes: set "accent" in data/site.json. Teal is the default above. */
html[data-accent="cyan"]      { --accent:#0e7490; --link:#0b6580; --chip:#d9eef5; --shadow: 0 1px 0 rgba(27,33,38,.04), 11px 13px 0 -3px rgba(14,116,144,.14), 16px 20px 34px -14px rgba(27,33,38,.30); }
html[data-accent="turquoise"] { --accent:#0a8279; --link:#08706a; --chip:#d8f3ef; --shadow: 0 1px 0 rgba(27,33,38,.04), 11px 13px 0 -3px rgba(10,130,121,.14), 16px 20px 34px -14px rgba(27,33,38,.30); }
html[data-accent="aqua"]      { --accent:#4fd1e0; --accent-ink:#072a33; --link:#0a6f84; --chip:#daf4f8; --shadow: 0 1px 0 rgba(27,33,38,.04), 11px 13px 0 -3px rgba(79,209,224,.30), 16px 20px 34px -14px rgba(27,33,38,.30); }
@media (prefers-color-scheme: dark) {
  html[data-accent="cyan"]      { --accent:#0e7490; --link:#67e8f9; --chip:#172e36; --shadow: 0 1px 0 rgba(0,0,0,.3), 11px 13px 0 -3px rgba(34,211,238,.22), 16px 20px 34px -14px rgba(0,0,0,.7); }
  html[data-accent="turquoise"] { --accent:#0a7f76; --link:#5ff0dc; --chip:#153230; --shadow: 0 1px 0 rgba(0,0,0,.3), 11px 13px 0 -3px rgba(45,212,191,.24), 16px 20px 34px -14px rgba(0,0,0,.7); }
  html[data-accent="aqua"]      { --accent:#2bb5c9; --accent-ink:#06262d; --link:#7be3f0; --chip:#163239; --shadow: 0 1px 0 rgba(0,0,0,.3), 11px 13px 0 -3px rgba(103,232,249,.22), 16px 20px 34px -14px rgba(0,0,0,.7); }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--f-body); }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 2px; }

.wrap {
  max-width: 1080px; margin: 0 auto;
  padding: 48px 16px 64px;
  display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 48px; align-items: start;
}

/* Identity column */
.id { position: sticky; top: 32px; display: grid; gap: 20px; }
.monogram {
  width: 68px; height: 68px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font: 700 26px/1 var(--f-display);
  box-shadow: var(--shadow);
}
.id h1 { font: 700 32px/1.1 var(--f-display); margin: 0; letter-spacing: -.01em; text-wrap: balance; }
.id .role { color: var(--muted); margin: 6px 0 0; font-size: 15px; }
.id nav { display: grid; border-top: 1px solid var(--rule); padding-top: 12px; }
.id nav a { color: var(--ink); text-decoration: none; font: 500 14px/1 var(--f-mono); padding: 8px 0; }
.id nav a:hover { color: var(--link); }
.id nav a::before { content: "\2192\00a0"; color: var(--muted); }
.contact { border-top: 1px solid var(--rule); padding-top: 16px; font-size: 14px; line-height: 1.55; }
.contact h2 { margin: 0 0 4px; font: 600 11px/1.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.contact p { margin: 0 0 14px; }
.contact .email { font-family: var(--f-mono); font-size: 13.5px; }
.profiles { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; font-size: 14px; }

/* Shaded boxes */
main { display: grid; gap: 36px; min-width: 0; }
.box { background: var(--box); box-shadow: var(--shadow); border: 1px solid var(--rule); min-width: 0; }
.box > header {
  background: var(--accent); color: var(--accent-ink);
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 10px 20px;
}
.box > header h2 { margin: 0; font: 600 13px/1.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; }
.box > header span { font: 400 12px/1.4 var(--f-mono); opacity: .85; }
.body { padding: 22px 24px 24px; }
.body > p { margin: 0 0 14px; max-width: 68ch; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.tags li { background: var(--chip); font: 500 12px/1 var(--f-mono); padding: 7px 10px; }

.marks { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px 36px; margin: 22px 0 0; padding: 22px 0 4px; border-top: 1px solid var(--rule); list-style: none; }
.marks a { display: inline-flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; opacity: .95; }
.marks a:hover { opacity: 1; }
.marks img { display: block; width: auto; }
.marks .logo-ksu img { height: 60px; }
.marks .logo-coeia img { height: 76px; }
.marks .logo-uiuc img { height: 84px; }
.marks .mark { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border: 1px solid var(--rule); background: var(--tint); font: 700 13px/1 var(--f-display); }
.marks .cap { font-size: 12.5px; line-height: 1.3; color: var(--muted); max-width: 14ch; }

/* Publications */
.search { width: 100%; max-width: 360px; font: 400 14px/1 var(--f-body); color: var(--ink); background: var(--tint); border: 1px solid var(--rule); padding: 10px 12px; margin-bottom: 18px; }
.search::placeholder { color: var(--muted); }
.lede { margin: 0 0 18px; color: var(--muted); font-size: 14.5px; max-width: 68ch; }
.year { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; border-top: 1px solid var(--rule); padding-top: 16px; margin-top: 16px; }
.year:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.year h3 { margin: 0; font: 700 22px/1.2 var(--f-display); color: var(--link); font-variant-numeric: tabular-nums; }
.year ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.pub .t { font-weight: 600; display: block; }
.pub .a { font-size: 14.5px; }
.pub .a b { font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.pub .v { color: var(--muted); font-size: 14px; font-style: italic; }
.pub .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pub .meta > * { font: 500 11px/1 var(--f-mono); padding: 5px 7px; border: 1px solid var(--rule); text-decoration: none; color: var(--muted); }
.pub .meta a { color: var(--link); }
.pub .meta a:hover { background: var(--chip); }
.pub .meta .award { background: var(--chip); color: var(--ink); border-color: transparent; }
.empty { color: var(--muted); font-style: italic; }
.note { margin: 22px 0 0; padding-top: 14px; border-top: 1px dashed var(--rule); color: var(--muted); font-size: 12.5px; max-width: 75ch; }

.site-foot { grid-column: 1 / -1; color: var(--muted); font: 400 12px/1.5 var(--f-mono); border-top: 1px solid var(--rule); padding-top: 16px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

@media (max-width: 820px) {
  .wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 28px; }
  .id { position: static; }
  .id nav { grid-auto-flow: column; justify-content: start; gap: 18px; overflow-x: auto; }
  .id nav a::before { content: ""; }
  .year { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .body { padding: 18px; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
