/* ---------------------------------------------------------------
   jeffreyljensen.com — shared stylesheet
   Edit colors and spacing here; all three pages use this file.
   --------------------------------------------------------------- */

:root {
  --bg:        #fdfcfa;
  --surface:   #f4f1ec;
  --text:      #1c1b1a;
  --muted:     #5f5b56;
  --faint:     #8a857e;
  --rule:      #e2ddd5;
  --accent:    #57068c;
  --accent-alt:#7b3fb0;
  --maxw:      44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #14131a;
    --surface:   #1d1c25;
    --text:      #eceaf2;
    --muted:     #b3aec0;
    --faint:     #8b8699;
    --rule:      #2e2c39;
    --accent:    #c4a2e8;
    --accent-alt:#dcc6f5;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
               Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

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

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

header.site .name {
  font-size: 1.9rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 0.35rem;
}

header.site .name a {
  color: inherit;
  text-decoration: none;
  border: 0;
}

header.site .role {
  margin: 0 0 1.6rem;
  color: var(--muted);
  font-size: 1.02rem;
}

nav.site {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

nav.site a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

nav.site a:hover { color: var(--text); border-bottom-color: var(--rule); }

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

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

main { padding-bottom: 1rem; }

h2 {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
  margin: 3.25rem 0 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
}

main > h2:first-child { margin-top: 0; }

p { margin: 0 0 1.1rem; }

.lead { font-size: 1.18rem; line-height: 1.6; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  transition: color 0.15s ease, border-color 0.15s ease;
}

a:hover { color: var(--accent-alt); border-bottom-color: currentColor; }

/* ---------- about page ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

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

.quicklinks a {
  display: inline-block;
  padding: 0.45rem 1.05rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
}

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

.contact {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--muted);
}

.contact .label {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.4rem;
}

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

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

ol.pubs > li {
  position: relative;
  padding: 0 0 1.6rem 2.4rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--rule);
}

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

ol.pubs > li::before {
  counter-increment: pub;
  content: counter(pub);
  position: absolute;
  left: 0;
  top: 0.28rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
}

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

ul.pubs > li {
  padding: 0 0 1.6rem 0;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--rule);
}

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

.pub-title {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  line-height: 1.45;
}

.pub-title a { color: var(--text); border-bottom-color: var(--rule); }
.pub-title a:hover { color: var(--accent); }

.pub-meta { display: block; color: var(--muted); font-size: 0.97rem; }

.pub-meta em { font-style: italic; }

.pub-links {
  margin-top: 0.55rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
}

.pub-links a { border-bottom-color: transparent; }
.pub-links a:hover { border-bottom-color: currentColor; }

.tag {
  display: inline-block;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: 3px;
  padding: 0.14rem 0.45rem;
  vertical-align: 0.12em;
  margin-left: 0.4rem;
  white-space: nowrap;
}

/* ---------- teaching ---------- */

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

.courses > li {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.courses > li:last-child { border-bottom: 0; margin-bottom: 0; }

.course-title { display: block; font-weight: 600; margin-bottom: 0.3rem; }

.course-sub {
  display: block;
  color: var(--muted);
  font-size: 0.97rem;
  margin-bottom: 0.5rem;
}

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

footer.site {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding: 1.75rem 0 3rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--faint);
}

footer.site a { color: var(--faint); border-bottom-color: transparent; }
footer.site a:hover { color: var(--accent); }

/* ---------- responsive ---------- */

@media (min-width: 46rem) {
  .about-grid { grid-template-columns: 1fr 13rem; gap: 3.5rem; }
  header.site { padding-top: 4.5rem; }
  header.site .name { font-size: 2.25rem; }
}

@media (max-width: 30rem) {
  body { font-size: 1rem; }
  header.site { padding-top: 2.25rem; margin-bottom: 2.25rem; }
  header.site .name { font-size: 1.6rem; }
  nav.site { gap: 1.15rem; font-size: 0.76rem; }
}

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