/* ---------------------------------------------------------------
   jadsalem.com — stylesheet
   One file, no dependencies, no web fonts. Edit freely.
   Colors and spacing all live in the :root block below.
   --------------------------------------------------------------- */

:root {
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --bg: #fcfbf9;
  --surface: #ffffff;
  --ink: #191a1c;
  --muted: #5c6169;
  --faint: #8a9099;
  --rule: #e6e3dd;
  --accent: #1c4e7c;
  --accent-soft: #eef3f8;

  --measure: 40rem;
  --page: 50rem;
  --radius: 3px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131417;
    --surface: #1a1c20;
    --ink: #e9e8e5;
    --muted: #a3a8af;
    --faint: #7b8189;
    --rule: #2a2d33;
    --accent: #8ebbe2;
    --accent-soft: #1b242e;
  }
}

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

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

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

/* --- Layout ---------------------------------------------------- */

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

main { padding-bottom: 5rem; }

.prose { max-width: var(--measure); }

/* --- Skip link ------------------------------------------------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

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

.site-header {
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3.5rem;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.6rem;
  padding-bottom: 1.4rem;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--accent); }

.site-nav {
  display: flex;
  gap: 1.75rem;
  font-size: 0.94rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* --- Typography ------------------------------------------------ */

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.1rem, 5vw, 2.9rem);
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.5rem;
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
}

p { margin: 0 0 1.15rem; }

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

/* Small uppercase section label */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 0.55rem;
}

.lede {
  font-size: 1.16rem;
  line-height: 1.6;
  color: var(--ink);
}

.subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.note {
  font-size: 0.9rem;
  color: var(--muted);
}

/* --- Sections -------------------------------------------------- */

.section {
  padding-top: 2.75rem;
  margin-top: 2.75rem;
  border-top: 1px solid var(--rule);
}

/* --- Homepage hero --------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 12rem;
  gap: 2.75rem;
  align-items: start;
  margin-bottom: 1rem;
}

@media (max-width: 42rem) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .portrait { max-width: 11rem; }
}

/* Headshot placeholder. Replace the <div> with an <img> when ready. */
.portrait {
  width: 100%;
  height: auto;          /* beats the img height attribute, so aspect-ratio wins */
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  object-fit: cover;
  display: block;
  background: var(--accent-soft);
  border: 1px solid var(--rule);
}

.portrait--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--faint);
  padding: 1rem;
}

/* --- Buttons / links ------------------------------------------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.button {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 550;
  padding: 0.55rem 1.05rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.button:hover { background: var(--accent); color: var(--bg); }

.button--primary {
  background: var(--accent);
  color: var(--bg);
}
.button--primary:hover { opacity: 0.87; }

/* --- Interest tags --------------------------------------------- */

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

.tags li {
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--accent-soft);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.28rem 0.8rem;
}

/* --- Publication list ------------------------------------------ */

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

.pubs > li {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
  max-width: var(--measure);
}
.pubs > li:first-child { padding-top: 0.25rem; }
.pubs > li:last-child { border-bottom: 0; }

.pub-title {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.35;
  margin: 0 0 0.3rem;
  font-weight: 600;
}
.pub-title a { color: var(--ink); text-decoration: none; }
.pub-title a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.pub-meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}
.pub-venue { font-style: italic; }

/* --- Course / CV-style lists ----------------------------------- */

.entry-group {
  margin: 0 0 2.25rem;
  max-width: var(--measure);
}

.entry-group > h3 {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0.9rem;
}

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

.entries > li {
  display: grid;
  grid-template-columns: 5.75rem 1fr;
  gap: 0 1rem;
  padding: 0.5rem 0;
  align-items: baseline;
}

@media (max-width: 34rem) {
  .entries > li { grid-template-columns: 1fr; gap: 0.1rem; }
  .code { font-size: 0.8rem; }
}

.code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

.entry-name { display: block; }
.entry-when {
  display: block;
  font-size: 0.87rem;
  color: var(--faint);
}

/* When a date sits inside a group heading, keep it on the same line */
.entry-group > h3 .entry-when {
  display: inline;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  margin-left: 0.5rem;
}

/* Plain bulleted list with breathing room */
.list-clean {
  list-style: none;
  padding: 0;
  margin: 0 0 1.15rem;
  max-width: var(--measure);
}
.list-clean > li {
  padding: 0.3rem 0 0.3rem 1.35rem;
  position: relative;
}
.list-clean > li::before {
  content: "–";
  position: absolute;
  left: 0.15rem;
  color: var(--faint);
}

/* --- Callout --------------------------------------------------- */

.callout {
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.35rem;
  margin: 0 0 1.5rem;
  max-width: var(--measure);
  font-size: 0.96rem;
}
.callout p:last-child { margin-bottom: 0; }

/* --- Contact --------------------------------------------------- */

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  max-width: var(--measure);
}
.contact-list > li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}
.contact-list > li:last-child { border-bottom: 0; }

/* Address written out rather than linked, so it isn't trivially harvested */
.email {
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.contact-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.2rem;
}

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

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.75rem 0 3rem;
  font-size: 0.88rem;
  color: var(--faint);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}
.site-footer a { color: var(--muted); }

/* --- Focus ----------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Motion ---------------------------------------------------- */

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

/* --- Print ----------------------------------------------------- */

@media print {
  .site-nav, .site-footer, .actions, .skip, .portrait { display: none; }
  body { font-size: 11pt; color: #000; background: #fff; }
  a { color: #000; text-decoration: none; }
  .section { border-color: #ccc; }
}
