/* Utsha Das — personal website. Plain CSS, no web fonts, no frameworks. */

:root {
  --bg: #ffffff;
  --text: #1f2328;
  --muted: #59636e;
  --line: #e5e7eb;
  --accent: #1f3a5f;      /* deep navy, same as the CV */
  --badge-bg: #e8eef6;
  color-scheme: light dark;
}

/* Dark mode follows the visitor's system setting */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121519;
    --text: #e6e8eb;
    --muted: #9aa3ad;
    --line: #2a2f36;
    --accent: #8fb4e3;
    --badge-bg: #1d2836;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 64px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); }

.wrap { max-width: 820px; margin: 0 auto; padding: 0 20px; }

h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: normal; line-height: 1.2; }
h1 { font-size: 2.3rem; margin: 0 0 6px; }
h2 { font-size: 1.55rem; margin: 0 0 16px; color: var(--accent); }
h3 { font-size: 1rem; margin: 0; }

.muted { color: var(--muted); }

/* ---- Top navigation ---- */
.top { background: var(--bg); border-bottom: 1px solid var(--line); }
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 20px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.nav .name { color: var(--text); font-weight: 700; text-decoration: none; }
.nav .links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.95rem; }
.nav .links a { color: var(--muted); text-decoration: none; }
.nav .links a:hover { color: var(--accent); }

/* ---- Intro ---- */
.intro { display: flex; align-items: center; gap: 28px; padding: 40px 0 12px; }
.photo { flex: none; width: 150px; height: 150px; border-radius: 50%; object-fit: cover; background: var(--line); }
.role { margin: 0 0 10px; color: var(--muted); }
.profiles { margin: 0; }

/* ---- Sections ---- */
section { padding: 28px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
section p { margin: 0 0 12px; }

/* ---- Citations table ---- */
.cites { border-collapse: collapse; margin: 4px 0 8px; font-size: 0.95rem; }
.cites caption { margin-bottom: 6px; font-weight: 600; text-align: left; }
.cites caption .muted { font-weight: normal; font-size: 0.85rem; }
.cites th, .cites td { padding: 6px 20px 6px 0; border-bottom: 1px solid var(--line); text-align: left; }
.cites thead th { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.cites tbody th { font-weight: normal; }
.cites td { font-variant-numeric: tabular-nums; }
.cites td:last-child { color: var(--muted); font-size: 0.85rem; }

/* ---- Publications ---- */
.year h3 { margin: 22px 0 10px; color: var(--muted); font-size: 1.05rem; }
.pubs { margin: 0; padding: 0; list-style: none; }
.pubs li { margin: 0 0 16px; }
.pubs .title, .pubs .authors, .pubs .venue { display: block; }
.pubs .title { font-weight: 600; }
.pubs .authors, .pubs .venue { color: var(--muted); font-size: 0.95rem; }
.pubs .authors strong { color: var(--text); }
.badge {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--badge-bg);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  vertical-align: 2px;
}

/* ---- Experience / education entries ---- */
.entry { margin: 0 0 20px; }
.entry-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 12px; }
.date { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.org { margin: 0; color: var(--muted); }
.entry ul, .list { margin: 6px 0 0; padding-left: 20px; }
.list li { margin: 0 0 6px; }

footer { padding: 24px 0 40px; color: var(--muted); font-size: 0.9rem; }

/* Keep the menu visible while scrolling on wider screens */
@media (min-width: 700px) {
  .top { position: sticky; top: 0; z-index: 10; }
}

@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .intro { flex-direction: column; align-items: flex-start; gap: 16px; padding-top: 28px; }
  .photo { width: 120px; height: 120px; }
  h1 { font-size: 2rem; }
}
