/* ===========================================================
   Cole A. McCormick — Academic Website
   =========================================================== */

:root {
  --bg: #f7f5f0;
  --bg-alt: #efebe2;
  --card: #ffffff;
  --text: #23262b;
  --text-muted: #5c6167;
  --border: #ddd6c7;
  --accent: #2f6f6b;
  --accent-dark: #1e4b48;
  --accent-soft: #e4eeed;
  --warm: #a85a34;
  --warm-soft: #f3e7dd;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 880px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  margin: 0 0 0.5em;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.5rem; margin-top: 2.2em; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

.muted { color: var(--text-muted); }

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

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

/* ---------- Top navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  white-space: nowrap;
}
.brand span { color: var(--accent-dark); }

nav.tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}
nav.tabs::-webkit-scrollbar { display: none; }

nav.tabs a {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  white-space: nowrap;
}

nav.tabs a:hover {
  color: var(--accent-dark);
  text-decoration: none;
  background: var(--accent-soft);
}

nav.tabs a.active {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

/* ---------- Hero (biography page) ---------- */

.hero {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.2rem;
  align-items: center;
  padding: 3rem 0 1.5rem;
}

.hero img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(30, 40, 40, 0.08);
}

.hero .kicker {
  color: var(--accent-dark);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 0.5rem;
}

.hero h1 { margin-bottom: 0.2em; }

.hero .role {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 0.8em;
}

.hero .tagline {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent-dark);
  font-size: 1.05rem;
}

@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 2rem; }
  .hero img { width: 150px; height: 150px; margin: 0 auto; }
}

/* ---------- Page header (research pages) ---------- */

.page-header {
  padding: 2.6rem 0 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.page-header .kicker {
  color: var(--accent-dark);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 0.6rem;
}

.page-header p.lede {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 640px;
}

.status-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--warm-soft);
  color: var(--warm);
  margin-bottom: 0.8rem;
}

/* ---------- Sections & cards ---------- */

section { margin-bottom: 2.4rem; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.6rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

ul.plain { padding-left: 1.2rem; margin: 0; }
ul.plain li { margin-bottom: 0.5em; }

.badge-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }
.badge {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
}

/* ---------- Figure placeholder ---------- */

.figure-card {
  border: 1px dashed var(--border);
  background: var(--bg-alt);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
}

.figure-card svg {
  width: 100%;
  max-width: 380px;
  height: auto;
  margin: 0.5rem auto 1rem;
  color: var(--accent);
}

.figure-card img {
  max-width: 100%;
  max-height: 520px;
  width: auto;
  margin: 0 auto 1rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(30, 40, 40, 0.1);
}

.figure-card figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
  text-align: left;
}

.figure-card figcaption .src {
  display: block;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.figure-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
@media (max-width: 640px) { .figure-grid { grid-template-columns: 1fr; } }

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

.pub {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.pub:last-child { border-bottom: none; }

.pub .cite { margin: 0 0 0.3em; }
.pub .authors strong { color: var(--text); }

.pub-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 2rem 0 3rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 0.55rem 1rem;
  border-radius: 8px;
}
.footer-links a:hover { background: #d9e8e6; text-decoration: none; }

.site-footer .fine {
  font-size: 0.82rem;
  color: var(--text-muted);
}
