/* erinkiley.com — 2026 refresh.
   Same skeleton as the 2017 site (name header, nav bar, contact table + photo, footer),
   with a light palette and a layout that works at phone width. */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #5d6670;
  --rule: #dcd8cf;
  --accent: #1d5a4c;        /* deep green, a nod to the old #005000 */
  --accent-hover: #2f7d6a;
  --check-bg: #fff3b0;      /* draft-only "CHECK" markers */
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17191c;
    --surface: #1e2125;
    --text: #e6e4df;
    --muted: #a1a8b0;
    --rule: #34383e;
    --accent: #7cc4ae;
    --accent-hover: #a5dccb;
    --check-bg: #5c4f12;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.wrap {
  max-width: 50rem;          /* ~800px, the old site's width, but fluid */
  margin: 0 auto;
  padding: 0 1rem;
}

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

/* ---- Header (replaces the banner photo) ---- */
#header {
  padding: 2.5rem 0 1.25rem;
  border-bottom: 1px solid var(--rule);
}
#name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  letter-spacing: 0.01em;
  line-height: 1.15;
}
#name a { color: var(--text); text-decoration: none; }
#credentials {
  margin: 0.35rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ---- Nav bar ---- */
#nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
}
#nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
#nav a:hover { color: var(--accent); }
#nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ---- Main ---- */
#main { padding: 2rem 0 1rem; }

h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.45rem;
  margin: 2rem 0 0.6rem;
}
h2:first-child { margin-top: 0; }
p { margin: 0 0 1rem; }

/* Home: contact table beside the photo; stacks on narrow screens */
.profile {
  display: grid;
  grid-template-columns: 1fr 11rem;
  gap: 2rem;
  align-items: start;
}
.profile img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--rule);
}
.intro { font-size: 1.08rem; }

table.contact { border-collapse: collapse; width: 100%; }
table.contact th,
table.contact td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 1rem 0.55rem 0;
  border-top: 1px solid var(--rule);
}
table.contact th {
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  width: 8.5rem;
}

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

ul.plain { padding-left: 1.1rem; }
ul.plain li { margin-bottom: 0.35rem; }

@media (max-width: 38rem) {
  .profile { grid-template-columns: 1fr; }
  .profile img { max-width: 9rem; order: -1; }
  table.contact th { width: auto; padding-bottom: 0; display: block; border-top: 1px solid var(--rule); }
  table.contact td { display: block; border-top: none; padding-top: 0.1rem; }
  table.contact tr { display: block; }
}

/* ---- Footer ---- */
#footer {
  margin-top: 2.5rem;
  padding: 1.25rem 0 2.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--muted);
}
#footer p { margin: 0 0 0.4rem; }
#footer img { vertical-align: middle; margin-right: 0.5rem; }

/* Draft-only marker for facts to confirm; remove before publishing. */
.check { background: var(--check-bg); padding: 0 0.25em; border-radius: 3px; font-weight: 600; }

/* Publication list: hanging indent, a little more space between entries */
ul.pubs { list-style: none; padding-left: 0; }
ul.pubs li { padding-left: 1.5rem; text-indent: -1.5rem; margin-bottom: 0.7rem; }

blockquote {
  margin: 0 0 1rem;
  padding: 0.5rem 0 0.5rem 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}
