/* Yasmin Moslem, personal site */

:root {
  --bg:      #fdfdfc;
  --fg:      #1a1a19;
  --muted:   #63625d;
  --faint:   #8a8983;
  --accent:  #9d1e3c;
  --rule:    #e4e2dc;
  --chip:    #f2f0ea;
  --measure: 62rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:     #131211;
    --fg:     #ecebe8;
    --muted:  #a3a19b;
    --faint:  #7d7b75;
    --accent: #e8798f;
    --rule:   #2b2926;
    --chip:   #1f1d1b;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
  max-width: var(--measure);
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- typography ---------- */

h1 {
  margin: 0 0 1.25rem;
  font-size: 2.15rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
}

h2 {
  margin: 0 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

h3 {
  margin: 0 0 0.5rem;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

h3.sub-h {
  margin: 2.25rem 0 0.85rem;
  font-size: 0.95rem;
}

p { margin: 0 0 1rem; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
  transition: color 0.12s ease, text-decoration-color 0.12s ease;
}

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

b { font-weight: 600; }

/* ---------- intro ---------- */

.intro { margin-bottom: 4rem; }

.lede {
  font-size: 1.28rem;
  line-height: 1.45;
  letter-spacing: -0.01em;
  margin-bottom: 1.1rem;
}

.sub {
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.meta {
  color: var(--faint);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.92rem;
}

.links a { color: var(--muted); }
.links a:hover { color: var(--accent); }

/* ---------- sections ---------- */

section { margin-bottom: 4rem; }

/* ---------- work items ---------- */

.item {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.item:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.item p:not(.eyebrow):not(.stats):not(.tags):not(.refs) {
  color: var(--muted);
  max-width: 40rem;
}

/* Keep running prose at a readable measure even though the page
   itself is wider, so line length doesn't grow with the viewport. */
.lede,
.sub,
section > p:not(.refs) {
  max-width: 40rem;
}

.stats,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.9rem;
}

.stats span,
.tags span {
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  background: var(--chip);
  font-size: 0.83rem;
  color: var(--muted);
  white-space: nowrap;
}

.stats b {
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.refs {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin: 0;
  font-size: 0.9rem;
}

.refs a { color: var(--accent); text-decoration-color: transparent; }
.refs a:hover { text-decoration-color: var(--accent); }

section > .refs { margin-top: 1rem; }

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

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

.pubs li {
  position: relative;
  padding: 0 0 1.15rem 1.9rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid var(--rule);
  counter-increment: pub;
}

.pubs li:last-child { border-bottom: none; margin-bottom: 0; }

.pubs li::before {
  content: counter(pub);
  position: absolute;
  left: 0;
  top: 0.15rem;
  font-size: 0.8rem;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.ptitle { display: block; line-height: 1.4; }

.pvenue {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.note { color: var(--accent); font-weight: 600; }

.pubs a {
  font-size: 0.88rem;
  color: var(--accent);
  text-decoration-color: transparent;
}

.pubs a:hover { text-decoration-color: var(--accent); }

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

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

.plain li {
  padding-left: 1rem;
  margin-bottom: 0.75rem;
  color: var(--muted);
  position: relative;
}

.plain li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--rule);
}

.plain b { color: var(--fg); }

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

.timeline { margin: 1.5rem 0 0; padding: 0; list-style: none; }

.timeline li {
  display: flex;
  gap: 1.25rem;
  padding-bottom: 0.9rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
}

.timeline li:last-child { border-bottom: none; margin-bottom: 0; }

.when {
  flex: 0 0 6.5rem;
  font-size: 0.85rem;
  color: var(--faint);
  padding-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.what { color: var(--muted); }
.what b { color: var(--fg); }

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

footer {
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--faint);
}

footer p { margin: 0; }

/* ---------- small screens ---------- */

@media (max-width: 34rem) {
  body { padding-top: 3rem; font-size: 16px; }
  h1 { font-size: 1.8rem; }
  .lede { font-size: 1.15rem; }
  .timeline li { flex-direction: column; gap: 0.2rem; }
  .when { flex: none; }
}
