/* Leah Lackey, resume page */

/* always dark: soft charcoal on big screens, pure black on phones */
:root {
  --bg: #1b1d21;
  --surface: #24272c;
  --text: #e6e4de;
  --muted: #a0a6ad;
  --accent: #52c4b2;
  --accent-soft: #223c37;
  --rule: #3a3d43;
  --badge-bg: #28372b;
  --badge-text: #a4cfa9;
  --zx-red: rgba(224, 60, 49, 0.31);
  --zx-yellow: rgba(242, 194, 48, 0.27);
  --zx-green: rgba(66, 180, 86, 0.30);
  --zx-cyan: rgba(45, 196, 221, 0.30);
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* small labels stay sans-serif for contrast with the serif body */
.section-nav, .tags, .badge, .when, .project-group {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

/* a ZX Spectrum rainbow flash sweeping across the page, behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(115deg,
    transparent 0 55%,
    var(--zx-red) 55% 59%,
    var(--zx-yellow) 59% 63%,
    var(--zx-green) 63% 67%,
    var(--zx-cyan) 67% 71%,
    transparent 71%);
}

main, .masthead, footer {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1rem;
}

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

/* --- Header --- */

.masthead {
  padding-top: 3.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--rule);
  margin-bottom: 2rem;
  text-align: center;
}

.masthead h1 {
  margin: 0;
  font-size: 2.5rem;
  letter-spacing: 0.01em;
}

.masthead h1::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  margin: 0.65rem auto 0;
}

.tagline {
  margin: 0.6rem 0 1.1rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.top-links, .section-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.1rem;
  font-size: 0.9rem;
}

.section-nav {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--rule);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-nav a {
  color: var(--muted);
  text-decoration: none;
}
.section-nav a:hover { color: var(--accent); text-decoration: underline; }

/* --- Sections --- */

section { margin-bottom: 2.75rem; }

h2 {
  font-size: 1.35rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--rule);
}

.lede { font-size: 1.15rem; margin: 0; }

.project-group {
  font-size: 1.0625rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 1.75rem 0 0.5rem;
}

/* --- Entries (research & projects) --- */

.entry {
  background: var(--surface);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin: 0.9rem 0;
}

.entry h3 {
  margin: 0;
  font-size: 1.0625rem;
}

.entry p { margin: 0.5rem 0 0; }

.tags {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.2rem !important;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: 0.15em;
  padding: 0.1em 0.6em;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-text);
  margin-left: 0.35em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge.current {
  background: var(--accent-soft);
  color: var(--accent);
}

/* --- Timelines & lists --- */

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

.timeline li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--rule);
}
.timeline li:last-child { border-bottom: none; }

.when {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
  padding-top: 0.15rem;
}

.plain-list {
  margin: 0;
  padding-left: 1.2rem;
}
.plain-list li { margin: 0.35rem 0; }
.entry .plain-list { margin-top: 0.5rem; }

/* --- Publications --- */

.papers { padding-left: 1.4rem; }
.papers li { margin: 0.8rem 0; }
.venue { font-style: italic; }

/* --- Footer --- */

footer {
  border-top: 2px solid var(--rule);
  margin-top: 3rem;
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
  text-align: center;
  color: var(--muted);
}

footer .fine { font-size: 0.9rem; }

/* --- Small screens --- */

@media (max-width: 540px) {
  :root {
    --bg: #000;
    /* the flash needs more punch against pure black */
    --zx-red: rgba(224, 60, 49, 0.44);
    --zx-yellow: rgba(242, 194, 48, 0.38);
    --zx-green: rgba(66, 180, 86, 0.42);
    --zx-cyan: rgba(45, 196, 221, 0.42);
  }
}

@media (max-width: 540px) {
  .masthead { padding-top: 2rem; }
  .masthead h1 { font-size: 1.8rem; }
  .timeline li {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
}

/* --- Print --- */

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .section-nav, body::before { display: none; }
  .entry { background: none; border: 1px solid #ccc; padding: 0.5rem 0.8rem; }
  a { color: inherit; text-decoration: none; }
  section { break-inside: avoid-page; margin-bottom: 1.5rem; }
}
