/* ---------------------------------------------------------------
   Palette. Orange + purple on warm paper; inverted for dark mode.
   The card colours stay saturated in both themes, so text on them
   is always dark ink.
   --------------------------------------------------------------- */
:root {
  --ink: #14121a;
  --paper: #fff4e6;
  --orange: #ff6a13;
  --purple: #7b3fe4;
  --oncolor: #14121a;
  --edge: 3px;
  --off: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f6eeff;
    --paper: #17141f;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 5rem;
}

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

h1 {
  font-size: clamp(1.8rem, 7vw, 3.4rem);
  line-height: 1.05;
  margin: 0 0 .7rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: -.03em;
}

h1 .last {
  display: inline-block;
  background: var(--purple);
  color: #fff4e6;
  padding: 0 .12em;
  transform: rotate(-1.2deg);
}

.tagline {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 1.2rem;
}

.tagline a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
  text-decoration-color: var(--orange);
}

nav { display: flex; flex-wrap: wrap; gap: .7rem; }

nav a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  border: var(--edge) solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: .45rem .8rem;
  font-weight: 700;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

/* press the button into its own shadow */
nav a:hover {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--ink);
  background: var(--orange);
  color: var(--oncolor);
}

nav svg { width: 16px; height: 16px; flex: none; }

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

section { margin-top: 2.3rem; }

h2 {
  display: inline-block;
  margin: 0 0 1rem;
  font-size: .85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  background: var(--ink);
  color: var(--paper);
  padding: .3rem .7rem;
  transform: rotate(-1deg);
}

.card {
  border: var(--edge) solid var(--ink);
  box-shadow: var(--off) var(--off) 0 var(--ink);
  padding: 1.3rem 1.4rem;
  color: var(--oncolor);
  transition: transform .14s ease, box-shadow .14s ease;
}

.card:hover {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 var(--ink);
}

.card.orange { background: var(--orange); }
.card.purple { background: var(--purple); color: #fff4e6; }
.card p { margin: 0; }
/* space between stacked paragraphs, without padding the card's top or bottom */
.card p + p { margin-top: .8rem; }
.card a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

.pubs { list-style: none; padding: 0; margin: 0; }
.pubs li { margin-bottom: 1.1rem; line-height: 1.5; }
.pubs li:last-child { margin-bottom: 0; }
.pub-title { font-weight: 800; font-size: 1.05rem; }

/* your own name in an author list */
.me { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

.pub-note {
  margin: 1.1rem 0 0;
  padding-top: .9rem;
  border-top: 2px solid currentColor;
  font-size: .88rem;
  opacity: .85;
}

footer {
  margin-top: 3.5rem;
  padding-top: 1.2rem;
  border-top: var(--edge) solid var(--ink);
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---- CV-style entries: education, posters, voluntary work ---- */

.entries { list-style: none; padding: 0; margin: 1.1rem 0 0; }
.entries > li { margin-bottom: 1.3rem; }
.entries > li:last-child { margin-bottom: 0; }

.entry-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .3rem 1rem;
}

.entry-title { font-weight: 800; }

.entry-date {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  opacity: .85;
  white-space: nowrap;
}

.entry-org { font-size: .95rem; opacity: .9; margin-top: .1rem; }


/* the About card holds a single education entry; no extra top gap needed */
section:first-of-type .entries { margin-top: 1rem; }

/* ---- research interest chips ---- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
}

/* currentColor keeps them legible on either card colour */
.chip {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  border: 2px solid currentColor;
  padding: .18rem .5rem;
  white-space: nowrap;
}
