/* ============================================================
   Hassan Mohammad — Academic site
   Design tokens
   ============================================================ */

:root {
  --bg: #faf9f5;
  --bg-panel: #f3f1ea;
  --text: #1c1b19;
  --text-muted: #635f56;
  --text-faint: #8a8578;
  --accent: #7a2e2e;      /* oxblood — scholarly, not corporate blue */
  --accent-soft: #a9575740;
  --rule: #dfdaca;
  --rule-strong: #c9c2ac;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "IBM Plex Sans", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --max-w: 46rem;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-color: var(--accent-soft);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--accent); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* ---------------- Header / nav ---------------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.25rem 1.5rem 1.25rem;
}

.site-name {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  margin: 0 0 1.1rem;
  letter-spacing: -0.01em;
}

.site-name a { color: var(--text); text-decoration: none; }

nav.site-nav {
  font-family: var(--sans);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

nav.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

nav.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid transparent;
}

nav.site-nav a:hover,
nav.site-nav a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ---------------- Main layout ---------------- */

main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 0.6rem;
}

h2.section-title {
  font-size: 1.5rem;
  margin: 0 0 1.5rem;
}

p { margin: 0 0 1.15rem; }

.lede {
  font-size: 1.12rem;
  color: var(--text);
}

/* ---------------- Hero (home page) ---------------- */

.hero {
  position: relative;
  padding-bottom: 0.5rem;
  overflow: hidden;
}

.hero-motif {
  position: absolute;
  top: -3.5rem;
  right: -4rem;
  width: 22rem;
  height: 22rem;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.hero-content { position: relative; z-index: 1; }

.hero-photo {
  width: 148px;
  height: 148px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--rule-strong);
  margin: 0 0 1.75rem;
  background: var(--bg-panel);
}

.photo-placeholder {
  width: 148px;
  height: 148px;
  border-radius: 4px;
  border: 1px dashed var(--rule-strong);
  background: var(--bg-panel);
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem;
  margin: 0 0 1.75rem;
  line-height: 1.4;
}

.role-block {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  padding-left: 1rem;
  border-left: 2px solid var(--rule-strong);
}

.role-block div { margin-bottom: 0.3rem; }
.role-block div:last-child { margin-bottom: 0; }

/* ---------------- Publications ---------------- */

.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pub-item {
  padding: 1.15rem 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 0.9rem;
}

.pub-item:last-child { border-bottom: 1px solid var(--rule); }

.pub-num {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-faint);
  padding-top: 0.15rem;
}

.pub-authors { margin: 0 0 0.2rem; }
.pub-authors .self { font-weight: 600; }

.pub-venue {
  font-style: italic;
  color: var(--text-muted);
}

.pub-meta {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-top: 0.35rem;
}

.pub-meta a { color: var(--text-faint); }
.pub-meta a:hover { color: var(--accent); }

/* ---------------- People ---------------- */

.people-group { margin-bottom: 2.5rem; }
.people-group h3 {
  font-size: 1.05rem;
  font-family: var(--sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}

.person {
  padding: 0.8rem 0;
  border-bottom: 1px dotted var(--rule);
}
.person:last-child { border-bottom: none; }
.person .name { font-weight: 600; }
.person .detail { color: var(--text-muted); font-family: var(--sans); font-size: 0.94rem; }

/* ---------------- News ---------------- */

.news-item {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}
.news-item:last-child { border-bottom: 1px solid var(--rule); }

.news-date {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  padding-top: 0.2rem;
}

/* ---------------- Projects ---------------- */

.project {
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
}
.project:last-child { border-bottom: 1px solid var(--rule); }

.project h3 {
  font-size: 1.15rem;
  margin: 0 0 0.4rem;
}

.project .tag-row {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.project .links { font-family: var(--sans); font-size: 0.92rem; }

/* ---------------- Artifacts ---------------- */

.artifact-item {
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
}
.artifact-item:last-child { border-bottom: 1px solid var(--rule); }

.artifact-item h3 {
  font-size: 1.15rem;
  margin: 0 0 0.4rem;
}

.artifact-item .tag-row {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.artifact-item .links { font-family: var(--sans); font-size: 0.92rem; }

/* ---------------- Contact ---------------- */

.contact-grid {
  display: grid;
  gap: 0.9rem;
  font-family: var(--sans);
}

.contact-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  padding: 0.7rem 0;
  border-top: 1px solid var(--rule);
  gap: 1rem;
}
.contact-row:last-child { border-bottom: 1px solid var(--rule); }

.contact-label {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-top: 0.15rem;
}

/* ---------------- Notes / placeholders (visible editing aids) ---------------- */

.editnote {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: #9a5b1f;
  background: #f7ecdb;
  border: 1px solid #e7d3ab;
  padding: 0.5rem 0.7rem;
  border-radius: 3px;
  margin: 0.6rem 0 1.2rem;
}

/* ---------------- Footer ---------------- */

footer.site-footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--text-faint);
  border-top: 1px solid var(--rule);
}

footer.site-footer a { color: var(--text-faint); }

/* ---------------- Responsive ---------------- */

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .header-inner { padding: 1.75rem 1.25rem 1rem; }
  main { padding: 2.25rem 1.25rem 4rem; }
  .news-item, .contact-row { grid-template-columns: 1fr; gap: 0.25rem; }
  .pub-item { grid-template-columns: 1.75rem 1fr; }
  .hero-motif { width: 15rem; height: 15rem; top: -2rem; right: -3rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
