:root {
  --bg: #faf9f6;
  --fg: #1c1a17;
  --muted: #6f6a62;
  --accent: #9a4a2e;
  --rule: #e4e0d8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161412;
    --fg: #ece8e2;
    --muted: #a39d93;
    --accent: #d0855f;
    --rule: #2e2a26;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 2rem;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  border-top: 3px solid var(--accent);
}

.card {
  max-width: 34rem;
  text-align: center;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(2.25rem, 6vw, 3rem);
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.role {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.location {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.bio {
  margin: 1.75rem auto 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  max-width: 30rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.links {
  margin-top: 2.25rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.links a {
  color: var(--fg);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: color 150ms ease, border-color 150ms ease;
}

.links a:hover,
.links a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

footer {
  margin-top: auto;
  padding-top: 3rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

footer .mark {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--accent);
}

@media (max-width: 30rem) {
  .links { gap: 1.25rem; }
}

/* Resume page */
body.resume {
  justify-content: flex-start;
  align-items: center;
  padding: 2.5rem 1.5rem 2rem;
}

.sheet {
  width: 100%;
  max-width: 42rem;
}

.topnav {
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
}

.topnav a:hover { color: var(--accent); }

.resume header { text-align: center; }

.resume h1 { font-size: clamp(1.9rem, 5vw, 2.4rem); }

.resume .contact {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.resume .contact a { color: var(--muted); }

.resume .contact a:hover { color: var(--accent); }

.summary {
  margin: 1.75rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 1rem;
}

.resume section { margin-top: 2.25rem; }

.resume h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 1.35rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.25rem;
}

.job { margin-bottom: 1.75rem; }
.job:last-child { margin-bottom: 0; }

.jobhead h3 {
  font-size: 1.02rem;
  font-weight: 600;
}

.jobhead .loc {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85rem;
}

.jobhead .loc::before { content: "\00b7\0020"; }

.title {
  font-size: 0.92rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.1rem;
}

.title .dates {
  color: var(--muted);
  font-weight: 400;
}

.title .dates::before { content: "\00b7\0020"; }

.job ul {
  margin: 0.6rem 0 0 1.2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.job li { margin-bottom: 0.35rem; }
.job li::marker { color: var(--accent); }

ul.plain {
  list-style: none;
  color: var(--muted);
  font-size: 0.95rem;
}

ul.plain li { margin-bottom: 0.35rem; }
ul.plain strong { color: var(--fg); font-weight: 600; }

.resume a { color: var(--fg); }


/* Canonical resume.md output */
.resume-content > p:first-child {
  margin: 1.75rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 1rem;
}
.resume-content h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 1.35rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
  margin: 2.25rem 0 1.25rem;
}
.resume-content h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin-top: 1.75rem;
}
.resume-content h3 + p {
  color: var(--accent);
  font-size: 0.92rem;
  margin-top: 0.1rem;
}
.resume-content ul {
  margin: 0.6rem 0 0 1.2rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.resume-content li { margin-bottom: 0.35rem; }
.resume-content li::marker { color: var(--accent); }
