/* jnrachele.com — one stylesheet for every page */
:root {
  --night: #0b2f37;
  --night-2: #12434c;
  --ink: #0d2a30;
  --ink-soft: #4a6267;
  --paper: #f3f6f5;
  --white: #ffffff;
  --rule: #d3dedc;
  --signal: #ff5a1f;   /* neighbourhoods and inequality */
  --sun: #ffc22e;      /* walkable cities */
  --mint: #3cc6a8;     /* disability and inclusion */
  --link: #0f6b5c;
  --display: "Archivo", "Arial Black", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --wrap: 72rem;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--serif); }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.1; }
p { margin: 0 0 1em; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.skip { position: absolute; left: -999px; top: 0; background: var(--sun); color: var(--ink); padding: .5rem 1rem; z-index: 20; font-family: var(--display); }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- header ---------- */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 2rem;
  padding: 1.1rem var(--pad);
  font-family: var(--display);
}
.wordmark { color: #fff; text-decoration: none; font-weight: 800; font-stretch: 112%; font-size: 1.05rem; letter-spacing: -.01em; }
.site-header nav { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; }
.site-header nav a { color: #cfe3df; text-decoration: none; font-weight: 600; font-size: .95rem; padding: .2rem 0; border-bottom: 3px solid transparent; }
.site-header nav a:hover { color: #fff; border-bottom-color: rgba(255,255,255,.35); }
.site-header nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--signal); }

/* ---------- map ---------- */
.citymap { position: absolute; inset: 0; width: 100%; height: 100%; }
.citymap .route { fill: none; stroke-width: 12; stroke-linejoin: round; stroke-linecap: round; }
.citymap .stop { fill: var(--night); stroke: #fff; stroke-width: 5; }

/* ---------- home hero ---------- */
.hero { position: relative; background: var(--night); color: #fff; overflow: hidden; min-height: min(88vh, 46rem); display: flex; align-items: flex-end; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11,47,55,.97) 0%, rgba(11,47,55,.88) 38%, rgba(11,47,55,.15) 72%, rgba(11,47,55,0) 100%);
}
.hero-inner { position: relative; z-index: 2; width: 100%; padding-top: 7rem; padding-bottom: clamp(3rem, 8vh, 5.5rem); }
.hero-title { font: 700 1rem/1.3 var(--display); font-stretch: 112%; color: var(--sun); margin-bottom: 1rem; }
.hero h1 {
  font-weight: 900; font-stretch: 125%;
  font-size: clamp(2.8rem, 8.2vw, 6.6rem); line-height: .92; letter-spacing: -.035em;
  max-width: 9ch; margin-bottom: 1.6rem;
}
.lede { font-size: clamp(1.2rem, 2.1vw, 1.55rem); line-height: 1.4; max-width: 28ch; color: #e6f0ee; }
.cta { display: flex; flex-wrap: wrap; gap: .75rem 1rem; margin-top: 2rem; }
.button {
  display: inline-block; font: 700 1rem/1 var(--display); text-decoration: none;
  background: var(--signal); color: var(--night); padding: .95rem 1.4rem; border-radius: 999px;
  border: 2px solid var(--signal);
}
.button:hover { background: #fff; border-color: #fff; }
.button.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.button.ghost:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.button.ghost.dark { color: var(--ink); border-color: var(--ink); }
.button.ghost.dark:hover { background: var(--ink); color: #fff; }

/* the one orchestrated moment: transit lines draw in on load */
@media (prefers-reduced-motion: no-preference) {
  .hero .route { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s cubic-bezier(.6,0,.2,1) forwards; }
  .hero .route:nth-of-type(2) { animation-delay: .35s; }
  .hero .route:nth-of-type(3) { animation-delay: .7s; }
  .hero .stop { opacity: 0; animation: pop .3s ease-out 1.9s forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }

/* legend strip under the hero */
.legend { background: var(--night-2); color: #fff; }
.legend-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: .75rem 2.75rem; padding-top: 1.4rem; padding-bottom: 1.4rem; font: 500 1rem/1.3 var(--display); }
.legend p { margin: 0; color: #cfe3df; }
.legend b { color: #fff; font-weight: 900; font-stretch: 115%; font-size: 1.7rem; margin-right: .35rem; letter-spacing: -.02em; }
.legend .asof { margin-left: auto; font-size: .82rem; color: #9fbcb7; }
.legend .asof a { color: #cfe3df; }

/* ---------- inner page band ---------- */
.page-band { position: relative; background: var(--night); color: #fff; overflow: hidden; padding: 6.5rem 0 2.5rem; }
.page-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,47,55,.95) 30%, rgba(11,47,55,.4)); }
.page-band .wrap { position: relative; z-index: 2; }
.page-band h1 { font-weight: 900; font-stretch: 125%; font-size: clamp(2.4rem, 6vw, 4.4rem); letter-spacing: -.035em; line-height: .95; }
.routebar { display: flex; height: 8px; }
.routebar span { flex: 1; }

/* ---------- sections ---------- */
.block { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
main { padding-bottom: 5rem; }
.section-title { font-weight: 800; font-stretch: 112%; font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.02em; margin-bottom: 1.5rem; }
.sub { font-size: 1.05rem; font-weight: 700; color: var(--ink-soft); margin: 1.5rem 0 .75rem; }
.more { font: 700 1rem/1.4 var(--display); }
.intro { font-size: 1.2rem; max-width: 40rem; }

.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.theme {
  background: var(--white); padding: 1.75rem 1.5rem 1.5rem; border-radius: 6px;
  border-top: 10px solid var(--c); display: flex; flex-direction: column;
}
.theme h3 { font-size: 1.35rem; font-weight: 800; font-stretch: 108%; letter-spacing: -.015em; margin-bottom: .75rem; }
.theme p { color: var(--ink-soft); flex: 1; }
.theme a { font: 700 .95rem/1.3 var(--display); color: var(--ink); text-decoration-color: var(--c); text-decoration-thickness: 3px; }

.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about-card { background: var(--night); color: #e6f0ee; padding: 1.75rem; border-radius: 6px; }
.about-card a { color: var(--sun); }
.about-card .portrait { width: 8rem; height: 8.6rem; margin-bottom: 1.25rem; }
.portrait { object-fit: cover; border-radius: 6px; background: var(--night-2); }

/* ---------- publications ---------- */
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { padding: 0 0 1.4rem; position: relative; }
.pub p { margin: 0 0 .35rem; max-width: 46rem; }
.pub strong { font-weight: 600; background: linear-gradient(transparent 62%, rgba(255,194,46,.45) 62%); }
.pub .yr { display: inline-block; font: 800 .8rem/1 var(--display); background: var(--night); color: #fff; padding: .3rem .5rem; border-radius: 3px; margin-bottom: .45rem; }
.links { display: flex; gap: .5rem; font: 700 .8rem/1 var(--display); }
.links a { text-decoration: none; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 999px; padding: .35rem .7rem; }
.links a:hover { background: var(--ink); color: #fff; }
.pubs.plain .pub { border-top: 1px solid var(--rule); padding: 1.25rem 0; }

.filter { background: var(--white); padding: 1.5rem; border-radius: 6px; margin-bottom: 1.5rem; max-width: 48rem; }
.filter label { display: block; font: 700 1rem/1.4 var(--display); margin-bottom: .5rem; }
.filter input { width: 100%; font: 400 1.05rem/1.4 var(--display); color: var(--ink); padding: .75rem .9rem; border: 2px solid var(--ink); border-radius: 6px; background: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.chip {
  font: 700 .85rem/1 var(--display); color: var(--ink); background: #fff; cursor: pointer;
  border: 2px solid var(--c); border-radius: 999px; padding: .5rem .85rem;
}
.chip[aria-pressed="true"] { background: var(--c); }
.status { font: 500 .9rem/1.4 var(--display); color: var(--ink-soft); min-height: 1.3em; margin: .75rem 0 0; }
.jump { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font: 700 .95rem/1.5 var(--display); margin-bottom: 1rem; }

.pub-section { padding-top: 2.5rem; }
.count { font-weight: 500; color: var(--ink-soft); font-size: 1rem; margin-left: .3rem; }
.year-group { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1.5rem; padding: 1.5rem 0; border-top: 2px solid var(--night); }
.year { font-weight: 900; font-stretch: 125%; font-size: 2rem; letter-spacing: -.03em; color: var(--night); position: sticky; top: 1rem; align-self: start; font-variant-numeric: tabular-nums; }

/* ---------- about ---------- */
.about-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about-top:has(.portrait) { grid-template-columns: 17rem minmax(0, 1fr); }
.about-top .portrait { width: 100%; height: auto; aspect-ratio: 14 / 15; border-bottom: 10px solid var(--signal); }
.prose { max-width: 42rem; font-size: 1.15rem; }
.rows { list-style: none; margin: 0; padding: 0; max-width: 56rem; }
.rows li { display: grid; grid-template-columns: minmax(0, 1fr); padding: .9rem 0; border-top: 1px solid var(--rule); }
.rows b { font: 700 1.05rem/1.35 var(--display); }
.rows span { color: var(--ink-soft); }
.rows.dated li { grid-template-columns: 6.5rem minmax(0, 1fr); column-gap: 1rem; }
.rows.dated li > *:not(.when) { grid-column: 2; }
.rows .when { grid-row: 1 / span 3; font: 800 .95rem/1.4 var(--display); color: var(--night); font-variant-numeric: tabular-nums; }
.rows .thesis { color: var(--ink); font-style: italic; }
.rows .meta { font-size: .9rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }

/* ---------- grants ---------- */
.big-total { font: 500 1.2rem/1.3 var(--display); margin-bottom: 2rem; }
.big-total b { display: block; font-weight: 900; font-stretch: 125%; font-size: clamp(2.6rem, 7vw, 4.5rem); letter-spacing: -.04em; color: var(--night); line-height: 1; margin-bottom: .3rem; }
.grants { list-style: none; margin: 0; padding: 0; max-width: 60rem; }
.grant { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; padding: 1.5rem 0; border-top: 2px solid var(--night); }
.grant h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.3; margin-bottom: .5rem; }
.funder { margin-bottom: .3rem; }
.meta { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.meta strong { color: var(--ink); font-weight: 600; }
.amount { font: 900 1.4rem/1.2 var(--display); font-stretch: 112%; font-variant-numeric: tabular-nums; margin: 0; text-align: right; }

/* ---------- media ---------- */
.media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 5vw, 4rem); }
.media-group { padding-bottom: 1.5rem; }
.media { list-style: none; margin: 0; padding: 0; }
.media li { padding: 1rem 0; border-top: 1px solid var(--rule); }
.media h3 { font: 600 1.15rem/1.35 var(--serif); }
.media-meta { font: 600 .85rem/1.4 var(--display); color: var(--ink-soft); margin: 0 0 .25rem; }
.note { color: var(--ink-soft); margin: .4rem 0 0; font-size: .98rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--night); color: #cfe3df; font: 400 .95rem/1.5 var(--display); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.foot p { margin: 0; }
.foot-name { color: #fff; font-weight: 800; font-stretch: 112%; font-size: 1.15rem; }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.foot-links a { color: #fff; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .themes, .split, .two-col, .media-grid { grid-template-columns: 1fr; }
  .about-top, .about-top:has(.portrait) { grid-template-columns: 1fr; }
  .about-top .portrait { max-width: 14rem; }
  .legend .asof { margin-left: 0; width: 100%; }
}
@media (max-width: 640px) {
  .site-header { position: relative; background: var(--night); }
  .hero { min-height: 0; }
  .hero::after { background: linear-gradient(0deg, rgba(11,47,55,.98) 45%, rgba(11,47,55,.55) 100%); }
  .hero-inner { padding-top: 9rem; }
  .page-band { padding-top: 2.5rem; }
  .year-group { grid-template-columns: 1fr; gap: .5rem; }
  .year { position: static; font-size: 1.6rem; }
  .grant { grid-template-columns: 1fr; gap: .5rem; }
  .amount { text-align: left; }
  .rows.dated li { grid-template-columns: 1fr; }
  .rows.dated li > *:not(.when) { grid-column: 1; }
  .rows .when { grid-row: auto; }
}

@media print {
  .site-header nav, .filter, .citymap, .routebar { display: none; }
  .hero, .page-band, .legend, .site-footer { background: #fff; color: #000; }
}
