/* Spencer Bastani — personal site
   Plain CSS, no build step, no external fonts. */

:root {
  --bg:      #fdfcfa;
  --surface: #f5f2ec;
  --text:    #1c1b19;
  --muted:   #6b6862;
  --accent:  #1a4d7a;
  --accent-hover: #0f3455;
  --rule:    #e4e0d8;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #16161a;
    --surface: #1e1e23;
    --text:    #e6e4df;
    --muted:   #98948c;
    --accent:  #8ab8dd;
    --accent-hover: #b3d3ee;
    --rule:    #2e2e34;
  }
}

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

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

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

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.site-header {
  border-bottom: 1px solid var(--rule);
  padding: 3rem 0 0;
}

.site-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0;
}

.site-title a {
  color: inherit;
  text-decoration: none;
  background: none;
}

.site-tagline {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.5rem 0 0;
}

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

.nav a {
  display: inline-block;
  padding-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav a:hover { color: var(--text); }

.nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ---------- Content ---------- */

main { padding: 3rem 0 4rem; }

p { margin: 0 0 1.15rem; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

strong { font-weight: 650; }

.lede {
  font-size: 1.12rem;
  line-height: 1.6;
}

h2.section {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 3.25rem 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

h2.section:first-of-type { margin-top: 0; }

/* ---------- Home ---------- */

.intro {
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 2.5rem;
  align-items: start;
}

.portrait {
  width: 100%;
  height: auto;
  border-radius: 3px;
  display: block;
}

@media (max-width: 620px) {
  .intro { grid-template-columns: 1fr; gap: 1.75rem; }
  .portrait { max-width: 170px; }
}

.meta {
  font-size: 0.95rem;
  color: var(--muted);
}

.meta strong { color: var(--text); }

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

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

.pubs li {
  position: relative;
  margin: 0 0 1.15rem;
  padding-left: 1.15rem;
  font-size: 0.99rem;
  line-height: 1.6;
}

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

.pubs em { color: inherit; }

.new {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1em 0.45em;
  border-radius: 3px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: 0.12em;
}

/* ---------- Policy reports ---------- */

.report {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.75rem;
  align-items: start;
  margin: 0 0 2.75rem;
}

.report img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.report h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}

.report .year {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.3rem;
}

.report p { font-size: 0.96rem; margin-bottom: 0.6rem; }

@media (max-width: 620px) {
  .report { grid-template-columns: 100px 1fr; gap: 1.25rem; }
}

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

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: 0.87rem;
}

.site-footer p { margin: 0; }
