/*
  sabateman.com — single-page professional site.

  Hand-written, no framework, no build step. The previous site inherited
  Bootstrap 3 + jQuery under GPL-3.0; this replaces all of it with ~200 lines
  we own outright.

  The HTML comes from pandoc rendering src/resume.md, so the selectors below
  target pandoc's output shape: h2 per section, h3 per role, and an emphasized
  paragraph immediately after each h3 carrying the location/date line.
*/

:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #1c2024;
  --muted: #5a6169;
  --accent: #2c3e50;
  --rule: #e3e6ea;
  --measure: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --surface: #1c2024;
    --text: #e6e8ea;
    --muted: #9aa2ab;
    --accent: #8fb3d9;
    --rule: #2b3138;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
  max-width: var(--measure);
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "kern" 1;
}

/* ---------- Masthead ---------- */

.masthead { margin-bottom: 2.5rem; }

.masthead h1 {
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0.4rem 0 0;
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 600;
}

.location {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.resume-download { margin: 1.5rem 0 0; }

.button {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.button:hover,
.button:focus-visible {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
}

/* ---------- Links ---------- */

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

a:hover { text-decoration: none; }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Summary ---------- */

.summary {
  margin-bottom: 2.5rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
}

.summary p { margin: 0; }

/* ---------- Sections ---------- */

section h2 {
  margin: 2.75rem 0 0;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

section h3 {
  margin: 1.75rem 0 0;
  font-size: 1.03rem;
  line-height: 1.4;
}

/* Pandoc renders the "*Remote | August 2017 – Present*" line as an emphasized
   paragraph directly after the role heading. */
section h3 + p em {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  font-style: normal;
  letter-spacing: 0.01em;
}

section h3 + p { margin: 0.15rem 0 0.6rem; }

ul {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
}

li { margin-bottom: 0.4rem; }

li::marker { color: var(--muted); }

strong { font-weight: 650; }

/* Skills section reads as label/value pairs rather than prose. */
#skills p { margin: 0.6rem 0 0; }

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

footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
}

footer p { margin: 0; }

/* ---------- Print ---------- */

@media print {
  :root {
    --bg: #fff;
    --text: #000;
    --muted: #444;
    --accent: #000;
    --surface: #fff;
  }

  body { padding: 0; max-width: none; font-size: 11pt; }

  .resume-download { display: none; }

  a { text-decoration: none; }

  section h3, li { break-inside: avoid; }
}
