/* ============================================================
   Nolan Dahm — Public Historian
   Shared stylesheet. Editorial / near-monochrome, one warm accent.
   ------------------------------------------------------------
   STYLE SYSTEM
   Fonts (all system / local — no hosted fonts):
     --serif : editorial headline serif stack
     --sans  : humanist UI/body sans stack
   Palette:
     --ink        #201d1a   near-black text
     --paper      #faf8f4   warm paper background
     --muted      #6f6a63   secondary text
     --hairline   #e4e0d8   thin rules / borders
     --accent     #9a4a2c   quiet burnt-sienna, used sparingly
   ============================================================ */

:root {
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --ink: #201d1a;
  --paper: #faf8f4;
  --panel: #f3efe8;
  --muted: #6f6a63;
  --faint: #938d84;
  --hairline: #e4e0d8;
  --hairline-strong: #d4cfc4;
  --accent: #9a4a2c;
  --accent-ink: #7c3a20;

  --wrap: 1120px;
  --gap: clamp(1.5rem, 4vw, 3rem);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 2.5rem); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 0.9rem;
  font-weight: 600;
}

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--hairline);
  background: var(--paper);
}
.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.15rem;
  padding-bottom: 1.15rem;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand small {
  display: block;
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
  margin-top: 2px;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.9rem, 2.5vw, 1.9rem);
  font-size: 0.86rem;
}
.nav a {
  color: var(--muted);
  letter-spacing: 0.01em;
  padding-bottom: 3px;
  border-bottom: 1.5px solid transparent;
}
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- Buttons (editorial, no pills) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn .arw { font-size: 1.05em; line-height: 1; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: clamp(4rem, 9vw, 7rem);
  border-top: 1px solid var(--hairline);
  background: var(--panel);
}
.site-footer .wrap {
  padding-top: 2.75rem;
  padding-bottom: 2.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer .brand { font-size: 1.15rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; font-size: 0.86rem; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--ink); }
.footer-meta { font-size: 0.8rem; color: var(--faint); width: 100%; margin-top: 0.5rem; }

/* ---------- Generic section ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section + .section { padding-top: 0; }
.section-head { max-width: 42rem; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section-head h2 { font-size: clamp(1.5rem, 3.4vw, 2.15rem); }
.section-head p { color: var(--muted); margin: 0.8rem 0 0; }

.lede { font-size: 1.16rem; line-height: 1.62; color: #35312c; }

.rule { border: 0; border-top: 1px solid var(--hairline); margin: 0; }

/* ---------- Home hero ---------- */
.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
.hero-name { font-size: clamp(2.7rem, 8vw, 4.6rem); line-height: 1.02; }
.hero-role {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin: 1.1rem 0 1.6rem;
}
.hero-bio { max-width: 34rem; color: #38342e; font-size: 1.1rem; }
.hero-bio p { margin: 0 0 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.9rem; }
.portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--hairline-strong);
  background: var(--panel);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 820px) {
  .hero-grid { grid-template-columns: 1.5fr 1fr; }
  .portrait { max-width: 340px; margin-left: auto; }
}

