/* ---------------------------------------------------------------
   Mukesh Singh — personal academic site
   Shared stylesheet
   --------------------------------------------------------------- */

:root {
  --bg: #ffffff;
  --bg-subtle: #f6f7f9;
  --text: #1f2430;
  --text-muted: #5b6472;
  --border: #e4e7ec;
  --accent: #285e8e;
  --accent-soft: #eaf1f8;
  --tag-bg: #f0f2f5;
  --tag-text: #3a4250;
  --radius: 10px;
  --max-width: 780px;
  --header-max-width: 1040px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c;
    --bg-subtle: #1b1f26;
    --text: #e7e9ee;
    --text-muted: #9aa3b2;
    --border: #2a2f38;
    --accent: #7cb1e8;
    --accent-soft: #1c2836;
    --tag-bg: #1f242c;
    --tag-text: #c4cbd6;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ---------- header / nav ---------- */

header.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-wrap {
  max-width: var(--header-max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.site-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.site-name:hover { text-decoration: none; opacity: 0.8; }

nav.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

nav.site-nav a {
  color: var(--text-muted);
  font-size: 0.92rem;
  padding: 6px 10px;
  border-radius: 6px;
}

nav.site-nav a:hover {
  color: var(--text);
  background: var(--bg-subtle);
  text-decoration: none;
}

nav.site-nav a.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

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

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

section + section { margin-top: 44px; }

h1 {
  font-size: 1.7rem;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.25rem;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.05rem;
  margin: 0 0 6px;
}

p { margin: 0 0 14px; color: var(--text); }
.muted { color: var(--text-muted); }

/* ---------- hero (home page) ---------- */

.hero {
  display: flex;
  gap: 28px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.avatar {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), #6fa3d8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  font-weight: 700;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-text h1 { margin-bottom: 4px; }
.hero-role {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin: 0;
}

.tagline {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 32px 0 14px;
  color: var(--text);
}

/* ---------- link pills ---------- */

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text);
  font-size: 0.88rem;
}
.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ---------- contact ---------- */

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-list li { margin-bottom: 4px; }

/* ---------- generic lists ---------- */

ul.plain, ol.plain {
  padding-left: 20px;
  margin: 0 0 14px;
}
ul.plain li, ol.plain li { margin-bottom: 8px; }

/* ---------- cards (research projects) ---------- */

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
  background: var(--bg-subtle);
}
.card h3 { color: var(--accent); }
.card p:last-child { margin-bottom: 0; }
.card ul { margin: 6px 0 0; padding-left: 18px; }
.card .link-row:last-child { margin-bottom: 0; }

.card-figure {
  display: block;
  width: 100%;
  height: auto;
  box-sizing: border-box;
  background: #ffffff;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 14px;
}

/* ---------- tag groups (skills) ---------- */

.tag-group { margin-bottom: 16px; }
.tag-group-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.84rem;
}

/* ---------- publications ---------- */

.pub-group { margin-bottom: 28px; }
.pub-item {
  margin-bottom: 14px;
  padding-left: 44px;
  position: relative;
}
.pub-item .pub-num {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}
.pub-item .pub-title { font-weight: 600; }
.pub-item .pub-meta { color: var(--text-muted); font-size: 0.92rem; }
.pub-item a.doi { font-size: 0.88rem; }

/* ---------- workshops timeline ---------- */

.wk-item {
  border-left: 2px solid var(--border);
  padding: 2px 0 20px 18px;
  margin-left: 6px;
  position: relative;
}
.wk-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.wk-item:last-child { border-left-color: transparent; }
.wk-title { font-weight: 600; margin-bottom: 2px; }
.wk-meta { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 4px; }
.badge {
  display: inline-block;
  font-size: 0.76rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  margin-left: 4px;
}

/* ---------- footer ---------- */

footer.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.footer-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.footer-wrap .link-row {
  justify-content: center;
  margin-top: 0;
}
.footer-copyright {
  color: var(--text-muted);
  font-size: 0.86rem;
}

/* ---------- responsive ---------- */

@media (max-width: 560px) {
  .hero { flex-direction: column; align-items: flex-start; }
  main { padding: 32px 18px 60px; }
}
