/* Robert S. Kraemer -- site stylesheet
   Monochrome, dossier-style palette: neutral paper/ink grays only,
   no hue. Serif for reading, monospace for dates, roles and document
   metadata (a nod to typewritten NASA-era career records). */

:root {
  color-scheme: light dark;
  --bg: #f4f4f5;
  --bg-raised: #ffffff;
  --text: #17181b;
  --muted: #61646b;
  --rule: #d9dadd;
  --accent: #2c2e33;
  --accent-ink: #ffffff;
  --shadow: 0 1px 2px rgba(20, 20, 22, 0.07);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101113;
    --bg-raised: #191b1e;
    --text: #e8e8ea;
    --muted: #9a9da4;
    --rule: #2c2e33;
    --accent: #d6d7db;
    --accent-ink: #17181b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}

:root[data-theme="dark"] {
  --bg: #101113;
  --bg-raised: #191b1e;
  --text: #e8e8ea;
  --muted: #9a9da4;
  --rule: #2c2e33;
  --accent: #d6d7db;
  --accent-ink: #17181b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: "Space Mono", ui-monospace, Menlo, monospace;
}

.meta-label {
  font-family: "Space Mono", ui-monospace, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* -- site chrome -- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}

.site-header .bar {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.005em;
}

.site-title:hover { color: var(--accent); }

nav.site-nav {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

nav.site-nav a {
  font-family: "Space Mono", ui-monospace, Menlo, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

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

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.page.narrow { max-width: 700px; }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.9rem, 5vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

.lede {
  font-size: 1.08rem;
  color: var(--text);
}

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

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

footer.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: "Space Mono", ui-monospace, Menlo, monospace;
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* -- buttons / doc links -- */

.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Space Mono", ui-monospace, Menlo, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 0.6rem 1rem;
  border-radius: 3px;
  box-shadow: var(--shadow);
}

.doc-link:hover { filter: brightness(1.08); }

.doc-link.secondary {
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--rule);
}

.doc-link.secondary:hover { border-color: var(--accent); }

/* -- home hero + nav cards -- */

.hero {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1.75rem;
  align-items: start;
}

.hero img {
  width: 100%;
  height: auto;
  border-radius: 2px;
  box-shadow: var(--shadow);
  background: var(--bg-raised);
}

.hero .kicker {
  margin: 0 0 0.4rem;
}

.hero .lifespan {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0.3rem 0 1rem;
}

@media (max-width: 480px) {
  .hero { grid-template-columns: 96px 1fr; gap: 1.1rem; }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
}

.nav-card {
  display: block;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text);
  background: var(--bg-raised);
  box-shadow: var(--shadow);
}

.nav-card:hover { border-color: var(--accent); }

.nav-card .meta-label { display: block; margin-bottom: 0.4rem; }

.nav-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.nav-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

/* -- career timeline -- */

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

.timeline li {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
}

.timeline li:last-child { border-bottom: 1px solid var(--rule); }

.timeline .when {
  font-family: "Space Mono", ui-monospace, Menlo, monospace;
  font-size: 0.82rem;
  color: var(--muted);
  padding-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.timeline .role { font-weight: 600; }
.timeline .org { color: var(--muted); font-size: 0.95rem; }

@media (max-width: 480px) {
  .timeline li { grid-template-columns: 1fr; gap: 0.2rem; }
}

.highlights {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.9rem;
}

.highlights li {
  padding-left: 1.2rem;
  position: relative;
}

.highlights li::before {
  content: "\2014";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* -- books -- */

.book {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 2.25rem 0;
  border-top: 1px solid var(--rule);
}

.book:first-of-type { margin-top: 0.5rem; }

.book figure { margin: 0; }

.book img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  box-shadow: var(--shadow);
  background: var(--bg-raised);
}

.book .imprint {
  font-family: "Space Mono", ui-monospace, Menlo, monospace;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.9rem;
  line-height: 1.7;
}

.book .buy { margin: 0; font-size: 0.95rem; }
.book .buy .seller { color: var(--muted); }
.book .buy a { word-break: break-word; }

@media (max-width: 480px) {
  .book { grid-template-columns: 96px 1fr; gap: 1.1rem; }
}

/* -- pdf document link card -- */

.doc-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg-raised);
  box-shadow: var(--shadow);
}

.doc-card .doc-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.doc-card .doc-name {
  font-family: "Space Mono", ui-monospace, Menlo, monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}

.doc-card .doc-meta {
  font-family: "Space Mono", ui-monospace, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.doc-card .doc-link {
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .doc-card { flex-direction: column; align-items: stretch; }
  .doc-card .doc-link { text-align: center; }
}

/* -- video -- */

.video-frame {
  margin: 1.5rem 0 0.75rem;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}

.video-frame video {
  display: block;
  width: 100%;
  height: auto;
}

.memoriam-intro {
  font-size: 1.02rem;
}

.memoriam-intro + .memoriam-intro { margin-top: 0.9rem; }