/* ---------- Stat tiles ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.stat {
  background: var(--paper);
  padding: 1.6rem 1.25rem;
}
.stat .num { font-family: var(--serif); font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1; display: block; }
.stat .lab { display: block; margin-top: 0.55rem; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Filter bar ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 1.1rem;
}
.filter {
  font-family: var(--sans);
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--hairline-strong);
  border-radius: 2px;
  padding: 0.42rem 0.85rem;
  cursor: pointer;
  transition: all .15s ease;
}
.filter:hover { color: var(--ink); border-color: var(--muted); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- Media list ---------- */
.media-group { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.media-group > h3 {
  font-size: 1.25rem;
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 0.4rem;
}
.media-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--hairline);
}
.media-item .m-meta {
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  align-items: center;
}
.tag {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid #e2cfc4;
  border-radius: 2px;
  padding: 0.05rem 0.4rem;
}
.media-item h4 { font-size: 1.22rem; margin: 0.15rem 0; }
.media-item h4 a { color: var(--ink); }
.media-item h4 a:hover { color: var(--accent); }
.media-item .m-desc { color: var(--muted); font-size: 0.98rem; margin: 0; }
.media-item .m-outlet { font-style: italic; color: #4a463f; }
.empty-note { color: var(--faint); font-style: italic; padding: 1.5rem 0; }

@media (min-width: 700px) {
  .media-item { grid-template-columns: 8.5rem 1fr; }
  .media-item .m-meta { flex-direction: column; align-items: flex-start; gap: 0.35rem; padding-top: 0.2rem; }
}

/* ---------- Card grid (exhibits, projects) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 3vw, 2.25rem);
}
@media (min-width: 560px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hairline);
  background: var(--paper);
}
.card .thumb {
  aspect-ratio: 4 / 3;
  background: var(--panel);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .card-body { padding: 1.2rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card .c-meta { font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); font-weight: 600; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.card .c-meta .yr { color: var(--accent); }
.card h3 { font-size: 1.2rem; line-height: 1.2; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card .c-link { margin-top: auto; padding-top: 0.4rem; font-size: 0.86rem; font-weight: 600; }

/* ---------- Resume ---------- */
.resume { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 5vw, 3.5rem); }
@media (min-width: 860px) { .resume { grid-template-columns: 1fr 1fr; } }
.resume-block h2 { font-size: 1.4rem; padding-bottom: 0.6rem; border-bottom: 2px solid var(--ink); margin-bottom: 1.4rem; }
.entry { padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--hairline); }
.entry:last-child { border-bottom: 0; margin-bottom: 0; }
.entry .e-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline; }
.entry h3 { font-size: 1.14rem; }
.entry .e-when { font-size: 0.82rem; color: var(--faint); letter-spacing: 0.04em; white-space: nowrap; font-weight: 600; }
.entry .e-org { font-style: italic; color: #4a463f; margin: 0.15rem 0 0.5rem; }
.entry p { margin: 0; color: var(--muted); font-size: 0.96rem; }
.entry ul { margin: 0.5rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.96rem; }
.entry ul li { margin-bottom: 0.3rem; }

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

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
@media (min-width: 640px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }
.contact-item { background: var(--paper); padding: 1.35rem 1.4rem; }
.contact-item .c-lab {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.contact-item a, .contact-item span:not(.c-lab) { font-size: 1.05rem; }

/* ---------- Digitization / QC feature ---------- */
.qc-feature {
  border: 1px solid var(--hairline);
  background: var(--panel);
  padding: clamp(2rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 820px) { .qc-feature { grid-template-columns: 1.4fr 1fr; gap: 3rem; } }
.qc-feature .qc-word { font-family: var(--serif); font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1; margin-bottom: 1rem; }
.qc-feature .qc-word .qc-accent { color: var(--accent); }
.qc-feature p { color: #38342e; font-size: 1.08rem; max-width: 34rem; }
.qc-visual {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--hairline-strong);
  background:
    repeating-linear-gradient(135deg, #e9e4db 0 22px, #ece7de 22px 44px);
}

/* Clickable card (exhibits with a learn-more url, playlist cards). */
a.card-link { color: inherit; display: flex; flex-direction: column; }
a.card-link:hover { text-decoration: none; }
a.card-link:hover h3 { color: var(--accent-ink); }

/* ---------- Print (résumé) — compact, professional, fits 1–2 pages ---------- */
@media print {
  .site-header, .site-footer, .hero-actions, .resume-actions, .btn, .filters { display: none !important; }
  body { background: #fff; color: #000; font-size: 10.5pt; line-height: 1.35; }
  a { color: #000; text-decoration: none; }
  .section { padding: 0 !important; }
  .wrap { max-width: 100%; padding: 0; }
  .section-head { margin-bottom: 8pt; }
  .section-head .eyebrow { display: none; }
  .section-head h2 { font-size: 19pt; margin: 0 0 2pt; }
  .section-head .lede, .section-head p { font-size: 10pt; margin: 0; color: #333; }
  .resume { display: block; }
  .resume-block h2 { font-size: 12.5pt; border-bottom: 1pt solid #000; padding-bottom: 2pt; margin: 12pt 0 6pt; }
  .entry { break-inside: avoid; margin-bottom: 7pt; }
  .e-top { display: flex; justify-content: space-between; align-items: baseline; }
  .e-top h3 { font-size: 11pt; }
  .e-when { font-size: 9.5pt; color: #333; }
  .e-org { font-size: 10pt; font-style: italic; margin: 1pt 0 2pt; color: #222; }
  .entry ul { margin: 2pt 0 0 0.17in; padding: 0; }
  .entry li { margin: 0 0 1.5pt; font-size: 10pt; }
  /* Contact prints as one compact rule-topped line, not tiles. */
  section[aria-labelledby="contact-head"] .section-head, .rule { display: none; }
  .contact-grid { display: block; border-top: 1pt solid #000; padding-top: 4pt; margin-top: 10pt; }
  .contact-item { display: inline; background: none; padding: 0; font-size: 9.5pt; }
  .contact-item + .contact-item::before { content: "  \00B7  "; }
  .contact-item .c-lab { display: inline; font-size: 9.5pt; letter-spacing: 0; text-transform: none; color: #333; margin: 0 2pt 0 0; }
  .contact-item .c-lab::after { content: ":"; }
  .contact-item a, .contact-item span:not(.c-lab) { font-size: 9.5pt; }
}

/* ---------- Utility ---------- */
.stack-sm > * + * { margin-top: 0.6rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
[hidden] { display: none !important; }
